diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-04-14 16:11:46 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-04-14 16:43:04 +0200 |
commit | 0ef7dbcb365534c4203760c86d089d50f7eb9562 (patch) | |
tree | 2dfef8994161a53d9955136f96b5e57328288986 /sw/qa | |
parent | a167ce5d91f87326093cbcdb44cde1527ef6849c (diff) |
dmapper: fix import of odd/even page breaks
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmltok/data/n750935.docx | bin | 0 -> 57750 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmltok/ooxmltok.cxx | 14 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmltok/data/n750935.docx b/sw/qa/extras/ooxmltok/data/n750935.docx Binary files differnew file mode 100644 index 000000000000..0dd01592dd65 --- /dev/null +++ b/sw/qa/extras/ooxmltok/data/n750935.docx diff --git a/sw/qa/extras/ooxmltok/ooxmltok.cxx b/sw/qa/extras/ooxmltok/ooxmltok.cxx index 5beb57735f9d..5aff21cb3d8c 100644 --- a/sw/qa/extras/ooxmltok/ooxmltok.cxx +++ b/sw/qa/extras/ooxmltok/ooxmltok.cxx @@ -31,7 +31,9 @@ #include <com/sun/star/text/SetVariableType.hpp> #include <com/sun/star/text/TextContentAnchorType.hpp> #include <com/sun/star/text/XDependentTextField.hpp> +#include <com/sun/star/text/XPageCursor.hpp> #include <com/sun/star/text/XTextFieldsSupplier.hpp> +#include <com/sun/star/text/XTextViewCursorSupplier.hpp> #include <test/bootstrapfixture.hxx> #include <unotest/macros_test.hxx> @@ -50,12 +52,14 @@ public: void testN751054(); void testN751117(); void testN751017(); + void testN750935(); CPPUNIT_TEST_SUITE(OoxmlModelTest); #if !defined(MACOSX) && !defined(WNT) CPPUNIT_TEST(testN751054); CPPUNIT_TEST(testN751117); CPPUNIT_TEST(testN751017); + CPPUNIT_TEST(testN750935); #endif CPPUNIT_TEST_SUITE_END(); @@ -171,6 +175,16 @@ void OoxmlModelTest::testN751017() CPPUNIT_ASSERT(bFoundGet); } +void OoxmlModelTest::testN750935() +{ + load("n750935.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(5), xCursor->getPage()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(OoxmlModelTest); CPPUNIT_PLUGIN_IMPLEMENT(); |