[Libreoffice-commits] core.git: 2 commits - include/svx svx/source svx/uiconfig svx/UIConfig_svx.mk

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 21 14:14:19 UTC 2020


 include/svx/strings.hrc                           |    1 
 svx/UIConfig_svx.mk                               |    1 
 svx/source/sidebar/EmptyPanel.cxx                 |   25 +----------
 svx/source/sidebar/EmptyPanel.hxx                 |   12 +----
 svx/source/sidebar/line/LinePropertyPanelBase.cxx |    2 
 svx/uiconfig/ui/sidebarempty.ui                   |   47 ++++++++++++++++++++++
 6 files changed, 57 insertions(+), 31 deletions(-)

New commits:
commit 59ebcdd732a74c0e4ec536921c13ff4f9577d4b0
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jan 21 09:05:00 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jan 21 15:13:58 2020 +0100

    weld EmptyPanel
    
    Change-Id: I17306b33f145c3b24a88a797c1a2133b19884f4f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87121
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 02d249e64664..6bdb64c0efba 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1272,7 +1272,6 @@
 #define RID_SVXSTR_ZOOM_WHOLE_PAGE                          NC_("RID_SVXSTR_ZOOM_WHOLE_PAGE", "Entire Page")
 #define RID_SVXSTR_ZOOM_PAGE_WIDTH                          NC_("RID_SVXSTR_ZOOM_PAGE_WIDTH", "Page Width")
 #define RID_SVXSTR_ZOOM_OPTIMAL_VIEW                        NC_("RID_SVXSTR_ZOOM_OPTIMAL_VIEW", "Optimal View")
-#define RID_SIDEBAR_EMPTY_PANEL_TEXT                        NC_("RID_SIDEBAR_EMPTY_PANEL_TEXT", "Properties for the task that you are performing are not available for the current selection")
 
 #define RID_SVXSTR_SEARCH_STYLES                            NC_("RID_SVXSTR_SEARCH_STYLES", "Including Styles")
 #define RID_SVXSTR_WRITER_STYLES                            NC_("RID_SVXSTR_WRITER_STYLES", "Paragraph St~yles")
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 08b3ccb2dd5b..dd0ac621adcc 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -96,6 +96,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
 	svx/uiconfig/ui/savemodifieddialog \
 	svx/uiconfig/ui/selectionmenu \
 	svx/uiconfig/ui/sidebararea \
+	svx/uiconfig/ui/sidebarempty \
 	svx/uiconfig/ui/sidebarshadow \
 	svx/uiconfig/ui/sidebargallery \
 	svx/uiconfig/ui/sidebargraphic \
diff --git a/svx/source/sidebar/EmptyPanel.cxx b/svx/source/sidebar/EmptyPanel.cxx
index 23bf1ab2c17a..39704527deac 100644
--- a/svx/source/sidebar/EmptyPanel.cxx
+++ b/svx/source/sidebar/EmptyPanel.cxx
@@ -24,18 +24,9 @@
 namespace svx::sidebar {
 
 EmptyPanel::EmptyPanel (vcl::Window* pParent)
-    : Control(pParent)
-    , maMessageControl(VclPtr<FixedText>::Create(this))
+    : PanelLayout(pParent, "EmptyPanel", "svx/ui/sidebarempty.ui", nullptr, true)
+    , mxMessageControl(m_xBuilder->weld_label("message"))
 {
-    maMessageControl->SetText(SvxResId(RID_SIDEBAR_EMPTY_PANEL_TEXT));
-    maMessageControl->setPosSizePixel(5, 5, 250, 15);
-    maMessageControl->SetStyle(WB_WORDBREAK);
-    maMessageControl->Show();
-
-    SetBackground(Wallpaper());
-
-    maMessageControl->Show();
-    Show();
 }
 
 EmptyPanel::~EmptyPanel()
@@ -45,18 +36,10 @@ EmptyPanel::~EmptyPanel()
 
 void EmptyPanel::dispose()
 {
-    maMessageControl.disposeAndClear();
-    Control::dispose();
+    mxMessageControl.reset();
+    PanelLayout::dispose();
 }
 
-
-void EmptyPanel::Resize()
-{
-    const Size aSize (GetSizePixel());
-    maMessageControl->SetSizePixel(aSize);
-}
-
-
 } // end of namespace svx::sidebar
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/EmptyPanel.hxx b/svx/source/sidebar/EmptyPanel.hxx
index 3fcd07e5910e..aa3e1a5b2f7b 100644
--- a/svx/source/sidebar/EmptyPanel.hxx
+++ b/svx/source/sidebar/EmptyPanel.hxx
@@ -19,10 +19,7 @@
 #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_EMPTYPANEL_HXX
 #define INCLUDED_SVX_SOURCE_SIDEBAR_EMPTYPANEL_HXX
 
-#include <vcl/window.hxx>
-#include <vcl/ctrl.hxx>
-#include <vcl/fixed.hxx>
-
+#include <svx/sidebar/PanelLayout.hxx>
 
 namespace svx { namespace sidebar {
 
@@ -30,18 +27,15 @@ namespace svx { namespace sidebar {
 /** Display a panel that tells the user that the current deck is
     intentionally empty.
 */
-class EmptyPanel
-    : public Control
+class EmptyPanel final : public PanelLayout
 {
 public:
     explicit EmptyPanel (vcl::Window* pParent);
     virtual ~EmptyPanel() override;
     virtual void dispose() override;
 
-    virtual void Resize() override;
-
 private:
-    VclPtr<FixedText> maMessageControl;
+    std::unique_ptr<weld::Label> mxMessageControl;
 };
 
 } } // end of namespace svx::sidebar
diff --git a/svx/uiconfig/ui/sidebarempty.ui b/svx/uiconfig/ui/sidebarempty.ui
new file mode 100644
index 000000000000..4a59d8f5592e
--- /dev/null
+++ b/svx/uiconfig/ui/sidebarempty.ui
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<interface domain="svx">
+  <requires lib="gtk+" version="3.18"/>
+  <object class="GtkGrid" id="EmptyPanel">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
+    <property name="border_width">6</property>
+    <child>
+      <object class="GtkGrid" id="container">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="border_width">6</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkLabel" id="message">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="label" translatable="yes" context="sidebarempty|RID_SIDEBAR_EMPTY_PANEL_TEXT">Properties for the task that you are performing are not available for the current selection"</property>
+            <property name="wrap">True</property>
+            <property name="max_width_chars">12</property>
+            <property name="xalign">0</property>
+            <property name="yalign">0</property>
+            <child internal-child="accessible">
+              <object class="AtkObject" id="message-atkobject">
+                <property name="AtkObject::accessible-role" translatable="no">static</property>
+              </object>
+            </child>
+        </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+      </packing>
+    </child>
+  </object>
+</interface>
commit d460dc65525be7e5410978f80bda0cd0616b8d60
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jan 21 10:39:13 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jan 21 15:13:46 2020 +0100

    remove duplicate arrow heads in list
    
    Change-Id: If8769c0ce3ff0d438e5e4768d75d2dd8a32dbf57
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87129
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
index fd17197df3f1..91b6b6931c51 100644
--- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
@@ -623,6 +623,8 @@ void  LinePropertyPanelBase::FillLineEndList()
     if ( pSh && pSh->GetItem( SID_LINEEND_LIST ) )
     {
         mxLBStart->set_sensitive(true);
+        mxLBStart->clear();
+        mxLBEnd->clear();
         mxLineEndList = pSh->GetItem( SID_LINEEND_LIST )->GetLineEndList();
 
         if (mxLineEndList.is())


More information about the Libreoffice-commits mailing list