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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Sep 25 13:30:47 UTC 2018


 chart2/source/view/charttypes/VSeriesPlotter.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 07c710d86d99297061269a40a3b9f266b92e434a
Author:     Markus Mohrhard <markus.mohrhard at googlemail.com>
AuthorDate: Tue Sep 25 01:30:31 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Sep 25 15:30:27 2018 +0200

    tdf#119922, sanitize the point count when extrapolate is used
    
    Change-Id: Iec5e591f51ab13efa4b014b82df213e91eb5b793
    Reviewed-on: https://gerrit.libreoffice.org/60949
    Tested-by: Jenkins
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit e206a3b40083729fd57502f33e49fa30e54ac8e6)
    Reviewed-on: https://gerrit.libreoffice.org/60963
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index f9c3ad0e94c6..ea7d5555c8be 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1179,6 +1179,8 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries const & rVDataSer
             fMinX -= aExtrapolateBackward;
 
             fPointScale = (fMaxX - fMinX) / (fChartMaxX - fChartMinX);
+            // sanitize the value, tdf#119922
+            fPointScale = std::min(fPointScale, 1000.0);
         }
 
         xCalculator->setRegressionProperties(aDegree, bForceIntercept, aInterceptValue, aPeriod);


More information about the Libreoffice-commits mailing list