diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-03-01 16:42:27 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-03-01 21:46:01 +0100 |
commit | a661f9a2e0a05de1705a8e9d930c148a1416be29 (patch) | |
tree | 617569dc2ac5875284b4c9ace15221fd334dcc7f /svgio/qa/cppunit | |
parent | 948cd8b9f62e28883b691084a9bb83177422defd (diff) |
tdf#159968: Support overflow:visible in marker element
Change-Id: I4ea648cf94a4bb321a78843a9898769a69c5630d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164224
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svgio/qa/cppunit')
-rw-r--r-- | svgio/qa/cppunit/SvgImportTest.cxx | 17 | ||||
-rw-r--r-- | svgio/qa/cppunit/data/tdf159968.svg | 37 |
2 files changed, 54 insertions, 0 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index 99541f0b63b7..708ab7dcc970 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -2013,6 +2013,23 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156271) assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "dx1"_ostr, "23"); } +CPPUNIT_TEST_FIXTURE(Test, testTdf159968) +{ + Primitive2DSequence aSequence = parseSvg(u"/svgio/qa/cppunit/data/tdf159968.svg"); + CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength())); + + drawinglayer::Primitive2dXmlDump dumper; + xmlDocUniquePtr pDocument = dumper.dumpAndParse(Primitive2DContainer(aSequence)); + + CPPUNIT_ASSERT (pDocument); + + // Check no mask is applied to the marker + assertXPath(pDocument, + "/primitive2D/transform/transform/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#000000"); + assertXPath(pDocument, + "/primitive2D/transform/transform/transform/transform/polypolygoncolor/polypolygon/polygon/point"_ostr, 5); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf149880) { Primitive2DSequence aSequence = parseSvg(u"/svgio/qa/cppunit/data/tdf149880.svg"); diff --git a/svgio/qa/cppunit/data/tdf159968.svg b/svgio/qa/cppunit/data/tdf159968.svg new file mode 100644 index 000000000000..8c13f0864901 --- /dev/null +++ b/svgio/qa/cppunit/data/tdf159968.svg @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> + +<svg + width="100mm" + height="100mm" + viewBox="0 0 100 100" + version="1.1" + id="svg1" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs1"> + <marker + style="overflow:visible" + id="ArrowTriangleStylized" + refX="0" + refY="0" + orient="auto-start-reverse" + markerWidth="1" + markerHeight="1" + viewBox="0 0 1 1" + preserveAspectRatio="xMidYMid"> + <path + transform="scale(0.5)" + style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt" + d="m 6,0 c -3,1 -7,3 -9,5 0,0 0,-4 2,-5 -2,-1 -2,-5 -2,-5 2,2 6,4 9,5 z" + id="path4" /> + </marker> + </defs> + <g + id="layer1"> + <path + style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#ArrowTriangleStylized)" + d="M 9.7161802,91.253315 84.819628,15.230769" + id="path1"/> + </g> +</svg> |