summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2016-04-06 09:07:28 +0200
committerJan Holesovsky <kendy@collabora.com>2016-04-06 09:24:40 +0200
commitb091d1c745d2895b0634983488bd379d357c3342 (patch)
treee4ac85f70152f8e61d8ce36186c8c8b69d3ecbb2
parent6d7366c80bee15c8d00168efa30c731cead566cb (diff)
tdf#73070 follow-up: Remove also the InsertPropertyPanel code.
The panel is not visible for 2 years now, so remove the code too. Change-Id: Id02de5fb1fda471763b2aac893ef7d0fc61ef1c0
-rw-r--r--svx/Library_svx.mk1
-rw-r--r--svx/UIConfig_svx.mk3
-rw-r--r--svx/source/sidebar/PanelFactory.cxx5
-rw-r--r--svx/source/sidebar/insert/InsertPropertyPanel.cxx140
-rw-r--r--svx/source/sidebar/insert/InsertPropertyPanel.hxx59
-rw-r--r--svx/uiconfig/ui/sidebarinsert.ui256
6 files changed, 1 insertions, 463 deletions
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index b22dfa2ad999..f664d40562c5 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -202,7 +202,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/sidebar/tools/PopupContainer \
svx/source/sidebar/tools/Popup \
svx/source/sidebar/tools/ValueSetWithTextControl \
- svx/source/sidebar/insert/InsertPropertyPanel \
svx/source/stbctrls/pszctrl \
svx/source/stbctrls/insctrl \
svx/source/stbctrls/selctrl \
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index c7853f8778c6..e56c9bd80f04 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -63,11 +63,10 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/sidebararea \
svx/uiconfig/ui/sidebarshadow \
svx/uiconfig/ui/sidebargraphic \
- svx/uiconfig/ui/sidebarinsert \
svx/uiconfig/ui/sidebarline \
svx/uiconfig/ui/sidebarparagraph \
svx/uiconfig/ui/sidebarpossize \
- svx/uiconfig/ui/sidebarstylespanel \
+ svx/uiconfig/ui/sidebarstylespanel \
svx/uiconfig/ui/sidebartextpanel \
svx/uiconfig/ui/textcontrolchardialog \
svx/uiconfig/ui/textcontrolparadialog \
diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx
index 0fb9d00076b8..3c2d80d66977 100644
--- a/svx/source/sidebar/PanelFactory.cxx
+++ b/svx/source/sidebar/PanelFactory.cxx
@@ -25,7 +25,6 @@
#include "graphic/GraphicPropertyPanel.hxx"
#include "line/LinePropertyPanel.hxx"
#include "possize/PosSizePropertyPanel.hxx"
-#include "insert/InsertPropertyPanel.hxx"
#include "GalleryControl.hxx"
#include "EmptyPanel.hxx"
#include <sfx2/sidebar/SidebarPanelBase.hxx>
@@ -169,10 +168,6 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
{
pControl = PosSizePropertyPanel::Create(pParentWindow, xFrame, pBindings, xSidebar);
}
- else if (rsResourceURL.endsWith("/InsertPropertyPanel"))
- {
- pControl.reset(VclPtr<InsertPropertyPanel>::Create(pParentWindow, xFrame));
- }
else if (rsResourceURL.endsWith("/GalleryPanel"))
{
pControl.reset(VclPtr<GalleryControl>::Create(pBindings, pParentWindow));
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.cxx b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
deleted file mode 100644
index 164fbc03d32a..000000000000
--- a/svx/source/sidebar/insert/InsertPropertyPanel.cxx
+++ /dev/null
@@ -1,140 +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/.
- *
- * 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 "InsertPropertyPanel.hxx"
-
-#include <sfx2/sidebar/Theme.hxx>
-#include <sfx2/sidebar/Tools.hxx>
-#include <sfx2/sidebar/ControlFactory.hxx>
-#include <sfx2/sidebar/ControllerFactory.hxx>
-
-#include <svx/dialmgr.hxx>
-#include <svtools/miscopt.hxx>
-#include <svtools/generictoolboxcontroller.hxx>
-#include <vcl/toolbox.hxx>
-#include <sfx2/tbxctrl.hxx>
-#include <framework/sfxhelperfunctions.hxx>
-#include <comphelper/processfactory.hxx>
-#include <cppuhelper/basemutex.hxx>
-
-#include <com/sun/star/frame/XStatusListener.hpp>
-
-using namespace css;
-using namespace css::uno;
-using ::rtl::OUString;
-using ::sfx2::sidebar::SidebarToolBox;
-
-namespace svx { namespace sidebar {
-
-
-InsertPropertyPanel::InsertPropertyPanel (
- vcl::Window* pParent,
- const css::uno::Reference<css::frame::XFrame>& rxFrame)
- : PanelLayout(pParent, "InsertPropertyPanel", "svx/ui/sidebarinsert.ui", rxFrame)
-{
- get(mpStandardShapesToolBox, "standardshapes");
- get(mpCustomShapesToolBox, "customshapes");
-
- mpStandardShapesToolBox->Show();
- mpCustomShapesToolBox->Show();
-
- // Listen to all tool box selection events.
- // FIXME: This is an incredibly ugly hack that we should kill at some
- // stage. It is needed because the mpCustomShapesToolBox somehow does not
- // get the right controller, and so the images there are not updated when
- // the user selects eg. a callout. But using the help id's to get/update
- // it (that is what functionSelected() does) is not the way to go in
- // general ;-)
- // In other words, we should find the underlying problem, and remove the
- // WindowEventListener for good.
- vcl::Window* pTopWindow = pParent;
- while (pTopWindow->GetParent() != nullptr)
- pTopWindow = pTopWindow->GetParent();
- pTopWindow->AddChildEventListener(LINK(this, InsertPropertyPanel, WindowEventListener));
-}
-
-InsertPropertyPanel::~InsertPropertyPanel()
-{
- disposeOnce();
-}
-
-void InsertPropertyPanel::dispose()
-{
- // Remove window child listener.
- vcl::Window* pTopWindow = this;
- while (pTopWindow->GetParent() != nullptr)
- pTopWindow = pTopWindow->GetParent();
- pTopWindow->RemoveChildEventListener(LINK(this, InsertPropertyPanel, WindowEventListener));
- mpStandardShapesToolBox.clear();
- mpCustomShapesToolBox.clear();
- PanelLayout::dispose();
-}
-
-
-IMPL_LINK_TYPED(InsertPropertyPanel, WindowEventListener, VclWindowEvent&, rEvent, void)
-{
- // We will be getting a lot of window events (well, basically all
- // of them), so reject early everything that is not connected to
- // toolbox selection.
- if (rEvent.GetId() != VCLEVENT_TOOLBOX_SELECT)
- return;
-
- vcl::Window* pWindow = rEvent.GetWindow();
- ToolBox* pToolBox = dynamic_cast<ToolBox*>(pWindow);
- if (pToolBox == nullptr)
- return;
-
- // Extract name of (sub)toolbar from help id.
- OUString sToolbarName (rtl::OStringToOUString(pToolBox->GetHelpId(), RTL_TEXTENCODING_UTF8));
- if (sToolbarName.getLength() == 0)
- return;
- const util::URL aURL (sfx2::sidebar::Tools::GetURL(sToolbarName));
- if (aURL.Path.getLength() == 0)
- return;
-
- // Get item id.
- sal_uInt16 nId = pToolBox->GetCurItemId();
- if (nId == 0)
- return;
-
- SidebarToolBox* pSidebarToolBox = dynamic_cast<SidebarToolBox*>(mpStandardShapesToolBox.get());
- if (pSidebarToolBox == nullptr)
- return;
- sal_uInt16 nItemId (pSidebarToolBox->GetItemIdForSubToolbarName(aURL.Path));
- if (nItemId == 0)
- {
- pSidebarToolBox = dynamic_cast<SidebarToolBox*>(mpCustomShapesToolBox.get());
- if (pSidebarToolBox == nullptr)
- return;
- nItemId = pSidebarToolBox->GetItemIdForSubToolbarName(aURL.Path);
- if (nItemId == 0)
- return;
- }
-
- Reference<css::frame::XSubToolbarController> xController (pSidebarToolBox->GetControllerForItemId(nItemId), UNO_QUERY);
- if ( ! xController.is() )
- return;
-
- const OUString sCommand (pToolBox->GetItemCommand(nId));
- xController->functionSelected(sCommand);
-}
-
-
-} } // end of namespace svx::sidebar
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.hxx b/svx/source/sidebar/insert/InsertPropertyPanel.hxx
deleted file mode 100644
index ee5c6fffb406..000000000000
--- a/svx/source/sidebar/insert/InsertPropertyPanel.hxx
+++ /dev/null
@@ -1,59 +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/.
- *
- * 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_INSERT_INSERTPROPERTYPANEL_HXX
-#define INCLUDED_SVX_SOURCE_SIDEBAR_INSERT_INSERTPROPERTYPANEL_HXX
-
-#include <vcl/ctrl.hxx>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XToolbarController.hpp>
-
-#include <map>
-#include <svx/sidebar/PanelLayout.hxx>
-
-
-class ToolBox;
-
-namespace svx { namespace sidebar {
-
-/** This panel provides buttons for inserting shapes into a document.
-*/
-class InsertPropertyPanel
- : public PanelLayout
-{
-public:
- InsertPropertyPanel (
- vcl::Window* pParent,
- const css::uno::Reference<css::frame::XFrame>& rxFrame);
- virtual ~InsertPropertyPanel();
- virtual void dispose() override;
-
-private:
- VclPtr<ToolBox> mpStandardShapesToolBox;
- VclPtr<ToolBox> mpCustomShapesToolBox;
-
- DECL_LINK_TYPED(WindowEventListener, VclWindowEvent&, void);
-};
-
-
-} } // end of namespace svx::sidebar
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/uiconfig/ui/sidebarinsert.ui b/svx/uiconfig/ui/sidebarinsert.ui
deleted file mode 100644
index 909b75a62c8f..000000000000
--- a/svx/uiconfig/ui/sidebarinsert.ui
+++ /dev/null
@@ -1,256 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
- <!-- interface-requires gtk+ 3.0 -->
- <object class="GtkGrid" id="InsertPropertyPanel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_homogeneous">True</property>
- <property name="column_homogeneous">True</property>
- <child>
- <object class="GtkBox" id="box1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="sfxlo-SidebarToolBox" id="standardshapes">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkToolButton" id="line">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Line</property>
- <property name="tooltip_text" translatable="yes">Line</property>
- <property name="action_name">.uno:Line</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="arrow">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Line ends with Arrow</property>
- <property name="tooltip_text" translatable="yes">Line ends with Arrow</property>
- <property name="action_name">.uno:LineArrowEnd</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="rectangle">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Rectangle</property>
- <property name="tooltip_text" translatable="yes">Rectangle</property>
- <property name="action_name">.uno:Rect</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="ellipse">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Ellipse</property>
- <property name="tooltip_text" translatable="yes">Ellipse</property>
- <property name="action_name">.uno:Ellipse</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="text">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Text (F2)</property>
- <property name="tooltip_text" translatable="yes">Text (F2)</property>
- <property name="action_name">.uno:Text</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="curve">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Curve</property>
- <property name="tooltip_text" translatable="yes">Curve</property>
- <property name="action_name">.uno:LineToolbox</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="connector">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Connector</property>
- <property name="tooltip_text" translatable="yes">Connector</property>
- <property name="action_name">.uno:ConnectorToolbox</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="linearrow">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Lines and Arrows</property>
- <property name="tooltip_text" translatable="yes">Lines and Arrows</property>
- <property name="action_name">.uno:ArrowsToolbox</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="customshapes">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">6</property>
- <child>
- <object class="GtkMenuToolButton" id="basicshapes">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Basic Shapes</property>
- <property name="tooltip_text" translatable="yes">Basic Shapes</property>
- <property name="action_name">.uno:BasicShapes</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="symbolshapes">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Symbol Shapes</property>
- <property name="tooltip_text" translatable="yes">Symbol Shapes</property>
- <property name="action_name">.uno:SymbolShapes</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="blockarrows">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Block Arrows</property>
- <property name="tooltip_text" translatable="yes">Block Arrows</property>
- <property name="action_name">.uno:ArrowShapes</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="flowcharts">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Flowcharts</property>
- <property name="tooltip_text" translatable="yes">Flowcharts</property>
- <property name="action_name">.uno:FlowChartShapes</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="callouts">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Callouts</property>
- <property name="tooltip_text" translatable="yes">Callouts</property>
- <property name="action_name">.uno:CalloutShapes</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="stars">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Stars</property>
- <property name="tooltip_text" translatable="yes">Stars</property>
- <property name="action_name">.uno:StarShapes</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>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
-</interface>