diff options
Diffstat (limited to 'sw/qa/extras/ooxmlimport/ooxmlimport.cxx')
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index e85a2286b735..4da8664e649f 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -133,6 +133,7 @@ public: void testTableFloating(); void testTableAutoNested(); void testTableStyleParprop(); + void testTablePagebreak(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -215,6 +216,7 @@ void Test::run() {"table-floating.docx", &Test::testTableFloating}, {"table-auto-nested.docx", &Test::testTableAutoNested}, {"table-style-parprop.docx", &Test::testTableStyleParprop}, + {"table-pagebreak.docx", &Test::testTablePagebreak}, }; for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) { @@ -1349,6 +1351,15 @@ void Test::testTableStyleParprop() CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin")); } +void Test::testTablePagebreak() +{ + // Page break inside table: should be ignored (was style::BreakType_PAGE_BEFORE before). + CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE, getProperty<style::BreakType>(getParagraphOrTable(2), "BreakType")); + + // This one is outside the table: should not be ignored. + CPPUNIT_ASSERT_EQUAL(style::BreakType_PAGE_BEFORE, getProperty<style::BreakType>(getParagraph(3), "BreakType")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |