[Libreoffice-commits] .: filter/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 10 15:29:35 PDT 2012
filter/source/svg/svgexport.cxx | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
New commits:
commit 7d122d0cef4ecdeea0d11e619ec77aa7431344d9
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Thu Oct 11 00:18:47 2012 +0200
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
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index d8f3a84..a0ff05b 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 );
More information about the Libreoffice-commits
mailing list