chart2/source/view/axes/Tickmarks_Equidistant.hxx | 4 ++++ chart2/source/view/charttypes/VSeriesPlotter.cxx | 2 ++ 2 files changed, 6 insertions(+)
New commits: commit e206a3b40083729fd57502f33e49fa30e54ac8e6 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> AuthorDate: Tue Sep 25 01:30:31 2018 +0200 Commit: Markus Mohrhard <markus.mohrh...@googlemail.com> CommitDate: Tue Sep 25 02:54:12 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.mohrh...@googlemail.com> diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 8eab6c1694b1..d978310f4986 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1183,6 +1183,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); commit 217cb86dd06f0c539d6181d9b7fd0d71c4edd628 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> AuthorDate: Tue Sep 25 01:05:14 2018 +0200 Commit: Markus Mohrhard <markus.mohrh...@googlemail.com> CommitDate: Tue Sep 25 02:53:58 2018 +0200 tdf#120015, don't crash without major tick marks Change-Id: Icac79eb1c0c47388f96d37d2921c81fb6c848607 Reviewed-on: https://gerrit.libreoffice.org/60948 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/chart2/source/view/axes/Tickmarks_Equidistant.hxx b/chart2/source/view/axes/Tickmarks_Equidistant.hxx index 72897c048311..4c89d4b44251 100644 --- a/chart2/source/view/axes/Tickmarks_Equidistant.hxx +++ b/chart2/source/view/axes/Tickmarks_Equidistant.hxx @@ -57,7 +57,11 @@ private: //methods if(m_pSimpleTicks) return (*m_pSimpleTicks)[nDepth][nIndex]; else + { + if ((*m_pInfoTicks)[nDepth].size() <= size_t(nIndex)) + return std::numeric_limits<double>::max(); return (((*m_pInfoTicks)[nDepth])[nIndex]).fScaledTickValue; + } } sal_Int32 getTickCount( sal_Int32 nDepth ) const { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits