summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ww8export/data/tdf37153_considerWrapOnObjPos.docbin0 -> 15872 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export2.cxx18
2 files changed, 18 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf37153_considerWrapOnObjPos.doc b/sw/qa/extras/ww8export/data/tdf37153_considerWrapOnObjPos.doc
new file mode 100644
index 000000000000..08ba2f9d52cb
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf37153_considerWrapOnObjPos.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx
index 1aadcb17326f..f9e69f03cf90 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -18,6 +18,7 @@
#include <com/sun/star/text/XFootnote.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/text/WrapTextMode.hpp>
#include <ftninfo.hxx>
#include <pagedesc.hxx>
@@ -49,6 +50,23 @@ DECLARE_WW8EXPORT_TEST(testTdf41542_borderlessPadding, "tdf41542_borderlessPaddi
CPPUNIT_ASSERT_EQUAL( 3, getPages() );
}
+DECLARE_WW8EXPORT_TEST(testTdf37153, "tdf37153_considerWrapOnObjPos.doc")
+{
+ CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_THROUGH, getProperty<text::WrapTextMode>(getShape(1), "Surround"));
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(text::VertOrientation::BOTTOM, getProperty<sal_Int16>(xTable->getCellByName("A1"), "VertOrient"));
+
+ //For MSO compatibility, the image should be at the top of the cell, not at the bottom - despite VertOrientation::BOTTOM
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nFlyTop = getXPath(pXmlDoc, "/root/page/body/tab/row/cell[1]/txt/anchored/fly/infos/bounds", "top").toInt32();
+ CPPUNIT_ASSERT_MESSAGE("FlyTop should be 3820, not 6623", nFlyTop < 4000);
+ sal_Int32 nTextTop = getXPath(pXmlDoc, "/root/page/body/tab/row/cell[2]/txt[1]/infos/bounds", "top").toInt32();
+ CPPUNIT_ASSERT_MESSAGE("TextTop should be 5388", nTextTop > 4000);
+}
+
DECLARE_WW8EXPORT_TEST(testTdf49102_mergedCellNumbering, "tdf49102_mergedCellNumbering.doc")
{
CPPUNIT_ASSERT_EQUAL( OUString("2."), parseDump("/root/page/body/tab/row[4]/cell/txt/Special[@nType='POR_NUMBER']", "rText") );