diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2014-01-16 08:25:42 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-01-16 07:33:49 +0000 |
commit | 9e5e7c9b556bf9386fb5ad3ecd28b3d43aeeb393 (patch) | |
tree | 17d42a7ae7d32ec5d37ff419f7fd0bd0b304b0d0 /writerperfect | |
parent | 2054af83fefb955e20de2b40178a11726525057e (diff) |
libodfgen produces strings in utf8 encoding
Change-Id: Iad17f4b4786473205669bd5b080b0a64d4a6a441
Reviewed-on: https://gerrit.libreoffice.org/7455
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'writerperfect')
-rw-r--r-- | writerperfect/source/common/DocumentHandler.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/writerperfect/source/common/DocumentHandler.cxx b/writerperfect/source/common/DocumentHandler.cxx index 4fd98da571f5..073b9429571b 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) |