summaryrefslogtreecommitdiffstats
path: root/sw/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/odfexport/data/tdf132642_keepWithNextTable.odtbin0 -> 10030 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx7
-rw-r--r--sw/qa/extras/ww8export/data/tdf91083_tableKeep.docbin16384 -> 0 bytes
-rw-r--r--sw/qa/extras/ww8export/data/tdf91083_tableKeep2.odtbin0 -> 15980 bytes
-rw-r--r--sw/qa/extras/ww8export/data/tdf91083_tableKeep3.odtbin0 -> 13658 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx22
6 files changed, 29 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/tdf132642_keepWithNextTable.odt b/sw/qa/extras/odfexport/data/tdf132642_keepWithNextTable.odt
new file mode 100644
index 000000000000..739cd0078ad7
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf132642_keepWithNextTable.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 4b8cef0525c9..f93696f1ec32 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1998,6 +1998,13 @@ DECLARE_ODFEXPORT_TEST(testTdf101710, "tdf101710.odt")
CPPUNIT_ASSERT_EQUAL(sal_uInt32(10104), getProperty<sal_uInt32>(xStyle, "NumberFormat"));
}
+DECLARE_ODFEXPORT_TEST(testTdf132642_keepWithNextTable, "tdf132642_keepWithNextTable.odt")
+{
+ // Since the row is very big, it should split over two pages.
+ // Since up to this point we haven't tried to make it match MS formats, it should start on page 1.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Row splits over 2 pages", 2, getPages());
+}
+
DECLARE_ODFEXPORT_TEST(testImageMimetype, "image-mimetype.odt")
{
// Test that the loext:mimetype attribute is written for exported images, tdf#109202
diff --git a/sw/qa/extras/ww8export/data/tdf91083_tableKeep.doc b/sw/qa/extras/ww8export/data/tdf91083_tableKeep.doc
deleted file mode 100644
index 2215ab0e92d3..000000000000
--- a/sw/qa/extras/ww8export/data/tdf91083_tableKeep.doc
+++ /dev/null
Binary files differ
diff --git a/sw/qa/extras/ww8export/data/tdf91083_tableKeep2.odt b/sw/qa/extras/ww8export/data/tdf91083_tableKeep2.odt
new file mode 100644
index 000000000000..19a1ac843a78
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf91083_tableKeep2.odt
Binary files differ
diff --git a/sw/qa/extras/ww8export/data/tdf91083_tableKeep3.odt b/sw/qa/extras/ww8export/data/tdf91083_tableKeep3.odt
new file mode 100644
index 000000000000..d3a13baf490a
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf91083_tableKeep3.odt
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 4804610a8900..5c35d53820b0 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -1296,6 +1296,28 @@ DECLARE_WW8EXPORT_TEST(testTableKeep, "tdf91083.odt")
#endif
#endif
+DECLARE_WW8EXPORT_TEST(tesTdf91083_tableKeep2, "tdf91083_tableKeep2.odt")
+{
+ //emulate table "keep with next" - split large row in order to keep with previous paragraph
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Table doesn't split, so it starts on page 2",
+ OUString("0"), parseDump("count(//page[1]//tab)") );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Page 2 starts with a paragraph/title, not a table",
+ OUString("KeepWithNext"), parseDump("//page[2]/body/txt[1]") );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Table sticks with previous paragraph, so it starts on page 2",
+ OUString("1"), parseDump("count(//page[2]//tab)") );
+ CPPUNIT_ASSERT_MESSAGE("Row itself splits, not the table at a row boundary",
+ "Cell 2" != parseDump("//page[3]//tab//row[2]/cell[1]/txt[1]") );
+}
+
+DECLARE_WW8EXPORT_TEST(tesTdf91083_tableKeep3, "tdf91083_tableKeep3.odt")
+{
+ //emulate table "keep with next" - split single row table in order to keep with previous paragraph
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Table doesn't split, so it starts on page 2",
+ OUString("0"), parseDump("count(//page[1]//tab)") );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Table sticks with previous paragraph, so it starts on page 2",
+ OUString("1"), parseDump("count(//page[2]//tab)") );
+}
+
DECLARE_WW8EXPORT_TEST(testTdf76349_textboxMargins, "tdf76349_textboxMargins.doc")
{
// textboxes without borders were losing their spacing items in round-tripping