From d4fda377710391a2155cc6a55d8565a2ed32f518 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 12 Mar 2021 18:12:11 +0100 Subject: CppunitTest_sw_ooxmlexport: clean up testEffectExtentMargin The shape had line information, but the intent was to test what happens when the shape has some non-zero effect extent, line information is not needed for that. And do the same for a bunch of other tests: a test document should ideally have line information only if it's relevant for a test. (cherry picked from commit 0fc76a646233bebebbca3f86144f30eb32a5d60c) Change-Id: I9ea1f38841a30e7e61088d347443e37948b1a9d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112586 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- .../data/inside-outside-vert-align.docx | Bin 15838 -> 17252 bytes sw/qa/core/objectpositioning/objectpositioning.cxx | 4 ++-- sw/qa/extras/layout/data/tdf116486.docx | Bin 22455 -> 22470 bytes .../ooxmlexport/data/effectextent-margin.docx | Bin 13219 -> 13144 bytes ...045_TestShapeAlignmentRelativeFromTopMargin.docx | Bin 19650 -> 19805 bytes .../extras/ooxmlexport/data/textframe-gradient.docx | Bin 10916 -> 13655 bytes sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 6 +++--- 7 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sw/qa/core/objectpositioning/data/inside-outside-vert-align.docx b/sw/qa/core/objectpositioning/data/inside-outside-vert-align.docx index 15d2dca0775e..1308e1f6a8a5 100644 Binary files a/sw/qa/core/objectpositioning/data/inside-outside-vert-align.docx and b/sw/qa/core/objectpositioning/data/inside-outside-vert-align.docx differ diff --git a/sw/qa/core/objectpositioning/objectpositioning.cxx b/sw/qa/core/objectpositioning/objectpositioning.cxx index 13a936500329..648be3888857 100644 --- a/sw/qa/core/objectpositioning/objectpositioning.cxx +++ b/sw/qa/core/objectpositioning/objectpositioning.cxx @@ -227,9 +227,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testInsideOutsideVertAlignBott = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "top").toInt32(); //15694 // Verify that the distance between the bottom of page and bottom of first shape is around 0cm. (align=outside) - CPPUNIT_ASSERT_EQUAL(static_cast(23), nPageBottom - nFirstShapeOutside); + CPPUNIT_ASSERT_EQUAL(static_cast(3), nPageBottom - nFirstShapeOutside); // Verify that the distance between the bottom of body and top of second shape is around 0cm. (align=inside) - CPPUNIT_ASSERT_EQUAL(static_cast(10), nBodyBottom - nSecondShapeInside); + CPPUNIT_ASSERT_EQUAL(static_cast(0), nBodyBottom - nSecondShapeInside); } CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVMLVertAlignBottomMargin) diff --git a/sw/qa/extras/layout/data/tdf116486.docx b/sw/qa/extras/layout/data/tdf116486.docx index c6a4891b0cf4..825b0ef33a55 100644 Binary files a/sw/qa/extras/layout/data/tdf116486.docx and b/sw/qa/extras/layout/data/tdf116486.docx differ diff --git a/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx b/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx index 22db162a78b0..5dccf967fe7a 100644 Binary files a/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx and b/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx differ diff --git a/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx b/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx index 2cd299ff211a..aa976e7cc925 100644 Binary files a/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx and b/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx differ diff --git a/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx b/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx index e5ed0689d251..edbfe53b1627 100644 Binary files a/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx and b/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx index cb00fff1f684..d7bdc09c0c34 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx @@ -1008,9 +1008,9 @@ DECLARE_OOXMLEXPORT_TEST(testRelativeAlignmentFromTopMargin, return; xmlDocUniquePtr pXmlDoc = parseLayoutDump(); - assertXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "top", "1487"); // center - assertXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "top", "2668"); // bottom - assertXPath(pXmlDoc, "//SwAnchoredDrawObject[3]/bounds", "top", "298"); // top + assertXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "top", "1502"); // center + assertXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "top", "2683"); // bottom + assertXPath(pXmlDoc, "//SwAnchoredDrawObject[3]/bounds", "top", "313"); // top } CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit