framework/source/layoutmanager/layoutmanager.cxx | 5 include/sfx2/notebookbar/SfxNotebookBar.hxx | 35 include/sfx2/sfxsids.hrc | 1 include/vcl/notebookbar.hxx | 32 include/vcl/syswin.hxx | 8 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 5 sfx2/Library_sfx.mk | 1 sfx2/sdi/sfx.sdi | 18 sfx2/source/notebookbar/SfxNotebookBar.cxx | 46 sw/UIConfig_swriter.mk | 1 sw/sdi/docsh.sdi | 5 sw/source/uibase/app/docsh.cxx | 7 sw/source/uibase/app/docsh2.cxx | 7 sw/source/uibase/app/swmodule.cxx | 1 sw/source/uibase/uiview/view0.cxx | 1 sw/uiconfig/swriter/ui/notebookbar.ui | 759 ++++++++++ vcl/Library_vcl.mk | 2 vcl/UIConfig_vcl.mk | 1 vcl/inc/brdwin.hxx | 7 vcl/source/control/notebookbar.cxx | 79 + vcl/source/window/brdwin.cxx | 19 vcl/source/window/notebookbarwindow.cxx | 69 vcl/source/window/notebookbarwindow.hxx | 32 vcl/source/window/syswin.cxx | 15 vcl/uiconfig/ui/notebookbar.ui | 621 -------- 25 files changed, 1027 insertions(+), 750 deletions(-)
New commits: commit 3abd3e5bef7a6157a70423af1a8c027de917b408 Author: Jan Holesovsky <[email protected]> Date: Wed Mar 30 10:57:45 2016 +0200 notebookbar: More advanced example of the notebookbar. Change-Id: I8c56777b8d200f38cd369944d9e9a67f4d41d393 diff --git a/sw/uiconfig/swriter/ui/notebookbar.ui b/sw/uiconfig/swriter/ui/notebookbar.ui index 51d305a..01b29fb 100644 --- a/sw/uiconfig/swriter/ui/notebookbar.ui +++ b/sw/uiconfig/swriter/ui/notebookbar.ui @@ -185,56 +185,57 @@ <property name="can_focus">False</property> <property name="orientation">vertical</property> <child> - <object class="GtkBox" id="box10"> + <object class="GtkBox" id="box11"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="spacing">6</property> <child> - <object class="smlo-SmFontPickListBox" id="SmFontPickListBox1"> + <object class="sfxlo-SidebarToolBox" id="font"> <property name="visible">True</property> <property name="can_focus">False</property> + <child> + <object class="GtkToolButton" id="fontname"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="is_important">True</property> + <property name="action_name">.uno:CharFontName</property> + </object> + <packing> + <property name="expand">True</property> + <property name="homogeneous">True</property> + </packing> + </child> </object> <packing> - <property name="expand">False</property> + <property name="expand">True</property> <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> - <placeholder/> - </child> - <child> - <object class="GtkButton" id="button-shrink-font"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Shrink</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkButton" id="button-grow-font"> + <object class="sfxlo-SidebarToolBox" id="fontheight"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Grow</property> - <property name="xalign">0.60000002384185791</property> + <property name="can_focus">False</property> + <child> + <object class="GtkToolButton" id="fontsize"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="is_important">True</property> + <property name="action_name">.uno:FontHeight</property> + </object> + <packing> + <property name="expand">True</property> + <property name="homogeneous">True</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">3</property> + <property name="pack_type">end</property> + <property name="position">1</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -243,15 +244,85 @@ </packing> </child> <child> - <object class="GtkBox" id="box11"> + <object class="GtkBox" id="box10"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="spacing">12</property> <child> - <object class="GtkButton" id="button-subscript"> + <object class="sfxlo-SidebarToolBox" id="fonteffects"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:SubScript</property> + <property name="can_focus">False</property> + <property name="show_arrow">False</property> + <child> + <object class="GtkToolButton" id="bold"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="is_important">True</property> + <property name="action_name">.uno:Bold</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkToolButton" id="italic"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="is_important">True</property> + <property name="action_name">.uno:Italic</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkMenuToolButton" id="underline"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="is_important">True</property> + <property name="action_name">.uno:Underline</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkToolButton" id="strikeout"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="is_important">True</property> + <property name="action_name">.uno:Strikeout</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkToolButton" id="shadowed"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="is_important">True</property> + <property name="action_name">.uno:Shadowed</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -260,73 +331,46 @@ </packing> </child> <child> - <object class="GtkButton" id="button-superscript"> + <object class="sfxlo-SidebarToolBox" id="fontadjust"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:SuperScript</property> + <property name="can_focus">False</property> + <property name="show_arrow">False</property> + <child> + <object class="GtkToolButton" id="grow"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="is_important">True</property> + <property name="action_name">.uno:Grow</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkToolButton" id="shrink"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="is_important">True</property> + <property name="action_name">.uno:Shrink</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> + <property name="pack_type">end</property> <property name="position">1</property> </packing> </child> - <child> - <object class="GtkButton" id="button-strikeout"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Strikeout</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkButton" id="button-underline"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Underline</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - <child> - <object class="GtkButton" id="button-italic"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Italic</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">4</property> - </packing> - </child> - <child> - <object class="GtkButton" id="button-bold"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Bold</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">5</property> - </packing> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -359,47 +403,38 @@ <property name="can_focus">False</property> <property name="orientation">vertical</property> <child> - <object class="GtkBox" id="box7"> + <object class="sfxlo-SidebarToolBox" id="numberbullet"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="has_tooltip">True</property> + <property name="tooltip_text" translatable="yes">Bullets and Numbering</property> + <property name="show_arrow">False</property> <child> - <object class="GtkButton" id="button-increment-indent"> + <object class="GtkMenuToolButton" id="bullet"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:IncrementIndent</property> + <property name="can_focus">False</property> + <property name="is_important">True</property> + <property name="action_name">.uno:DefaultBullet</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> + <property name="homogeneous">True</property> </packing> </child> <child> - <object class="GtkButton" id="button-decrement-indent"> + <object class="GtkMenuToolButton" id="number"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:DecrementIndent</property> + <property name="can_focus">False</property> + <property name="is_important">True</property> + <property name="action_name">.uno:DefaultNumbering</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> + <property name="homogeneous">True</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -411,12 +446,63 @@ <object class="GtkBox" id="box8"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="spacing">6</property> <child> - <object class="GtkButton" id="button-left-para"> + <object class="sfxlo-SidebarToolBox" id="horizontalalignment"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:LeftPara</property> + <property name="can_focus">False</property> + <property name="has_tooltip">True</property> + <property name="tooltip_text" translatable="yes">Horizontal Alignment</property> + <property name="halign">start</property> + <property name="show_arrow">False</property> + <child> + <object class="GtkToolButton" id="leftpara"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:LeftPara</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkToolButton" id="centerpara"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:CenterPara</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkToolButton" id="rightpara"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:RightPara</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkToolButton" id="substjustify"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:JustifyPara</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -425,11 +511,36 @@ </packing> </child> <child> - <object class="GtkButton" id="button-center-para"> + <object class="sfxlo-SidebarToolBox" id="writedirection"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:CenterPara</property> + <property name="can_focus">False</property> + <property name="show_arrow">False</property> + <child> + <object class="GtkToolButton" id="lefttoright"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="is_important">True</property> + <property name="action_name">.uno:ParaLeftToRight</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkToolButton" id="righttoleft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="is_important">True</property> + <property name="action_name">.uno:ParaRightToLeft</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -438,43 +549,58 @@ </packing> </child> <child> - <object class="GtkButton" id="button-right-para"> + <object class="sfxlo-SidebarToolBox" id="verticalalignment"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:RightPara</property> + <property name="can_focus">False</property> + <property name="has_tooltip">True</property> + <property name="tooltip_text" translatable="yes">Vertical Alignment</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="show_arrow">False</property> + <child> + <object class="GtkToolButton" id="cellverttop"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:CellVertTop</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkToolButton" id="cellvertcenter"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:CellVertCenter</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkToolButton" id="cellvertbottom"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:CellVertBottom</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> + <property name="pack_type">end</property> <property name="position">2</property> </packing> </child> - <child> - <object class="GtkButton" id="button-justify-para"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:JustifyPara</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> commit 97efceb163ab77bbae90773940a169ee2849b447 Author: Jan Holesovsky <[email protected]> Date: Wed Mar 30 10:40:02 2016 +0200 notebookbar: Move the proof-of-concept notebookbar from vcl to sw. Change-Id: I58b79c433e208ab4451c2e76af7604cfe254c1d0 diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 1c90ba0..f1e5dc8 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -202,6 +202,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/mmselectpage \ sw/uiconfig/swriter/ui/mmsendmails \ sw/uiconfig/swriter/ui/mmsalutationpage \ + sw/uiconfig/swriter/ui/notebookbar \ sw/uiconfig/swriter/ui/paradialog \ sw/uiconfig/swriter/ui/picturedialog \ sw/uiconfig/swriter/ui/picturepage \ diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 6a7db05..d33e9f5 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -1074,7 +1074,7 @@ void SwDocShell::GetState(SfxItemSet& rSet) case SID_NOTEBOOKBAR: { SfxViewShell* pViewShell = GetView()? GetView(): SfxViewShell::Current(); - sfx2::SfxNotebookBar::StateMethod(pViewShell->GetViewFrame()->GetBindings(), "vcl/ui/notebookbar.ui"); + sfx2::SfxNotebookBar::StateMethod(pViewShell->GetViewFrame()->GetBindings(), "modules/swriter/ui/notebookbar.ui"); } break; diff --git a/vcl/uiconfig/ui/notebookbar.ui b/sw/uiconfig/swriter/ui/notebookbar.ui similarity index 100% rename from vcl/uiconfig/ui/notebookbar.ui rename to sw/uiconfig/swriter/ui/notebookbar.ui diff --git a/vcl/UIConfig_vcl.mk b/vcl/UIConfig_vcl.mk index f30252c..a81b30e 100644 --- a/vcl/UIConfig_vcl.mk +++ b/vcl/UIConfig_vcl.mk @@ -13,7 +13,6 @@ $(eval $(call gb_UIConfig_add_uifiles,vcl,\ vcl/uiconfig/ui/cupspassworddialog \ vcl/uiconfig/ui/errornocontentdialog \ vcl/uiconfig/ui/errornoprinterdialog \ - vcl/uiconfig/ui/notebookbar \ vcl/uiconfig/ui/printdialog \ vcl/uiconfig/ui/printerdevicepage \ vcl/uiconfig/ui/printerpaperpage \ commit d150cc71a37f11c6e47cc528a74782722bff048c Author: Jan Holesovsky <[email protected]> Date: Wed Mar 30 10:28:10 2016 +0200 notebookbar: Trying to use the SfxChildWindow for it does not work too well. The notebookbar is not a child window, so trying to graft it on the SfxChildWindow infrastructure is more pain than gain, unfortunately... Instead, it's enough to create the appropriate functions for ExecMethod and StateMethod, and call them from Writer / Calc / etc. with the appropriate .ui file; that's easier & works equally well. Change-Id: I08d98d4f481bd02e90ba11df0bd1c1149697a7fa diff --git a/include/sfx2/notebookbar/NotebookBarChildWindow.hxx b/include/sfx2/notebookbar/NotebookBarChildWindow.hxx deleted file mode 100644 index 610c4f8..0000000 --- a/include/sfx2/notebookbar/NotebookBarChildWindow.hxx +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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/. - */ - -#ifndef INCLUDED_SFX2_NOTEBOOKBAR_NOTEBOOKBARCHILDWINDOW_HXX -#define INCLUDED_SFX2_NOTEBOOKBAR_NOTEBOOKBARCHILDWINDOW_HXX - -#include <sfx2/childwin.hxx> - -namespace sfx2 { - -/** Outer container of the notebookbar window. - - Has to be registered for every application via the - RegisterChildWindow() method from the RegisterControllers() method - of the applications DLL. -*/ -class SFX2_DLLPUBLIC NotebookBarChildWindow : public SfxChildWindow -{ -public: - NotebookBarChildWindow(vcl::Window* pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo); - - SFX_DECL_CHILDWINDOW_WITHID(NotebookBarChildWindow); -}; - -} // namespace sfx2 - -#endif // INCLUDED_SFX2_NOTEBOOKBAR_NOTEBOOKBARCHILDWINDOW_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/notebookbar/SfxNotebookBar.hxx b/include/sfx2/notebookbar/SfxNotebookBar.hxx new file mode 100644 index 0000000..7f40e8a --- /dev/null +++ b/include/sfx2/notebookbar/SfxNotebookBar.hxx @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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/. + */ + +#ifndef INCLUDED_SFX2_NOTEBOOKBAR_SFXNOTEBOOKBAR_HXX +#define INCLUDED_SFX2_NOTEBOOKBAR_SFXNOTEBOOKBAR_HXX + +#include <sfx2/dllapi.h> + +class SfxBindings; + +namespace sfx2 { + +/** Helpers for easier access to NotebookBar via the sfx2 infrastructure. +*/ +class SFX2_DLLPUBLIC SfxNotebookBar +{ +public: + /// Function to be called from the sdi's ExecMethod. + static void ExecMethod(SfxBindings& rBindings); + + /// Function to be called from the sdi's StateMethod. + static void StateMethod(SfxBindings& rBindings, const OUString& rUIFile); +}; + +} // namespace sfx2 + +#endif // INCLUDED_SFX2_NOTEBOOKBAR_SFXNOTEBOOKBAR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index a537e02..f4d61cd 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -237,7 +237,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/doc/templatedlg \ sfx2/source/explorer/nochaos \ sfx2/source/inet/inettbc \ - sfx2/source/notebookbar/NotebookBarChildWindow \ + sfx2/source/notebookbar/SfxNotebookBar \ sfx2/source/notify/eventsupplier \ sfx2/source/notify/globalevents \ sfx2/source/notify/hintpost \ diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi index 03d52bb..3d41c1c 100644 --- a/sfx2/sdi/frmslots.sdi +++ b/sfx2/sdi/frmslots.sdi @@ -43,11 +43,6 @@ interface Window ExecMethod = ChildWindowExecute ; StateMethod = ChildWindowState ; ] - SID_NOTEBOOKBAR // status(final|play) - [ - ExecMethod = ChildWindowExecute ; - StateMethod = ChildWindowState ; - ] SID_SHOW_BROWSER // ole(no) api(final/play/rec) [ ExecMethod = ChildWindowExecute ; diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src index 1ed960d..a3ed837 100644 --- a/sfx2/source/dialog/dialog.src +++ b/sfx2/source/dialog/dialog.src @@ -98,11 +98,6 @@ String SID_SIDEBAR Text [ en-US ] = "Sidebar"; }; -String SID_NOTEBOOKBAR -{ - Text [ en-US ] = "Notebookbar"; -}; - String STR_ERROR_WRONG_CONFIRM { Text [ en-US ] = "Faulty password confirmation"; diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc index 81e2dd0..1794246 100644 --- a/sfx2/source/inc/helpid.hrc +++ b/sfx2/source/inc/helpid.hrc @@ -61,7 +61,6 @@ #define HID_TASKPANE_VIEW_MENU "SFX2_HID_TASKPANE_VIEW_MENU" #define HID_SIDEBAR_WINDOW "SFX2_HID_SIDEBAR_WINDOW" -#define HID_NOTEBOOKBAR_WINDOW "SFX2_HID_NOTEBOOKBAR_WINDOW" #endif // #ifndef _SFX_HELPID_HRC diff --git a/sfx2/source/notebookbar/NotebookBarChildWindow.cxx b/sfx2/source/notebookbar/NotebookBarChildWindow.cxx deleted file mode 100644 index 365d6ef..0000000 --- a/sfx2/source/notebookbar/NotebookBarChildWindow.cxx +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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/. - */ - -#include <sfx2/bindings.hxx> -#include <sfx2/notebookbar/NotebookBarChildWindow.hxx> -#include <sfx2/sfxsids.hrc> -#include "helpid.hrc" -#include <sfx2/dockwin.hxx> -#include <sfx2/dispatch.hxx> - -using namespace sfx2; - -SFX_IMPL_DOCKINGWINDOW_WITHID(NotebookBarChildWindow, SID_NOTEBOOKBAR); - -NotebookBarChildWindow::NotebookBarChildWindow (vcl::Window* pParentWindow, sal_uInt16 nId, - SfxBindings* pBindings, SfxChildWinInfo*) - : SfxChildWindow(pParentWindow, nId) -{ - SfxFrame& rFrame = pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(); - rFrame.GetSystemWindow()->SetNotebookBar("vcl/ui/notebookbar.ui", rFrame.GetFrameInterface()); - - VclPtr<NotebookBar> pNotebookBar(rFrame.GetSystemWindow()->GetNotebookBar()); - pNotebookBar->SetHelpId(HID_NOTEBOOKBAR_WINDOW); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx new file mode 100644 index 0000000..d2d9409 --- /dev/null +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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/. + */ + +#include <sfx2/bindings.hxx> +#include <sfx2/dispatch.hxx> +#include <sfx2/notebookbar/SfxNotebookBar.hxx> +#include <unotools/viewoptions.hxx> +#include <vcl/notebookbar.hxx> +#include <vcl/syswin.hxx> + +using namespace sfx2; + +void SfxNotebookBar::ExecMethod(SfxBindings& rBindings) +{ + SvtViewOptions aViewOpt(E_WINDOW, "notebookbar"); + aViewOpt.SetVisible(!aViewOpt.IsVisible()); + + // trigger the StateMethod + rBindings.Invalidate(SID_NOTEBOOKBAR); + rBindings.Update(); +} + +void SfxNotebookBar::StateMethod(SfxBindings& rBindings, const OUString& rUIFile) +{ + SfxFrame& rFrame = rBindings.GetDispatcher_Impl()->GetFrame()->GetFrame(); + + SvtViewOptions aViewOpt(E_WINDOW, "notebookbar"); + + if (aViewOpt.IsVisible()) + { + // setup if necessary + rFrame.GetSystemWindow()->SetNotebookBar(rUIFile, rFrame.GetFrameInterface()); + + rFrame.GetSystemWindow()->GetNotebookBar()->Show(); + } + else if (auto pNotebookBar = rFrame.GetSystemWindow()->GetNotebookBar()) + pNotebookBar->Hide(); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/sdi/docsh.sdi b/sw/sdi/docsh.sdi index 1713221..511823f 100644 --- a/sw/sdi/docsh.sdi +++ b/sw/sdi/docsh.sdi @@ -56,6 +56,11 @@ interface TextDocument : BaseTextDocument ExecMethod = Execute; StateMethod = GetState; ] + SID_NOTEBOOKBAR + [ + ExecMethod = Execute; + StateMethod = GetState; + ] } shell SwDocShell diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 7c097d8..6a7db05 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -40,6 +40,7 @@ #include <sfx2/docfile.hxx> #include <sfx2/evntconf.hxx> #include <sfx2/docfilt.hxx> +#include <sfx2/notebookbar/SfxNotebookBar.hxx> #include <sfx2/printer.hxx> #include <sfx2/linkmgr.hxx> #include <svl/srchitem.hxx> @@ -1070,6 +1071,12 @@ void SwDocShell::GetState(SfxItemSet& rSet) rSet.Put( SfxBoolItem( nWhich, bRet ) ); } break; + case SID_NOTEBOOKBAR: + { + SfxViewShell* pViewShell = GetView()? GetView(): SfxViewShell::Current(); + sfx2::SfxNotebookBar::StateMethod(pViewShell->GetViewFrame()->GetBindings(), "vcl/ui/notebookbar.ui"); + } + break; default: OSL_ENSURE(false,"You cannot get here!"); diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 80a03b7..5bd5348 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -43,6 +43,7 @@ #include <sfx2/request.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/new.hxx> +#include <sfx2/notebookbar/SfxNotebookBar.hxx> #include <sfx2/filedlghelper.hxx> #include <sfx2/printer.hxx> #include <sfx2/evntconf.hxx> @@ -1151,6 +1152,12 @@ void SwDocShell::Execute(SfxRequest& rReq) SAL_WARN("sw.ui", "missing parameter for SID_CLASSIFICATION_APPLY"); } break; + case SID_NOTEBOOKBAR: + { + SfxViewShell* pViewShell = GetView()? GetView(): SfxViewShell::Current(); + sfx2::SfxNotebookBar::ExecMethod(pViewShell->GetViewFrame()->GetBindings()); + } + break; default: OSL_FAIL("wrong Dispatcher"); } diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index 6199616..54fe827 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -98,7 +98,6 @@ #include <modcfg.hxx> #include <fontcfg.hxx> #include <sfx2/sidebar/SidebarChildWindow.hxx> -#include <sfx2/notebookbar/NotebookBarChildWindow.hxx> #include <sfx2/evntconf.hxx> #include <swatrset.hxx> #include <idxmrk.hxx> @@ -368,10 +367,6 @@ void SwDLL::RegisterControls() ::avmedia::MediaPlayer::RegisterChildWindow(false, pMod); ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(false, pMod); - ::sfx2::NotebookBarChildWindow::RegisterChildWindow(false, pMod); - - //SfxFrame& rFrame = GetActiveView()->GetViewFrame()->GetFrame(); - //rFrame.GetSystemWindow()->SetNotebookBar("vcl/ui/notebookbar.ui", rFrame.GetFrameInterface()); SwJumpToSpecificPageControl::RegisterControl(SID_JUMP_TO_SPECIFIC_PAGE, pMod); } diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index cd4cd0e..37631c6 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -37,7 +37,6 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/bindings.hxx> #include <sfx2/sidebar/SidebarChildWindow.hxx> -#include <sfx2/notebookbar/NotebookBarChildWindow.hxx> #include <uivwimp.hxx> #include <avmedia/mediaplayer.hxx> #include <swmodule.hxx> @@ -99,7 +98,6 @@ void SwView::InitInterface_Impl() GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR, true); GetStaticInterface()->RegisterChildWindow(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId()); - GetStaticInterface()->RegisterChildWindow(::sfx2::NotebookBarChildWindow::GetChildWindowId()); GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId()); GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId()); commit d039c4812db5ba4beed72deb44fe6b04137af6e5 Author: Jan Holesovsky <[email protected]> Date: Tue Mar 29 11:13:57 2016 +0200 notebookbar: Rename NotebookBarWindow to NotebookBar, and move accordingly. Change-Id: If04a8f62aba0bcb712ae6405db318a4bd073fc54 diff --git a/vcl/source/window/notebookbarwindow.hxx b/include/vcl/notebookbar.hxx similarity index 65% rename from vcl/source/window/notebookbarwindow.hxx rename to include/vcl/notebookbar.hxx index c63296e..9dd7e9f 100644 --- a/vcl/source/window/notebookbarwindow.hxx +++ b/include/vcl/notebookbar.hxx @@ -7,20 +7,18 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef VCL_SOURCE_WINDOW_NOTEBOOKBARWINDOW_HXX -#define VCL_SOURCE_WINDOW_NOTEBOOKBARWINDOW_HXX - -#include "menuwindow.hxx" +#ifndef INCLUDED_VCL_NOTEBOOKBAR_HXX +#define INCLUDED_VCL_NOTEBOOKBAR_HXX #include <vcl/builder.hxx> #include <vcl/ctrl.hxx> /// This implements Widget Layout-based notebook-like menu bar. -class NotebookBarWindow : public Control, public VclBuilderContainer +class NotebookBar : public Control, public VclBuilderContainer { public: - NotebookBarWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame); - virtual ~NotebookBarWindow(); + NotebookBar(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame); + virtual ~NotebookBar(); virtual void dispose() SAL_OVERRIDE; virtual Size GetOptimalSize() const SAL_OVERRIDE; @@ -29,6 +27,6 @@ public: virtual void StateChanged(StateChangedType nType) override; }; -#endif // VCL_SOURCE_WINDOW_NOTEBOOKBARWINDOW_HXX +#endif // INCLUDED_VCL_NOTEBOOKBAR_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index 09ed113..e6b637b 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -23,12 +23,12 @@ #include <tools/solar.h> #include <vcl/dllapi.h> #include <vcl/builder.hxx> -#include <vcl/window.hxx> #include <vcl/idle.hxx> +#include <vcl/notebookbar.hxx> +#include <vcl/window.hxx> class ModalDialog; class MenuBar; -class NotebookBarWindow; class TaskPaneList; class VclContainer; @@ -153,6 +153,7 @@ private: sal_uInt16 mnIcon; ImplData* mpImplData; Idle maLayoutIdle; + OUString maNotebookBarUIFile; protected: bool mbIsDefferedInit; VclPtr<vcl::Window> mpDialogParent; @@ -227,7 +228,8 @@ public: MenuBar* GetMenuBar() const { return mpMenuBar; } void SetMenuBarMode( MenuBarMode nMode ); - VclPtr<vcl::Window> CreateNotebookBar(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame); + void SetNotebookBar(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame); + VclPtr<NotebookBar> GetNotebookBar() const; TaskPaneList* GetTaskPaneList(); void GetWindowStateData( WindowStateData& rData ) const; diff --git a/sfx2/source/notebookbar/NotebookBarChildWindow.cxx b/sfx2/source/notebookbar/NotebookBarChildWindow.cxx index 7c5609b..365d6ef 100644 --- a/sfx2/source/notebookbar/NotebookBarChildWindow.cxx +++ b/sfx2/source/notebookbar/NotebookBarChildWindow.cxx @@ -23,9 +23,10 @@ NotebookBarChildWindow::NotebookBarChildWindow (vcl::Window* pParentWindow, sal_ : SfxChildWindow(pParentWindow, nId) { SfxFrame& rFrame = pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(); - VclPtr<vcl::Window> pNotebookBarWindow = rFrame.GetSystemWindow()->CreateNotebookBar("vcl/ui/notebookbar.ui", rFrame.GetFrameInterface()); + rFrame.GetSystemWindow()->SetNotebookBar("vcl/ui/notebookbar.ui", rFrame.GetFrameInterface()); - pNotebookBarWindow->SetHelpId(HID_NOTEBOOKBAR_WINDOW); + VclPtr<NotebookBar> pNotebookBar(rFrame.GetSystemWindow()->GetNotebookBar()); + pNotebookBar->SetHelpId(HID_NOTEBOOKBAR_WINDOW); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 1d4cf37..657388c 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -170,7 +170,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/window/mouse \ vcl/source/window/mouseevent \ vcl/source/window/msgbox \ - vcl/source/window/notebookbarwindow \ vcl/source/window/popupmenuwindow \ vcl/source/window/printdlg \ vcl/source/window/scrwnd \ @@ -205,6 +204,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/control/listbox \ vcl/source/control/menubtn \ vcl/source/control/morebtn \ + vcl/source/control/notebookbar \ vcl/source/control/quickselectionengine \ vcl/source/control/prgsbar \ vcl/source/control/scrbar \ diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx index 93bee37..b4a60b2 100644 --- a/vcl/inc/brdwin.hxx +++ b/vcl/inc/brdwin.hxx @@ -20,13 +20,13 @@ #ifndef INCLUDED_VCL_INC_BRDWIN_HXX #define INCLUDED_VCL_INC_BRDWIN_HXX +#include <vcl/notebookbar.hxx> #include <vcl/window.hxx> #include <com/sun/star/frame/XFrame.hpp> class ImplBorderWindowView; enum class DrawButtonFlags; -class NotebookBarWindow; #define BORDERWINDOW_STYLE_OVERLAP ((sal_uInt16)0x0001) #define BORDERWINDOW_STYLE_BORDER ((sal_uInt16)0x0002) @@ -88,7 +88,7 @@ class ImplBorderWindow : public vcl::Window private: ImplBorderWindowView* mpBorderView; VclPtr<vcl::Window> mpMenuBarWindow; - VclPtr<NotebookBarWindow> mpNotebookBarWindow; + VclPtr<NotebookBar> mpNotebookBar; long mnMinWidth; long mnMinHeight; long mnMaxWidth; @@ -162,7 +162,8 @@ public: void SetMenuBarWindow( vcl::Window* pWindow ); void SetMenuBarMode( bool bHide ); - VclPtr<vcl::Window> CreateNotebookBarWindow(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame); + void SetNotebookBar(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame); + VclPtr<NotebookBar> GetNotebookBar() const { return mpNotebookBar; } void SetMinOutputSize( long nWidth, long nHeight ) { mnMinWidth = nWidth; mnMinHeight = nHeight; } diff --git a/vcl/source/window/notebookbarwindow.cxx b/vcl/source/control/notebookbar.cxx similarity index 79% rename from vcl/source/window/notebookbarwindow.cxx rename to vcl/source/control/notebookbar.cxx index 6945d11..a037eb7 100644 --- a/vcl/source/window/notebookbarwindow.cxx +++ b/vcl/source/control/notebookbar.cxx @@ -7,29 +7,28 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "notebookbarwindow.hxx" - #include <vcl/layout.hxx> +#include <vcl/notebookbar.hxx> -NotebookBarWindow::NotebookBarWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame) +NotebookBar::NotebookBar(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame) : Control(pParent) { SetStyle(GetStyle() | WB_DIALOGCONTROL); m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID, rFrame); } -NotebookBarWindow::~NotebookBarWindow() +NotebookBar::~NotebookBar() { disposeOnce(); } -void NotebookBarWindow::dispose() +void NotebookBar::dispose() { disposeBuilder(); Control::dispose(); } -Size NotebookBarWindow::GetOptimalSize() const +Size NotebookBar::GetOptimalSize() const { if (isLayoutEnabled(this)) return VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild)); @@ -37,7 +36,7 @@ Size NotebookBarWindow::GetOptimalSize() const return Control::GetOptimalSize(); } -void NotebookBarWindow::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags) +void NotebookBar::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags) { bool bCanHandleSmallerWidth = false; bool bCanHandleSmallerHeight = false; @@ -66,7 +65,7 @@ void NotebookBarWindow::setPosSizePixel(long nX, long nY, long nWidth, long nHei VclContainer::setLayoutAllocation(*pChild, Point(0, 0), Size(nWidth, nHeight)); } -void NotebookBarWindow::StateChanged(StateChangedType nType) +void NotebookBar::StateChanged(StateChangedType nType) { if (nType == StateChangedType::Visible) { diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 31b968f..6dee935 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -37,8 +37,6 @@ #include <vcl/metric.hxx> #include <vcl/settings.hxx> -#include "notebookbarwindow.hxx" - using namespace ::com::sun::star::uno; // useful caption height for title bar buttons @@ -1834,7 +1832,7 @@ void ImplBorderWindow::dispose() delete mpBorderView; mpBorderView = nullptr; mpMenuBarWindow.clear(); - mpNotebookBarWindow.disposeAndClear(); + mpNotebookBar.disposeAndClear(); vcl::Window::dispose(); } @@ -1944,10 +1942,10 @@ void ImplBorderWindow::Resize() nTopBorder += nMenuHeight; } - if (mpNotebookBarWindow) + if (mpNotebookBar) { - long nNotebookBarHeight = mpNotebookBarWindow->GetSizePixel().Height(); - mpNotebookBarWindow->setPosSizePixel( + long nNotebookBarHeight = mpNotebookBar->GetSizePixel().Height(); + mpNotebookBar->setPosSizePixel( nLeftBorder, nTopBorder, aSize.Width() - nLeftBorder - nRightBorder, nNotebookBarHeight); @@ -2177,12 +2175,10 @@ void ImplBorderWindow::SetMenuBarMode( bool bHide ) UpdateMenuHeight(); } -VclPtr<vcl::Window> ImplBorderWindow::CreateNotebookBarWindow(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame) +void ImplBorderWindow::SetNotebookBar(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame) { - mpNotebookBarWindow = VclPtr<NotebookBarWindow>::Create(this, "NotebookBar", rUIXMLDescription, rFrame); + mpNotebookBar = VclPtr<NotebookBar>::Create(this, "NotebookBar", rUIXMLDescription, rFrame); Resize(); - - return mpNotebookBarWindow; } void ImplBorderWindow::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, @@ -2193,8 +2189,8 @@ void ImplBorderWindow::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, if (mpMenuBarWindow && !mbMenuHide) rTopBorder += mpMenuBarWindow->GetSizePixel().Height(); - if (mpNotebookBarWindow && mpNotebookBarWindow->IsVisible()) - rTopBorder += mpNotebookBarWindow->GetSizePixel().Height(); + if (mpNotebookBar && mpNotebookBar->IsVisible()) + rTopBorder += mpNotebookBar->GetSizePixel().Height(); } long ImplBorderWindow::CalcTitleWidth() const diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 86c0a8b..02b15da 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -39,8 +39,6 @@ #include <brdwin.hxx> #include <window.h> -#include "notebookbarwindow.hxx" - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -940,9 +938,18 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar) } } -VclPtr<vcl::Window> SystemWindow::CreateNotebookBar(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame) +void SystemWindow::SetNotebookBar(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame) +{ + if (rUIXMLDescription != maNotebookBarUIFile) + { + static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetNotebookBar(rUIXMLDescription, rFrame); + maNotebookBarUIFile = rUIXMLDescription; + } +} + +VclPtr<NotebookBar> SystemWindow::GetNotebookBar() const { - return static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->CreateNotebookBarWindow(rUIXMLDescription, rFrame); + return static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->GetNotebookBar(); } void SystemWindow::SetMenuBarMode( MenuBarMode nMode ) commit 1fb314832ebd14cde6457feb2bf4f19e1bfcaa82 Author: Szymon KÅos <[email protected]> Date: Fri Mar 18 13:55:24 2016 +0100 notebookbar: Instantiate the notebookbar via sfx2 infrastructure. Change-Id: Iaed4596246245560e646d9086e717d5fb516897e diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 0651e0f..e7bbd0f 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -1528,11 +1528,6 @@ throw (RuntimeException, std::exception) } } } - if (getenv("LO_USE_NOTEBOOKBAR")) - { - pSysWindow->CreateNotebookBar("vcl/ui/notebookbar.ui", m_xFrame); - pSysWindow->SetMenuBarMode(MenuBarMode::Hide); - } } } } diff --git a/include/sfx2/notebookbar/NotebookBarChildWindow.hxx b/include/sfx2/notebookbar/NotebookBarChildWindow.hxx new file mode 100644 index 0000000..610c4f8 --- /dev/null +++ b/include/sfx2/notebookbar/NotebookBarChildWindow.hxx @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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/. + */ + +#ifndef INCLUDED_SFX2_NOTEBOOKBAR_NOTEBOOKBARCHILDWINDOW_HXX +#define INCLUDED_SFX2_NOTEBOOKBAR_NOTEBOOKBARCHILDWINDOW_HXX + +#include <sfx2/childwin.hxx> + +namespace sfx2 { + +/** Outer container of the notebookbar window. + + Has to be registered for every application via the + RegisterChildWindow() method from the RegisterControllers() method + of the applications DLL. +*/ +class SFX2_DLLPUBLIC NotebookBarChildWindow : public SfxChildWindow +{ +public: + NotebookBarChildWindow(vcl::Window* pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo); + + SFX_DECL_CHILDWINDOW_WITHID(NotebookBarChildWindow); +}; + +} // namespace sfx2 + +#endif // INCLUDED_SFX2_NOTEBOOKBAR_NOTEBOOKBARCHILDWINDOW_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 16def42..be15c6e 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -570,6 +570,7 @@ #define SID_ZOOM (SID_SVX_START + 289) #define SID_SEARCH_ITEM (SID_SVX_START + 291) #define SID_SIDEBAR (SID_SVX_START + 336) +#define SID_NOTEBOOKBAR (SID_SVX_START + 338) #define SID_HYPERLINK_GETLINK (SID_SVX_START + 361) #define SID_HYPERLINK_SETLINK (SID_SVX_START + 362) #define SID_INFOBAR (SID_SVX_START + 365) diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index 81de743..09ed113 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -227,7 +227,7 @@ public: MenuBar* GetMenuBar() const { return mpMenuBar; } void SetMenuBarMode( MenuBarMode nMode ); - void CreateNotebookBar(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame); + VclPtr<vcl::Window> CreateNotebookBar(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame); TaskPaneList* GetTaskPaneList(); void GetWindowStateData( WindowStateData& rData ) const; diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index e88a79e..44077b9 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -3877,6 +3877,11 @@ <value>9</value> </prop> </node> + <node oor:name=".uno:Notebookbar" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Notebookbar</value> + </prop> + </node> <node oor:name=".uno:Sidebar" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Sidebar</value> diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index 5ab2bb3..a537e02 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -237,6 +237,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/doc/templatedlg \ sfx2/source/explorer/nochaos \ sfx2/source/inet/inettbc \ + sfx2/source/notebookbar/NotebookBarChildWindow \ sfx2/source/notify/eventsupplier \ sfx2/source/notify/globalevents \ sfx2/source/notify/hintpost \ diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi index 3d41c1c..03d52bb 100644 --- a/sfx2/sdi/frmslots.sdi +++ b/sfx2/sdi/frmslots.sdi @@ -43,6 +43,11 @@ interface Window ExecMethod = ChildWindowExecute ; StateMethod = ChildWindowState ; ] + SID_NOTEBOOKBAR // status(final|play) + [ + ExecMethod = ChildWindowExecute ; + StateMethod = ChildWindowState ; + ] SID_SHOW_BROWSER // ole(no) api(final/play/rec) [ ExecMethod = ChildWindowExecute ; diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index b69f94d..d41c7141 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -2606,6 +2606,24 @@ SfxBoolItem Sidebar SID_SIDEBAR ] +SfxBoolItem Notebookbar SID_NOTEBOOKBAR +[ + AutoUpdate = TRUE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = GID_VIEW; +] + + SfxVoidItem RestoreEditingView SID_RESTORE_EDITING_VIEW [ diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src index a3ed837..1ed960d 100644 --- a/sfx2/source/dialog/dialog.src +++ b/sfx2/source/dialog/dialog.src @@ -98,6 +98,11 @@ String SID_SIDEBAR Text [ en-US ] = "Sidebar"; }; +String SID_NOTEBOOKBAR +{ + Text [ en-US ] = "Notebookbar"; +}; + String STR_ERROR_WRONG_CONFIRM { Text [ en-US ] = "Faulty password confirmation"; diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc index 1794246..81e2dd0 100644 --- a/sfx2/source/inc/helpid.hrc +++ b/sfx2/source/inc/helpid.hrc @@ -61,6 +61,7 @@ #define HID_TASKPANE_VIEW_MENU "SFX2_HID_TASKPANE_VIEW_MENU" #define HID_SIDEBAR_WINDOW "SFX2_HID_SIDEBAR_WINDOW" +#define HID_NOTEBOOKBAR_WINDOW "SFX2_HID_NOTEBOOKBAR_WINDOW" #endif // #ifndef _SFX_HELPID_HRC diff --git a/sfx2/source/notebookbar/NotebookBarChildWindow.cxx b/sfx2/source/notebookbar/NotebookBarChildWindow.cxx new file mode 100644 index 0000000..7c5609b --- /dev/null +++ b/sfx2/source/notebookbar/NotebookBarChildWindow.cxx @@ -0,0 +1,31 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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/. + */ + +#include <sfx2/bindings.hxx> +#include <sfx2/notebookbar/NotebookBarChildWindow.hxx> +#include <sfx2/sfxsids.hrc> +#include "helpid.hrc" +#include <sfx2/dockwin.hxx> +#include <sfx2/dispatch.hxx> + +using namespace sfx2; + +SFX_IMPL_DOCKINGWINDOW_WITHID(NotebookBarChildWindow, SID_NOTEBOOKBAR); + +NotebookBarChildWindow::NotebookBarChildWindow (vcl::Window* pParentWindow, sal_uInt16 nId, + SfxBindings* pBindings, SfxChildWinInfo*) + : SfxChildWindow(pParentWindow, nId) +{ + SfxFrame& rFrame = pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(); + VclPtr<vcl::Window> pNotebookBarWindow = rFrame.GetSystemWindow()->CreateNotebookBar("vcl/ui/notebookbar.ui", rFrame.GetFrameInterface()); + + pNotebookBarWindow->SetHelpId(HID_NOTEBOOKBAR_WINDOW); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index 9631646..6199616 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -98,6 +98,7 @@ #include <modcfg.hxx> #include <fontcfg.hxx> #include <sfx2/sidebar/SidebarChildWindow.hxx> +#include <sfx2/notebookbar/NotebookBarChildWindow.hxx> #include <sfx2/evntconf.hxx> #include <swatrset.hxx> #include <idxmrk.hxx> @@ -367,6 +368,11 @@ void SwDLL::RegisterControls() ::avmedia::MediaPlayer::RegisterChildWindow(false, pMod); ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(false, pMod); + ::sfx2::NotebookBarChildWindow::RegisterChildWindow(false, pMod); + + //SfxFrame& rFrame = GetActiveView()->GetViewFrame()->GetFrame(); + //rFrame.GetSystemWindow()->SetNotebookBar("vcl/ui/notebookbar.ui", rFrame.GetFrameInterface()); + SwJumpToSpecificPageControl::RegisterControl(SID_JUMP_TO_SPECIFIC_PAGE, pMod); } diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 281b009..cd4cd0e 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -37,6 +37,7 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/bindings.hxx> #include <sfx2/sidebar/SidebarChildWindow.hxx> +#include <sfx2/notebookbar/NotebookBarChildWindow.hxx> #include <uivwimp.hxx> #include <avmedia/mediaplayer.hxx> #include <swmodule.hxx> @@ -98,6 +99,8 @@ void SwView::InitInterface_Impl() GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR, true); GetStaticInterface()->RegisterChildWindow(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId()); + GetStaticInterface()->RegisterChildWindow(::sfx2::NotebookBarChildWindow::GetChildWindowId()); + GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId()); GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId()); GetStaticInterface()->RegisterChildWindow(SwSpellDialogChildWindow::GetChildWindowId()); diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx index d6fa9c2..93bee37 100644 --- a/vcl/inc/brdwin.hxx +++ b/vcl/inc/brdwin.hxx @@ -162,7 +162,7 @@ public: void SetMenuBarWindow( vcl::Window* pWindow ); void SetMenuBarMode( bool bHide ); - void SetNotebookBarWindow(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame); + VclPtr<vcl::Window> CreateNotebookBarWindow(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame); void SetMinOutputSize( long nWidth, long nHeight ) { mnMinWidth = nWidth; mnMinHeight = nHeight; } diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index ff246a5..31b968f 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -2177,11 +2177,12 @@ void ImplBorderWindow::SetMenuBarMode( bool bHide ) UpdateMenuHeight(); } -void ImplBorderWindow::SetNotebookBarWindow(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame) +VclPtr<vcl::Window> ImplBorderWindow::CreateNotebookBarWindow(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame) { mpNotebookBarWindow = VclPtr<NotebookBarWindow>::Create(this, "NotebookBar", rUIXMLDescription, rFrame); Resize(); - mpNotebookBarWindow->Show(); + + return mpNotebookBarWindow; } void ImplBorderWindow::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, @@ -2192,7 +2193,7 @@ void ImplBorderWindow::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, if (mpMenuBarWindow && !mbMenuHide) rTopBorder += mpMenuBarWindow->GetSizePixel().Height(); - if (mpNotebookBarWindow) + if (mpNotebookBarWindow && mpNotebookBarWindow->IsVisible()) rTopBorder += mpNotebookBarWindow->GetSizePixel().Height(); } diff --git a/vcl/source/window/notebookbarwindow.cxx b/vcl/source/window/notebookbarwindow.cxx index 09fc067..6945d11 100644 --- a/vcl/source/window/notebookbarwindow.cxx +++ b/vcl/source/window/notebookbarwindow.cxx @@ -66,4 +66,15 @@ void NotebookBarWindow::setPosSizePixel(long nX, long nY, long nWidth, long nHei VclContainer::setLayoutAllocation(*pChild, Point(0, 0), Size(nWidth, nHeight)); } +void NotebookBarWindow::StateChanged(StateChangedType nType) +{ + if (nType == StateChangedType::Visible) + { + // visibility changed, update the container + GetParent()->Resize(); + } + + Control::StateChanged(nType); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/notebookbarwindow.hxx b/vcl/source/window/notebookbarwindow.hxx index 0fc64a6..c63296e 100644 --- a/vcl/source/window/notebookbarwindow.hxx +++ b/vcl/source/window/notebookbarwindow.hxx @@ -25,6 +25,8 @@ public: virtual Size GetOptimalSize() const SAL_OVERRIDE; virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) SAL_OVERRIDE; + + virtual void StateChanged(StateChangedType nType) override; }; #endif // VCL_SOURCE_WINDOW_NOTEBOOKBARWINDOW_HXX diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index cd348cf..86c0a8b 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -940,9 +940,9 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar) } } -void SystemWindow::CreateNotebookBar(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame) +VclPtr<vcl::Window> SystemWindow::CreateNotebookBar(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame) { - static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetNotebookBarWindow(rUIXMLDescription, rFrame); + return static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->CreateNotebookBarWindow(rUIXMLDescription, rFrame); } void SystemWindow::SetMenuBarMode( MenuBarMode nMode ) diff --git a/vcl/uiconfig/ui/notebookbar.ui b/vcl/uiconfig/ui/notebookbar.ui index 7997c54..51d305a 100644 --- a/vcl/uiconfig/ui/notebookbar.ui +++ b/vcl/uiconfig/ui/notebookbar.ui @@ -4,106 +4,42 @@ <requires lib="gtk+" version="3.12"/> <requires lib="LibreOffice" version="1.0"/> <!-- interface-local-resource-path ../../../icon-themes/galaxy/cmd/ --> + <object class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="pixbuf">cmd/lc_paste.png</property> + </object> <object class="GtkGrid" id="NotebookBar"> <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkNotebook" id="notebook1"> + <object class="GtkBox" id="box1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> - <object class="GtkBox" id="box3"> + <object class="GtkNotebook" id="notebook1"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">6</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> <child> - <object class="GtkBox" id="box4"> + <object class="GtkBox" id="box3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="orientation">vertical</property> <property name="spacing">6</property> <child> - <object class="GtkButton" id="button-open"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Open</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkButton" id="button-save"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Save</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkSeparator" id="separator3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkBox" id="box5"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <object class="GtkButton" id="button5"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Paste</property> - <property name="image">image1</property> - <property name="relief">none</property> - <property name="image_position">top</property> - <property name="always_show_image">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkBox" id="box6"> + <object class="GtkBox" id="box4"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="orientation">vertical</property> + <property name="spacing">6</property> <child> - <object class="GtkButton" id="button-cut"> + <object class="GtkButton" id="button-open"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="action_name">.uno:Cut</property> - <property name="relief">none</property> - <property name="xalign">0</property> - <property name="always_show_image">True</property> + <property name="action_name">.uno:Open</property> </object> <packing> <property name="expand">False</property> @@ -112,14 +48,11 @@ </packing> </child> <child> - <object class="GtkButton" id="button-copy"> + <object class="GtkButton" id="button-save"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="action_name">.uno:Copy</property> - <property name="relief">none</property> - <property name="xalign">0</property> - <property name="always_show_image">True</property> + <property name="action_name">.uno:Save</property> </object> <packing> <property name="expand">False</property> @@ -127,121 +60,39 @@ <property name="position">1</property> </packing> </child> - <child> - <object class="GtkButton" id="button-format-paintbrush"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:FormatPaintbrush</property> - <property name="relief">none</property> - <property name="xalign">0</property> - <property name="always_show_image">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">0</property> </packing> </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkSeparator" id="separator4"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - <child> - <object class="GtkBox" id="box9"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> <child> - <object class="GtkBox" id="box10"> + <object class="GtkSeparator" id="separator3"> <property name="visible">True</property> <property name="can_focus">False</property> - <child> - <object class="smlo-SmFontPickListBox" id="SmFontPickListBox1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <placeholder/> - </child> - <child> - <object class="GtkButton" id="button-shrink-font"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Shrink</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkButton" id="button-grow-font"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Grow</property> - <property name="xalign">0.60000002384185791</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> + <property name="orientation">vertical</property> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">0</property> + <property name="position">1</property> </packing> </child> <child> - <object class="GtkBox" id="box11"> + <object class="GtkBox" id="box5"> <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="button-subscript"> + <object class="GtkButton" id="button5"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="action_name">.uno:SubScript</property> + <property name="action_name">.uno:Paste</property> + <property name="image">image1</property> + <property name="relief">none</property> + <property name="image_position">top</property> + <property name="always_show_image">True</property> </object> <packing> <property name="expand">False</property> @@ -250,11 +101,58 @@ </packing> </child> <child> - <object class="GtkButton" id="button-superscript"> + <object class="GtkBox" id="box6"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:SuperScript</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkButton" id="button-cut"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="action_name">.uno:Cut</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="button-copy"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="action_name">.uno:Copy</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="button-format-paintbrush"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="action_name">.uno:FormatPaintbrush</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -262,102 +160,81 @@ <property name="position">1</property> </packing> </child> - <child> - <object class="GtkButton" id="button-strikeout"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Strikeout</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkButton" id="button-underline"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Underline</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - <child> - <object class="GtkButton" id="button-italic"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Italic</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">4</property> - </packing> - </child> - <child> - <object class="GtkButton" id="button-bold"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:Bold</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">5</property> - </packing> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">2</property> </packing> </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">4</property> - </packing> - </child> - <child> - <object class="GtkSeparator" id="separator5"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">5</property> - </packing> - </child> - <child> - <object class="GtkBox" id="box1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> <child> - <object class="GtkBox" id="box7"> + <object class="GtkSeparator" id="separator4"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> - <object class="GtkButton" id="button-increment-indent"> + <object class="GtkBox" id="box10"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="action_name">.uno:IncrementIndent</property> + <property name="can_focus">False</property> + <child> + <object class="smlo-SmFontPickListBox" id="SmFontPickListBox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <object class="GtkButton" id="button-shrink-font"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> ... etc. - the rest is truncated
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
