diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-04-29 08:35:29 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-04-29 09:57:04 +0200 |
commit | fdf4aaa3dc5cc1d2e7a112e6c32d7845f13caef8 (patch) | |
tree | 5849b7d2d59c3f768ee8a8201404007c8e31c738 /sw | |
parent | a5c0cf416faff2a4b273ac526a83c9c2575a5d51 (diff) |
tdf#124398 DOCX drawingML import: handle charts in group shapes
Regression from commit 8c73b16f5f18f3bc1dbf9ff6c1475db56b44d304 (DOCX
import: declare wpg as a supported feature, 2013-12-05), the problem was
that <wpg:graphicFrame> did not forward to to the relevant oox context,
and also Writer had no idea how to create a
com.sun.star.drawing.OLE2Shape. Fix the later by using the same service
name that's in use for the non-groupshape case.
Change-Id: Id3536854da7c1f01525bb38d801496ecebd4c161
Reviewed-on: https://gerrit.libreoffice.org/71505
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf124398.docx | bin | 0 -> 79734 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf124398.docx b/sw/qa/extras/ooxmlimport/data/tdf124398.docx Binary files differnew file mode 100644 index 000000000000..4d1855347fd6 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tdf124398.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index 3df3f1adf8db..fcd6d8d34d91 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -217,6 +217,18 @@ DECLARE_OOXMLIMPORT_TEST(testTdf112443, "tdf112443.docx") // and as result only one page should be generated. DECLARE_OOXMLIMPORT_TEST(testTdf113182, "tdf113182.docx") { CPPUNIT_ASSERT_EQUAL(1, getPages()); } +DECLARE_OOXMLIMPORT_TEST(testTdf124398, "tdf124398.docx") +{ + uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY); + CPPUNIT_ASSERT(xGroup.is()); + // Without the accompanying fix in place, this test would have failed with 'Expected: 2; Actual: + // 1', i.e. the chart children of the group shape was lost. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xGroup->getCount()); + + uno::Reference<drawing::XShapeDescriptor> xShape(xGroup->getByIndex(1), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.OLE2Shape"), xShape->getShapeType()); +} + DECLARE_OOXMLIMPORT_TEST(testTdf113946, "tdf113946.docx") { OUString aTop = parseDump("/root/page/body/txt/anchored/SwAnchoredDrawObject/bounds", "top"); |