[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/qa writerfilter/source
Szabolcs Toth (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 8 13:44:54 UTC 2020
sw/qa/extras/ooxmlexport/data/tdf129450_BottomBorder.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport3.cxx | 12 ++++++++++++
writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 5 +++++
3 files changed, 17 insertions(+)
New commits:
commit e4b8fc7563087e82a659f6b697a986b53e51876c
Author: Szabolcs Toth <szabolcs450 at gmail.com>
AuthorDate: Tue Dec 17 16:06:30 2019 +0100
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Jan 8 14:43:54 2020 +0100
tdf#129450 DOCX import: fix bottom border of 1-row tables
Bottom border was missing in a 1-row table with disabled
inside borders. This happened because LO applied the empty
horizontal borders to the bottom border of the table.
Change-Id: I40140bf63297189edad13088f98fc5f869969c2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85303
Reviewed-by: László Németh <nemeth at numbertext.org>
Tested-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit 6b1bd2699b0bdad6dc42db741dea0717cf7c1d36)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86397
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129450_BottomBorder.docx b/sw/qa/extras/ooxmlexport/data/tdf129450_BottomBorder.docx
new file mode 100644
index 000000000000..df00bfe04421
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf129450_BottomBorder.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 8e7a7149292e..4511509e69cd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -1036,6 +1036,18 @@ DECLARE_OOXMLEXPORT_TEST(testRightBorder, "tdf129442_RightBorder.docx")
assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:tcPr/w:tcBorders/w:end [@w:val = 'nil']", 0);
}
+DECLARE_OOXMLEXPORT_TEST(testBottomBorder, "tdf129450_BottomBorder.docx")
+{
+ // tdf#129450: Missing bottom border in one row table.
+
+ xmlDocPtr pXmlDocument = parseExport("word/document.xml");
+ if (!pXmlDocument)
+ return;
+
+ // If there is no bottom border, it is shown in tcBorders.
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:tcPr/w:tcBorders/w:bottom [@w:val = 'nil']", 0);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 21472dc0eddf..b3bd18de4931 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -835,6 +835,11 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
{
rInfo.pTableBorders->Erase(META_PROP_VERTICAL_BORDER);
}
+ // Do not apply horizontal borders to a one row table.
+ else if (m_aCellProperties.size() == 1 && aRowOfCellsIterator->size() > 1)
+ {
+ rInfo.pTableBorders->Erase(META_PROP_HORIZONTAL_BORDER);
+ }
lcl_computeCellBorders( rInfo.pTableBorders, *aCellIterator, nCell, nRow, bIsEndCol, bIsEndRow );
More information about the Libreoffice-commits
mailing list