diff options
author | László Németh <laszlo.nemeth@collabora.com> | 2015-05-06 23:29:38 +0200 |
---|---|---|
committer | László Németh <laszlo.nemeth@collabora.com> | 2015-05-07 00:21:40 +0200 |
commit | 8981041eb61ac703921784e1df9e9435c053d04f (patch) | |
tree | 5fee9e5740b02b9875830af0599c2755bd2f84b3 /sw | |
parent | 3f1cbf94cb3ef743295eb7dcc8ed97e6252828ec (diff) |
tdf#91122 unit test for docx import with wrong vertical position
Change-Id: Id268393bf28a6edb4a481d7a74ae412b337b3fc8
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf91122.docx | bin | 0 -> 14926 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf91122.docx b/sw/qa/extras/ooxmlimport/data/tdf91122.docx Binary files differnew file mode 100644 index 000000000000..688f8820cf25 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tdf91122.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 0a5aa3fadd1e..cdf5b1bf6b68 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -869,6 +869,19 @@ DECLARE_OOXMLIMPORT_TEST(testN779627b, "n779627b.docx") CPPUNIT_ASSERT_EQUAL_MESSAGE("Not centered vertically relatively to page", text::RelOrientation::PAGE_FRAME, nValue); } +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); +} + DECLARE_OOXMLIMPORT_TEST(testFdo74357, "fdo74357.docx") { // Floating table wasn't converted to a textframe. |