diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-01-22 09:36:00 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-01-22 09:38:59 +0100 |
commit | 4a787e2078ca1a19e065cb356fc80f421213ad87 (patch) | |
tree | 36eca2acf9e79e12b2f9e76b61580265b20408d1 /sw | |
parent | a2bee4547a4997759e41aed8de0f2af95460a732 (diff) |
sw: DOCX export of TextFrames testcase
Change-Id: Ie46a2627d247fb293606c6deab3254113b741336
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/textframes.odt | bin | 0 -> 8853 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/textframes.odt b/sw/qa/extras/ooxmlexport/data/textframes.odt Binary files differnew file mode 100644 index 000000000000..301744af3ebd --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/textframes.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index a6a778345236..c1fd412979fc 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -68,6 +68,7 @@ public: void testFdo51550(); void testN789482(); void test1Table1Page(); + void testTextFrames(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -107,6 +108,7 @@ void Test::run() {"fdo51550.odt", &Test::testFdo51550}, {"n789482.docx", &Test::testN789482}, // {"1-table-1-page.docx", &Test::test1Table1Page}, // doesn't work on openSUSE12.2 at least + {"textframes.odt", &Test::testTextFrames}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -509,6 +511,14 @@ void Test::test1Table1Page() CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage()); } +void Test::testTextFrames() +{ + // The frames were simply missing, so let's check if all 3 frames were imported back. + uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xIndexAccess->getCount()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |