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>
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 75a4061..8c52bd5 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2635,6 +2635,7 @@
{
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);