summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-03-12 11:42:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-03-13 07:54:53 -0500
commite6e828a72b97bb639e160d52bbe2a095d03b892b (patch)
tree1d957006d87897f3637e98edc90441aaf3e74202 /sw/qa
parentfea99d32aec1c24b7cbc7a4063b21a471072509b (diff)
bnc#865381 DOCX import: table cell btLr text direction fixes
(cherry picked from commit 48b5b7641d0df960558082e8948da8598f801264) (cherry picked from commit 970160f78ef6cc7abacfa252daa8451e1f0117bb) Change-Id: I527955671e1100f05da717bffe002131baaf0291 Reviewed-on: https://gerrit.libreoffice.org/8553 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/qa')
-rwxr-xr-xsw/qa/extras/ooxmlimport/data/bnc865381.docxbin0 -> 19510 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx12
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/bnc865381.docx b/sw/qa/extras/ooxmlimport/data/bnc865381.docx
new file mode 100755
index 000000000000..bb125cc73095
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/bnc865381.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 1a2ee5f933a0..ab7404f452ab 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1059,6 +1059,18 @@ DECLARE_OOXMLIMPORT_TEST(testTbLrHeight, "tblr-height.docx")
CPPUNIT_ASSERT_EQUAL(text::SizeType::FIX, getProperty<sal_Int16>(xTableRows->getByIndex(0), "SizeType"));
}
+DECLARE_OOXMLIMPORT_TEST(testBnc865381, "bnc865381.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows(xTextTable->getRows(), uno::UNO_QUERY);
+ // Second row has a vertically merged cell, make sure size type is not FIX in that case (otherwise B2 is not readable).
+ CPPUNIT_ASSERT(text::SizeType::FIX != getProperty<sal_Int16>(xTableRows->getByIndex(1), "SizeType"));
+ // Explicit size of 41 mm100 was set, so the vertical text in A2 was not readable.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTableRows->getByIndex(1), "Height"));
+}
+
DECLARE_OOXMLIMPORT_TEST(testFdo53985, "fdo53985.docx")
{
// Unhandled excetion prevented import of the rest of the document.