summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-07-07 10:36:12 +0300
committerJustin Luth <justin_luth@sil.org>2020-07-15 21:11:33 +0200
commit19ffc31ac047e9e8986591937ad945bc7dc2b875 (patch)
treefc333fc246ac512a1b842c21d3d5786996bd43fb /writerfilter
parentf013b5127e3048914d829cf918df2a43f133d108 (diff)
tdf129452 writerfilter: only affect vertical Merge_restart
If multiple merged cells are stacked on top of each other, then don't follow the whole stack down to the bottom as if it is one cell. In other words, merged-vertically is not true or false, but start or continuing. This stand-alone patch covers a corner case missed by this bug's earlier LO 6.4 commit. Change-Id: Ibaec6d609ff5b8a993be8dce0741fa2ca905da26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98242 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 901fdfc0c115..2046d36db613 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -907,7 +907,8 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
// tdf#129452 Checking if current cell is vertically merged with all the other cells below to the bottom.
// This must be done in order to apply the bottom border of the table to the first cell in a vertical merge.
- bool bMergedVertically = bool(m_aCellProperties[nRow][nCell]->getProperty(PROP_VERTICAL_MERGE));
+ std::optional<PropertyMap::Property> oProp = m_aCellProperties[nRow][nCell]->getProperty(PROP_VERTICAL_MERGE);
+ bool bMergedVertically = oProp && oProp->second.get<bool>(); // starting cell
if ( bMergedVertically )
{
const sal_uInt32 nColumn = m_rDMapper_Impl.getTableManager().findColumn(nRow, nCell);
@@ -916,7 +917,8 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
const sal_uInt32 nColumnCell = m_rDMapper_Impl.getTableManager().findColumnCell(i, nColumn);
if ( m_aCellProperties[i].size() > sal::static_int_cast<std::size_t>(nColumnCell) )
{
- bMergedVertically = bool(m_aCellProperties[i][nColumnCell]->getProperty(PROP_VERTICAL_MERGE));
+ oProp = m_aCellProperties[i][nColumnCell]->getProperty(PROP_VERTICAL_MERGE);
+ bMergedVertically = oProp && !oProp->second.get<bool>(); //continuing cell
}
else
bMergedVertically = false;