diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-10-06 20:19:28 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-10-07 12:19:25 +0200 |
commit | b6a5e84cd3f22a223d67fe88595006a33c291c48 (patch) | |
tree | ef600ebe31d678931c2e41d8779360275c86c6d9 /sw/qa | |
parent | c476335c4d3e1b9c90485e4e13fa3e2e85535143 (diff) |
tdf#157643: Drop extra cellless rows, a "substitute" for bold borders
Change-Id: Ic98bec72ed14623c880fad3b881d72ee13395a0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157670
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/htmlexport/data/table_with_wide_horizontal_border.fodt | 27 | ||||
-rw-r--r-- | sw/qa/extras/htmlexport/htmlexport.cxx | 11 |
2 files changed, 38 insertions, 0 deletions
diff --git a/sw/qa/extras/htmlexport/data/table_with_wide_horizontal_border.fodt b/sw/qa/extras/htmlexport/data/table_with_wide_horizontal_border.fodt new file mode 100644 index 000000000000..a3c53a070784 --- /dev/null +++ b/sw/qa/extras/htmlexport/data/table_with_wide_horizontal_border.fodt @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + <office:automatic-styles> + <style:style style:name="Table1.A1" style:family="table-cell"> + <style:table-cell-properties fo:border-bottom="1.5pt solid"/> + </style:style> + </office:automatic-styles> + <office:body> + <office:text> + <table:table> + <table:table-column/> + <table:table-row> + <table:table-cell table:style-name="Table1.A1" office:value-type="string"> + <text:p>A1</text:p> + </table:table-cell> + </table:table-row> + <table:table-row> + <table:table-cell office:value-type="string"> + <text:p>A2</text:p> + </table:table-cell> + </table:table-row> + </table:table> + <text:p/> + </office:text> + </office:body> +</office:document>
\ No newline at end of file diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index dbdf472ceff9..6810baa1efe3 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -2751,6 +2751,17 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testTdf156647_CellPaddingRoundtrip) } } +CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testTdf157643_WideHBorder) +{ + // Given a document with a table with a wide border between its two rows: + createSwDoc("table_with_wide_horizontal_border.fodt"); + // When exporting to reqif-xhtml: + ExportToReqif(); + // Make sure that there's no extra tr's: + xmlDocUniquePtr pXmlDoc = WrapReqifFromTempFile(); + assertXPath(pXmlDoc, "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:table/reqif-xhtml:tr", 2); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |