summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-03-07 17:42:26 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-03-07 18:20:18 +0100
commit344e4a25eac6505678f4ce8a6c1c8cef83c68276 (patch)
treedd5e32e7677ff8d7f2f1cfc7b788e1a81cc8842d /sw
parentda03bb1ee6a69d2f4fef4c3ca0adc0ba9588bd19 (diff)
fdo#61343 fix DOCX import of OLE object after groupshape
Change-Id: I88d5e49cc3fb915d25c1b2576cdda1fffc9e2f23
Diffstat (limited to 'sw')
-rwxr-xr-xsw/qa/extras/ooxmlimport/data/fdo61343.docxbin0 -> 114220 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx11
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
new file mode 100755
index 000000000000..9ab99739b7c2
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/fdo61343.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 8365013aff62..0332a0c41ca5 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -119,6 +119,7 @@ public:
void testTbLrHeight();
void testFdo53985();
void testFdo59638();
+ void testFdo61343();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -189,6 +190,7 @@ void Test::run()
{"tblr-height.docx", &Test::testTbLrHeight},
{"fdo53985.docx", &Test::testFdo53985},
{"fdo59638.docx", &Test::testFdo59638},
+ {"fdo61343.docx", &Test::testFdo61343},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1232,6 +1234,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();