summaryrefslogtreecommitdiff
path: root/sw/source/uibase/config
diff options
context:
space:
mode:
authorRafael Lima <rafael.palma.lima@gmail.com>2022-11-04 20:31:22 +0200
committerRafael Lima <rafael.palma.lima@gmail.com>2022-11-17 19:17:58 +0100
commit0aa61812a87ac466bea4b35cba75a4e986be8c7f (patch)
tree7b3c0d9fd0f5e6a4ea69b3d7805d1b1a222ca21d /sw/source/uibase/config
parent50582d73c61165f17c38ce28f216739a3a34664b (diff)
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.tietze@documentfoundation.org> Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
Diffstat (limited to 'sw/source/uibase/config')
-rw-r--r--sw/source/uibase/config/viewopt.cxx7
1 files changed, 7 insertions, 0 deletions
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;