sc/source/ui/inc/anyrefdg.hxx | 1 + sc/source/ui/miscdlgs/anyrefdg.cxx | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-)
New commits: commit a8a9b4f8381c3935bab96a713c8237381ffc5c93 Author: Michael Meeks <michael.me...@collabora.com> Date: Fri Jul 3 16:37:06 2015 +0100 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 <c...@libreoffice.org> Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Michael Meeks <michael.me...@collabora.com> diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index bb6dd5b..c059ea9 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 45f93b2..3fcc966 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() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits