summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2015-05-26 16:30:12 +0200
committerLászló Németh <laszlo.nemeth@collabora.com>2015-05-26 16:38:02 +0200
commit85fae98f01250a6e9d75e841e0de410f8ea8a333 (patch)
tree6c9d83bc029b69d8d3716abd4617ebdd08fd160c
parentd6d8b6f01e5aaaa6be4bafa9c08a0ddb9a88803c (diff)
unit test for DOCX import fix of vertical pos. of inline images
(regression of commit ab81e3bff2a1844be67209bc8947d539edbaf8e6) Change-Id: I329e68e7ecb9fd30de238f31c73f8de04efde9da
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf91122.docxbin14926 -> 16946 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx15
2 files changed, 9 insertions, 6 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf91122.docx b/sw/qa/extras/ooxmlimport/data/tdf91122.docx
index 688f8820cf25..c7a45e4dd99a 100644
--- a/sw/qa/extras/ooxmlimport/data/tdf91122.docx
+++ b/sw/qa/extras/ooxmlimport/data/tdf91122.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 66b844005f03..89924e4e2535 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -874,12 +874,15 @@ DECLARE_OOXMLIMPORT_TEST(testTDF91122, "tdf91122.docx")
/*
* OLE object shape: default vertical position is top in MSO, not bottom
*/
- uno::Reference<beans::XPropertySet> xShapeProperties( getShape(1), uno::UNO_QUERY );
- uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xShapeProperties, uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("FrameShape"), xShapeDescriptor->getShapeType());
- sal_Int16 nValue;
- xShapeProperties->getPropertyValue("VertOrient") >>= nValue;
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation", text::VertOrientation::TOP, nValue);
+ for (int i = 1; i <= 2; ++i)
+ {
+ uno::Reference<beans::XPropertySet> xShapeProperties( getShape(i), uno::UNO_QUERY );
+ uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xShapeProperties, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("FrameShape"), xShapeDescriptor->getShapeType());
+ sal_Int16 nValue;
+ xShapeProperties->getPropertyValue("VertOrient") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation", text::VertOrientation::TOP, nValue);
+ }
}
DECLARE_OOXMLIMPORT_TEST(testTDF91260, "tdf91260.docx")