office-gobmx/include/svtools
Mike Kaganski 3233383b26 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 7697ef9d8f (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
2024-10-16 17:47:50 +02:00
..
acceleratorexecute.hxx
accessibilityoptions.hxx
addresstemplate.hxx
apearcfg.hxx
asynclink.hxx
bindablecontrolhelper.hxx
borderhelper.hxx
borderline.hxx
brwbox.hxx
brwhead.hxx
cliplistener.hxx
collatorres.hxx
colorcfg.hxx
colrdlg.hxx
ctrlbox.hxx
ctrltool.hxx
dialogclosedlistener.hxx
DocumentToGraphicRenderer.hxx
editbrowsebox.hxx
ehdl.hxx
embedhlp.hxx
embedtransfer.hxx
extcolorcfg.hxx
filechangedchecker.hxx
fontsubstconfig.hxx
genericasyncunodialog.hxx
genericunodialog.hxx
helpids.h
htmlcfg.hxx
htmlkywd.hxx
htmlout.hxx
htmltokn.h
HtmlWriter.hxx
imagemgr.hxx
imageresourceaccess.hxx
imgdef.hxx
indexentryres.hxx
inettbc.hxx
insdlg.hxx
javacontext.hxx
javainteractionhandler.hxx
langhelp.hxx
langtab.hxx
miscopt.hxx
openfiledroptargetlistener.hxx
optionsdrawinglayer.hxx
parhtml.hxx
parrtf.hxx
place.hxx
PlaceEditDialog.hxx
popupmenucontrollerbase.hxx
popupwindowcontroller.hxx
printoptions.hxx
prnsetup.hxx
querydelete.hxx
recorditemwindow.hxx
restartdialog.hxx
rtfkeywd.hxx
rtfout.hxx
rtftoken.h
ruler.hxx
sampletext.hxx
scriptedtext.hxx
scrolladaptor.hxx
sfxecode.hxx
soerr.hxx
statusbarcontroller.hxx
strings.hrc tdf#160127: Improve grammar check popups from Duden 2024-10-16 17:47:50 +02:00
stringtransfer.hxx
svparser.hxx
svtdllapi.h
svtresid.hxx
tabbar.hxx
templatefoldercache.hxx
toolbarmenu.hxx
toolboxcontroller.hxx
unitconv.hxx
unoevent.hxx
unoimap.hxx
urlfilter.hxx
valueset.hxx