summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-09-22 18:34:46 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-09-23 13:16:56 +0200
commit7ccd8928acbb5a27d9b9f44b09b7575757981e8a (patch)
tree02a3dd807dd60e256e9c284c0c7ec47055de5bbe /svx
parent046af4edd35f4a802bc0b1e185125339544a683b (diff)
tdf#136949: Revert "tdf#115753 fix table border missing when there are merged cells"
This reverts commit 2b19cd84f10552c438dace0a4c52a70ccd440369. Change-Id: I5f3f51e0e816416c364155ab67bc37bb8c6fe545 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103187 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/table/viewcontactoftableobj.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index d2778e333383..fe6d03f1d900 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -254,6 +254,20 @@ namespace sdr::contact
aArray.SetCellStyleRight(aCellPos.mnCol, aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol + 1, aCellPos.mnRow, false, nColCount, nRowCount, bIsRTL));
aArray.SetCellStyleTop(aCellPos.mnCol, aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol, aCellPos.mnRow, true, nColCount, nRowCount, bIsRTL));
aArray.SetCellStyleBottom(aCellPos.mnCol, aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol, aCellPos.mnRow + 1, true, nColCount, nRowCount, bIsRTL));
+
+ // ignore merged cells (all except the top-left of a merged cell)
+ if(!xCurrentCell->isMerged())
+ {
+ // check if we are the top-left of a merged cell
+ const sal_Int32 nXSpan(xCurrentCell->getColumnSpan());
+ const sal_Int32 nYSpan(xCurrentCell->getRowSpan());
+
+ if(nXSpan > 1 || nYSpan > 1)
+ {
+ // if merged, set so at CellBorderArray for primitive creation
+ aArray.SetMergedRange(aCellPos.mnCol, aCellPos.mnRow, aCellPos.mnCol + nXSpan - 1, aCellPos.mnRow + nYSpan - 1);
+ }
+ }
}
if(xCurrentCell.is() && !xCurrentCell->isMerged())