diff options
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu | 26 | ||||
-rw-r--r-- | sw/Library_sw.mk | 1 | ||||
-rw-r--r-- | sw/UIConfig_swriter.mk | 1 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/SwPanelFactory.cxx | 7 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/TableEditPanel.cxx | 48 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/TableEditPanel.hxx | 43 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/sidebartableedit.ui | 458 |
7 files changed, 584 insertions, 0 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu index 5d3c698d975c..2f530db6beca 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu @@ -1570,6 +1570,32 @@ <value>8</value> </prop> </node> + + <node oor:name="TableEditPanel" oor:op="replace"> + <prop oor:name="Title" oor:type="xs:string"> + <value xml:lang="en-US">Table</value> + </prop> + <prop oor:name="TitleBarIsOptional" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Id" oor:type="xs:string"> + <value>TableEditPanel</value> + </prop> + <prop oor:name="DeckId" oor:type="xs:string"> + <value>PropertyDeck</value> + </prop> + <prop oor:name="ContextList"> + <value oor:separator=";"> + WriterVariants, Table, visible ; + </value> + </prop> + <prop oor:name="ImplementationURL" oor:type="xs:string"> + <value>private:resource/toolpanel/SwPanelFactory/TableEditPanel</value> + </prop> + <prop oor:name="OrderIndex" oor:type="xs:int"> + <value>300</value> + </prop> + </node> </node> </node> </oor:component-data> diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index 7cf93d55e36e..7999ece93c3d 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -704,6 +704,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\ sw/source/uibase/sidebar/PageFooterPanel \ sw/source/uibase/sidebar/PageStylesPanel \ sw/source/uibase/sidebar/WrapPropertyPanel \ + sw/source/uibase/sidebar/TableEditPanel \ sw/source/uibase/sidebar/ThemePanel \ sw/source/uibase/sidebar/SwPanelFactory \ sw/source/uibase/table/chartins \ diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 0ddb67a241a0..65de527c3b89 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -258,6 +258,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/pagefooterpanel \ sw/uiconfig/swriter/ui/sidebarwrap \ sw/uiconfig/swriter/ui/sidebarstylepresets \ + sw/uiconfig/swriter/ui/sidebartableedit \ sw/uiconfig/swriter/ui/sidebartheme \ sw/uiconfig/swriter/ui/sortdialog \ sw/uiconfig/swriter/ui/spellmenu \ diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx index 08ea0ce274eb..e602093d966a 100644 --- a/sw/source/uibase/sidebar/SwPanelFactory.cxx +++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx @@ -26,6 +26,7 @@ #include "PageHeaderPanel.hxx" #include "PageFooterPanel.hxx" #include "WrapPropertyPanel.hxx" +#include "TableEditPanel.hxx" #include <navipi.hxx> #include <redlndlg.hxx> @@ -182,6 +183,12 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement ( xElement = sfx2::sidebar::SidebarPanelBase::Create( rsResourceURL, xFrame, pPanel, ui::LayoutSize(-1,-1,-1)); } + else if (rsResourceURL.endsWith("/TableEditPanel")) + { + VclPtr<vcl::Window> pPanel = sw::sidebar::TableEditPanel::Create(pParentWindow, xFrame); + xElement = sfx2::sidebar::SidebarPanelBase::Create( + rsResourceURL, xFrame, pPanel, ui::LayoutSize(-1,-1,-1)); + } return xElement; } diff --git a/sw/source/uibase/sidebar/TableEditPanel.cxx b/sw/source/uibase/sidebar/TableEditPanel.cxx new file mode 100644 index 000000000000..0d563f0f4211 --- /dev/null +++ b/sw/source/uibase/sidebar/TableEditPanel.cxx @@ -0,0 +1,48 @@ +/* -*- 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 <sal/config.h> +#include "TableEditPanel.hxx" + +#include <com/sun/star/lang/IllegalArgumentException.hpp> + +namespace sw +{ +namespace sidebar +{ +VclPtr<vcl::Window> TableEditPanel::Create(vcl::Window* pParent, + const css::uno::Reference<css::frame::XFrame>& rxFrame) +{ + if (pParent == nullptr) + throw css::lang::IllegalArgumentException( + "no parent Window given to TableEditPanel::Create", nullptr, 0); + if (!rxFrame.is()) + throw css::lang::IllegalArgumentException("no XFrame given to TableEditPanel::Create", + nullptr, 1); + + return VclPtr<TableEditPanel>::Create(pParent, rxFrame); +} + +void TableEditPanel::NotifyItemUpdate(const sal_uInt16 /*nSId*/, const SfxItemState /*eState*/, + const SfxPoolItem* /*pState*/) +{ +} + +TableEditPanel::TableEditPanel(vcl::Window* pParent, + const css::uno::Reference<css::frame::XFrame>& rxFrame) + : PanelLayout(pParent, "TableEditPanel", "modules/swriter/ui/sidebartableedit.ui", rxFrame) +{ +} + +TableEditPanel::~TableEditPanel() { disposeOnce(); } +} +} // end of namespace ::sw::sidebar + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/uibase/sidebar/TableEditPanel.hxx b/sw/source/uibase/sidebar/TableEditPanel.hxx new file mode 100644 index 000000000000..4ab651a98a0d --- /dev/null +++ b/sw/source/uibase/sidebar/TableEditPanel.hxx @@ -0,0 +1,43 @@ +/* -*- 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_SW_SOURCE_UIBASE_SIDEBAR_TABLEEDITPANEL_HXX +#define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_TABLEEDITPANEL_HXX + +#include <com/sun/star/frame/XFrame.hpp> +#include <svx/sidebar/PanelLayout.hxx> +#include <sfx2/sidebar/ControllerItem.hxx> + +namespace sw +{ +namespace sidebar +{ +class TableEditPanel : public PanelLayout, + public sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface +{ + friend class VclPtr<TableEditPanel>; + +public: + static VclPtr<vcl::Window> Create(vcl::Window* pParent, + const css::uno::Reference<css::frame::XFrame>& rxFrame); + + virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, + const SfxPoolItem* pState) override; + +private: + TableEditPanel(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame); + virtual ~TableEditPanel() override; +}; +} +} // end of namespace sw::sidebar + +#endif // INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_TABLEEDITPANEL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/uiconfig/swriter/ui/sidebartableedit.ui b/sw/uiconfig/swriter/ui/sidebartableedit.ui new file mode 100644 index 000000000000..e48865b0f8a8 --- /dev/null +++ b/sw/uiconfig/swriter/ui/sidebartableedit.ui @@ -0,0 +1,458 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.20.4 --> +<interface domain="svx"> + <requires lib="gtk+" version="3.18"/> + <requires lib="LibreOffice" version="1.0"/> + <object class="GtkGrid" id="TableEditPanel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="orientation">vertical</property> + <property name="column_spacing">6</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkBox" id="box5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkBox" id="box6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="insertlabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="label" translatable="yes" context="sidebatableedit|insertlabel">Insert:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">insert</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="sfxlo-SidebarToolBox" id="insert"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkToolButton" id="insertrowsbefore"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:InsertRowsBefore</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="insertrowsafter"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:InsertRowsAfter</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="insertcolumnsbefore"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:InsertColumnsBefore</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="insertcolumnsafter"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:InsertColumnsAfter</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="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="GtkBox" id="box7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="deletelabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="label" translatable="yes" context="sidebatableedit|deletelabel">Delete:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">delete</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="sfxlo-SidebarToolBox" id="delete"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkToolButton" id="deleterows"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:DeleteRows</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="deletecolumns"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:DeleteColumns</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="deletetable"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:DeleteTable</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="position">1</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> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="sizelabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="label" translatable="yes" context="sidebatableedit|deletelabel">Size:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">box3</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <child> + <object class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="pixbuf">cmd/sc_rowheight.png</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="svxlo-SvxRelativeField" id="rowheight"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_tooltip">True</property> + <property name="tooltip_text" translatable="yes" context="sidebatableedit|rowheight|tooltip_text">Row Height</property> + <property name="hexpand">True</property> + <property name="text">0</property> + <child internal-child="accessible"> + <object class="AtkObject" id="rowheight-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes" context="sidebatableedit|rowheight-atkobject">Row Height</property> + </object> + </child> + </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="GtkBox" id="box2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <child> + <object class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="pixbuf">cmd/sc_columnwidth.png</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="svxlo-SvxRelativeField" id="columnwidth"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_tooltip">True</property> + <property name="tooltip_text" translatable="yes" context="sidebatableedit|columnwidth|tooltip_text">Column Width</property> + <property name="hexpand">True</property> + <property name="text">0</property> + <child internal-child="accessible"> + <object class="AtkObject" id="columnwidth-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes" context="sidebatableedit|columnwidth-atkobject">Column Width</property> + </object> + </child> + </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="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <child> + <object class="sfxlo-SidebarToolBox" id="rowsizing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkToolButton" id="minimalrowheight"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:SetMinimalRowHeight</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="optimalrowheight"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:SetOptimalRowHeight</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="distributerows"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:DistributeRows</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="position">0</property> + </packing> + </child> + <child> + <object class="sfxlo-SidebarToolBox" id="columnsizing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkToolButton" id="minimalcolumnwidth"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:SetMinimalColumnWidth</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="optimalcolumnwidth"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:SetOptimalColumnWidth</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="distributecolumns"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:DistributeColumns</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> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="layoutlabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="label" translatable="yes" context="sidebatableedit|deletelabel">Layout:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">layouting</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">4</property> + </packing> + </child> + <child> + <object class="sfxlo-SidebarToolBox" id="layouting"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkToolButton" id="mergecells"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:MergeCells</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="left_attach">0</property> + <property name="top_attach">5</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + </object> +</interface> |