summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-11-24 15:51:06 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-11-24 23:07:11 +0100
commit6e0a512da826e2856e7d36200a878b64907816c8 (patch)
tree32bed109a5461ffd965e85f2320c3254d77970f4 /sw/qa
parent5461ed9828b48f947f99a034d7e3d8072157c58d (diff)
tdf#104418: sw_ooxmlexport10: Add unittest
Change-Id: I3e7b1913edbdcb14da4ceb962879b67f69fb2345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125777 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104418.odtbin0 -> 12437 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport10.cxx14
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104418.odt b/sw/qa/extras/ooxmlexport/data/tdf104418.odt
new file mode 100644
index 000000000000..12627ea2863e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104418.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 35f2ccaba137..985b378912f0 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -778,6 +778,20 @@ DECLARE_OOXMLEXPORT_TEST(testFdo80555, "fdo80555.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(247), xShape->getPosition().Y);
}
+DECLARE_OOXMLEXPORT_TEST(testTdf104418, "tdf104418.odt")
+{
+ // Problem was that <w:hideMark> cell property was ignored.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows = xTextTable->getRows();
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 750
+ // - Actual : 1499
+ CPPUNIT_ASSERT_EQUAL(sal_Int64(750) , getProperty<sal_Int64>(xTableRows->getByIndex(0), "Height"));
+}
+
DECLARE_OOXMLEXPORT_TEST(testHidemark, "hidemark.docx")
{
// Problem was that <w:hideMark> cell property was ignored.