jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx               |    8 +-
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx                        |    8 +-
 jvmfwk/source/fwkbase.cxx                                         |   28 
+++++-----
 lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx             |    6 +-
 lingucomponent/source/languageguessing/guesslang.cxx              |    4 -
 lingucomponent/source/lingutil/lingutil.cxx                       |    2 
 lingucomponent/source/numbertext/numbertext.cxx                   |    4 -
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx |    9 +--
 lingucomponent/source/spellcheck/spell/sspellimp.cxx              |    8 +-
 lingucomponent/source/thesaurus/libnth/nthesimp.cxx               |    6 +-
 10 files changed, 42 insertions(+), 41 deletions(-)

New commits:
commit 38c980d472b5d311de60ee7cfcce880f66a55df8
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu May 9 13:38:04 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu May 9 17:59:34 2024 +0200

    loplugin:ostr in lingucomponent
    
    Change-Id: I1910fd2a7cba63404c37b7bb80b77de2443dd7a5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167386
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx 
b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
index 4007c1b42555..f2e311b1a432 100644
--- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
@@ -123,8 +123,8 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
         // new configuration entries).
         std::vector< SvtLinguConfigDictionaryEntry > aDics;
         uno::Sequence< OUString > aFormatList;
-        aLinguCfg.GetSupportedDictionaryFormatsFor( "Hyphenators",
-                "org.openoffice.lingu.LibHnjHyphenator", aFormatList );
+        aLinguCfg.GetSupportedDictionaryFormatsFor( u"Hyphenators"_ustr,
+                u"org.openoffice.lingu.LibHnjHyphenator"_ustr, aFormatList );
         for (const auto& rFormat : aFormatList)
         {
             std::vector< SvtLinguConfigDictionaryEntry > aTmpDic(
@@ -961,7 +961,7 @@ void SAL_CALL Hyphenator::removeEventListener( const 
Reference< XEventListener >
 // Service specific part
 OUString SAL_CALL Hyphenator::getImplementationName()
 {
-    return "org.openoffice.lingu.LibHnjHyphenator";
+    return u"org.openoffice.lingu.LibHnjHyphenator"_ustr;
 }
 
 sal_Bool SAL_CALL Hyphenator::supportsService( const OUString& ServiceName )
diff --git a/lingucomponent/source/languageguessing/guesslang.cxx 
b/lingucomponent/source/languageguessing/guesslang.cxx
index e88cd997caa0..8069071531a5 100644
--- a/lingucomponent/source/languageguessing/guesslang.cxx
+++ b/lingucomponent/source/languageguessing/guesslang.cxx
@@ -296,7 +296,7 @@ void SAL_CALL LangGuess_Impl::enableLanguages(
 
 OUString SAL_CALL LangGuess_Impl::getImplementationName(  )
 {
-    return "com.sun.star.lingu2.LanguageGuessing";
+    return u"com.sun.star.lingu2.LanguageGuessing"_ustr;
 }
 
 sal_Bool SAL_CALL LangGuess_Impl::supportsService( const OUString& ServiceName 
)
@@ -306,7 +306,7 @@ sal_Bool SAL_CALL LangGuess_Impl::supportsService( const 
OUString& ServiceName )
 
 Sequence<OUString> SAL_CALL LangGuess_Impl::getSupportedServiceNames(  )
 {
-    return { "com.sun.star.linguistic2.LanguageGuessing" };
+    return { u"com.sun.star.linguistic2.LanguageGuessing"_ustr };
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
diff --git a/lingucomponent/source/lingutil/lingutil.cxx 
b/lingucomponent/source/lingutil/lingutil.cxx
index c737698417c5..2057b54c3612 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -207,7 +207,7 @@ std::vector< SvtLinguConfigDictionaryEntry > 
GetOldStyleDics( const char *pDicTy
 #ifndef IOS
     // follow the hunspell tool's example and check DICPATH for preferred 
dictionaries
     rtl_uString * pSearchPath = nullptr;
-    osl_getEnvironment(OUString("DICPATH").pData, &pSearchPath);
+    osl_getEnvironment(u"DICPATH"_ustr.pData, &pSearchPath);
 
     if (pSearchPath)
     {
diff --git a/lingucomponent/source/numbertext/numbertext.cxx 
b/lingucomponent/source/numbertext/numbertext.cxx
index b87b2cc5fc1e..dda2899415d7 100644
--- a/lingucomponent/source/numbertext/numbertext.cxx
+++ b/lingucomponent/source/numbertext/numbertext.cxx
@@ -145,7 +145,7 @@ uno::Sequence<Locale> SAL_CALL 
NumberText_Impl::getAvailableLanguages()
 
 OUString SAL_CALL NumberText_Impl::getImplementationName()
 {
-    return "com.sun.star.lingu2.NumberText";
+    return u"com.sun.star.lingu2.NumberText"_ustr;
 }
 
 sal_Bool SAL_CALL NumberText_Impl::supportsService(const OUString& ServiceName)
@@ -155,7 +155,7 @@ sal_Bool SAL_CALL NumberText_Impl::supportsService(const 
OUString& ServiceName)
 
 Sequence<OUString> SAL_CALL NumberText_Impl::getSupportedServiceNames()
 {
-    return { "com.sun.star.linguistic2.NumberText" };
+    return { u"com.sun.star.linguistic2.NumberText"_ustr };
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
diff --git a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx 
b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
index ed8586dd50a5..e50e96e4fb05 100644
--- a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
+++ b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
@@ -83,7 +83,7 @@ PropertyValue lcl_GetLineColorPropertyFromErrorId(const 
std::string& rErrorId)
         constexpr Color COL_ORANGE(0xD1, 0x68, 0x20);
         aColor = COL_ORANGE;
     }
-    return comphelper::makePropertyValue("LineColor", aColor);
+    return comphelper::makePropertyValue(u"LineColor"_ustr, aColor);
 }
 
 OString encodeTextForLT(const OUString& text)
@@ -346,8 +346,9 @@ uno::Sequence<Locale> SAL_CALL 
LanguageToolGrammarChecker::getLocales()
         aLocaleList.getArray()[2] = "en-GB";
     }
     else
-        aLinguCfg.GetLocaleListFor("GrammarCheckers",
-                                   
"org.openoffice.lingu.LanguageToolGrammarChecker", aLocaleList);
+        aLinguCfg.GetLocaleListFor(u"GrammarCheckers"_ustr,
+                                   
u"org.openoffice.lingu.LanguageToolGrammarChecker"_ustr,
+                                   aLocaleList);
 
     auto nLength = aLocaleList.getLength();
     m_aSuppLocales.realloc(nLength);
@@ -494,7 +495,7 @@ OUString SAL_CALL 
LanguageToolGrammarChecker::getServiceDisplayName(const Locale
 
 OUString SAL_CALL LanguageToolGrammarChecker::getImplementationName()
 {
-    return "org.openoffice.lingu.LanguageToolGrammarChecker";
+    return u"org.openoffice.lingu.LanguageToolGrammarChecker"_ustr;
 }
 
 sal_Bool SAL_CALL LanguageToolGrammarChecker::supportsService(const OUString& 
ServiceName)
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx 
b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index 468c9066aea0..7c94ad1ef98d 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -118,8 +118,8 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
         // new configuration entries).
         std::vector< SvtLinguConfigDictionaryEntry > aDics;
         uno::Sequence< OUString > aFormatList;
-        aLinguCfg.GetSupportedDictionaryFormatsFor( "SpellCheckers",
-                "org.openoffice.lingu.MySpellSpellChecker", aFormatList );
+        aLinguCfg.GetSupportedDictionaryFormatsFor( u"SpellCheckers"_ustr,
+                u"org.openoffice.lingu.MySpellSpellChecker"_ustr, aFormatList 
);
         for (auto const& format : aFormatList)
         {
             std::vector< SvtLinguConfigDictionaryEntry > aTmpDic(
@@ -141,7 +141,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
         if (!aDics.empty())
         {
             uno::Reference< lang::XMultiServiceFactory > 
xServiceFactory(comphelper::getProcessServiceFactory());
-            uno::Reference< ucb::XSimpleFileAccess > 
xAccess(xServiceFactory->createInstance("com.sun.star.ucb.SimpleFileAccess"), 
uno::UNO_QUERY);
+            uno::Reference< ucb::XSimpleFileAccess > 
xAccess(xServiceFactory->createInstance(u"com.sun.star.ucb.SimpleFileAccess"_ustr),
 uno::UNO_QUERY);
             // get supported locales from the dictionaries-to-use...
             std::set<OUString> aLocaleNamesSet;
             for (auto const& dict : aDics)
@@ -621,7 +621,7 @@ void SAL_CALL SpellChecker::removeEventListener( const 
Reference< XEventListener
 // Service specific part
 OUString SAL_CALL SpellChecker::getImplementationName()
 {
-    return "org.openoffice.lingu.MySpellSpellChecker";
+    return u"org.openoffice.lingu.MySpellSpellChecker"_ustr;
 }
 
 sal_Bool SAL_CALL SpellChecker::supportsService( const OUString& ServiceName )
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx 
b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 6ae5ad0a76b7..e20c0fc74d7e 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -106,8 +106,8 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales()
         // get list of dictionaries-to-use
         std::vector< SvtLinguConfigDictionaryEntry > aDics;
         uno::Sequence< OUString > aFormatList;
-        aLinguCfg.GetSupportedDictionaryFormatsFor( "Thesauri",
-                "org.openoffice.lingu.new.Thesaurus", aFormatList );
+        aLinguCfg.GetSupportedDictionaryFormatsFor( u"Thesauri"_ustr,
+                u"org.openoffice.lingu.new.Thesaurus"_ustr, aFormatList );
         for (const auto& rFormat : aFormatList)
         {
             std::vector< SvtLinguConfigDictionaryEntry > aTmpDic(
@@ -547,7 +547,7 @@ void SAL_CALL Thesaurus::removeEventListener( const 
Reference< XEventListener >&
 // Service specific part
 OUString SAL_CALL Thesaurus::getImplementationName()
 {
-    return "org.openoffice.lingu.new.Thesaurus";
+    return u"org.openoffice.lingu.new.Thesaurus"_ustr;
 }
 
 sal_Bool SAL_CALL Thesaurus::supportsService( const OUString& ServiceName )
commit 927e66058a0a29dcb327c6751984e19373a476c2
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu May 9 13:37:42 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu May 9 17:59:26 2024 +0200

    loplugin:ostr in jvmfwk
    
    Change-Id: Ie21df5b25d15a15ba7a1660970ff7064bb8ec1d0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167385
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 3ad5f79fbafc..6c31efb7adf4 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -106,8 +106,8 @@ OString getPluginJarPath(
     std::u16string_view sVersion)
 {
     OString ret;
-    OUString sName1("javaplugin.jar");
-    OUString sName2("plugin.jar");
+    OUString sName1(u"javaplugin.jar"_ustr);
+    OUString sName2(u"plugin.jar"_ustr);
     OUString sPath;
     if ( sVendor == u"Sun Microsystems Inc." )
     {
@@ -667,10 +667,10 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
     //Setting the JAVA_HOME is needed for awt
     OUString sPathLocation;
     osl::FileBase::getSystemPathFromFileURL(pInfo->sLocation, sPathLocation);
-    osl_setEnvironment(OUString("JAVA_HOME").pData, sPathLocation.pData);
+    osl_setEnvironment(u"JAVA_HOME"_ustr.pData, sPathLocation.pData);
 #endif
 
-    OUString sSymbolCreateJava("JNI_CreateJavaVM");
+    OUString sSymbolCreateJava(u"JNI_CreateJavaVM"_ustr);
 
     JNI_CreateVM_Type * pCreateJavaVM =
         reinterpret_cast<JNI_CreateVM_Type 
*>(moduleRt.getFunctionSymbol(sSymbolCreateJava));
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 6eb96d731c8f..1610188f55ac 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -388,9 +388,9 @@ bool getJavaProps(const OUString & exePath,
 
     //prepare the arguments
     sal_Int32 const cArgs = 3;
-    OUString arg1 = "-classpath";// + sClassPath;
+    OUString arg1 = u"-classpath"_ustr;// + sClassPath;
     OUString arg2 = sClassPath;
-    OUString arg3("JREProperties");
+    OUString arg3(u"JREProperties"_ustr);
     rtl_uString *args[cArgs] = {arg1.pData, arg2.pData, arg3.pData};
 
     oslProcess javaProcess= nullptr;
@@ -1161,8 +1161,8 @@ void addJavaInfosDirScan(
         aDir.close();
     }
 #else // MACOSX
-    OUString excMessage = "[Java framework] sunjavaplugin: "
-                          "Error in function addJavaInfosDirScan in util.cxx.";
+    OUString excMessage = u"[Java framework] sunjavaplugin: "
+                          "Error in function addJavaInfosDirScan in 
util.cxx."_ustr;
     int cJavaNames= SAL_N_ELEMENTS(g_arJavaNames);
     std::unique_ptr<OUString[]> sarJavaNames(new OUString[cJavaNames]);
     OUString *arNames = sarJavaNames.get();
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 8275359cebc8..197bc43dc08f 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -137,9 +137,9 @@ VersionInfo 
VendorSettings::getVersionInformation(std::u16string_view sVendor) c
 #if defined MACOSX && defined __aarch64__
             "17",
 #else
-            "1.8.0",
+            u"1.8.0"_ustr,
 #endif
-            ""};
+            u""_ustr};
     }
 
     VersionInfo aVersionInfo;
@@ -233,19 +233,19 @@ VersionInfo 
VendorSettings::getVersionInformation(std::u16string_view sVendor) c
 
 OUString BootParams::getUserData()
 {
-    return getParamFirstUrl("UNO_JAVA_JFW_USER_DATA");
+    return getParamFirstUrl(u"UNO_JAVA_JFW_USER_DATA"_ustr);
 }
 
 OUString BootParams::getSharedData()
 {
-    return getParamFirstUrl("UNO_JAVA_JFW_SHARED_DATA");
+    return getParamFirstUrl(u"UNO_JAVA_JFW_SHARED_DATA"_ustr);
 }
 
 OString BootParams::getClasspath()
 {
     OString sClassPath;
     OUString sCP;
-    if (Bootstrap()->getFrom( UNO_JAVA_JFW_CLASSPATH, sCP ))
+    if (Bootstrap()->getFrom( u"" UNO_JAVA_JFW_CLASSPATH ""_ustr, sCP ))
     {
         sClassPath = OUStringToOString(sCP, PathEncoding());
         SAL_INFO(
@@ -255,7 +255,7 @@ OString BootParams::getClasspath()
     }
 
     OUString sEnvCP;
-    if (Bootstrap()->getFrom( UNO_JAVA_JFW_ENV_CLASSPATH, sEnvCP ))
+    if (Bootstrap()->getFrom( u"" UNO_JAVA_JFW_ENV_CLASSPATH ""_ustr, sEnvCP ))
     {
         char * pCp = getenv("CLASSPATH");
         if (pCp)
@@ -274,7 +274,7 @@ OString BootParams::getClasspath()
 OUString BootParams::getVendorSettings()
 {
     OUString sVendor;
-    if (Bootstrap()->getFrom(UNO_JAVA_JFW_VENDOR_SETTINGS, sVendor))
+    if (Bootstrap()->getFrom(u"" UNO_JAVA_JFW_VENDOR_SETTINGS ""_ustr, 
sVendor))
     {
         //check the value of the bootstrap variable
         jfw::FileStatus s = checkFileURL(sVendor);
@@ -311,8 +311,8 @@ OUString BootParams::getJREHome()
 {
     OUString sJRE;
     OUString sEnvJRE;
-    bool bJRE = Bootstrap()->getFrom(UNO_JAVA_JFW_JREHOME, sJRE);
-    bool bEnvJRE = Bootstrap()->getFrom(UNO_JAVA_JFW_ENV_JREHOME, sEnvJRE);
+    bool bJRE = Bootstrap()->getFrom(u"" UNO_JAVA_JFW_JREHOME ""_ustr, sJRE);
+    bool bEnvJRE = Bootstrap()->getFrom(u"" UNO_JAVA_JFW_ENV_JREHOME ""_ustr, 
sEnvJRE);
 
     if (bJRE && bEnvJRE)
     {
@@ -365,7 +365,7 @@ OUString BootParams::getJREHome()
 OUString BootParams::getClasspathUrls()
 {
     OUString sParams;
-    Bootstrap()->getFrom( UNO_JAVA_JFW_CLASSPATH_URLS, sParams);
+    Bootstrap()->getFrom( u"" UNO_JAVA_JFW_CLASSPATH_URLS ""_ustr, sParams);
     SAL_INFO(
         "jfw.level2",
         "Using bootstrap parameter " UNO_JAVA_JFW_CLASSPATH_URLS " = "
@@ -384,13 +384,13 @@ JFW_MODE getMode()
         bool bDirectMode = true;
         OUString sValue;
         const rtl::Bootstrap * aBoot = Bootstrap();
-        if (!aBoot->getFrom(UNO_JAVA_JFW_JREHOME, sValue))
+        if (!aBoot->getFrom(u"" UNO_JAVA_JFW_JREHOME ""_ustr, sValue))
         {
-            if (!aBoot->getFrom(UNO_JAVA_JFW_ENV_JREHOME, sValue))
+            if (!aBoot->getFrom(u"" UNO_JAVA_JFW_ENV_JREHOME ""_ustr, sValue))
             {
-                if (!aBoot->getFrom(UNO_JAVA_JFW_CLASSPATH, sValue))
+                if (!aBoot->getFrom(u"" UNO_JAVA_JFW_CLASSPATH ""_ustr, 
sValue))
                 {
-                    if (!aBoot->getFrom(UNO_JAVA_JFW_ENV_CLASSPATH, sValue))
+                    if (!aBoot->getFrom(u"" UNO_JAVA_JFW_ENV_CLASSPATH 
""_ustr, sValue))
                     {
                         OUString sParams = UNO_JAVA_JFW_PARAMETER +
                             OUString::number(1);

Reply via email to