diff options
author | Justin Luth <justin_luth@sil.org> | 2022-02-21 11:05:41 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2022-02-25 15:23:00 +0100 |
commit | bdea5805c0344cbddb5c68d1fd19d3cd3b6e3afd (patch) | |
tree | 652ad1bfc9b656f10e15f5112ad44f1072382052 /sc | |
parent | 8238b887ccecb425f17166d2380afb208bbfdfbb (diff) |
tdf#81894 sc spelling: close EditView when moving outside cell
In a previous patch, we noted that instead of a spelling suggestion,
a popup was displayed. This patch handles that unfinished business.
1.) Open LOv4304.ods from bug 81894 comment 6.
2.) double-click on cell B4 (to enter edit mode)
3.) right click on "spellng" which appears to be in D4
Before any of the patches, this did nothing.
After the first base patch, it was showing the format popup.
Now it offers a spelling suggestion.
[By running EnterHandler, we are accepting any changes made
so far in editing mode. That is consistent with what happens
if a left-click selects a different cell.]
Change-Id: I23876a26861b695dc46efa42f6c3fed6fdb8da6a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130299
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 0f01233d64a9..f99eb0b350c4 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -3199,6 +3199,15 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) nCellY = mrViewData.GetEditViewRow(); else bPosIsInEditView = false; + + if (!bPosIsInEditView) + { + // Close the edit view when moving outside of the edited cell + // to avoid showing the edit popup, or providing the wrong EditView to spellcheck. + ScInputHandler* pHdl = pScMod->GetInputHdl(); + if (pHdl) + pHdl->EnterHandler(); + } } bool bSpellError = false; |