[Libreoffice-commits] core.git: sw/qa
László Németh
laszlo.nemeth at collabora.com
Tue May 26 07:40:03 PDT 2015
sw/qa/extras/ooxmlimport/data/tdf91122.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 15 +++++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
New commits:
commit 85fae98f01250a6e9d75e841e0de410f8ea8a333
Author: László Németh <laszlo.nemeth at collabora.com>
Date: Tue May 26 16:30:12 2015 +0200
unit test for DOCX import fix of vertical pos. of inline images
(regression of commit ab81e3bff2a1844be67209bc8947d539edbaf8e6)
Change-Id: I329e68e7ecb9fd30de238f31c73f8de04efde9da
diff --git a/sw/qa/extras/ooxmlimport/data/tdf91122.docx b/sw/qa/extras/ooxmlimport/data/tdf91122.docx
index 688f882..c7a45e4 100644
Binary files a/sw/qa/extras/ooxmlimport/data/tdf91122.docx and b/sw/qa/extras/ooxmlimport/data/tdf91122.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 66b8440..89924e4 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")
More information about the Libreoffice-commits
mailing list