diff options
author | Michael Stahl <mst@openoffice.org> | 2011-10-11 14:19:00 +0200 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2011-10-11 17:57:00 +0200 |
commit | 3ca2bef76886450058d1667703aeafe4c2e456c3 (patch) | |
tree | b18d70f79bfcfd2b2e34790e86edafb4c4337a80 /xmloff/source/style/escphdl.cxx | |
parent | 02c32e0f0e75a9df80888051d1ec189fa14129bd (diff) |
#i108468#: clean up xmluconv code duplication, part 1:
move convertNumber64 from SvXMLUnitConverter to sax::converter.
remove duplicate methods from SvXMLUnitConverter:
convertBool, convertPercent, convertColor, convertNumber, convertDouble,
indexOfComma, encodeBase64, decodeBase64, decodeBase64SomeChars,
clearUndefinedChars
Diffstat (limited to 'xmloff/source/style/escphdl.cxx')
-rw-r--r-- | xmloff/source/style/escphdl.cxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/xmloff/source/style/escphdl.cxx b/xmloff/source/style/escphdl.cxx index f0bbd43f793b..0743d8e268e3 100644 --- a/xmloff/source/style/escphdl.cxx +++ b/xmloff/source/style/escphdl.cxx @@ -29,8 +29,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" - #include <escphdl.hxx> + +#include <sax/tools/converter.hxx> #include <xmloff/xmltoken.hxx> #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> @@ -78,7 +79,7 @@ sal_Bool XMLEscapementPropHdl::importXML( const OUString& rStrImpValue, uno::Any else { sal_Int32 nNewEsc; - if( !SvXMLUnitConverter::convertPercent( nNewEsc, aToken ) ) + if (!::sax::Converter::convertPercent( nNewEsc, aToken )) return sal_False; nVal = (sal_Int16) nNewEsc; @@ -105,7 +106,7 @@ sal_Bool XMLEscapementPropHdl::exportXML( OUString& rStrExpValue, const uno::Any } else { - SvXMLUnitConverter::convertPercent( aOut, nValue ); + ::sax::Converter::convertPercent( aOut, nValue ); } } @@ -138,15 +139,18 @@ sal_Bool XMLEscapementHeightPropHdl::importXML( const OUString& rStrImpValue, un if( aTokens.getNextToken( aToken ) ) { sal_Int32 nNewProp; - if( !SvXMLUnitConverter::convertPercent( nNewProp, aToken ) ) + if (!::sax::Converter::convertPercent( nNewProp, aToken )) return sal_False; nProp = (sal_Int8)nNewProp; } else { sal_Int32 nEscapementPosition=0; - if( SvXMLUnitConverter::convertPercent( nEscapementPosition, aToken ) && nEscapementPosition==0 ) + if (::sax::Converter::convertPercent( nEscapementPosition, aToken ) + && (nEscapementPosition == 0)) + { nProp = 100; //if escapement position is zero and no escapement height is given the default height should be 100percent and not something smaller (#i91800#) + } else nProp = (sal_Int8) DFLT_ESC_PROP; } @@ -165,7 +169,7 @@ sal_Bool XMLEscapementHeightPropHdl::exportXML( OUString& rStrExpValue, const un if( rStrExpValue.getLength() ) aOut.append( sal_Unicode(' ')); - SvXMLUnitConverter::convertPercent( aOut, nValue ); + ::sax::Converter::convertPercent( aOut, nValue ); } rStrExpValue = aOut.makeStringAndClear(); |