summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/export.cxx2
-rw-r--r--l10ntools/source/lngmerge.cxx10
2 files changed, 4 insertions, 8 deletions
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index f68cf29f1fe5..8b44727e26ae 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -933,7 +933,7 @@ sal_Bool Export::WriteExportList(ResData *pResData, ExportList *pExportList,
else {
sGID += ".";
sGID += pResData->sId;
- while (!sGID.isEmpty() && sGID[sGID.getLength() - 1] == '.') {
+ while (sGID.endsWith(".")) {
sGID = sGID.copy(0, sGID.getLength() - 1);
}
}
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;