diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-05-30 20:25:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-05-30 22:27:14 +0200 |
commit | ecd270bc44d094cc01e9978af60715c0d3940416 (patch) | |
tree | 7a94048e5eeb96d1c27e9c790a826aa5e1626b04 | |
parent | 0ceb131e964206efbb1c76a03f19d1992e2f89c7 (diff) |
Revert "Resolves: tdf#155453 formatting lost when formula bar edited via IM"
This reverts commit 1a6d250f34c63808552f783a31a315bc7d80ca93.
seemed to work at the time, but it crashes now.
Change-Id: I21bdc7a6494de4190d088552ca89ac831b642ba3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152404
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index a3e8f0fd591b..a85baa1ccca4 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1709,19 +1709,7 @@ bool ScTextWnd::Command( const CommandEvent& rCEvt ) // Prevent that the EditView is lost when switching between Views pScMod->SetInEditCommand( true ); - - // tdf#155453 send InputMethod events received by the InputBar through - // ScInputHandler so formatting in other views can be retained - bool bExtInput = nCommand == CommandEventId::StartExtTextInput || - nCommand == CommandEventId::ExtTextInput || - nCommand == CommandEventId::EndExtTextInput; - - ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl(); - if (bExtInput && pInputHdl) - pInputHdl->InputCommand(rCEvt); - else - m_xEditView->Command( rCEvt ); - + m_xEditView->Command( rCEvt ); pScMod->SetInEditCommand( false ); // CommandEventId::StartDrag does not mean by far that the content was actually changed, @@ -1743,6 +1731,15 @@ bool ScTextWnd::Command( const CommandEvent& rCEvt ) } } } + else if ( nCommand == CommandEventId::EndExtTextInput ) + { + if (bFormulaMode) + { + ScInputHandler* pHdl = SC_MOD()->GetInputHdl(); + if (pHdl) + pHdl->InputCommand(rCEvt); + } + } else if ( nCommand == CommandEventId::CursorPos ) { // don't call InputChanged for CommandEventId::CursorPos |