codemaker/source/javamaker/javatype.cxx |   10 +++++-----
 l10ntools/source/cfgmerge.cxx           |   18 +++++++++---------
 l10ntools/source/helpmerge.cxx          |    2 +-
 l10ntools/source/lngmerge.cxx           |    4 ++--
 l10ntools/source/merge.cxx              |    2 +-
 l10ntools/source/propmerge.cxx          |    2 +-
 l10ntools/source/xmlparse.cxx           |    6 +++---
 7 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit 52a8d560d814f3c3c9594e072cfa3b98373740a8
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Wed Nov 29 17:44:01 2023 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Thu Nov 30 09:00:00 2023 +0100

    Extended loplugin:ostr: l10ntools
    
    Change-Id: I259867d548c3a6b5322d38584270a325b93f1776
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160117
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 9ed721aab651..f1afb41f0cfd 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -201,23 +201,23 @@ void CfgParser::ExecuteAnalyzedToken( int nToken, char 
*pToken )
                 OString sSearch;
                 switch ( nToken ) {
                     case CFG_TOKEN_PACKAGE:
-                        sSearch = "package-id=";
+                        sSearch = "package-id="_ostr;
                     break;
                     case CFG_TOKEN_COMPONENT:
-                        sSearch = "component-id=";
+                        sSearch = "component-id="_ostr;
                     break;
                     case CFG_TOKEN_TEMPLATE:
-                        sSearch = "template-id=";
+                        sSearch = "template-id="_ostr;
                     break;
                     case CFG_TOKEN_CONFIGNAME:
-                        sSearch = "cfg:name=";
+                        sSearch = "cfg:name="_ostr;
                     break;
                     case CFG_TOKEN_OORNAME:
-                        sSearch = "oor:name=";
+                        sSearch = "oor:name="_ostr;
                         bLocalize = true;
                     break;
                     case CFG_TOKEN_OORVALUE:
-                        sSearch = "oor:value=";
+                        sSearch = "oor:value="_ostr;
                     break;
                     case CFG_TEXT_START: {
                         if ( sCurrentResTyp != sTokenName ) {
@@ -233,7 +233,7 @@ void CfgParser::ExecuteAnalyzedToken( int nToken, char 
*pToken )
 
                         pStackData->sTextTag = sToken;
 
-                        sCurrentText = "";
+                        sCurrentText = ""_ostr;
                     }
                     break;
                 }
@@ -301,7 +301,7 @@ void CfgParser::ExecuteAnalyzedToken( int nToken, char 
*pToken )
         Output( sToken );
 
     if ( sToken != " " && sToken != "\t" )
-        sLastWhitespace = "";
+        sLastWhitespace = ""_ostr;
 }
 
 void CfgExport::Output(const OString&)
@@ -373,7 +373,7 @@ void CfgExport::WorkOnResourceEnd()
     OString sGroupId;
     if ( aStack.size() == 1 ) {
         sGroupId = sLocalId;
-        sLocalId = "";
+        sLocalId = ""_ostr;
     }
     else {
         sGroupId = aStack.GetAccessPath( aStack.size() - 2 );
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 991309a5ee01..fa0358a89da0 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -159,7 +159,7 @@ void HelpParser::MergeSingleFile( XMLFile* file , 
MergeDataFile* pMergeDataFile
 
     XMLHashMap* aXMLStrHM = file->GetStrings();
     static ResData s_ResData(""_ostr,""_ostr);
-    s_ResData.sResTyp   = "help";
+    s_ResData.sResTyp   = "help"_ostr;
 
     std::vector<OString> order = file->getOrder();
 
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 98daf27a4f9f..4eaa94940c19 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -174,7 +174,7 @@ void LngParser::Merge(
         std::size_t nLastLangPos = 0;
 
         ResData aResData( sID, sSource );
-        aResData.sResTyp = "LngText";
+        aResData.sResTyp = "LngText"_ostr;
         MergeEntrys *pEntrys = aMergeDataFile.GetMergeEntrys( &aResData );
         // read languages
         bGroup = false;
@@ -188,7 +188,7 @@ void LngParser::Merge(
             {
                 bGroup = true;
                 nPos ++;
-                sLanguagesDone = "";
+                sLanguagesDone = ""_ostr;
             }
             else
             {
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index dbf45432ef94..88a39173aa50 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -90,7 +90,7 @@ bool MergeEntrys::GetText( OString &rReturn,
     bool bReturn = true;
     rReturn = sText[ nLangIndex ];
     if ( bDel )
-        sText[ nLangIndex ] = "";
+        sText[ nLangIndex ] = ""_ostr;
     bReturn = bTextFirst[ nLangIndex ];
     bTextFirst[ nLangIndex ] = false;
     return bReturn;
diff --git a/l10ntools/source/propmerge.cxx b/l10ntools/source/propmerge.cxx
index 7237acec4662..e17b2dd9c153 100644
--- a/l10ntools/source/propmerge.cxx
+++ b/l10ntools/source/propmerge.cxx
@@ -195,7 +195,7 @@ void PropParser::Merge( const OString &rMergeSrc, const 
OString &rDestinationFil
         {
             const OString sID( o3tl::trim(sLine.subView( 0, sLine.indexOf('=') 
)) );
             ResData  aResData( sID, m_sSource );
-            aResData.sResTyp = "property";
+            aResData.sResTyp = "property"_ostr;
             OString sNewText;
             if( m_sLang == "qtz" )
             {
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index e79b538ed324..397e071a3047 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -857,7 +857,7 @@ bool SimpleXMLParser::Execute( const OString &rFileName, 
XMLFile* pXMLFile )
     m_aErrorInformation.m_eCode = XML_ERROR_NONE;
     m_aErrorInformation.m_nLine = 0;
     m_aErrorInformation.m_nColumn = 0;
-    m_aErrorInformation.m_sMessage = "ERROR: Unable to open file ";
+    m_aErrorInformation.m_sMessage = "ERROR: Unable to open file "_ostr;
     m_aErrorInformation.m_sMessage += rFileName;
 
     OUString aFileURL(lcl_pathnameToAbsoluteUrl(rFileName));
@@ -895,7 +895,7 @@ bool SimpleXMLParser::Execute( const OString &rFileName, 
XMLFile* pXMLFile )
         m_aErrorInformation.m_sMessage = "File " + pXMLFile->GetName() + " 
parsed successfully";
     }
     else
-        m_aErrorInformation.m_sMessage = "XML-File parsed successfully";
+        m_aErrorInformation.m_sMessage = "XML-File parsed successfully"_ostr;
 
     bool result = XML_Parse(m_aParser, static_cast< char * >(p), s, true);
     if (!result)
@@ -904,7 +904,7 @@ bool SimpleXMLParser::Execute( const OString &rFileName, 
XMLFile* pXMLFile )
         m_aErrorInformation.m_nLine = XML_GetErrorLineNumber( m_aParser );
         m_aErrorInformation.m_nColumn = XML_GetErrorColumnNumber( m_aParser );
 
-        m_aErrorInformation.m_sMessage = "ERROR: ";
+        m_aErrorInformation.m_sMessage = "ERROR: "_ostr;
         if ( !pXMLFile->GetName().isEmpty())
             m_aErrorInformation.m_sMessage += pXMLFile->GetName();
         else
commit bc012f13d581bcc7cb413e0daf76f2d37b1dfb1d
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Wed Nov 29 19:38:51 2023 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Thu Nov 30 08:59:49 2023 +0100

    Extended loplugin:ostr: codemaker
    
    Change-Id: I7addfbde8ee8603eb8ca692debb2ac369347c6c7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160127
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/codemaker/source/javamaker/javatype.cxx 
b/codemaker/source/javamaker/javatype.cxx
index f51583b84adf..6ac84ff75e02 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -830,7 +830,7 @@ void addField(
     SpecialType specialType;
     PolymorphicUnoType polymorphicUnoType;
     if (typeParameterIndex >= 0) {
-        descriptor = "Ljava/lang/Object;";
+        descriptor = "Ljava/lang/Object;"_ostr;
         signature = "T" + codemaker::convertString(type).replace('.', '/')
             + ";";
         specialType = SPECIAL_TYPE_NONE; //TODO: SPECIAL_TYPE_TYPE_PARAMETER?
@@ -1322,7 +1322,7 @@ sal_uInt16 addDirectArgument(
     OString desc;
     if (typeParameter) {
         methodDescriptor->addTypeParameter(fieldType);
-        desc = "Ljava/lang/Object;";
+        desc = "Ljava/lang/Object;"_ostr;
     } else {
         methodDescriptor->addParameter(fieldType, false, true, nullptr);
         getFieldDescriptor(manager, dependencies, fieldType, &desc, nullptr, 
nullptr);
@@ -1373,7 +1373,7 @@ void handlePlainStructType(
     OString className(codemaker::convertString(name).replace('.', '/'));
     OString superClass;
     if (entity->getDirectBase().isEmpty()) {
-        superClass = "java/lang/Object";
+        superClass = "java/lang/Object"_ostr;
     } else {
         superClass = codemaker::convertString(entity->getDirectBase()).
             replace('.', '/');
@@ -1570,10 +1570,10 @@ void handleExceptionType(
     OString superClass;
     if (className == "com/sun/star/uno/Exception") {
         baseException = true;
-        superClass = "java/lang/Exception";
+        superClass = "java/lang/Exception"_ostr;
     } else if (className == "com/sun/star/uno/RuntimeException") {
         baseRuntimeException = true;
-        superClass = "java/lang/RuntimeException";
+        superClass = "java/lang/RuntimeException"_ostr;
     } else {
         if (entity->getDirectBase().isEmpty()) {
             throw CannotDumpException(

Reply via email to