sw/qa/core/layout/layout.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit b6f42a6006dd0b0e42348888ed5e0f536b7f4d8a Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Fri May 10 08:07:41 2024 +0200 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon May 13 12:06:55 2024 +0200 tdf#160984 sw continuous endnotes: fix testContinuousEndnotesMoveBackwards Once continuous endnotes are in a section, this failed, even if the generated layout is an improvement. The layout will put the endnotes to a section, which will be directly after the end of the body text, which is closer to what Word does, but makes the test fail, since the foot/endnote container is no longer directly under the page frame (the new tree is page -> body -> section -> column -> ftncont). Fix the problem by relaxing the assert to only check which pages have footnote containers, which passes with and without the move to section-based continuous endnotes, but still fails if endnotes go to their own page, which was the original problem to be tested (endnotes remained on page 3 and didn't move backwards). The assert for the number of pages can remain unchanged. (cherry picked from commit ab3416cad1dd4e706432f9b1a3592cec823c76b0) Change-Id: I9a46803463c82dac317c303721de30fae48c6924 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167579 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx index 5971e870304d..9cae825b38b4 100644 --- a/sw/qa/core/layout/layout.cxx +++ b/sw/qa/core/layout/layout.cxx @@ -179,9 +179,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testContinuousEndnotesMoveBackwards) // - Expected: 0 // - Actual : 1 // i.e. there were unexpected endnotes on page 1. - assertXPath(pLayout, "/root/page[1]/ftncont"_ostr, 0); + assertXPath(pLayout, "/root/page[1]//ftncont"_ostr, 0); // All endnotes are in a container on page 2. - assertXPath(pLayout, "/root/page[2]/ftncont"_ostr, 1); + assertXPath(pLayout, "/root/page[2]//ftncont"_ostr, 1); } CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testAnchorPositionBasedOnParagraph)