[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - filter/source
Tomaž Vajngerl
quikee at gmail.com
Mon Feb 17 11:04:01 CET 2014
filter/source/svg/svgexport.cxx | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
New commits:
commit 9cc2ab21d3e18d6ab331e06fd96309bad047615c
Author: Tomaž Vajngerl <quikee at gmail.com>
Date: Thu Feb 13 20:17:58 2014 +0100
fdo#74218 add SVG header when exporting via mtf
Change-Id: Ia200fbf73c1464160ceddc705f72d77b5f1eff51
Reviewed-on: https://gerrit.libreoffice.org/8033
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 6065416..065310f 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -87,6 +87,8 @@ static const char aOOOAttrDateTimeFormat[] = NSPREFIX "date-time-format";
// ooo xml attributes for Placeholder Shapes
static const char aOOOAttrTextAdjust[] = NSPREFIX "text-adjust";
+static const char constSvgNamespace[] = "http://www.w3.org/2000/svg";
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -734,7 +736,7 @@ 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::number( 28.222 ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "stroke-linejoin", "round" );
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns", "http://www.w3.org/2000/svg" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns", OUString::createFromAscii(constSvgNamespace) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:ooo", "http://xml.openoffice.org/svg/export" );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:xlink", "http://www.w3.org/1999/xlink" );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xml:space", "preserve" );
@@ -2305,6 +2307,16 @@ void SVGExport::writeMtf( const GDIMetaFile& rMtf )
aAttr += OUString::number( aSize.Height() * 100L );
AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr );
+ AddAttribute( XML_NAMESPACE_NONE, "version", "1.1" );
+
+ if( IsUseTinyProfile() )
+ AddAttribute( XML_NAMESPACE_NONE, "baseProfile", "tiny" );
+
+ AddAttribute( XML_NAMESPACE_NONE, "xmlns", OUString::createFromAscii(constSvgNamespace) );
+ AddAttribute( XML_NAMESPACE_NONE, "stroke-width", OUString::number( 28.222 ) );
+ AddAttribute( XML_NAMESPACE_NONE, "stroke-linejoin", "round" );
+ AddAttribute( XML_NAMESPACE_NONE, "xml:space", "preserve" );
+
{
SvXMLElementExport aSVG( *this, XML_NAMESPACE_NONE, "svg", sal_True, sal_True );
More information about the Libreoffice-commits
mailing list