From 6ebf9cfbf54052d7fae50cdab146cc5c63ba262a Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Tue, 10 May 2016 19:16:47 +0200 Subject: Set different ui file for NotebookBar in each app Changes: + added ui file for start center, calc and impress + NotebookBar not visible in Math, Draw Change-Id: Ie35935e67524ac712930b088591e9e53955de4a1 Reviewed-on: https://gerrit.libreoffice.org/24860 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt --- sd/UIConfig_simpress.mk | 1 + sd/sdi/docshell.sdi | 5 ++ sd/source/ui/docshell/docshel3.cxx | 7 ++ sd/source/ui/docshell/docshell.cxx | 7 ++ sd/uiconfig/simpress/ui/notebookbar.ui | 118 +++++++++++++++++++++++++++++++++ 5 files changed, 138 insertions(+) create mode 100644 sd/uiconfig/simpress/ui/notebookbar.ui (limited to 'sd') diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk index bcb61601c2b3..3e7b3feb3581 100644 --- a/sd/UIConfig_simpress.mk +++ b/sd/UIConfig_simpress.mk @@ -119,6 +119,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\ sd/uiconfig/simpress/ui/interactiondialog \ sd/uiconfig/simpress/ui/interactionpage \ sd/uiconfig/simpress/ui/masterlayoutdlg \ + sd/uiconfig/simpress/ui/notebookbar \ sd/uiconfig/simpress/ui/optimpressgeneralpage \ sd/uiconfig/simpress/ui/photoalbum \ sd/uiconfig/simpress/ui/presentationdialog \ diff --git a/sd/sdi/docshell.sdi b/sd/sdi/docshell.sdi index d2a0011944ca..f5f322177b13 100644 --- a/sd/sdi/docshell.sdi +++ b/sd/sdi/docshell.sdi @@ -18,6 +18,11 @@ interface ImpressDocument : DrawDocument { + SID_NOTEBOOKBAR + [ + ExecMethod = Execute; + StateMethod = GetState; + ] } shell DrawDocShell diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index 69f15c76eb9a..c8fe3f4dd0f3 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include "strings.hrc" #include "glob.hrc" @@ -317,6 +318,12 @@ void DrawDocShell::Execute( SfxRequest& rReq ) } break; + case SID_NOTEBOOKBAR: + { + sfx2::SfxNotebookBar::ExecMethod(mpViewShell->GetFrame()->GetBindings()); + } + break; + default: break; } diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index e91caaac95f6..65dafa0fff21 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -67,6 +67,7 @@ #include "undo/undofactory.hxx" #include "OutlineView.hxx" #include "ViewShellBase.hxx" +#include using namespace sd; #define DrawDocShell @@ -271,6 +272,12 @@ void DrawDocShell::GetState(SfxItemSet &rSet) } break; + case SID_NOTEBOOKBAR: + { + sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(), "modules/simpress/ui/notebookbar.ui"); + } + break; + default: break; } diff --git a/sd/uiconfig/simpress/ui/notebookbar.ui b/sd/uiconfig/simpress/ui/notebookbar.ui new file mode 100644 index 000000000000..f11f6eb0e136 --- /dev/null +++ b/sd/uiconfig/simpress/ui/notebookbar.ui @@ -0,0 +1,118 @@ + + + + + + True + False + + + True + False + vertical + + + True + True + True + True + + + True + False + 6 + + + True + False + vertical + + + True + True + True + .uno:Open + none + 0 + + + False + True + 0 + + + + + True + True + True + .uno:Save + none + 0 + + + False + True + 1 + + + + + False + True + 2 + + + + + + + True + False + File + True + + + False + + + + + True + False + 6 + + + + + + 1 + + + + + True + False + Impress + True + + + 1 + False + + + + + False + True + 0 + + + + + 0 + 0 + + + + -- cgit