diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-27 10:23:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-28 08:27:37 +0200 |
commit | 4dbfc74325130fe272007cf572a56634f9894deb (patch) | |
tree | ea2a5edcbca47e9cee1b7017df098296c64747c4 | |
parent | 1156f2ed90ddea4036f08155a83248cc4eab7f27 (diff) |
loplugin:useuniqueptr in ScCheckListBox
Change-Id: Ic3059e266a9276786e33ba5adf846e51551bdd6f
Reviewed-on: https://gerrit.libreoffice.org/56549
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sc/source/ui/cctrl/checklistmenu.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/checklistmenu.hxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index fb727e812a8c..15fdb0df0777 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1632,8 +1632,8 @@ SvTreeListEntry* ScCheckListBox::FindEntry( SvTreeListEntry* pParent, const OUSt void ScCheckListBox::Init() { - mpCheckButton = new SvLBoxButtonData( this ); - EnableCheckButton( mpCheckButton ); + mpCheckButton.reset( new SvLBoxButtonData( this ) ); + EnableCheckButton( mpCheckButton.get() ); SetNodeDefaultImages(); } diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index 5f58e8015a6c..076ad2414afa 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -226,7 +226,7 @@ struct ScCheckListMember; class ScCheckListBox : public SvTreeListBox { - SvLBoxButtonData* mpCheckButton; + std::unique_ptr<SvLBoxButtonData> mpCheckButton; ScTabStops* mpTabStops; bool mbSeenMouseButtonDown; void CountCheckedEntries( SvTreeListEntry* pParent, sal_uLong& nCount ) const; @@ -236,7 +236,7 @@ class ScCheckListBox : public SvTreeListBox ScCheckListBox( vcl::Window* pParent ); virtual ~ScCheckListBox() override { disposeOnce(); } - virtual void dispose() override { delete mpCheckButton; SvTreeListBox::dispose(); } + virtual void dispose() override { mpCheckButton.reset(); SvTreeListBox::dispose(); } void Init(); void CheckEntry( const OUString& sName, SvTreeListEntry* pParent, bool bCheck ); void CheckEntry( SvTreeListEntry* pEntry, bool bCheck ); |