summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2015-04-04 20:55:29 +0200
committerAndras Timar <andras.timar@collabora.com>2015-04-16 23:06:59 +0200
commitf5e66bd5702b626bf170b46bbaa3c0eacb45de9c (patch)
treeb3155c9a9558e4c7f7ae194d9ceea728b5bbda5d
parenta0fcdf552b1f750bd501b9ba929d8f8fa8c5c8bb (diff)
tdf#56467 / tdf#88117: SVG export further improved
omitting the clip-path from the <svg> element and keeping it only in the slides enables rendering of exported selection in viewers like firefox and inkscape Change-Id: If296a78a3f948728e8b2ec257849be129bec5d92 Reviewed-on: https://gerrit.libreoffice.org/15155 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/15312 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
-rw-r--r--filter/source/svg/svgexport.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 7d0914a87665..a73ce92b91bb 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -799,13 +799,9 @@ bool SVGFilter::implExportDocument()
aAttr += OUString::number(nDocWidth) + " " + OUString::number(nDocHeight);
- msClipPathId = "presentation_clip_path";
- OUString sClipPathAttrValue = "url(#" + msClipPathId + ")";
-
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "preserveAspectRatio", "xMidYMid" );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "fill-rule", "evenodd" );
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "clip-path", sClipPathAttrValue );
// 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 ) );
@@ -822,6 +818,7 @@ bool SVGFilter::implExportDocument()
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", "ClipPathGroup" );
SvXMLElementExport aDefsElem( *mpSVGExport, XML_NAMESPACE_NONE, "defs", true, true );
{
+ msClipPathId = "presentation_clip_path";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", msClipPathId );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "clipPathUnits", "userSpaceOnUse" );
SvXMLElementExport aClipPathElem( *mpSVGExport, XML_NAMESPACE_NONE, "clipPath", true, true );