diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-07-03 16:37:06 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-06 12:53:11 +0200 |
commit | c904a29262920364dc6749dbded246f70153cf1b (patch) | |
tree | 0fb122f9293c022da2a9c4fc13b81a4185bdff7c /sc | |
parent | d2b970841ac04d18c4940d5f68ca602422606c96 (diff) |
tdf#92392 - Dispose ScFormulaReferenceHelper properly.
Release the accelerator, and cleanup global references.
Change-Id: Id9931527f1b6d89067bc1e520e521ccfa6e28197
Reviewed-on: https://gerrit.libreoffice.org/16740
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/16751
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/inc/anyrefdg.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/anyrefdg.cxx | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 5f717ffd6a67..395dcaf7b270 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -74,6 +74,7 @@ class ScFormulaReferenceHelper public: ScFormulaReferenceHelper(IAnyRefDialog* _pDlg,SfxBindings* _pBindings); ~ScFormulaReferenceHelper(); + void dispose(); void ShowSimpleReference(const OUString& rStr); void ShowFormulaReference(const OUString& rStr); diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index aab5194546b7..6208048db203 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -65,17 +65,24 @@ ScFormulaReferenceHelper::ScFormulaReferenceHelper(IAnyRefDialog* _pDlg,SfxBindi ScFormulaReferenceHelper::~ScFormulaReferenceHelper() { + dispose(); +} + +void ScFormulaReferenceHelper::dispose() +{ if (bAccInserted) Application::RemoveAccel( pAccel.get() ); + bAccInserted = false; // common cleanup for ScAnyRefDlg and ScFormulaDlg is done here - HideReference(); enableInput( true ); ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl(); if ( pInputHdl ) pInputHdl->ResetDelayTimer(); // stop the timer for disabling the input line + + pAccel.reset(); } void ScFormulaReferenceHelper::enableInput( bool bEnable ) @@ -831,6 +838,7 @@ void ScRefHandler::disposeRefHandler() m_rWindow.clear(); pActiveWin.clear(); LeaveRefMode(); + m_aHelper.dispose(); } bool ScRefHandler::LeaveRefMode() |