diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2023-08-20 12:53:31 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2023-08-28 18:10:07 +0200 |
commit | 3ecb8fb4c901600699f278f61dcac2408f7057a0 (patch) | |
tree | 03b171830042c3576833b1be835b9c98b6378df5 /sd | |
parent | 43fe1db03512bccd0c36b7037172378c8965fda0 (diff) |
sd: disable ThemeDialog when not in a master page
Change-Id: Ic6ea74c877415f337d81d92bdef869c5fb61d239
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156122
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit a535bacb2adeb491e919992a38e891945ca248f0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156173
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ash@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviewsf.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index e74fe71dd45e..e25ebed52dd3 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -37,12 +37,13 @@ #include <svx/xdef.hxx> #include <svx/svdoutl.hxx> #include <svx/svdouno.hxx> +#include <svx/svdpagv.hxx> #include <svx/fmshell.hxx> #include <svl/cjkoptions.hxx> - #include <app.hrc> #include <sdmod.hxx> +#include <sdpage.hxx> #include <stlsheet.hxx> #include <drawview.hxx> #include <drawdoc.hxx> @@ -468,6 +469,21 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) } break; + case SID_THEME_DIALOG: + { + bool bDisable = true; + SdrPageView* pPageView = mpDrawView->GetSdrPageView(); + if (pPageView) + { + SdPage* pPage = dynamic_cast<SdPage*>(pPageView->GetPage()); + if (pPage && pPage->IsMasterPage()) + bDisable = false; + } + if (bDisable) + rSet.DisableItem(nWhich); + } + break; + case SID_STYLE_FAMILY2: case SID_STYLE_FAMILY3: case SID_STYLE_FAMILY5: |