diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2021-07-07 00:38:46 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-07-13 10:45:19 +0200 |
commit | f9982c24066d6dd2f938cc20176af0f196bc018f (patch) | |
tree | 7b971ed9008953ab221cb1b733772c33fc441798 /sw/qa/extras/layout | |
parent | d65f6ba081817772ccce79d31fcdea38da2037ec (diff) |
tdf#58521 DOCX import: enable ContinuousEndnotes compat flag
like Writer for DOC import and MSO do to avoid to start
endnotes on a new page.
Change-Id: I37d54f189e7aa1f4d0ac829b6af0c03aec64b9f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118541
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras/layout')
-rw-r--r-- | sw/qa/extras/layout/data/tdf58521_endnotes.docx | bin | 0 -> 12541 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout2.cxx | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf58521_endnotes.docx b/sw/qa/extras/layout/data/tdf58521_endnotes.docx Binary files differnew file mode 100644 index 000000000000..f709a104c918 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf58521_endnotes.docx diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 1db5f1e69214..a1c94ea2cb39 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -1571,6 +1571,22 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testUserFieldTypeLanguage) "1,234.56"); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf58521) +{ + // This is a testcase for the ContinuousEndnotes compat flag in docx. + // The document has 2 pages, the endnote anchor is on the first page. + // The endnote should be on the 2nd page together with the last page content. + createSwDoc(DATA_DIRECTORY, "tdf58521_endnotes.docx"); + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 2 + // - Actual : 3 + // i.e. there was a separate endnote page + assertXPath(pXmlDoc, "/root/page", 2); + assertXPath(pXmlDoc, "/root/page[2]/ftncont", 1); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |