summaryrefslogtreecommitdiff
path: root/sc/source/ui/optdlg
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2023-03-29 15:12:58 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2023-04-04 10:53:56 +0200
commit2039fd382af9d110bd68be8629ab757b3617926a (patch)
treebec3207a15f0b36b52dfdbf10a2f81e98b118130 /sc/source/ui/optdlg
parentf4a0b43d729fff169a2152a04aaa1369a4d4f9d6 (diff)
Resolves tdf#154446 - Remove redundant option for grid line color
Change-Id: I41d39b763e651f90660f2a451ed0a9b473ead206 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149715 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sc/source/ui/optdlg')
-rw-r--r--sc/source/ui/optdlg/tpview.cxx34
1 files changed, 0 insertions, 34 deletions
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 926436864e79..f83ce9f033a5 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -30,15 +30,11 @@
#include <appoptio.hxx>
#include <scmod.hxx>
#include <svl/eitem.hxx>
-#include <svx/colorbox.hxx>
#include <svtools/unitconv.hxx>
ScTpContentOptions::ScTpContentOptions(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rArgSet)
: SfxTabPage(pPage, pController, "modules/scalc/ui/tpviewpage.ui", "TpViewPage", &rArgSet)
, m_xGridLB(m_xBuilder->weld_combo_box("grid"))
- , m_xColorFT(m_xBuilder->weld_label("color_label"))
- , m_xColorLB(new ColorListBox(m_xBuilder->weld_menu_button("color"),
- [this]{ return GetDialogController()->getDialog(); }))
, m_xBreakCB(m_xBuilder->weld_check_button("break"))
, m_xGuideLineCB(m_xBuilder->weld_check_button("guideline"))
, m_xFormulaCB(m_xBuilder->weld_check_button("formula"))
@@ -88,14 +84,10 @@ ScTpContentOptions::ScTpContentOptions(weld::Container* pPage, weld::DialogContr
m_xRowColHeaderCB->connect_toggled(aCBHdl);
m_xSummaryCB->connect_toggled(aCBHdl);
m_xThemedCursorRB->connect_toggled(aCBHdl);
-
- m_xColorLB->SetSlotId(SID_ATTR_CHAR_COLOR);
- m_xColorLB->SetAutoDisplayColor(SC_STD_GRIDCOLOR);
}
ScTpContentOptions::~ScTpContentOptions()
{
- m_xColorLB.reset();
}
std::unique_ptr<SfxTabPage> ScTpContentOptions::Create( weld::Container* pPage, weld::DialogController* pController,
@@ -123,19 +115,11 @@ bool ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet )
m_xVScrollCB->get_state_changed_from_saved() ||
m_xTblRegCB->get_state_changed_from_saved() ||
m_xOutlineCB->get_state_changed_from_saved() ||
- m_xColorLB->IsValueChangedFromSaved() ||
m_xBreakCB->get_state_changed_from_saved() ||
m_xSummaryCB->get_state_changed_from_saved() ||
m_xThemedCursorRB->get_state_changed_from_saved() ||
m_xGuideLineCB->get_state_changed_from_saved())
{
- NamedColor aNamedColor = m_xColorLB->GetSelectedEntry();
- if (aNamedColor.first == COL_AUTO)
- {
- aNamedColor.first = SC_STD_GRIDCOLOR;
- aNamedColor.second.clear();
- }
- m_xLocalOptions->SetGridColor(aNamedColor.first, aNamedColor.second);
rCoreSet->Put(ScTpViewItem(*m_xLocalOptions));
bRet = true;
}
@@ -211,7 +195,6 @@ void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet )
m_xTblRegCB->save_state();
m_xOutlineCB->save_state();
m_xGridLB->save_value();
- m_xColorLB->SaveValue();
m_xBreakCB->save_state();
m_xGuideLineCB->save_state();
m_xSummaryCB->save_state();
@@ -278,30 +261,15 @@ void ScTpContentOptions::InitGridOpt()
if ( bGrid || bGridOnTop )
{
- m_xColorFT->set_sensitive(true);
- m_xColorLB->set_sensitive(true);
if ( !bGridOnTop )
nSelPos = 0;
else
nSelPos = 1;
}
else
- {
- m_xColorFT->set_sensitive(false);
- m_xColorLB->set_sensitive(false);
nSelPos = 2;
- }
m_xGridLB->set_active (nSelPos);
-
- // select grid color entry
- OUString aName;
- Color aCol = m_xLocalOptions->GetGridColor( &aName );
-
- if (aName.trim().isEmpty() && aCol == SC_STD_GRIDCOLOR)
- aCol = COL_AUTO;
-
- m_xColorLB->SelectEntry(std::make_pair(aCol, aName));
}
IMPL_LINK( ScTpContentOptions, GridHdl, weld::ComboBox&, rLb, void )
@@ -310,8 +278,6 @@ IMPL_LINK( ScTpContentOptions, GridHdl, weld::ComboBox&, rLb, void )
bool bGrid = ( nSelPos <= 1 );
bool bGridOnTop = ( nSelPos == 1 );
- m_xColorFT->set_sensitive(bGrid);
- m_xColorLB->set_sensitive(bGrid);
m_xLocalOptions->SetOption( VOPT_GRID, bGrid );
m_xLocalOptions->SetOption( VOPT_GRID_ONTOP, bGridOnTop );
}