sw/source/uibase/app/docsh.cxx    |   16 ++++-----
 sw/source/uibase/chrdlg/ccoll.cxx |   62 +++++++++++++++++++-------------------
 2 files changed, 39 insertions(+), 39 deletions(-)

New commits:
commit a0f176b77b47f10fa5e348e471ac6a3980fb8691
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu May 2 15:14:36 2024 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sat May 4 12:28:18 2024 +0200

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

diff --git a/sw/source/uibase/chrdlg/ccoll.cxx 
b/sw/source/uibase/chrdlg/ccoll.cxx
index 547566c427a0..3bd7ab0b98d6 100644
--- a/sw/source/uibase/chrdlg/ccoll.cxx
+++ b/sw/source/uibase/chrdlg/ccoll.cxx
@@ -28,36 +28,36 @@
 
 // note: also keep this in sync with the list of conditions in 
xmloff/source/style/prstylecond.cxx
 
-const char * const aCommandContext[COND_COMMAND_COUNT] =
+constexpr OUString aCommandContext[COND_COMMAND_COUNT] =
 {
-    "TableHeader",
-    "Table",
-    "Frame",
-    "Section",
-    "Footnote",
-    "Endnote",
-    "Header",
-    "Footer",
-    "OutlineLevel1",
-    "OutlineLevel2",
-    "OutlineLevel3",
-    "OutlineLevel4",
-    "OutlineLevel5",
-    "OutlineLevel6",
-    "OutlineLevel7",
-    "OutlineLevel8",
-    "OutlineLevel9",
-    "OutlineLevel10",
-    "NumberingLevel1",
-    "NumberingLevel2",
-    "NumberingLevel3",
-    "NumberingLevel4",
-    "NumberingLevel5",
-    "NumberingLevel6",
-    "NumberingLevel7",
-    "NumberingLevel8",
-    "NumberingLevel9",
-    "NumberingLevel10"
+    u"TableHeader"_ustr,
+    u"Table"_ustr,
+    u"Frame"_ustr,
+    u"Section"_ustr,
+    u"Footnote"_ustr,
+    u"Endnote"_ustr,
+    u"Header"_ustr,
+    u"Footer"_ustr,
+    u"OutlineLevel1"_ustr,
+    u"OutlineLevel2"_ustr,
+    u"OutlineLevel3"_ustr,
+    u"OutlineLevel4"_ustr,
+    u"OutlineLevel5"_ustr,
+    u"OutlineLevel6"_ustr,
+    u"OutlineLevel7"_ustr,
+    u"OutlineLevel8"_ustr,
+    u"OutlineLevel9"_ustr,
+    u"OutlineLevel10"_ustr,
+    u"NumberingLevel1"_ustr,
+    u"NumberingLevel2"_ustr,
+    u"NumberingLevel3"_ustr,
+    u"NumberingLevel4"_ustr,
+    u"NumberingLevel5"_ustr,
+    u"NumberingLevel6"_ustr,
+    u"NumberingLevel7"_ustr,
+    u"NumberingLevel8"_ustr,
+    u"NumberingLevel9"_ustr,
+    u"NumberingLevel10"_ustr
 };
 
 sal_Int16 GetCommandContextIndex( std::u16string_view rContextName )
@@ -65,7 +65,7 @@ sal_Int16 GetCommandContextIndex( std::u16string_view 
rContextName )
     sal_Int16 nRes = -1;
     for (sal_Int16 i = 0;  nRes == -1 && i < COND_COMMAND_COUNT;  ++i)
     {
-        if (o3tl::equalsAscii( rContextName, aCommandContext[i] ))
+        if (aCommandContext[i] == rContextName)
             nRes = i;
     }
     return nRes;
@@ -76,7 +76,7 @@ OUString GetCommandContextByIndex( sal_Int16 nIndex )
     OUString aRes;
     if (0 <= nIndex  &&  nIndex < COND_COMMAND_COUNT)
     {
-        aRes = OUString::createFromAscii( aCommandContext[ nIndex ] );
+        aRes = aCommandContext[ nIndex ];
     }
     return aRes;
 }
commit b0a33ce1d230757fc8bb10141a1a6d6e33c5a33d
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu May 2 15:12:12 2024 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sat May 4 12:28:09 2024 +0200

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

diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 8ab97c5964f5..af678bbdf25c 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1301,14 +1301,14 @@ uno::Reference< frame::XController >
     return aRet;
 }
 
-static const char* s_EventNames[] =
+constexpr OUString s_EventNames[] =
 {
-    "OnPageCountChange",
-    "OnMailMerge",
-    "OnMailMergeFinished",
-    "OnFieldMerge",
-    "OnFieldMergeFinished",
-    "OnLayoutFinished"
+    u"OnPageCountChange"_ustr,
+    u"OnMailMerge"_ustr,
+    u"OnMailMergeFinished"_ustr,
+    u"OnFieldMerge"_ustr,
+    u"OnFieldMergeFinished"_ustr,
+    u"OnLayoutFinished"_ustr
 };
 sal_Int32 const s_nEvents(SAL_N_ELEMENTS(s_EventNames));
 
@@ -1332,7 +1332,7 @@ OUString SwDocShell::GetEventName( sal_Int32 nIndex )
 {
     if (nIndex < s_nEvents)
     {
-        return OUString::createFromAscii(s_EventNames[nIndex]);
+        return s_EventNames[nIndex];
     }
     return OUString();
 }

Reply via email to