summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2024-10-02 14:48:08 +0200
committerGabor Kelemen <gabor.kelemen.extern@allotropia.de>2024-10-11 19:07:49 +0200
commit038473595ed266d15a788d8f97781cbaf066cfe7 (patch)
treebca5340060a5b233a27adf139a85323f6acb6856 /sw/qa
parent7a0a781da0a56bc38435e556c22f2e7ad4bd1a31 (diff)
tdf#152839 add fill cells to tables imported wrongly from RTF
In Word 'invisible' cells at the end of the row are usually marked with \trwWidthAN. If that information is missing the table needs to get addtional cells to smaller rows. This prevents extension of exisition cell to the full width of the table. Change-Id: I064f3da55665302d8198ed44d9f640a7707c34e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174385 Tested-by: Jenkins Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/rtfimport/data/tdf152839.rtf15
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx9
2 files changed, 24 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf152839.rtf b/sw/qa/extras/rtfimport/data/tdf152839.rtf
new file mode 100644
index 000000000000..e95f72af0b78
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf152839.rtf
@@ -0,0 +1,15 @@
+{\rtf1
+
+\trowd
+\clbrdrb\brdrs\brdrw100
+\cellx3000
+\pard\intbl A\cell\row
+
+\trowd
+
+\cellx3000
+\cellx6000
+\pard\intbl B\cell
+\pard\intbl C\cell
+\row
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 31bc5b6a39b8..4ff36a7f7988 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1933,6 +1933,15 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf163003)
getProperty<sal_Int32>(getShape(1), u"VertOrientPosition"_ustr));
}
+CPPUNIT_TEST_FIXTURE(Test, testTdf152839)
+{
+ createSwDoc("tdf152839.rtf");
+ 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);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable->getCellNames().getLength());
+}
// tests should only be added to rtfIMPORT *if* they fail round-tripping in rtfEXPORT
} // end of anonymous namespace
CPPUNIT_PLUGIN_IMPLEMENT();