summaryrefslogtreecommitdiff
path: root/xmloff/source/meta
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2011-10-11 14:19:09 +0200
committerMichael Stahl <mst@openoffice.org>2011-10-11 17:57:01 +0200
commit8666469d7b0f450ec1448f80eda3c591f8d8d318 (patch)
treeae63c5f07df7d3c2d45ea03e47f147661f280923 /xmloff/source/meta
parentae3e2f170045a1525f67e9f3e9b7e03d94f2b56b (diff)
#i108468#: clean up xmluconv code duplication, measured approach:
modify sax::Converter::convertMeasure to use sal_Int64 instead of BigInt: should be sufficient, since the largest number is SAL_INT32_MAX * 10^7. remove duplicate methods from SvXMLUnitConverter: convertMeasurePx, convertMeasure (static variants) remove entirely duplicative class SvXMLExportHelper: GetConversionFactor, GetUnitFromString, AddLength change SvXMLUnitConverter interface from MapUnit to css::util::MeasureUnit. change SvXMLExport constructor params from MapUnit to css::util::MeasureUnit. rename some methods to turn compiler into merge conflict detector :)
Diffstat (limited to 'xmloff/source/meta')
-rw-r--r--xmloff/source/meta/MetaExportComponent.cxx3
-rw-r--r--xmloff/source/meta/xmlversion.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx
index fac1984e3e39..17dfe97d7093 100644
--- a/xmloff/source/meta/MetaExportComponent.cxx
+++ b/xmloff/source/meta/MetaExportComponent.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Exception.hpp>
+#include <com/sun/star/util/MeasureUnit.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <comphelper/genericpropertyset.hxx>
#include <rtl/ustrbuf.hxx>
@@ -54,7 +55,7 @@ using namespace ::xmloff::token;
XMLMetaExportComponent::XMLMetaExportComponent(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
sal_uInt16 nFlags )
-: SvXMLExport( xServiceFactory, MAP_INCH, XML_TEXT, nFlags )
+: SvXMLExport( util::MeasureUnit::CM, xServiceFactory, XML_TEXT, nFlags )
{
}
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index c80f5f7a5e66..403bd621f234 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -39,6 +39,7 @@
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/util/MeasureUnit.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
#include <com/sun/star/xml/sax/XParser.hpp>
@@ -61,7 +62,7 @@ XMLVersionListExport::XMLVersionListExport(
const com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& rVersions,
const OUString &rFileName,
Reference< XDocumentHandler > &rHandler )
-: SvXMLExport( xServiceFactory, rFileName, rHandler ),
+: SvXMLExport( xServiceFactory, rFileName, util::MeasureUnit::CM, rHandler ),
maVersions( rVersions )
{
_GetNamespaceMap().AddAtIndex( XML_NAMESPACE_DC_IDX, xmloff::token::GetXMLToken(xmloff::token::XML_NP_DC),