[Libreoffice-commits] core.git: sc/source sc/uiconfig sd/source sd/uiconfig sd/UIConfig_simpress.mk sw/source sw/uiconfig

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 19 16:11:21 UTC 2021


 sc/source/ui/sidebar/CellLineStyleControl.cxx       |    2 -
 sc/uiconfig/scalc/ui/floatinglinestyle.ui           |    2 -
 sd/UIConfig_simpress.mk                             |    2 +
 sd/source/ui/sidebar/AllMasterPagesSelector.cxx     |    2 -
 sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx |    2 -
 sd/source/ui/sidebar/LayoutMenu.cxx                 |    2 -
 sd/source/ui/sidebar/MasterPagesSelector.cxx        |    8 ++++--
 sd/source/ui/sidebar/MasterPagesSelector.hxx        |    4 ++-
 sd/source/ui/sidebar/RecentMasterPagesSelector.cxx  |    2 -
 sd/uiconfig/simpress/ui/layoutpanel.ui              |    2 -
 sd/uiconfig/simpress/ui/masterpagepanel.ui          |    2 -
 sd/uiconfig/simpress/ui/masterpagepanelall.ui       |   25 ++++++++++++++++++++
 sd/uiconfig/simpress/ui/masterpagepanelrecent.ui    |   25 ++++++++++++++++++++
 sw/source/uibase/sidebar/PageSizeControl.cxx        |    2 -
 sw/uiconfig/swriter/ui/pagesizecontrol.ui           |    2 -
 15 files changed, 70 insertions(+), 14 deletions(-)

New commits:
commit e4f804852279006934731008a1b37aa674dcbe97
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jun 8 14:05:14 2021 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Jul 19 18:10:46 2021 +0200

    jsdialog: sidebar: avoid duplicated widget ids
    
    all controls for sidebar goes to the same window id
    we need different names for every widget so
    create valuesets with different name every time
    
    Change-Id: I69074e607bfe5fa6db665c0dbcae1f029d13a161
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116836
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119196
    Tested-by: Jenkins

diff --git a/sc/source/ui/sidebar/CellLineStyleControl.cxx b/sc/source/ui/sidebar/CellLineStyleControl.cxx
index 70dab1825de2..9c078994dd36 100644
--- a/sc/source/ui/sidebar/CellLineStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleControl.cxx
@@ -35,7 +35,7 @@ CellLineStylePopup::CellLineStylePopup(weld::Toolbar* pParent, const OString& rI
     , maToolButton(pParent, rId)
     , mpDispatcher(pDispatcher)
     , mxCellLineStyleValueSet(new sc::sidebar::CellLineStyleValueSet)
-    , mxCellLineStyleValueSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxCellLineStyleValueSet))
+    , mxCellLineStyleValueSetWin(new weld::CustomWeld(*m_xBuilder, "linestylevalueset", *mxCellLineStyleValueSet))
     , mxPushButtonMoreOptions(m_xBuilder->weld_button("more"))
 {
     Initialize();
diff --git a/sc/uiconfig/scalc/ui/floatinglinestyle.ui b/sc/uiconfig/scalc/ui/floatinglinestyle.ui
index f18f610b62ad..9f5cd374a9f4 100644
--- a/sc/uiconfig/scalc/ui/floatinglinestyle.ui
+++ b/sc/uiconfig/scalc/ui/floatinglinestyle.ui
@@ -48,7 +48,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkDrawingArea" id="valueset">
+                      <object class="GtkDrawingArea" id="linestylevalueset">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="has_focus">True</property>
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk
index cf618594f8ac..4edab7d4d5d9 100644
--- a/sd/UIConfig_simpress.mk
+++ b/sd/UIConfig_simpress.mk
@@ -137,6 +137,8 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
 	sd/uiconfig/simpress/ui/mastermenu \
 	sd/uiconfig/simpress/ui/masterpagemenu \
 	sd/uiconfig/simpress/ui/masterpagepanel \
+	sd/uiconfig/simpress/ui/masterpagepanelall \
+	sd/uiconfig/simpress/ui/masterpagepanelrecent \
 	sd/uiconfig/simpress/ui/navigatorpanel \
 	sd/uiconfig/simpress/ui/notebookbar \
 	sd/uiconfig/simpress/ui/notebookbar_compact \
diff --git a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
index 21fbff298633..76e056120ec8 100644
--- a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
@@ -103,7 +103,7 @@ AllMasterPagesSelector::AllMasterPagesSelector (
     ViewShellBase& rBase,
     const std::shared_ptr<MasterPageContainer>& rpContainer,
     const css::uno::Reference<css::ui::XSidebar>& rxSidebar)
-    : MasterPagesSelector(pParent, rDocument, rBase, rpContainer, rxSidebar),
+    : MasterPagesSelector(pParent, rDocument, rBase, rpContainer, rxSidebar, "modules/simpress/ui/masterpagepanelall.ui", "allvalueset"),
       mpSortedMasterPages(new SortedMasterPageDescriptorList())
 {
     MasterPagesSelector::Fill();
diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
index fbad335c4b26..269099edd0c1 100644
--- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
@@ -67,7 +67,7 @@ CurrentMasterPagesSelector::CurrentMasterPagesSelector (
     ViewShellBase& rBase,
     const std::shared_ptr<MasterPageContainer>& rpContainer,
     const css::uno::Reference<css::ui::XSidebar>& rxSidebar)
-    : MasterPagesSelector (pParent, rDocument, rBase, rpContainer, rxSidebar)
+    : MasterPagesSelector (pParent, rDocument, rBase, rpContainer, rxSidebar, "modules/simpress/ui/masterpagepanel.ui", "usedvalueset")
 {
     Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener));
     rBase.GetEventMultiplexer()->AddEventListener(aLink);
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index 2c71b8f921dc..469ee474a222 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -160,7 +160,7 @@ LayoutMenu::LayoutMenu (
     : PanelLayout( pParent, "LayoutPanel", "modules/simpress/ui/layoutpanel.ui" ),
       mrBase(rViewShellBase),
       mxLayoutValueSet(new LayoutValueSet(*this)),
-      mxLayoutValueSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxLayoutValueSet)),
+      mxLayoutValueSetWin(new weld::CustomWeld(*m_xBuilder, "layoutvalueset", *mxLayoutValueSet)),
       mbIsMainViewChangePending(false),
       mxSidebar(rxSidebar),
       mbIsDisposed(false)
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index a70ba8ce22dd..fe4af9be67a4 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -57,12 +57,14 @@ MasterPagesSelector::MasterPagesSelector (
     SdDrawDocument& rDocument,
     ViewShellBase& rBase,
     const std::shared_ptr<MasterPageContainer>& rpContainer,
-    const css::uno::Reference<css::ui::XSidebar>& rxSidebar)
-    : PanelLayout( pParent, "MasterPagePanel", "modules/simpress/ui/masterpagepanel.ui" ),
+    const css::uno::Reference<css::ui::XSidebar>& rxSidebar,
+    const OUString& rUIFileName,
+    const OString& rValueSetName)
+    : PanelLayout( pParent, "MasterPagePanel", rUIFileName ),
       maMutex(),
       mpContainer(rpContainer),
       mxPreviewValueSet(new PreviewValueSet),
-      mxPreviewValueSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxPreviewValueSet)),
+      mxPreviewValueSetWin(new weld::CustomWeld(*m_xBuilder, rValueSetName, *mxPreviewValueSet)),
       mrDocument(rDocument),
       mrBase(rBase),
       maCurrentItemList(),
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.hxx b/sd/source/ui/sidebar/MasterPagesSelector.hxx
index 951a4d6c1667..1b69327892b9 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.hxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.hxx
@@ -51,7 +51,9 @@ public:
         SdDrawDocument& rDocument,
         ViewShellBase& rBase,
         const std::shared_ptr<MasterPageContainer>& rpContainer,
-        const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
+        const css::uno::Reference<css::ui::XSidebar>& rxSidebar,
+        const OUString& rUIFileName,
+        const OString& rValueSetName);
     virtual ~MasterPagesSelector() override;
 
     virtual void LateInit();
diff --git a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
index 4d6cd31ebe94..6e5a46c736a1 100644
--- a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
@@ -57,7 +57,7 @@ RecentMasterPagesSelector::RecentMasterPagesSelector (
     ViewShellBase& rBase,
     const std::shared_ptr<MasterPageContainer>& rpContainer,
     const css::uno::Reference<css::ui::XSidebar>& rxSidebar)
-    : MasterPagesSelector (pParent, rDocument, rBase, rpContainer, rxSidebar)
+    : MasterPagesSelector (pParent, rDocument, rBase, rpContainer, rxSidebar, "modules/simpress/ui/masterpagepanelrecent.ui", "recentvalueset")
 {
 }
 
diff --git a/sd/uiconfig/simpress/ui/layoutpanel.ui b/sd/uiconfig/simpress/ui/layoutpanel.ui
index 1151b4ea4c14..5eb7122daea6 100644
--- a/sd/uiconfig/simpress/ui/layoutpanel.ui
+++ b/sd/uiconfig/simpress/ui/layoutpanel.ui
@@ -9,7 +9,7 @@
     <property name="hexpand">True</property>
     <property name="vexpand">True</property>
     <child>
-      <object class="GtkDrawingArea" id="valueset">
+      <object class="GtkDrawingArea" id="layoutvalueset">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
diff --git a/sd/uiconfig/simpress/ui/masterpagepanel.ui b/sd/uiconfig/simpress/ui/masterpagepanel.ui
index a89ca203ea94..429032ed2148 100644
--- a/sd/uiconfig/simpress/ui/masterpagepanel.ui
+++ b/sd/uiconfig/simpress/ui/masterpagepanel.ui
@@ -9,7 +9,7 @@
     <property name="hexpand">True</property>
     <property name="vexpand">True</property>
     <child>
-      <object class="GtkDrawingArea" id="valueset">
+      <object class="GtkDrawingArea" id="usedvalueset">
         <property name="visible">True</property>
         <property name="can-focus">True</property>
         <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
diff --git a/sd/uiconfig/simpress/ui/masterpagepanelall.ui b/sd/uiconfig/simpress/ui/masterpagepanelall.ui
new file mode 100644
index 000000000000..979d06990e9e
--- /dev/null
+++ b/sd/uiconfig/simpress/ui/masterpagepanelall.ui
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.38.2 -->
+<interface domain="sd">
+  <requires lib="gtk+" version="3.20"/>
+  <!-- n-columns=1 n-rows=1 -->
+  <object class="GtkGrid" id="MasterPagePanel">
+    <property name="visible">True</property>
+    <property name="can-focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
+    <child>
+      <object class="GtkDrawingArea" id="allvalueset">
+        <property name="visible">True</property>
+        <property name="can-focus">True</property>
+        <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+      </object>
+      <packing>
+        <property name="left-attach">0</property>
+        <property name="top-attach">0</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/sd/uiconfig/simpress/ui/masterpagepanelrecent.ui b/sd/uiconfig/simpress/ui/masterpagepanelrecent.ui
new file mode 100644
index 000000000000..4ec8487cfc5c
--- /dev/null
+++ b/sd/uiconfig/simpress/ui/masterpagepanelrecent.ui
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.38.2 -->
+<interface domain="sd">
+  <requires lib="gtk+" version="3.20"/>
+  <!-- n-columns=1 n-rows=1 -->
+  <object class="GtkGrid" id="MasterPagePanel">
+    <property name="visible">True</property>
+    <property name="can-focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
+    <child>
+      <object class="GtkDrawingArea" id="recentvalueset">
+        <property name="visible">True</property>
+        <property name="can-focus">True</property>
+        <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+      </object>
+      <packing>
+        <property name="left-attach">0</property>
+        <property name="top-attach">0</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx
index 76761edcdc1d..392222812741 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -75,7 +75,7 @@ PageSizeControl::PageSizeControl(PageSizePopup* pControl, weld::Widget* pParent)
     , mxMoreButton(m_xBuilder->weld_button("moreoptions"))
     , mxWidthHeightField(m_xBuilder->weld_metric_spin_button("metric", FieldUnit::CM))
     , mxSizeValueSet(new svx::sidebar::ValueSetWithTextControl)
-    , mxSizeValueSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxSizeValueSet))
+    , mxSizeValueSetWin(new weld::CustomWeld(*m_xBuilder, "pagesizevalueset", *mxSizeValueSet))
     , mxControl(pControl)
     , maPaperList()
 {
diff --git a/sw/uiconfig/swriter/ui/pagesizecontrol.ui b/sw/uiconfig/swriter/ui/pagesizecontrol.ui
index 4de5be79a228..f9c8258b1733 100644
--- a/sw/uiconfig/swriter/ui/pagesizecontrol.ui
+++ b/sw/uiconfig/swriter/ui/pagesizecontrol.ui
@@ -45,7 +45,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkDrawingArea" id="valueset">
+                      <object class="GtkDrawingArea" id="pagesizevalueset">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>


More information about the Libreoffice-commits mailing list