summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--l10ntools/source/xrmmerge.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 4670dc7c3ab2..b6f7d388c31f 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -269,13 +269,10 @@ OString XRMResParser::GetAttribute( const OString &rToken, const OString &rAttri
sSearch += "=";
sal_Int32 nPos = sTmp.indexOf( sSearch );
- if ( nPos != -1 )
- {
- sTmp = sTmp.copy( nPos );
- OString sId = sTmp.getToken(1, '"');
- return sId;
- }
- return OString();
+ if ( nPos<0 )
+ return OString();
+
+ return sTmp.getToken(1, '"', nPos);
}