summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2023-11-29 17:44:01 +0100
committerStephan Bergmann <stephan.bergmann@allotropia.de>2023-11-30 09:00:00 +0100
commit52a8d560d814f3c3c9594e072cfa3b98373740a8 (patch)
treecf8b73c9cfc0aac1b3ea5b48a95a3bfb23e15ee4 /l10ntools
parentbc012f13d581bcc7cb413e0daf76f2d37b1dfb1d (diff)
Extended loplugin:ostr: l10ntools
Change-Id: I259867d548c3a6b5322d38584270a325b93f1776 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160117 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/cfgmerge.cxx18
-rw-r--r--l10ntools/source/helpmerge.cxx2
-rw-r--r--l10ntools/source/lngmerge.cxx4
-rw-r--r--l10ntools/source/merge.cxx2
-rw-r--r--l10ntools/source/propmerge.cxx2
-rw-r--r--l10ntools/source/xmlparse.cxx6
6 files changed, 17 insertions, 17 deletions
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