summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-19 21:07:23 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-20 12:09:50 +0200
commitad936dea0829fa15ef2d55e180cd55327f282512 (patch)
treeb0c173ca5990baf58d61c6688ce106c0060f337f /sal
parenta2b46aa93fe1ce1d98e8fed5a0987b106aeacec8 (diff)
Replace some uses of OUStringChar with string literals
(At least MSVC++ 14.14, aka Visual Studio 2017 version 15.7, apparently requires `"\xDFFF"` to be written with a `u` prefix in the concatenated string literal u"\xD800" "\U000103FF" "\xDFFF" "A" to avoid "error C2022: '57343': too big for character", so prefix all the individual string literals in such concatenations, even if that should be redundant.) Change-Id: Ief69e6c7ae71fe2c4c9c56c38fab0bc782ceb82c Reviewed-on: https://gerrit.libreoffice.org/81142 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/rtl/uri/rtl_testuri.cxx18
1 files changed, 6 insertions, 12 deletions
diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx
index b69013e1ed36..fc7e1d30a751 100644
--- a/sal/qa/rtl/uri/rtl_testuri.cxx
+++ b/sal/qa/rtl/uri/rtl_testuri.cxx
@@ -181,11 +181,10 @@ void Test::test_Uri() {
// Check surrogate handling:
- aText1 = OUStringChar(u'\xD800') + // %ED%A0%80
- OUStringChar(u'\xD800') + // %F0%90%8F%BF
- OUStringChar(u'\xDFFF') +
- OUStringChar(u'\xDFFF') + // %ED%BF%BF
- "A"; // A
+ aText1 = u"\xD800" // %ED%A0%80
+ u"\U000103FF" // 0xD800,0xDFFF -> %F0%90%8F%BF
+ u"\xDFFF" // %ED%BF%BF
+ u"A"; // A
aText2 = "%ED%A0%80" "%F0%90%8F%BF" "%ED%BF%BF" "A";
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"failure 11",
@@ -207,11 +206,7 @@ void Test::test_Uri() {
RTL_TEXTENCODING_UTF8));
aText1 = "%ed%a0%80" "%f0%90%8f%bf" "%ed%bf%bf" "A";
- aText2 = "%ED%A0%80" +
- OUStringChar(u'\xD800') +
- OUStringChar(u'\xDFFF') +
- "%ED%BF%BF"
- "A";
+ aText2 = u"%ED%A0%80" u"\U000103FF" u"%ED%BF%BF" u"A";
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"failure 14",
aText2,
@@ -247,8 +242,7 @@ void Test::test_Uri() {
// Check IURI handling:
aText1 = "%30%C3%BF";
- aText2 = "%30" +
- OUStringChar(u'\x00FF');
+ aText2 = u"%30\u00FF";
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"failure 18",
aText2,