[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Sep 14 12:54:36 UTC 2018


 sc/source/core/data/table1.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 634d30ce48d89c23ef8cc07ed66c05dc00e19b49
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Sep 11 14:34:46 2018 +0200
Commit:     Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Fri Sep 14 14:54:10 2018 +0200

    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 at collabora.co.uk>
    (cherry picked from commit aaa3c31ba79b1b3d335dcf55d72837a13411b45e)
    Reviewed-on: https://gerrit.libreoffice.org/60369
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

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


More information about the Libreoffice-commits mailing list