Bug 151904 - Create color configuration entry for Grammar mistakes
Summary: Create color configuration entry for Grammar mistakes
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Rafael Lima
URL:
Whiteboard: target:7.5.0 inReleaseNotes:7.5
Keywords:
Depends on:
Blocks: Spell-Checking Options-Dialog-Colours
  Show dependency treegraph
 
Reported: 2022-11-04 15:16 UTC by Rafael Lima
Modified: 2022-12-28 11:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the proposed option (88.59 KB, image/png)
2022-11-04 20:28 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2022-11-04 15:16:15 UTC
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
Comment 1 Rafael Lima 2022-11-04 20:28:59 UTC
Created attachment 183420 [details]
Screenshot of the proposed option

This screenshot shows the proposed configuration dialog.
Comment 2 Heiko Tietze 2022-11-10 09:11:07 UTC
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.
Comment 3 Rafael Lima 2022-11-12 15:04:43 UTC
(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".
Comment 4 Rafael Lima 2022-11-12 15:24:59 UTC
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".
Comment 5 Heiko Tietze 2022-11-14 09:44:31 UTC
Easiest solution is to just add the grammar check color to the text document section.
Comment 6 Commit Notification 2022-11-17 18:19:16 UTC
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.
Comment 7 Stéphane Guillou (stragu) 2022-12-28 11:36:51 UTC
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!