summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-05-22 18:09:36 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-24 07:42:22 +0000
commite0788463c3ec790ee002fc1610a9206f2ac7c10d (patch)
tree6603196a95590ec97f391debc9ea42bd9052dc2d /sfx2
parent8441cd025a694b25ca6795ac05f1a6dd910a6bbb (diff)
tdf#89329: use unique_ptr for pImpl in tbxctrl
Change-Id: I309435b73e3d490cc091dd875f7f600e6f2f354c Reviewed-on: https://gerrit.libreoffice.org/25322 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx6
1 files changed, 2 insertions, 4 deletions
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
{