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

New commits:
commit aaa3c31ba79b1b3d335dcf55d72837a13411b45e
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Sep 11 14:34:46 2018 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Sep 11 20:29:04 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.gran...@collabora.co.uk>

diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 4c5be3efcda9..8457035c784a 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1123,8 +1123,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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to