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 /svx/source/sidebar | |
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>
Diffstat (limited to 'svx/source/sidebar')
-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 |
5 files changed, 122 insertions, 6 deletions
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; |