[Libreoffice-commits] core.git: writerperfect/source

Fridrich Å trba fridrich.strba at bluewin.ch
Tue Feb 19 07:49:18 PST 2013


 writerperfect/source/filter/OdgGenerator.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit bee8ed6772f420f9eefc57fee01da29ff466a8e9
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Tue Feb 19 16:44:51 2013 +0100

    Allow specifying of page names

diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index ece259a..4474b48 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");


More information about the Libreoffice-commits mailing list