diff options
author | Justin Luth <justin_luth@sil.org> | 2022-02-19 20:22:23 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2022-02-25 15:22:32 +0100 |
commit | cf18038c66075f7a18d89e47f3a2ab1a5bf7c4fd (patch) | |
tree | 2032074d415fd06b060f1e4f41be3aa99d49c92a /include | |
parent | 6c49b4290955ef1b3a502b4e5e223a4fd5573683 (diff) |
tdf#81894 sc spelling: eliminate separate(inaccurate) check
ExecuteSpellPopup is quite accurate at identifying whether
the spelling at PosPixel is a spelling error or not.
If it is not a misspelled word, then it just silently returns.
If we make this a bDone flag, then it will just move
on to the normal right-click dialog.
There are a few additional scenarios that need to be
handled (mainly in terms of showing the edit-mode menu
instead of the full format menu, and also not
always returning the correct row/col when in edit mode).
I will do them in separate patches so that
each edge case can be clearly seen and handled.
They all rely on this patch being applied first.
This is the base patch. Too many things simply don't
work with the interim check, so I removed it.
(Part of the problem is that EditView kicks on and off,
and then a new CompleteOnlineSpelling needs to be run before
IsWrongSpelledWordAtPos can return a meaningful answer.)
This patch specifically fixes the problem of not
opening SpellPopup on a misspelled word in a wrapped-cell.
Steps to reproduce:
1.) Open LOv4304.ods from bug 81894 comment 6.
2.) Right-click on "spellng" in cell B12.
Before the patch, a full format popup was displayed
(not in edit mode) because IsSpellErrorAtPos returned
false, when it should have been true.
With this patch, spelling suggestions are provided.
As an example of an edge case, also notice:
3.) double-click on cell B4 (to enter edit mode)
4.) right click on "spellng" which appears to be in D4
Before the patch, nothing happened at all,
but with the patch at least the fall-back menu is displayed.
(EditView never switches out of cell B,
so SpellPopup is looking at wrong information.)
Change-Id: I91d413debc58de832dc7413034618e9e2bae3dd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130297
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/editeng/editview.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index 61b659dfb152..6d3a09664767 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -305,7 +305,7 @@ public: bool IsCursorAtWrongSpelledWord(); bool IsWrongSpelledWordAtPos( const Point& rPosPixel, bool bMarkIfWrong = false ); - void ExecuteSpellPopup(const Point& rPosPixel, const Link<SpellCallbackInfo&,void>& rCallBack); + bool ExecuteSpellPopup(const Point& rPosPixel, const Link<SpellCallbackInfo&,void>& rCallBack); OUString SpellIgnoreWord(); void InsertField( const SvxFieldItem& rFld ); |