[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sc/inc sc/source
Maxim Monastirsky
momonasmon at gmail.com
Mon Jun 25 13:49:10 UTC 2018
sc/inc/globstr.hrc | 1 -
sc/source/core/tool/viewopti.cxx | 1 -
sc/source/ui/optdlg/tpview.cxx | 9 ++++++++-
3 files changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 56a68f70ec8ddf8a452732e51828f877ed49999c
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Sun Jun 24 01:15:41 2018 +0300
tdf#118296 Grid line color cannot be reverted
Use same approach as in Tools > Options... > LibreOffice >
Application Colors.
Change-Id: I5061709222cde2591e2937cdd67bbb5b6ad7f3f8
Reviewed-on: https://gerrit.libreoffice.org/56344
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <tietze.heiko at gmail.com>
Tested-by: Heiko Tietze <tietze.heiko at gmail.com>
(cherry picked from commit 364c828e6ea9e78a145a4ec32a677c7539a913a9)
Reviewed-on: https://gerrit.libreoffice.org/56383
Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index d33be62479dd..326c9f01c455 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -239,7 +239,6 @@
#define STR_LONG_ERR_NO_CONV NC_("STR_LONG_ERR_NO_CONV", "Error: Calculation does not converge")
/* END error constants and error strings. */
-#define STR_GRIDCOLOR NC_("STR_GRIDCOLOR", "Grid color")
#define STR_CELL_FILTER NC_("STR_CELL_FILTER", "Filter")
#define STR_TARGETNOTFOUND NC_("STR_TARGETNOTFOUND", "The target database range does not exist.")
#define STR_INVALID_EPS NC_("STR_INVALID_EPS", "Invalid increment")
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 920e05f1e874..909dd81db896 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -130,7 +130,6 @@ void ScViewOptions::SetDefaults()
aModeArr[VOBJ_TYPE_DRAW ] = VOBJ_MODE_SHOW;
aGridCol = SC_STD_GRIDCOLOR;
- aGridColName = ScResId( STR_GRIDCOLOR );
aGridOpt.SetDefaults();
}
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 4c533b7099ab..94d6f9b07a0e 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -92,6 +92,8 @@ ScTpContentOptions::ScTpContentOptions( vcl::Window* pParent,
pGuideLineCB->SetClickHdl(aCBHdl);
pRowColHeaderCB->SetClickHdl(aCBHdl);
+ pColorLB->SetSlotId(SID_ATTR_CHAR_COLOR);
+ pColorLB->SetAutoDisplayColor(SC_STD_GRIDCOLOR);
}
ScTpContentOptions::~ScTpContentOptions()
@@ -155,6 +157,11 @@ bool ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet )
pGuideLineCB ->IsValueChangedFromSaved())
{
NamedColor aNamedColor = pColorLB->GetSelectedEntry();
+ if (aNamedColor.first == COL_AUTO)
+ {
+ aNamedColor.first = SC_STD_GRIDCOLOR;
+ aNamedColor.second.clear();
+ }
pLocalOptions->SetGridColor(aNamedColor.first, aNamedColor.second);
rCoreSet->Put(ScTpViewItem(*pLocalOptions));
bRet = true;
@@ -310,7 +317,7 @@ void ScTpContentOptions::InitGridOpt()
Color aCol = pLocalOptions->GetGridColor( &aName );
if (aName.trim().isEmpty() && aCol == SC_STD_GRIDCOLOR)
- aName = ScResId(STR_GRIDCOLOR);
+ aCol = COL_AUTO;
pColorLB->SelectEntry(std::make_pair(aCol, aName));
}
More information about the Libreoffice-commits
mailing list