summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2023-03-14 14:20:58 -0400
committerJustin Luth <jluth@mail.com>2023-03-15 01:38:29 +0000
commit828fde37632a5bb0542b6925454690a5287d6490 (patch)
tree1adaf348baf39810011cc8c2a18c776c79884b8a /sw/qa
parent5da513c1f34f657f910d2a9d1af7761cf649574f (diff)
tdf#153613 tdf#146984 writerfilter: split para after anchors
Even though the w:br occurs in the paragraph before the anchors, the anchors stay on the first page, and don't move to the second page (unless it is the last paragraph in the section/document, which is not yet handled.) make CppunitTest_sw_ooxmlexport18 \ CPPUNIT_TEST_NAME=testTdf153613_textboxAfterPgBreak3 Change-Id: Icfc7e2a5d7657f1eb8f94263a4bfc8dcca7e52de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148897 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153613_textboxAfterPgBreak3.docxbin0 -> 7037 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport18.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153613_textboxAfterPgBreak3.docx b/sw/qa/extras/ooxmlexport/data/tdf153613_textboxAfterPgBreak3.docx
new file mode 100644
index 000000000000..a282deaa0ad7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153613_textboxAfterPgBreak3.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
index 460f4098e837..c30e555ae15e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
@@ -217,6 +217,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf153613_textboxAfterPgBreak2, "tdf153613_textboxA
assertXPathContent(pLayout, "//page[2]/body/txt", "There should be no prior carriage return.");
}
+DECLARE_OOXMLEXPORT_TEST(testTdf153613_textboxAfterPgBreak3, "tdf153613_textboxAfterPgBreak3.docx")
+{
+ // All anchored TO-character shapes stay on the first page, before the page break.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ CPPUNIT_ASSERT_EQUAL(3, getParagraphs());
+
+ const auto& pLayout = parseLayoutDump();
+ assertXPath(pLayout, "//page[2]//anchored", 0);
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf153613_sdtAfterPgBreak, "tdf153613_sdtAfterPgBreak.docx")
{
CPPUNIT_ASSERT_EQUAL(2, getPages());