From 7d122d0cef4ecdeea0d11e619ec77aa7431344d9 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Thu, 11 Oct 2012 00:18:47 +0200 Subject: Cleanup svg export namespace handling All smil animations are inside the http://www.w3.org/2000/svg NS for svg - ODF places e.g. animateMotion into smil, their path attr though into svg. Flattened namespace now into only default (svg) and the ooo prefix. Killed all superfluous NS decls, creating SvXMLExport with EXPORT_META only adds XML_NP_XLINK, XML_NP_DC, XML_NP_META, and XML_NP_GRDDL to the known-namespaces map. Change-Id: Ib54900aaee0eda3a5c5dc618d836df8bd8eb25fc --- filter/source/svg/svgexport.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'filter') diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index d8f3a848793d..a0ff05b6d120 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -330,12 +330,13 @@ SVGExport::SVGExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, const Reference< XDocumentHandler >& rxHandler, const Sequence< PropertyValue >& rFilterData ) - : SvXMLExport( util::MeasureUnit::MM_100TH, xServiceFactory ) + : SvXMLExport( util::MeasureUnit::MM_100TH, + xServiceFactory, + xmloff::token::XML_TOKEN_INVALID, + EXPORT_META|EXPORT_PRETTY ) , mrFilterData( rFilterData ) { SetDocHandler( rxHandler ); - sal_uInt16 nExportFlags = getExportFlags() | EXPORT_PRETTY; - setExportFlags( nExportFlags ); GetDocHandler()->startDocument(); } @@ -834,15 +835,9 @@ sal_Bool SVGFilter::implExportDocument() // standard line width is based on 1 pixel on a 90 DPI device (0.28222mmm) mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "stroke-width", OUString::valueOf( 28.222 ) ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "stroke-linejoin", B2UCONST( "round" ) ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:ooo", B2UCONST( "http://xml.openoffice.org/svg/export" ) ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns", B2UCONST( "http://www.w3.org/2000/svg" ) ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:ooo", B2UCONST( "http://xml.openoffice.org/svg/export" ) ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:xlink", B2UCONST( "http://www.w3.org/1999/xlink" ) ); - - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:draw", B2UCONST( "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" ) ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:presentation", B2UCONST( "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" ) ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:smil", B2UCONST( "urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" ) ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:anim", B2UCONST( "urn:oasis:names:tc:opendocument:xmlns:animation:1.0" ) ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xml:space", B2UCONST( "preserve" ) ); mpSVGDoc = new SvXMLElementExport( *mpSVGExport, XML_NAMESPACE_NONE, "svg", sal_True, sal_True ); -- cgit