diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-10-15 12:53:05 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-10-15 13:00:33 +0200 |
commit | abd4ffadf30e02284290ea35e8f45d9ffd8eb5ee (patch) | |
tree | e993fa7774965bde80ae767292450c0d9c29cb34 /sw/qa | |
parent | b8523dd61242ae2299e4ddbf9491805684d96f84 (diff) |
fdo#52208 DOCX import: don't always ignore cont sect break at the doc end
Regression from commit 1fdd61db155cf63d5dd55cc2bfb45af33796e131,
continuous section break does make sense at the end of the doc, if the
previous type was a non-continuous.
Change-Id: I6d82c67e068d8dc3ce1edb1a5fe6ad293afd805d
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/fdo52208.docx | bin | 0 -> 13356 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/fdo52208.docx b/sw/qa/extras/ooxmlimport/data/fdo52208.docx Binary files differnew file mode 100644 index 000000000000..be842ad2acbc --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/fdo52208.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index ea6b66778e95..f30c0f13cd9f 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -105,6 +105,7 @@ public: void testN782061(); void testN782345(); void testN783638(); + void testFdo52208(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -152,6 +153,7 @@ public: CPPUNIT_TEST(testN782061); CPPUNIT_TEST(testN782345); CPPUNIT_TEST(testN783638); + CPPUNIT_TEST(testFdo52208); #endif CPPUNIT_TEST_SUITE_END(); @@ -1090,6 +1092,17 @@ void Test::testN783638() CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPropertySet, "LeftMargin")); } +void Test::testFdo52208() +{ + // The problem was that the document had 2 pages instead of 1. + load("fdo52208.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(1), xCursor->getPage()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |