summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-12-10 13:38:52 +0100
committerDavid Tardon <dtardon@redhat.com>2015-12-10 13:13:34 +0000
commit75f25d00848068c677fca450d35aa59af0422c60 (patch)
tree41dd5d4491f4f791b7d31d621fa0b7751c2f3c46 /sfx2
parente81d193d56f219610da5b8b10717741d8c5dc63c (diff)
Memory leak
(cherry picked from commit 5ac6e00274e732435b55c2908db9cea658fe549b) Conflicts: sfx2/source/dialog/backingwindow.cxx Change-Id: Ica40750d628946678019376d91db67ba3f9ed67e Reviewed-on: https://gerrit.libreoffice.org/20601 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/backingwindow.cxx3
-rw-r--r--sfx2/source/dialog/backingwindow.hxx3
2 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index e58505be0837..a0486c944374 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -95,7 +95,6 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
mbIsSaveMode( false ),
mbInitControls( false ),
mnHideExternalLinks( 0 ),
- mpAccExec( NULL ),
maSelTemplates(cmpSelectionItems),
maSelFolders(cmpSelectionItems)
@@ -445,7 +444,7 @@ bool BackingWindow::Notify( NotifyEvent& rNEvt )
// try the 'normal' accelerators (so that eg. Ctrl+Q works)
if( !mpAccExec )
{
- mpAccExec = svt::AcceleratorExecute::createAcceleratorHelper();
+ mpAccExec.reset(svt::AcceleratorExecute::createAcceleratorHelper());
mpAccExec->init( comphelper::getProcessComponentContext(), mxFrame);
}
const KeyEvent* pEvt = rNEvt.GetKeyEvent();
diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx
index c2c146220502..ec06cc4f5cf9 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -44,6 +44,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XDesktop2.hpp>
+#include <memory>
#include <set>
class ToolBox;
@@ -91,7 +92,7 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer
bool mbIsSaveMode;
bool mbInitControls;
sal_Int32 mnHideExternalLinks;
- svt::AcceleratorExecute* mpAccExec;
+ std::unique_ptr<svt::AcceleratorExecute> mpAccExec;
void setupButton(PushButton* pButton);
void setupButton(MenuButton* pButton);