From 2718e9c1d5779a23bd6587a7e0e55a0281b88745 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 19 Nov 2023 20:41:10 +0100 Subject: Extended loplugin:ostr: l10ntools Change-Id: I6c46535568ac6c29784e9336198b51c79c9e3859 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159695 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- l10ntools/source/helpmerge.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'l10ntools/source/helpmerge.cxx') diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx index abdc47d1c1d4..991309a5ee01 100644 --- a/l10ntools/source/helpmerge.cxx +++ b/l10ntools/source/helpmerge.cxx @@ -108,17 +108,17 @@ bool HelpParser::CreatePO( auto posm = aXMLStrHM->find(pos); LangHashMap* pElem = posm->second; - XMLElement* pXMLElement = (*pElem)[ "en-US" ]; + XMLElement* pXMLElement = (*pElem)[ "en-US"_ostr ]; if( pXMLElement != nullptr ) { OString data( pXMLElement->ToOString(). - replaceAll("\n",OString()). - replaceAll("\t",OString()).trim()); + replaceAll("\n"_ostr,OString()). + replaceAll("\t"_ostr,OString()).trim()); common::writePoEntry( - "Helpex", aPoOutput, sHelpFile, rGsi1, + "Helpex"_ostr, aPoOutput, sHelpFile, rGsi1, posm->first, OString(), OString(), data); pXMLElement=nullptr; @@ -158,7 +158,7 @@ void HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile* pMergeDataFile file->Extract(); XMLHashMap* aXMLStrHM = file->GetStrings(); - static ResData s_ResData("",""); + static ResData s_ResData(""_ostr,""_ostr); s_ResData.sResTyp = "help"; std::vector order = file->getOrder(); @@ -190,7 +190,7 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa if( sCur.equalsIgnoreAsciiCase("en-US") ) return; - pXMLElement = (*aLangHM)[ "en-US" ]; + pXMLElement = (*aLangHM)[ "en-US"_ostr ]; if( pXMLElement == nullptr ) { printf("Error: Can't find en-US entry\n"); @@ -202,10 +202,10 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa OString sSourceText( pXMLElement->ToOString(). replaceAll( - "\n", + "\n"_ostr, OString()). replaceAll( - "\t", + "\t"_ostr, OString())); // re-add spaces to the beginning of translated string, // important for indentation of Basic code examples -- cgit