summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-06-29 09:45:49 +0200
committerThomas Arnhold <thomas@arnhold.org>2013-06-29 09:53:41 +0200
commite67c21ee0696cde7538016a813a5cbf39fb803b0 (patch)
tree841b1b4914a60a4de951ae7a39de7249762725cc /l10ntools
parent34dc6baf2c61f4127e6d8d89c92d8e4c37684ff5 (diff)
Search for char instead of 1 char long string, when possible.
follow-up of a7674482254ee996b1c4fee60f3064778be369aa Change-Id: I25f40c601454c092078307d931333af1bc1447ac
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/helpex.cxx2
-rw-r--r--l10ntools/source/lngmerge.cxx4
-rw-r--r--l10ntools/source/merge.cxx4
-rw-r--r--l10ntools/source/po.cxx2
-rw-r--r--l10ntools/source/propmerge.cxx2
-rw-r--r--l10ntools/source/treemerge.cxx8
6 files changed, 11 insertions, 11 deletions
diff --git a/l10ntools/source/helpex.cxx b/l10ntools/source/helpex.cxx
index 5c6156f95c86..5d0c387774f3 100644
--- a/l10ntools/source/helpex.cxx
+++ b/l10ntools/source/helpex.cxx
@@ -92,7 +92,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
HelpParser aParser( sXhpFile );
const OString sOutput(
aArgs.m_sOutputFile +
- sXhpFile.copy( sXhpFile.lastIndexOf("/") ));
+ sXhpFile.copy( sXhpFile.lastIndexOf('/') ));
if( !aParser.Merge( aArgs.m_sMergeSrc, sOutput,
aArgs.m_sLanguage, pMergeDataFile ))
{
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 27c7d5d9dcb8..bed6c93c4dd6 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -248,7 +248,7 @@ sal_Bool LngParser::Merge(
OString sNewText;
pEntrys->GetText( sNewText, STRING_TYP_TEXT, sLang, sal_True );
if( sLang == "qtz" )
- sNewText = sNewText.copy(sNewText.indexOf("|") + 2);
+ sNewText = sNewText.copy(sNewText.indexOf('|') + 2);
if ( !sNewText.isEmpty()) {
OString *pLine = (*pLines)[ nPos ];
@@ -286,7 +286,7 @@ sal_Bool LngParser::Merge(
OString sNewText;
pEntrys->GetText( sNewText, STRING_TYP_TEXT, sCur, sal_True );
if( sCur == "qtz" )
- sNewText = sNewText.copy(sNewText.indexOf("|") + 2);
+ sNewText = sNewText.copy(sNewText.indexOf('|') + 2);
if ( !sNewText.isEmpty() && sCur != "x-comment")
{
OString sLine;
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index fab9e6ed5246..63b212cbbd8f 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -181,7 +181,7 @@ sal_Bool MergeEntrys::GetText( OString &rReturn,
OString MergeEntrys::GetQTZText(const ResData& rResData, const OString& rOrigText)
{
- const OString sFilename = rResData.sFilename.copy(rResData.sFilename.lastIndexOf("/")+1);
+ const OString sFilename = rResData.sFilename.copy(rResData.sFilename.lastIndexOf('/')+1);
const OString sKey =
PoEntry::genKeyId(sFilename + rResData.sGId + rResData.sId + rResData.sResTyp + rOrigText);
return sKey + "||" + rOrigText;
@@ -310,7 +310,7 @@ MergeDataFile::MergeDataFile(
const sal_Int32 nStart =
sPoFileName.indexOf(sTransSource)+sTransSource.getLength();
const sal_Int32 nCount =
- sPoFileName.indexOf("/",nStart) - nStart;
+ sPoFileName.indexOf('/',nStart) - nStart;
sLang = sPoFileName.copy(nStart,nCount);
}
aLanguageSet.insert( sLang );
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 7b4a94c0e8b3..c7f92d82a3de 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -245,7 +245,7 @@ PoEntry::PoEntry(
throw WRONGHELPTEXT;
m_pGenPo = new GenPoEntry();
- m_pGenPo->setReference(rSourceFile.copy(rSourceFile.lastIndexOf("/")+1));
+ m_pGenPo->setReference(rSourceFile.copy(rSourceFile.lastIndexOf('/')+1));
OString sMsgCtxt =
rGroupId + "\n" +
diff --git a/l10ntools/source/propmerge.cxx b/l10ntools/source/propmerge.cxx
index ee715f75570c..72070fbaaa19 100644
--- a/l10ntools/source/propmerge.cxx
+++ b/l10ntools/source/propmerge.cxx
@@ -191,7 +191,7 @@ void PropParser::Merge( const OString &rMergeSrc, const OString &rDestinationFil
if( !sLine.startsWith(" *") && !sLine.startsWith("/*") &&
nEqualSign != -1 )
{
- const OString sID( sLine.copy( 0, sLine.indexOf("=") ).trim() );
+ const OString sID( sLine.copy( 0, sLine.indexOf('=') ).trim() );
ResData aResData( sID, m_sSource );
aResData.sResTyp = "property";
OString sNewText;
diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx
index 6f4bf6aa5916..06e93d72af8c 100644
--- a/l10ntools/source/treemerge.cxx
+++ b/l10ntools/source/treemerge.cxx
@@ -68,13 +68,13 @@ namespace
helper::xmlStrToOString( pID );
xmlFree( pID );
- const sal_Int32 nFirstSlash = sID.indexOf("/");
+ const sal_Int32 nFirstSlash = sID.indexOf('/');
// Update id attribute of topic
{
OString sNewID =
sID.copy( 0, nFirstSlash + 1 ) +
- rXhpRoot.copy( rXhpRoot.lastIndexOf("/") + 1 ) +
- sID.copy( sID.indexOf( "/", nFirstSlash + 1 ) );
+ rXhpRoot.copy( rXhpRoot.lastIndexOf('/') + 1 ) +
+ sID.copy( sID.indexOf( '/', nFirstSlash + 1 ) );
xmlSetProp(
pReturn, (const xmlChar*)("id"),
reinterpret_cast<const xmlChar*>(sNewID.getStr()));
@@ -82,7 +82,7 @@ namespace
const OString sXhpPath =
rXhpRoot +
- sID.copy(sID.indexOf("/", nFirstSlash + 1));
+ sID.copy(sID.indexOf('/', nFirstSlash + 1));
xmlDocPtr pXhpFile = xmlParseFile( sXhpPath.getStr() );
// if xhpfile is missing than put this topic into comment
if ( !pXhpFile )