Kaydet (Commit) c6f5ee19 authored tarafından Gülşah Köse's avatar Gülşah Köse Kaydeden (comit) Andras Timar

Add new list panel to Impress Properties deck

Change-Id: Idb3a4dee104b2df0283852efcecbd0b25a765d5a
Reviewed-on: https://gerrit.libreoffice.org/70276
Tested-by: Jenkins
Reviewed-by: 's avatarHeiko Tietze <tietze.heiko@gmail.com>
Tested-by: 's avatarHeiko Tietze <tietze.heiko@gmail.com>
Reviewed-by: 's avatarAndras Timar <andras.timar@collabora.com>
üst 4c4d9a48
......@@ -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>
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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);
......
/* -*- 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: */
/* -*- 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: */
......@@ -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();
......
......@@ -78,7 +78,6 @@ private:
VclPtr<ToolBox> mpTBxVertAlign;
//NumBullet&Backcolor
VclPtr<ToolBox> mpTBxNumBullet;
VclPtr<ToolBox> mpTBxOutline;
VclPtr<ToolBox> mpTBxBackColor;
//Paragraph spacing
VclPtr<SvxRelativeField> mpTopDist;
......
<?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>
<?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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment