summaryrefslogtreecommitdiff
path: root/sc/source/ui
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
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')
-rw-r--r--sc/source/ui/inc/tpview.hxx2
-rw-r--r--sc/source/ui/optdlg/tpview.cxx34
-rw-r--r--sc/source/ui/view/viewdata.cxx17
3 files changed, 0 insertions, 53 deletions
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index 7be90de5aceb..ad485b361580 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -29,8 +29,6 @@ class ScTpContentOptions : public SfxTabPage
std::unique_ptr<ScViewOptions> m_xLocalOptions;
std::unique_ptr<weld::ComboBox> m_xGridLB;
- std::unique_ptr<weld::Label> m_xColorFT;
- std::unique_ptr<ColorListBox> m_xColorLB;
std::unique_ptr<weld::CheckButton> m_xBreakCB;
std::unique_ptr<weld::CheckButton> m_xGuideLineCB;
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 );
}
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index e236256ce35d..936eb34d4805 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -3514,12 +3514,6 @@ void ScViewData::WriteExtOptions( ScExtDocOptions& rDocOpt ) const
const ScMarkData& rMarkData = GetMarkData();
rTabSett.mbSelected = rMarkData.GetTableSelect( nTab );
rMarkData.FillRangeListWithMarks( &rTabSett.maSelection, true );
-
- // grid color
- rTabSett.maGridColor = COL_AUTO;
- const Color& rGridColor = maOptions.GetGridColor();
- if (rGridColor != SC_STD_GRIDCOLOR)
- rTabSett.maGridColor = rGridColor;
rTabSett.mbShowGrid = pViewTab->bShowGrid;
// view mode and zoom
@@ -3674,12 +3668,6 @@ void ScViewData::ReadExtOptions( const ScExtDocOptions& rDocOpt )
// get some settings from displayed Excel sheet, set at Calc document
if( nTab == GetTabNo() )
{
- // grid color -- #i47435# set automatic grid color explicitly
- Color aGridColor(rTabSett.maGridColor);
- if (aGridColor == COL_AUTO)
- aGridColor = SC_STD_GRIDCOLOR;
- maOptions.SetGridColor(aGridColor, OUString());
-
// view mode and default zoom (for new sheets) from current sheet
if( rTabSett.mnNormalZoom )
aDefZoomX = aDefZoomY = Fraction( rTabSett.mnNormalZoom, 100L );
@@ -3911,12 +3899,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
{
Color aColor;
if (rSetting.Value >>= aColor)
- {
- // #i47435# set automatic grid color explicitly
- if( aColor == COL_AUTO )
- aColor = SC_STD_GRIDCOLOR;
maOptions.SetGridColor(aColor, OUString());
- }
}
else if ( sName == SC_UNO_SHOWPAGEBR )
maOptions.SetOption(VOPT_PAGEBREAKS, ScUnoHelpFunctions::GetBoolFromAny(rSetting.Value));