diff options
| author | Michael Meeks <michael.meeks@collabora.com> | 2015-07-03 16:37:06 +0100 |
|---|---|---|
| committer | Eike Rathke <erack@redhat.com> | 2015-07-06 11:05:05 +0000 |
| commit | f7367996e8ba6474bad7be2238cc7ab79178f264 (patch) | |
| tree | 485ca52ead0ec0d217279ea8ed0bb53a634ee847 | |
| parent | 979d93f5f4d3a0a2961da7c0529d948cae5c4ae1 (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>
| -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() |
