diff options
author | Sahil <me.sahilgautam@gmail.com> | 2023-12-09 22:03:33 +0530 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-12-12 22:18:05 +0100 |
commit | d981ee6256a905eb8a45557869288a06eb5ae0fc (patch) | |
tree | b77375f7e2eb6433ebbb8c33770ceb77d5664100 /sc/source/ui | |
parent | 189d827b996438ae92ec85ba63a6ccc8da2b54b0 (diff) |
tdf#33201 Add UNO command for Column/Row Highlighting
* Add uno command
* Add menubar Entry [x] Column/Row Highlighting under View
Change-Id: I86cb0034d5bd7d64bd6bfd64cf6e20507d14e5fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159364
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/view/tabvwsh3.cxx | 13 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsha.cxx | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 60754c58baff..208748b7110f 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -56,6 +56,7 @@ #include <comphelper/string.hxx> #include <sfx2/lokhelper.hxx> #include <scabstdlg.hxx> +#include <officecfg/Office/Calc.hxx> #include <basegfx/utils/zoomtools.hxx> @@ -696,6 +697,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) rReq.Done(); } break; + case FID_TOGGLECOLROWHIGHLIGHTING: + { + bool bNewVal = !officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::get(); + + auto pChange(comphelper::ConfigurationChanges::create()); + officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::set(bNewVal, pChange); + pChange->commit(); + + rReq.AppendItem(SfxBoolItem(nSlot, bNewVal)); + rReq.Done(); + } + break; case FID_TOGGLEHEADERS: { bool bSet = !GetViewData().IsHeaderMode(); diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 84a3acbcdf44..c332c9542a66 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -18,6 +18,7 @@ */ #include <com/sun/star/table/BorderLineStyle.hpp> +#include <officecfg/Office/Calc.hxx> #include <comphelper/lok.hxx> #include <editeng/boxitem.hxx> @@ -378,6 +379,12 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) rSet.Put(SfxBoolItem(nWhich, GetViewData().IsSyntaxMode())); break; + case FID_TOGGLECOLROWHIGHLIGHTING: + rSet.Put(SfxBoolItem( + nWhich, + officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::get())); + break; + case FID_TOGGLEHEADERS: rSet.Put(SfxBoolItem(nWhich, GetViewData().IsHeaderMode())); break; |