i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |    2 -
 include/editeng/itemtype.hxx                                          |    2 -
 lotuswordpro/source/filter/lwpsilverbullet.cxx                        |    6 
+--
 sal/qa/rtl/uri/rtl_testuri.cxx                                        |   20 
+++++-----
 starmath/source/mathmlexport.cxx                                      |    4 +-
 svtools/source/misc/sampletext.cxx                                    |    8 
++--
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx                             |    2 -
 sw/qa/extras/ww8export/ww8export.cxx                                  |    2 -
 unotools/qa/unit/testGetEnglishSearchName.cxx                         |   10 
++---
 vcl/source/gdi/gdimtf.cxx                                             |    2 -
 10 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit b5c532154cb974de04f2a430712cd947e1bcc98a
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue Dec 22 20:14:43 2020 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Dec 23 09:14:01 2020 +0100

    Use char16_t string literals
    
    Change-Id: I0a8b577957ac1d4cad5fc1163f244012a8391a77
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108216
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 2d55e1fd0974..d352aec6f9de 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -419,7 +419,7 @@ static
 void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult )
 {
     OUStringBuffer aTemp(64);
-    static const sal_Unicode asPersianWord_conjunction_data[] = 
{0x20,0x0648,0x20,0};
+    static const sal_Unicode asPersianWord_conjunction_data[] = u" \u0648 ";
     OUString asPersianWord_conjunction( asPersianWord_conjunction_data );
     unsigned char nSection = 0;
 
diff --git a/include/editeng/itemtype.hxx b/include/editeng/itemtype.hxx
index 19d2a19b4ee3..2e2115eb7766 100644
--- a/include/editeng/itemtype.hxx
+++ b/include/editeng/itemtype.hxx
@@ -29,7 +29,7 @@ class Color;
 class IntlWrapper;
 // static and prototypes -------------------------------------------------
 
-const sal_Unicode cpDelim[] = { ',' , ' ', '\0' };
+const sal_Unicode cpDelim[] = u", ";
 
 EDITENG_DLLPUBLIC OUString GetMetricText( tools::Long nVal, MapUnit eSrcUnit, 
MapUnit eDestUnit, const IntlWrapper * pIntl );
 OUString GetColorString( const Color& rCol );
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.cxx 
b/lotuswordpro/source/filter/lwpsilverbullet.cxx
index 5c6a5ca45030..76b4810c1427 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.cxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.cxx
@@ -282,19 +282,19 @@ OUString 
LwpSilverBullet::GetNumCharByStyleID(LwpFribParaNumber const * pParaNum
         break;
     case NUMCHAR_Chinese1:
         {
-        sal_Unicode const sBuf[13] = 
{0x58f9,0x002c,0x0020,0x8d30,0x002c,0x0020,0x53c1,0x002c,0x0020,0x002e,0x002e,0x002e,0x0};
+        sal_Unicode const sBuf[13] = u"\u58f9\u002c\u0020\u8d30, \u53c1, ...";
         strNumChar = OUString(sBuf);
         }
         break;
     case NUMCHAR_Chinese2:
         {
-        sal_Unicode const sBuf[13] = 
{0x4e00,0x002c,0x0020,0x4e8c,0x002c,0x0020,0x4e09,0x002c,0x0020,0x002e,0x002e,0x002e,0x0};
+        sal_Unicode const sBuf[13] = u"\u4e00, \u4e8c, \u4e09, ...";
         strNumChar = OUString(sBuf);
         }
         break;
     case NUMCHAR_Chinese3:
         {
-        sal_Unicode const sBuf[13] = 
{0x7532,0x002c,0x0020,0x4e59,0x002c,0x0020,0x4e19,0x002c,0x0020,0x002e,0x002e,0x002e,0x0};
+        sal_Unicode const sBuf[13] = u"\u7532, \u4e59, \u4e19, ...";
         strNumChar = OUString(sBuf);
         }
         break;
diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx
index fc7e1d30a751..e2d076b19127 100644
--- a/sal/qa/rtl/uri/rtl_testuri.cxx
+++ b/sal/qa/rtl/uri/rtl_testuri.cxx
@@ -358,7 +358,7 @@ void Test::test_Uri() {
     // Check encode with unusual text encodings:
 
     {
-        sal_Unicode const aText1U[] = { ' ', '!', 0x0401, 0x045F, 0 };
+        sal_Unicode const aText1U[] = u" !\u0401\u045F";
         aText1 = OUString(aText1U);
         aText2 = "%20!%A1%FF";
         CPPUNIT_ASSERT_EQUAL_MESSAGE(
@@ -374,10 +374,10 @@ void Test::test_Uri() {
                 aText2, rtl_UriDecodeWithCharset, 
RTL_TEXTENCODING_ISO_8859_5));
     }
     {
-        sal_Unicode const aText1U[] = { ' ', '!', 0x0401, 0x0700, 0x045F, 0 };
+        sal_Unicode const aText1U[] = u" !\u0401\u0700\u045F";
         aText1 = OUString(aText1U);
-        sal_Unicode const aText2U[] = {
-            '%', '2', '0', '!', '%', 'A', '1', 0x0700, '%', 'F', 'F', 0 };
+        sal_Unicode const aText2U[] =
+            u"%20!%A1\u0700%FF";
         aText2 = OUString(aText2U);
         CPPUNIT_ASSERT_EQUAL_MESSAGE(
             "failure 21",
@@ -393,7 +393,7 @@ void Test::test_Uri() {
     }
 #if WITH_LOCALE_ALL || WITH_LOCALE_zh
     {
-        sal_Unicode const aText1U[] = { ' ', '!', 0x028A, 0xD849, 0xDD13, 0 };
+        sal_Unicode const aText1U[] = u" !\u028A\U00022513";
         aText1 = OUString(aText1U);
         aText2 = "%20!%81%30%B1%33%95%39%C5%37";
         CPPUNIT_ASSERT_EQUAL_MESSAGE(
@@ -412,7 +412,7 @@ void Test::test_Uri() {
     // Check strict mode:
 
     {
-        sal_Unicode const aText1U[] = { ' ', '!', 0x0401, 0x0700, 0x045F, 0 };
+        sal_Unicode const aText1U[] = u" !\u0401\u0700\u045F";
         aText1 = OUString(aText1U);
         aText2 = OUString();
         CPPUNIT_ASSERT_EQUAL_MESSAGE(
@@ -452,7 +452,7 @@ void Test::test_Uri() {
     }
     {
         aText1 = "%81%30%B1%33";
-        sal_Unicode const aText2U[] = { 0x028A, 0 };
+        sal_Unicode const aText2U[] = u"\u028A";
         aText2 = OUString(aText2U);
         CPPUNIT_ASSERT_EQUAL_MESSAGE(
             "failure 27",
@@ -462,7 +462,7 @@ void Test::test_Uri() {
     }
     {
         aText1 = "%810%B13";
-        sal_Unicode const aText2U[] = { 0x028A, 0 };
+        sal_Unicode const aText2U[] = u"\u028A";
         aText2 = OUString(aText2U);
         CPPUNIT_ASSERT_EQUAL_MESSAGE(
             "failure 28",
@@ -484,7 +484,7 @@ void Test::test_Uri() {
                 RTL_TEXTENCODING_UTF8));
     }
     {
-        sal_Unicode const aText1U[] = { 0x00EA, 0 };
+        sal_Unicode const aText1U[] = u"\u00EA";
         aText1 = OUString(aText1U);
         aText2 = "%C3%AA";
         CPPUNIT_ASSERT_EQUAL_MESSAGE(
@@ -495,7 +495,7 @@ void Test::test_Uri() {
                 RTL_TEXTENCODING_UTF8));
     }
     {
-        sal_Unicode const aText1U[] = { ' ', '!', 0x0401, 0x0700, 0x045F, 0 };
+        sal_Unicode const aText1U[] = u" !\u0401\u0700\u045F";
         aText1 = OUString(aText1U);
         aText2 = OUString();
         CPPUNIT_ASSERT_EQUAL_MESSAGE(
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 29a25008f9f6..85365ad7bbd3 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -1042,7 +1042,7 @@ void SmXMLExport::ExportAttributes(const SmNode* pNode, 
int nLevel)
         {
             //proper entity support required
             SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO, true, 
true);
-            sal_Unicode const nArse[2] = { 0xAF, 0x00 };
+            sal_Unicode const nArse[2] = u"\u00AF";
             GetDocHandler()->characters(nArse);
         }
         break;
@@ -1050,7 +1050,7 @@ void SmXMLExport::ExportAttributes(const SmNode* pNode, 
int nLevel)
         {
             //proper entity support required
             SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO, true, 
true);
-            sal_Unicode const nArse[2] = { 0x0332, 0x00 };
+            sal_Unicode const nArse[2] = u"\u0332";
             GetDocHandler()->characters(nArse);
         }
         break;
diff --git a/svtools/source/misc/sampletext.cxx 
b/svtools/source/misc/sampletext.cxx
index 1cd48482bc62..b8fd11b2e744 100644
--- a/svtools/source/misc/sampletext.cxx
+++ b/svtools/source/misc/sampletext.cxx
@@ -150,15 +150,15 @@ OUString 
makeShortRepresentativeSymbolTextForSelectedFont(OutputDevice const &rD
 {
     if (rDevice.GetFont().GetFamilyName() == "Symbol")
     {
-        static const sal_Unicode aImplAppleSymbolText[] = {
-            0x03BC, 0x2202, 0x2211, 0x220F, 0x03C0, 0x222B, 0x03A9, 0x221A, 0};
+        static const sal_Unicode aImplAppleSymbolText[] =
+            u"\u03BC\u2202\u2211\u220F\u03C0\u222B\u03A9\u221A";
         bool bHasSampleTextGlyphs
             = (-1 == rDevice.HasGlyphs(rDevice.GetFont(), 
aImplAppleSymbolText));
         //It's the Apple version
         if (bHasSampleTextGlyphs)
             return aImplAppleSymbolText;
-        static const sal_Unicode aImplAdobeSymbolText[] = {
-            0xF06D, 0xF0B6, 0xF0E5, 0xF0D5, 0xF070, 0xF0F2, 0xF057, 0xF0D6, 0};
+        static const sal_Unicode aImplAdobeSymbolText[] =
+            u"\uF06D\uF0B6\uF0E5\uF0D5\uF070\uF0F2\uF057\uF0D6";
         return aImplAdobeSymbolText;
     }
 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 47ee7a99b351..a670b356827c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -1362,7 +1362,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf111964, 
"tdf111964.docx")
 {
     xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
     // Unicode spaces that are not XML whitespace must not be trimmed
-    const sal_Unicode sWSReference [] { 0x2002, 0x2002, 0x2002, 0x2002, 
0x2002, 0 };
+    const sal_Unicode sWSReference [] = u"\u2002\u2002\u2002\u2002\u2002";
     assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:t", 
sWSReference);
 }
 
diff --git a/sw/qa/extras/ww8export/ww8export.cxx 
b/sw/qa/extras/ww8export/ww8export.cxx
index e750b15f2a94..807337eee0d1 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -1325,7 +1325,7 @@ DECLARE_WW8EXPORT_TEST(testTdf92281, "tdf92281.doc")
 
         xCursor->goRight( 5 , false );
         uno::Reference< beans::XPropertySet > xPropSet(xCursor, 
uno::UNO_QUERY);
-        const sal_Unicode aFontname[14] = { 26032, 32048, 26126, 39636, ';' , 
'P' , 'M', 'i', 'n', 'g', 'L', 'i', 'U' , 0 };
+        const sal_Unicode aFontname[14] = u"\u65B0\u7D30\u660E\u9AD4;PMingLiU";
         CPPUNIT_ASSERT_EQUAL(OUString("Calibri"), 
getProperty<OUString>(xPropSet, "CharFontName"));
         CPPUNIT_ASSERT_EQUAL(OUString(aFontname), 
getProperty<OUString>(xPropSet, "CharFontNameAsian"));
         CPPUNIT_ASSERT_EQUAL(OUString("Times New Roman"), 
getProperty<OUString>(xPropSet, "CharFontNameComplex"));
diff --git a/unotools/qa/unit/testGetEnglishSearchName.cxx 
b/unotools/qa/unit/testGetEnglishSearchName.cxx
index 4534187052fa..da59fc377f51 100644
--- a/unotools/qa/unit/testGetEnglishSearchName.cxx
+++ b/unotools/qa/unit/testGetEnglishSearchName.cxx
@@ -45,23 +45,23 @@ void Test::testSingleElement()
 
     //for Japanese fontname
     // IPAMincho
-    sal_Unicode const aIPAMincho[]={'i','p','a', 0x660e, 0x671d,0};
+    sal_Unicode const aIPAMincho[]=u"ipa\u660e\u671d";
     OUString test_ja_JP1 = GetEnglishSearchFontName(aIPAMincho);
     CPPUNIT_ASSERT_EQUAL( OUString("ipamincho"),test_ja_JP1);
     // IPAGothic
-    sal_Unicode const aIPAGothic[]={'i','p','a', 0x30b4, 0x30b7, 0x30c3, 
0x30af,0};
+    sal_Unicode const aIPAGothic[]=u"ipa\u30b4\u30b7\u30c3\u30af";
     OUString test_ja_JP2 = GetEnglishSearchFontName(aIPAGothic);
     CPPUNIT_ASSERT_EQUAL( OUString("ipagothic"),test_ja_JP2);
     // HiraginoKakuGothic
-    sal_Unicode const aHiraginoKakuGothic[]={0x30D2, 0x30E9, 0x30AE, 0x30CE, 
0x89D2, 0x30B4, 0x30B7, 0x30C3, 0x30AF,0};
+    sal_Unicode const 
aHiraginoKakuGothic[]=u"\u30D2\u30E9\u30AE\u30CE\u89D2\u30B4\u30B7\u30C3\u30AF";
     OUString test_ja_JP3 = GetEnglishSearchFontName(aHiraginoKakuGothic);
     CPPUNIT_ASSERT_EQUAL( OUString("hiraginosans"),test_ja_JP3);
     // HiraginoMincho Pro N
-    sal_Unicode const aHiraginoMinchoProN[]={0x30D2, 0x30E9, 0x30AE, 0x30CE, 
0x660E, 0x671D, 'p','r','o','n',0};
+    sal_Unicode const 
aHiraginoMinchoProN[]=u"\u30D2\u30E9\u30AE\u30CE\u660E\u671Dpron";
     OUString test_ja_JP4 = GetEnglishSearchFontName(aHiraginoMinchoProN);
     CPPUNIT_ASSERT_EQUAL( OUString("hiraginominchopron"),test_ja_JP4);
     // HiraginoMaruGothic Pro N
-    sal_Unicode const aHiraginoMaruGothicProN[]={ 0x30D2, 0x30E9, 0x30AE, 
0x30CE, 0x4E38, 0x30B4, 'p','r','o','n',0};
+    sal_Unicode const 
aHiraginoMaruGothicProN[]=u"\u30D2\u30E9\u30AE\u30CE\u4E38\u30B4pron";
     OUString test_ja_JP5 = GetEnglishSearchFontName(aHiraginoMaruGothicProN);
     CPPUNIT_ASSERT_EQUAL( OUString("hiraginomarugothicpron"),test_ja_JP5);
 }
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 980d1170bc7e..89390752d185 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -1489,7 +1489,7 @@ tools::Rectangle GDIMetaFile::GetBoundRect( OutputDevice& 
i_rReference, tools::R
         {
             MetaTextLineAction* pAct = 
static_cast<MetaTextLineAction*>(pAction);
             // measure a test string to get ascend and descent right
-            static const sal_Unicode pStr[] = { 0xc4, 0x67, 0 };
+            static const sal_Unicode pStr[] = u"\u00c4g";
             OUString aStr( pStr );
 
             tools::Rectangle aRect;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to