diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-03-07 17:42:26 +0100 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-03-08 04:27:55 +0000 |
commit | 60773144ad33a10c32ce43fa9fca80c8b3fe8202 (patch) | |
tree | 2647ece249c92cbbef1de2cc796e0180071b45d2 /sw | |
parent | a7223551f8d3c6d08fcfe951ac21ec8dc8ee00af (diff) |
fdo#61343 fix DOCX import of OLE object after groupshape
Change-Id: I88d5e49cc3fb915d25c1b2576cdda1fffc9e2f23
(cherry picked from commit 344e4a25eac6505678f4ce8a6c1c8cef83c68276)
Reviewed-on: https://gerrit.libreoffice.org/2587
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/qa/extras/ooxmlimport/data/fdo61343.docx | bin | 0 -> 114220 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/fdo61343.docx b/sw/qa/extras/ooxmlimport/data/fdo61343.docx Binary files differnew file mode 100755 index 000000000000..9ab99739b7c2 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/fdo61343.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 1ade3ed75f8d..3f5a07064a75 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -113,6 +113,7 @@ public: void testN779642(); void testFdo53985(); void testFdo59638(); + void testFdo61343(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -178,6 +179,7 @@ void Test::run() {"n779642.docx", &Test::testN779642}, {"fdo53985.docx", &Test::testFdo53985}, {"fdo59638.docx", &Test::testFdo59638}, + {"fdo61343.docx", &Test::testFdo61343}, }; for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) { @@ -1121,6 +1123,15 @@ void Test::testFdo59638() CPPUNIT_FAIL("no BulletChar property"); } +void Test::testFdo61343() +{ + // The problem was that there were a groupshape in the doc, followed by an + // OLE object, and this lead to a crash. + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDraws->getCount()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |