diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-09-25 01:30:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-25 15:30:27 +0200 |
commit | 07c710d86d99297061269a40a3b9f266b92e434a (patch) | |
tree | c6c2439f13f8148d72faebd97ca90636b5715f21 | |
parent | b20f09d765782b17aded592f30b41bba15fd8403 (diff) |
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@googlemail.com>
(cherry picked from commit e206a3b40083729fd57502f33e49fa30e54ac8e6)
Reviewed-on: https://gerrit.libreoffice.org/60963
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | chart2/source/view/charttypes/VSeriesPlotter.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
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); |