[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - writerperfect/source
Fridrich Å trba
fridrich.strba at bluewin.ch
Wed Jan 15 23:41:30 PST 2014
writerperfect/source/common/DocumentHandler.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 0501b81caf787ace5d2c8da65329d9f6adbace4e
Author: Fridrich Å trba <fridrich.strba at 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 <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit 9e5e7c9b556bf9386fb5ad3ecd28b3d43aeeb393)
Reviewed-on: https://gerrit.libreoffice.org/7456
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)
More information about the Libreoffice-commits
mailing list