summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/fonthdl.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx
index 31abfa3c9a62..3d581977305c 100644
--- a/xmloff/source/style/fonthdl.cxx
+++ b/xmloff/source/style/fonthdl.cxx
@@ -94,7 +94,7 @@ sal_Bool XMLFontFamilyNamePropHdl::importXML( const OUString& rStrImpValue, uno:
nLast--;
// skip leading blanks
- while( sal_Unicode(' ') == rStrImpValue[nFirst] && nFirst <= nLast )
+ while(nFirst <= nLast && sal_Unicode(' ') == rStrImpValue[nFirst])
nFirst++;
// remove quotes
@@ -158,11 +158,11 @@ sal_Bool XMLFontFamilyNamePropHdl::exportXML( OUString& rStrExpValue, const uno:
nLast--;
// skip trailing blanks
- while( sal_Unicode(' ') == aStrFamilyName[nLast] && nLast > nFirst )
+ while( nLast > nFirst && sal_Unicode(' ') == aStrFamilyName[nLast] )
nLast--;
// skip leading blanks
- while( sal_Unicode(' ') == aStrFamilyName[nFirst] && nFirst <= nLast )
+ while( nFirst <= nLast && sal_Unicode(' ') == aStrFamilyName[nFirst] )
nFirst++;
if( nFirst <= nLast )