summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-11-08 09:11:33 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-11-08 09:51:42 +0000
commitc1eebcdac9f2b289fd363399130c485ca5ff444c (patch)
treea34d4cd3477e8699dd00df753fcab62152c2298e /sw
parentbbf6c5171706e55edcf8e011a536264f4f2efd99 (diff)
tdf#79329 DOCX import: fix missing outer table with floattable at cell start
The bug document has a normal table, then its C1 cell starts with a nested table, which is floating. The problem is that converting the nested table to a textframe invalidates the start text range of the C1 cell in the outer table we store, so the conversion of the outer table from text to table fails. This never worked, so to avoid the regression just don't convert inner floating tables to textframes when they're anchored at the cell start. A more general fix in the future can be addressing the actual invalidation of the cell start/end text ranges, and then this specific fix will not be necessary anymore. Change-Id: I12cefa41977cf719b07b0fb3ef9ec423c17ef3b1 Reviewed-on: https://gerrit.libreoffice.org/30685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf79329.docxbin0 -> 21212 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx8
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf79329.docx b/sw/qa/extras/ooxmlexport/data/tdf79329.docx
new file mode 100644
index 000000000000..142f29522dc9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf79329.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 48bd1186fc8f..a445ea2439fd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -110,6 +110,14 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103573, "tdf103573.docx")
CPPUNIT_ASSERT_EQUAL_MESSAGE("Not centered horizontally relatively to right page border", text::RelOrientation::PAGE_RIGHT, nValue);
}
+DECLARE_OOXMLEXPORT_TEST(testTdf79329, "tdf79329.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ // This was 1: only the inner, not the outer table was created.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xTables->getCount());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */