[Libreoffice-commits] core.git: filter/source
Julien Nabet
serval2412 at yahoo.fr
Wed Jul 26 16:53:59 UTC 2017
filter/source/xsltfilter/LibXSLTTransformer.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit b7654300f0f002193c4e91baabbe6b60a86ca84f
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Jul 26 17:08:18 2017 +0200
tdf#109364: fix assert in LibXSLTTransformer.cxx
by replacing createFromAscii with OStringToOUString + RTL_TEXTENCODING_UTF8
Change-Id: I92ab20812968d13546132afb65c9b956a9c8be8e
Reviewed-on: https://gerrit.libreoffice.org/40456
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index 5e1776246246..33719eb5e4c6 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -154,7 +154,8 @@ namespace XSLT
xmlXPathObjectPtr streamName = valuePop(ctxt);
streamName = ensureStringValue(streamName, ctxt);
- oh->insertByName(OUString::createFromAscii(reinterpret_cast<char*>(streamName->stringval)), OString(reinterpret_cast<char*>(value->stringval)));
+ oh->insertByName(OStringToOUString(reinterpret_cast<char*>(streamName->stringval), RTL_TEXTENCODING_UTF8),
+ OString(reinterpret_cast<char*>(value->stringval)));
valuePush(ctxt, xmlXPathNewCString(""));
}
@@ -195,7 +196,7 @@ namespace XSLT
OleHandler * oh = static_cast<OleHandler*> (data);
xmlXPathObjectPtr streamName = valuePop(ctxt);
streamName = ensureStringValue(streamName, ctxt);
- const OString content = oh->getByName(OUString::createFromAscii(reinterpret_cast<char*>(streamName->stringval)));
+ const OString content = oh->getByName(OStringToOUString(reinterpret_cast<char*>(streamName->stringval), RTL_TEXTENCODING_UTF8));
valuePush(ctxt, xmlXPathNewCString(content.getStr()));
xmlXPathFreeObject(streamName);
}
@@ -320,7 +321,7 @@ namespace XSLT
xmlErrorPtr lastErr = xmlGetLastError();
OUString msg;
if (lastErr)
- msg = OUString::createFromAscii(lastErr->message);
+ msg = OStringToOUString(lastErr->message, RTL_TEXTENCODING_UTF8);
else
msg = "Unknown XSLT transformation error";
More information about the Libreoffice-commits
mailing list