desktop/qa/desktop_lib/test_desktop_lib.cxx         |    6 +++---
 desktop/source/app/app.cxx                          |    2 +-
 desktop/source/app/check_ext_deps.cxx               |    2 +-
 desktop/source/app/cmdlinehelp.cxx                  |    4 ++--
 desktop/source/app/crashreport.cxx                  |    4 ++--
 desktop/source/deployment/gui/dp_gui_dialog2.cxx    |    2 +-
 desktop/source/deployment/gui/dp_gui_theextmgr.cxx  |    2 +-
 desktop/source/deployment/manager/dp_properties.cxx |    2 +-
 desktop/source/deployment/misc/dp_dependencies.cxx  |    8 ++++----
 desktop/source/deployment/registry/help/dp_help.cxx |    2 +-
 desktop/source/lib/init.cxx                         |    8 ++++----
 desktop/source/migration/migration.cxx              |    8 ++++----
 desktop/source/migration/services/jvmfwk.cxx        |    2 +-
 13 files changed, 26 insertions(+), 26 deletions(-)

New commits:
commit 326a8d5dd2d01a2037f17a6fd921494937c134d4
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Oct 19 10:30:11 2023 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Thu Oct 19 18:49:36 2023 +0200

    Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: desktop
    
    Change-Id: I896fb07e753bfd7be5df892b1608954ad6a9cece
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158188
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index dcb5c7192782..dd89ebf1eed0 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3044,7 +3044,7 @@ void DesktopLOKTest::testComplexSelection()
 {
     // Start with a blank text file and add contents.
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
-    static constexpr OStringLiteral aText("hello world");
+    static constexpr OString aText("hello world"_ostr);
 
     // Certainly not complex.
     CPPUNIT_ASSERT_EQUAL(static_cast<int>(LOK_SELTYPE_NONE), 
pDocument->pClass->getSelectionType(pDocument));
@@ -3072,7 +3072,7 @@ void DesktopLOKTest::testComplexSelection()
     // Export as plain text, we should get only the text part "hello".
     char* pText = pDocument->pClass->getTextSelection(pDocument, 
"text/plain;charset=utf-8", nullptr);
     CPPUNIT_ASSERT(pText != nullptr);
-    CPPUNIT_ASSERT_EQUAL(OString(aText), OString(pText));
+    CPPUNIT_ASSERT_EQUAL(aText, OString(pText));
     free(pText);
 
     // Export as rtf, we should also get the image.
@@ -3128,7 +3128,7 @@ void DesktopLOKTest::testCalcSaveAs()
 
 void DesktopLOKTest::testSpellcheckerMultiView()
 {
-    static constexpr OUStringLiteral aLangISO(u"en-US");
+    static constexpr OUString aLangISO(u"en-US"_ustr);
     SvtSysLocaleOptions aSysLocaleOptions;
     aSysLocaleOptions.SetLocaleConfigString(aLangISO);
     aSysLocaleOptions.SetUILocaleConfigString(aLangISO);
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index cb3beaf0ae26..cd1d1de0d6ea 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -581,7 +581,7 @@ bool Desktop::QueryExit()
     {
     }
 
-    static constexpr OUStringLiteral SUSPEND_QUICKSTARTVETO = 
u"SuspendQuickstartVeto";
+    static constexpr OUString SUSPEND_QUICKSTARTVETO = 
u"SuspendQuickstartVeto"_ustr;
 
     Reference< XDesktop2 > xDesktop = css::frame::Desktop::create( 
::comphelper::getProcessComponentContext() );
     Reference< XPropertySet > xPropertySet(xDesktop, UNO_QUERY_THROW);
diff --git a/desktop/source/app/check_ext_deps.cxx 
b/desktop/source/app/check_ext_deps.cxx
index 8b53d564feb1..4a69a8cf79cc 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -208,7 +208,7 @@ void SilentCommandEnv::pop()
 } // end namespace
 
 
-constexpr OUStringLiteral aAccessSrvc = 
u"com.sun.star.configuration.ConfigurationUpdateAccess";
+constexpr OUString aAccessSrvc = 
u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr;
 
 static sal_Int16 impl_showExtensionDialog( uno::Reference< 
uno::XComponentContext > const &xContext )
 {
diff --git a/desktop/source/app/cmdlinehelp.cxx 
b/desktop/source/app/cmdlinehelp.cxx
index 58b8b3abb566..9c9fd940f233 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -35,9 +35,9 @@
 
 namespace desktop
 {
-    constexpr OUStringLiteral aCmdLineHelp_version =
+    constexpr OUString aCmdLineHelp_version =
         u"%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION %BUILDID\n"
-        "\n";
+        "\n"_ustr;
     constexpr OUStringLiteral aCmdLineHelp =
         u"Usage: %CMDNAME [argument...]\n"
         "       argument - switches, switch parameters and document URIs 
(filenames).   \n\n"
diff --git a/desktop/source/app/crashreport.cxx 
b/desktop/source/app/crashreport.cxx
index 680492b3b80a..186a59b02101 100644
--- a/desktop/source/app/crashreport.cxx
+++ b/desktop/source/app/crashreport.cxx
@@ -135,8 +135,8 @@ void CrashReporter::writeCommonInfo()
 
     ucbhelper::InternetProxyDecider 
proxy_decider(::comphelper::getProcessComponentContext());
 
-    static constexpr OUStringLiteral protocol = u"https";
-    static constexpr OUStringLiteral url = u"crashreport.libreoffice.org";
+    static constexpr OUString protocol = u"https"_ustr;
+    static constexpr OUString url = u"crashreport.libreoffice.org"_ustr;
     const sal_Int32 port = 443;
 
     const OUString proxy_server = proxy_decider.getProxy(protocol, url, port);
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index fd155a5749d5..03885b161941 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -77,7 +77,7 @@ using namespace ::com::sun::star::system;
 namespace dp_gui {
 
 constexpr OUStringLiteral USER_PACKAGE_MANAGER = u"user";
-constexpr OUStringLiteral SHARED_PACKAGE_MANAGER = u"shared";
+constexpr OUString SHARED_PACKAGE_MANAGER = u"shared"_ustr;
 constexpr OUStringLiteral BUNDLED_PACKAGE_MANAGER = u"bundled";
 
 // ExtBoxWithBtns_Impl
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx 
b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index e844f09c1b85..48ed3b329b96 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -41,7 +41,7 @@
 #include <dp_update.hxx>
 
 constexpr OUStringLiteral USER_PACKAGE_MANAGER = u"user";
-constexpr OUStringLiteral SHARED_PACKAGE_MANAGER = u"shared";
+constexpr OUString SHARED_PACKAGE_MANAGER = u"shared"_ustr;
 
 using namespace ::com::sun::star;
 
diff --git a/desktop/source/deployment/manager/dp_properties.cxx 
b/desktop/source/deployment/manager/dp_properties.cxx
index b0d2245e8fde..6dc1fff30351 100644
--- a/desktop/source/deployment/manager/dp_properties.cxx
+++ b/desktop/source/deployment/manager/dp_properties.cxx
@@ -33,7 +33,7 @@ namespace uno = com::sun::star::uno;
 
 using ::com::sun::star::uno::Reference;
 
-constexpr OUStringLiteral PROP_SUPPRESS_LICENSE = u"SUPPRESS_LICENSE";
+constexpr OUString PROP_SUPPRESS_LICENSE = u"SUPPRESS_LICENSE"_ustr;
 constexpr OUStringLiteral PROP_EXTENSION_UPDATE = u"EXTENSION_UPDATE";
 
 namespace dp_manager {
diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx 
b/desktop/source/deployment/misc/dp_dependencies.cxx
index 7828279c71ce..eea3cfba9cde 100644
--- a/desktop/source/deployment/misc/dp_dependencies.cxx
+++ b/desktop/source/deployment/misc/dp_dependencies.cxx
@@ -43,14 +43,14 @@ namespace {
 char const namespaceLibreOffice[] =
     "http://libreoffice.org/extensions/description/2011";;
 
-constexpr OUStringLiteral namespaceOpenOfficeOrg =
-    u"http://openoffice.org/extensions/description/2006";;
+constexpr OUString namespaceOpenOfficeOrg =
+    u"http://openoffice.org/extensions/description/2006"_ustr;
 
 char const minimalVersionLibreOffice[] = "LibreOffice-minimal-version";
 char const maximalVersionLibreOffice[] = "LibreOffice-maximal-version";
 
-constexpr OUStringLiteral minimalVersionOpenOfficeOrg =
-    u"OpenOffice.org-minimal-version";
+constexpr OUString minimalVersionOpenOfficeOrg =
+    u"OpenOffice.org-minimal-version"_ustr;
 
 char const maximalVersionOpenOfficeOrg[] =
     "OpenOffice.org-maximal-version";
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx 
b/desktop/source/deployment/registry/help/dp_help.cxx
index 888f35262f3d..a84bc2809544 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -421,7 +421,7 @@ void BackendImpl::implProcessHelp(
                             &langFolderContent,
                             langFolderDest, xCmdEnv);
 
-                        static constexpr OUStringLiteral aHelpStr(u"help");
+                        static constexpr OUString aHelpStr(u"help"_ustr);
 
                         OUString aJarFile(
                             makeURL(sHelpFolder, langFolderURLSegment + "/" + 
aHelpStr + ".jar"));
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 416265df4099..bbb32dd3d74f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -6228,7 +6228,7 @@ static char* getStyles(LibreOfficeKitDocument* pThis, 
const char* pCommand)
     {
         boost::property_tree::ptree aChild;
         boost::property_tree::ptree aChildren;
-        static constexpr OUStringLiteral sPageStyles(u"PageStyles");
+        static constexpr OUString sPageStyles(u"PageStyles"_ustr);
         uno::Reference<beans::XPropertySet> xProperty;
         uno::Reference<container::XNameContainer> xContainer;
 
@@ -6398,10 +6398,10 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
     SetLastExceptionMsg();
 
     const std::string_view aCommand(pCommand);
-    static constexpr OStringLiteral 
aViewRowColumnHeaders(".uno:ViewRowColumnHeaders");
-    static constexpr OStringLiteral 
aSheetGeometryData(".uno:SheetGeometryData");
+    static constexpr OString 
aViewRowColumnHeaders(".uno:ViewRowColumnHeaders"_ostr);
+    static constexpr OString aSheetGeometryData(".uno:SheetGeometryData"_ostr);
     static constexpr OStringLiteral aCellCursor(".uno:CellCursor");
-    static constexpr OStringLiteral aFontSubset(".uno:FontSubset&name=");
+    static constexpr OString aFontSubset(".uno:FontSubset&name="_ostr);
 
     ITiledRenderable* pDoc = getTiledRenderable(pThis);
     if (!pDoc)
diff --git a/desktop/source/migration/migration.cxx 
b/desktop/source/migration/migration.cxx
index 3b60cd771c75..b0728de61a7a 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -70,9 +70,9 @@ using namespace com::sun::star;
 namespace desktop
 {
 
-constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
-constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = 
u"ItemDescriptorContainer";
-constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
+constexpr OUString ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL"_ustr;
+constexpr OUString ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer"_ustr;
+constexpr OUString ITEM_DESCRIPTOR_LABEL = u"Label"_ustr;
 
 static OUString mapModuleShortNameToIdentifier(std::u16string_view sShortName)
 {
@@ -190,7 +190,7 @@ bool MigrationImpl::doMigration()
 
         copyFiles();
 
-        static constexpr OUStringLiteral 
sMenubarResourceURL(u"private:resource/menubar/menubar");
+        static constexpr OUString 
sMenubarResourceURL(u"private:resource/menubar/menubar"_ustr);
         static constexpr OUStringLiteral 
sToolbarResourcePre(u"private:resource/toolbar/");
         for (MigrationModuleInfo & i : vModulesInfo) {
             OUString sModuleIdentifier = 
mapModuleShortNameToIdentifier(i.sModuleShortName);
diff --git a/desktop/source/migration/services/jvmfwk.cxx 
b/desktop/source/migration/services/jvmfwk.cxx
index 65eff6767459..892c651f29de 100644
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -40,7 +40,7 @@
 
 #include <osl/diagnose.h>
 
-constexpr OUStringLiteral SERVICE_NAME = u"com.sun.star.migration.Java";
+constexpr OUString SERVICE_NAME = u"com.sun.star.migration.Java"_ustr;
 #define IMPL_NAME "com.sun.star.comp.desktop.migration.Java"
 
 #define ENABLE_JAVA     1

Reply via email to