diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-09-19 13:03:43 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-09-19 13:07:57 +0200 |
commit | e8a169c93d7e2443a2e56afe7e99cd0721a2c27b (patch) | |
tree | 818b9045339cdd35f1e531ebba1c7b23fb745beb | |
parent | 1a60519fcd7706b487ceb7c5e879a81a6109f839 (diff) |
n#778828 testcase
Change-Id: I38ba0fd4128acfa114eac0b6b6e28ea49c335f0c
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/n778828.docx | bin | 0 -> 10012 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n778828.docx b/sw/qa/extras/ooxmlimport/data/n778828.docx Binary files differnew file mode 100644 index 000000000000..ad2e22d17fbf --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/n778828.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 4d25c9bcb6e6..e2ab2b0cfba9 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -91,6 +91,7 @@ public: void testN777337(); void testN778836(); void testN778140(); + void testN778828(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -124,6 +125,7 @@ public: CPPUNIT_TEST(testN777337); CPPUNIT_TEST(testN778836); CPPUNIT_TEST(testN778140); + CPPUNIT_TEST(testN778828); #endif CPPUNIT_TEST_SUITE_END(); @@ -830,6 +832,21 @@ void Test::testN778140() CPPUNIT_ASSERT_EQUAL(sal_Int32(353), getProperty<sal_Int32>(getParagraph(0), "ParaBottomMargin")); } +void Test::testN778828() +{ + /* + * The problem was that a page break after a continous section break caused + * double page break on title page. + */ + load("n778828.docx"); + + uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); + uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY); + uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY); + xCursor->jumpToLastPage(); + CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xCursor->getPage()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |