summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:24:53 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:47 +0100
commitbf057fab3c0d17bf2832c8d9fc6d34b1b859e660 (patch)
tree7792f30782655fa9f0830b7320f9ff988c598fb1 /svl
parent6f06230da10c6a51c5538f1b5515b341475ea043 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I0f2f81dae91f62639e79799b1bed1b2df1fd79ab
Diffstat (limited to 'svl')
-rw-r--r--svl/qa/unit/items/test_IndexedStyleSheets.cxx2
-rw-r--r--svl/qa/unit/items/test_itempool.cxx14
-rw-r--r--svl/qa/unit/svl.cxx16
-rw-r--r--svl/qa/unit/test_INetContentType.cxx2
-rw-r--r--svl/qa/unit/test_URIHelper.cxx110
-rw-r--r--svl/source/config/asiancfg.cxx4
-rw-r--r--svl/source/config/cjkoptions.cxx2
-rw-r--r--svl/source/config/ctloptions.cxx2
-rw-r--r--svl/source/config/itemholder2.cxx2
-rw-r--r--svl/source/filerec/filerec.cxx2
-rw-r--r--svl/source/fsstor/fsfactory.cxx4
-rw-r--r--svl/source/fsstor/fsstorage.cxx10
-rw-r--r--svl/source/fsstor/oinputstreamcontainer.cxx10
-rw-r--r--svl/source/fsstor/ostreamcontainer.cxx10
-rw-r--r--svl/source/inc/poolio.hxx12
-rw-r--r--svl/source/items/IndexedStyleSheets.cxx2
-rw-r--r--svl/source/items/aeitem.cxx20
-rw-r--r--svl/source/items/flagitem.cxx2
-rw-r--r--svl/source/items/itemiter.cxx2
-rw-r--r--svl/source/items/itempool.cxx20
-rw-r--r--svl/source/items/itemprop.cxx8
-rw-r--r--svl/source/items/itemset.cxx44
-rw-r--r--svl/source/items/lckbitem.cxx2
-rw-r--r--svl/source/items/macitem.cxx4
-rw-r--r--svl/source/items/nranges.cxx8
-rw-r--r--svl/source/items/poolcach.cxx6
-rw-r--r--svl/source/items/poolio.cxx36
-rw-r--r--svl/source/items/rngitem.cxx2
-rw-r--r--svl/source/items/sitem.cxx2
-rw-r--r--svl/source/items/slstitm.cxx6
-rw-r--r--svl/source/items/style.cxx22
-rw-r--r--svl/source/items/stylepool.cxx20
-rw-r--r--svl/source/misc/adrparse.cxx30
-rw-r--r--svl/source/misc/inettype.cxx10
-rw-r--r--svl/source/misc/sharecontrolfile.cxx2
-rw-r--r--svl/source/misc/sharedstring.cxx10
-rw-r--r--svl/source/misc/sharedstringpool.cxx2
-rw-r--r--svl/source/misc/strmadpt.cxx22
-rw-r--r--svl/source/misc/urihelper.cxx2
-rw-r--r--svl/source/notify/SfxBroadcaster.cxx4
-rw-r--r--svl/source/numbers/numfmuno.cxx36
-rw-r--r--svl/source/numbers/numuno.cxx4
-rw-r--r--svl/source/numbers/supservs.cxx8
-rw-r--r--svl/source/numbers/zforfind.cxx16
-rw-r--r--svl/source/numbers/zforfind.hxx14
-rw-r--r--svl/source/numbers/zforlist.cxx44
-rw-r--r--svl/source/numbers/zformat.cxx32
-rw-r--r--svl/source/numbers/zforscan.cxx2
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx18
-rw-r--r--svl/source/undo/undo.cxx40
-rw-r--r--svl/unx/source/svdde/ddedummy.cxx42
51 files changed, 373 insertions, 373 deletions
diff --git a/svl/qa/unit/items/test_IndexedStyleSheets.cxx b/svl/qa/unit/items/test_IndexedStyleSheets.cxx
index 17edaf036d1f..c6c728818979 100644
--- a/svl/qa/unit/items/test_IndexedStyleSheets.cxx
+++ b/svl/qa/unit/items/test_IndexedStyleSheets.cxx
@@ -24,7 +24,7 @@ class MockedStyleSheet : public SfxStyleSheetBase
{
public:
MockedStyleSheet(const rtl::OUString& name, SfxStyleFamily fam = SFX_STYLE_FAMILY_CHAR)
- : SfxStyleSheetBase(name, NULL, fam, 0)
+ : SfxStyleSheetBase(name, nullptr, fam, 0)
{;}
};
diff --git a/svl/qa/unit/items/test_itempool.cxx b/svl/qa/unit/items/test_itempool.cxx
index f42ee3fec23e..0c817ec804be 100644
--- a/svl/qa/unit/items/test_itempool.cxx
+++ b/svl/qa/unit/items/test_itempool.cxx
@@ -43,7 +43,7 @@ void PoolItemTest::testPool()
SfxItemPool *pPool = new SfxItemPool("testpool", 0, 3, aItems);
SfxItemPool_Impl *pImpl = SfxItemPool_Impl::GetImpl(pPool);
- CPPUNIT_ASSERT(pImpl != NULL);
+ CPPUNIT_ASSERT(pImpl != nullptr);
CPPUNIT_ASSERT(pImpl->maPoolItems.size() == 4);
// Poolable
@@ -51,10 +51,10 @@ void PoolItemTest::testPool()
SfxVoidItem aNotherZero( 0 );
{
- CPPUNIT_ASSERT(pImpl->maPoolItems[0] == NULL);
+ CPPUNIT_ASSERT(pImpl->maPoolItems[0] == nullptr);
const SfxPoolItem &rVal = pPool->Put(aItemZero);
CPPUNIT_ASSERT(rVal == aItemZero);
- CPPUNIT_ASSERT(pImpl->maPoolItems[0] != NULL);
+ CPPUNIT_ASSERT(pImpl->maPoolItems[0] != nullptr);
const SfxPoolItem &rVal2 = pPool->Put(aNotherZero);
CPPUNIT_ASSERT(rVal2 == rVal);
CPPUNIT_ASSERT(&rVal2 == &rVal);
@@ -70,10 +70,10 @@ void PoolItemTest::testPool()
SfxVoidItem aItemOne( 1 );
SfxVoidItem aNotherOne( 1 );
{
- CPPUNIT_ASSERT(pImpl->maPoolItems[1] == NULL);
+ CPPUNIT_ASSERT(pImpl->maPoolItems[1] == nullptr);
const SfxPoolItem &rVal = pPool->Put(aItemOne);
CPPUNIT_ASSERT(rVal == aItemOne);
- CPPUNIT_ASSERT(pImpl->maPoolItems[1] != NULL);
+ CPPUNIT_ASSERT(pImpl->maPoolItems[1] != nullptr);
const SfxPoolItem &rVal2 = pPool->Put(aNotherOne);
CPPUNIT_ASSERT(rVal2 == rVal);
@@ -84,10 +84,10 @@ void PoolItemTest::testPool()
SfxVoidItem aItemTwo( 2 );
SfxVoidItem aNotherTwo( 2 );
{
- CPPUNIT_ASSERT(pImpl->maPoolItems[2] == NULL);
+ CPPUNIT_ASSERT(pImpl->maPoolItems[2] == nullptr);
const SfxPoolItem &rVal = pPool->Put(aItemTwo);
// those guys just don't go in ...
- CPPUNIT_ASSERT(pImpl->maPoolItems[2] == NULL);
+ CPPUNIT_ASSERT(pImpl->maPoolItems[2] == nullptr);
CPPUNIT_ASSERT(rVal == aItemOne);
}
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 695483ae0c37..e10221132dcf 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -123,19 +123,19 @@ void Test::testNumberFormat()
"#,##0",
"#,##0.00",
"#,###.00",
- 0
+ nullptr
};
const char* pScientific[] = {
"0.00E+000",
"0.00E+00",
- 0
+ nullptr
};
const char* pPercent[] = {
"0%",
"0.00%",
- 0
+ nullptr
};
const char* pFraction[] = {
@@ -147,7 +147,7 @@ void Test::testNumberFormat()
"# \?/4",
"# \?\?/100",
#endif
- 0
+ nullptr
};
#if 0 // TODO: Find out why on some systems the last two currency format codes differ.
@@ -197,7 +197,7 @@ void Test::testNumberFormat()
"[HH]:MM:SS",
"MM:SS.00",
"[HH]:MM:SS.00",
- 0
+ nullptr
};
#if 0 // TODO: This currently fails
@@ -210,12 +210,12 @@ void Test::testNumberFormat()
const char* pBoolean[] = {
"BOOLEAN",
- 0
+ nullptr
};
const char* pText[] = {
"@",
- 0
+ nullptr
};
struct {
@@ -400,7 +400,7 @@ void Test::checkPreviewString(SvNumberFormatter& aFormatter,
OUString& sExpected)
{
OUString sStr;
- Color* pColor = 0;
+ Color* pColor = nullptr;
Color** ppColor = &pColor;
if (!aFormatter.GetPreviewString(sCode, fPreviewNumber, sStr, ppColor, eLang))
CPPUNIT_FAIL("GetPreviewString() failed");
diff --git a/svl/qa/unit/test_INetContentType.cxx b/svl/qa/unit/test_INetContentType.cxx
index 68badb6745c6..7c83a1e0252b 100644
--- a/svl/qa/unit/test_INetContentType.cxx
+++ b/svl/qa/unit/test_INetContentType.cxx
@@ -40,7 +40,7 @@ public:
void Test::testBad() {
OUString in("foo=bar");
CPPUNIT_ASSERT_EQUAL(
- static_cast<sal_Unicode const *>(0),
+ static_cast<sal_Unicode const *>(nullptr),
INetMIME::scanContentType(in.getStr(), in.getStr() + in.getLength()));
OUString t;
OUString s;
diff --git a/svl/qa/unit/test_URIHelper.cxx b/svl/qa/unit/test_URIHelper.cxx
index 37d53e90ec6c..50b239943594 100644
--- a/svl/qa/unit/test_URIHelper.cxx
+++ b/svl/qa/unit/test_URIHelper.cxx
@@ -266,7 +266,7 @@ void Test::testNormalizedMakeRelative() {
URIHelper::normalizedMakeRelative(
m_context, OUString::createFromAscii(tests[i].base),
OUString::createFromAscii(tests[i].absolute)));
- bool ok = tests[i].relative == 0
+ bool ok = tests[i].relative == nullptr
? !ref.is()
: ref.is() && ref->getUriReference().equalsAscii(tests[i].relative);
OString msg;
@@ -287,7 +287,7 @@ void Test::testNormalizedMakeRelative() {
buf.append("none");
}
buf.append(" instead of ");
- if (tests[i].relative == 0) {
+ if (tests[i].relative == nullptr) {
buf.append("none");
} else {
buf.append('<');
@@ -310,7 +310,7 @@ void Test::testFindFirstURLInText() {
static Data const tests[] = {
{ "...ftp://bla.bla.bla/blubber/...",
"ftp://bla.bla.bla/blubber/", 3, 29 },
- { "..\\ftp://bla.bla.bla/blubber/...", 0, 0, 0 },
+ { "..\\ftp://bla.bla.bla/blubber/...", nullptr, 0, 0 },
{ "..\\ftp:\\\\bla.bla.bla\\blubber/...",
//Sync with tools/source/fsys/urlobj.cxx and changeScheme
#ifdef LINUX
@@ -320,12 +320,12 @@ void Test::testFindFirstURLInText() {
#endif
{ "http://sun.com", "http://sun.com/", 0, 14 },
{ "http://sun.com/", "http://sun.com/", 0, 15 },
- { "http://www.xerox.com@www.pcworld.com/go/3990332.htm", 0, 0, 0 },
+ { "http://www.xerox.com@www.pcworld.com/go/3990332.htm", nullptr, 0, 0 },
{ "ftp://www.xerox.com@www.pcworld.com/go/3990332.htm",
"ftp://www.xerox.com@www.pcworld.com/go/3990332.htm", 0, 50 },
- { "Version.1.2.3", 0, 0, 0 },
- { "Version:1.2.3", 0, 0, 0 },
- { "a.b.c", 0, 0, 0 },
+ { "Version.1.2.3", nullptr, 0, 0 },
+ { "Version:1.2.3", nullptr, 0, 0 },
+ { "a.b.c", nullptr, 0, 0 },
{ "file:///a|...", "file:///a:", 0, 10 },
{ "file:///a||...", "file:///a%7C%7C", 0, 11 },
{ "file:///a|/bc#...", "file:///a:/bc", 0, 13 },
@@ -333,61 +333,61 @@ void Test::testFindFirstURLInText() {
{ "abc.def.ghi,ftp.xxx.yyy/zzz...", "ftp://ftp.xxx.yyy/zzz", 12, 27 },
{ "abc.def.ghi,Ftp.xxx.yyy/zzz...", "ftp://Ftp.xxx.yyy/zzz", 12, 27 },
{ "abc.def.ghi,www.xxx.yyy...", "http://www.xxx.yyy/", 12, 23 },
- { "abc.def.ghi,wwww.xxx.yyy...", 0, 0, 0 },
+ { "abc.def.ghi,wwww.xxx.yyy...", nullptr, 0, 0 },
{ "abc.def.ghi,wWW.xxx.yyy...", "http://wWW.xxx.yyy/", 12, 23 },
{ "Bla {mailto.me@abc.def.g.h.i}...",
"mailto:%7Bmailto.me@abc.def.g.h.i", 4, 28 },
- { "abc@def@ghi", 0, 0, 0 },
+ { "abc@def@ghi", nullptr, 0, 0 },
{ "lala@sun.com", "mailto:lala@sun.com", 0, 12 },
{ "1lala@sun.com", "mailto:1lala@sun.com", 0, 13 },
{ "aaa_bbb@xxx.yy", "mailto:aaa_bbb@xxx.yy", 0, 14 },
{ "{a:\\bla/bla/bla...}", "file:///a:/bla/bla/bla", 1, 15 },
{ "#b:/c/d#e#f#", "file:///b:/c/d", 1, 7 },
{ "a:/", "file:///a:/", 0, 3 },
- { ".component:", 0, 0, 0 },
- { ".uno:", 0, 0, 0 },
- { "cid:", 0, 0, 0 },
- { "data:", 0, 0, 0 },
- { "db:", 0, 0, 0 },
- { "file:", 0, 0, 0 },
- { "ftp:", 0, 0, 0 },
- { "http:", 0, 0, 0 },
- { "https:", 0, 0, 0 },
- { "imap:", 0, 0, 0 },
- { "javascript:", 0, 0, 0 },
- { "ldap:", 0, 0, 0 },
- { "macro:", 0, 0, 0 },
- { "mailto:", 0, 0, 0 },
- { "news:", 0, 0, 0 },
- { "out:", 0, 0, 0 },
- { "pop3:", 0, 0, 0 },
- { "private:", 0, 0, 0 },
- { "slot:", 0, 0, 0 },
- { "staroffice.component:", 0, 0, 0 },
- { "staroffice.db:", 0, 0, 0 },
- { "staroffice.factory:", 0, 0, 0 },
- { "staroffice.helpid:", 0, 0, 0 },
- { "staroffice.java:", 0, 0, 0 },
- { "staroffice.macro:", 0, 0, 0 },
- { "staroffice.out:", 0, 0, 0 },
- { "staroffice.pop3:", 0, 0, 0 },
- { "staroffice.private:", 0, 0, 0 },
- { "staroffice.searchfolder:", 0, 0, 0 },
- { "staroffice.slot:", 0, 0, 0 },
- { "staroffice.trashcan:", 0, 0, 0 },
- { "staroffice.uno:", 0, 0, 0 },
- { "staroffice.vim:", 0, 0, 0 },
- { "staroffice:", 0, 0, 0 },
- { "vim:", 0, 0, 0 },
- { "vnd.sun.star.cmd:", 0, 0, 0 },
- { "vnd.sun.star.help:", 0, 0, 0 },
- { "vnd.sun.star.hier:", 0, 0, 0 },
- { "vnd.sun.star.pkg:", 0, 0, 0 },
- { "vnd.sun.star.script:", 0, 0, 0 },
- { "vnd.sun.star.webdav:", 0, 0, 0 },
- { "vnd.sun.star.wfs:", 0, 0, 0 },
- { "generic:path", 0, 0, 0 },
- { "wfs:", 0, 0, 0 }
+ { ".component:", nullptr, 0, 0 },
+ { ".uno:", nullptr, 0, 0 },
+ { "cid:", nullptr, 0, 0 },
+ { "data:", nullptr, 0, 0 },
+ { "db:", nullptr, 0, 0 },
+ { "file:", nullptr, 0, 0 },
+ { "ftp:", nullptr, 0, 0 },
+ { "http:", nullptr, 0, 0 },
+ { "https:", nullptr, 0, 0 },
+ { "imap:", nullptr, 0, 0 },
+ { "javascript:", nullptr, 0, 0 },
+ { "ldap:", nullptr, 0, 0 },
+ { "macro:", nullptr, 0, 0 },
+ { "mailto:", nullptr, 0, 0 },
+ { "news:", nullptr, 0, 0 },
+ { "out:", nullptr, 0, 0 },
+ { "pop3:", nullptr, 0, 0 },
+ { "private:", nullptr, 0, 0 },
+ { "slot:", nullptr, 0, 0 },
+ { "staroffice.component:", nullptr, 0, 0 },
+ { "staroffice.db:", nullptr, 0, 0 },
+ { "staroffice.factory:", nullptr, 0, 0 },
+ { "staroffice.helpid:", nullptr, 0, 0 },
+ { "staroffice.java:", nullptr, 0, 0 },
+ { "staroffice.macro:", nullptr, 0, 0 },
+ { "staroffice.out:", nullptr, 0, 0 },
+ { "staroffice.pop3:", nullptr, 0, 0 },
+ { "staroffice.private:", nullptr, 0, 0 },
+ { "staroffice.searchfolder:", nullptr, 0, 0 },
+ { "staroffice.slot:", nullptr, 0, 0 },
+ { "staroffice.trashcan:", nullptr, 0, 0 },
+ { "staroffice.uno:", nullptr, 0, 0 },
+ { "staroffice.vim:", nullptr, 0, 0 },
+ { "staroffice:", nullptr, 0, 0 },
+ { "vim:", nullptr, 0, 0 },
+ { "vnd.sun.star.cmd:", nullptr, 0, 0 },
+ { "vnd.sun.star.help:", nullptr, 0, 0 },
+ { "vnd.sun.star.hier:", nullptr, 0, 0 },
+ { "vnd.sun.star.pkg:", nullptr, 0, 0 },
+ { "vnd.sun.star.script:", nullptr, 0, 0 },
+ { "vnd.sun.star.webdav:", nullptr, 0, 0 },
+ { "vnd.sun.star.wfs:", nullptr, 0, 0 },
+ { "generic:path", nullptr, 0, 0 },
+ { "wfs:", nullptr, 0, 0 }
};
CharClass charClass( m_context, LanguageTag( css::lang::Locale("en", "US", "")));
for (std::size_t i = 0; i < SAL_N_ELEMENTS(tests); ++i) {
@@ -396,7 +396,7 @@ void Test::testFindFirstURLInText() {
sal_Int32 end = input.getLength();
OUString result(
URIHelper::FindFirstURLInText(input, begin, end, charClass));
- bool ok = tests[i].result == 0
+ bool ok = tests[i].result == nullptr
? (result.getLength() == 0 && begin == input.getLength()
&& end == input.getLength())
: (result.equalsAscii(tests[i].result) && begin == tests[i].begin
@@ -407,7 +407,7 @@ void Test::testFindFirstURLInText() {
buf.append('"');
buf.append(tests[i].input);
buf.append("\" -> ");
- buf.append(tests[i].result == 0 ? "none" : tests[i].result);
+ buf.append(tests[i].result == nullptr ? "none" : tests[i].result);
buf.append(" (");
buf.append(static_cast< sal_Int32 >(tests[i].begin));
buf.append(", ");
diff --git a/svl/source/config/asiancfg.cxx b/svl/source/config/asiancfg.cxx
index a4af225c86ba..3386689987f7 100644
--- a/svl/source/config/asiancfg.cxx
+++ b/svl/source/config/asiancfg.cxx
@@ -135,12 +135,12 @@ void SvxAsianConfig::SetStartEndChars(
css::lang::Locale const & locale, OUString const * startChars,
OUString const * endChars)
{
- assert((startChars == 0) == (endChars == 0));
+ assert((startChars == nullptr) == (endChars == nullptr));
css::uno::Reference< css::container::XNameContainer > set(
officecfg::Office::Common::AsianLayout::StartEndCharacters::get(
impl_->batch));
OUString name(toString(locale));
- if (startChars == 0) {
+ if (startChars == nullptr) {
try {
set->removeByName(name);
} catch (css::container::NoSuchElementException &) {}
diff --git a/svl/source/config/cjkoptions.cxx b/svl/source/config/cjkoptions.cxx
index 69d456b907bc..59b82ca49692 100644
--- a/svl/source/config/cjkoptions.cxx
+++ b/svl/source/config/cjkoptions.cxx
@@ -379,7 +379,7 @@ bool SvtCJKOptions_Impl::IsReadOnly(SvtCJKOptions::EOption eOption) const
// global
-static SvtCJKOptions_Impl* pCJKOptions = NULL;
+static SvtCJKOptions_Impl* pCJKOptions = nullptr;
static sal_Int32 nCJKRefCount = 0;
namespace { struct theCJKOptionsMutex : public rtl::Static< ::osl::Mutex , theCJKOptionsMutex >{}; }
diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx
index 4e526404e864..cb9acf10cd16 100644
--- a/svl/source/config/ctloptions.cxx
+++ b/svl/source/config/ctloptions.cxx
@@ -376,7 +376,7 @@ void SvtCTLOptions_Impl::SetCTLTextNumerals( SvtCTLOptions::TextNumerals _eNumer
}
// global
-static SvtCTLOptions_Impl* pCTLOptions = NULL;
+static SvtCTLOptions_Impl* pCTLOptions = nullptr;
static sal_Int32 nCTLRefCount = 0;
namespace { struct CTLMutex : public rtl::Static< osl::Mutex, CTLMutex > {}; }
diff --git a/svl/source/config/itemholder2.cxx b/svl/source/config/itemholder2.cxx
index 5e46847dc7b5..a3b58097a8c2 100644
--- a/svl/source/config/itemholder2.cxx
+++ b/svl/source/config/itemholder2.cxx
@@ -142,7 +142,7 @@ void ItemHolder2::impl_deleteItem(TItemInfo& rItem)
if (rItem.pItem)
{
delete rItem.pItem;
- rItem.pItem = 0;
+ rItem.pItem = nullptr;
}
}
diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx
index ef538605af87..73bd612161d2 100644
--- a/svl/source/filerec/filerec.cxx
+++ b/svl/source/filerec/filerec.cxx
@@ -523,7 +523,7 @@ bool SfxMultiRecordReader::ReadHeader_Impl()
SfxMultiRecordReader::SfxMultiRecordReader( SvStream *pStream, sal_uInt16 nTag )
- : _pContentOfs(0)
+ : _pContentOfs(nullptr)
, _nContentSize(0)
, _nContentCount(0)
, _nContentNo(0)
diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx
index c9ad983ea073..9c482eb3f157 100644
--- a/svl/source/fsstor/fsfactory.cxx
+++ b/svl/source/fsstor/fsfactory.cxx
@@ -61,7 +61,7 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstance()
{
OUString aTempURL;
- aTempURL = ::utl::TempFile( NULL, true ).GetURL();
+ aTempURL = ::utl::TempFile( nullptr, true ).GetURL();
if ( aTempURL.isEmpty() )
throw uno::RuntimeException(); // TODO: can not create tempfile
@@ -183,7 +183,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL fsstorage_component_getFactory (
const sal_Char * pImplementationName, void * pServiceManager,
SAL_UNUSED_PARAMETER void * /* pRegistryKey */)
{
- void * pResult = 0;
+ void * pResult = nullptr;
if (pServiceManager)
{
uno::Reference< lang::XSingleServiceFactory > xFactory;
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 86ba08f7218e..bb70c8c7a1a8 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -78,8 +78,8 @@ struct FSStorage_Impl
: m_aURL( aContent.getURL() )
, m_pContent( new ::ucbhelper::Content( aContent ) )
, m_nMode( nMode )
- , m_pListenersContainer( NULL )
- , m_pTypeCollection( NULL )
+ , m_pListenersContainer( nullptr )
+ , m_pTypeCollection( nullptr )
, m_xContext( xContext )
{
OSL_ENSURE( !m_aURL.isEmpty(), "The URL must not be empty" );
@@ -286,11 +286,11 @@ void SAL_CALL FSStorage::release() throw()
uno::Sequence< uno::Type > SAL_CALL FSStorage::getTypes()
throw( uno::RuntimeException, std::exception )
{
- if ( m_pImpl->m_pTypeCollection == NULL )
+ if ( m_pImpl->m_pTypeCollection == nullptr )
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( m_pImpl->m_pTypeCollection == NULL )
+ if ( m_pImpl->m_pTypeCollection == nullptr )
{
m_pImpl->m_pTypeCollection = new ::cppu::OTypeCollection
( cppu::UnoType<lang::XTypeProvider>::get()
@@ -1155,7 +1155,7 @@ void SAL_CALL FSStorage::dispose()
}
delete m_pImpl;
- m_pImpl = NULL;
+ m_pImpl = nullptr;
}
void SAL_CALL FSStorage::addEventListener(
diff --git a/svl/source/fsstor/oinputstreamcontainer.cxx b/svl/source/fsstor/oinputstreamcontainer.cxx
index 948b44c8dc87..ec086fe2a4dc 100644
--- a/svl/source/fsstor/oinputstreamcontainer.cxx
+++ b/svl/source/fsstor/oinputstreamcontainer.cxx
@@ -29,7 +29,7 @@ OFSInputStreamContainer::OFSInputStreamContainer( const uno::Reference< io::XInp
, m_xSeekable( xStream, uno::UNO_QUERY )
, m_bSeekable( false )
, m_bDisposed( false )
-, m_pListenersContainer( NULL )
+, m_pListenersContainer( nullptr )
{
m_bSeekable = m_xSeekable.is();
}
@@ -39,20 +39,20 @@ OFSInputStreamContainer::~OFSInputStreamContainer()
if ( m_pListenersContainer )
{
delete m_pListenersContainer;
- m_pListenersContainer = NULL;
+ m_pListenersContainer = nullptr;
}
}
uno::Sequence< uno::Type > SAL_CALL OFSInputStreamContainer::getTypes()
throw ( uno::RuntimeException, std::exception )
{
- static ::cppu::OTypeCollection* pTypeCollection = NULL ;
+ static ::cppu::OTypeCollection* pTypeCollection = nullptr ;
- if ( pTypeCollection == NULL )
+ if ( pTypeCollection == nullptr )
{
::osl::MutexGuard aGuard( m_aMutex ) ;
- if ( pTypeCollection == NULL )
+ if ( pTypeCollection == nullptr )
{
if ( m_bSeekable )
{
diff --git a/svl/source/fsstor/ostreamcontainer.cxx b/svl/source/fsstor/ostreamcontainer.cxx
index 5ed416ee3a33..f5e92ec07723 100644
--- a/svl/source/fsstor/ostreamcontainer.cxx
+++ b/svl/source/fsstor/ostreamcontainer.cxx
@@ -28,8 +28,8 @@ OFSStreamContainer::OFSStreamContainer( const uno::Reference < io::XStream >& xS
: m_bDisposed( false )
, m_bInputClosed( false )
, m_bOutputClosed( false )
-, m_pListenersContainer( NULL )
-, m_pTypeCollection( NULL )
+, m_pListenersContainer( nullptr )
+, m_pTypeCollection( nullptr )
{
try
{
@@ -59,7 +59,7 @@ OFSStreamContainer::~OFSStreamContainer()
if ( m_pListenersContainer )
{
delete m_pListenersContainer;
- m_pListenersContainer = NULL;
+ m_pListenersContainer = nullptr;
}
}
@@ -145,11 +145,11 @@ void SAL_CALL OFSStreamContainer::release()
uno::Sequence< uno::Type > SAL_CALL OFSStreamContainer::getTypes()
throw( uno::RuntimeException, std::exception )
{
- if ( m_pTypeCollection == NULL )
+ if ( m_pTypeCollection == nullptr )
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( m_pTypeCollection == NULL )
+ if ( m_pTypeCollection == nullptr )
{
::cppu::OTypeCollection aTypeCollection
( cppu::UnoType<lang::XTypeProvider>::get()
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx
index dc524ac24aec..10caa003bbc8 100644
--- a/svl/source/inc/poolio.hxx
+++ b/svl/source/inc/poolio.hxx
@@ -112,13 +112,13 @@ struct SfxItemPool_Impl
bool mbPersistentRefCounts;
SfxItemPool_Impl( SfxItemPool* pMaster, const OUString& rName, sal_uInt16 nStart, sal_uInt16 nEnd )
- : maPoolItems(nEnd - nStart + 1, static_cast<SfxPoolItemArray_Impl*>(NULL))
+ : maPoolItems(nEnd - nStart + 1, static_cast<SfxPoolItemArray_Impl*>(nullptr))
, aName(rName)
, ppPoolDefaults(new SfxPoolItem* [nEnd - nStart + 1])
- , ppStaticDefaults(0)
+ , ppStaticDefaults(nullptr)
, mpMaster(pMaster)
- , mpSecondary(NULL)
- , mpPoolRanges(NULL)
+ , mpSecondary(nullptr)
+ , mpPoolRanges(nullptr)
, mnStart(nStart)
, mnEnd(nEnd)
, mnFileFormatVersion(0)
@@ -153,9 +153,9 @@ struct SfxItemPool_Impl
maPoolItems.clear();
delete[] mpPoolRanges;
- mpPoolRanges = NULL;
+ mpPoolRanges = nullptr;
delete[] ppPoolDefaults;
- ppPoolDefaults = NULL;
+ ppPoolDefaults = nullptr;
}
void readTheItems(SvStream & rStream, sal_uInt32 nCount, sal_uInt16 nVersion,
diff --git a/svl/source/items/IndexedStyleSheets.cxx b/svl/source/items/IndexedStyleSheets.cxx
index dc5b8ed3baf3..c433864bc333 100644
--- a/svl/source/items/IndexedStyleSheets.cxx
+++ b/svl/source/items/IndexedStyleSheets.cxx
@@ -225,7 +225,7 @@ IndexedStyleSheets::GetStyleSheetByPosition(unsigned pos)
{
if( pos < mStyleSheets.size() )
return mStyleSheets.at(pos);
- return NULL;
+ return nullptr;
}
void
diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx
index f2428afb488b..57dbd88d9996 100644
--- a/svl/source/items/aeitem.cxx
+++ b/svl/source/items/aeitem.cxx
@@ -37,38 +37,38 @@ class SfxAllEnumValueArr : public std::vector<SfxAllEnumValue_Impl> {};
SfxAllEnumItem::SfxAllEnumItem() :
SfxEnumItem(),
- pValues( 0 ),
- pDisabledValues( 0 )
+ pValues( nullptr ),
+ pDisabledValues( nullptr )
{
}
SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which, sal_uInt16 nVal):
SfxEnumItem(which, nVal),
- pValues( 0 ),
- pDisabledValues( 0 )
+ pValues( nullptr ),
+ pDisabledValues( nullptr )
{
InsertValue( nVal );
}
SfxAllEnumItem::SfxAllEnumItem( sal_uInt16 which, SvStream &rStream ):
SfxEnumItem(which, rStream),
- pValues( 0 ),
- pDisabledValues( 0 )
+ pValues( nullptr ),
+ pDisabledValues( nullptr )
{
InsertValue( GetValue() );
}
SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which):
SfxEnumItem(which, 0),
- pValues( 0 ),
- pDisabledValues( 0 )
+ pValues( nullptr ),
+ pDisabledValues( nullptr )
{
}
SfxAllEnumItem::SfxAllEnumItem(const SfxAllEnumItem &rCopy):
SfxEnumItem(rCopy),
- pValues(0),
- pDisabledValues( 0 )
+ pValues(nullptr),
+ pDisabledValues( nullptr )
{
if ( !rCopy.pValues )
return;
diff --git a/svl/source/items/flagitem.cxx b/svl/source/items/flagitem.cxx
index e08bc41f7fc5..faa63f53d0df 100644
--- a/svl/source/items/flagitem.cxx
+++ b/svl/source/items/flagitem.cxx
@@ -78,7 +78,7 @@ sal_uInt8 SfxFlagItem::GetFlagCount() const
SfxPoolItem* SfxFlagItem::Create(SvStream &, sal_uInt16) const
{
SAL_INFO("svl", "calling Create() on SfxFlagItem -- override!");
- return 0;
+ return nullptr;
}
diff --git a/svl/source/items/itemiter.cxx b/svl/source/items/itemiter.cxx
index 7b026e618b29..a42a90bc2358 100644
--- a/svl/source/items/itemiter.cxx
+++ b/svl/source/items/itemiter.cxx
@@ -62,7 +62,7 @@ const SfxPoolItem* SfxItemIter::NextItem()
} while (m_nCurrent < m_nEnd && !*(ppFnd + m_nCurrent ));
return *(ppFnd+m_nCurrent);
}
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 362e7257c974..71dcfb0e57a8 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -108,7 +108,7 @@ const SfxPoolItem* SfxItemPool::GetPoolDefaultItem( sal_uInt16 nWhich ) const
else
{
SFX_ASSERT( false, nWhich, "unknown WhichId - cannot get pool default" );
- pRet = 0;
+ pRet = nullptr;
}
return pRet;
}
@@ -309,7 +309,7 @@ void SfxItemPool::ReleaseDefaults
// ppStaticDefaults points to deleted memory if bDelete == true.
if ( bDelete )
- pImp->ppStaticDefaults = 0;
+ pImp->ppStaticDefaults = nullptr;
}
@@ -343,11 +343,11 @@ void SfxItemPool::ReleaseDefaults
n, "this is not a static Default" );
(*( pDefaults + n ))->SetRefCount( 0 );
if ( bDelete )
- { delete *( pDefaults + n ); *(pDefaults + n) = 0; }
+ { delete *( pDefaults + n ); *(pDefaults + n) = nullptr; }
}
if ( bDelete )
- { delete[] pDefaults; pDefaults = 0; }
+ { delete[] pDefaults; pDefaults = nullptr; }
}
@@ -357,7 +357,7 @@ SfxItemPool::~SfxItemPool()
if ( !pImp->maPoolItems.empty() && pImp->ppPoolDefaults )
Delete();
- if (pImp->mpMaster != NULL && pImp->mpMaster != this)
+ if (pImp->mpMaster != nullptr && pImp->mpMaster != this)
{
// This condition indicates an error.
// A pImp->mpMaster->SetSecondaryPool(...) call should have been made
@@ -365,7 +365,7 @@ SfxItemPool::~SfxItemPool()
// prevent a crash later on.
DBG_ASSERT( pImp->mpMaster == this, "destroying active Secondary-Pool" );
if (pImp->mpMaster->pImp->mpSecondary == this)
- pImp->mpMaster->pImp->mpSecondary = NULL;
+ pImp->mpMaster->pImp->mpSecondary = nullptr;
}
delete pImp;
@@ -767,7 +767,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
{
sal_uInt32 nOffset = std::distance(pItemArr->begin(), ppFree);
pItemArr->maPtrToIndex.insert(std::make_pair(pNewItem, nOffset));
- assert(*ppFree == NULL);
+ assert(*ppFree == nullptr);
*ppFree = pNewItem;
}
return *pNewItem;
@@ -953,7 +953,7 @@ const SfxPoolItem *SfxItemPool::GetItem2(sal_uInt16 nWhich, sal_uInt32 nOfst) co
if ( pImp->mpSecondary )
return pImp->mpSecondary->GetItem2( nWhich, nOfst );
SFX_ASSERT( false, nWhich, "unknown WhichId - cannot resolve surrogate" );
- return 0;
+ return nullptr;
}
// default attribute?
@@ -964,7 +964,7 @@ const SfxPoolItem *SfxItemPool::GetItem2(sal_uInt16 nWhich, sal_uInt32 nOfst) co
if( pItemArr && nOfst < pItemArr->size() )
return (*pItemArr)[nOfst];
- return 0;
+ return nullptr;
}
sal_uInt32 SfxItemPool::GetItemCount2(sal_uInt16 nWhich) const
@@ -1065,6 +1065,6 @@ void SfxItemPool::SetFileFormatVersion( sal_uInt16 nFileFormatVersion )
pPool->pImp->mnFileFormatVersion = nFileFormatVersion;
}
-const SfxItemPool* SfxItemPool::pStoringPool_ = 0;
+const SfxItemPool* SfxItemPool::pStoringPool_ = nullptr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx
index 66951f1340c0..a815405a1afb 100644
--- a/svl/source/items/itemprop.cxx
+++ b/svl/source/items/itemprop.cxx
@@ -84,7 +84,7 @@ const SfxItemPropertySimpleEntry* SfxItemPropertyMap::getByName( const OUString
{
SfxItemPropertyHashMap_t::const_iterator aIter = m_pImpl->find(rName);
if( aIter == m_pImpl->end() )
- return 0;
+ return nullptr;
return &aIter->second;
}
@@ -178,7 +178,7 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn
throw(RuntimeException)
{
// get the SfxPoolItem
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
SfxItemState eState = rSet.GetItemState( rEntry.nWID, true, &pItem );
if(SfxItemState::SET != eState && SFX_WHICH_MAX > rEntry.nWID )
pItem = &rSet.GetPool()->GetDefaultItem(rEntry.nWID);
@@ -192,7 +192,7 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn
SfxItemSet aSet(*rSet.GetPool(), rEntry.nWID, rEntry.nWID);
if(0 == (rEntry.nFlags & PropertyAttribute::MAYBEVOID))
throw RuntimeException(
- "Property not found in ItemSet but not MAYBEVOID?", 0);
+ "Property not found in ItemSet but not MAYBEVOID?", nullptr);
}
@@ -232,7 +232,7 @@ void SfxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry& rEn
IllegalArgumentException)
{
// get the SfxPoolItem
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
std::unique_ptr<SfxPoolItem> pNewItem;
SfxItemState eState = rSet.GetItemState( rEntry.nWID, true, &pItem );
if(SfxItemState::SET != eState && SFX_WHICH_MAX > rEntry.nWID )
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 6272a748eb0d..a21cdb5ebf8b 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -69,7 +69,7 @@ const sal_Char *DbgCheckItemSet( const void* pVoid )
}
assert(pSet->m_nCount == nCount);
- return 0;
+ return nullptr;
}
#endif
@@ -210,7 +210,7 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet )
// Copy attributes
SfxItemArray ppDst = m_pItems, ppSrc = rASet.m_pItems;
for( sal_uInt16 n = nCnt; n; --n, ++ppDst, ++ppSrc )
- if ( 0 == *ppSrc || // Current Default?
+ if ( nullptr == *ppSrc || // Current Default?
IsInvalidItem(*ppSrc) || // DontCare?
IsStaticDefaultItem(*ppSrc) ) // Defaults that are not to be pooled?
// Just copy the pointer
@@ -288,7 +288,7 @@ sal_uInt16 SfxItemSet::ClearItem( sal_uInt16 nWhich )
// Due to the assertions in the sub calls, we need to do the following
--m_nCount;
const SfxPoolItem *pItemToClear = *ppFnd;
- *ppFnd = 0;
+ *ppFnd = nullptr;
if ( !IsInvalidItem(pItemToClear) )
{
@@ -326,7 +326,7 @@ sal_uInt16 SfxItemSet::ClearItem( sal_uInt16 nWhich )
// Due to the assertions in the sub calls, we need to do this
--m_nCount;
const SfxPoolItem *pItemToClear = *ppFnd;
- *ppFnd = 0;
+ *ppFnd = nullptr;
if ( !IsInvalidItem(pItemToClear) )
{
@@ -377,7 +377,7 @@ void SfxItemSet::ClearInvalidItems( bool bHardDefault )
for( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
if( IsInvalidItem(*ppFnd) )
{
- *ppFnd = 0;
+ *ppFnd = nullptr;
--m_nCount;
}
pPtr += 2;
@@ -461,14 +461,14 @@ bool SfxItemSet::HasItem(sal_uInt16 nWhich, const SfxPoolItem** ppItem) const
{
bool bRet = SfxItemState::SET == GetItemState(nWhich, true, ppItem);
if (!bRet && ppItem)
- *ppItem = NULL;
+ *ppItem = nullptr;
return bRet;
}
const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich )
{
if ( !nWhich )
- return 0; //FIXME: Only because of Outliner bug
+ return nullptr; //FIXME: Only because of Outliner bug
SfxItemArray ppFnd = m_pItems;
const sal_uInt16* pPtr = m_pWhichRanges;
@@ -482,7 +482,7 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
{
// Same Item already present?
if ( *ppFnd == &rItem )
- return 0;
+ return nullptr;
// Will 'dontcare' or 'disabled' be overwritten with some real value?
if ( rItem.Which() && ( IsInvalidItem(*ppFnd) || !(*ppFnd)->Which() ) )
@@ -495,13 +495,13 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
if( !rItem.Which() )
{
*ppFnd = rItem.Clone(m_pPool);
- return 0;
+ return nullptr;
}
else
{
// Same value already present?
if ( rItem == **ppFnd )
- return 0;
+ return nullptr;
// Add the new one, remove the old one
const SfxPoolItem& rNew = m_pPool->Put( rItem, nWhich );
@@ -537,7 +537,7 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
ppFnd += *(pPtr+1) - *pPtr + 1;
pPtr += 2;
}
- return 0;
+ return nullptr;
}
bool SfxItemSet::Put( const SfxItemSet& rSet, bool bInvalidAsDefault )
@@ -562,7 +562,7 @@ bool SfxItemSet::Put( const SfxItemSet& rSet, bool bInvalidAsDefault )
InvalidateItem( nWhich );
}
else
- bRet |= 0 != Put( **ppFnd, nWhich );
+ bRet |= nullptr != Put( **ppFnd, nWhich );
}
pPtr += 2;
}
@@ -721,7 +721,7 @@ void SfxItemSet::SetRanges( const sal_uInt16 *pNewRanges )
else
{
// default
- aNewItems[n] = 0;
+ aNewItems[n] = nullptr;
}
}
}
@@ -801,7 +801,7 @@ bool SfxItemSet::Set
{
const SfxPoolItem* pItem;
if( SfxItemState::SET == rSet.GetItemState( nWhich, true, &pItem ) )
- bRet |= 0 != Put( *pItem, pItem->Which() );
+ bRet |= nullptr != Put( *pItem, pItem->Which() );
nWhich = aIter.NextWhich();
}
}
@@ -817,7 +817,7 @@ const SfxPoolItem* SfxItemSet::GetItem(sal_uInt16 nId, bool bSearchInParent) con
sal_uInt16 nWhich = GetPool()->GetWhich(nId);
// Is the Item set or 'bDeep == true' available?
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
SfxItemState eState = GetItemState(nWhich, bSearchInParent, &pItem);
if (bSearchInParent && SfxItemState::DEFAULT == eState && nWhich <= SFX_WHICH_MAX)
{
@@ -951,7 +951,7 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet )
}
m_pPool->Remove( **ppFnd1 );
}
- *ppFnd1 = 0;
+ *ppFnd1 = nullptr;
--m_nCount;
}
}
@@ -1017,7 +1017,7 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet )
}
m_pPool->Remove( **ppFnd1 );
}
- *ppFnd1 = 0;
+ *ppFnd1 = nullptr;
--m_nCount;
}
}
@@ -1122,7 +1122,7 @@ static void MergeItem_Impl( SfxItemPool *_pPool, sal_uInt16 &rCount,
const SfxPoolItem **ppFnd1, const SfxPoolItem *pFnd2,
bool bIgnoreDefaults )
{
- assert(ppFnd1 != 0 && "Merging to 0-Item");
+ assert(ppFnd1 != nullptr && "Merging to 0-Item");
// 1st Item is Default?
if ( !*ppFnd1 )
@@ -1219,7 +1219,7 @@ void SfxItemSet::MergeValues( const SfxItemSet& rSet, bool bIgnoreDefaults )
sal_uInt16 nWhich;
while( 0 != ( nWhich = aIter.NextWhich() ) )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
rSet.GetItemState( nWhich, true, &pItem );
if( !pItem )
{
@@ -1465,7 +1465,7 @@ bool SfxItemSet::operator==(const SfxItemSet &rCmp) const
nWh = aIter.NextWhich() )
{
// If the pointer of the poolable Items are unequal, the Items must match
- const SfxPoolItem *pItem1 = 0, *pItem2 = 0;
+ const SfxPoolItem *pItem1 = nullptr, *pItem2 = nullptr;
if ( GetItemState( nWh, false, &pItem1 ) !=
rCmp.GetItemState( nWh, false, &pItem2 ) ||
( pItem1 != pItem2 &&
@@ -1682,7 +1682,7 @@ static SfxItemArray AddItem_Impl(SfxItemArray pItems, sal_uInt16 nOldSize, sal_u
}
// Initialize new Item
- *(pNew + nPos) = 0;
+ *(pNew + nPos) = nullptr;
// Free old ItemArray
delete[] pItems;
@@ -1785,7 +1785,7 @@ const SfxPoolItem* SfxAllItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhi
bool bIncrementCount = false;
const SfxPoolItem* pOld = *( m_pItems + nPos );
if ( reinterpret_cast< SfxPoolItem* >( -1 ) == pOld ) // state "dontcare"
- pOld = NULL;
+ pOld = nullptr;
if ( !pOld )
{
bIncrementCount = true;
diff --git a/svl/source/items/lckbitem.cxx b/svl/source/items/lckbitem.cxx
index c9418d4ec0fc..573765b0bea5 100644
--- a/svl/source/items/lckbitem.cxx
+++ b/svl/source/items/lckbitem.cxx
@@ -128,7 +128,7 @@ bool SfxLockBytesItem::PutValue( const css::uno::Any& rVal, sal_uInt8 )
_xVal = new SvLockBytes( pStream, true );
}
else
- _xVal = NULL;
+ _xVal = nullptr;
return true;
}
diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx
index 8f0b66aaceed..f8406c477fe8 100644
--- a/svl/source/items/macitem.cxx
+++ b/svl/source/items/macitem.cxx
@@ -172,14 +172,14 @@ SvStream& SvxMacroTableDtor::Write( SvStream& rStream ) const
const SvxMacro* SvxMacroTableDtor::Get(sal_uInt16 nEvent) const
{
SvxMacroTable::const_iterator it = aSvxMacroTable.find(nEvent);
- return it == aSvxMacroTable.end() ? NULL : &(it->second);
+ return it == aSvxMacroTable.end() ? nullptr : &(it->second);
}
// returns NULL if no entry exists, or a pointer to the internal value
SvxMacro* SvxMacroTableDtor::Get(sal_uInt16 nEvent)
{
SvxMacroTable::iterator it = aSvxMacroTable.find(nEvent);
- return it == aSvxMacroTable.end() ? NULL : &(it->second);
+ return it == aSvxMacroTable.end() ? nullptr : &(it->second);
}
// return true if the key exists
diff --git a/svl/source/items/nranges.cxx b/svl/source/items/nranges.cxx
index d454058bc726..bc8990eb53d8 100644
--- a/svl/source/items/nranges.cxx
+++ b/svl/source/items/nranges.cxx
@@ -138,7 +138,7 @@ SfxUShortRanges::SfxUShortRanges( const SfxUShortRanges &rOrig )
memcpy( _pRanges, rOrig._pRanges, sizeof(sal_uInt16) * nCount );
}
else
- _pRanges = 0;
+ _pRanges = nullptr;
}
/**
@@ -215,7 +215,7 @@ SfxUShortRanges& SfxUShortRanges::operator =
// special case: 'rRanges' is empty
if ( rRanges.IsEmpty() )
- _pRanges = 0;
+ _pRanges = nullptr;
else
{
// copy ranges
@@ -511,7 +511,7 @@ SfxUShortRanges& SfxUShortRanges::operator -=
memcpy( _pRanges, pTarget.get(), nUShorts * sizeof(sal_uInt16) );
}
else
- _pRanges = 0;
+ _pRanges = nullptr;
return *this;
}
@@ -624,7 +624,7 @@ SfxUShortRanges& SfxUShortRanges::operator /=
memcpy( _pRanges, pTarget.get(), nUShorts * sizeof(sal_uInt16) );
}
else
- _pRanges = 0;
+ _pRanges = nullptr;
return *this;
}
diff --git a/svl/source/items/poolcach.cxx b/svl/source/items/poolcach.cxx
index eb1f955dbece..5fc786e05bea 100644
--- a/svl/source/items/poolcach.cxx
+++ b/svl/source/items/poolcach.cxx
@@ -28,7 +28,7 @@ SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool,
const SfxPoolItem *pPutItem ):
pPool(pItemPool),
pCache(new SfxItemModifyArr_Impl),
- pSetToPut( 0 ),
+ pSetToPut( nullptr ),
pItemToPut( &pItemPool->Put(*pPutItem) )
{
DBG_ASSERT(pItemPool, "No Pool provided");
@@ -40,7 +40,7 @@ SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool,
pPool(pItemPool),
pCache(new SfxItemModifyArr_Impl),
pSetToPut( pPutSet ),
- pItemToPut( 0 )
+ pItemToPut( nullptr )
{
DBG_ASSERT(pItemPool, "No Pool provided");
}
@@ -52,7 +52,7 @@ SfxItemPoolCache::~SfxItemPoolCache()
pPool->Remove( *(*pCache)[nPos].pPoolItem );
pPool->Remove( *(*pCache)[nPos].pOrigItem );
}
- delete pCache; pCache = 0;
+ delete pCache; pCache = nullptr;
if ( pItemToPut )
pPool->Remove( *pItemToPut );
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index bf5fba842f49..4edf4aade20b 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -122,7 +122,7 @@ static SfxItemKind convertUInt16ToSfxItemKind(sal_uInt16 x)
SvStream &SfxItemPool::Store(SvStream &rStream) const
{
// Find StoreMaster
- SfxItemPool *pStoreMaster = pImp->mpMaster != this ? pImp->mpMaster : 0;
+ SfxItemPool *pStoreMaster = pImp->mpMaster != this ? pImp->mpMaster : nullptr;
while ( pStoreMaster && !pStoreMaster->pImp->bStreaming )
pStoreMaster = pStoreMaster->pImp->mpSecondary;
@@ -280,7 +280,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
}
// Write out additional Pools
- pStoringPool_ = 0;
+ pStoringPool_ = nullptr;
aPoolRec.Close();
if ( !rStream.GetError() && pImp->mpSecondary )
pImp->mpSecondary->Store( rStream );
@@ -364,7 +364,7 @@ void SfxItemPool_Impl::readTheItems (
SfxMultiRecordReader aItemsRec( &rStream, SFX_ITEMPOOL_REC_ITEMS );
SfxPoolItemArray_Impl *pNewArr = new SfxPoolItemArray_Impl();
- SfxPoolItem *pItem = 0;
+ SfxPoolItem *pItem = nullptr;
sal_uLong n, nLastSurrogate = sal_uLong(-1);
while (aItemsRec.GetContent())
@@ -376,7 +376,7 @@ void SfxItemPool_Impl::readTheItems (
// Fill up missing ones
// coverity[tainted_data] - ignore this, though we should finally kill off this format
- for ( pItem = 0, n = nLastSurrogate+1; n < nSurrogate; ++n )
+ for ( pItem = nullptr, n = nLastSurrogate+1; n < nSurrogate; ++n )
pNewArr->push_back( pItem );
nLastSurrogate = nSurrogate;
@@ -400,7 +400,7 @@ void SfxItemPool_Impl::readTheItems (
}
// Fill up missing ones
- for ( pItem = 0, n = nLastSurrogate+1; n < nItemCount; ++n )
+ for ( pItem = nullptr, n = nLastSurrogate+1; n < nItemCount; ++n )
pNewArr->push_back( pItem );
SfxPoolItemArray_Impl *pOldArr = *ppArr;
@@ -408,9 +408,9 @@ void SfxItemPool_Impl::readTheItems (
// Remember items that are already in the pool
bool bEmpty = true;
- if ( 0 != pOldArr )
+ if ( nullptr != pOldArr )
for ( n = 0; bEmpty && n < pOldArr->size(); ++n )
- bEmpty = pOldArr->operator[](n) == 0;
+ bEmpty = pOldArr->operator[](n) == nullptr;
SAL_WARN_IF( !bEmpty, "svl", "loading non-empty pool" );
if ( !bEmpty )
{
@@ -492,7 +492,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
}
// Find LoadMaster
- SfxItemPool *pLoadMaster = pImp->mpMaster != this ? pImp->mpMaster : 0;
+ SfxItemPool *pLoadMaster = pImp->mpMaster != this ? pImp->mpMaster : nullptr;
while ( pLoadMaster && !pLoadMaster->pImp->bStreaming )
pLoadMaster = pLoadMaster->pImp->mpSecondary;
@@ -779,13 +779,13 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
// Is item stored directly?
if ( SFX_ITEMS_DIRECT == nSurrogat )
- return 0;
+ return nullptr;
// Item does not exist?
if ( SFX_ITEMS_NULL == nSurrogat )
{
rWhich = 0;
- return 0;
+ return nullptr;
}
// If the Pool in the stream has the same structure, the surrogate
@@ -810,7 +810,7 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
// Can the surrogate be resolved?
if ( bResolvable )
{
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
for ( SfxItemPool *pTarget = this; pTarget; pTarget = pTarget->pImp->mpSecondary )
{
// Found the right (Range-)Pool?
@@ -825,12 +825,12 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
pTarget->pImp->maPoolItems[pTarget->GetIndex_Impl(rWhich)];
pItem = pItemArr && nSurrogat < pItemArr->size()
? (*pItemArr)[nSurrogat]
- : 0;
+ : nullptr;
if ( !pItem )
{
OSL_FAIL( "can't resolve surrogate" );
rWhich = 0; // Just to be sure; for the right StreamPos
- return 0;
+ return nullptr;
}
// Reload from RefPool?
@@ -850,7 +850,7 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
SFX_ASSERT( false, rWhich, "can't resolve Which-Id in LoadSurrogate" );
}
- return 0;
+ return nullptr;
}
@@ -1159,7 +1159,7 @@ bool SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem,
const SfxItemPool *pPool = this;
while ( !pPool->IsInStoringRange(rItem.Which()) )
- if ( 0 == ( pPool = pPool->pImp->mpSecondary ) )
+ if ( nullptr == ( pPool = pPool->pImp->mpSecondary ) )
return false;
DBG_ASSERT( !pImp->bInSetItem || dynamic_cast<const SfxSetItem*>( &rItem ) == nullptr,
@@ -1216,7 +1216,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, bool bDirect,
rStream.ReadUInt16( nVersion ).ReadUInt16( nLen );
rStream.SeekRel( nLen );
}
- return 0;
+ return nullptr;
}
}
@@ -1230,7 +1230,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, bool bDirect,
"loading SetItem in ItemSet of SetItem" );
// Are we loading via surrogate?
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
if ( !bDirect )
{
// WhichId known in this version?
@@ -1266,7 +1266,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, bool bDirect,
delete pNewItem;
}
else
- pItem = 0;
+ pItem = nullptr;
sal_uLong nIEnd = rStream.Tell();
DBG_ASSERT( nIEnd <= (nIStart+nLen), "read past end of item" );
if ( (nIStart+nLen) != nIEnd )
diff --git a/svl/source/items/rngitem.cxx b/svl/source/items/rngitem.cxx
index 83728de6f7cf..1eb615b2a2b0 100644
--- a/svl/source/items/rngitem.cxx
+++ b/svl/source/items/rngitem.cxx
@@ -110,7 +110,7 @@ SvStream& SfxRangeItem::Store(SvStream &rStream, sal_uInt16) const
}
SfxUShortRangesItem::SfxUShortRangesItem()
-: _pRanges(0)
+: _pRanges(nullptr)
{
}
diff --git a/svl/source/items/sitem.cxx b/svl/source/items/sitem.cxx
index 5013f9bb2d29..9f5e23b97f77 100644
--- a/svl/source/items/sitem.cxx
+++ b/svl/source/items/sitem.cxx
@@ -49,7 +49,7 @@ SfxSetItem::SfxSetItem( const SfxSetItem& rCopy, SfxItemPool *pPool ) :
SfxSetItem::~SfxSetItem()
{
- delete pSet; pSet = 0;
+ delete pSet; pSet = nullptr;
}
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index 9bf84eab905c..9f35483ec7fd 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -46,14 +46,14 @@ SfxImpStringList::~SfxImpStringList()
}
SfxStringListItem::SfxStringListItem() :
- pImp(NULL)
+ pImp(nullptr)
{
}
SfxStringListItem::SfxStringListItem( sal_uInt16 which, const std::vector<OUString>* pList ) :
SfxPoolItem( which ),
- pImp(NULL)
+ pImp(nullptr)
{
// FIXME: Putting an empty list does not work
// Therefore the query after the count is commented out
@@ -67,7 +67,7 @@ SfxStringListItem::SfxStringListItem( sal_uInt16 which, const std::vector<OUStri
SfxStringListItem::SfxStringListItem( sal_uInt16 which, SvStream& rStream ) :
SfxPoolItem( which ),
- pImp(NULL)
+ pImp(nullptr)
{
sal_Int32 nEntryCount;
rStream.ReadInt32( nEntryCount );
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 23605a869399..a164475a1ec4 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -110,7 +110,7 @@ SfxStyleSheetBase::SfxStyleSheetBase( const OUString& rName, SfxStyleSheetBasePo
, aName( rName )
, aParent()
, aFollow( rName )
- , pSet( NULL )
+ , pSet( nullptr )
, nMask(mask)
, nHelpId( 0 )
, bMySet( false )
@@ -140,7 +140,7 @@ SfxStyleSheetBase::SfxStyleSheetBase( const SfxStyleSheetBase& r )
if( r.pSet )
pSet = bMySet ? new SfxItemSet( *r.pSet ) : r.pSet;
else
- pSet = NULL;
+ pSet = nullptr;
}
SfxStyleSheetBase::~SfxStyleSheetBase()
@@ -152,7 +152,7 @@ SfxStyleSheetBase::~SfxStyleSheetBase()
if( bMySet )
{
delete pSet;
- pSet = 0;
+ pSet = nullptr;
}
}
@@ -411,7 +411,7 @@ struct DoesStyleMatchStyleSheetPredicate final : public svl::StyleSheetPredicate
SfxStyleSheetIterator::SfxStyleSheetIterator(SfxStyleSheetBasePool *pBase,
SfxStyleFamily eFam, sal_uInt16 n)
- : pAktStyle(NULL)
+ : pAktStyle(nullptr)
, nAktPosition(0)
{
pBasePool=pBase;
@@ -451,7 +451,7 @@ sal_uInt16 SfxStyleSheetIterator::Count()
SfxStyleSheetBase* SfxStyleSheetIterator::operator[](sal_uInt16 nIdx)
{
- SfxStyleSheetBase* retval = NULL;
+ SfxStyleSheetBase* retval = nullptr;
if( IsTrivialSearch())
{
retval = pBasePool->pImp->mxIndexedStyleSheets->GetStyleSheetByPosition(nIdx).get();
@@ -471,14 +471,14 @@ SfxStyleSheetBase* SfxStyleSheetIterator::operator[](sal_uInt16 nIdx)
DoesStyleMatchStyleSheetPredicate predicate(this);
rtl::Reference< SfxStyleSheetBase > ref =
pBasePool->pImp->mxIndexedStyleSheets->GetNthStyleSheetThatMatchesPredicate(nIdx, predicate);
- if (ref.get() != NULL)
+ if (ref.get() != nullptr)
{
nAktPosition = pBasePool->pImp->mxIndexedStyleSheets->FindStyleSheetPosition(*ref);
retval = ref.get();
}
}
- if (retval == NULL)
+ if (retval == nullptr)
{
OSL_FAIL("Incorrect index");
}
@@ -492,14 +492,14 @@ SfxStyleSheetBase* SfxStyleSheetIterator::First()
return operator[](0);
}
else {
- return NULL;
+ return nullptr;
}
}
SfxStyleSheetBase* SfxStyleSheetIterator::Next()
{
- SfxStyleSheetBase* retval = NULL;
+ SfxStyleSheetBase* retval = nullptr;
if ( IsTrivialSearch() )
{
@@ -530,7 +530,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Next()
pBasePool->pImp->mxIndexedStyleSheets->GetNthStyleSheetThatMatchesPredicate(
0, predicate, nAktPosition+1);
retval = ref.get();
- if (retval != NULL) {
+ if (retval != nullptr) {
nAktPosition = pBasePool->pImp->mxIndexedStyleSheets->FindStyleSheetPosition(*ref);
}
}
@@ -546,7 +546,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Find(const OUString& rStr)
pBasePool->pImp->mxIndexedStyleSheets->FindPositionsByNameAndPredicate(rStr, predicate,
svl::IndexedStyleSheets::RETURN_FIRST);
if (positions.empty()) {
- return NULL;
+ return nullptr;
}
unsigned pos = positions.front();
diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx
index b86fc924f3b6..5e3afe6aadaf 100644
--- a/svl/source/items/stylepool.cxx
+++ b/svl/source/items/stylepool.cxx
@@ -46,8 +46,8 @@ namespace {
Node() // root node Ctor
: mChildren(),
maItemSet(),
- mpItem( 0 ),
- mpUpper( 0 ),
+ mpItem( nullptr ),
+ mpUpper( nullptr ),
mbIsItemIgnorable( false )
{}
Node( const SfxPoolItem& rItem, Node* pParent, const bool bIgnorable ) // child node Ctor
@@ -174,7 +174,7 @@ namespace {
if( aIter != mChildren.end() )
++aIter;
}
- Node *pNext = 0;
+ Node *pNext = nullptr;
while( aIter != mChildren.end() )
{
// #i86923#
@@ -194,7 +194,7 @@ namespace {
{
return pNext;
}
- pNext = pNext->nextItemSet( 0, bSkipUnusedItemSets, bSkipIgnorable ); // 0 => downstairs only
+ pNext = pNext->nextItemSet( nullptr, bSkipUnusedItemSets, bSkipIgnorable ); // 0 => downstairs only
if( pNext )
return pNext;
++aIter;
@@ -248,7 +248,7 @@ namespace {
}
else
{
- pChild = pChild->nextItemSet( 0, bSkipUnusedItemSets, false );
+ pChild = pChild->nextItemSet( nullptr, bSkipUnusedItemSets, false );
if ( pChild )
{
return pChild->getUsedOrLastAddedItemSet();
@@ -287,7 +287,7 @@ namespace {
const bool bSkipIgnorable )
: mrRoot( rR ),
mpCurrNode( rR.begin() ),
- mpNode(0),
+ mpNode(nullptr),
mbSkipUnusedItemSets( bSkipUnusedItemSets ),
mbSkipIgnorable( bSkipIgnorable )
{}
@@ -352,12 +352,12 @@ private:
SfxItemSet* mpIgnorableItems;
public:
// #i86923#
- explicit StylePoolImpl( SfxItemSet* pIgnorableItems = 0 )
+ explicit StylePoolImpl( SfxItemSet* pIgnorableItems = nullptr )
: maRoot(),
mnCount(0),
- mpIgnorableItems( pIgnorableItems != 0
+ mpIgnorableItems( pIgnorableItems != nullptr
? pIgnorableItems->Clone( false )
- : 0 )
+ : nullptr )
{
DBG_ASSERT( !pIgnorableItems || !pIgnorableItems->Count(),
"<StylePoolImpl::StylePoolImpl(..)> - misusage: item set for ignorable item should be empty. Please correct usage." );
@@ -396,7 +396,7 @@ StylePool::SfxItemSet_Pointer_t StylePoolImpl::insertItemSet( const SfxItemSet&
if( !rSet.GetPool()->IsItemFlag(pItem->Which(), SfxItemPoolFlags::POOLABLE ) )
bNonPoolable = true;
if ( !xFoundIgnorableItems.get() ||
- (xFoundIgnorableItems->Put( *pItem ) == 0 ) )
+ (xFoundIgnorableItems->Put( *pItem ) == nullptr ) )
{
pCurNode = pCurNode->findChildNode( *pItem );
}
diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx
index 27ca0f658346..96849b1dedd4 100644
--- a/svl/source/misc/adrparse.cxx
+++ b/svl/source/misc/adrparse.cxx
@@ -46,8 +46,8 @@ struct ParsedAddrSpec
inline void ParsedAddrSpec::reset()
{
- m_pBegin = 0;
- m_pEnd = 0;
+ m_pBegin = nullptr;
+ m_pEnd = nullptr;
m_eLastElem = ELEMENT_START;
m_bAtFound = false;
m_bReparse = false;
@@ -115,14 +115,14 @@ public:
inline void SvAddressParser_Impl::resetRealNameAndFirstComment()
{
- m_pRealNameBegin = 0;
- m_pRealNameEnd = 0;
- m_pRealNameContentBegin = 0;
- m_pRealNameContentEnd = 0;
+ m_pRealNameBegin = nullptr;
+ m_pRealNameEnd = nullptr;
+ m_pRealNameContentBegin = nullptr;
+ m_pRealNameContentEnd = nullptr;
m_bRealNameReparse = false;
m_bRealNameFinished = false;
- m_pFirstCommentBegin = 0;
- m_pFirstCommentEnd = 0;
+ m_pFirstCommentBegin = nullptr;
+ m_pFirstCommentEnd = nullptr;
m_bFirstCommentReparse = false;
}
@@ -221,8 +221,8 @@ bool SvAddressParser_Impl::readToken()
case TOKEN_COMMENT:
{
m_pCurTokenBegin = m_pInputPos - 1;
- m_pCurTokenContentBegin = 0;
- m_pCurTokenContentEnd = 0;
+ m_pCurTokenContentBegin = nullptr;
+ m_pCurTokenContentEnd = nullptr;
bool bEscaped = false;
int nLevel = 0;
for (;;)
@@ -440,10 +440,10 @@ OUString SvAddressParser_Impl::reparseComment(sal_Unicode const * pBegin,
SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser,
const OUString& rInput)
- : m_pCurTokenBegin(NULL)
- , m_pCurTokenEnd(NULL)
- , m_pCurTokenContentBegin(NULL)
- , m_pCurTokenContentEnd(NULL)
+ : m_pCurTokenBegin(nullptr)
+ , m_pCurTokenEnd(nullptr)
+ , m_pCurTokenContentBegin(nullptr)
+ , m_pCurTokenContentEnd(nullptr)
{
m_pInputPos = rInput.getStr();
m_pInputEnd = m_pInputPos + rInput.getLength();
@@ -619,7 +619,7 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser,
}
else
{
- m_pAddrSpec = 0;
+ m_pAddrSpec = nullptr;
}
if (m_pAddrSpec)
diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx
index 596536c450e8..1f51d09cc0eb 100644
--- a/svl/source/misc/inettype.cxx
+++ b/svl/source/misc/inettype.cxx
@@ -117,7 +117,7 @@ inline TypeIDMapEntry * Registration::getEntry(INetContentType eTypeID)
if( it != rRegistration.m_aTypeIDMap.end() )
return it->second;
else
- return NULL;
+ return nullptr;
}
MediaTypeEntry const * seekEntry(OUString const & rTypeName,
@@ -444,7 +444,7 @@ TypeNameMapEntry * Registration::getExtensionEntry(OUString const & rTypeName)
TypeNameMap::iterator it = rRegistration.m_aTypeNameMap.find(aTheTypeName);
if (it != rRegistration.m_aTypeNameMap.end())
return & it->second;
- return 0;
+ return nullptr;
}
// static
@@ -558,7 +558,7 @@ MediaTypeEntry const * seekEntry(OUString const & rTypeName,
else
nLow = nMiddle + 1;
}
- return 0;
+ return nullptr;
}
}
@@ -789,10 +789,10 @@ bool INetContentTypes::parse(
OUString t;
OUString s;
INetContentTypeParameterList p;
- if (INetMIME::scanContentType(b, e, &t, &s, pParameters == 0 ? 0 : &p) == e) {
+ if (INetMIME::scanContentType(b, e, &t, &s, pParameters == nullptr ? nullptr : &p) == e) {
rType = t;
rSubType = s;
- if (pParameters != 0) {
+ if (pParameters != nullptr) {
*pParameters = p;
}
return true;
diff --git a/svl/source/misc/sharecontrolfile.cxx b/svl/source/misc/sharecontrolfile.cxx
index 3c286e97ad81..8ca316d1b061 100644
--- a/svl/source/misc/sharecontrolfile.cxx
+++ b/svl/source/misc/sharecontrolfile.cxx
@@ -81,7 +81,7 @@ void ShareControlFile::OpenStream()
uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
::ucbhelper::Content aContent = ::ucbhelper::Content( m_aURL, xDummyEnv, comphelper::getProcessComponentContext() );
- uno::Reference< ucb::XContentIdentifier > xContId( aContent.get().is() ? aContent.get()->getIdentifier() : 0 );
+ uno::Reference< ucb::XContentIdentifier > xContId( aContent.get().is() ? aContent.get()->getIdentifier() : nullptr );
if ( !xContId.is() || xContId->getContentProviderScheme() != "file" )
throw io::IOException(); // the implementation supports only local files for now
diff --git a/svl/source/misc/sharedstring.cxx b/svl/source/misc/sharedstring.cxx
index 81379520a3d9..b81f8fcf8072 100644
--- a/svl/source/misc/sharedstring.cxx
+++ b/svl/source/misc/sharedstring.cxx
@@ -15,12 +15,12 @@ SharedString SharedString::getEmptyString()
{
// unicode string array for empty string is globally shared in OUString.
// Let's take advantage of that.
- rtl_uString* pData = NULL;
+ rtl_uString* pData = nullptr;
rtl_uString_new(&pData);
return SharedString(pData, pData);
}
-SharedString::SharedString() : mpData(NULL), mpDataIgnoreCase(NULL) {}
+SharedString::SharedString() : mpData(nullptr), mpDataIgnoreCase(nullptr) {}
SharedString::SharedString( rtl_uString* pData, rtl_uString* pDataIgnoreCase ) :
mpData(pData), mpDataIgnoreCase(pDataIgnoreCase)
@@ -31,7 +31,7 @@ SharedString::SharedString( rtl_uString* pData, rtl_uString* pDataIgnoreCase ) :
rtl_uString_acquire(mpDataIgnoreCase);
}
-SharedString::SharedString( const OUString& rStr ) : mpData(rStr.pData), mpDataIgnoreCase(NULL)
+SharedString::SharedString( const OUString& rStr ) : mpData(rStr.pData), mpDataIgnoreCase(nullptr)
{
rtl_uString_acquire(mpData);
}
@@ -122,12 +122,12 @@ const rtl_uString* SharedString::getDataIgnoreCase() const
bool SharedString::isValid() const
{
- return mpData != NULL;
+ return mpData != nullptr;
}
bool SharedString::isEmpty() const
{
- return mpData == NULL || mpData->length == 0;
+ return mpData == nullptr || mpData->length == 0;
}
sal_Int32 SharedString::getLength() const
diff --git a/svl/source/misc/sharedstringpool.cxx b/svl/source/misc/sharedstringpool.cxx
index bb9be8c7b7eb..435209a68874 100644
--- a/svl/source/misc/sharedstringpool.cxx
+++ b/svl/source/misc/sharedstringpool.cxx
@@ -81,7 +81,7 @@ SharedString SharedStringPool::intern( const OUString& rStr )
if (!mpImpl->mpCharClass)
// We don't track case insensitive strings.
- return SharedString(pOrig, NULL);
+ return SharedString(pOrig, nullptr);
if (!aRes.second)
{
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index a661bfa32755..f350153a8b9f 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -82,7 +82,7 @@ public:
sal_uInt32 read();
- void clearReadBuffer() { m_pReadBuffer = 0; }
+ void clearReadBuffer() { m_pReadBuffer = nullptr; }
sal_uInt32 write(sal_Int8 const * pBuffer, sal_uInt32 nSize);
@@ -96,10 +96,10 @@ public:
SvDataPipe_Impl::SvDataPipe_Impl(sal_uInt32 nThePageSize,
sal_uInt32 nTheMinPages,
sal_uInt32 nTheMaxPages)
- : m_pFirstPage( 0 )
- , m_pReadPage( 0 )
- , m_pWritePage( 0 )
- , m_pReadBuffer( 0 )
+ : m_pFirstPage( nullptr )
+ , m_pReadPage( nullptr )
+ , m_pWritePage( nullptr )
+ , m_pReadBuffer( nullptr )
, m_nReadBufferSize( 0 )
, m_nReadBufferFilled( 0 )
, m_nPageSize(std::min< sal_uInt32 >(
@@ -413,7 +413,7 @@ void SvInputStream::SetSize(sal_uInt64)
SvInputStream::SvInputStream( css::uno::Reference< css::io::XInputStream > const & rTheStream):
m_xStream(rTheStream),
- m_pPipe(0),
+ m_pPipe(nullptr),
m_nSeekedFrom(STREAM_SEEK_TO_END)
{
SetBufferSize(0);
@@ -563,7 +563,7 @@ bool SvDataPipe_Impl::remove(Page * pPage)
SvDataPipe_Impl::~SvDataPipe_Impl()
{
- if (m_pFirstPage != 0)
+ if (m_pFirstPage != nullptr)
for (Page * pPage = m_pFirstPage;;)
{
Page * pNext = pPage->m_pNext;
@@ -576,7 +576,7 @@ SvDataPipe_Impl::~SvDataPipe_Impl()
sal_uInt32 SvDataPipe_Impl::read()
{
- if (m_pReadBuffer == 0 || m_nReadBufferSize == 0 || m_pReadPage == 0)
+ if (m_pReadBuffer == nullptr || m_nReadBufferSize == 0 || m_pReadPage == nullptr)
return 0;
sal_uInt32 nSize = m_nReadBufferSize;
@@ -617,7 +617,7 @@ sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize)
if (nSize == 0)
return 0;
- if (m_pWritePage == 0)
+ if (m_pWritePage == nullptr)
{
m_pFirstPage
= static_cast< Page * >(rtl_allocateMemory(sizeof (Page)
@@ -636,7 +636,7 @@ sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize)
sal_uInt32 nRemain = nSize;
- if (m_pReadBuffer != 0 && m_pReadPage == m_pWritePage
+ if (m_pReadBuffer != nullptr && m_pReadPage == m_pWritePage
&& m_pReadPage->m_pRead == m_pWritePage->m_pEnd)
{
sal_uInt32 nBlock = std::min(nRemain,
@@ -713,7 +713,7 @@ sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize)
SvDataPipe_Impl::SeekResult SvDataPipe_Impl::setReadPosition(sal_uInt32
nPosition)
{
- if (m_pFirstPage == 0)
+ if (m_pFirstPage == nullptr)
return nPosition == 0 ? SEEK_OK : SEEK_PAST_END;
if (nPosition
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index bb5678a9291f..0746cb221ce3 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -135,7 +135,7 @@ enum Result { Success, GeneralFailure, SpecificFailure };
Result normalizePrefix( css::uno::Reference< css::ucb::XUniversalContentBroker > const & broker,
OUString const & uri, OUString * normalized)
{
- OSL_ASSERT(broker.is() && normalized != 0);
+ OSL_ASSERT(broker.is() && normalized != nullptr);
css::uno::Reference< css::ucb::XContent > content;
try {
content = broker->queryContent(broker->createContentIdentifier(uri));
diff --git a/svl/source/notify/SfxBroadcaster.cxx b/svl/source/notify/SfxBroadcaster.cxx
index f68fc472a203..d132e86e0651 100644
--- a/svl/source/notify/SfxBroadcaster.cxx
+++ b/svl/source/notify/SfxBroadcaster.cxx
@@ -104,7 +104,7 @@ void SfxBroadcaster::AddListener( SfxListener& rListener )
{
size_t targetPosition = mpImpl->m_RemovedPositions.back();
mpImpl->m_RemovedPositions.pop_back();
- assert(mpImpl->m_Listeners[targetPosition] == NULL);
+ assert(mpImpl->m_Listeners[targetPosition] == nullptr);
mpImpl->m_Listeners[targetPosition] = &rListener;
}
}
@@ -133,7 +133,7 @@ void SfxBroadcaster::RemoveListener( SfxListener& rListener )
assert(aIter != mpImpl->m_Listeners.end()); // "RemoveListener: Listener unknown"
// DO NOT erase the listener, set the pointer to 0
// because the current continuation may contain this->Broadcast
- *aIter = 0;
+ *aIter = nullptr;
size_t positionOfRemovedElement = std::distance(mpImpl->m_Listeners.begin(), aIter);
mpImpl->m_RemovedPositions.push_back(positionOfRemovedElement);
}
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index 89b54db038b1..60bbbfd56bcb 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -149,7 +149,7 @@ sal_Int32 SAL_CALL SvNumberFormatterServiceObj::detectNumberFormat( sal_Int32 nK
::osl::MutexGuard aGuard( m_aMutex );
sal_Int32 nRet = 0;
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
sal_uInt32 nUKey = nKey;
@@ -171,7 +171,7 @@ double SAL_CALL SvNumberFormatterServiceObj::convertStringToNumber( sal_Int32 nK
::osl::MutexGuard aGuard( m_aMutex );
double fRet = 0.0;
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
sal_uInt32 nUKey = nKey;
@@ -193,10 +193,10 @@ OUString SAL_CALL SvNumberFormatterServiceObj::convertNumberToString( sal_Int32
::osl::MutexGuard aGuard( m_aMutex );
OUString aRet;
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
- Color* pColor = NULL;
+ Color* pColor = nullptr;
pFormatter->GetOutputString(fValue, nKey, aRet, &pColor);
}
else
@@ -213,11 +213,11 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryColorForNumber( sal_Int32
::osl::MutexGuard aGuard( m_aMutex );
util::Color nRet = aDefaultColor; // color = sal_Int32
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
OUString aStr;
- Color* pColor = NULL;
+ Color* pColor = nullptr;
pFormatter->GetOutputString(fValue, nKey, aStr, &pColor);
if (pColor)
nRet = pColor->GetColor();
@@ -236,10 +236,10 @@ OUString SAL_CALL SvNumberFormatterServiceObj::formatString( sal_Int32 nKey,
::osl::MutexGuard aGuard( m_aMutex );
OUString aRet;
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
- Color* pColor = NULL;
+ Color* pColor = nullptr;
pFormatter->GetOutputString(aString, nKey, aRet, &pColor);
}
else
@@ -257,11 +257,11 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryColorForString( sal_Int32
::osl::MutexGuard aGuard( m_aMutex );
util::Color nRet = aDefaultColor; // color = sal_Int32
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
OUString aStr;
- Color* pColor = NULL;
+ Color* pColor = nullptr;
pFormatter->GetOutputString(aString, nKey, aStr, &pColor);
if (pColor)
{
@@ -283,7 +283,7 @@ OUString SAL_CALL SvNumberFormatterServiceObj::getInputString( sal_Int32 nKey, d
::osl::MutexGuard aGuard( m_aMutex );
OUString aRet;
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
pFormatter->GetInputLineString(fValue, nKey, aRet);
else
@@ -303,11 +303,11 @@ OUString SAL_CALL SvNumberFormatterServiceObj::convertNumberToPreviewString( con
::osl::MutexGuard aGuard( m_aMutex );
OUString aRet;
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
LanguageType eLang = lcl_GetLanguage( nLocale );
- Color* pColor = NULL;
+ Color* pColor = nullptr;
bool bOk;
if ( bAllowEnglish )
@@ -334,12 +334,12 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryPreviewColorForNumber( co
::osl::MutexGuard aGuard( m_aMutex );
util::Color nRet = aDefaultColor; // color = sal_Int32
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
OUString aOutString;
LanguageType eLang = lcl_GetLanguage( nLocale );
- Color* pColor = NULL;
+ Color* pColor = nullptr;
bool bOk;
if ( bAllowEnglish )
@@ -405,7 +405,7 @@ uno::Reference<beans::XPropertySet> SAL_CALL SvNumberFormatsObj::getByKey( sal_I
::osl::MutexGuard aGuard( m_aMutex );
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
- const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : NULL;
+ const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : nullptr;
if (pFormat)
return new SvNumberFormatObj( rSupplier, nKey, m_aMutex );
else
@@ -717,7 +717,7 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const OUString& aProperty
uno::Any aRet;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
- const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : NULL;
+ const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : nullptr;
if (pFormat)
{
bool bThousand, bRed;
@@ -844,7 +844,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL SvNumberFormatObj::getPropertyValue
::osl::MutexGuard aGuard( m_aMutex );
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
- const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : NULL;
+ const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : nullptr;
if (pFormat)
{
OUString aSymbol, aExt;
diff --git a/svl/source/numbers/numuno.cxx b/svl/source/numbers/numuno.cxx
index 4bfb4a4282b4..5f7bd780d1bc 100644
--- a/svl/source/numbers/numuno.cxx
+++ b/svl/source/numbers/numuno.cxx
@@ -41,7 +41,7 @@ public:
// Default ctor for getReflection
SvNumberFormatsSupplierObj::SvNumberFormatsSupplierObj()
{
- pImpl = new SvNumFmtSuppl_Impl(NULL);
+ pImpl = new SvNumFmtSuppl_Impl(nullptr);
}
SvNumberFormatsSupplierObj::SvNumberFormatsSupplierObj(SvNumberFormatter* pForm)
@@ -117,7 +117,7 @@ const uno::Sequence<sal_Int8>& SvNumberFormatsSupplierObj::getUnoTunnelId()
SvNumberFormatsSupplierObj* SvNumberFormatsSupplierObj::getImplementation(
const uno::Reference<util::XNumberFormatsSupplier>& rObj )
{
- SvNumberFormatsSupplierObj* pRet = NULL;
+ SvNumberFormatsSupplierObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<SvNumberFormatsSupplierObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething( getUnoTunnelId() )));
diff --git a/svl/source/numbers/supservs.cxx b/svl/source/numbers/supservs.cxx
index d3d07e71756e..2c5c777d3681 100644
--- a/svl/source/numbers/supservs.cxx
+++ b/svl/source/numbers/supservs.cxx
@@ -41,7 +41,7 @@ using namespace ::utl;
SvNumberFormatsSupplierServiceObject::SvNumberFormatsSupplierServiceObject(const css::uno::Reference< css::uno::XComponentContext >& _rxORB)
- :m_pOwnFormatter(NULL)
+ :m_pOwnFormatter(nullptr)
,m_xORB(_rxORB)
{
}
@@ -51,7 +51,7 @@ SvNumberFormatsSupplierServiceObject::~SvNumberFormatsSupplierServiceObject()
if (m_pOwnFormatter)
{
delete m_pOwnFormatter;
- m_pOwnFormatter = NULL;
+ m_pOwnFormatter = nullptr;
}
}
@@ -72,14 +72,14 @@ void SAL_CALL SvNumberFormatsSupplierServiceObject::initialize( const Sequence<
{
::osl::MutexGuard aGuard( getSharedMutex() );
- DBG_ASSERT(m_pOwnFormatter == NULL,
+ DBG_ASSERT(m_pOwnFormatter == nullptr,
"SvNumberFormatsSupplierServiceObject::initialize : already initialized !");
// maybe you already called a method which needed the formatter
// you should use XMultiServiceFactory::createInstanceWithArguments to avoid that
if (m_pOwnFormatter)
{ // !!! this is only a emergency handling, normally this should not occur !!!
delete m_pOwnFormatter;
- m_pOwnFormatter = NULL;
+ m_pOwnFormatter = nullptr;
SetNumberFormatter(m_pOwnFormatter);
}
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 07d9dd10f9f8..da04cfca494e 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -69,14 +69,14 @@ static const sal_Unicode cNarrowNoBreakSpace = 0x202F;
ImpSvNumberInputScan::ImpSvNumberInputScan( SvNumberFormatter* pFormatterP )
:
- pUpperMonthText( NULL ),
- pUpperAbbrevMonthText( NULL ),
- pUpperGenitiveMonthText( NULL ),
- pUpperGenitiveAbbrevMonthText( NULL ),
- pUpperPartitiveMonthText( NULL ),
- pUpperPartitiveAbbrevMonthText( NULL ),
- pUpperDayText( NULL ),
- pUpperAbbrevDayText( NULL ),
+ pUpperMonthText( nullptr ),
+ pUpperAbbrevMonthText( nullptr ),
+ pUpperGenitiveMonthText( nullptr ),
+ pUpperGenitiveAbbrevMonthText( nullptr ),
+ pUpperPartitiveMonthText( nullptr ),
+ pUpperPartitiveAbbrevMonthText( nullptr ),
+ pUpperDayText( nullptr ),
+ pUpperAbbrevDayText( nullptr ),
bTextInitialized( false ),
bScanGenitiveMonths( false ),
bScanPartitiveMonths( false ),
diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx
index 9c7ae84d8736..5d940a3277df 100644
--- a/svl/source/numbers/zforfind.hxx
+++ b/svl/source/numbers/zforfind.hxx
@@ -46,7 +46,7 @@ public:
bool IsNumberFormat( const OUString& rString, /// input string
short& F_Type, /// format type (in + out)
double& fOutNumber, /// value determined (out)
- const SvNumberformat* pFormat = NULL); /// optional a number format to which compare against
+ const SvNumberformat* pFormat = nullptr); /// optional a number format to which compare against
/// after IsNumberFormat: get decimal position
short GetDecPos() const { return nDecPos; }
@@ -295,7 +295,7 @@ private:
// Get currency symbol and advance string position
bool GetCurrency( const OUString& rString,
sal_Int32& nPos,
- const SvNumberformat* pFormat = NULL ); // optional number format to match against
+ const SvNumberformat* pFormat = nullptr ); // optional number format to match against
// Get symbol AM or PM and advance string position
bool GetTimeAmPm( const OUString& rString,
@@ -336,21 +336,21 @@ private:
// Conversion of date to number
bool GetDateRef( double& fDays, // OUT: days diff to null date
sal_uInt16& nCounter, // Count of date substrings
- const SvNumberformat* pFormat = NULL ); // optional number format to match against
+ const SvNumberformat* pFormat = nullptr ); // optional number format to match against
// Analyze start of string
bool ScanStartString( const OUString& rString,
- const SvNumberformat* pFormat = NULL );
+ const SvNumberformat* pFormat = nullptr );
// Analyze middle substring
bool ScanMidString( const OUString& rString,
sal_uInt16 nStringPos,
- const SvNumberformat* pFormat = NULL );
+ const SvNumberformat* pFormat = nullptr );
// Analyze end of string
bool ScanEndString( const OUString& rString,
- const SvNumberformat* pFormat = NULL );
+ const SvNumberformat* pFormat = nullptr );
// Compare rString to substring of array indexed by nString
// nString == 0xFFFF => last substring
@@ -370,7 +370,7 @@ private:
// Main analyzing function
bool IsNumberFormatMain( const OUString& rString,
- const SvNumberformat* pFormat = NULL); // optional number format to match against
+ const SvNumberformat* pFormat = nullptr); // optional number format to match against
static inline bool MyIsdigit( sal_Unicode c );
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index bbae9c00332a..53b421376b8c 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -227,7 +227,7 @@ void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBro
-SvNumberFormatterRegistry_Impl* SvNumberFormatter::pFormatterRegistry = NULL;
+SvNumberFormatterRegistry_Impl* SvNumberFormatter::pFormatterRegistry = nullptr;
bool SvNumberFormatter::bCurrencyTableInitialized = false;
namespace
{
@@ -267,7 +267,7 @@ SvNumberFormatter::~SvNumberFormatter()
if ( !pFormatterRegistry->Count() )
{
delete pFormatterRegistry;
- pFormatterRegistry = NULL;
+ pFormatterRegistry = nullptr;
}
}
@@ -309,10 +309,10 @@ void SvNumberFormatter::ImpConstruct( LanguageType eLang )
pStringScanner = new ImpSvNumberInputScan( this );
pFormatScanner = new ImpSvNumberformatScan( this );
- pFormatTable = NULL;
+ pFormatTable = nullptr;
MaxCLOffset = 0;
ImpGenerateFormats( 0, false ); // 0 .. 999 for initialized language formats
- pMergeTable = NULL;
+ pMergeTable = nullptr;
bNoZero = false;
::osl::MutexGuard aGuard( GetMutex() );
@@ -347,7 +347,7 @@ void SvNumberFormatter::ChangeIntl(LanguageType eLnge)
// static
::osl::Mutex& SvNumberFormatter::GetMutex()
{
- static ::osl::Mutex* pMutex = NULL;
+ static ::osl::Mutex* pMutex = nullptr;
if( !pMutex )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
@@ -387,7 +387,7 @@ Color* SvNumberFormatter::GetUserDefColor(sal_uInt16 nIndex)
}
else
{
- return NULL;
+ return nullptr;
}
}
@@ -1471,7 +1471,7 @@ void SvNumberFormatter::GetOutputString(const OUString& sString,
}
if (!pFormat->IsTextFormat() && !pFormat->HasTextFormat())
{
- *ppColor = NULL;
+ *ppColor = nullptr;
sOutString = sString;
}
else
@@ -1704,7 +1704,7 @@ bool SvNumberFormatter::GetPreviewString( const OUString& sFormatString,
}
else
{
- *ppColor = NULL;
+ *ppColor = nullptr;
sOutString = sPreviewString;
}
}
@@ -1791,7 +1791,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const css::i18n::NumberForma
LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
}
delete pFormat;
- return NULL;
+ return nullptr;
}
if ( rCode.Index >= NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS )
{
@@ -1823,7 +1823,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const css::i18n::NumberForma
}
}
delete pFormat;
- return NULL;
+ return nullptr;
}
else if ( nPos - nCLOffset >= SV_COUNTRY_LANGUAGE_OFFSET )
{
@@ -1836,7 +1836,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const css::i18n::NumberForma
LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
}
delete pFormat;
- return NULL;
+ return nullptr;
}
}
if ( !aFTable.insert( make_pair( nPos, pFormat) ).second )
@@ -1856,7 +1856,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const css::i18n::NumberForma
SAL_WARN( "svl.numbers", "SvNumberFormatter::ImpInsertFormat: dup position");
}
delete pFormat;
- return NULL;
+ return nullptr;
}
if ( rCode.Default )
pFormat->SetStandard();
@@ -2131,7 +2131,7 @@ SvNumberformat* SvNumberFormatter::GetFormatEntry( sal_uInt32 nKey )
SvNumberFormatTable::iterator it = aFTable.find( nKey);
if (it != aFTable.end())
return it->second;
- return 0;
+ return nullptr;
}
const SvNumberformat* SvNumberFormatter::GetFormatEntry( sal_uInt32 nKey ) const
@@ -2144,7 +2144,7 @@ const SvNumberformat* SvNumberFormatter::GetEntry( sal_uInt32 nKey ) const
SvNumberFormatTable::const_iterator it = aFTable.find( nKey);
if (it != aFTable.end())
return it->second;
- return 0;
+ return nullptr;
}
void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditionalFormats )
@@ -2159,7 +2159,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
NumberFormatCodeWrapper aNumberFormatCode( m_xContext,
GetLanguageTag().getLocale() );
- SvNumberformat* pNewFormat = NULL;
+ SvNumberformat* pNewFormat = nullptr;
sal_Int32 nIdx;
bool bDefault;
@@ -3147,7 +3147,7 @@ const NfCurrencyEntry* SvNumberFormatter::MatchSystemCurrency()
{
// MUST call GetTheCurrencyTable() before accessing nSystemCurrencyPosition
const NfCurrencyTable& rTable = GetTheCurrencyTable();
- return nSystemCurrencyPosition ? &rTable[nSystemCurrencyPosition] : NULL;
+ return nSystemCurrencyPosition ? &rTable[nSystemCurrencyPosition] : nullptr;
}
@@ -3188,7 +3188,7 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry(const OUString& rAbbr
return &rTable[j];
}
}
- return NULL;
+ return nullptr;
}
@@ -3210,7 +3210,7 @@ const NfCurrencyEntry* SvNumberFormatter::GetLegacyOnlyCurrencyEntry( const OUSt
return &rTable[j];
}
}
- return NULL;
+ return nullptr;
}
@@ -3375,7 +3375,7 @@ bool SvNumberFormatter::ImpLookupCurrencyEntryLoopBody(
{
if ( pFoundEntry && pFoundEntry != pData )
{
- pFoundEntry = NULL;
+ pFoundEntry = nullptr;
return false; // break loop, not unique
}
if ( nPos == 0 )
@@ -3406,7 +3406,7 @@ bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat, OUString
bool* pBank /* = NULL */ ) const
{
if ( ppEntry )
- *ppEntry = NULL;
+ *ppEntry = nullptr;
if ( pBank )
*pBank = false;
@@ -3489,7 +3489,7 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( bool & bFoundBank,
{
eExtLang = LANGUAGE_DONTKNOW;
}
- const NfCurrencyEntry* pFoundEntry = NULL;
+ const NfCurrencyEntry* pFoundEntry = nullptr;
const NfCurrencyTable& rTable = GetTheCurrencyTable();
sal_uInt16 nCount = rTable.size();
bool bCont = true;
@@ -3788,7 +3788,7 @@ void SvNumberFormatter::ImpInitCurrencyTable()
"SvNumberFormatter::ImpInitCurrencyTable: system currency not in I18N locale data.");
}
pLocaleData.reset();
- SvtSysLocaleOptions::SetCurrencyChangeLink( LINK( NULL, SvNumberFormatter, CurrencyChangeLink ) );
+ SvtSysLocaleOptions::SetCurrencyChangeLink( LINK( nullptr, SvNumberFormatter, CurrencyChangeLink ) );
bInitializing = false;
bCurrencyTableInitialized = true;
}
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index c740cbe81ded..479b28aacd80 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -337,15 +337,15 @@ sal_uInt8 SvNumberNatNum::MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType eLan
ImpSvNumFor::ImpSvNumFor()
{
nAnzStrings = 0;
- aI.nTypeArray = NULL;
- aI.sStrArray = NULL;
+ aI.nTypeArray = nullptr;
+ aI.sStrArray = nullptr;
aI.eScannedType = css::util::NumberFormat::UNDEFINED;
aI.bThousand = false;
aI.nThousand = 0;
aI.nCntPre = 0;
aI.nCntPost = 0;
aI.nCntExp = 0;
- pColor = NULL;
+ pColor = nullptr;
}
ImpSvNumFor::~ImpSvNumFor()
@@ -368,8 +368,8 @@ void ImpSvNumFor::Enlarge(sal_uInt16 nAnz)
}
else
{
- aI.nTypeArray = NULL;
- aI.sStrArray = NULL;
+ aI.nTypeArray = nullptr;
+ aI.sStrArray = nullptr;
}
}
}
@@ -481,7 +481,7 @@ void SvNumberformat::ImpCopyNumberformat( const SvNumberformat& rFormat )
bAdditionalBuiltin = rFormat.bAdditionalBuiltin;
// #121103# when copying between documents, get color pointers from own scanner
- ImpSvNumberformatScan* pColorSc = ( &rScan != &rFormat.rScan ) ? &rScan : NULL;
+ ImpSvNumberformatScan* pColorSc = ( &rScan != &rFormat.rScan ) ? &rScan : nullptr;
for (sal_uInt16 i = 0; i < 4; i++)
{
@@ -719,7 +719,7 @@ SvNumberformat::SvNumberformat(OUString& rString,
switch ( eSymbolType )
{
case BRACKET_SYMBOLTYPE_COLOR :
- if ( NumFor[nIndex].GetColor() != NULL )
+ if ( NumFor[nIndex].GetColor() != nullptr )
{ // error, more than one color
bCancel = true; // break for
nCheckPos = nPosOld;
@@ -728,7 +728,7 @@ SvNumberformat::SvNumberformat(OUString& rString,
{
Color* pColor = pSc->GetColor( sStr);
NumFor[nIndex].SetColor( pColor, sStr);
- if (pColor == NULL)
+ if (pColor == nullptr)
{ // error
bCancel = true; // break for
nCheckPos = nPosOld;
@@ -1894,7 +1894,7 @@ bool SvNumberformat::GetOutputString(const OUString& sString,
}
else
{
- *ppColor = NULL; // no change of color
+ *ppColor = nullptr; // no change of color
return false;
}
*ppColor = NumFor[nIx].GetColor();
@@ -2090,7 +2090,7 @@ bool SvNumberformat::GetOutputString(double fNumber,
bool bRes = false;
OUStringBuffer sBuff;
OutString.clear();
- *ppColor = NULL; // No color change
+ *ppColor = nullptr; // No color change
if (eType & css::util::NumberFormat::LOGICAL)
{
if (fNumber)
@@ -4462,12 +4462,12 @@ const OUString* SvNumberformat::GetNumForString( sal_uInt16 nNumFor, sal_uInt16
{
if ( nNumFor > 3 )
{
- return NULL;
+ return nullptr;
}
sal_uInt16 nAnz = NumFor[nNumFor].GetCount();
if ( !nAnz )
{
- return NULL;
+ return nullptr;
}
if ( nPos == 0xFFFF )
{
@@ -4483,13 +4483,13 @@ const OUString* SvNumberformat::GetNumForString( sal_uInt16 nNumFor, sal_uInt16
}
if ( (*pType != NF_SYMBOLTYPE_STRING) && (*pType != NF_SYMBOLTYPE_CURRENCY) )
{
- return NULL;
+ return nullptr;
}
}
}
else if ( nPos > nAnz - 1 )
{
- return NULL;
+ return nullptr;
}
else if ( bString )
{
@@ -4504,7 +4504,7 @@ const OUString* SvNumberformat::GetNumForString( sal_uInt16 nNumFor, sal_uInt16
if ( nPos >= nAnz || ((*pType != NF_SYMBOLTYPE_STRING) &&
(*pType != NF_SYMBOLTYPE_CURRENCY)) )
{
- return NULL;
+ return nullptr;
}
}
return &NumFor[nNumFor].Info().sStrArray[nPos];
@@ -4685,7 +4685,7 @@ Color* SvNumberformat::GetColor( sal_uInt16 nNumFor ) const
{
if ( nNumFor > 3 )
{
- return NULL;
+ return nullptr;
}
return NumFor[nNumFor].GetColor();
}
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 5d77fe849291..3dd3d7c08d05 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -482,7 +482,7 @@ Color* ImpSvNumberformatScan::GetColor(OUString& sStr)
}
}
- Color* pResult = NULL;
+ Color* pResult = nullptr;
if (i >= NF_MAX_DEFAULT_COLORS)
{
const OUString& rColorWord = rKeyword[NF_KEY_COLOR];
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 660765e4ff8e..78720601b7f3 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -390,7 +390,7 @@ void StorageItem::ImplCommit()
PasswordContainer::PasswordContainer( const Reference<XMultiServiceFactory>& xServiceFactory ):
- m_pStorageFile( NULL )
+ m_pStorageFile( nullptr )
{
// m_pStorageFile->Notify() can be called
::osl::MutexGuard aGuard( mMutex );
@@ -411,7 +411,7 @@ PasswordContainer::~PasswordContainer()
if( m_pStorageFile )
{
delete m_pStorageFile;
- m_pStorageFile = NULL;
+ m_pStorageFile = nullptr;
}
if( mComponent.is() )
@@ -429,7 +429,7 @@ void SAL_CALL PasswordContainer::disposing( const EventObject& ) throw(RuntimeEx
if( m_pStorageFile )
{
delete m_pStorageFile;
- m_pStorageFile = NULL;
+ m_pStorageFile = nullptr;
}
if( mComponent.is() )
@@ -457,7 +457,7 @@ vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, co
rtlCipherError result = rtl_cipher_init (
aDecoder, rtl_Cipher_DirectionDecode,
- code, RTL_DIGEST_LENGTH_MD5, NULL, 0 );
+ code, RTL_DIGEST_LENGTH_MD5, nullptr, 0 );
if( result == rtl_Cipher_E_None )
{
@@ -508,7 +508,7 @@ OUString PasswordContainer::EncodePasswords(const vector< OUString >& lines, con
rtlCipherError result = rtl_cipher_init (
aEncoder, rtl_Cipher_DirectionEncode,
- code, RTL_DIGEST_LENGTH_MD5, NULL, 0 );
+ code, RTL_DIGEST_LENGTH_MD5, nullptr, 0 );
if( result == rtl_Cipher_E_None )
{
@@ -1073,7 +1073,7 @@ sal_Bool SAL_CALL PasswordContainer::authorizateWithMasterPassword( const uno::R
{
uno::Reference< lang::XMultiServiceFactory > xFactory( mComponent, uno::UNO_QUERY_THROW );
uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) );
- xTmpHandler.set( InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
+ xTmpHandler.set( InteractionHandler::createWithParent(xContext, nullptr), uno::UNO_QUERY_THROW );
}
if ( !m_aMasterPasswd.isEmpty() )
@@ -1117,7 +1117,7 @@ sal_Bool SAL_CALL PasswordContainer::changeMasterPassword( const uno::Reference<
{
uno::Reference< lang::XMultiServiceFactory > xFactory( mComponent, uno::UNO_QUERY_THROW );
uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) );
- xTmpHandler.set( InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
+ xTmpHandler.set( InteractionHandler::createWithParent(xContext, nullptr), uno::UNO_QUERY_THROW );
}
bool bCanChangePassword = true;
@@ -1229,7 +1229,7 @@ sal_Bool SAL_CALL PasswordContainer::useDefaultMasterPassword( const uno::Refere
{
uno::Reference< lang::XMultiServiceFactory > xFactory( mComponent, uno::UNO_QUERY_THROW );
uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) );
- xTmpHandler.set( InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
+ xTmpHandler.set( InteractionHandler::createWithParent(xContext, nullptr), uno::UNO_QUERY_THROW );
}
bool bCanChangePassword = true;
@@ -1444,7 +1444,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL passwordcontainer_component_getFactory (
SAL_UNUSED_PARAMETER void * pServiceManager,
SAL_UNUSED_PARAMETER void * /* pRegistryKey */)
{
- void * pResult = 0;
+ void * pResult = nullptr;
if (pServiceManager)
{
Reference< XSingleServiceFactory > xFactory;
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index b843d5cc8445..7048b99f2bf4 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -61,13 +61,13 @@ SfxUndoAction::~SfxUndoAction()
if(mpSfxLinkUndoAction)
{
mpSfxLinkUndoAction->LinkedSfxUndoActionDestructed(*this);
- mpSfxLinkUndoAction = 0;
+ mpSfxLinkUndoAction = nullptr;
}
}
SfxUndoAction::SfxUndoAction()
-: mpSfxLinkUndoAction(0)
+: mpSfxLinkUndoAction(nullptr)
{
}
@@ -242,8 +242,8 @@ struct SVL_DLLPRIVATE SfxUndoManager_Data
explicit SfxUndoManager_Data( size_t i_nMaxUndoActionCount )
:pUndoArray( new SfxUndoArray( i_nMaxUndoActionCount ) )
- ,pActUndoArray( NULL )
- ,pFatherUndoArray( NULL )
+ ,pActUndoArray( nullptr )
+ ,pFatherUndoArray( nullptr )
,mnMarks( 0 )
,mnEmptyMark(MARK_INVALID)
,mbUndoEnabled( true )
@@ -290,13 +290,13 @@ namespace svl { namespace undo { namespace impl
{
explicit NotifyUndoListener( UndoListenerVoidMethod i_notificationMethod )
:m_notificationMethod( i_notificationMethod )
- ,m_altNotificationMethod( NULL )
+ ,m_altNotificationMethod( nullptr )
,m_sActionComment()
{
}
NotifyUndoListener( UndoListenerStringMethod i_notificationMethod, const OUString& i_actionComment )
- :m_notificationMethod( NULL )
+ :m_notificationMethod( nullptr )
,m_altNotificationMethod( i_notificationMethod )
,m_sActionComment( i_actionComment )
{
@@ -304,13 +304,13 @@ namespace svl { namespace undo { namespace impl
bool is() const
{
- return ( m_notificationMethod != 0 ) || ( m_altNotificationMethod != 0 );
+ return ( m_notificationMethod != nullptr ) || ( m_altNotificationMethod != nullptr );
}
void operator()( SfxUndoListener* i_listener ) const
{
assert( is() && "NotifyUndoListener: this will crash!" );
- if ( m_altNotificationMethod != 0 )
+ if ( m_altNotificationMethod != nullptr )
{
( i_listener->*m_altNotificationMethod )( m_sActionComment );
}
@@ -646,7 +646,7 @@ bool SfxUndoManager::ImplAddUndoAction_NoNotify( SfxUndoAction *pAction, bool bT
// merge, if required
SfxUndoAction* pMergeWithAction = m_xData->pActUndoArray->nCurUndoAction ?
- m_xData->pActUndoArray->aUndoActions[m_xData->pActUndoArray->nCurUndoAction-1].pAction : NULL;
+ m_xData->pActUndoArray->aUndoActions[m_xData->pActUndoArray->nCurUndoAction-1].pAction : nullptr;
if ( bTryMerge && pMergeWithAction )
{
bool bMerged = pMergeWithAction->Merge( pAction );
@@ -738,7 +738,7 @@ SfxUndoAction* SfxUndoManager::GetUndoAction( size_t nNo ) const
assert(nNo < m_xData->pActUndoArray->nCurUndoAction);
if( nNo >= m_xData->pActUndoArray->nCurUndoAction )
- return NULL;
+ return nullptr;
return m_xData->pActUndoArray->aUndoActions[m_xData->pActUndoArray->nCurUndoAction-1-nNo].pAction;
}
@@ -773,7 +773,7 @@ bool SfxUndoManager::IsDoing() const
bool SfxUndoManager::Undo()
{
- return ImplUndo( NULL );
+ return ImplUndo( nullptr );
}
@@ -810,7 +810,7 @@ bool SfxUndoManager::ImplUndo( SfxUndoContext* i_contextOrNull )
// clear the guard/mutex before calling into the SfxUndoAction - this can be an extension-implemented UNO component
// nowadays ...
aGuard.clear();
- if ( i_contextOrNull != NULL )
+ if ( i_contextOrNull != nullptr )
pAction->UndoWithContext( *i_contextOrNull );
else
pAction->Undo();
@@ -864,7 +864,7 @@ SfxUndoAction* SfxUndoManager::GetRedoAction( size_t nNo, bool const i_currentLe
const SfxUndoArray* pUndoArray = i_currentLevel ? m_xData->pActUndoArray : m_xData->pUndoArray;
if ( (pUndoArray->nCurUndoAction + nNo) > pUndoArray->aUndoActions.size() )
{
- return NULL;
+ return nullptr;
}
return pUndoArray->aUndoActions[ pUndoArray->nCurUndoAction + nNo ].pAction;
}
@@ -885,7 +885,7 @@ OUString SfxUndoManager::GetRedoActionComment( size_t nNo, bool const i_currentL
bool SfxUndoManager::Redo()
{
- return ImplRedo( NULL );
+ return ImplRedo( nullptr );
}
@@ -922,7 +922,7 @@ bool SfxUndoManager::ImplRedo( SfxUndoContext* i_contextOrNull )
// clear the guard/mutex before calling into the SfxUndoAction - this can be a extension-implemented UNO component
// nowadays ...
aGuard.clear();
- if ( i_contextOrNull != NULL )
+ if ( i_contextOrNull != nullptr )
pAction->RedoWithContext( *i_contextOrNull );
else
pAction->Redo();
@@ -1418,7 +1418,7 @@ SfxLinkUndoAction::SfxLinkUndoAction(::svl::IUndoManager *pManager)
{
pUndoManager = pManager;
SfxUndoManager* pUndoManagerImplementation = dynamic_cast< SfxUndoManager* >( pManager );
- ENSURE_OR_THROW( pUndoManagerImplementation != NULL, "unsupported undo manager implementation!" );
+ ENSURE_OR_THROW( pUndoManagerImplementation != nullptr, "unsupported undo manager implementation!" );
// yes, this cast is dirty. But reaching into the SfxUndoManager's implementation,
// directly accessing its internal stack, and tampering with an action on that stack
@@ -1430,7 +1430,7 @@ SfxLinkUndoAction::SfxLinkUndoAction(::svl::IUndoManager *pManager)
pAction->SetLinkToSfxLinkUndoAction(this);
}
else
- pAction = 0;
+ pAction = nullptr;
}
@@ -1485,16 +1485,16 @@ OUString SfxLinkUndoAction::GetRepeatComment(SfxRepeatTarget&r) const
SfxLinkUndoAction::~SfxLinkUndoAction()
{
if( pAction )
- pAction->SetLinkToSfxLinkUndoAction(0);
+ pAction->SetLinkToSfxLinkUndoAction(nullptr);
}
void SfxLinkUndoAction::LinkedSfxUndoActionDestructed(const SfxUndoAction& rCandidate)
{
- assert(0 != pAction);
+ assert(nullptr != pAction);
assert(pAction == &rCandidate && "Oops, the destroyed and linked UndoActions differ (!)");
(void)rCandidate;
- pAction = 0;
+ pAction = nullptr;
}
diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx
index b504b5fe38fd..4926df3e6319 100644
--- a/svl/unx/source/svdde/ddedummy.cxx
+++ b/svl/unx/source/svdde/ddedummy.cxx
@@ -21,22 +21,22 @@
#include <rtl/instance.hxx>
DdeData::DdeData()
- : pImp(NULL)
+ : pImp(nullptr)
{
}
DdeData::DdeData( const OUString& )
- : pImp(NULL)
+ : pImp(nullptr)
{
}
DdeData::DdeData( const DdeData& )
- : pImp(NULL)
+ : pImp(nullptr)
{
}
DdeData::DdeData( const void*, long, SotClipboardFormatId)
- : pImp(NULL)
+ : pImp(nullptr)
{
}
@@ -65,7 +65,7 @@ DdeData::operator long() const
DdeData::operator const void*() const
{
- return NULL;
+ return nullptr;
}
long DdeConnection::GetError()
@@ -74,9 +74,9 @@ long DdeConnection::GetError()
}
DdeConnection::DdeConnection( const OUString&, const OUString& )
- : pService(NULL)
- , pTopic(NULL)
- , pImp(NULL)
+ : pService(nullptr)
+ , pTopic(nullptr)
+ , pImp(nullptr)
{
}
@@ -96,7 +96,7 @@ const OUString DdeConnection::GetTopicName()
DdeTransaction::DdeTransaction( DdeConnection& rConnection, const OUString&, long )
: rDde(rConnection)
- , pName(NULL)
+ , pName(nullptr)
, nType(0)
, nId(0)
, nTime(0)
@@ -137,7 +137,7 @@ DdePoke::DdePoke( DdeConnection& rConnection, const OUString& rString, const Dde
DdeTopic::DdeTopic( const OUString& )
- : pName(NULL)
+ : pName(nullptr)
{
}
@@ -160,7 +160,7 @@ void DdeTopic::RemoveItem( SAL_UNUSED_PARAMETER const DdeItem& )
DdeData* DdeTopic::Get(SAL_UNUSED_PARAMETER SotClipboardFormatId)
{
- return NULL;
+ return nullptr;
}
bool DdeTopic::MakeItem( SAL_UNUSED_PARAMETER const OUString& )
@@ -194,9 +194,9 @@ const OUString DdeTopic::GetName() const
}
DdeService::DdeService( const OUString& )
- : pSysTopic(NULL)
- , pName(NULL)
- , pConv(NULL)
+ : pSysTopic(nullptr)
+ , pName(nullptr)
+ , pConv(nullptr)
, nStatus(0)
{
}
@@ -278,17 +278,17 @@ DdeServices& DdeService::GetServices()
}
DdeItem::DdeItem( const OUString& )
- : pName(NULL)
- , pMyTopic(NULL)
- , pImpData(NULL)
+ : pName(nullptr)
+ , pMyTopic(nullptr)
+ , pImpData(nullptr)
, nType(0)
{
}
DdeItem::DdeItem( const DdeItem& )
- : pName(NULL)
- , pMyTopic(NULL)
- , pImpData(NULL)
+ : pName(nullptr)
+ , pMyTopic(nullptr)
+ , pImpData(nullptr)
, nType(0)
{
}
@@ -313,7 +313,7 @@ DdeGetPutItem::DdeGetPutItem( const DdeItem& rItem )
DdeData* DdeGetPutItem::Get( SAL_UNUSED_PARAMETER SotClipboardFormatId )
{
- return NULL;
+ return nullptr;
}
bool DdeGetPutItem::Put( SAL_UNUSED_PARAMETER const DdeData* )