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 /starmath | |
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 'starmath')
-rw-r--r-- | starmath/source/mathmlexport.cxx | 10 | ||||
-rw-r--r-- | starmath/source/mathmlimport.cxx | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index ae6e30608af0..93c75f843f59 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -64,11 +64,11 @@ #include <svl/itemprop.hxx> #include <unotools/processfactory.hxx> #include <unotools/streamwrap.hxx> +#include <sax/tools/converter.hxx> #include <xmloff/xmlnmspe.hxx> #include <xmloff/xmltoken.hxx> #include <xmloff/nmspmap.hxx> #include <xmloff/attrlist.hxx> -#include <xmloff/xmluconv.hxx> #include <xmloff/xmlmetai.hxx> #include <osl/mutex.hxx> #include <comphelper/genericpropertyset.hxx> @@ -1242,17 +1242,17 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel) switch(pFontNode->GetSizeType()) { case FNTSIZ_MULTIPLY: - SvXMLUnitConverter::convertDouble(sStrBuf, + ::sax::Converter::convertDouble(sStrBuf, static_cast<double>(aFrac*Fraction(100.00))); sStrBuf.append(static_cast<sal_Unicode>('%')); break; case FNTSIZ_DIVIDE: - SvXMLUnitConverter::convertDouble(sStrBuf, + ::sax::Converter::convertDouble(sStrBuf, static_cast<double>(Fraction(100.00)/aFrac)); sStrBuf.append(static_cast<sal_Unicode>('%')); break; case FNTSIZ_ABSOLUT: - SvXMLUnitConverter::convertDouble(sStrBuf, + ::sax::Converter::convertDouble(sStrBuf, static_cast<double>(aFrac)); sStrBuf.append( GetXMLToken(XML_UNIT_PT)); @@ -1276,7 +1276,7 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel) double mytest = static_cast<double>(aTemp); mytest = ::rtl::math::round(mytest,1); - SvXMLUnitConverter::convertDouble(sStrBuf,mytest); + ::sax::Converter::convertDouble(sStrBuf,mytest); sStrBuf.append(GetXMLToken(XML_UNIT_PT)); } break; diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index 568ebb605f91..eb0b0e34e248 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -60,6 +60,7 @@ one go*/ #include <svl/itemprop.hxx> #include <unotools/processfactory.hxx> #include <unotools/streamwrap.hxx> +#include <sax/tools/converter.hxx> #include <xmloff/xmlnmspe.hxx> #include <xmloff/xmltoken.hxx> #include <xmloff/nmspmap.hxx> @@ -695,7 +696,7 @@ void SmXMLContext_Helper::RetrieveAttrs(const uno::Reference< nIsItalic = sValue.equals(GetXMLToken(XML_ITALIC)); break; case XML_TOK_FONTSIZE: - SvXMLUnitConverter::convertDouble(nFontSize,sValue); + ::sax::Converter::convertDouble(nFontSize, sValue); rContext.GetSmImport().GetMM100UnitConverter(). setXMLMeasureUnit(MAP_POINT); if (-1 == sValue.indexOf(GetXMLToken(XML_UNIT_PT))) |