summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-06-23 16:28:04 +0200
committerMichael Meeks <michael.meeks@collabora.com>2020-06-30 10:15:05 +0100
commitf0df5960a8cc51f86554b98e30ffc33a5595cb38 (patch)
tree08c94ed1b49d18967e52408daeb7fae3172a7b49 /sc
parent2c7f77b58897aac891242359264f74f75a37b6f7 (diff)
tdf#133629 calc, crash on format borders on multiple sheets
regression from commit 7282014e362a1529a36c88eb308df8ed359c2cfa tdf#50916 Makes numbers of columns dynamic. Change-Id: Ie862ec4a29d495c71aa3a21a1941f801fa3a789e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96957 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 8cad16207cb6d6df098d2a2f307df4fbc7519035) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96994 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/table2.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 304e0a7368ac..d7c225ed2115 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2611,6 +2611,7 @@ void ScTable::ApplyBlockFrame(const SvxBoxItem& rLineOuter, const SvxBoxInfoItem
{
PutInOrder(nStartCol, nEndCol);
PutInOrder(nStartRow, nEndRow);
+ nEndCol = ClampToAllocatedColumns(nEndCol);
for (SCCOL i=nStartCol; i<=nEndCol; i++)
aCol[i].ApplyBlockFrame(rLineOuter, pLineInner,
nStartRow, nEndRow, (i==nStartCol), nEndCol-i);