summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-12-06 11:23:17 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-12-06 15:07:29 +0100
commitc2c7e4d8d99483f74a7aa357de89240eb83c99d3 (patch)
treea34d5d8cc1eb13a8fbfcf029a1141dde20a591dc /sw
parent131f3230d98f24faf57d9404e333cb1fb183345b (diff)
DOCX import: handle groupshapes inside wpg elements (groupshapes)
Change-Id: Icb44f91219f75103f469f38f96d843b8e8251e92
Diffstat (limited to 'sw')
-rwxr-xr-xsw/qa/extras/ooxmlimport/data/wpg-nested.docxbin0 -> 34068 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx8
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/wpg-nested.docx b/sw/qa/extras/ooxmlimport/data/wpg-nested.docx
new file mode 100755
index 000000000000..eba2aad0e76c
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/wpg-nested.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 2b271a32a375..24ffb76f5f49 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1555,6 +1555,14 @@ DECLARE_OOXMLIMPORT_TEST(testWpgOnly, "wpg-only.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(EMU_TO_MM100(548005)), xShape->getPosition().X);
}
+DECLARE_OOXMLIMPORT_TEST(testWpgNested, "wpg-nested.docx")
+{
+ uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xGroup->getByIndex(0), uno::UNO_QUERY);
+ // This was a com.sun.star.drawing.CustomShape, due to lack of handling of groupshapes inside groupshapes.
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.GroupShape"), xShapeDescriptor->getShapeType());
+}
+
DECLARE_OOXMLIMPORT_TEST(textboxWpgOnly, "textbox-wpg-only.docx")
{
uno::Reference<drawing::XShape> xShape = getShape(1);