summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-05-26 12:04:39 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-05-26 12:20:47 +0200
commit3755c87d0426a499d4755e82d8fbc77caa240764 (patch)
treebcc6e63f323a7f20a999723ad298eee025ee0454 /sw/qa
parent09c0a96eb3ea8d48e99ed50ae7d13d23f70a0c6c (diff)
bnc#863018 WW8 import: fix upper margin of multi-page floating table
A vert orient position was already handled in case a floating table was imported as a TextFrame, but in case we didn't do that, the vert orient position was simply lost. Fix this by importing it as the upper margin of the table (assuming that the position is relative from the anchor position). Change-Id: I3e96f3068605fd6313dfb3e55483e1bce6c063a5
Diffstat (limited to 'sw/qa')
-rwxr-xr-xsw/qa/extras/ww8import/data/bnc863018.docbin0 -> 26624 bytes
-rw-r--r--sw/qa/extras/ww8import/ww8import.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8import/data/bnc863018.doc b/sw/qa/extras/ww8import/data/bnc863018.doc
new file mode 100755
index 000000000000..ab7511b57e0a
--- /dev/null
+++ b/sw/qa/extras/ww8import/data/bnc863018.doc
Binary files differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 5ec8f9f6d6b3..8ef83c1dfb28 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -396,6 +396,17 @@ DECLARE_WW8IMPORT_TEST(testMsoBrightnessContrast, "msobrightnesscontrast.doc")
CPPUNIT_ASSERT_EQUAL( -50, int(data[0x6b4]));
}
+DECLARE_WW8IMPORT_TEST(testBnc863018, "bnc863018.doc")
+{
+ // The problem was that there should be some whitespace above the table,
+ // but there wasn't.
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ // This was 0.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5002), getProperty<sal_Int32>(xTable, "TopMargin"));
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();