This is a spinoff from bug 116566. Currently we can define a custom color for Spelling mistakes via Tools - Options - LibreOffice - Application Colors. The color is AutoSpellcheck (svtools::SPELL). However we cannot define a custom color for grammar mistakes. It is hardcoded as COL_LIGHTBLUE and can't be changed via the Application Colors dialog. See: https://opengrok.libreoffice.org/xref/core/cui/source/dialogs/SpellDialog.cxx?r=1de8308d#1678 So I propose we create a new configurable color for Grammar mistakes, which could be accessible via svtools::GRAMMAR
Created attachment 183420 [details] Screenshot of the proposed option This screenshot shows the proposed configuration dialog.
Spell-checking works across all modules while grammar is checked only in Writer. Reminds me on the track changes options. But neither moving the color options (for example to tools > options > language settings) nor splitting in General and Writer makes much sense. I wonder if the languagetool benefits from the option.
(In reply to Heiko Tietze from comment #2) > Spell-checking works across all modules while grammar is checked only in > Writer. Reminds me on the track changes options. But neither moving the > color options (for example to tools > options > language settings) nor > splitting in General and Writer makes much sense. IMO the easier solution would be to move the "Grammar mistakes" under the "Text document" section of the "Application colors" dialog. > I wonder if the languagetool benefits from the option. Bug 103691 requests the implementation of API that allows LanguageTool (LT) to define colors and text formatting. However this is from a time when LT was delivered as an extension. I think we could have LT colors defined in its own options dialog (under Tools - Options - Language Settings - Language Tool Settings) Note that in the above proposal, I think we should rename "Language Tool Server Settings" to simply "Language Tool Settings".
Here's a "proof of concept" patch. https://gerrit.libreoffice.org/c/core/+/142294 In this patch the "Grammar mistakes" color is under the "Text document" section in "Application colors".
Easiest solution is to just add the grammar check color to the text document section.
Rafael Lima committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0aa61812a87ac466bea4b35cba75a4e986be8c7f tdf#151904 Make grammar mistake color configurable It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Fix verified in: Version: 7.5.0.1 (X86_64) / LibreOffice Community Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Thanks Rafael!