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 | |
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')
-rw-r--r-- | sd/UIConfig_sdraw.mk | 4 | ||||
-rw-r--r-- | sd/sdi/_docsh.sdi | 5 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshell.cxx | 15 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/popupmenu/notebookbar.xml | 23 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/ui/notebookbar.ui | 6 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui | 6 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/ui/notebookbar_groupedbar_full.ui | 6 |
7 files changed, 62 insertions, 3 deletions
diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk index 0091db50ddd8..a172013a70dd 100644 --- a/sd/UIConfig_sdraw.mk +++ b/sd/UIConfig_sdraw.mk @@ -32,6 +32,7 @@ $(eval $(call gb_UIConfig_add_popupmenufiles,modules/sdraw,\ sd/uiconfig/sdraw/popupmenu/measure \ sd/uiconfig/sdraw/popupmenu/media \ sd/uiconfig/sdraw/popupmenu/multiselect \ + sd/uiconfig/sdraw/popupmenu/notebookbar \ sd/uiconfig/sdraw/popupmenu/oleobject \ sd/uiconfig/sdraw/popupmenu/outlinetext \ sd/uiconfig/sdraw/popupmenu/pagepanemaster \ @@ -111,6 +112,9 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\ sd/uiconfig/sdraw/ui/insertlayer \ sd/uiconfig/sdraw/ui/insertslidesdialog \ sd/uiconfig/sdraw/ui/namedesign \ + sd/uiconfig/sdraw/ui/notebookbar \ + sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact \ + sd/uiconfig/sdraw/ui/notebookbar_groupedbar_full \ sd/uiconfig/sdraw/ui/paranumberingtab \ sd/uiconfig/sdraw/ui/queryunlinkimagedialog \ sd/uiconfig/sdraw/ui/vectorize \ diff --git a/sd/sdi/_docsh.sdi b/sd/sdi/_docsh.sdi index ce225b38d922..29db81db02d2 100644 --- a/sd/sdi/_docsh.sdi +++ b/sd/sdi/_docsh.sdi @@ -72,5 +72,10 @@ interface DrawDocument ExecMethod = Execute; StateMethod = GetState; ] + SID_NOTEBOOKBAR + [ + ExecMethod = Execute; + StateMethod = GetState; + ] } 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 ) ); } } diff --git a/sd/uiconfig/sdraw/popupmenu/notebookbar.xml b/sd/uiconfig/sdraw/popupmenu/notebookbar.xml new file mode 100644 index 000000000000..31952654b196 --- /dev/null +++ b/sd/uiconfig/sdraw/popupmenu/notebookbar.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * +--> +<menu:menupopup xmlns:menu="http://openoffice.org/2001/menu"> + <menu:menuitem menu:id=".uno:AddDirect"/> + <menu:menuitem menu:id=".uno:RecentFileList"/> + <menu:menuitem menu:id=".uno:CloseDoc"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:ToolbarMode"/> + <menu:menuitem menu:id=".uno:AvailableToolbars"/> + <menu:menuitem menu:id=".uno:OptionsTreeDialog"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:HelpIndex"/> + <menu:menuitem menu:id=".uno:Donation"/> + <menu:menuitem menu:id=".uno:About"/> + <menu:menuseparator/> +</menu:menupopup> diff --git a/sd/uiconfig/sdraw/ui/notebookbar.ui b/sd/uiconfig/sdraw/ui/notebookbar.ui new file mode 100644 index 000000000000..8b77ec3bf8ae --- /dev/null +++ b/sd/uiconfig/sdraw/ui/notebookbar.ui @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.18.3 --> +<interface domain="sd"> + <requires lib="gtk+" version="3.12"/> +</interface> + diff --git a/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui b/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui new file mode 100644 index 000000000000..8b77ec3bf8ae --- /dev/null +++ b/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.18.3 --> +<interface domain="sd"> + <requires lib="gtk+" version="3.12"/> +</interface> + diff --git a/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_full.ui b/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_full.ui new file mode 100644 index 000000000000..8b77ec3bf8ae --- /dev/null +++ b/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_full.ui @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.18.3 --> +<interface domain="sd"> + <requires lib="gtk+" version="3.12"/> +</interface> + |