summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-08-26 17:06:22 +0300
committerJustin Luth <justin_luth@sil.org>2020-08-31 13:59:53 +0200
commita0da393cac0a44c648238b815970245684173c99 (patch)
treed39216467d8beb11fb99a49e31698da2e8c434ad /sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
parent9460b6baf392c11091e46105071b7d7b6c4eb1ca (diff)
tdf#132149 ww8export: nextNode has nothing to do with pageDesc
While it can often be assumed that the next paragraph following one that has just soft-page-breaked in the middle will be on the same page, it isn't necessarily correct. Either the paragraph could span multiple pages, or a page-break could push it to the next page. Thus, strip the code out completely, and simply prepare a new page style based on the follow style - which by definition is different enough to not be a plausible single word section. A few followup commits will add enhancements, but this is broken up into minute bits in order to aid in regression identification. Change-Id: I80e4e17be69a49f45a624d819c9c4158541ee065 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101424 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport15.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport15.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 821a254ea0fe..397b9040e026 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -329,6 +329,18 @@ DECLARE_OOXMLEXPORT_TEST(testTdf135343_columnSectionBreak_c15, "tdf135343_column
CPPUNIT_ASSERT_EQUAL_MESSAGE("Fits on two pages", 2, getPages());
}
+DECLARE_OOXMLEXPORT_TEST(testTdf132149_pgBreak, "tdf132149_pgBreak.odt")
+{
+ xmlDocUniquePtr pDump = parseLayoutDump();
+
+ // No header on pages 1,2,3 (and currently 4).
+ assertXPath(pDump, "//page[2]/header", 0);
+
+ //Page break is not lost. This SHOULD be on page 4, but sadly it is not.
+ //assertXPathContent(pDump, "//page[5]/header", "First Page Style");
+ //CPPUNIT_ASSERT(getXPathContent(pDump, "//page[5]/body/txt").startsWith("Lorem ipsum"));
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf129452_excessBorder, "tdf129452_excessBorder.docx")
{
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);