summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-02-19 16:44:51 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-02-19 16:48:51 +0100
commitbee8ed6772f420f9eefc57fee01da29ff466a8e9 (patch)
tree01676f6ad7a3516816f0c57b393d1a171c8abe04 /writerperfect
parent826cb27cc80ae843927d68e0337ad2caffa9f023 (diff)
Allow specifying of page names
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/filter/OdgGenerator.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index ece259a9ff12..4474b4852679 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -664,8 +664,13 @@ void OdgGenerator::startGraphics(const ::WPXPropertyList &propList)
TagOpenElement *pStylePageLayoutOpenElement = new TagOpenElement("style:page-layout");
WPXString sValue;
- sValue.sprintf("page%i", mpImpl->miPageIndex);
- pDrawPageOpenElement->addAttribute("draw:name", sValue);
+ if (propList["draw:name"])
+ pDrawPageOpenElement->addAttribute("draw:name", propList["draw:name"]->getStr());
+ else
+ {
+ sValue.sprintf("page%i", mpImpl->miPageIndex);
+ pDrawPageOpenElement->addAttribute("draw:name", sValue);
+ }
#ifdef MULTIPAGE_WORKAROUND
pStyleMasterPageOpenElement->addAttribute("style:page-layout-name", "PM0");
pStylePageLayoutOpenElement->addAttribute("style:page-layout-name", "PM0");