comphelper/qa/string/test_string.cxx | 3 +-- sw/qa/extras/htmlexport/htmlexport.cxx | 3 +-- sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-)
New commits: commit 14b00ade67d4f108fcd070e90e184dc256f0c880 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed Sep 23 19:35:35 2020 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed Sep 23 20:37:56 2020 +0200 Simplify some OUString constructions with universal character names Change-Id: I16dcaec29de725b4308f2ef3262673e9b9cab1f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103270 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx index abccec85691c..aa427bea8a65 100644 --- a/comphelper/qa/string/test_string.cxx +++ b/comphelper/qa/string/test_string.cxx @@ -69,8 +69,7 @@ void TestString::testDecimalStringToNumber() s1 += u"\u07C6"; CPPUNIT_ASSERT_EQUAL(sal_uInt32(12346), comphelper::string::decimalStringToNumber(s1)); // Codepoints on 2 16bits words - sal_uInt32 utf16String[] = { 0x1D7FE /* 8 */, 0x1D7F7 /* 1 */}; - s1 = OUString(utf16String, 2); + s1 = u"\U0001D7FE\U0001D7F7"; // MATHEMATICAL MONOSPACE DIGIT EIGHT and ONE CPPUNIT_ASSERT_EQUAL(sal_uInt32(81), comphelper::string::decimalStringToNumber(s1)); } diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index a7abb6190b8f..ac35a3a887d2 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -350,8 +350,7 @@ DECLARE_HTMLEXPORT_TEST(testTdf83890, "tdf83890.odt") DECLARE_HTMLEXPORT_TEST(testExtbChars, "extb.html") { - sal_uInt32 nCh = 0x24b62; - OUString aExpected( &nCh, 1); + OUString aExpected( u"\U00024b62"); // Assert that UTF8 encoded non-BMP Unicode character is correct uno::Reference<text::XTextRange> xTextRange1 = getRun(getParagraph(1), 1); CPPUNIT_ASSERT_EQUAL(aExpected, xTextRange1->getString()); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index df0ab21a7512..de4b340a6142 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -1263,11 +1263,9 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testOO106020, "ooo106020-1.odt") DECLARE_OOXMLEXPORT_TEST(testNonBMPChar, "nonbmpchar.docx") { - sal_uInt32 nCh = 0x24b62; - OUString aExpected( &nCh, 1); // Assert that UTF8 encoded non-BMP Unicode character is correct uno::Reference<text::XTextRange> xTextRange1 = getRun(getParagraph(1), 1); - CPPUNIT_ASSERT_EQUAL(aExpected, xTextRange1->getString()); + CPPUNIT_ASSERT_EQUAL(OUString(u"\U00024b62"), xTextRange1->getString()); } DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testSpacingGroupShapeText, "tdf131775_SpacingGroupShapeText.docx") _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits