diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-11 14:34:46 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-09-14 14:54:10 +0200 |
commit | 634d30ce48d89c23ef8cc07ed66c05dc00e19b49 (patch) | |
tree | ab173436221c347045d883c7e9df0bafedaabfcf | |
parent | 815ff47bbd82c06bb7436a89e6ecf11fd59b8d76 (diff) |
tdf#119305 Chart created from fully selected sheet only targets header row
regression from
commit 3acc5a2383f5b0458e3caf1505fe6b8ad7dc3fb0
tdf#69977 improve creation of large charts
Change-Id: I09d02447b0e4691e98a44222608a3dc5edc95b0b
Reviewed-on: https://gerrit.libreoffice.org/60318
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit aaa3c31ba79b1b3d335dcf55d72837a13411b45e)
Reviewed-on: https://gerrit.libreoffice.org/60369
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | sc/source/core/data/table1.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 43d2a4a5c6b5..4ae557f7d382 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -1137,8 +1137,10 @@ void ScTable::LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol // Optimised loop for finding the bottom of the area, can be costly in large // spreadsheets. + SCROW lastDataPos = 0; for (SCCOL i=rStartCol; i<=rEndCol; i++) - rEndRow = std::min(rEndRow, aCol[i].GetLastDataPos()); + lastDataPos = std::max(lastDataPos, aCol[i].GetLastDataPos()); + rEndRow = std::min(rEndRow, lastDataPos); } SCCOL ScTable::FindNextVisibleCol( SCCOL nCol, bool bRight ) const |