[Libreoffice-commits] core.git: svgio/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 19 16:09:28 UTC 2019


 svgio/qa/cppunit/SvgImportTest.cxx  |   14 +++++++
 svgio/qa/cppunit/data/tdf104339.svg |   65 ++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+)

New commits:
commit 428b67cd0d490739f9a7bb5a724020179ba7591d
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Sep 19 13:26:12 2019 +0200
Commit:     Xisco FaulĂ­ <xiscofauli at libreoffice.org>
CommitDate: Thu Sep 19 18:08:05 2019 +0200

    tdf#104339: SVGIO: Add unittest
    
    Change-Id: I6ecb366a889fe64bc90db0e041b4ddd4bc3dfc3f
    Reviewed-on: https://gerrit.libreoffice.org/79129
    Tested-by: Jenkins
    Reviewed-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>

diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx
index ea510cdbe1a5..5f714e98b4e7 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -46,6 +46,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools
     void testFontsizeRelative();
     void testTdf45771();
     void testTdf97941();
+    void testTdf104339();
     void testTdf85770();
     void testTdf79163();
     void testTdf97542_1();
@@ -78,6 +79,7 @@ public:
     CPPUNIT_TEST(testFontsizeRelative);
     CPPUNIT_TEST(testTdf45771);
     CPPUNIT_TEST(testTdf97941);
+    CPPUNIT_TEST(testTdf104339);
     CPPUNIT_TEST(testTdf85770);
     CPPUNIT_TEST(testTdf79163);
     CPPUNIT_TEST(testTdf97542_1);
@@ -327,6 +329,18 @@ void Test::testTdf97941()
     assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "familyname", "Times New Roman");
 }
 
+void Test::testTdf104339()
+{
+    Primitive2DSequence aSequenceTdf104339 = parseSvg("/svgio/qa/cppunit/data/tdf104339.svg");
+    CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf104339.getLength()));
+
+    drawinglayer::tools::Primitive2dXmlDump dumper;
+    xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequenceTdf104339));
+
+    CPPUNIT_ASSERT (pDocument);
+    assertXPath(pDocument, "/primitive2D/transform/transform/transform/transform/transform/polypolygoncolor", "color", "#000000");
+}
+
 void Test::testTdf85770()
 {
     Primitive2DSequence aSequenceTdf85770 = parseSvg("/svgio/qa/cppunit/data/tdf85770.svg");
diff --git a/svgio/qa/cppunit/data/tdf104339.svg b/svgio/qa/cppunit/data/tdf104339.svg
new file mode 100644
index 000000000000..d06ff695c083
--- /dev/null
+++ b/svgio/qa/cppunit/data/tdf104339.svg
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.92pre2 r"
+   xml:space="preserve"
+   width="565.10504"
+   height="132.81749"
+   viewBox="0 0 565.10504 132.8175"
+   sodipodi:docname="aaFINAL_bot_05px.svg"><metadata
+     id="metadata8"><rdf:RDF><cc:Work
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
+     id="defs6"><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath16"><path
+         d="M 0,612 792,612 792,0 0,0 0,612 Z"
+         id="path18"
+         inkscape:connector-curvature="0" /></clipPath></defs><sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="2013"
+     inkscape:window-height="1245"
+     id="namedview4"
+     showgrid="false"
+     fit-margin-top="5"
+     fit-margin-left="5"
+     fit-margin-right="5"
+     fit-margin-bottom="5"
+     inkscape:zoom="0.87256051"
+     inkscape:cx="191.22352"
+     inkscape:cy="-230.18873"
+     inkscape:window-x="616"
+     inkscape:window-y="79"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="g14" /><g
+     id="g10"
+     inkscape:groupmode="layer"
+     inkscape:label="FINAL1"
+     transform="matrix(1.25,0,0,-1.25,-221.64057,456.20243)"><g
+       id="g12"
+       transform="translate(16.855932,5.8347458)"><g
+         id="g14"
+         clip-path="url(#clipPath16)"><g
+           id="g118"
+           transform="translate(403.16803,288.82005)"><path
+             d="m 0,0 v -7.675 h -34.756 v 51.656 h 8.19 V 0 Z"
+             style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             id="path120"
+             inkscape:connector-curvature="0" /></g></g></g></g></svg>
\ No newline at end of file


More information about the Libreoffice-commits mailing list