filter/source/svg/svgexport.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
New commits: commit 1b2333d1be686716b2ee2b36e8340767aad57f36 Author: Tomaž Vajngerl <qui...@gmail.com> Date: Thu Feb 13 20:17:58 2014 +0100 fdo#74218 add SVG header when exporting via mtf Change-Id: Ia200fbf73c1464160ceddc705f72d77b5f1eff51 diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index d867370..07bebca 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" ); @@ -2302,6 +2304,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 );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits