summaryrefslogtreecommitdiffstats
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/app/inputhdl.cxx14
-rw-r--r--sc/source/ui/app/scmod.cxx7
-rw-r--r--sc/source/ui/formdlg/formula.cxx2
-rw-r--r--sc/source/ui/inc/inputhdl.hxx1
4 files changed, 23 insertions, 1 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 76e07524be07..b31489c4db00 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3894,6 +3894,20 @@ void ScInputHandler::InputReplaceSelection( const OUString& rStr )
bModified = true;
}
+void ScInputHandler::InputTurnOffWinEngine()
+{
+ bInOwnChange = true; // disable ModifyHdl (reset below)
+
+ eMode = SC_INPUT_NONE;
+ /* TODO: it would be better if there was some way to reset the input bar
+ * engine instead of deleting and having it recreate through
+ * GetFuncEditView(), but first least invasively let this fix fdo#71667 and
+ * fdo#72278 without reintroducing fdo#69971. */
+ StopInputWinEngine(true);
+
+ bInOwnChange = false;
+}
+
//========================================================================
// ScInputHdlState
//========================================================================
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 5a5747965646..182eb6e1c4c5 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1543,6 +1543,13 @@ void ScModule::InputReplaceSelection( const String& rStr )
pHdl->InputReplaceSelection( rStr );
}
+void ScModule::InputTurnOffWinEngine()
+{
+ ScInputHandler* pHdl = GetInputHdl();
+ if (pHdl)
+ pHdl->InputTurnOffWinEngine();
+}
+
String ScModule::InputGetFormulaStr()
{
ScInputHandler* pHdl = GetInputHdl();
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 80268dae7a86..2deaf0d13ff0 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -621,7 +621,7 @@ void ScFormulaDlg::setCurrentFormula(const String& _sReplacement)
//ScMultiTextWnd::Paint a new editengine will have been created via
//GetEditView with its default Modification handler enabled. So ensure
//its off when we will access it via InputReplaceSelection
- pScMod->InputEnterHandler();
+ pScMod->InputTurnOffWinEngine();
}
pScMod->InputReplaceSelection(_sReplacement);
}
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index 0f0ac6e101da..8d0d44f9d8cd 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -233,6 +233,7 @@ public:
void InputGetSelection ( xub_StrLen& rStart, xub_StrLen& rEnd );
void InputSetSelection ( xub_StrLen nStart, xub_StrLen nEnd );
void InputReplaceSelection ( const OUString& rStr );
+ void InputTurnOffWinEngine();
bool IsFormulaMode() const { return bFormulaMode; }
ScInputWindow* GetInputWindow() { return pInputWin; }