summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-09-26 12:37:11 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-09-26 23:27:44 +0200
commitd077b30dba618daace0373e9b7e7fe84f982c6aa (patch)
tree5f516acb3e85c40f2f6a93ff728856fd38f314e1 /sd/source
parent4e02fee0022e2f05927eec69773ecb8ce519c19e (diff)
make the UI element IDs locally unique in impress header footer dlg
Change-Id: I368405acc7dfbd210cfc0115e58e993846ab9497 Reviewed-on: https://gerrit.libreoffice.org/60985 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index f876f3d54221..318688a8aec6 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -385,6 +385,27 @@ void HeaderFooterDialog::change( SdUndoGroup* pUndoGroup, SdPage* pPage, const H
pPage->setHeaderFooterSettings( rNewSettings );
}
+namespace {
+
+void recursive_rename_ui_element(vcl::Window& rWindow, const OUString& rPrefix)
+{
+ OUString aID = rWindow.get_id();
+ if (aID.isEmpty())
+ {
+ rWindow.set_id(rPrefix + aID);
+ }
+
+ size_t nChildCount = rWindow.GetChildCount();
+ for (size_t i = 0; i < nChildCount; ++i)
+ {
+ vcl::Window* pChild = rWindow.GetChild(i);
+ if (pChild)
+ recursive_rename_ui_element(*pChild, rPrefix);
+ }
+}
+
+}
+
HeaderFooterTabPage::HeaderFooterTabPage( vcl::Window* pWindow, SdDrawDocument* pDoc, SdPage* pActualPage, bool bHandoutMode ) :
TabPage( pWindow, "HeaderFooterTab", "modules/simpress/ui/headerfootertab.ui" ),
mpDoc(pDoc),
@@ -443,6 +464,11 @@ HeaderFooterTabPage::HeaderFooterTabPage( vcl::Window* pWindow, SdDrawDocument*
mpCBDateTimeLanguage->SelectLanguage( meOldLanguage );
FillFormatList(0);
+
+ if (mbHandoutMode)
+ recursive_rename_ui_element(*this, "handout");
+ else
+ recursive_rename_ui_element(*this, "slide");
}
HeaderFooterTabPage::~HeaderFooterTabPage()