summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-06-08 14:05:14 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2021-07-19 18:10:46 +0200
commite4f804852279006934731008a1b37aa674dcbe97 (patch)
tree3f58de5e8cdf06d9d9078b507a0bce76a408fb21
parent695d926248acf6e26222b26242f95fb46066aae6 (diff)
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@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119196 Tested-by: Jenkins
-rw-r--r--sc/source/ui/sidebar/CellLineStyleControl.cxx2
-rw-r--r--sc/uiconfig/scalc/ui/floatinglinestyle.ui2
-rw-r--r--sd/UIConfig_simpress.mk2
-rw-r--r--sd/source/ui/sidebar/AllMasterPagesSelector.cxx2
-rw-r--r--sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx2
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx2
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.cxx8
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.hxx4
-rw-r--r--sd/source/ui/sidebar/RecentMasterPagesSelector.cxx2
-rw-r--r--sd/uiconfig/simpress/ui/layoutpanel.ui2
-rw-r--r--sd/uiconfig/simpress/ui/masterpagepanel.ui2
-rw-r--r--sd/uiconfig/simpress/ui/masterpagepanelall.ui25
-rw-r--r--sd/uiconfig/simpress/ui/masterpagepanelrecent.ui25
-rw-r--r--sw/source/uibase/sidebar/PageSizeControl.cxx2
-rw-r--r--sw/uiconfig/swriter/ui/pagesizecontrol.ui2
15 files changed, 70 insertions, 14 deletions
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>