diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-30 09:14:47 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-30 08:40:30 +0000 |
commit | 1d1748d143ab4270a2ca1b5117852b1b1bb4c526 (patch) | |
tree | ed1939265de131d1338d2d26657459a0aa2825e6 /sw/qa | |
parent | 11cc9bdc21be241f2feb3ab4822d9d365dba4f96 (diff) |
Related: tdf#44986 DOCX import: handle w:gridAfter by faking cells
This is similar to the w:gridBefore handling code introduced in commit
cf33af732ed0d3d553bb74636e3b14c55d44c153 (handle w:gridBefore by faking
cells (fdo#38414), 2014-04-23), except that the fake cells here are
inserted after the real ones, not before.
Change-Id: I4c03bd49e52016a58e0e002ae85dede6a96e5f55
Reviewed-on: https://gerrit.libreoffice.org/28487
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf44986.docx | bin | 0 -> 14593 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf44986.docx b/sw/qa/extras/ooxmlexport/data/tdf44986.docx Binary files differnew file mode 100644 index 000000000000..7859ab4020b4 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf44986.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index cb20af147ff1..90cef9f800f8 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -17,6 +17,7 @@ #include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/XTextRangeCompare.hpp> #include <com/sun/star/text/WritingMode2.hpp> +#include <com/sun/star/text/TableColumnSeparator.hpp> #include <oox/drawingml/drawingmltypes.hxx> #include <config_features.h> #include <string> @@ -821,6 +822,15 @@ DECLARE_OOXMLEXPORT_TEST(testTDF99434, "protectedform.docx") CPPUNIT_ASSERT(bProt); } +DECLARE_OOXMLEXPORT_TEST(testTdf44986, "tdf44986.docx") +{ + // Check that the table at the second paragraph. + uno::Reference<text::XTextTable> xTable(getParagraphOrTable(2), uno::UNO_QUERY); + uno::Reference<table::XTableRows> xTableRows(xTable->getRows(), uno::UNO_QUERY); + // Check the first row of the table, it should have two cells (one separator). + // This was 0: the first row had no separators, so it had only one cell, which was too wide. + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators").getLength()); +} CPPUNIT_PLUGIN_IMPLEMENT(); |