From de0a2f6ae7fdfccc17e2b93006a3d308ac15868b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 2 May 2018 13:58:34 +0200 Subject: loplugin:useuniqueptr in SfxManageStyleSheetPage Change-Id: Ia20be44b7a574a8afe1edbf5bf313da4391898d1 Reviewed-on: https://gerrit.libreoffice.org/53760 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sfx2/source/dialog/mgetempl.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sfx2/source') diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 611a7359b9f9..2b29c7e335d1 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -92,7 +92,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx else m_pEditLinkStyleBtn->Enable(); - pFamilies = SfxApplication::GetModule_Impl()->CreateStyleFamilies(); + pFamilies.reset(SfxApplication::GetModule_Impl()->CreateStyleFamilies()); SfxStyleSheetBasePool* pPool = nullptr; SfxObjectShell* pDocShell = SfxObjectShell::Current(); @@ -252,7 +252,7 @@ void SfxManageStyleSheetPage::dispose() { m_pNameRw->SetGetFocusHdl( Link() ); m_pNameRw->SetLoseFocusHdl( Link() ); - delete pFamilies; + pFamilies.reset(); pItem = nullptr; pStyle = nullptr; m_pNameRo.clear(); -- cgit