sd/source/ui/func/fuolbull.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 9aa479f9b9b0f13c10cf8873c9319ec11ff4e3b0 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Sep 10 11:14:22 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Sep 12 08:57:46 2018 +0200 loplugin:useuniqueptr in FuOutlineBullet::SetCurrentBulletsNumbering Change-Id: Ia28c225990d4409016f91bed46193efda717f7ca Reviewed-on: https://gerrit.libreoffice.org/60340 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index d0737a420641..9215ef607e53 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -180,10 +180,10 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq) sal_uInt32 nNumItemId = SID_ATTR_NUMBERING_RULE; const SfxPoolItem* pTmpItem = GetNumBulletItem( aNewAttr, nNumItemId ); - SvxNumRule* pNumRule = nullptr; + std::unique_ptr<SvxNumRule> pNumRule; if ( pTmpItem ) { - pNumRule = new SvxNumRule(*static_cast<const SvxNumBulletItem*>(pTmpItem)->GetNumRule()); + pNumRule.reset(new SvxNumRule(*static_cast<const SvxNumBulletItem*>(pTmpItem)->GetNumRule())); // get numbering rule corresponding to <nIdx> and apply the needed number formats to <pNumRule> NBOTypeMgrBase* pNumRuleMgr = @@ -245,11 +245,11 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq) if ( pOLV ) { - pOLV->ToggleBulletsNumbering( bToggle, nSId == FN_SVX_SET_BULLET, bInMasterView ? nullptr : pNumRule ); + pOLV->ToggleBulletsNumbering( bToggle, nSId == FN_SVX_SET_BULLET, bInMasterView ? nullptr : pNumRule.get() ); } else { - mpView->ChangeMarkedObjectsBulletsNumbering( bToggle, nSId == FN_SVX_SET_BULLET, bInMasterView ? nullptr : pNumRule ); + mpView->ChangeMarkedObjectsBulletsNumbering( bToggle, nSId == FN_SVX_SET_BULLET, bInMasterView ? nullptr : pNumRule.get() ); } if (bInMasterView && pNumRule) @@ -268,7 +268,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq) pSdrModel->EndUndo(); } - delete pNumRule; + pNumRule.reset(); rReq.Done(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits