summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-07-22 09:24:06 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-08-17 12:30:53 +0000
commit41086e24ecf5a43646aae0c5d5a66b3e3f483195 (patch)
tree7adeff6386cd81246b1d16d58a746982edfc52cd /sw/qa/extras
parent60c6bf6e60f788ebfb7305fda97e856b67fd2e29 (diff)
tdf#86374 DOCX import: fix btLr text table direction without <w:cantSplit/>
Commit 0208ead70a9412ccd554fcef3e9308f8ca17037b (DOCX import: improve btLr table cell support, 2013-02-22) made any table row that has at least one btLr cell fixed height. This causes problems in case a table has a minimal height with lots of content, where the fixed height gives wrong layout, but the minimal height is correct. Fix the problem by only making the row fixed height if <w:cantSplit/> is set (as seen in the old bugdoc), and revert to setting the height type to minimal in any other case. (cherry picked from commit 233a634a112e6dae07dca5fb1296764cb0001503) Conflicts: writerfilter/source/dmapper/TableManager.hxx Change-Id: Ibaf91f542e64e5caa7904df97eb6eb52618e0023 Reviewed-on: https://gerrit.libreoffice.org/17392 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf86374.docxbin0 -> 13194 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf86374.docx b/sw/qa/extras/ooxmlimport/data/tdf86374.docx
new file mode 100644
index 000000000000..7fd772d79b3f
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf86374.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index ced25acf9bbf..c1ef511a73ff 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2623,6 +2623,16 @@ DECLARE_OOXMLIMPORT_TEST(testTdf89702, "tdf89702.docx")
CPPUNIT_ASSERT_EQUAL(OUString("Arial"), getProperty<OUString>(xStyle, "CharFontName"));
}
+DECLARE_OOXMLIMPORT_TEST(testTdf86374, "tdf86374.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows(xTable->getRows(), uno::UNO_QUERY);
+ // btLr text direction was imported as FIX, it should be MIN to have enough space for the additionally entered paragraphs.
+ CPPUNIT_ASSERT_EQUAL(text::SizeType::MIN, getProperty<sal_Int16>(xTableRows->getByIndex(0), "SizeType"));
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();