summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-08-30 09:14:47 +0200
committerjan iversen <jani@documentfoundation.org>2016-09-06 19:46:10 +0000
commit0ba2229a57527e78f237119efa413f122c9ca74b (patch)
treefafa1a05713caf4abf7656ba92d8350f9ca81b8b /sw/qa/extras
parent4b62ad397c1ed137cbe69aa0882d290a92052e9a (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> (cherry picked from commit 1d1748d143ab4270a2ca1b5117852b1b1bb4c526) Reviewed-on: https://gerrit.libreoffice.org/28624 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf44986.docxbin0 -> 14593 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx10
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
new file mode 100644
index 000000000000..7859ab4020b4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf44986.docx
Binary files differ
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();