diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-06-08 14:05:14 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-07-19 18:10:46 +0200 |
commit | e4f804852279006934731008a1b37aa674dcbe97 (patch) | |
tree | 3f58de5e8cdf06d9d9078b507a0bce76a408fb21 /sd | |
parent | 695d926248acf6e26222b26242f95fb46066aae6 (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
Diffstat (limited to 'sd')
-rw-r--r-- | sd/UIConfig_simpress.mk | 2 | ||||
-rw-r--r-- | sd/source/ui/sidebar/AllMasterPagesSelector.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/sidebar/LayoutMenu.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/sidebar/MasterPagesSelector.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/sidebar/MasterPagesSelector.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/sidebar/RecentMasterPagesSelector.cxx | 2 | ||||
-rw-r--r-- | sd/uiconfig/simpress/ui/layoutpanel.ui | 2 | ||||
-rw-r--r-- | sd/uiconfig/simpress/ui/masterpagepanel.ui | 2 | ||||
-rw-r--r-- | sd/uiconfig/simpress/ui/masterpagepanelall.ui | 25 | ||||
-rw-r--r-- | sd/uiconfig/simpress/ui/masterpagepanelrecent.ui | 25 |
11 files changed, 66 insertions, 10 deletions
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> |