summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-26 10:58:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-28 19:44:08 +0200
commitef513fd4b049b214a03fbe6e62a5ea43680a7a9b (patch)
tree82f2ce93bc8e5fde6dce8685b633c3d643c9f069 /l10ntools
parent826f1bca40a01f0a249d5b6cbb7c39c11638a060 (diff)
remove unnecessary use of OString::getStr
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/cfgmerge.cxx2
-rw-r--r--l10ntools/source/common.cxx4
-rw-r--r--l10ntools/source/helpmerge.cxx6
-rw-r--r--l10ntools/source/lngmerge.cxx4
-rw-r--r--l10ntools/source/localize.cxx12
-rw-r--r--l10ntools/source/merge.cxx6
-rw-r--r--l10ntools/source/po.cxx10
-rw-r--r--l10ntools/source/propmerge.cxx16
-rw-r--r--l10ntools/source/treemerge.cxx10
-rw-r--r--l10ntools/source/uimerge.cxx6
-rw-r--r--l10ntools/source/xmlparse.cxx16
-rw-r--r--l10ntools/source/xrmmerge.cxx8
12 files changed, 50 insertions, 50 deletions
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 240650ca0f53..d8ec518c1a3a 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -456,7 +456,7 @@ void CfgMerge::WorkOnText(OString &, const OString& rLangIndex)
void CfgMerge::Output(const OString& rOutput)
{
- pOutputStream << rOutput.getStr();
+ pOutputStream << rOutput;
}
void CfgMerge::WorkOnResourceEnd()
diff --git a/l10ntools/source/common.cxx b/l10ntools/source/common.cxx
index 444aa31d741c..45c15fae969c 100644
--- a/l10ntools/source/common.cxx
+++ b/l10ntools/source/common.cxx
@@ -91,9 +91,9 @@ bool handleArguments(
void writeUsage(const OString& rName, const OString& rFileType)
{
std::cout
- << " Syntax: " << rName.getStr()
+ << " Syntax: " << rName
<< " -i FileIn -o FileOut [-m DataBase] [-l Lang] [-b]\n"
- " FileIn: Source files (" << rFileType.getStr() << ")\n"
+ " FileIn: Source files (" << rFileType << ")\n"
" FileOut: Destination file (*.*)\n"
" DataBase: Mergedata (*.po)\n"
" Lang: Restrict the handled language; one element of\n"
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 092de8a61790..f1df5aa7881e 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -231,7 +231,7 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa
// important for indentation of Basic code examples
sal_Int32 nPreSpaces = 0;
sal_Int32 nLen = sSourceText.getLength();
- while ( (nPreSpaces < nLen) && (*(sSourceText.getStr()+nPreSpaces) == ' ') )
+ while ( (nPreSpaces < nLen) && (sSourceText[nPreSpaces] == ' ') )
nPreSpaces++;
if( sCur == "qtz" )
{
@@ -264,8 +264,8 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa
{
SAL_WARN(
"l10ntools",
- "Can't find GID=" << pResData->sGId.getStr() << " LID="
- << pResData->sId.getStr() << " TYP=" << pResData->sResTyp.getStr());
+ "Can't find GID=" << pResData->sGId << " LID="
+ << pResData->sId << " TYP=" << pResData->sResTyp);
}
pXMLElement->ChangeLanguageTag(sCur);
}
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 646cd02f044b..513c36e13e56 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -92,7 +92,7 @@ bool LngParser::CreatePO( const OString &rPOFile )
{
PoOfstream aPOStream( rPOFile, PoOfstream::APP );
if (!aPOStream.isOpen()) {
- std::cerr << "Ulfex error: Can't open po file:" << rPOFile.getStr() << "\n";
+ std::cerr << "Ulfex error: Can't open po file:" << rPOFile << "\n";
}
size_t nPos = 0;
@@ -309,7 +309,7 @@ bool LngParser::Merge(
}
for ( size_t i = 0; i < pLines->size(); ++i )
- aDestination << (*pLines)[i]->getStr() << '\n';
+ aDestination << *(*pLines)[i] << '\n';
aDestination.close();
return true;
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 2d3265871720..b977562fba2f 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -94,7 +94,7 @@ void handleCommand(
const OString cmd = buf.makeStringAndClear();
if (system(cmd.getStr()) != 0)
{
- cerr << "Error: Failed to execute " << cmd.getStr() << '\n';
+ cerr << "Error: Failed to execute " << cmd << '\n';
throw false; //TODO
}
}
@@ -116,7 +116,7 @@ void InitPoFile(
<< ("Error: Cannot convert pathname to URL in " __FILE__
", in line ")
<< __LINE__ << "\n outDir: "
- << OUStringToOString(outDir, RTL_TEXTENCODING_ASCII_US).getStr()
+ << outDir
<< "\n";
throw false; //TODO
}
@@ -130,7 +130,7 @@ void InitPoFile(
{
cerr
<< "Error: Cannot open po file "
- << rOutPath.getStr() << "\n";
+ << rOutPath << "\n";
throw false; //TODO
}
@@ -231,7 +231,7 @@ void handleFilesOfDir(
{
cerr
<< "Error: Cannot remove entryless pot file: "
- << sPotFile.getStr() << "\n";
+ << sPotFile << "\n";
throw false; //TODO
}
}
@@ -395,7 +395,7 @@ void handleDirectory(
<< ("Error: Cannot convert pathname to URL in " __FILE__
", in line ")
<< __LINE__ << "\n"
- << OUStringToOString(sPoPath, RTL_TEXTENCODING_UTF8).getStr()
+ << sPoPath
<< "\n";
throw false; //TODO
}
@@ -423,7 +423,7 @@ void handleProjects(char * sSourceRoot, char const * sDestRoot)
<< ("Error: Cannot convert pathname to URL in " __FILE__
", in line ")
<< __LINE__ << "\n root16: "
- << OUStringToOString(root16, RTL_TEXTENCODING_ASCII_US).getStr()
+ << root16
<< "\n";
throw false; //TODO
}
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index e08f35f4f87b..56eceb8c236c 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -47,7 +47,7 @@ namespace
}
catch (const PoIfstream::Exception&)
{
- SAL_WARN("l10ntools", rFileName.getStr() << " contains invalid entry");
+ SAL_WARN("l10ntools", rFileName << " contains invalid entry");
return false;
}
return true;
@@ -222,7 +222,7 @@ MergeDataFile::MergeDataFile(
std::ifstream aInputStream( rFileName.getStr() );
if ( !aInputStream.is_open() )
{
- SAL_WARN("l10ntools", "Can't open po path container file for " << rFileName.getStr());
+ SAL_WARN("l10ntools", "Can't open po path container file for " << rFileName);
return;
}
std::string sPoFile;
@@ -239,7 +239,7 @@ MergeDataFile::MergeDataFile(
aPoInput.open( sPoFileName );
if ( !aPoInput.isOpen() )
{
- SAL_WARN("l10ntools", "Can't open file: " << sPoFileName.getStr());
+ SAL_WARN("l10ntools", "Can't open file: " << sPoFileName);
return;
}
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 7bfa070e64ce..856a76b61835 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -129,19 +129,19 @@ void GenPoEntry::writeToFile(std::ofstream& rOFStream) const
if ( !m_sExtractCom.isEmpty() )
rOFStream
<< "#. "
- << m_sExtractCom.replaceAll("\n","\n#. ").getStr() << std::endl;
+ << m_sExtractCom.replaceAll("\n","\n#. ") << std::endl;
if ( !m_sReference.isEmpty() )
- rOFStream << "#: " << m_sReference.getStr() << std::endl;
+ rOFStream << "#: " << m_sReference << std::endl;
if ( m_bFuzzy )
rOFStream << "#, fuzzy" << std::endl;
if ( !m_sMsgCtxt.isEmpty() )
rOFStream << "msgctxt "
- << lcl_GenMsgString(m_sReference+"\n"+m_sMsgCtxt).getStr()
+ << lcl_GenMsgString(m_sReference+"\n"+m_sMsgCtxt)
<< std::endl;
rOFStream << "msgid "
- << lcl_GenMsgString(m_sMsgId).getStr() << std::endl;
+ << lcl_GenMsgString(m_sMsgId) << std::endl;
rOFStream << "msgstr "
- << lcl_GenMsgString(m_sMsgStr).getStr() << std::endl;
+ << lcl_GenMsgString(m_sMsgStr) << std::endl;
}
void GenPoEntry::readFromFile(std::ifstream& rIFStream)
diff --git a/l10ntools/source/propmerge.cxx b/l10ntools/source/propmerge.cxx
index 9ae073931118..bb58876c5d14 100644
--- a/l10ntools/source/propmerge.cxx
+++ b/l10ntools/source/propmerge.cxx
@@ -113,7 +113,7 @@ PropParser::PropParser(
{
std::cerr
<< "Propex error: Cannot open source file: "
- << m_sSource.getStr() << std::endl;
+ << m_sSource << std::endl;
return;
}
m_bIsInitialized = true;
@@ -132,7 +132,7 @@ void PropParser::Extract( const OString& rPOFile )
{
std::cerr
<< "Propex error: Cannot open pofile for extract: "
- << rPOFile.getStr() << std::endl;
+ << rPOFile << std::endl;
return;
}
@@ -163,7 +163,7 @@ void PropParser::Merge( const OString &rMergeSrc, const OString &rDestinationFil
if( !aDestination.is_open() ) {
std::cerr
<< "Propex error: Cannot open source file for merge: "
- << rDestinationFile.getStr() << std::endl;
+ << rDestinationFile << std::endl;
return;
}
@@ -178,8 +178,8 @@ void PropParser::Merge( const OString &rMergeSrc, const OString &rDestinationFil
std::cerr
<< ("Propex error: given language conflicts with language of"
" Mergedata file: ")
- << m_sLang.getStr() << " - "
- << vLanguages[0].getStr() << std::endl;
+ << m_sLang << " - "
+ << vLanguages[0] << std::endl;
return;
}
}
@@ -210,18 +210,18 @@ void PropParser::Merge( const OString &rMergeSrc, const OString &rDestinationFil
}
if( !sNewText.isEmpty() )
{
- aDestination << OString(sID + "=").getStr();
+ aDestination << OString(sID + "=");
lcl_PrintJavaStyle( sNewText, aDestination );
aDestination << std::endl;
}
else
{
- aDestination << sLine.getStr() << std::endl;
+ aDestination << sLine << std::endl;
}
}
else
{
- aDestination << sLine.getStr() << std::endl;
+ aDestination << sLine << std::endl;
}
}
aDestination.close();
diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx
index a0c738cc0782..95b6ab2595dc 100644
--- a/l10ntools/source/treemerge.cxx
+++ b/l10ntools/source/treemerge.cxx
@@ -130,7 +130,7 @@ namespace
{
std::cerr
<< "Treex error: Cannot find title in "
- << sXhpPath.getStr() << std::endl;
+ << sXhpPath << std::endl;
return nullptr;
}
xmlFree( pXhpFile );
@@ -208,7 +208,7 @@ TreeParser::TreeParser(
if ( !m_pSource ) {
std::cerr
<< "Treex error: Cannot open source file: "
- << rInputFile.getStr() << std::endl;
+ << rInputFile << std::endl;
return;
}
if( !m_pSource->name )
@@ -231,7 +231,7 @@ void TreeParser::Extract( const OString& rPOFile )
{
std::cerr
<< "Treex error: Cannot open po file for extract: "
- << rPOFile.getStr() << std::endl;
+ << rPOFile << std::endl;
return;
}
@@ -264,8 +264,8 @@ void TreeParser::Merge(
std::cerr
<< ("Treex error: given language conflicts with language of"
" Mergedata file: ")
- << m_sLang.getStr() << " - "
- << vLanguages[0].getStr() << std::endl;
+ << m_sLang << " - "
+ << vLanguages[0] << std::endl;
delete pMergeDataFile;
return;
}
diff --git a/l10ntools/source/uimerge.cxx b/l10ntools/source/uimerge.cxx
index dd334de13fa5..0bc13697cd8e 100644
--- a/l10ntools/source/uimerge.cxx
+++ b/l10ntools/source/uimerge.cxx
@@ -113,9 +113,9 @@ namespace
if (sOut.isEmpty())
continue;
- aDestination << " <e g=\"" << aI->second->sGID.getStr() << "\" i=\""
- << aI->second->sLID.getStr() << "\">"
- << helper::QuotHTML(sOut).getStr() << "</e>\n";
+ aDestination << " <e g=\"" << aI->second->sGID << "\" i=\""
+ << aI->second->sLID << "\">"
+ << helper::QuotHTML(sOut) << "</e>\n";
}
aDestination << "</t>";
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index fd6e1f7f2837..5b0fcb88ff48 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -158,7 +158,7 @@ void XMLFile::Write( OString const &aFilename )
if (!s.is_open())
{
std::cerr
- << "Error: helpex cannot create file " << aFilename.getStr()
+ << "Error: helpex cannot create file " << aFilename
<< '\n';
std::exit(EXIT_FAILURE);
}
@@ -184,16 +184,16 @@ bool XMLFile::Write( ofstream &rStream , XMLNode *pCur )
{
XMLElement *pElement = static_cast<XMLElement*>(pCur);
rStream << "<";
- rStream << pElement->GetName().getStr();
+ rStream << pElement->GetName();
if ( pElement->GetAttributeList())
for ( size_t j = 0; j < pElement->GetAttributeList()->size(); j++ )
{
rStream << " ";
OString sData( (*pElement->GetAttributeList())[ j ]->GetName() );
- rStream << XMLUtil::QuotHTML( sData ).getStr();
+ rStream << XMLUtil::QuotHTML( sData );
rStream << "=\"";
sData = (*pElement->GetAttributeList())[ j ]->GetValue();
- rStream << XMLUtil::QuotHTML( sData ).getStr();
+ rStream << XMLUtil::QuotHTML( sData );
rStream << "\"";
}
if ( !pElement->GetChildList())
@@ -204,7 +204,7 @@ bool XMLFile::Write( ofstream &rStream , XMLNode *pCur )
for ( size_t k = 0; k < pElement->GetChildList()->size(); k++ )
Write( rStream, (*pElement->GetChildList())[ k ] );
rStream << "</";
- rStream << pElement->GetName().getStr();
+ rStream << pElement->GetName();
rStream << ">";
}
}
@@ -212,21 +212,21 @@ bool XMLFile::Write( ofstream &rStream , XMLNode *pCur )
case XMLNodeType::DATA:
{
OString sData( static_cast<const XMLData*>(pCur)->GetData());
- rStream << XMLUtil::QuotHTML( sData ).getStr();
+ rStream << XMLUtil::QuotHTML( sData );
}
break;
case XMLNodeType::COMMENT:
{
const XMLComment *pComment = static_cast<const XMLComment*>(pCur);
rStream << "<!--";
- rStream << pComment->GetComment().getStr();
+ rStream << pComment->GetComment();
rStream << "-->";
}
break;
case XMLNodeType::DEFAULT:
{
const XMLDefault *pDefault = static_cast<const XMLDefault*>(pCur);
- rStream << pDefault->GetDefault().getStr();
+ rStream << pDefault->GetDefault();
}
break;
}
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 2bebcfeb4d4d..98c17e68d65e 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -443,7 +443,7 @@ void XRMResMerge::WorkOnDesc(
sal_Int32 i = sOutputFile.lastIndexOf('/');
if (i == -1) {
std::cerr
- << "Error: output file " << sOutputFile.getStr()
+ << "Error: output file " << sOutputFile
<< " does not contain any /\n";
throw false; //TODO
}
@@ -451,12 +451,12 @@ void XRMResMerge::WorkOnDesc(
sOutputFile.copy(0, i + 1) + sLocDescFilename);
ofstream file(sOutputDescFile.getStr());
if (file.is_open()) {
- file << sText.getStr();
+ file << sText;
file.close();
} else {
std::cerr
<< "Error: cannot write "
- << sOutputDescFile.getStr() << '\n';
+ << sOutputDescFile << '\n';
throw false; //TODO
}
}
@@ -481,7 +481,7 @@ void XRMResMerge::WorkOnText(
void XRMResMerge::Output( const OString& rOutput )
{
if (!rOutput.isEmpty())
- pOutputStream << rOutput.getStr();
+ pOutputStream << rOutput;
}
void XRMResMerge::EndOfText(