cui/source/dialogs/SpellDialog.cxx                     |    5 
 cui/source/options/optcolor.cxx                        |    1 
 cui/uiconfig/ui/colorconfigwin.ui                      |  109 +++++++----------
 include/svtools/colorcfg.hxx                           |    1 
 officecfg/registry/data/org/openoffice/Office/UI.xcu   |   10 +
 officecfg/registry/schema/org/openoffice/Office/UI.xcs |   10 +
 svtools/source/config/colorcfg.cxx                     |    2 
 sw/inc/viewopt.hxx                                     |    2 
 sw/source/core/inc/wrong.hxx                           |    2 
 sw/source/uibase/config/viewopt.cxx                    |    7 +
 10 files changed, 81 insertions(+), 68 deletions(-)

New commits:
commit 0aa61812a87ac466bea4b35cba75a4e986be8c7f
Author:     Rafael Lima <rafael.palma.l...@gmail.com>
AuthorDate: Fri Nov 4 20:31:22 2022 +0200
Commit:     Rafael Lima <rafael.palma.l...@gmail.com>
CommitDate: Thu Nov 17 19:17:58 2022 +0100

    tdf#151904 Make grammar mistake color configurable
    
    This patch creates a new color entry in Tools - Options - Application 
Colors for "Grammar mistakes". Default values are also set for the 
"LibreOffice" and "LibreOffice dark" schemes.
    
    This patch also applies the selected color to the document, as well as in 
the SpellChecker dialog.
    
    Change-Id: I07f79da9858b675b330540cf08cf389dce39228d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142294
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>
    Reviewed-by: Rafael Lima <rafael.palma.l...@gmail.com>

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 21f7f2b4da80..4ca5bcfe2d17 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1674,11 +1674,10 @@ void SentenceEditWindow_Impl::MoveErrorMarkTo(sal_Int32 
nStart, sal_Int32 nEnd,
 
     // tdf#116566 Use color defined in the current Color Scheme
     Color aSpellErrorCollor = 
svtools::ColorConfig().GetColorValue(svtools::SPELL).nColor;
+    Color aGrammarErrorCollor = 
svtools::ColorConfig().GetColorValue(svtools::GRAMMAR).nColor;
 
-    // TODO: Create a new Color Scheme entry for grammar mistakes and use it 
below
-    // instead of using hardcoded COL_LIGHTBLUE
     SfxItemSet aSet(m_xEditEngine->GetEmptyItemSet());
-    aSet.Put(SvxColorItem(bGrammarError ? COL_LIGHTBLUE : aSpellErrorCollor, 
EE_CHAR_COLOR));
+    aSet.Put(SvxColorItem(bGrammarError ? aGrammarErrorCollor : 
aSpellErrorCollor, EE_CHAR_COLOR));
     aSet.Put(SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT));
     aSet.Put(SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT_CJK));
     aSet.Put(SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT_CTL));
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 2249b70e495e..560ae9ddee44 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -106,6 +106,7 @@ const vEntryInfo[] =
     { Group_General, IDS_CB(unvisitedlinks) },
     { Group_General, IDS_CB(visitedlinks) },
     { Group_General, IDS(autospellcheck) },
+    { Group_General, IDS(grammarcheck) },
     { Group_General, IDS(smarttags) },
     { Group_General, IDS_CB(shadows) },
 
diff --git a/cui/uiconfig/ui/colorconfigwin.ui 
b/cui/uiconfig/ui/colorconfigwin.ui
index ac54911f78aa..6cc7717101ef 100644
--- a/cui/uiconfig/ui/colorconfigwin.ui
+++ b/cui/uiconfig/ui/colorconfigwin.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 -->
+<!-- Generated with glade 3.40.0 -->
 <interface domain="cui">
   <requires lib="gtk+" version="3.20"/>
   <object class="GtkBox" id="ColorConfigWindow">
@@ -50,7 +50,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -86,7 +85,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -127,7 +125,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -163,7 +160,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -207,7 +203,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -248,7 +243,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -284,7 +278,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -328,7 +321,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -352,7 +344,7 @@
                 <property name="can-focus">False</property>
                 <property name="halign">start</property>
                 <property name="valign">center</property>
-                <property name="label" translatable="yes" 
context="colorconfigwin|autospellcheck">AutoSpellcheck</property>
+                <property name="label" translatable="yes" 
context="colorconfigwin|autospellcheck">Spelling mistakes</property>
                 <property name="use-underline">True</property>
                 <property name="mnemonic-widget">autospellcheck_lb</property>
               </object>
@@ -369,7 +361,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -402,7 +393,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -438,7 +428,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -482,7 +471,7 @@
         <property name="label-xalign">0</property>
         <property name="shadow-type">none</property>
         <child>
-          <!-- n-columns=2 n-rows=8 -->
+          <!-- n-columns=2 n-rows=9 -->
           <object class="GtkGrid">
             <property name="visible">True</property>
             <property name="can-focus">False</property>
@@ -514,7 +503,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -550,7 +538,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -594,7 +581,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -624,7 +610,7 @@
               </object>
               <packing>
                 <property name="left-attach">0</property>
-                <property name="top-attach">3</property>
+                <property name="top-attach">4</property>
               </packing>
             </child>
             <child>
@@ -635,14 +621,13 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
               </object>
               <packing>
                 <property name="left-attach">1</property>
-                <property name="top-attach">3</property>
+                <property name="top-attach">4</property>
               </packing>
             </child>
             <child>
@@ -660,7 +645,7 @@
               </object>
               <packing>
                 <property name="left-attach">0</property>
-                <property name="top-attach">4</property>
+                <property name="top-attach">5</property>
               </packing>
             </child>
             <child>
@@ -671,7 +656,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -686,7 +670,7 @@
               </object>
               <packing>
                 <property name="left-attach">1</property>
-                <property name="top-attach">4</property>
+                <property name="top-attach">5</property>
               </packing>
             </child>
             <child>
@@ -701,7 +685,7 @@
               </object>
               <packing>
                 <property name="left-attach">0</property>
-                <property name="top-attach">5</property>
+                <property name="top-attach">6</property>
               </packing>
             </child>
             <child>
@@ -712,14 +696,13 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
               </object>
               <packing>
                 <property name="left-attach">1</property>
-                <property name="top-attach">5</property>
+                <property name="top-attach">6</property>
               </packing>
             </child>
             <child>
@@ -734,7 +717,7 @@
               </object>
               <packing>
                 <property name="left-attach">0</property>
-                <property name="top-attach">6</property>
+                <property name="top-attach">7</property>
               </packing>
             </child>
             <child>
@@ -745,14 +728,13 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
               </object>
               <packing>
                 <property name="left-attach">1</property>
-                <property name="top-attach">6</property>
+                <property name="top-attach">7</property>
               </packing>
             </child>
             <child>
@@ -767,7 +749,7 @@
               </object>
               <packing>
                 <property name="left-attach">0</property>
-                <property name="top-attach">7</property>
+                <property name="top-attach">8</property>
               </packing>
             </child>
             <child>
@@ -778,14 +760,45 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
               </object>
               <packing>
                 <property name="left-attach">1</property>
-                <property name="top-attach">7</property>
+                <property name="top-attach">8</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="grammarcheck">
+                <property name="visible">True</property>
+                <property name="can-focus">False</property>
+                <property name="halign">start</property>
+                <property name="valign">center</property>
+                <property name="label" translatable="yes" 
context="colorconfigwin|autospellcheck">Grammar mistakes</property>
+                <property name="use-underline">True</property>
+                <property name="mnemonic-widget">grammarcheck_lb</property>
+              </object>
+              <packing>
+                <property name="left-attach">0</property>
+                <property name="top-attach">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkMenuButton" id="grammarcheck_lb">
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="halign">end</property>
+                <property name="xalign">0</property>
+                <property name="draw-indicator">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="left-attach">1</property>
+                <property name="top-attach">3</property>
               </packing>
             </child>
           </object>
@@ -846,7 +859,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -879,7 +891,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -912,7 +923,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -945,7 +955,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -978,7 +987,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -996,7 +1004,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1029,7 +1036,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1062,7 +1068,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1095,7 +1100,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1128,7 +1132,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1161,7 +1164,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1194,7 +1196,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1245,7 +1246,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1306,7 +1306,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1374,7 +1373,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1407,7 +1405,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1440,7 +1437,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1473,7 +1469,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1506,7 +1501,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1539,7 +1533,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1572,7 +1565,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1640,7 +1632,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1673,7 +1664,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1706,7 +1696,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1739,7 +1728,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1772,7 +1760,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1805,7 +1792,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1838,7 +1824,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1906,7 +1891,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1954,7 +1938,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1987,7 +1970,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -2020,7 +2002,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
diff --git a/include/svtools/colorcfg.hxx b/include/svtools/colorcfg.hxx
index 562d4a3e4670..300625cf14a7 100644
--- a/include/svtools/colorcfg.hxx
+++ b/include/svtools/colorcfg.hxx
@@ -38,6 +38,7 @@ enum ColorConfigEntry
     LINKS               ,
     LINKSVISITED        ,
     SPELL         ,
+    GRAMMAR       ,
     SMARTTAGS     ,
     SHADOWCOLOR         ,
     WRITERTEXTGRID      ,
diff --git a/officecfg/registry/data/org/openoffice/Office/UI.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI.xcu
index fa0bdde9216d..f2c763c4d024 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI.xcu
@@ -198,6 +198,11 @@
             <value xsi:nil="true"/>
           </prop>
         </node>
+        <node oor:name="Grammar">
+          <prop oor:name="Color">
+            <value xsi:nil="true"/>
+          </prop>
+        </node>
         <node oor:name="SmartTags">
           <prop oor:name="Color">
             <value xsi:nil="true"/>
@@ -491,6 +496,11 @@
             <value>13181214</value>
           </prop>
         </node>
+        <node oor:name="Grammar">
+          <prop oor:name="Color">
+            <value>7512015</value>
+          </prop>
+        </node>
         <node oor:name="SmartTags">
           <prop oor:name="Color">
             <value>7865203</value>
diff --git a/officecfg/registry/schema/org/openoffice/Office/UI.xcs 
b/officecfg/registry/schema/org/openoffice/Office/UI.xcs
index aa4fdcec54a0..9afbbc4116d0 100644
--- a/officecfg/registry/schema/org/openoffice/Office/UI.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/UI.xcs
@@ -160,6 +160,16 @@
           </info>
         </prop>
       </group>
+      <group oor:name="Grammar">
+        <info>
+          <desc>Specifies the settings for incorrect grammar found with 
spellchecking.</desc>
+        </info>
+        <prop oor:name="Color" oor:type="xs:int">
+          <info>
+            <desc>Specifies the color of incorrect grammar found with 
AutoSpellcheck.</desc>
+          </info>
+        </prop>
+      </group>
       <group oor:name="SmartTags">
         <info>
           <desc>Specifies the settings for smart tags.</desc>
diff --git a/svtools/source/config/colorcfg.cxx 
b/svtools/source/config/colorcfg.cxx
index b29c7e4b3562..ad3170b430ab 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -117,6 +117,7 @@ uno::Sequence< OUString> 
GetPropertyNames(std::u16string_view rScheme)
         { std::u16string_view(u"/Links")           ,true },
         { std::u16string_view(u"/LinksVisited")    ,true },
         { std::u16string_view(u"/Spell")     ,false },
+        { std::u16string_view(u"/Grammar")     ,false },
         { std::u16string_view(u"/SmartTags")     ,false },
         { std::u16string_view(u"/Shadow")        , true },
         { std::u16string_view(u"/WriterTextGrid")  ,false },
@@ -372,6 +373,7 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry eEntry)
         COL_BLUE, // LINKS
         Color(0x0000cc), // LINKSVISITED
         COL_LIGHTRED, // SPELL
+        COL_LIGHTBLUE, // GRAMMAR
         COL_LIGHTMAGENTA, // SMARTTAGS
         COL_GRAY, // SHADOWCOLOR
         COL_LIGHTGRAY, // WRITERTEXTGRID
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 7f65859c341d..c399aa6b94dd 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -207,6 +207,7 @@ class SW_DLLPUBLIC SwViewOption
     static Color    s_aDirectCursorColor;
     static Color    s_aTextGridColor;
     static Color    s_aSpellColor;     // mark color of online spell checking
+    static Color    s_aGrammarColor;
     static Color    s_aSmarttagColor;
     static Color    s_aFieldShadingsColor;
     static Color    s_aSectionBoundColor;
@@ -759,6 +760,7 @@ public:
     static Color&   GetDirectCursorColor();
     static Color&   GetTextGridColor();
     static Color&   GetSpellColor();
+    static Color&   GetGrammarColor();
     static Color&   GetSmarttagColor();
     static Color&   GetShadowColor();
     static Color&   GetFontColor();
diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx
index 805bb859f23d..b93c6a961158 100644
--- a/sw/source/core/inc/wrong.hxx
+++ b/sw/source/core/inc/wrong.hxx
@@ -109,7 +109,7 @@ private:
         {
         }
 
-        return COL_LIGHTBLUE;
+        return SwViewOption::GetGrammarColor();
     }
 
     static WrongAreaLineType getGrammarLineType( css::uno::Reference< 
css::container::XStringKeyMap > const & xPropertyBag )
diff --git a/sw/source/uibase/config/viewopt.cxx 
b/sw/source/uibase/config/viewopt.cxx
index 54bbe0636274..8b272a09d1fc 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -51,6 +51,7 @@ Color SwViewOption::s_aVisitedLinksColor(COL_RED);
 Color SwViewOption::s_aDirectCursorColor(COL_BLUE);
 Color SwViewOption::s_aTextGridColor(COL_LIGHTGRAY);
 Color SwViewOption::s_aSpellColor(COL_LIGHTRED);
+Color SwViewOption::s_aGrammarColor(COL_LIGHTBLUE);
 Color SwViewOption::s_aSmarttagColor(COL_LIGHTMAGENTA);
 Color SwViewOption::s_aFontColor(COL_BLACK);
 Color SwViewOption::s_aFieldShadingsColor(COL_LIGHTGRAY);
@@ -420,6 +421,11 @@ Color&   SwViewOption::GetSpellColor()
     return s_aSpellColor;
 }
 
+Color&   SwViewOption::GetGrammarColor()
+{
+    return s_aGrammarColor;
+}
+
 Color&   SwViewOption::GetSmarttagColor()
 {
     return s_aSmarttagColor;
@@ -502,6 +508,7 @@ void SwViewOption::ApplyColorConfigValues(const 
svtools::ColorConfig& rConfig )
     s_aTextGridColor = rConfig.GetColorValue(svtools::WRITERTEXTGRID).nColor;
 
     s_aSpellColor = rConfig.GetColorValue(svtools::SPELL).nColor;
+    s_aGrammarColor = rConfig.GetColorValue(svtools::GRAMMAR).nColor;
 
     s_aSmarttagColor = rConfig.GetColorValue(svtools::SMARTTAGS).nColor;
 

Reply via email to