diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2014-02-13 20:17:58 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2014-02-13 20:24:19 +0100 |
commit | 1b2333d1be686716b2ee2b36e8340767aad57f36 (patch) | |
tree | a85433c77009e9655e59a6fd9d77e266beef5356 /filter | |
parent | 5e5ec33eb4a4e10afd9c7ee7c269c2c18144d033 (diff) |
fdo#74218 add SVG header when exporting via mtf
Change-Id: Ia200fbf73c1464160ceddc705f72d77b5f1eff51
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/svg/svgexport.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index d86737036c0b..07bebcabc1a3 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 ); |