Kaydet (Commit) 8fbbb923 authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) jan iversen

SVGIO: tdf#85770: Add import test

Change-Id: Ifffe1d461ae6fa30a9cc61df2ece5716078031ab
Reviewed-on: https://gerrit.libreoffice.org/22190Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarjan iversen <jani@documentfoundation.org>
Tested-by: 's avatarjan iversen <jani@documentfoundation.org>
üst e9309e1f
......@@ -43,6 +43,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools
void testFontsizeKeywords();
void testFontsizePercentage();
void testTdf45771();
void testTdf85770();
Primitive2DSequence parseSvg(const char* aSource);
......@@ -56,6 +57,7 @@ public:
CPPUNIT_TEST(testFontsizeKeywords);
CPPUNIT_TEST(testFontsizePercentage);
CPPUNIT_TEST(testTdf45771);
CPPUNIT_TEST(testTdf85770);
CPPUNIT_TEST_SUITE_END();
};
......@@ -204,6 +206,21 @@ void Test::testTdf45771()
assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "height", "32");
}
void Test::testTdf85770()
{
Primitive2DSequence aSequenceTdf85770 = parseSvg("/svgio/qa/cppunit/data/tdf85770.svg");
CPPUNIT_ASSERT_EQUAL(1, (int)aSequenceTdf85770.getLength());
Primitive2dXmlDump dumper;
xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequenceTdf85770));
CPPUNIT_ASSERT (pDocument);
assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "text", "Start Middle End");
assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "text", "Start ");
assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]", "text", "End");
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
}
......
This diff was suppressed by a .gitattributes entry.
......@@ -178,6 +178,8 @@ void Primitive2dXmlDump::decomposeAndWrite(
{
rWriter.attribute("height", aScale.getY());
}
rWriter.attribute("text", pTextSimplePortionPrimitive2D->getText());
rWriter.endElement();
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment