summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2023-03-02 19:32:27 -0500
committerJustin Luth <jluth@mail.com>2023-03-03 15:30:54 +0000
commit620d1dc63b652db97b05eb21685dad70e6b2ab0d (patch)
tree036fd324eadfc0ac6f793f80c910f77673f940ae /sw
parentf87ea14edfe3053e3091731deb90fc87c17ddad4 (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>
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 2e71b5bcc7fe..67c15685d7a3 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
@@ -197,6 +197,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf153613_textboxAfterPgBreak2, "tdf153613_textboxA
assertXPathContent(pLayout, "//page[2]/body/txt", "There should be no prior carriage return.");
}
+DECLARE_OOXMLEXPORT_TEST(testTdf153613_sdtAfterPgBreak, "tdf153613_sdtAfterPgBreak.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
CPPUNIT_TEST_FIXTURE(Test, testTdf149551_mongolianVert)
{
// Given a docx document with a shape with vert="mongolianVert".