summaryrefslogtreecommitdiff
path: root/oox/source/helper/textinputstream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/helper/textinputstream.cxx')
-rw-r--r--oox/source/helper/textinputstream.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/oox/source/helper/textinputstream.cxx b/oox/source/helper/textinputstream.cxx
index e98ed861ed83..f374cc920f81 100644
--- a/oox/source/helper/textinputstream.cxx
+++ b/oox/source/helper/textinputstream.cxx
@@ -181,7 +181,7 @@ OUString TextInputStream::readToChar( sal_Unicode cChar, bool bIncludeChar )
a character that has been buffered in the previous call. */
OUString aString = createFinalString( mxTextStrm->readString( aDelimiters, sal_False ) );
// remove last character from string and remember it for next call
- if( !bIncludeChar && (aString.getLength() > 0) && (aString[ aString.getLength() - 1 ] == cChar) )
+ if( !bIncludeChar && !aString.isEmpty() && (aString[ aString.getLength() - 1 ] == cChar) )
{
mcPendingChar = cChar;
aString = aString.copy( 0, aString.getLength() - 1 );