Kaydet (Commit) 24d43f21 authored tarafından Kshitij Pathania's avatar Kshitij Pathania Kaydeden (comit) Szymon Kłos

Activated notebookbar in draw

Added tabbed and two groupedbars mode of notebookbar.

Change-Id: I208a365139ca6c83510a73a8ffa0260b05787793
Reviewed-on: https://gerrit.libreoffice.org/54547Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarSzymon Kłos <szymon.klos@collabora.com>
üst 82e9d2e6
......@@ -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">
......
......@@ -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>
......
......@@ -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 \
......
......@@ -72,5 +72,10 @@ interface DrawDocument
ExecMethod = Execute;
StateMethod = GetState;
]
SID_NOTEBOOKBAR
[
ExecMethod = Execute;
StateMethod = GetState;
]
}
......@@ -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 ) );
}
}
......
<?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>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface domain="sd">
<requires lib="gtk+" version="3.12"/>
</interface>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface domain="sd">
<requires lib="gtk+" version="3.12"/>
</interface>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface domain="sd">
<requires lib="gtk+" version="3.12"/>
</interface>
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment