From 84a7fa47a548e95892797e9f61d96ae051123121 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 18 Dec 2014 12:30:30 +0100 Subject: XmlTestTools: fix conversion from UTF-8 xmlChar strings to OUString ...which resolves the mystery of 0ba6360363fb73b5b200bbc486ed8eeac5f3d337 "Garbage in, garbage out?" Change-Id: I51f102699d0474872c80392b27f71030b5e3fb59 --- sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sw/qa') diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx index c953ad1200a8..e3043e6bda7e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -589,12 +589,7 @@ DECLARE_OOXMLEXPORT_TEST(testDateControl, "date-control.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:date", "fullDate", "2014-03-05T00:00:00Z"); assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:date/w:dateFormat", "val", "dddd, dd' de 'MMMM' de 'yyyy"); assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:date/w:lid", "val", "es-ES"); - static sal_Unicode const Broken[] = { - 'm', 'i', static_cast('\xC3'), - static_cast('\xA9'), 'r', 'c', 'o', 'l', 'e', 's', ',', - ' ', '0', '5', ' ', 'd', 'e', ' ', 'm', 'a', 'r', 'z', 'o', ' ', 'd', - 'e', ' ', '2', '0', '1', '4' }; - assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t", OUString(Broken, SAL_N_ELEMENTS(Broken))); + assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t", OUString::fromUtf8("mi\xC3\xA9rcoles, 05 de marzo de 2014")); // check imported control uno::Reference xControl(getShape(1), uno::UNO_QUERY); -- cgit v1.2.3