diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-10 11:14:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-12 08:58:04 +0200 |
commit | d6de1390b848412196cebef86f75c1b36289fc92 (patch) | |
tree | cb2264845391ec5afad34f34c6f8062d66ed1322 /sd | |
parent | 9aa479f9b9b0f13c10cf8873c9319ec11ff4e3b0 (diff) |
loplugin:useuniqueptr in FuSummaryPage::Create
Change-Id: I275483f94474740d999831009cae6a78f9ad067b
Reviewed-on: https://gerrit.libreoffice.org/60341
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/func/fusumry.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx index 09f4eccbe98d..3fcc0bd2279e 100644 --- a/sd/source/ui/func/fusumry.cxx +++ b/sd/source/ui/func/fusumry.cxx @@ -64,7 +64,7 @@ rtl::Reference<FuPoor> FuSummaryPage::Create( ViewShell* pViewSh, ::sd::Window* void FuSummaryPage::DoExecute( SfxRequest& ) { - SdOutliner* pOutl = nullptr; + std::unique_ptr<SdOutliner> pOutl; SdPage* pSummaryPage = nullptr; sal_uInt16 i = 0; sal_uInt16 nFirstPage = SDRPAGE_NOTFOUND; @@ -161,7 +161,7 @@ void FuSummaryPage::DoExecute( SfxRequest& ) pNotesPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); pNotesPage->setHeaderFooterSettings(pActualNotesPage->getHeaderFooterSettings()); - pOutl = new SdOutliner( mpDoc, OutlinerMode::OutlineObject ); + pOutl.reset(new SdOutliner( mpDoc, OutlinerMode::OutlineObject )); pOutl->SetUpdateMode(false); pOutl->EnableUndo(false); @@ -217,7 +217,7 @@ void FuSummaryPage::DoExecute( SfxRequest& ) if( bBegUndo ) mpView->EndUndo(); - delete pOutl; + pOutl.reset(); DrawViewShell* pDrawViewShell= dynamic_cast< DrawViewShell* >( mpViewShell ); if(pDrawViewShell) |