diff options
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/docshell/docshell.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index 978660c183cf..4a9d7cfe9323 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -20,11 +20,10 @@ #include <DrawDocShell.hxx> #include <officecfg/Office/Common.hxx> - +#include <unotools/moduleoptions.hxx> #include <unotools/configmgr.hxx> #include <vcl/svapp.hxx> - #include <sfx2/docfac.hxx> #include <sfx2/objface.hxx> #include <sfx2/request.hxx> @@ -314,8 +313,18 @@ void DrawDocShell::GetState(SfxItemSet &rSet) { if (mpViewShell) { - bool bVisible = sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(), + bool bImpress = mpDoc->GetDocumentType() == DocumentType::Impress; + bool bVisible = false; + if(bImpress) + { + bVisible = sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(), "modules/simpress/ui/"); + } + else + { + bVisible = sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(), + "modules/sdraw/ui/"); + } rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) ); } } |