summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-27 11:02:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-27 13:26:30 +0200
commit3acc5a2383f5b0458e3caf1505fe6b8ad7dc3fb0 (patch)
tree789b5622e9775eddcfb1cc4a1f683fd162779aca /sc/source/core
parentc49b42fcc8687fafdbb9db41a58ff4f8208d0896 (diff)
tdf#69977 improve creation of large charts
this patch only tweaks a few things around the edges. The bulk of the cost is down in the chart2 module where it creates ticks and labels. Change-Id: If73a16d2f0a7511f07eff379a9b5c1b38ef96786 Reviewed-on: https://gerrit.libreoffice.org/51931 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/table1.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 5a0d97d83b60..3cb2301f2cc1 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1133,8 +1133,10 @@ void ScTable::LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol
while ( rStartRow<rEndRow && IsEmptyLine(rStartRow, rStartCol, rEndCol) )
++rStartRow;
- while ( rStartRow<rEndRow && IsEmptyLine(rEndRow, rStartCol, rEndCol) )
- --rEndRow;
+ // Optimised loop for finding the bottom of the area, can be costly in large
+ // spreadsheets.
+ for (SCCOL i=rStartCol; i<=rEndCol; i++)
+ rEndRow = std::min(rEndRow, aCol[i].GetLastDataPos());
}
SCCOL ScTable::FindNextVisibleCol( SCCOL nCol, bool bRight ) const