diff options
author | Sahil Gautam <sahil@libreoffice.org> | 2024-04-17 18:12:18 +0530 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2024-04-22 13:29:53 +0200 |
commit | 1cfc2e2c92e1259341ee18cf87be63c4dcebd33d (patch) | |
tree | bd8cd5f54e95bebe2740eb6de40681d149c93ee8 /sc/source/ui/optdlg | |
parent | 44f48621a600b4b013115e2671c657725b77883c (diff) |
tdf#63374 Change cell background color when in edit mode
Set the edit cell background (EditView) color to CALCCELLFOCUS
and allow enabling/disabling via a checkbox
tools > options > Calc > View > Edit cell background highlighting
Change-Id: I1216dfa0880e1080d23059512e3801d6af3b3c11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165075
Tested-by: Jenkins
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sc/source/ui/optdlg')
-rw-r--r-- | sc/source/ui/optdlg/tpview.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index 779dcdd3a96c..d4d9f6731add 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -54,6 +54,8 @@ ScTpContentOptions::ScTpContentOptions(weld::Container* pPage, weld::DialogContr , m_xValueImg(m_xBuilder->weld_widget("lockvalue")) , m_xColRowHighCB(m_xBuilder->weld_check_button("colrowhigh")) , m_xColRowHighImg(m_xBuilder->weld_widget("lockcolrowhigh")) + , m_xEditCellBgHighCB(m_xBuilder->weld_check_button("editcellbg")) + , m_xEditCellBgHighImg(m_xBuilder->weld_widget("lockeditcellbghigh")) , m_xAnchorCB(m_xBuilder->weld_check_button("anchor")) , m_xAnchorImg(m_xBuilder->weld_widget("lockanchor")) , m_xRangeFindCB(m_xBuilder->weld_check_button("rangefind")) @@ -97,6 +99,7 @@ ScTpContentOptions::ScTpContentOptions(weld::Container* pPage, weld::DialogContr m_xFormulaMarkCB->connect_toggled(aCBHdl); m_xValueCB->connect_toggled(aCBHdl); m_xColRowHighCB->connect_toggled(aCBHdl); + m_xEditCellBgHighCB->connect_toggled(aCBHdl); m_xAnchorCB->connect_toggled(aCBHdl); m_xVScrollCB->connect_toggled(aCBHdl); @@ -189,6 +192,13 @@ bool ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet ) pChange->commit(); bRet = true; } + if (m_xEditCellBgHighCB->get_state_changed_from_saved()) + { + auto pChange(comphelper::ConfigurationChanges::create()); + officecfg::Office::Calc::Content::Display::EditCellBackgroundHighlighting::set(m_xEditCellBgHighCB->get_active(), pChange); + pChange->commit(); + bRet = true; + } return bRet; } @@ -205,6 +215,7 @@ void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet ) m_xFormulaMarkCB->set_active(m_xLocalOptions->GetOption(VOPT_FORMULAS_MARKS)); m_xValueCB ->set_active(m_xLocalOptions->GetOption(VOPT_SYNTAX)); m_xColRowHighCB->set_active(officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::get()); + m_xEditCellBgHighCB->set_active(officecfg::Office::Calc::Content::Display::EditCellBackgroundHighlighting::get()); m_xAnchorCB ->set_active(m_xLocalOptions->GetOption(VOPT_ANCHOR)); m_xObjGrfLB ->set_active( static_cast<sal_uInt16>(m_xLocalOptions->GetObjMode(VOBJ_TYPE_OLE)) ); @@ -269,6 +280,10 @@ void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet ) m_xColRowHighCB->set_sensitive(!bReadOnly); m_xColRowHighImg->set_visible(bReadOnly); + bReadOnly = officecfg::Office::Calc::Content::Display::EditCellBackgroundHighlighting::isReadOnly(); + m_xEditCellBgHighCB->set_sensitive(!bReadOnly); + m_xEditCellBgHighImg->set_visible(bReadOnly); + bReadOnly = officecfg::Office::Calc::Content::Display::Anchor::isReadOnly(); m_xAnchorCB->set_sensitive(!bReadOnly); m_xAnchorImg->set_visible(bReadOnly); @@ -331,6 +346,7 @@ void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet ) m_xFormulaMarkCB->save_state(); m_xValueCB->save_state(); m_xColRowHighCB->save_state(); + m_xEditCellBgHighCB->save_state(); m_xAnchorCB->save_state(); m_xObjGrfLB->save_value(); m_xDiagramLB->save_value(); |