From 99757f5e3a0a56370e035c14f38f5ccde3902e2c Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 24 Apr 2024 17:50:23 +0200 Subject: CppunitTest_svgio: fix mid-air collision it was caused by 98935eef13c7d755221d79fe7d3c5869a40a7c37 "tdf#159661, tdf#160773: svgio: Add unittest" and 7f64148507a360825e9c28ddb7077996df9fa092 "Fix a thinko in 8a97f1ba8d9ccb65b2c89106de20666311d90c30" This partially reverts d984836834e67b5bcd618ebd5d1633138985a881 "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 --- svgio/qa/cppunit/SvgImportTest.cxx | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'svgio/qa/cppunit/SvgImportTest.cxx') diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index 080580fd8589..01463a894dd5 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -1585,20 +1585,16 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160773) { 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 - 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 - assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, 1); - assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "x"_ostr, "0"); - assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "y"_ostr, "1"); - assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "height"_ostr, "0"); - assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "width"_ostr, "0"); - assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "text"_ostr, "Red"); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, 1); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "x"_ostr, "0"); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "y"_ostr, "1"); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "height"_ostr, "0"); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "width"_ostr, "0"); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "text"_ostr, "Red"); } CPPUNIT_TEST_FIXTURE(Test, testTdf156271) -- cgit v1.2.3