[Libreoffice-commits] core.git: Branch 'libreoffice-4-1-4' - sc/inc sc/source
Eike Rathke
erack at redhat.com
Thu Dec 5 16:37:27 PST 2013
sc/inc/scmod.hxx | 1 +
sc/source/ui/app/inputhdl.cxx | 14 ++++++++++++++
sc/source/ui/app/scmod.cxx | 7 +++++++
sc/source/ui/formdlg/formula.cxx | 2 +-
sc/source/ui/inc/inputhdl.hxx | 1 +
5 files changed, 24 insertions(+), 1 deletion(-)
New commits:
commit ff927df4929022656668e4e98511c198134247cc
Author: Eike Rathke <erack at redhat.com>
Date: Thu Dec 5 01:50:38 2013 +0100
resolved fdo#71667 and fdo#72278, fdo#69971 follow-up fix
a9d85d62a889288b17899c8defc020da487d8b36 used
ScInputHandler::EnterHandler() to reset all sort of things related to
input EditEngine, but that is a handler for Enter and does not enter a
handler and actually attempts to finalize input, which lead to various
unwanted side effects.
Introduced ScInputHandler::InputTurnOffWinEngine() as only the input bar
window EditEngine needs to be reset in the window switching case (which
EnterHandler also does hence it did prevent that bug). The approach
could be polished with further refinement but most importantly fixes the
actual problems now.
(cherry picked from commit dfd1a47a38dac743f9ed0f1e9507714bac027d35)
Conflicts:
sc/inc/scmod.hxx
sc/source/ui/app/scmod.cxx
Change-Id: I9a0bc452b49ba11a3313cafbc1e5972f41dc65c7
Reviewed-on: https://gerrit.libreoffice.org/6936
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index 5f2e61a..014edb1 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -222,6 +222,7 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO
void InputGetSelection( xub_StrLen& rStart, xub_StrLen& rEnd );
void InputSetSelection( xub_StrLen nStart, xub_StrLen nEnd );
void InputReplaceSelection( const String& rStr );
+ void InputTurnOffWinEngine();
String InputGetFormulaStr();
void ActivateInputWindow( const String* pStr = NULL,
sal_Bool bMatrix = false );
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 76e0752..b31489c 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 5a57479..182eb6e 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 80268da..2deaf0d 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 0f0ac6e..8d0d44f 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; }
More information about the Libreoffice-commits
mailing list