diff options
author | Pierre-Eric Pelloux-Prayer <pierre-eric@lanedo.com> | 2013-01-11 14:39:13 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-01-15 15:41:34 +0000 |
commit | 57ca766ab44e0d55ce21ee734aa0aafbff94eb45 (patch) | |
tree | 355f3fa6dab9d9ee08ee9b34da16afacf65d018a /sw | |
parent | bf442dcaa02f844d7b69d6851287a186f77344b3 (diff) |
docx export: add test case for paragraph mark export
Change-Id: I2701ee12221460f8ff19397ea215cc1484648d18
Reviewed-on: https://gerrit.libreoffice.org/1650
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/qa/extras/ooxmlexport/data/1-table-1-page.docx | bin | 0 -> 11658 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 15 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/1-table-1-page.docx b/sw/qa/extras/ooxmlexport/data/1-table-1-page.docx Binary files differnew file mode 100755 index 000000000000..d821c6698f39 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/1-table-1-page.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 0f99cf54e9f0..8d1440984f77 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -35,6 +35,7 @@ #include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> #include <com/sun/star/table/BorderLine2.hpp> +#include <com/sun/star/text/XPageCursor.hpp> #include <unotools/tempfile.hxx> #include <swmodeltestbase.hxx> @@ -66,6 +67,7 @@ public: void testTableBorders(); void testFdo51550(); void testN789482(); + void test1Table1Page(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -104,6 +106,7 @@ void Test::run() {"table-borders.docx", &Test::testTableBorders}, {"fdo51550.odt", &Test::testFdo51550}, {"n789482.docx", &Test::testN789482}, + {"1-table-1-page.docx", &Test::test1Table1Page}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -494,6 +497,18 @@ void Test::testN789482() getRun(xParagraph, 5, " After."); } +void Test::test1Table1Page() +{ + // 2 problem for this document after export: + // - invalid sectPr inserted at the beginning of the page + // - font of empty cell is not preserved, leading to change in rows height + 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(); |