From c53812a1b7c45b1b5a4a341b178c40602c7dcbf7 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 20 May 2012 15:25:00 +0200 Subject: Some cppcheck cleaning Change-Id: Ic30cdeffabec1eb1a6c153ac450a3d28064ef534 --- xmloff/source/style/fonthdl.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xmloff/source/style/fonthdl.cxx') 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 ) -- cgit