diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2019-04-03 21:23:30 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-04-15 11:24:43 +0200 |
commit | c6f5ee192887224de5dabfa86f2103822922bf89 (patch) | |
tree | 356e916b0c914b170576bbd1d9204bbe91a8cb5a | |
parent | 4c4d9a482b93440fd3388ffa1715e66d1f391fea (diff) |
Add new list panel to Impress Properties deck
Change-Id: Idb3a4dee104b2df0283852efcecbd0b25a765d5a
Reviewed-on: https://gerrit.libreoffice.org/70276
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
Tested-by: Heiko Tietze <tietze.heiko@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu | 25 | ||||
-rw-r--r-- | svx/Library_svx.mk | 1 | ||||
-rw-r--r-- | svx/UIConfig_svx.mk | 1 | ||||
-rw-r--r-- | svx/source/sidebar/PanelFactory.cxx | 5 | ||||
-rw-r--r-- | svx/source/sidebar/lists/ListsPropertyPanel.cxx | 64 | ||||
-rw-r--r-- | svx/source/sidebar/lists/ListsPropertyPanel.hxx | 52 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 6 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaPropertyPanel.hxx | 1 | ||||
-rw-r--r-- | svx/uiconfig/ui/sidebarlists.ui | 136 | ||||
-rw-r--r-- | svx/uiconfig/ui/sidebarparagraph.ui | 63 |
10 files changed, 286 insertions, 68 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu index 6f162ee14880..5d3c698d975c 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu @@ -1094,6 +1094,31 @@ </prop> </node> + <node oor:name="ListsPropertyPanel" oor:op="replace"> + <prop oor:name="Title" oor:type="xs:string"> + <value xml:lang="en-US">Lists</value> + </prop> + <prop oor:name="Id" oor:type="xs:string"> + <value>ListsPropertyPanel</value> + </prop> + <prop oor:name="DeckId" oor:type="xs:string"> + <value>PropertyDeck</value> + </prop> + <prop oor:name="ContextList"> + <value oor:separator=";"> + DrawImpress, DrawText, visible ; + DrawImpress, Table, visible ; + DrawImpress, TextObject, hidden ; + </value> + </prop> + <prop oor:name="ImplementationURL" oor:type="xs:string"> + <value>private:resource/toolpanel/SvxPanelFactory/ListsPropertyPanel</value> + </prop> + <prop oor:name="OrderIndex" oor:type="xs:int"> + <value>300</value> + </prop> + </node> + <node oor:name="SwWrapPropertyPanel" oor:op="replace"> <prop oor:name="Title" oor:type="xs:string"> <value xml:lang="en-US">Wrap</value> diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index b8043c4019fe..4677f3b475f4 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -187,6 +187,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/sidebar/text/TextUnderlinePopup \ svx/source/sidebar/text/TextPropertyPanel \ svx/source/sidebar/styles/StylesPropertyPanel \ + svx/source/sidebar/lists/ListsPropertyPanel \ svx/source/sidebar/paragraph/ParaLineSpacingControl \ svx/source/sidebar/paragraph/ParaLineSpacingPopup \ svx/source/sidebar/paragraph/ParaPropertyPanel \ diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk index a7cb36f70587..9f6a55c266e3 100644 --- a/svx/UIConfig_svx.mk +++ b/svx/UIConfig_svx.mk @@ -89,6 +89,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\ svx/uiconfig/ui/sidebargraphic \ svx/uiconfig/ui/sidebarline \ svx/uiconfig/ui/sidebarparagraph \ + svx/uiconfig/ui/sidebarlists \ svx/uiconfig/ui/sidebarpossize \ svx/uiconfig/ui/sidebarstylespanel \ svx/uiconfig/ui/sidebartextpanel \ diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx index 4eb6270dab2f..deabe5f4adb2 100644 --- a/svx/source/sidebar/PanelFactory.cxx +++ b/svx/source/sidebar/PanelFactory.cxx @@ -20,6 +20,7 @@ #include "text/TextPropertyPanel.hxx" #include "styles/StylesPropertyPanel.hxx" #include "paragraph/ParaPropertyPanel.hxx" +#include "lists/ListsPropertyPanel.hxx" #include "area/AreaPropertyPanel.hxx" #include "shadow/ShadowPropertyPanel.hxx" #include "graphic/GraphicPropertyPanel.hxx" @@ -131,6 +132,10 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( { pControl = ParaPropertyPanel::Create(pParentWindow, xFrame, pBindings, xSidebar); } + else if (rsResourceURL.endsWith("/ListsPropertyPanel")) + { + pControl = ListsPropertyPanel::Create(pParentWindow, xFrame); + } else if (rsResourceURL.endsWith("/AreaPropertyPanel")) { pControl = AreaPropertyPanel::Create(pParentWindow, xFrame, pBindings); diff --git a/svx/source/sidebar/lists/ListsPropertyPanel.cxx b/svx/source/sidebar/lists/ListsPropertyPanel.cxx new file mode 100644 index 000000000000..f739a066b711 --- /dev/null +++ b/svx/source/sidebar/lists/ListsPropertyPanel.cxx @@ -0,0 +1,64 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#include "ListsPropertyPanel.hxx" +#include <vcl/toolbox.hxx> +#include <com/sun/star/lang/IllegalArgumentException.hpp> + +using namespace css; +using namespace css::uno; + +namespace svx +{ +namespace sidebar +{ +VclPtr<vcl::Window> +ListsPropertyPanel::Create(vcl::Window* pParent, + const css::uno::Reference<css::frame::XFrame>& rxFrame) +{ + if (pParent == nullptr) + throw lang::IllegalArgumentException("no parent Window given to ListsPropertyPanel::Create", + nullptr, 0); + if (!rxFrame.is()) + throw lang::IllegalArgumentException("no XFrame given to ListsPropertyPanel::Create", + nullptr, 1); + + return VclPtr<ListsPropertyPanel>::Create(pParent, rxFrame); +} + +ListsPropertyPanel::ListsPropertyPanel(vcl::Window* pParent, + const css::uno::Reference<css::frame::XFrame>& rxFrame) + : PanelLayout(pParent, "ListsPropertyPanel", "svx/ui/sidebarlists.ui", rxFrame) +{ + get(mpTBxNumBullet, "numberbullet"); + get(mpTBxOutline, "outline"); +} + +ListsPropertyPanel::~ListsPropertyPanel() { disposeOnce(); } + +void ListsPropertyPanel::dispose() +{ + mpTBxOutline.clear(); + mpTBxNumBullet.clear(); + + PanelLayout::dispose(); +} +} +} // end of namespace svx::sidebar + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/lists/ListsPropertyPanel.hxx b/svx/source/sidebar/lists/ListsPropertyPanel.hxx new file mode 100644 index 000000000000..dc51cf9b7dae --- /dev/null +++ b/svx/source/sidebar/lists/ListsPropertyPanel.hxx @@ -0,0 +1,52 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_LISTS_LISTSPROPERTYPANEL_HXX +#define INCLUDED_SVX_SOURCE_SIDEBAR_LISTS_LISTSPROPERTYPANEL_HXX + +#include <svx/sidebar/PanelLayout.hxx> +#include <com/sun/star/frame/XFrame.hpp> + +class ToolBox; + +namespace svx +{ +namespace sidebar +{ +class ListsPropertyPanel : public PanelLayout +{ +public: + virtual ~ListsPropertyPanel() override; + virtual void dispose() override; + + static VclPtr<vcl::Window> Create(vcl::Window* pParent, + const css::uno::Reference<css::frame::XFrame>& rxFrame); + + ListsPropertyPanel(vcl::Window* pParent, + const css::uno::Reference<css::frame::XFrame>& rxFrame); + +private: + VclPtr<ToolBox> mpTBxNumBullet; + VclPtr<ToolBox> mpTBxOutline; +}; +} +} // end of namespace svx::sidebar + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 435247c69cd8..015bb11768d8 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -94,7 +94,7 @@ void ParaPropertyPanel::HandleContextChange ( case CombinedEnumContext(Application::DrawImpress, Context::Table): mpTBxVertAlign->Show(); mpTBxBackColor->Hide(); - mpTBxNumBullet->Show(); + mpTBxNumBullet->Hide(); ReSize(); break; @@ -130,8 +130,6 @@ void ParaPropertyPanel::HandleContextChange ( default: break; } - - mpTBxOutline->Show( maContext.GetApplication_DI() == vcl::EnumContext::Application::DrawImpress ); } void ParaPropertyPanel::DataChanged (const DataChangedEvent&) {} @@ -423,7 +421,6 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent, //NumBullet&Backcolor get(mpTBxNumBullet, "numberbullet"); get(mpTBxBackColor, "backgroundcolor"); - get(mpTBxOutline, "outline"); //Paragraph spacing get(mpTopDist, "aboveparaspacing"); mpTopDist->set_width_request(mpTopDist->get_preferred_size().Width()); @@ -450,7 +447,6 @@ void ParaPropertyPanel::dispose() mpTBxVertAlign.clear(); mpTBxNumBullet.clear(); mpTBxBackColor.clear(); - mpTBxOutline.clear(); mpTopDist.clear(); mpBottomDist.clear(); mpLeftIndent.clear(); diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx index 232f7c20bfa4..d7670624c5ae 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx @@ -78,7 +78,6 @@ private: VclPtr<ToolBox> mpTBxVertAlign; //NumBullet&Backcolor VclPtr<ToolBox> mpTBxNumBullet; - VclPtr<ToolBox> mpTBxOutline; VclPtr<ToolBox> mpTBxBackColor; //Paragraph spacing VclPtr<SvxRelativeField> mpTopDist; diff --git a/svx/uiconfig/ui/sidebarlists.ui b/svx/uiconfig/ui/sidebarlists.ui new file mode 100644 index 000000000000..4363d9ae8049 --- /dev/null +++ b/svx/uiconfig/ui/sidebarlists.ui @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.22.1 --> +<interface domain="svx"> + <requires lib="gtk+" version="3.18"/> + <requires lib="LibreOffice" version="1.0"/> + <object class="GtkGrid" id="ListsPropertyPanel"> + <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="sfxlo-SidebarToolBox" id="numberbullet"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_tooltip">True</property> + <property name="tooltip_text" translatable="yes" context="sidebarlists|numberbullet|tooltip_text">Bullets and Numbering</property> + <property name="show_arrow">False</property> + <child> + <object class="GtkMenuToolButton" id="bullet"> + <property name="visible">True</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="homogeneous">True</property> + </packing> + </child> + <child> + <object class="GtkMenuToolButton" id="number"> + <property name="visible">True</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="homogeneous">True</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <placeholder/> + </child> + <child> + <object class="sfxlo-SidebarToolBox" id="outline"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkToolButton" id="demote"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:OutlineRight</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="promote"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:OutlineLeft</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="movedown"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:OutlineDown</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="moveup"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="action_name">.uno:OutlineUp</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">1</property> + <property name="top_attach">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + </object> +</interface> diff --git a/svx/uiconfig/ui/sidebarparagraph.ui b/svx/uiconfig/ui/sidebarparagraph.ui index 3283ac515f09..dd0ec65b9b8e 100644 --- a/svx/uiconfig/ui/sidebarparagraph.ui +++ b/svx/uiconfig/ui/sidebarparagraph.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> +<!-- Generated with glade 3.22.1 --> <interface domain="svx"> <requires lib="gtk+" version="3.18"/> <requires lib="LibreOffice" version="1.0"/> @@ -676,66 +676,6 @@ <property name="position">0</property> </packing> </child> - <child> - <object class="sfxlo-SidebarToolBox" id="outline"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <object class="GtkToolButton" id="demote"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="action_name">.uno:OutlineRight</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="promote"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="action_name">.uno:OutlineLeft</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="movedown"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="action_name">.uno:OutlineDown</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="moveup"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="action_name">.uno:OutlineUp</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">1</property> @@ -754,7 +694,6 @@ <property name="left_attach">0</property> <property name="top_attach">2</property> <property name="width">2</property> - <property name="height">1</property> </packing> </child> </object> |