diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-02-27 14:46:35 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-02-27 16:53:50 +0100 |
commit | 8281578b89c3df3fe3452a594f6b21483683638a (patch) | |
tree | 85838f0cee979b31ff3b68ab02a3bee1a44a3d48 /sw/qa/extras | |
parent | 26ea7f4deb2470f59717539a63f8685b1d257bf0 (diff) |
fdo#53985 DOCX import: don't try to set empty PageDescName
Regression from 50cb1667020494906afaacb68d4163d1eda527cf.
Change-Id: Ie04d5ad37555ed4cfeb34ccb8dc021675fbd25ea
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/fdo53985.docx | bin | 0 -> 20115 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/fdo53985.docx b/sw/qa/extras/ooxmlimport/data/fdo53985.docx Binary files differnew file mode 100644 index 000000000000..0c8b32fb671f --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/fdo53985.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index f6eb0ef311bf..62a2c987fd84 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -117,6 +117,7 @@ public: void testGroupshapeLine(); void testN779642(); void testTbLrHeight(); + void testFdo53985(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -185,6 +186,7 @@ void Test::run() {"groupshape-line.docx", &Test::testGroupshapeLine}, {"n779642.docx", &Test::testN779642}, {"tblr-height.docx", &Test::testTbLrHeight}, + {"fdo53985.docx", &Test::testFdo53985}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1196,6 +1198,15 @@ void Test::testTbLrHeight() CPPUNIT_ASSERT_EQUAL(text::SizeType::FIX, getProperty<sal_Int16>(xTableRows->getByIndex(0), "SizeType")); } +void Test::testFdo53985() +{ + // Unhandled excetion prevented import of the rest of the document. + + uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTables->getCount()); // Only 4 tables were imported. +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |