diff options
author | Szabolcs Toth <szabolcs450@gmail.com> | 2019-11-14 13:32:00 +0100 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2019-11-20 23:50:51 +0100 |
commit | 6aca6d4ba87fec450065b205eff09654ae420d01 (patch) | |
tree | d8a7def3d7e442434c3082912e63c497d2406799 /writerfilter | |
parent | e073f996c4ec2582b9560e2fac828c9a73358423 (diff) |
tdf#124399 DOCX import: don't apply inside borders to 1-cell tables
Extra cell borders appeared on the bottom, top, left or right
of the 1-cell tables when only the "inside borders" option was selected.
The extra borders were the ones that would normally have appeared as
inside borders if there were more than one cells in the table.
Change-Id: I05d5f2a5a0168989f220d20a95b6dacf5152f9f7
Reviewed-on: https://gerrit.libreoffice.org/82675
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit 8a59f18b6eb22c43ec10cdc29ba5a13d5feba4f0)
Reviewed-on: https://gerrit.libreoffice.org/83303
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index d80f4b36518d..10eb60471126 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -820,6 +820,13 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl TagLogger::getInstance().attribute("row", nRow); #endif + // Do not apply horizontal and vertical borders to a one cell table. + if (m_aCellProperties.size() <= 1) + { + rInfo.pTableBorders->Erase(META_PROP_HORIZONTAL_BORDER); + rInfo.pTableBorders->Erase(META_PROP_VERTICAL_BORDER); + } + lcl_computeCellBorders( rInfo.pTableBorders, *aCellIterator, nCell, nRow, bIsEndCol, bIsEndRow ); //now set the default left+right border distance TODO: there's an sprm containing the default distance! |