diff options
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu | 96 | ||||
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/UI/ToolbarMode.xcs | 5 | ||||
-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 | ||||
-rw-r--r-- | sfx2/source/notebookbar/SfxNotebookBar.cxx | 10 |
10 files changed, 173 insertions, 3 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu b/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu index 64959d508520..adf337557450 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu @@ -10,6 +10,9 @@ <prop oor:name="ActiveImpress"> <value>notebookbar.ui</value> </prop> + <prop oor:name="ActiveDraw"> + <value>notebookbar.ui</value> + </prop> <node oor:name="Applications"> <node oor:name="Writer" oor:op="replace"> <prop oor:name="Active"> @@ -679,6 +682,99 @@ <value>Arrow</value> </prop> </node> + <node oor:name="Tabbed" oor:op="replace"> + <prop oor:name="Label"> + <value xml:lang="en-US">Tabbed</value> + </prop> + <prop oor:name="HasNotebookbar"> + <value>true</value> + </prop> + <prop oor:name="IsExperimental"> + <value>true</value> + </prop> + <prop oor:name="MenuPosition"> + <value>1</value> + </prop> + <prop oor:name="CommandArg"> + <value>notebookbar.ui</value> + </prop> + <prop oor:name="Toolbars"> + <value> + </value> + </prop> + <prop oor:name="UserToolbars"> + <value> + </value> + </prop> + <prop oor:name="Sidebar"> + <value>Arrow</value> + </prop> + <prop oor:name="HasMenubar"> + <value>true</value> + </prop> + </node> + <node oor:name="GroupedbarCompact" oor:op="replace"> + <prop oor:name="Label"> + <value xml:lang="en-US">Groupedbar Compact</value> + </prop> + <prop oor:name="HasNotebookbar"> + <value>true</value> + </prop> + <prop oor:name="IsExperimental"> + <value>true</value> + </prop> + <prop oor:name="MenuPosition"> + <value>8</value> + </prop> + <prop oor:name="CommandArg"> + <value>notebookbar_groupedbar_compact.ui</value> + </prop> + <prop oor:name="Toolbars"> + <value> + </value> + </prop> + <prop oor:name="UserToolbars"> + <value> + </value> + </prop> + <prop oor:name="Sidebar"> + <value>Arrow</value> + </prop> + <prop oor:name="HasMenubar"> + <value>true</value> + </prop> + </node> + <node oor:name="GroupedbarFull" oor:op="replace"> + <prop oor:name="Label"> + <value xml:lang="en-US">Groupedbar</value> + </prop> + <prop oor:name="HasNotebookbar"> + <value>true</value> + </prop> + <prop oor:name="IsExperimental"> + <value>true</value> + </prop> + <prop oor:name="MenuPosition"> + <value>7</value> + </prop> + <prop oor:name="CommandArg"> + <value>notebookbar_groupedbar_full.ui</value> + </prop> + <prop oor:name="Toolbars"> + <value> + </value> + </prop> + <prop oor:name="UserToolbars"> + <value> + </value> + </prop> + <prop oor:name="Sidebar"> + <value>Arrow</value> + </prop> + <prop oor:name="HasMenubar"> + <value>true</value> + </prop> + </node> </node> </node> <node oor:name="Formula" oor:op="replace"> diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/ToolbarMode.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/ToolbarMode.xcs index d641e80afb5e..f97ec55e2dc8 100644 --- a/officecfg/registry/schema/org/openoffice/Office/UI/ToolbarMode.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/UI/ToolbarMode.xcs @@ -113,6 +113,11 @@ <desc>Contains name of currently used implementation in the Impress module.</desc> </info> </prop> + <prop oor:name="ActiveDraw" oor:type="xs:string" oor:nillable="false"> + <info> + <desc>Contains name of currently used implementation in the Draw module.</desc> + </info> + </prop> <set oor:name="Applications" oor:node-type="Application"> <info> <desc>Contains list of toolbar mode settings for each application.</desc> 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> + diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index 2d3093205eaa..3289638bcdef 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -68,6 +68,9 @@ static OUString lcl_getAppName( vcl::EnumContext::Application eApp ) case vcl::EnumContext::Application::Impress: return OUString( "Impress" ); break; + case vcl::EnumContext::Application::Draw: + return OUString( "Draw" ); + break; default: return OUString(); break; @@ -89,6 +92,9 @@ static void lcl_setNotebookbarFileName( vcl::EnumContext::Application eApp, cons case vcl::EnumContext::Application::Impress: officecfg::Office::UI::ToolbarMode::ActiveImpress::set( sFileName, aBatch ); break; + case vcl::EnumContext::Application::Draw: + officecfg::Office::UI::ToolbarMode::ActiveDraw::set( sFileName, aBatch ); + break; default: break; } @@ -108,6 +114,10 @@ static OUString lcl_getNotebookbarFileName( vcl::EnumContext::Application eApp ) case vcl::EnumContext::Application::Impress: return officecfg::Office::UI::ToolbarMode::ActiveImpress::get(); break; + case vcl::EnumContext::Application::Draw: + return officecfg::Office::UI::ToolbarMode::ActiveDraw::get(); + break; + default: break; } |