writerperfect/source/common/DocumentHandler.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 9e5e7c9b556bf9386fb5ad3ecd28b3d43aeeb393
Author: Fridrich Å trba <fridrich.st...@bluewin.ch>
Date:   Thu Jan 16 08:25:42 2014 +0100

    libodfgen produces strings in utf8 encoding
    
    Change-Id: Iad17f4b4786473205669bd5b080b0a64d4a6a441
    Reviewed-on: https://gerrit.libreoffice.org/7455
    Reviewed-by: David Tardon <dtar...@redhat.com>
    Tested-by: David Tardon <dtar...@redhat.com>

diff --git a/writerperfect/source/common/DocumentHandler.cxx 
b/writerperfect/source/common/DocumentHandler.cxx
index 4fd98da..073b942 100644
--- a/writerperfect/source/common/DocumentHandler.cxx
+++ b/writerperfect/source/common/DocumentHandler.cxx
@@ -41,17 +41,20 @@ void DocumentHandler::startElement(const char *psName, 
const WPXPropertyList &xP
         // filter out libwpd elements
         if (strncmp(i.key(), "libwpd", 6) != 0)
         {
-            pAttrList->AddAttribute(OUString::createFromAscii(i.key()),
-                                    
OUString::createFromAscii(i()->getStr().cstr()));
+            OUString sName(i.key(), strlen(i.key()),  RTL_TEXTENCODING_UTF8);
+            OUString sValue(i()->getStr().cstr(), 
strlen(i()->getStr().cstr()), RTL_TEXTENCODING_UTF8);
+            pAttrList->AddAttribute(sName, sValue);
         }
     }
 
-    mxHandler->startElement(OUString::createFromAscii(psName), xAttrList);
+    OUString sElementName(psName, strlen(psName), RTL_TEXTENCODING_UTF8);
+    mxHandler->startElement(sElementName, xAttrList);
 }
 
 void DocumentHandler::endElement(const char *psName)
 {
-    mxHandler->endElement(OUString::createFromAscii(psName));
+    OUString sElementName(psName, strlen(psName), RTL_TEXTENCODING_UTF8);
+    mxHandler->endElement(sElementName);
 }
 
 void DocumentHandler::characters(const WPXString &sCharacters)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to