diff options
author | Balazs Varga <balazs.varga.extern@allotropia.de> | 2023-11-23 11:39:09 +0100 |
---|---|---|
committer | Balazs Varga <balazs.varga.extern@allotropia.de> | 2023-11-24 14:18:23 +0100 |
commit | b1a866caccb322ec6e88eac67710310160e72b58 (patch) | |
tree | 2015065b35655c45363bca01fa5b36adf092ddf6 /sd/source/ui/dlg/tpoption.cxx | |
parent | afd3517301d28145861aa7725fd5879a6666a881 (diff) |
tdf#158238 - UI: Part 40 - Unify lockdown behavior of Options dialog
for Impress - View Page.
Change-Id: Icc3c4fc9dd3800ef454cbddb06e569e03c08967a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159856
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Diffstat (limited to 'sd/source/ui/dlg/tpoption.cxx')
-rw-r--r-- | sd/source/ui/dlg/tpoption.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index b177c8e94064..fabf76255bd7 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -110,9 +110,13 @@ std::unique_ptr<SfxTabPage> SdTpOptionsSnap::Create( weld::Container* pPage, wel SdTpOptionsContents::SdTpOptionsContents(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) : SfxTabPage(pPage, pController, "modules/simpress/ui/sdviewpage.ui", "SdViewPage", &rInAttrs) , m_xCbxRuler(m_xBuilder->weld_check_button("ruler")) + , m_xCbxRulerImg(m_xBuilder->weld_widget("lockruler")) , m_xCbxDragStripes(m_xBuilder->weld_check_button("dragstripes")) + , m_xCbxDragStripesImg(m_xBuilder->weld_widget("lockdragstripes")) , m_xCbxHandlesBezier(m_xBuilder->weld_check_button("handlesbezier")) + , m_xCbxHandlesBezierImg(m_xBuilder->weld_widget("lockhandlesbezier")) , m_xCbxMoveOutline(m_xBuilder->weld_check_button("moveoutline")) + , m_xCbxMoveOutlineImg(m_xBuilder->weld_widget("lockmoveoutline")) { } @@ -173,6 +177,22 @@ void SdTpOptionsContents::Reset( const SfxItemSet* rAttrs ) m_xCbxDragStripes->set_active( aLayoutItem.GetOptionsLayout().IsDragStripes() ); m_xCbxHandlesBezier->set_active( aLayoutItem.GetOptionsLayout().IsHandlesBezier() ); + bool bReadOnly = officecfg::Office::Impress::Layout::Display::Ruler::isReadOnly(); + m_xCbxRuler->set_sensitive(!bReadOnly); + m_xCbxRulerImg->set_visible(bReadOnly); + + bReadOnly = officecfg::Office::Impress::Layout::Display::Contour::isReadOnly(); + m_xCbxMoveOutline->set_sensitive(!bReadOnly); + m_xCbxMoveOutlineImg->set_visible(bReadOnly); + + bReadOnly = officecfg::Office::Impress::Layout::Display::Guide::isReadOnly(); + m_xCbxDragStripes->set_sensitive(!bReadOnly); + m_xCbxDragStripesImg->set_visible(bReadOnly); + + bReadOnly = officecfg::Office::Impress::Layout::Display::Bezier::isReadOnly(); + m_xCbxHandlesBezier->set_sensitive(!bReadOnly); + m_xCbxHandlesBezierImg->set_visible(bReadOnly); + m_xCbxRuler->save_state(); m_xCbxMoveOutline->save_state(); m_xCbxDragStripes->save_state(); |