CppunitTest_svgio: fix mid-air collision
it was caused by98935eef13
"tdf#159661, tdf#160773: svgio: Add unittest" and7f64148507
"Fix a thinko in 8a97f1ba8d9ccb65b2c89106de20666311d90c30" This partially revertsd984836834
"Fix unit test after commit 98935eef13c7d755221d79fe7d3c5869a40a7c37" Kudos to Mike for keeping Jenkins happy Change-Id: I034759b2cd95cbaaeb84ec1b528bf5b61487a1e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166591 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
@@ -1585,20 +1585,16 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160773)
|
|||||||
{
|
{
|
||||||
xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf160773.svg");
|
xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf160773.svg");
|
||||||
|
|
||||||
const bool hasMask = countXPathNodes(pDocument, "/primitive2D/transform/mask"_ostr) > 0;
|
|
||||||
const OString aXPath = hasMask ? "/primitive2D/transform/mask/transform"_ostr
|
|
||||||
: "/primitive2D/transform/transform"_ostr;
|
|
||||||
|
|
||||||
// tdf#160773 Check there is a rectangle
|
// tdf#160773 Check there is a rectangle
|
||||||
assertXPath(pDocument, aXPath + "/polypolygoncolor", "color"_ostr, "#ff0000");
|
assertXPath(pDocument, "/primitive2D/transform/mask/transform/polypolygoncolor"_ostr, "color"_ostr, "#ff0000");
|
||||||
|
|
||||||
// tdf#159661 Check there is text in the right position
|
// tdf#159661 Check there is text in the right position
|
||||||
assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, 1);
|
assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, 1);
|
||||||
assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "x"_ostr, "0");
|
assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "x"_ostr, "0");
|
||||||
assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "y"_ostr, "1");
|
assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "y"_ostr, "1");
|
||||||
assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "height"_ostr, "0");
|
assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "height"_ostr, "0");
|
||||||
assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "width"_ostr, "0");
|
assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "width"_ostr, "0");
|
||||||
assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "text"_ostr, "Red");
|
assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "text"_ostr, "Red");
|
||||||
}
|
}
|
||||||
|
|
||||||
CPPUNIT_TEST_FIXTURE(Test, testTdf156271)
|
CPPUNIT_TEST_FIXTURE(Test, testTdf156271)
|
||||||
|
Reference in New Issue
Block a user