summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorSzabolcs Toth <szabolcs450@gmail.com>2020-02-20 10:54:19 +0100
committerLászló Németh <nemeth@numbertext.org>2020-02-21 10:40:41 +0100
commit111db716c23f9f8450eda58c13dd2423770fd15e (patch)
treeac3f53d028bef258c25ddc50aac3f355bec9b72a /writerfilter
parent9e0470da4a88a588a294856236d6adf1eefe22f6 (diff)
tdf#130799 DOCX import: fix missing inside vertical borders
caused by incomplete handling of tables with 1-column rows with merged cells. Have to check the rows below current to see if they contain also one cell, therefore form a column, or more than one cell, in which case do not remove vertical borders. Regression from commit: 8a2eb40abbd52d960dd21308157186be0ca9dd3d (tdf#129442 DOCX import: fix right border of 1-column tables). Change-Id: If9ca7ccd42255e78c61b6271e19262ab5cc8e439 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89081 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 25e9cd2ba261..bf5b638fafb5 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -889,7 +889,17 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
// Do not apply vertical borders to a one column table.
else if (m_aCellProperties.size() > 1 && aRowOfCellsIterator->size() <= 1)
{
- rInfo.pTableBorders->Erase(META_PROP_VERTICAL_BORDER);
+ bool isOneCol = true;
+ for (size_t i = nRow; i < m_aCellProperties.size(); i++)
+ {
+ if (m_aCellProperties[i].size() > 1)
+ {
+ isOneCol = false;
+ break;
+ }
+ }
+ if (isOneCol)
+ 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)