From bf057fab3c0d17bf2832c8d9fc6d34b1b859e660 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 10 Nov 2015 10:24:53 +0100 Subject: loplugin:nullptr (automatic rewrite) Change-Id: I0f2f81dae91f62639e79799b1bed1b2df1fd79ab --- svl/source/config/asiancfg.cxx | 4 +- svl/source/config/cjkoptions.cxx | 2 +- svl/source/config/ctloptions.cxx | 2 +- svl/source/config/itemholder2.cxx | 2 +- svl/source/filerec/filerec.cxx | 2 +- svl/source/fsstor/fsfactory.cxx | 4 +- svl/source/fsstor/fsstorage.cxx | 10 ++--- svl/source/fsstor/oinputstreamcontainer.cxx | 10 ++--- svl/source/fsstor/ostreamcontainer.cxx | 10 ++--- svl/source/inc/poolio.hxx | 12 +++--- svl/source/items/IndexedStyleSheets.cxx | 2 +- svl/source/items/aeitem.cxx | 20 +++++----- svl/source/items/flagitem.cxx | 2 +- svl/source/items/itemiter.cxx | 2 +- svl/source/items/itempool.cxx | 20 +++++----- svl/source/items/itemprop.cxx | 8 ++-- svl/source/items/itemset.cxx | 44 +++++++++++----------- svl/source/items/lckbitem.cxx | 2 +- svl/source/items/macitem.cxx | 4 +- svl/source/items/nranges.cxx | 8 ++-- svl/source/items/poolcach.cxx | 6 +-- svl/source/items/poolio.cxx | 36 +++++++++--------- svl/source/items/rngitem.cxx | 2 +- svl/source/items/sitem.cxx | 2 +- svl/source/items/slstitm.cxx | 6 +-- svl/source/items/style.cxx | 22 +++++------ svl/source/items/stylepool.cxx | 20 +++++----- svl/source/misc/adrparse.cxx | 30 +++++++-------- svl/source/misc/inettype.cxx | 10 ++--- svl/source/misc/sharecontrolfile.cxx | 2 +- svl/source/misc/sharedstring.cxx | 10 ++--- svl/source/misc/sharedstringpool.cxx | 2 +- svl/source/misc/strmadpt.cxx | 22 +++++------ svl/source/misc/urihelper.cxx | 2 +- svl/source/notify/SfxBroadcaster.cxx | 4 +- svl/source/numbers/numfmuno.cxx | 36 +++++++++--------- svl/source/numbers/numuno.cxx | 4 +- svl/source/numbers/supservs.cxx | 8 ++-- svl/source/numbers/zforfind.cxx | 16 ++++---- svl/source/numbers/zforfind.hxx | 14 +++---- svl/source/numbers/zforlist.cxx | 44 +++++++++++----------- svl/source/numbers/zformat.cxx | 32 ++++++++-------- svl/source/numbers/zforscan.cxx | 2 +- svl/source/passwordcontainer/passwordcontainer.cxx | 18 ++++----- svl/source/undo/undo.cxx | 40 ++++++++++---------- 45 files changed, 280 insertions(+), 280 deletions(-) (limited to 'svl/source') 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::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::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(NULL)) + : maPoolItems(nEnd - nStart + 1, static_cast(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 {}; 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 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( &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* 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::vectorpImp->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(), " - 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 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 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& SvNumberFormatsSupplierObj::getUnoTunnelId() SvNumberFormatsSupplierObj* SvNumberFormatsSupplierObj::getImplementation( const uno::Reference& rObj ) { - SvNumberFormatsSupplierObj* pRet = NULL; + SvNumberFormatsSupplierObj* pRet = nullptr; uno::Reference xUT(rObj, uno::UNO_QUERY); if (xUT.is()) pRet = reinterpret_cast(sal::static_int_cast(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& 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; } -- cgit v1.2.3