summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-12-10 13:38:52 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-12-10 13:46:10 +0100
commit04bd61251de98087126bb5a41f10817b505f5af3 (patch)
treea445eaefb9f7c99bc916b3570b6ecbe557e5abfb
parent3679f7a8f122d8418c5af8280aff0de6d2c4103d (diff)
Memory leak
Change-Id: Ica40750d628946678019376d91db67ba3f9ed67e (cherry picked from commit 5ac6e00274e732435b55c2908db9cea658fe549b)
-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 5905ff9ccdd4..bd36eb322ed8 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -96,7 +96,6 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
mbIsSaveMode( false ),
mbInitControls( false ),
mnHideExternalLinks( 0 ),
- mpAccExec( nullptr ),
maSelTemplates(cmpSelectionItems),
maSelFolders(cmpSelectionItems)
@@ -443,7 +442,7 @@ bool BackingWindow::PreNotify( 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);
}
diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx
index e31daccfc7ab..90b385b5dcfb 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;
@@ -92,7 +93,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);