summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-09-12 18:21:44 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-09-14 14:03:08 +0200
commitccef162b4c2623029c4c205063099584f9497342 (patch)
tree07673b5fe6036f31c8822a2af0963823c873ec49
parentxmlsecurity: pdf incremental updates that are non-commenting are invalid (diff)
downloadcore-ccef162b4c2623029c4c205063099584f9497342.tar.gz
core-ccef162b4c2623029c4c205063099584f9497342.zip
tdf#133327 fix calc loading background color with many cols
regression from commit 7282014e362a1529a36c88eb308df8ed359c2cfa tdf#50916 Makes numbers of columns dynamic. Change-Id: Ic9e1b31d74b11367a5ad1a82480ffe9467c37ad8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102535 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 4176beb7ef831152ce92ac3fa31314438635ec2c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102635 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sc/source/core/data/table2.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 638c02953219..3d1a1aabad37 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2574,10 +2574,9 @@ void ScTable::MergeSelectionPattern( ScMergePatternState& rState, const ScMarkDa
for (const sc::ColRowSpan & rSpan : aSpans)
{
- SCCOL nEnd = ClampToAllocatedColumns(rSpan.mnEnd);
- for (SCCOLROW i = rSpan.mnStart; i <= nEnd; ++i)
+ for (SCCOLROW i = rSpan.mnStart; i <= rSpan.mnEnd; ++i)
{
- aCol[i].MergeSelectionPattern( rState, rMark, bDeep );
+ CreateColumnIfNotExists(i).MergeSelectionPattern( rState, rMark, bDeep );
}
}
}