summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-02-19 16:44:51 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-02-25 09:19:39 +0000
commit74e60b3a535b4e531c43d95dadacf716dc8aa0e0 (patch)
tree45c002b4b852cfc415bf84bdcb387c74cb861f21
parentd52b170bcf7272bfd06d13e435e3411e64dbd28b (diff)
Allow specifying of page names
Allow specifying of page names (cherry picked from commit bee8ed6772f420f9eefc57fee01da29ff466a8e9) We need to escape special characters in slide names (cherry picked from commit ea4581a914cb1aad29f16b73e35350f05f8adc1c) Change-Id: I5f523642b980469afa46e1895cfd39aa08b9941d Reviewed-on: https://gerrit.libreoffice.org/2333 Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr> Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr> (cherry picked from commit 4c0e53e6530c5590f7123f506a1a58bcbd04e13d) Reviewed-on: https://gerrit.libreoffice.org/2337 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
-rw-r--r--writerperfect/source/filter/OdgGenerator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index 86611389acd5..1caebdd084df 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -664,7 +664,10 @@ void OdgGenerator::startGraphics(const ::WPXPropertyList &propList)
TagOpenElement *pStylePageLayoutOpenElement = new TagOpenElement("style:page-layout");
WPXString sValue;
- sValue.sprintf("page%i", mpImpl->miPageIndex);
+ if (propList["draw:name"])
+ sValue = WPXString(propList["draw:name"]->getStr(), true); // escape special xml characters
+ else
+ sValue.sprintf("page%i", mpImpl->miPageIndex);
pDrawPageOpenElement->addAttribute("draw:name", sValue);
#ifdef MULTIPAGE_WORKAROUND
pStyleMasterPageOpenElement->addAttribute("style:page-layout-name", "PM0");