diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-27 09:27:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-30 08:22:53 +0200 |
commit | 077b746be045a3918a55f21a687ba47dcb77702e (patch) | |
tree | 736633a771fac45407833838c7bafa08cd167690 | |
parent | 7234541a7832c03ebd617a93d080e6cf8628a138 (diff) |
loplugin:useuniqueptr in SwTOXStylesTabPage
Change-Id: I566ac5f9c334cfdfe879cdb0eef921fcc9a7be8d
Reviewed-on: https://gerrit.libreoffice.org/58243
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/inc/swuicnttab.hxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 5680a394e160..a791bf0d341d 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -3649,7 +3649,7 @@ SwTOXStylesTabPage::~SwTOXStylesTabPage() void SwTOXStylesTabPage::dispose() { - delete m_pCurrentForm; + m_pCurrentForm.reset(); m_pLevelLB.clear(); m_pAssignBT.clear(); m_pParaLayLB.clear(); @@ -3670,7 +3670,7 @@ void SwTOXStylesTabPage::Reset( const SfxItemSet* rSet ) void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& ) { - m_pCurrentForm = new SwForm(GetForm()); + m_pCurrentForm.reset(new SwForm(GetForm())); m_pParaLayLB->Clear(); m_pLevelLB->Clear(); diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 522a0a1298c4..32bbdec0c218 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -453,7 +453,7 @@ class SwTOXStylesTabPage : public SfxTabPage VclPtr<PushButton> m_pStdBT; VclPtr<PushButton> m_pEditStyleBT; - SwForm* m_pCurrentForm; + std::unique_ptr<SwForm> m_pCurrentForm; DECL_LINK( EditStyleHdl, Button *, void ); DECL_LINK( StdHdl, Button*, void ); |