summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx1
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx10
2 files changed, 10 insertions, 1 deletions
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index bb6dd5bcd872..c059ea997e3b 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 45f93b2fcda7..3fcc9662c557 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()