diff options
Diffstat (limited to 'xmloff/source/style/chrhghdl.cxx')
-rw-r--r-- | xmloff/source/style/chrhghdl.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xmloff/source/style/chrhghdl.cxx b/xmloff/source/style/chrhghdl.cxx index d805d9a1274b..7581029c3bb2 100644 --- a/xmloff/source/style/chrhghdl.cxx +++ b/xmloff/source/style/chrhghdl.cxx @@ -58,10 +58,9 @@ XMLCharHeightHdl::~XMLCharHeightHdl() sal_Bool XMLCharHeightHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& ) const { - double fSize; - if( rStrImpValue.indexOf( sal_Unicode('%') ) == -1 ) { + double fSize; MapUnit eSrcUnit = SvXMLExportHelper::GetUnitFromString( rStrImpValue, MAP_POINT ); if( SvXMLUnitConverter::convertDouble( fSize, rStrImpValue, eSrcUnit, MAP_POINT )) { @@ -101,10 +100,9 @@ XMLCharHeightPropHdl::~XMLCharHeightPropHdl() sal_Bool XMLCharHeightPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& ) const { - sal_Int32 nPrc = 100; - if( rStrImpValue.indexOf( sal_Unicode('%') ) != -1 ) { + sal_Int32 nPrc = 100; if( SvXMLUnitConverter::convertPercent( nPrc, rStrImpValue ) ) { rValue <<= (sal_Int16)nPrc; |