cpp.hint | 15 +++++++++++++++ svgio/qa/cppunit/SvgImportTest.cxx | 18 +++++++++++------- 2 files changed, 26 insertions(+), 7 deletions(-)
New commits: commit d7b15f03e0b956d23854806f35636ab4acfb1296 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Tue Apr 23 22:36:36 2024 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Wed Apr 24 09:43:42 2024 +0200 Add some entries into cpp.hint Improves VS integration: allows to find CPP unit tests defined using DECLARE_SW_ROUNDTRIP_TEST and friends. The macros are stripped down to the minimum to allow IntelliSense do its job. Change-Id: I5325cb5ac424e3b08cd64b265d5d4924fbadcfcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166571 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/cpp.hint b/cpp.hint index 67e06e24b646..1000d44cd627 100644 --- a/cpp.hint +++ b/cpp.hint @@ -46,3 +46,18 @@ void TestBody(); \ }; \ void TestName::TestBody() + +// From sw/qa/inc/swmodeltestbase.hxx +// To allow searching for the test names, where they are defined using the macros +#define DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, password, BaseClass) \ + class TestName : public BaseClass { \ + public: \ + void verify() override; \ + }; \ + void TestName::verify() + +#define DECLARE_OOXMLEXPORT_TEST(TestName, filename) DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, Test) +#define DECLARE_RTFEXPORT_TEST(TestName, filename) DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, Test) +#define DECLARE_ODFEXPORT_TEST(TestName, filename) DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, Test) +#define DECLARE_FODFEXPORT_TEST(TestName, filename) DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, Test) +#define DECLARE_WW8EXPORT_TEST(TestName, filename) DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, Test) commit d984836834e67b5bcd618ebd5d1633138985a881 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Wed Apr 24 10:41:59 2024 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Wed Apr 24 09:43:30 2024 +0200 Fix unit test after commit 98935eef13c7d755221d79fe7d3c5869a40a7c37 Similar to commit cfa9990d470b10548c7fed64eb1182fea11d41e0 (Enable this test on all platforms. 2024-04-20), it seems that 'mask' gets exported inconsistently. This patch workarouns the problem; a proper fix would be finding the real cause. Change-Id: I94c89442aa0385262fba67ec58c9d8d12ffbea27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166573 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index ee9a61deebc3..080580fd8589 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -1585,16 +1585,20 @@ 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, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#ff0000"); + assertXPath(pDocument, aXPath + "/polypolygoncolor", "color"_ostr, "#ff0000"); // tdf#159661 Check there is text in the right position - assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion"_ostr, 1); - assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion"_ostr, "x"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion"_ostr, "y"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion"_ostr, "height"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion"_ostr, "width"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion"_ostr, "text"_ostr, "Red"); + 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"); } CPPUNIT_TEST_FIXTURE(Test, testTdf156271)