[Libreoffice-commits] core.git: 2 commits - chart2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Sep 25 00:54:20 UTC 2018
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.mohrhard at googlemail.com>
AuthorDate: Tue Sep 25 01:30:31 2018 +0200
Commit: Markus Mohrhard <markus.mohrhard at 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.mohrhard at 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.mohrhard at googlemail.com>
AuthorDate: Tue Sep 25 01:05:14 2018 +0200
Commit: Markus Mohrhard <markus.mohrhard at 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.mohrhard at 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
{
More information about the Libreoffice-commits
mailing list