summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2023-03-02 19:32:27 -0500
committerMiklos Vajna <vmiklos@collabora.com>2023-03-06 08:33:54 +0000
commitaf8fd3cfc71d404ae570c04b8e6540bcf6089009 (patch)
treeb1e77e8dacd328a19b4d504d063ddb0a091c233b /sw
parent10b360a7b773b4b03243002bfb205e5997263741 (diff)
tdf#153613 writerfilter: handle defered break before SDT start
If there are deferred column or page breaks before an SDT, then before starting the SDT we need to determine if the existing run needs to split - same as everywhere else. There was only one existing unit test that had any defered page or column breaks, so only two example documents to work from. That was tdf125778_lostPageBreakTOX.docx. Change-Id: I02d71577af13399d8aaf3ba0ce40fc6bed5e6e3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148148 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148195 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153613_sdtAfterPgBreak.docxbin0 -> 46930 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport18.cxx5
2 files changed, 5 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153613_sdtAfterPgBreak.docx b/sw/qa/extras/ooxmlexport/data/tdf153613_sdtAfterPgBreak.docx
new file mode 100644
index 000000000000..fa62b475cfaa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153613_sdtAfterPgBreak.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
index 129e42325640..7ab327f7e007 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
@@ -63,6 +63,11 @@ CPPUNIT_TEST_FIXTURE(Test, testInlineSdtHeader)
loadAndSave("inline-sdt-header.docx");
}
+DECLARE_OOXMLEXPORT_TEST(testTdf153613_sdtAfterPgBreak, "tdf153613_sdtAfterPgBreak.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
CPPUNIT_TEST_FIXTURE(Test, testTdf152636_lostPageBreak2)
{
loadAndReload("tdf152636_lostPageBreak2.docx");