summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-10-04 19:25:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-05 12:19:53 +0200
commit9bc004d6187da610e146527585c678b5cd9432ae (patch)
tree62fef209c97fdc307c15244c7330b7f97f4f1951
parent8ef25505303dcd744d20abf7e328ce1f0eda4dbf (diff)
Do not let end row creep above start row, tdf#69977 tdf#119305 follow-up
commit 3acc5a2383f5b0458e3caf1505fe6b8ad7dc3fb0 CommitDate: Tue Mar 27 13:26:30 2018 +0200 tdf#69977 improve creation of large charts changed the loop such that it removed the stop condition for rStartRow < rEndRow, and commit aaa3c31ba79b1b3d335dcf55d72837a13411b45e CommitDate: Tue Sep 11 20:29:04 2018 +0200 tdf#119305 Chart created from fully selected sheet only targets header row still checks only for a minimum of the original end row and the last data row, which for an empty (no data) range selected may be above the start row. Change-Id: I9de08d09be62e86e7c946df701c49314fa4d682e Reviewed-on: https://gerrit.libreoffice.org/61389 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 1371c2f4edab5086af6d0661de046252def29455) Reviewed-on: https://gerrit.libreoffice.org/61391 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/source/core/data/table1.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 4ae557f7d382..a4ff71ee3036 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1140,7 +1140,7 @@ void ScTable::LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol
SCROW lastDataPos = 0;
for (SCCOL i=rStartCol; i<=rEndCol; i++)
lastDataPos = std::max(lastDataPos, aCol[i].GetLastDataPos());
- rEndRow = std::min(rEndRow, lastDataPos);
+ rEndRow = std::max( rStartRow, std::min(rEndRow, lastDataPos));
}
SCCOL ScTable::FindNextVisibleCol( SCCOL nCol, bool bRight ) const