summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/checklbx.hxx3
-rw-r--r--svx/source/dialog/checklbx.cxx6
2 files changed, 5 insertions, 4 deletions
diff --git a/include/svx/checklbx.hxx b/include/svx/checklbx.hxx
index 76540dfd225b..98e955b353df 100644
--- a/include/svx/checklbx.hxx
+++ b/include/svx/checklbx.hxx
@@ -28,6 +28,7 @@
#include <tools/wintypes.hxx>
#include <vcl/event.hxx>
#include <vcl/window.hxx>
+#include <memory>
class Image;
class SvLBoxButtonData;
@@ -40,7 +41,7 @@ class SVX_DLLPUBLIC SvxCheckListBox : public SvTreeListBox
using Window::GetText;
private:
- SvLBoxButtonData* pCheckButton;
+ std::unique_ptr<SvLBoxButtonData> pCheckButton;
SVX_DLLPRIVATE void Init_Impl();
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx
index 5bf4c8610087..41c5a42ed93c 100644
--- a/svx/source/dialog/checklbx.cxx
+++ b/svx/source/dialog/checklbx.cxx
@@ -44,14 +44,14 @@ SvxCheckListBox::~SvxCheckListBox()
void SvxCheckListBox::dispose()
{
- delete pCheckButton;
+ pCheckButton.reset();
SvTreeListBox::dispose();
}
void SvxCheckListBox::Init_Impl()
{
- pCheckButton = new SvLBoxButtonData( this );
- EnableCheckButton( pCheckButton );
+ pCheckButton.reset(new SvLBoxButtonData( this ));
+ EnableCheckButton( pCheckButton.get() );
}
void SvxCheckListBox::InsertEntry( const OUString& rStr, sal_uLong nPos,