summaryrefslogtreecommitdiff
path: root/sc/source/core/data/column3.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-03-05 15:25:19 +0100
committerLuboš Luňák <l.lunak@collabora.com>2022-03-05 17:25:00 +0100
commitbe99b23809687ca1143c8fe8d4ec3cfe6703c363 (patch)
treec93f6c56599cb56e332bd8b13177925bd7738ad1 /sc/source/core/data/column3.cxx
parenteed83764088bfdfcc6513778f7dc83d649f550a3 (diff)
don't bother scanning nonexistent data (tdf#141182)
There's no point scanning for non-empty cells after the last data cell, and this avoids processing mdds structures (such as repeated creating of flat_segment_tree). Change-Id: Ibec324aa2de457e8439c38a561f55ced9f478899 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131059 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/source/core/data/column3.cxx')
-rw-r--r--sc/source/core/data/column3.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 618e56e46626..31903287cd48 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -92,6 +92,8 @@ void ScColumn::BroadcastCells( const std::vector<SCROW>& rRows, SfxHintId nHint
void ScColumn::BroadcastRows( SCROW nStartRow, SCROW nEndRow, SfxHintId nHint )
{
+ if( nStartRow > GetLastDataPos())
+ return;
sc::SingleColumnSpanSet aSpanSet(GetDoc().GetSheetLimits());
aSpanSet.scan(*this, nStartRow, nEndRow);
std::vector<SCROW> aRows;