summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2011-10-11 14:19:00 +0200
committerMichael Stahl <mst@openoffice.org>2011-10-11 17:57:00 +0200
commit3ca2bef76886450058d1667703aeafe4c2e456c3 (patch)
treeb18d70f79bfcfd2b2e34790e86edafb4c4337a80 /svx
parent02c32e0f0e75a9df80888051d1ec189fa14129bd (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 'svx')
-rw-r--r--svx/Library_svxcore.mk1
-rw-r--r--svx/source/xml/xmlxtexp.cxx5
-rw-r--r--svx/source/xml/xmlxtimp.cxx9
3 files changed, 9 insertions, 6 deletions
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 27f8907be484..0867c1e46049 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_Library_add_linked_libs,svxcore,\
i18nisolang1 \
lng \
sal \
+ sax \
sfx \
sot \
svl \
diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx
index 2074d4fe9d46..adaae1c8edd5 100644
--- a/svx/source/xml/xmlxtexp.cxx
+++ b/svx/source/xml/xmlxtexp.cxx
@@ -39,9 +39,10 @@
#include <com/sun/star/drawing/Hatch.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
+
+#include <sax/tools/converter.hxx>
#include <sfx2/docfile.hxx>
#include <rtl/ustrbuf.hxx>
-#include <xmloff/xmluconv.hxx>
#include "xmloff/xmlnmspe.hxx"
#include "xmloff/nmspmap.hxx"
@@ -474,7 +475,7 @@ void SvxXMLColorEntryExporter::exportEntry( const OUString& rStrName, const Any&
rValue >>= nColor;
OUStringBuffer aOut;
- mrExport.GetMM100UnitConverter().convertColor( aOut, nColor );
+ ::sax::Converter::convertColor( aOut, nColor );
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_COLOR, aOut.makeStringAndClear() );
SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW, XML_COLOR, sal_True, sal_True );
diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx
index fd6b8ee6c5b0..ca3df709b7cd 100644
--- a/svx/source/xml/xmlxtimp.cxx
+++ b/svx/source/xml/xmlxtimp.cxx
@@ -48,8 +48,8 @@
#include <comphelper/storagehelper.hxx>
#include <unotools/streamwrap.hxx>
#include <rtl/ustrbuf.hxx>
+#include <sax/tools/converter.hxx>
#include <sfx2/docfile.hxx>
-#include <xmloff/xmluconv.hxx>
#include "xmloff/xmlnmspe.hxx"
#include "xmloff/nmspmap.hxx"
@@ -247,9 +247,10 @@ void SvxXMLTableImportContext::importColor( sal_uInt16 nPrfx, const OUString& rL
}
else if( aLocalName == GetXMLToken(XML_COLOR) )
{
- Color aColor;
- SvXMLUnitConverter::convertColor(aColor, xAttrList->getValueByIndex( i ));
- rAny <<= (sal_Int32)aColor.GetColor();
+ sal_Int32 nColor(0);
+ ::sax::Converter::convertColor(nColor,
+ xAttrList->getValueByIndex( i ));
+ rAny <<= nColor;
}
}
}