diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-07-10 14:10:01 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-07-10 16:53:58 +0200 |
commit | 3d5b5914ef56395a8ba3d4c0a2eff8a5c52046b4 (patch) | |
tree | fd4b8f4ea6b6aaa17b04102ffa2bcd75a32990e2 /svgio/qa/cppunit | |
parent | 7019eef453954785ad039bebd8c8a00183992584 (diff) |
tdf#156201: just check one level up in the style stack
Otherwise, the parent might also have a local css style
Change-Id: Ib6d1340045f22861aee3e526d22d014eeb2f5d38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154248
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svgio/qa/cppunit')
-rw-r--r-- | svgio/qa/cppunit/SvgImportTest.cxx | 13 | ||||
-rw-r--r-- | svgio/qa/cppunit/data/tdf156201.svg | 36 |
2 files changed, 49 insertions, 0 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index 24f146592249..fc9557a5c312 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -505,6 +505,19 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156018) assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]", "color", "#0000ff"); } +CPPUNIT_TEST_FIXTURE(Test, testTdf156201) +{ + Primitive2DSequence aSequence = parseSvg(u"/svgio/qa/cppunit/data/tdf156201.svg"); + CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength())); + + drawinglayer::Primitive2dXmlDump dumper; + xmlDocUniquePtr pDocument = dumper.dumpAndParse(aSequence); + + CPPUNIT_ASSERT (pDocument); + + assertXPath(pDocument, "/primitive2D/transform/transform/transform/polypolygoncolor", "color", "#2f3ba1"); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf156167) { Primitive2DSequence aSequence = parseSvg(u"/svgio/qa/cppunit/data/tdf156167.svg"); diff --git a/svgio/qa/cppunit/data/tdf156201.svg b/svgio/qa/cppunit/data/tdf156201.svg new file mode 100644 index 000000000000..3000e17f459e --- /dev/null +++ b/svgio/qa/cppunit/data/tdf156201.svg @@ -0,0 +1,36 @@ +<svg style="width: 100%; height: 100%;" height="492pt" version="1.1" viewBox="0 0 500 492" width="500pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <g id="PathCollection_1"> + <defs> + <path d=" +M52.0418 -266.565 +L54.1695 -266.795 +L54.1955 -266.832 +L54.2469 -266.844 +L56.3492 -268.627 +L57.4099 -268.849 +L59.524 -270.389 +L60.4641 -271.625 +L62.5433 -273.716 +L62.8642 -275.66 +L63.198 -277.417 +L62.6856 -278.465 +L60.8035 -281.602 +L60.4975 -281.91 +L59.9992 -282.386 +L57.6251 -284.681 +L56.2525 -285.174 +L54.6591 -286.742 +L54.5155 -286.797 +L52.0418 -279.184 +L52.0418 -270.892" id="C0_0_32ce96eee2"></path> + </defs> + <g clip-path="url(#p65124e5d4c)"> + <use style="fill:#2f3ba1;" x="0.0" xlink:href="#C0_0_32ce96eee2" y="492.3555"></use> + </g> + </g> + <defs> + <clipPath id="p65124e5d4c"> + <rect height="446.4" width="446.4" x="38.27125" y="23.14175"></rect> + </clipPath> + </defs> +</svg> |