summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-05-20 15:25:00 +0200
committerJulien Nabet <serval2412@yahoo.fr>2012-05-20 15:25:37 +0200
commitc53812a1b7c45b1b5a4a341b178c40602c7dcbf7 (patch)
treec9d6a029aa5f4e6081be0aadb2ee2a11e68aa285 /xmloff
parentb8c046acfc235cbfb09d598b502a66922045cabc (diff)
Some cppcheck cleaning
Change-Id: Ic30cdeffabec1eb1a6c153ac450a3d28064ef534
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 )