[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - officecfg/registry svx/Library_svx.mk svx/source svx/uiconfig svx/UIConfig_svx.mk

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Feb 9 09:58:27 UTC 2021


 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |   25 ++
 svx/Library_svx.mk                                           |    1 
 svx/UIConfig_svx.mk                                          |    1 
 svx/source/sidebar/PanelFactory.cxx                          |    5 
 svx/source/sidebar/fontwork/FontworkPropertyPanel.cxx        |   76 ++++++++
 svx/source/sidebar/fontwork/FontworkPropertyPanel.hxx        |   51 +++++
 svx/uiconfig/ui/sidebarfontwork.ui                           |   95 +++++++++++
 7 files changed, 254 insertions(+)

New commits:
commit 852315fa15fdd1ad1f75820e39f5fc298a552b1b
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Jan 27 10:58:12 2021 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Tue Feb 9 10:57:54 2021 +0100

    fontwork: add sidebar panel
    
    Change-Id: I092e40c17dd814d0b18f06aea01d7afa29cbad2e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110024
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index f7946142d86e..6c88f1195d7f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -688,6 +688,31 @@
         </prop>
       </node>
 
+      <node oor:name="FontworkPropertyPanel" oor:op="replace">
+        <prop oor:name="Title" oor:type="xs:string">
+          <value xml:lang="en-US">Fontwork</value>
+        </prop>
+        <prop oor:name="Id" oor:type="xs:string">
+          <value>FontworkPropertyPanel</value>
+        </prop>
+        <prop oor:name="DeckId" oor:type="xs:string">
+          <value>PropertyDeck</value>
+        </prop>
+        <prop oor:name="ContextList">
+          <value oor:separator=";">
+            Calc,           DrawFontwork,       visible ;
+            DrawImpress,    DrawFontwork,       visible ;
+            WriterVariants, DrawFontwork,       visible ;
+          </value>
+        </prop>
+        <prop oor:name="ImplementationURL" oor:type="xs:string">
+          <value>private:resource/toolpanel/SvxPanelFactory/FontworkPropertyPanel</value>
+        </prop>
+        <prop oor:name="OrderIndex" oor:type="xs:int">
+          <value>600</value>
+        </prop>
+      </node>
+
       <node oor:name="GraphicPropertyPanel" oor:op="replace">
         <prop oor:name="Title" oor:type="xs:string">
           <value xml:lang="en-US">Image</value>
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 60916bc4c3a1..dc312a81d772 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -199,6 +199,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
     svx/source/sidebar/area/AreaPropertyPanel \
     svx/source/sidebar/area/AreaPropertyPanelBase \
     svx/source/sidebar/area/AreaTransparencyGradientPopup \
+    svx/source/sidebar/fontwork/FontworkPropertyPanel \
     svx/source/sidebar/shadow/ShadowPropertyPanel \
     svx/source/sidebar/graphic/GraphicPropertyPanel \
     svx/source/sidebar/line/LinePropertyPanel \
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index a3753e2281d9..2dad0a2bb7a8 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -87,6 +87,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
 	svx/uiconfig/ui/savemodifieddialog \
 	svx/uiconfig/ui/selectionmenu \
 	svx/uiconfig/ui/sidebararea \
+	svx/uiconfig/ui/sidebarfontwork \
 	svx/uiconfig/ui/sidebarshadow \
 	svx/uiconfig/ui/sidebargraphic \
 	svx/uiconfig/ui/sidebarline \
diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx
index a22a889a382a..b532a845c877 100644
--- a/svx/source/sidebar/PanelFactory.cxx
+++ b/svx/source/sidebar/PanelFactory.cxx
@@ -24,6 +24,7 @@
 #include "paragraph/ParaPropertyPanel.hxx"
 #include "lists/ListsPropertyPanel.hxx"
 #include "area/AreaPropertyPanel.hxx"
+#include "fontwork/FontworkPropertyPanel.hxx"
 #include "shadow/ShadowPropertyPanel.hxx"
 #include "graphic/GraphicPropertyPanel.hxx"
 #include "line/LinePropertyPanel.hxx"
@@ -141,6 +142,10 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
     {
         pControl = AreaPropertyPanel::Create(pParentWindow, xFrame, pBindings);
     }
+    else if (rsResourceURL.endsWith("/FontworkPropertyPanel"))
+    {
+        pControl = FontworkPropertyPanel::Create(pParentWindow, xFrame);
+    }
     else if (rsResourceURL.endsWith("/ShadowPropertyPanel"))
     {
         pControl = ShadowPropertyPanel::Create(pParentWindow, xFrame, pBindings);
diff --git a/svx/source/sidebar/fontwork/FontworkPropertyPanel.cxx b/svx/source/sidebar/fontwork/FontworkPropertyPanel.cxx
new file mode 100644
index 000000000000..d6d2143396b3
--- /dev/null
+++ b/svx/source/sidebar/fontwork/FontworkPropertyPanel.cxx
@@ -0,0 +1,76 @@
+/* -*- 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 <sfx2/sidebar/ControlFactory.hxx>
+#include "FontworkPropertyPanel.hxx"
+#include <svx/svxids.hrc>
+#include <sfx2/objsh.hxx>
+#include <svx/xfltrit.hxx>
+#include <svx/xflftrit.hxx>
+#include <svx/xtable.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/bindings.hxx>
+#include <svtools/valueset.hxx>
+#include <unotools/pathoptions.hxx>
+#include <svx/svxitems.hrc>
+#include <vcl/toolbox.hxx>
+#include <svtools/toolbarmenu.hxx>
+#include <comphelper/lok.hxx>
+
+using namespace css;
+using namespace css::uno;
+
+namespace svx
+{
+namespace sidebar
+{
+FontworkPropertyPanel::FontworkPropertyPanel(vcl::Window* pParent,
+                                             const css::uno::Reference<css::frame::XFrame>& rxFrame)
+    : PanelLayout(pParent, "FontworkPropertyPanel", "svx/ui/sidebarfontwork.ui", rxFrame)
+    , m_xToolbox(get<sfx2::sidebar::SidebarToolBox>("fontwork-toolbox"))
+{
+    if (comphelper::LibreOfficeKit::isActive())
+        m_xToolbox->HideItem(m_xToolbox->GetItemId(".uno:ExtrusionToggle"));
+}
+
+void FontworkPropertyPanel::dispose()
+{
+    m_xToolbox.disposeAndClear();
+    PanelLayout::dispose();
+}
+
+FontworkPropertyPanel::~FontworkPropertyPanel() { disposeOnce(); }
+
+VclPtr<vcl::Window>
+FontworkPropertyPanel::Create(vcl::Window* pParent,
+                              const css::uno::Reference<css::frame::XFrame>& rxFrame)
+{
+    if (pParent == nullptr)
+        throw lang::IllegalArgumentException(
+            "no parent Window given to FontworkPropertyPanel::Create", nullptr, 0);
+    if (!rxFrame.is())
+        throw lang::IllegalArgumentException("no XFrame given to FontworkPropertyPanel::Create",
+                                             nullptr, 1);
+
+    return VclPtr<FontworkPropertyPanel>::Create(pParent, rxFrame);
+}
+}
+} // end of namespace svx::sidebar
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/fontwork/FontworkPropertyPanel.hxx b/svx/source/sidebar/fontwork/FontworkPropertyPanel.hxx
new file mode 100644
index 000000000000..1d3256d00762
--- /dev/null
+++ b/svx/source/sidebar/fontwork/FontworkPropertyPanel.hxx
@@ -0,0 +1,51 @@
+/* -*- 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_AREA_FONTWORKPROPERTYPANEL_HXX
+#define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_FONTWORKPROPERTYPANEL_HXX
+
+#include <svx/sidebar/PanelLayout.hxx>
+#include <com/sun/star/ui/XUIElement.hpp>
+#include <sfx2/sidebar/SidebarToolBox.hxx>
+
+namespace svx
+{
+namespace sidebar
+{
+class FontworkPropertyPanel : public PanelLayout
+{
+public:
+    static VclPtr<vcl::Window> Create(vcl::Window* pParent,
+                                      const css::uno::Reference<css::frame::XFrame>& rxFrame);
+
+    // constructor/destructor
+    FontworkPropertyPanel(vcl::Window* pParent,
+                          const css::uno::Reference<css::frame::XFrame>& rxFrame);
+
+    virtual ~FontworkPropertyPanel() override;
+    virtual void dispose() override;
+
+private:
+    VclPtr<sfx2::sidebar::SidebarToolBox> m_xToolbox;
+};
+}
+} // end of namespace svx::sidebar
+
+#endif // INCLUDED_SVX_SOURCE_SIDEBAR_AREA_FONTWORKPROPERTYPANEL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/uiconfig/ui/sidebarfontwork.ui b/svx/uiconfig/ui/sidebarfontwork.ui
new file mode 100644
index 000000000000..89ee89cecfb9
--- /dev/null
+++ b/svx/uiconfig/ui/sidebarfontwork.ui
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.4 -->
+<interface domain="svx">
+  <requires lib="gtk+" version="3.18"/>
+  <object class="GtkGrid" id="FontworkPropertyPanel">
+    <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="sfxlo-SidebarToolBox" id="fontwork-toolbox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkToolButton" id="FontworkShapeType">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">.uno:FontworkShapeType</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="FontworkSameLetterHeights">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">.uno:FontworkSameLetterHeights</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="FontworkAlignmentFloater">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">.uno:FontworkAlignmentFloater</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="FontworkCharacterSpacingFloater">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">.uno:FontworkCharacterSpacingFloater</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="ExtrusionToggle">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">.uno:ExtrusionToggle</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>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+      </packing>
+    </child>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list