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

Fridrich Å trba fridrich.strba at bluewin.ch
Fri Feb 22 01:11:37 PST 2013


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

New commits:
commit ea4581a914cb1aad29f16b73e35350f05f8adc1c
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Fri Feb 22 10:08:44 2013 +0100

    We need to escape special characters in slide names

diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index 4474b48..d166a09 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -665,12 +665,10 @@ void OdgGenerator::startGraphics(const ::WPXPropertyList &propList)
 
     WPXString sValue;
     if (propList["draw:name"])
-        pDrawPageOpenElement->addAttribute("draw:name", propList["draw:name"]->getStr());
+        sValue = WPXString(propList["draw:name"]->getStr(), true); // escape special xml characters
     else
-    {
         sValue.sprintf("page%i", mpImpl->miPageIndex);
-        pDrawPageOpenElement->addAttribute("draw:name", sValue);
-    }
+    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