summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-10-16 17:12:12 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-10-16 17:47:50 +0200
commit3233383b2631788e7cfb0dd0b92d879322561616 (patch)
treece49fdcde70eba4a19c9c1b964714c45be9c575f /sd
parentfc36eed73e5033a34698c30801f159d533018b08 (diff)
tdf#160127: Improve grammar check popups from Duden
When there is a grammar check error that it has no suggestions for, Duden may return a JSON without suggestions, but still informing about the type of the error, like ... { "offset": 468, "length": 8, "errorcode": 21, "type": "orth", "proposals": [] }, ... Before the change, we underlined the error, but right-clicking it would only bring the normal Writer's context menu, as if there were no error. This was made in commit 7697ef9d8fbbed7afba10c00ff9f5362d0540cdd (Proof reading suggestions:, 2023-11-28); before that change, the context menu was shown, but since it had no suggestions, and no explanation text, it was considered better to just not show the grammar check results. But no menu for an underlined word is no better; so let's instead show the explanation, based on the type of the error reported by Duden - that is stored in SingleProofreadingError::aShortComment. Also set aFullComment, which is used in the grammar check dialog. Incidentally, it even improves popups with suggestions, because it now has the explanation as well, where previously only was an icon without any text. It may be further improved in a follow-up, because there is "errorcode" in the message, which we may use to add more details to the explanation. tdf#160127 should be fixed with this, too; but if there are cases when there are neither suggestions, nor explanation available, it will need further work. Change-Id: I62cde204e0142d6226c9c9486f1cdb5ffc20dca8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175017 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sd')
0 files changed, 0 insertions, 0 deletions