diff options
author | Kshitij Pathania <kshitijpathania@gmail.com> | 2018-05-18 19:50:01 +0530 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2018-05-21 20:58:18 +0200 |
commit | 24d43f21e92c0db040f549a226c0889db20621ac (patch) | |
tree | 6eb927497ca5dd05689cd8bdd1d28314a6dc116c /sd/source | |
parent | 82e9d2e68fcb2f66b78501f3613386ac1e36aae7 (diff) |
Activated notebookbar in draw
Added tabbed and two groupedbars mode of notebookbar.
Change-Id: I208a365139ca6c83510a73a8ffa0260b05787793
Reviewed-on: https://gerrit.libreoffice.org/54547
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sd/source')
-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 ) ); } } |