svgio/qa/cppunit/SvgImportTest.cxx  |   11 +++++++++++
 svgio/qa/cppunit/data/tdf164434.svg |   17 +++++++++++++++++
 2 files changed, 28 insertions(+)

New commits:
commit 1ad1b3e833742f4e2018586a6e00d274e87b7a73
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Jan 13 10:56:49 2025 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Jan 13 12:26:17 2025 +0100

    tdf#164434: svgio: Add unittest
    
    Change-Id: Id66f344c785f1771debcc8bd2e09c8a04da4c989
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180165
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index 49465dc4db03..b0042b487f13 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -176,6 +176,17 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf155819)
     assertXPath(pDocument, "/primitive2D/transform/transform", 4);
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTdf164434)
+{
+    xmlDocUniquePtr pDocument = 
dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf164434.svg");
+
+    assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor", 1);
+    assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor", "color", 
u"#000000");
+    assertXPath(pDocument, 
"/primitive2D/transform/transform/polypolygoncolor", 0);
+    assertXPath(pDocument, 
"/primitive2D/transform/transform/transform/polypolygoncolor", 1);
+    assertXPath(pDocument, 
"/primitive2D/transform/transform/transform/polypolygoncolor", "color", 
u"#000000");
+}
+
 CPPUNIT_TEST_FIXTURE(Test, testNormalBlend)
 {
     xmlDocUniquePtr pDocument = 
dumpAndParseSvg(u"/svgio/qa/cppunit/data/normalBlend.svg");
diff --git a/svgio/qa/cppunit/data/tdf164434.svg 
b/svgio/qa/cppunit/data/tdf164434.svg
new file mode 100644
index 000000000000..80df4541dfb9
--- /dev/null
+++ b/svgio/qa/cppunit/data/tdf164434.svg
@@ -0,0 +1,17 @@
+<svg xmlns="http://www.w3.org/2000/svg"; viewBox="0 0 500 400">
+  <symbol
+     viewBox="-68.6 -66.9 137.2 133.9"
+     id="master_x5F_level1_1_">
+      <polygon
+         points="-29.2,-63.9 -65.6,-18.3 -52.6,38.6 0,63.9 52.6,38.6 
65.6,-18.3 29.2,-63.9"/>
+  </symbol>
+  <use
+     transform="matrix(0.4,0,0,-0.4,185.8606,187.2514)"
+     y="-66.900002"
+     x="-68.599998"
+     height="133.89999"
+     width="137.2"
+     href="#master_x5F_level1_1_" />
+  <polygon
+     points="111.4,139.9 111.4,98.7 147.1,78.2 182.7,98.7 182.7,139.9 
147.1,160.4 "/>
+</svg>

Reply via email to