summaryrefslogtreecommitdiffstats
path: root/l10ntools/source/lngmerge.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-21 10:21:01 +0200
committerNoel Grandin <noel@peralex.com>2013-10-23 08:29:15 +0200
commit7a06928bcf638e1eeedebc9d53c306a1b852cc9b (patch)
treec0402c2da4e2c522ecf32a0b413128f727cbc0fa /l10ntools/source/lngmerge.cxx
parentmacosx: add a LSMinimumSystemVersion in Info.plist (diff)
downloadcore-7a06928bcf638e1eeedebc9d53c306a1b852cc9b.tar.gz
core-7a06928bcf638e1eeedebc9d53c306a1b852cc9b.zip
convert code to use OUString::endsWith
Convert places that call aStr[aStr.getLength()-1] == 'x' to use the shorter form aStr.endsWith("x") Change-Id: I1b3a19c0e89b8989cdbeed440f95fc76f9a4b6b6
Diffstat (limited to 'l10ntools/source/lngmerge.cxx')
-rw-r--r--l10ntools/source/lngmerge.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index bed6c93c4dd6..4913bc46d700 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -138,7 +138,7 @@ void LngParser::WritePO(PoOfstream &aPOStream,
bool LngParser::isNextGroup(OString &sGroup_out, const OString &sLine_in)
{
const OString sLineTrim = sLine_in.trim();
- if ((sLineTrim[0] == '[') && (sLineTrim[sLineTrim.getLength() - 1] == ']'))
+ if (sLineTrim.startsWith("[") && sLineTrim.endsWith("]"))
{
sGroup_out = getBracketedContent(sLineTrim).trim();
return true;
@@ -184,9 +184,7 @@ sal_Bool LngParser::Merge(
{
OString sLine( *(*pLines)[ nPos ] );
sLine = sLine.trim();
- if (!sLine.isEmpty() &&
- ( sLine[0] == '[' ) &&
- ( sLine[sLine.getLength() - 1] == ']' ))
+ if ( sLine.startsWith("[") && sLine.endsWith("]") )
{
sGroup = getBracketedContent(sLine).trim();
bGroup = sal_True;
@@ -211,9 +209,7 @@ sal_Bool LngParser::Merge(
{
OString sLine( *(*pLines)[ nPos ] );
sLine = sLine.trim();
- if (!sLine.isEmpty() &&
- ( sLine[0] == '[' ) &&
- ( sLine[sLine.getLength() - 1] == ']' ))
+ if ( sLine.startsWith("[") && sLine.endsWith("]") )
{
sGroup = getBracketedContent(sLine).trim();
bGroup = sal_True;