Kaydet (Commit) a8a9b4f8 authored tarafından Michael Meeks's avatar Michael Meeks

tdf#92392 - Dispose ScFormulaReferenceHelper properly.

Release the accelerator, and cleanup global references.

Change-Id: Id9931527f1b6d89067bc1e520e521ccfa6e28197
Reviewed-on: https://gerrit.libreoffice.org/16740Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
Tested-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst 6cadfe0f
......@@ -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);
......
......@@ -64,18 +64,25 @@ 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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment