diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:25:48 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:53 +0100 |
commit | 01b49802c7cda7fd4d5ba71263cef7bc95234b89 (patch) | |
tree | b8d92f1c6abf5ac548d0bcb0c581ebfcffd8bfac /sw/source/uibase/shells/txtnum.cxx | |
parent | 6cd7bf2043146a630925a2e49336f02c802f707a (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
Diffstat (limited to 'sw/source/uibase/shells/txtnum.cxx')
-rw-r--r-- | sw/source/uibase/shells/txtnum.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx index 1db6124b9e3a..acebe2535ad3 100644 --- a/sw/source/uibase/shells/txtnum.cxx +++ b/sw/source/uibase/shells/txtnum.cxx @@ -116,7 +116,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) SwDocShell* pDocSh = GetView().GetDocShell(); const bool bHtml = dynamic_cast<SwWebDocShell*>( pDocSh ) != nullptr; const SwNumRule* pNumRuleAtCurrentSelection = GetShell().GetNumRuleAtCurrentSelection(); - if ( pNumRuleAtCurrentSelection != NULL ) + if ( pNumRuleAtCurrentSelection != nullptr ) { SvxNumRule aRule = pNumRuleAtCurrentSelection->MakeSvxNumRule(); @@ -129,7 +129,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) const SvxBrushItem* pBrush = aFormat.GetBrush(); if(pBrush && !pBrush->GetGraphicLink().isEmpty()) aFormat.SetNumberingType(SvxExtNumType(SVX_NUM_BITMAP|LINK_TOKEN)); - aRule.SetLevel(i, aFormat, aRule.Get(i) != 0); + aRule.SetLevel(i, aFormat, aRule.Get(i) != nullptr); } } if(bHtml) @@ -199,7 +199,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) rReq.Done(); SvxNumRule* pSetRule = static_cast<const SvxNumBulletItem*>( pItem )->GetNumRule(); pSetRule->UnLinkGraphics(); - SwNumRule aSetRule( pNumRuleAtCurrentSelection != NULL + SwNumRule aSetRule( pNumRuleAtCurrentSelection != nullptr ? pNumRuleAtCurrentSelection->GetName() : GetShell().GetUniqueNumRuleName(), numfunc::GetDefaultPositionAndSpaceMode() ); @@ -207,12 +207,12 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) aSetRule.SetAutoRule( true ); // No start of new list, if an existing list style is edited. // Otherwise start a new list. - const bool bCreateList = ( pNumRuleAtCurrentSelection == NULL ); + const bool bCreateList = ( pNumRuleAtCurrentSelection == nullptr ); GetShell().SetCurNumRule( aSetRule, bCreateList ); } // If the Dialog was leaved with OK but nothing was chosen then the // numbering must be at least activated, if it is not already. - else if ( pNumRuleAtCurrentSelection == NULL + else if ( pNumRuleAtCurrentSelection == nullptr && SfxItemState::SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, false, &pItem ) ) { rReq.AppendItem( *pItem ); @@ -248,18 +248,18 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq) case FN_SVX_SET_BULLET: { const SfxUInt16Item* pItem = rReq.GetArg<SfxUInt16Item>(nSlot); - if ( pItem != NULL ) + if ( pItem != nullptr ) { const sal_uInt16 nChoosenItemIdx = pItem->GetValue(); svx::sidebar::NBOTypeMgrBase* pNBOTypeMgr = nSlot == FN_SVX_SET_NUMBER ? svx::sidebar::NBOutlineTypeMgrFact::CreateInstance( svx::sidebar::eNBOType::NUMBERING ) : svx::sidebar::NBOutlineTypeMgrFact::CreateInstance( svx::sidebar::eNBOType::BULLETS ); - if ( pNBOTypeMgr != NULL ) + if ( pNBOTypeMgr != nullptr ) { const SwNumRule* pNumRuleAtCurrentSelection = GetShell().GetNumRuleAtCurrentSelection(); sal_uInt16 nActNumLvl = USHRT_MAX; - if ( pNumRuleAtCurrentSelection != NULL ) + if ( pNumRuleAtCurrentSelection != nullptr ) { const sal_uInt16 nLevel = GetShell().GetNumLevel(); if ( nLevel < MAXLEVEL ) @@ -268,9 +268,9 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq) } } SwNumRule aNewNumRule( - pNumRuleAtCurrentSelection != NULL ? pNumRuleAtCurrentSelection->GetName() : GetShell().GetUniqueNumRuleName(), + pNumRuleAtCurrentSelection != nullptr ? pNumRuleAtCurrentSelection->GetName() : GetShell().GetUniqueNumRuleName(), numfunc::GetDefaultPositionAndSpaceMode() ); - SvxNumRule aNewSvxNumRule = pNumRuleAtCurrentSelection != NULL + SvxNumRule aNewSvxNumRule = pNumRuleAtCurrentSelection != nullptr ? pNumRuleAtCurrentSelection->MakeSvxNumRule() : aNewNumRule.MakeSvxNumRule(); // set unit attribute to NB Manager @@ -281,7 +281,7 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq) aNewNumRule.SetSvxRule( aNewSvxNumRule, GetShell().GetDoc() ); aNewNumRule.SetAutoRule( true ); - const bool bCreateNewList = ( pNumRuleAtCurrentSelection == NULL ); + const bool bCreateNewList = ( pNumRuleAtCurrentSelection == nullptr ); GetShell().SetCurNumRule( aNewNumRule, bCreateNewList ); } } |