summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-08-20 12:53:31 +0200
committerTomaž Vajngerl <quikee@gmail.com>2023-08-26 21:05:00 +0200
commita535bacb2adeb491e919992a38e891945ca248f0 (patch)
tree1c0845909805e701d34bab07a5efb1bf98655ab0 /sd/source/ui
parent6471181b66ebe634e9ffbdc2b55dbf1da17a3acf (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>
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/view/drviewsf.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 08d75842a187..83832f7ba561 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: