summaryrefslogtreecommitdiff
path: root/sc/source/ui/optdlg
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2018-06-24 01:15:41 +0300
committerHeiko Tietze <tietze.heiko@gmail.com>2018-06-25 08:37:36 +0200
commit364c828e6ea9e78a145a4ec32a677c7539a913a9 (patch)
tree7726dffabefd93c28ec775ffdaea91165db1d99a /sc/source/ui/optdlg
parent682cf3242272346ad9955cd050a47554930fa8b6 (diff)
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@gmail.com> Tested-by: Heiko Tietze <tietze.heiko@gmail.com>
Diffstat (limited to 'sc/source/ui/optdlg')
-rw-r--r--sc/source/ui/optdlg/tpview.cxx9
1 files changed, 8 insertions, 1 deletions
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));
}