summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sfx2/tbxctrl.hxx2
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx6
2 files changed, 3 insertions, 5 deletions
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index b77a4ca316b2..6e66fb7cba40 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -151,7 +151,7 @@ friend class SfxToolbox;
friend class SfxPopupWindow;
friend struct SfxTbxCtrlFactory;
- SfxToolBoxControl_Impl* pImpl;
+ std::unique_ptr< SfxToolBoxControl_Impl> pImpl;
protected:
DECL_LINK_TYPED( PopupModeEndHdl, FloatingWindow*, void );
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index d036ad1cdaec..1f0a2d92c1c2 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -212,9 +212,8 @@ SfxToolBoxControl::SfxToolBoxControl(
sal_uInt16 nID,
ToolBox& rBox,
bool bShowStringItems )
+ : pImpl( new SfxToolBoxControl_Impl )
{
- pImpl = new SfxToolBoxControl_Impl;
-
pImpl->pBox = &rBox;
pImpl->bShowString = bShowStringItems;
pImpl->pFact = nullptr;
@@ -227,7 +226,6 @@ SfxToolBoxControl::SfxToolBoxControl(
SfxToolBoxControl::~SfxToolBoxControl()
{
- delete pImpl;
}
@@ -627,7 +625,7 @@ IMPL_LINK_NOARG_TYPED(SfxToolBoxControl, PopupModeEndHdl, FloatingWindow*, void)
pImpl->mpPopupWindow.clear();
// We also need to know when the user tries to use the
// floating window.
- pImpl->mpFloatingWindow->AddEventListener( LINK( pImpl, SfxToolBoxControl_Impl, WindowEventListener ));
+ pImpl->mpFloatingWindow->AddEventListener( LINK( pImpl.get(), SfxToolBoxControl_Impl, WindowEventListener ));
}
else
{