diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2024-05-10 08:07:41 +0200 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-13 12:06:55 +0200 |
commit | b6f42a6006dd0b0e42348888ed5e0f536b7f4d8a (patch) | |
tree | 2e5b6fcf1a8eeb6b8514b0a3ce6db935e2cc8c24 /sw | |
parent | ec1c8270dd25fee7035e3fec5d22d220c12c7071 (diff) |
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.mcnamara@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/core/layout/layout.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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) |