diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:24:53 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:47 +0100 |
commit | bf057fab3c0d17bf2832c8d9fc6d34b1b859e660 (patch) | |
tree | 7792f30782655fa9f0830b7320f9ff988c598fb1 /svl/source/items/style.cxx | |
parent | 6f06230da10c6a51c5538f1b5515b341475ea043 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I0f2f81dae91f62639e79799b1bed1b2df1fd79ab
Diffstat (limited to 'svl/source/items/style.cxx')
-rw-r--r-- | svl/source/items/style.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 23605a869399..a164475a1ec4 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -110,7 +110,7 @@ SfxStyleSheetBase::SfxStyleSheetBase( const OUString& rName, SfxStyleSheetBasePo , aName( rName ) , aParent() , aFollow( rName ) - , pSet( NULL ) + , pSet( nullptr ) , nMask(mask) , nHelpId( 0 ) , bMySet( false ) @@ -140,7 +140,7 @@ SfxStyleSheetBase::SfxStyleSheetBase( const SfxStyleSheetBase& r ) if( r.pSet ) pSet = bMySet ? new SfxItemSet( *r.pSet ) : r.pSet; else - pSet = NULL; + pSet = nullptr; } SfxStyleSheetBase::~SfxStyleSheetBase() @@ -152,7 +152,7 @@ SfxStyleSheetBase::~SfxStyleSheetBase() if( bMySet ) { delete pSet; - pSet = 0; + pSet = nullptr; } } @@ -411,7 +411,7 @@ struct DoesStyleMatchStyleSheetPredicate final : public svl::StyleSheetPredicate SfxStyleSheetIterator::SfxStyleSheetIterator(SfxStyleSheetBasePool *pBase, SfxStyleFamily eFam, sal_uInt16 n) - : pAktStyle(NULL) + : pAktStyle(nullptr) , nAktPosition(0) { pBasePool=pBase; @@ -451,7 +451,7 @@ sal_uInt16 SfxStyleSheetIterator::Count() SfxStyleSheetBase* SfxStyleSheetIterator::operator[](sal_uInt16 nIdx) { - SfxStyleSheetBase* retval = NULL; + SfxStyleSheetBase* retval = nullptr; if( IsTrivialSearch()) { retval = pBasePool->pImp->mxIndexedStyleSheets->GetStyleSheetByPosition(nIdx).get(); @@ -471,14 +471,14 @@ SfxStyleSheetBase* SfxStyleSheetIterator::operator[](sal_uInt16 nIdx) DoesStyleMatchStyleSheetPredicate predicate(this); rtl::Reference< SfxStyleSheetBase > ref = pBasePool->pImp->mxIndexedStyleSheets->GetNthStyleSheetThatMatchesPredicate(nIdx, predicate); - if (ref.get() != NULL) + if (ref.get() != nullptr) { nAktPosition = pBasePool->pImp->mxIndexedStyleSheets->FindStyleSheetPosition(*ref); retval = ref.get(); } } - if (retval == NULL) + if (retval == nullptr) { OSL_FAIL("Incorrect index"); } @@ -492,14 +492,14 @@ SfxStyleSheetBase* SfxStyleSheetIterator::First() return operator[](0); } else { - return NULL; + return nullptr; } } SfxStyleSheetBase* SfxStyleSheetIterator::Next() { - SfxStyleSheetBase* retval = NULL; + SfxStyleSheetBase* retval = nullptr; if ( IsTrivialSearch() ) { @@ -530,7 +530,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Next() pBasePool->pImp->mxIndexedStyleSheets->GetNthStyleSheetThatMatchesPredicate( 0, predicate, nAktPosition+1); retval = ref.get(); - if (retval != NULL) { + if (retval != nullptr) { nAktPosition = pBasePool->pImp->mxIndexedStyleSheets->FindStyleSheetPosition(*ref); } } @@ -546,7 +546,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Find(const OUString& rStr) pBasePool->pImp->mxIndexedStyleSheets->FindPositionsByNameAndPredicate(rStr, predicate, svl::IndexedStyleSheets::RETURN_FIRST); if (positions.empty()) { - return NULL; + return nullptr; } unsigned pos = positions.front(); |