From 24d43f21e92c0db040f549a226c0889db20621ac Mon Sep 17 00:00:00 2001 From: Kshitij Pathania Date: Fri, 18 May 2018 19:50:01 +0530 Subject: Activated notebookbar in draw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added tabbed and two groupedbars mode of notebookbar. Change-Id: I208a365139ca6c83510a73a8ffa0260b05787793 Reviewed-on: https://gerrit.libreoffice.org/54547 Tested-by: Jenkins Reviewed-by: Szymon Kłos --- sd/source/ui/docshell/docshell.cxx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'sd/source/ui') 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 #include - +#include #include #include - #include #include #include @@ -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 ) ); } } -- cgit