summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2015-05-06 23:29:38 +0200
committerLászló Németh <laszlo.nemeth@collabora.com>2015-05-07 00:21:40 +0200
commit8981041eb61ac703921784e1df9e9435c053d04f (patch)
tree5fee9e5740b02b9875830af0599c2755bd2f84b3
parent3f1cbf94cb3ef743295eb7dcc8ed97e6252828ec (diff)
tdf#91122 unit test for docx import with wrong vertical position
Change-Id: Id268393bf28a6edb4a481d7a74ae412b337b3fc8
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf91122.docxbin0 -> 14926 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx13
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
new file mode 100644
index 000000000000..688f8820cf25
--- /dev/null
+++ 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 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.