From 6b1bd2699b0bdad6dc42db741dea0717cf7c1d36 Mon Sep 17 00:00:00 2001 From: Szabolcs Toth Date: Tue, 17 Dec 2019 16:06:30 +0100 Subject: tdf#129450 DOCX import: fix bottom border of 1-row tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: László Németh --- writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'writerfilter') diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index fc23c724dde2..77bf9e3f901a 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -832,6 +832,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 ); -- cgit v1.2.3