summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-07-02 17:33:03 +0200
committerAndras Timar <andras.timar@collabora.com>2014-07-06 08:22:33 +0000
commitc3d745207dcf023b96edf1426048c8ff96189470 (patch)
tree1ae9abf897273fba15db4f93d42fd2bc302626c4 /sw
parent2c163f8261fc7e66b83089db0a9db58246fc1f6d (diff)
bnc#865381 DOCX import: handle w:jc=center inside w:textDirection=btLr
Change-Id: I102c70429457515b34e74cb8e82e1417e6276d1d (cherry picked from commit 3325e0f206ce864730468c3556ce06760042c157) Reviewed-on: https://gerrit.libreoffice.org/10049 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/table-btlr-center.docxbin0 -> 10686 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx9
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/table-btlr-center.docx b/sw/qa/extras/ooxmlimport/data/table-btlr-center.docx
new file mode 100644
index 000000000000..79cb53eed06d
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/table-btlr-center.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 88acef8197bc..26e0e36d0f12 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1703,6 +1703,15 @@ DECLARE_OOXMLIMPORT_TEST(testFootnote, "footnote.docx")
CPPUNIT_ASSERT(aFootnote.endsWith("bar"));
}
+DECLARE_OOXMLIMPORT_TEST(testTableBtlrCenter, "table-btlr-center.docx")
+{
+ 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);
+ // Cell vertical alignment was NONE, should be CENTER.
+ CPPUNIT_ASSERT_EQUAL(text::VertOrientation::CENTER, getProperty<sal_Int16>(xTable->getCellByName("A2"), "VertOrient"));
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();