diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:27:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:57 +0100 |
commit | cf7dc8bc19650fe5e814205b512dffad8299c276 (patch) | |
tree | ae3653c5038c3e2d6f2afce7ae6ca21fdf848a2e /unotools/source/config | |
parent | 34a66ff58a20856fb4388e523becdd5397e08fb0 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: Ib80c434598481ca0d05c800991fea9b30ef329f8
Diffstat (limited to 'unotools/source/config')
28 files changed, 103 insertions, 103 deletions
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx index 3ad6fc81eded..d25d12981d20 100644 --- a/unotools/source/config/bootstrap.cxx +++ b/unotools/source/config/bootstrap.cxx @@ -422,9 +422,9 @@ static void addMissingDirectoryError(OUStringBuffer& _rBuf, OUString const& _aPa _rBuf.append(IS_MISSING).append(PERIOD); } -static void addUnexpectedError(OUStringBuffer& _rBuf, AsciiString _sExtraInfo = NULL) +static void addUnexpectedError(OUStringBuffer& _rBuf, AsciiString _sExtraInfo = nullptr) { - if (NULL == _sExtraInfo) + if (nullptr == _sExtraInfo) _sExtraInfo = "An internal failure occurred"; _rBuf.appendAscii(_sExtraInfo).append(PERIOD); @@ -736,7 +736,7 @@ bool Bootstrap::Impl::getVersionValue(OUString const& _sName, OUString& _rValue, OUString uri; rtl::Bootstrap::get( "BRAND_BASE_DIR", uri); rtl::Bootstrap aData( uri + "/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ); - if ( aData.getHandle() == NULL ) + if ( aData.getHandle() == nullptr ) // version.ini (versionrc) doesn't exist return false; diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx index c3e324ef5ff2..d7572381e103 100644 --- a/unotools/source/config/cmdoptions.cxx +++ b/unotools/source/config/cmdoptions.cxx @@ -291,7 +291,7 @@ Sequence< OUString > SvtCommandOptions_Impl::impl_GetPropertyNames() // DON'T DO IT IN YOUR HEADER! // see definition for further information -SvtCommandOptions_Impl* SvtCommandOptions::m_pDataContainer = NULL; +SvtCommandOptions_Impl* SvtCommandOptions::m_pDataContainer = nullptr; sal_Int32 SvtCommandOptions::m_nRefCount = 0; // constructor @@ -303,7 +303,7 @@ SvtCommandOptions::SvtCommandOptions() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already exist! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtCommandOptions_Impl; ItemHolder1::holdConfigItem(E_CMDOPTIONS); @@ -323,7 +323,7 @@ SvtCommandOptions::~SvtCommandOptions() if( m_nRefCount <= 0 ) { delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx index bb4ea726fa95..69f52ec12afd 100644 --- a/unotools/source/config/compatibility.cxx +++ b/unotools/source/config/compatibility.cxx @@ -575,7 +575,7 @@ void SvtCompatibilityOptions_Impl::impl_ExpandPropertyNames( // DON'T DO IT IN YOUR HEADER! // see definition for further information -SvtCompatibilityOptions_Impl* SvtCompatibilityOptions::m_pDataContainer = NULL; +SvtCompatibilityOptions_Impl* SvtCompatibilityOptions::m_pDataContainer = nullptr; sal_Int32 SvtCompatibilityOptions::m_nRefCount = 0; // constructor @@ -587,7 +587,7 @@ SvtCompatibilityOptions::SvtCompatibilityOptions() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already exist! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtCompatibilityOptions_Impl; ItemHolder1::holdConfigItem(E_COMPATIBILITY); @@ -607,7 +607,7 @@ SvtCompatibilityOptions::~SvtCompatibilityOptions() if( m_nRefCount <= 0 ) { delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx index 9b4ed5f8ef1e..bd45e394aaa8 100644 --- a/unotools/source/config/configitem.cxx +++ b/unotools/source/config/configitem.cxx @@ -470,8 +470,8 @@ bool ConfigItem::PutProperties( const Sequence< OUString >& rNames, { Sequence< OUString > lNames; Sequence< Any > lValues; - const OUString* pNames = NULL; - const Any* pValues = NULL; + const OUString* pNames = nullptr; + const Any* pValues = nullptr; sal_Int32 nNameCount; if(( m_nMode & ConfigItemMode::AllLocales ) == ConfigItemMode::AllLocales ) { @@ -574,7 +574,7 @@ void ConfigItem::RemoveChangesListener() try { xChgNot->removeChangesListener( xChangeLstnr ); - xChangeLstnr = 0; + xChangeLstnr = nullptr; } catch (const Exception&) { diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx index c1c91f838692..39e93de26d18 100644 --- a/unotools/source/config/configmgr.cxx +++ b/unotools/source/config/configmgr.cxx @@ -48,12 +48,12 @@ public: } ~RegisterConfigItemHelper() { - if (item_ != 0) { + if (item_ != nullptr) { manager_.removeConfigItem(*item_); } } - void keep() { item_ = 0; } + void keep() { item_ = nullptr; } private: utl::ConfigManager & manager_; @@ -189,7 +189,7 @@ void utl::ConfigManager::removeConfigItem(utl::ConfigItem & item) { } void utl::ConfigManager::registerConfigItem(utl::ConfigItem * item) { - OSL_ASSERT(item != 0); + OSL_ASSERT(item != nullptr); items_.push_back(item); } diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx index 3e521acaf6b1..847dbc9434f4 100644 --- a/unotools/source/config/confignode.cxx +++ b/unotools/source/config/confignode.cxx @@ -60,8 +60,8 @@ namespace utl // reset _all_ interfaces if _one_ of them is not supported if (!m_xHierarchyAccess.is() || !m_xDirectAccess.is()) { - m_xHierarchyAccess = NULL; - m_xDirectAccess = NULL; + m_xHierarchyAccess = nullptr; + m_xDirectAccess = nullptr; } // now for the non-critical interfaces @@ -474,13 +474,13 @@ namespace utl { DBG_UNHANDLED_EXCEPTION(); } - return NULL; + return nullptr; } Reference< XInterface > lcl_createConfigurationRoot( const Reference< XMultiServiceFactory >& i_rxConfigProvider, const OUString& i_rNodePath, const bool i_bUpdatable, const sal_Int32 i_nDepth, const bool i_bLazyWrite ) { - ENSURE_OR_RETURN( i_rxConfigProvider.is(), "invalid provider", NULL ); + ENSURE_OR_RETURN( i_rxConfigProvider.is(), "invalid provider", nullptr ); try { ::comphelper::NamedValueCollection aArgs; @@ -502,7 +502,7 @@ namespace utl { DBG_UNHANDLED_EXCEPTION(); } - return NULL; + return nullptr; } } diff --git a/unotools/source/config/configpaths.cxx b/unotools/source/config/configpaths.cxx index 73d33fc93a9e..7b31d428b592 100644 --- a/unotools/source/config/configpaths.cxx +++ b/unotools/source/config/configpaths.cxx @@ -168,7 +168,7 @@ OUString extractFirstFromConfigurationPath(OUString const& _sInPath, OUString* _ OUString sResult = (nEnd >= 0) ? _sInPath.copy(nStart, nEnd-nStart) : _sInPath; lcl_resolveCharEntities(sResult); - if (_sOutPath != 0) + if (_sOutPath != nullptr) { *_sOutPath = (nSep >= 0) ? _sInPath.copy(nSep + 1) : OUString(); } diff --git a/unotools/source/config/configvaluecontainer.cxx b/unotools/source/config/configvaluecontainer.cxx index 13b9df0d6d24..7ec71c5e5e5b 100644 --- a/unotools/source/config/configvaluecontainer.cxx +++ b/unotools/source/config/configvaluecontainer.cxx @@ -55,7 +55,7 @@ namespace utl void bind( void* _pLocation, const Type& _rType ); - bool isBound( ) const { return ( ltUnbound != eLocationType ) && ( NULL != pLocation ); } + bool isBound( ) const { return ( ltUnbound != eLocationType ) && ( nullptr != pLocation ); } const OUString& getPath( ) const { return sRelativePath; } LocationType getLocType( ) const { return eLocationType; } void* getLocation( ) const { return pLocation; } @@ -67,7 +67,7 @@ namespace utl NodeValueAccessor::NodeValueAccessor( const OUString& _rNodePath ) :sRelativePath( _rNodePath ) ,eLocationType( ltUnbound ) - ,pLocation( NULL ) + ,pLocation( nullptr ) { } diff --git a/unotools/source/config/defaultoptions.cxx b/unotools/source/config/defaultoptions.cxx index 340455586eca..081848d018c5 100644 --- a/unotools/source/config/defaultoptions.cxx +++ b/unotools/source/config/defaultoptions.cxx @@ -101,7 +101,7 @@ private: // global ---------------------------------------------------------------- -static SvtDefaultOptions_Impl* pOptions = NULL; +static SvtDefaultOptions_Impl* pOptions = nullptr; static sal_Int32 nRefCount = 0; typedef OUString SvtDefaultOptions_Impl:: *PathStrPtr; diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx index e7799ba3018d..51baeca8de48 100644 --- a/unotools/source/config/dynamicmenuoptions.cxx +++ b/unotools/source/config/dynamicmenuoptions.cxx @@ -115,7 +115,7 @@ class SvtDynMenu lProperties[OFFSET_IMAGEIDENTIFIER].Name = PROPERTYNAME_IMAGEIDENTIFIER; lProperties[OFFSET_TARGETNAME ].Name = PROPERTYNAME_TARGETNAME; - while( pList != NULL ) + while( pList != nullptr ) { for( vector< SvtDynMenuEntry >::const_iterator pItem =pList->begin(); pItem!=pList->end(); @@ -141,7 +141,7 @@ class SvtDynMenu if( pList == &lSetupEntries ) pList = &lUserEntries; else - pList = NULL; + pList = nullptr; } return lResult; } @@ -571,7 +571,7 @@ void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence // DON'T DO IT IN YOUR HEADER! // see definition for further information -SvtDynamicMenuOptions_Impl* SvtDynamicMenuOptions::m_pDataContainer = NULL; +SvtDynamicMenuOptions_Impl* SvtDynamicMenuOptions::m_pDataContainer = nullptr; sal_Int32 SvtDynamicMenuOptions::m_nRefCount = 0; // constructor @@ -583,7 +583,7 @@ SvtDynamicMenuOptions::SvtDynamicMenuOptions() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already exist! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtDynamicMenuOptions_Impl; ItemHolder1::holdConfigItem(E_DYNAMICMENUOPTIONS); @@ -603,7 +603,7 @@ SvtDynamicMenuOptions::~SvtDynamicMenuOptions() if( m_nRefCount <= 0 ) { delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx index d7f5ecd65564..82b1b578bbff 100644 --- a/unotools/source/config/eventcfg.cxx +++ b/unotools/source/config/eventcfg.cxx @@ -305,7 +305,7 @@ bool SAL_CALL GlobalEventConfig_Impl::hasElements( ) throw (RuntimeException) // and now the wrapper //initialize static member -GlobalEventConfig_Impl* GlobalEventConfig::m_pImpl = NULL; +GlobalEventConfig_Impl* GlobalEventConfig::m_pImpl = nullptr; sal_Int32 GlobalEventConfig::m_nRefCount = 0; GlobalEventConfig::GlobalEventConfig() @@ -315,7 +315,7 @@ GlobalEventConfig::GlobalEventConfig() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already exist! - if( m_pImpl == NULL ) + if( m_pImpl == nullptr ) { m_pImpl = new GlobalEventConfig_Impl; ItemHolder1::holdConfigItem(E_EVENTCFG); @@ -333,7 +333,7 @@ GlobalEventConfig::~GlobalEventConfig() if( m_nRefCount <= 0 ) { delete m_pImpl; - m_pImpl = NULL; + m_pImpl = nullptr; } } diff --git a/unotools/source/config/extendedsecurityoptions.cxx b/unotools/source/config/extendedsecurityoptions.cxx index 30b27c85438e..73aa9a05a3bd 100644 --- a/unotools/source/config/extendedsecurityoptions.cxx +++ b/unotools/source/config/extendedsecurityoptions.cxx @@ -244,7 +244,7 @@ Sequence< OUString > SvtExtendedSecurityOptions_Impl::GetPropertyNames() // DON'T DO IT IN YOUR HEADER! // see definition for further information -SvtExtendedSecurityOptions_Impl* SvtExtendedSecurityOptions::m_pDataContainer = NULL; +SvtExtendedSecurityOptions_Impl* SvtExtendedSecurityOptions::m_pDataContainer = nullptr; sal_Int32 SvtExtendedSecurityOptions::m_nRefCount = 0; // constructor @@ -256,7 +256,7 @@ SvtExtendedSecurityOptions::SvtExtendedSecurityOptions() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already exist! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtExtendedSecurityOptions_Impl; @@ -277,7 +277,7 @@ SvtExtendedSecurityOptions::~SvtExtendedSecurityOptions() if( m_nRefCount <= 0 ) { delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index df4e45597c55..483af6fe5a6a 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -444,7 +444,7 @@ static const char* const aImplKillLeadingList[] = "ipa", "sazanami", "kochi", - NULL + nullptr }; static const char* const aImplKillTrailingList[] = @@ -494,14 +494,14 @@ static const char* const aImplKillTrailingList[] = "24cpi", "scale", "pc", - NULL + nullptr }; static const char* const aImplKillTrailingWithExceptionsList[] = { - "ce", "monospace", "oldface", NULL, - "ps", "caps", NULL, - NULL + "ce", "monospace", "oldface", nullptr, + "ps", "caps", nullptr, + nullptr }; struct ImplFontAttrWeightSearchData @@ -527,7 +527,7 @@ static ImplFontAttrWeightSearchData const aImplWeightAttrSearchList[] = { "ultralight", WEIGHT_ULTRALIGHT }, { "light", WEIGHT_LIGHT }, { "medium", WEIGHT_MEDIUM }, -{ NULL, WEIGHT_DONTKNOW }, +{ nullptr, WEIGHT_DONTKNOW }, }; struct ImplFontAttrWidthSearchData @@ -548,7 +548,7 @@ static ImplFontAttrWidthSearchData const aImplWidthAttrSearchList[] = { "condensed", WIDTH_CONDENSED }, { "cond", WIDTH_CONDENSED }, { "cn", WIDTH_CONDENSED }, -{ NULL, WIDTH_DONTKNOW }, +{ nullptr, WIDTH_DONTKNOW }, }; struct ImplFontAttrTypeSearchData @@ -618,7 +618,7 @@ static ImplFontAttrTypeSearchData const aImplTypeAttrSearchList[] = { "ms", ImplFontAttrs::None }, { "cpi", ImplFontAttrs::None }, { "no", ImplFontAttrs::None }, -{ NULL, ImplFontAttrs::None }, +{ nullptr, ImplFontAttrs::None }, }; static bool ImplKillLeading( OUString& rName, const char* const* ppStr ) @@ -1104,7 +1104,7 @@ const FontNameAttr* FontSubstConfiguration::getSubstInfo( const OUString& rFontN const LanguageTag& rLanguageTag ) const { if( rFontName.isEmpty() ) - return NULL; + return nullptr; // search if a (language dep.) replacement table for the given font exists // fallback is english @@ -1142,7 +1142,7 @@ const FontNameAttr* FontSubstConfiguration::getSubstInfo( const OUString& rFontN } } } - return NULL; + return nullptr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotools/source/config/fontoptions.cxx b/unotools/source/config/fontoptions.cxx index c6b32073022a..ad6fa0b8ff90 100644 --- a/unotools/source/config/fontoptions.cxx +++ b/unotools/source/config/fontoptions.cxx @@ -247,7 +247,7 @@ Sequence< OUString > SvtFontOptions_Impl::impl_GetPropertyNames() // DON'T DO IT IN YOUR HEADER! // see definition for further information -SvtFontOptions_Impl* SvtFontOptions::m_pDataContainer = NULL; +SvtFontOptions_Impl* SvtFontOptions::m_pDataContainer = nullptr; sal_Int32 SvtFontOptions::m_nRefCount = 0; // constructor @@ -259,7 +259,7 @@ SvtFontOptions::SvtFontOptions() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already exist! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtFontOptions_Impl; @@ -280,7 +280,7 @@ SvtFontOptions::~SvtFontOptions() if( m_nRefCount <= 0 ) { delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx index 0b2e12c825c8..134bee95d108 100644 --- a/unotools/source/config/historyoptions.cxx +++ b/unotools/source/config/historyoptions.cxx @@ -548,7 +548,7 @@ void SvtHistoryOptions_Impl::DeleteItem(EHistoryType eHistory, const OUString& s // DON'T DO IT IN YOUR HEADER! // see definition for further information -SvtHistoryOptions_Impl* SvtHistoryOptions::m_pDataContainer = NULL; +SvtHistoryOptions_Impl* SvtHistoryOptions::m_pDataContainer = nullptr; sal_Int32 SvtHistoryOptions::m_nRefCount = 0; // constructor @@ -560,7 +560,7 @@ SvtHistoryOptions::SvtHistoryOptions() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already exist! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtHistoryOptions_Impl; @@ -581,7 +581,7 @@ SvtHistoryOptions::~SvtHistoryOptions() if( m_nRefCount <= 0 ) { delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx index 64534ebcd135..c2b5d0ed8055 100644 --- a/unotools/source/config/itemholder1.cxx +++ b/unotools/source/config/itemholder1.cxx @@ -247,7 +247,7 @@ void ItemHolder1::impl_deleteItem(TItemInfo& rItem) if (rItem.pItem) { delete rItem.pItem; - rItem.pItem = 0; + rItem.pItem = nullptr; } } diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 9f834f3bbbbe..271abe33848b 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -256,9 +256,9 @@ static struct NamesToHdl {/* 31 */ "GrammarChecking/IsInteractiveCheck", UPN_IS_GRAMMAR_INTERACTIVE, UPH_IS_GRAMMAR_INTERACTIVE}, /* similar to entry 0 (thus no own configuration entry) but with different property name and type */ -{ NULL, UPN_DEFAULT_LANGUAGE, UPH_DEFAULT_LANGUAGE}, +{ nullptr, UPN_DEFAULT_LANGUAGE, UPH_DEFAULT_LANGUAGE}, -{ NULL, NULL, -1} +{ nullptr, nullptr, -1} }; const uno::Sequence< OUString > SvtLinguConfigItem::GetPropertyNames() @@ -290,7 +290,7 @@ bool SvtLinguConfigItem::GetHdlByName( if (bFullPropName) { - while (pEntry && pEntry->pFullPropName != NULL) + while (pEntry && pEntry->pFullPropName != nullptr) { if (rPropertyName.equalsAscii( pEntry->pFullPropName )) { @@ -299,11 +299,11 @@ bool SvtLinguConfigItem::GetHdlByName( } ++pEntry; } - return pEntry && pEntry->pFullPropName != NULL; + return pEntry && pEntry->pFullPropName != nullptr; } else { - while (pEntry && pEntry->pPropName != NULL) + while (pEntry && pEntry->pPropName != nullptr) { if (rPropertyName.equalsAscii( pEntry->pPropName )) { @@ -312,7 +312,7 @@ bool SvtLinguConfigItem::GetHdlByName( } ++pEntry; } - return pEntry && pEntry->pPropName != NULL; + return pEntry && pEntry->pPropName != nullptr; } } @@ -330,9 +330,9 @@ uno::Any SvtLinguConfigItem::GetProperty( sal_Int32 nPropertyHandle ) const uno::Any aRes; - const sal_Int16 *pnVal = 0; - const bool *pbVal = 0; - const sal_Int32 *pnInt32Val = 0; + const sal_Int16 *pnVal = nullptr; + const bool *pbVal = nullptr; + const sal_Int32 *pnInt32Val = nullptr; const SvtLinguOptions &rOpt = const_cast< SvtLinguConfigItem * >(this)->aOpt; switch (nPropertyHandle) @@ -427,9 +427,9 @@ bool SvtLinguConfigItem::SetProperty( sal_Int32 nPropertyHandle, const uno::Any bool bMod = false; - sal_Int16 *pnVal = 0; - bool *pbVal = 0; - sal_Int32 *pnInt32Val = 0; + sal_Int16 *pnVal = nullptr; + bool *pbVal = nullptr; + sal_Int32 *pnInt32Val = nullptr; SvtLinguOptions &rOpt = aOpt; switch (nPropertyHandle) @@ -789,7 +789,7 @@ bool SvtLinguConfigItem::IsReadOnly( sal_Int32 nPropertyHandle ) const return bReadOnly; } -static SvtLinguConfigItem *pCfgItem = 0; +static SvtLinguConfigItem *pCfgItem = nullptr; static sal_Int32 nCfgItemRefCount = 0; static const char aG_SupportedDictionaryFormats[] = "SupportedDictionaryFormats"; @@ -816,7 +816,7 @@ SvtLinguConfig::~SvtLinguConfig() if (--nCfgItemRefCount <= 0) { delete pCfgItem; - pCfgItem = 0; + pCfgItem = nullptr; } } diff --git a/unotools/source/config/localisationoptions.cxx b/unotools/source/config/localisationoptions.cxx index 72d16e864a55..1ca612afb753 100644 --- a/unotools/source/config/localisationoptions.cxx +++ b/unotools/source/config/localisationoptions.cxx @@ -222,7 +222,7 @@ Sequence< OUString > SvtLocalisationOptions_Impl::GetPropertyNames() // DON'T DO IT IN YOUR HEADER! // see definition for further information -SvtLocalisationOptions_Impl* SvtLocalisationOptions::m_pDataContainer = NULL; +SvtLocalisationOptions_Impl* SvtLocalisationOptions::m_pDataContainer = nullptr; sal_Int32 SvtLocalisationOptions::m_nRefCount = 0; // constructor @@ -234,7 +234,7 @@ SvtLocalisationOptions::SvtLocalisationOptions() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already exist! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtLocalisationOptions_Impl; @@ -255,7 +255,7 @@ SvtLocalisationOptions::~SvtLocalisationOptions() if( m_nRefCount <= 0 ) { delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/unotools/source/config/misccfg.cxx b/unotools/source/config/misccfg.cxx index 5c7ff3fcbdbb..faf8fd7f9e80 100644 --- a/unotools/source/config/misccfg.cxx +++ b/unotools/source/config/misccfg.cxx @@ -33,7 +33,7 @@ using namespace com::sun::star::uno; namespace utl { -static SfxMiscCfg* pOptions = NULL; +static SfxMiscCfg* pOptions = nullptr; static sal_Int32 nRefCount = 0; class SfxMiscCfg : public utl::ConfigItem diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx index 828e15935d6d..fc29b3283b4f 100644 --- a/unotools/source/config/moduleoptions.cxx +++ b/unotools/source/config/moduleoptions.cxx @@ -756,7 +756,7 @@ void SvtModuleOptions_Impl::impl_Read( const css::uno::Sequence< OUString >& lFa sal_Int32 nPropertyStart = 0; sal_Int32 nNodeCount = lFactories.getLength(); - FactoryInfo* pInfo = NULL; + FactoryInfo* pInfo = nullptr; SvtModuleOptions::EFactory eFactory; for( sal_Int32 nSetNode=0; nSetNode<nNodeCount; ++nSetNode ) @@ -828,7 +828,7 @@ void SvtModuleOptions_Impl::MakeReadonlyStatesAvailable() // DON'T DO IT IN YOUR HEADER! // see definition for further information -SvtModuleOptions_Impl* SvtModuleOptions::m_pDataContainer = NULL; +SvtModuleOptions_Impl* SvtModuleOptions::m_pDataContainer = nullptr; sal_Int32 SvtModuleOptions::m_nRefCount = 0; /*-************************************************************************************************************ @@ -858,7 +858,7 @@ SvtModuleOptions::~SvtModuleOptions() if( m_nRefCount == 0 ) { delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/unotools/source/config/options.cxx b/unotools/source/config/options.cxx index 6483d1d3e7ba..28b64bb07119 100644 --- a/unotools/source/config/options.cxx +++ b/unotools/source/config/options.cxx @@ -26,7 +26,7 @@ using utl::ConfigurationBroadcaster; utl::ConfigurationListener::~ConfigurationListener() {} ConfigurationBroadcaster::ConfigurationBroadcaster() -: mpList(0) +: mpList(nullptr) , m_nBroadcastBlocked( 0 ) , m_nBlockedHint( 0 ) { diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx index 38fd49392eab..5b963b09e9b2 100644 --- a/unotools/source/config/optionsdlg.cxx +++ b/unotools/source/config/optionsdlg.cxx @@ -37,7 +37,7 @@ using namespace com::sun::star::uno; #define PAGES_NODE "Pages" #define OPTIONS_NODE "Options" -static SvtOptionsDlgOptions_Impl* pOptions = NULL; +static SvtOptionsDlgOptions_Impl* pOptions = nullptr; static sal_Int32 nRefCount = 0; class SvtOptionsDlgOptions_Impl : public utl::ConfigItem @@ -222,7 +222,7 @@ SvtOptionsDialogOptions::~SvtOptionsDialogOptions() if ( pOptions->IsModified() ) pOptions->Commit(); delete pOptions; - pOptions = NULL; + pOptions = nullptr; } } diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx index 2f4689c719b1..33fd23000fe8 100644 --- a/unotools/source/config/pathoptions.cxx +++ b/unotools/source/config/pathoptions.cxx @@ -161,7 +161,7 @@ class SvtPathOptions_Impl // global ---------------------------------------------------------------- -static SvtPathOptions_Impl* pOptions = NULL; +static SvtPathOptions_Impl* pOptions = nullptr; static sal_Int32 nRefCount = 0; // functions ------------------------------------------------------------- diff --git a/unotools/source/config/printwarningoptions.cxx b/unotools/source/config/printwarningoptions.cxx index b14efe94b0d7..1b5650873cc6 100644 --- a/unotools/source/config/printwarningoptions.cxx +++ b/unotools/source/config/printwarningoptions.cxx @@ -225,7 +225,7 @@ Sequence< OUString > SvtPrintWarningOptions_Impl::impl_GetPropertyNames() // DON'T DO IT IN YOUR HEADER! // see definition for further information -SvtPrintWarningOptions_Impl* SvtPrintWarningOptions::m_pDataContainer = NULL; +SvtPrintWarningOptions_Impl* SvtPrintWarningOptions::m_pDataContainer = nullptr; sal_Int32 SvtPrintWarningOptions::m_nRefCount = 0; // constructor @@ -237,7 +237,7 @@ SvtPrintWarningOptions::SvtPrintWarningOptions() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtPrintWarningOptions_Impl(); ItemHolder1::holdConfigItem(E_PRINTWARNINGOPTIONS); @@ -257,7 +257,7 @@ SvtPrintWarningOptions::~SvtPrintWarningOptions() if( m_nRefCount <= 0 ) { delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx index 928d4556ae40..06018f2c1d87 100644 --- a/unotools/source/config/saveopt.cxx +++ b/unotools/source/config/saveopt.cxx @@ -49,7 +49,7 @@ struct SvtLoadSaveOptions_Impl SvtLoadOptions_Impl* pLoadOpt; }; -static SvtLoadSaveOptions_Impl* pOptions = NULL; +static SvtLoadSaveOptions_Impl* pOptions = nullptr; static sal_Int32 nRefCount = 0; class SvtSaveOptions_Impl : public utl::ConfigItem diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx index df767dfeb620..fad440be2400 100644 --- a/unotools/source/config/securityoptions.cxx +++ b/unotools/source/config/securityoptions.cxx @@ -539,12 +539,12 @@ bool SvtSecurityOptions_Impl::GetOption( SvtSecurityOptions::EOption eOption, bo rpRO = &m_bROBlockUntrustedRefererLinks; break; default: - rpValue = NULL; - rpRO = NULL; + rpValue = nullptr; + rpRO = nullptr; break; } - return rpValue != NULL; + return rpValue != nullptr; } void SvtSecurityOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) @@ -944,7 +944,7 @@ Sequence< OUString > SvtSecurityOptions_Impl::GetPropertyNames() // DON'T DO IT IN YOUR HEADER! // see definition for further information -SvtSecurityOptions_Impl* SvtSecurityOptions::m_pDataContainer = NULL; +SvtSecurityOptions_Impl* SvtSecurityOptions::m_pDataContainer = nullptr; sal_Int32 SvtSecurityOptions::m_nRefCount = 0; SvtSecurityOptions::SvtSecurityOptions() @@ -954,7 +954,7 @@ SvtSecurityOptions::SvtSecurityOptions() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already exist! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtSecurityOptions_Impl; @@ -973,7 +973,7 @@ SvtSecurityOptions::~SvtSecurityOptions() if( m_nRefCount <= 0 ) { delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index 09a55945ab00..6de88a677989 100644 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -38,7 +38,7 @@ using namespace utl; using namespace com::sun::star::uno; using namespace com::sun::star::lang; -SvtSysLocaleOptions_Impl* SvtSysLocaleOptions::pOptions = NULL; +SvtSysLocaleOptions_Impl* SvtSysLocaleOptions::pOptions = nullptr; sal_Int32 SvtSysLocaleOptions::nRefCount = 0; namespace { @@ -530,14 +530,14 @@ SvtSysLocaleOptions::~SvtSysLocaleOptions() if ( !--nRefCount ) { delete pOptions; - pOptions = NULL; + pOptions = nullptr; } } // static Mutex& SvtSysLocaleOptions::GetMutex() { - static Mutex* pMutex = NULL; + static Mutex* pMutex = nullptr; if( !pMutex ) { MutexGuard aGuard( Mutex::getGlobalMutex() ); @@ -698,7 +698,7 @@ void SvtSysLocaleOptions::ConfigurationChanged( utl::ConfigurationBroadcaster* p if ( nHint & SYSLOCALEOPTIONS_HINT_CURRENCY ) { const Link<LinkParamNone*,void>& rLink = GetCurrencyChangeLink(); - rLink.Call( NULL ); + rLink.Call( nullptr ); } ::utl::detail::Options::ConfigurationChanged( p, nHint ); diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx index 77e294191e84..1ad1ad01be21 100644 --- a/unotools/source/config/viewoptions.cxx +++ b/unotools/source/config/viewoptions.cxx @@ -65,13 +65,13 @@ // initialization! -SvtViewOptionsBase_Impl* SvtViewOptions::m_pDataContainer_Dialogs = NULL ; +SvtViewOptionsBase_Impl* SvtViewOptions::m_pDataContainer_Dialogs = nullptr ; sal_Int32 SvtViewOptions::m_nRefCount_Dialogs = 0 ; -SvtViewOptionsBase_Impl* SvtViewOptions::m_pDataContainer_TabDialogs = NULL ; +SvtViewOptionsBase_Impl* SvtViewOptions::m_pDataContainer_TabDialogs = nullptr ; sal_Int32 SvtViewOptions::m_nRefCount_TabDialogs = 0 ; -SvtViewOptionsBase_Impl* SvtViewOptions::m_pDataContainer_TabPages = NULL ; +SvtViewOptionsBase_Impl* SvtViewOptions::m_pDataContainer_TabPages = nullptr ; sal_Int32 SvtViewOptions::m_nRefCount_TabPages = 0 ; -SvtViewOptionsBase_Impl* SvtViewOptions::m_pDataContainer_Windows = NULL ; +SvtViewOptionsBase_Impl* SvtViewOptions::m_pDataContainer_Windows = nullptr ; sal_Int32 SvtViewOptions::m_nRefCount_Windows = 0 ; /*-************************************************************************************************************ @@ -654,7 +654,7 @@ SvtViewOptions::~SvtViewOptions() if( m_nRefCount_Dialogs == 0 ) { delete m_pDataContainer_Dialogs; - m_pDataContainer_Dialogs = NULL; + m_pDataContainer_Dialogs = nullptr; } } break; @@ -665,7 +665,7 @@ SvtViewOptions::~SvtViewOptions() if( m_nRefCount_TabDialogs == 0 ) { delete m_pDataContainer_TabDialogs; - m_pDataContainer_TabDialogs = NULL; + m_pDataContainer_TabDialogs = nullptr; } } break; @@ -676,7 +676,7 @@ SvtViewOptions::~SvtViewOptions() if( m_nRefCount_TabPages == 0 ) { delete m_pDataContainer_TabPages; - m_pDataContainer_TabPages = NULL; + m_pDataContainer_TabPages = nullptr; } } break; @@ -687,7 +687,7 @@ SvtViewOptions::~SvtViewOptions() if( m_nRefCount_Windows == 0 ) { delete m_pDataContainer_Windows; - m_pDataContainer_Windows = NULL; + m_pDataContainer_Windows = nullptr; } } break; @@ -1047,22 +1047,22 @@ void SvtViewOptions::ReleaseOptions() if( --m_nRefCount_Dialogs == 0 ) { delete m_pDataContainer_Dialogs; - m_pDataContainer_Dialogs = NULL; + m_pDataContainer_Dialogs = nullptr; } if( --m_nRefCount_TabDialogs == 0 ) { delete m_pDataContainer_TabDialogs; - m_pDataContainer_TabDialogs = NULL; + m_pDataContainer_TabDialogs = nullptr; } if( --m_nRefCount_TabPages == 0 ) { delete m_pDataContainer_TabPages; - m_pDataContainer_TabPages = NULL; + m_pDataContainer_TabPages = nullptr; } if( --m_nRefCount_Windows == 0 ) { delete m_pDataContainer_Windows; - m_pDataContainer_Windows = NULL; + m_pDataContainer_Windows = nullptr; } } |