Kaydet (Commit) 1b2333d1 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

fdo#74218 add SVG header when exporting via mtf

Change-Id: Ia200fbf73c1464160ceddc705f72d77b5f1eff51
üst 5e5ec33e
...@@ -87,6 +87,8 @@ static const char aOOOAttrDateTimeFormat[] = NSPREFIX "date-time-format"; ...@@ -87,6 +87,8 @@ static const char aOOOAttrDateTimeFormat[] = NSPREFIX "date-time-format";
// ooo xml attributes for Placeholder Shapes // ooo xml attributes for Placeholder Shapes
static const char aOOOAttrTextAdjust[] = NSPREFIX "text-adjust"; 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() ...@@ -734,7 +736,7 @@ sal_Bool SVGFilter::implExportDocument()
// standard line width is based on 1 pixel on a 90 DPI device (0.28222mmm) // 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-width", OUString::number( 28.222 ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "stroke-linejoin", "round" ); 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: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, "xmlns:xlink", "http://www.w3.org/1999/xlink" );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xml:space", "preserve" ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xml:space", "preserve" );
...@@ -2302,6 +2304,16 @@ void SVGExport::writeMtf( const GDIMetaFile& rMtf ) ...@@ -2302,6 +2304,16 @@ void SVGExport::writeMtf( const GDIMetaFile& rMtf )
aAttr += OUString::number( aSize.Height() * 100L ); aAttr += OUString::number( aSize.Height() * 100L );
AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr ); 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 ); SvXMLElementExport aSVG( *this, XML_NAMESPACE_NONE, "svg", sal_True, sal_True );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment