sw/source/uibase/config/barcfg.cxx |   14 +++++++-------
 sw/source/uibase/config/prtopt.cxx |   32 ++++++++++++++++----------------
 2 files changed, 23 insertions(+), 23 deletions(-)

New commits:
commit faf1c7ee2acac2d092acd899b68adf1da96f61f2
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu May 2 15:15:39 2024 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sat May 4 14:15:59 2024 +0200

    replace createFromAscii with OUString literals in SwToolbarConfigItem
    
    Change-Id: Id1a6f3babc1ca63375361c88b8af40d9915d1d2d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167112
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sw/source/uibase/config/barcfg.cxx 
b/sw/source/uibase/config/barcfg.cxx
index 1f54b05cc113..021b36cb733f 100644
--- a/sw/source/uibase/config/barcfg.cxx
+++ b/sw/source/uibase/config/barcfg.cxx
@@ -91,19 +91,19 @@ void SwToolbarConfigItem::SetTopToolbar(SelectionType 
nSelType, ToolbarId eBarId
 
 Sequence<OUString> SwToolbarConfigItem::GetPropertyNames()
 {
-    static const char* aPropNames[] =
+    static constexpr OUString aPropNames[] =
     {
-        "Selection/Table",                   //  SEL_TYPE_TABLE_TEXT
-        "Selection/NumberedList",            //  SEL_TYPE_LIST_TEXT
-        "Selection/NumberedList_InTable",     //  SEL_TYPE_TABLE_LIST
-        "Selection/BezierObject",           //  SEL_TYPE_BEZIER
-        "Selection/Graphic"                 //SEL_TYPE_GRAPHIC
+        u"Selection/Table"_ustr,                   //  SEL_TYPE_TABLE_TEXT
+        u"Selection/NumberedList"_ustr,            //  SEL_TYPE_LIST_TEXT
+        u"Selection/NumberedList_InTable"_ustr,     //  SEL_TYPE_TABLE_LIST
+        u"Selection/BezierObject"_ustr,           //  SEL_TYPE_BEZIER
+        u"Selection/Graphic"_ustr                 //SEL_TYPE_GRAPHIC
     };
     const int nCount = 5;
     Sequence<OUString> aNames(nCount);
     OUString* pNames = aNames.getArray();
     for(int i = 0; i < nCount; i++)
-        pNames[i] = OUString::createFromAscii(aPropNames[i]);
+        pNames[i] = aPropNames[i];
     return aNames;
 }
 
commit 0ae8de6aeb548d1cb5bbe0071cb2d7e1a279f127
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu May 2 15:16:53 2024 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sat May 4 14:15:51 2024 +0200

    replace createFromAscii with OUString literals in SwPrintOptions
    
    Change-Id: I9c40c4e4f58d45e5c3195cab6dbb40c47b0326d1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167113
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sw/source/uibase/config/prtopt.cxx 
b/sw/source/uibase/config/prtopt.cxx
index 52b490ac85c4..6a7f64fd4283 100644
--- a/sw/source/uibase/config/prtopt.cxx
+++ b/sw/source/uibase/config/prtopt.cxx
@@ -29,29 +29,29 @@ using namespace com::sun::star::uno;
 // Ctor
 Sequence<OUString> SwPrintOptions::GetPropertyNames() const
 {
-    static const char* aPropNames[] =
+    static constexpr OUString aPropNames[] =
     {
-        "Content/Graphic",              //  0
-        "Content/Control",              //  1
-        "Content/Background",           //  2
-        "Content/PrintBlack",           //  3
-        "Content/Note",                 //  4
-        "Page/Brochure",                //  5
-        "Page/BrochureRightToLeft",     //  6
-        "Output/Fax",                   //  7
-        "Papertray/FromPrinterSetup",   //  8
-        "Page/LeftPage",                //  9 not in SW/Web
-        "Page/RightPage",               // 10 not in SW/Web
-        "EmptyPages",                   // 11 not in SW/Web
-        "Content/PrintPlaceholders",    // 12 not in Sw/Web
-        "Content/PrintHiddenText"       // 13 not in Sw/Web
+        u"Content/Graphic"_ustr,              //  0
+        u"Content/Control"_ustr,              //  1
+        u"Content/Background"_ustr,           //  2
+        u"Content/PrintBlack"_ustr,           //  3
+        u"Content/Note"_ustr,                 //  4
+        u"Page/Brochure"_ustr,                //  5
+        u"Page/BrochureRightToLeft"_ustr,     //  6
+        u"Output/Fax"_ustr,                   //  7
+        u"Papertray/FromPrinterSetup"_ustr,   //  8
+        u"Page/LeftPage"_ustr,                //  9 not in SW/Web
+        u"Page/RightPage"_ustr,               // 10 not in SW/Web
+        u"EmptyPages"_ustr,                   // 11 not in SW/Web
+        u"Content/PrintPlaceholders"_ustr,    // 12 not in Sw/Web
+        u"Content/PrintHiddenText"_ustr       // 13 not in Sw/Web
     };
     const int nCount = m_bIsWeb ? 9 : 14;
     Sequence<OUString> aNames(nCount);
     OUString* pNames = aNames.getArray();
     for(int i = 0; i < nCount; i++)
     {
-        pNames[i] = OUString::createFromAscii(aPropNames[i]);
+        pNames[i] = aPropNames[i];
     }
     return aNames;
 }

Reply via email to