From d6de1390b848412196cebef86f75c1b36289fc92 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 10 Sep 2018 11:14:42 +0200 Subject: loplugin:useuniqueptr in FuSummaryPage::Create Change-Id: I275483f94474740d999831009cae6a78f9ad067b Reviewed-on: https://gerrit.libreoffice.org/60341 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sd/source/ui/func/fusumry.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sd/source/ui/func') 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 FuSummaryPage::Create( ViewShell* pViewSh, ::sd::Window* void FuSummaryPage::DoExecute( SfxRequest& ) { - SdOutliner* pOutl = nullptr; + std::unique_ptr 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) -- cgit