[Libreoffice-commits] .: Branch 'libreoffice-3-5' - chart2/source
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Mon Dec 12 15:18:33 PST 2011
chart2/source/view/axes/ScaleAutomatism.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 8216e8551dad8a3bbedb4b8e663b2d96570270a0
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Dec 12 23:51:48 2011 +0100
don't try to use Inf for axes calculation fdo#43703
diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx
index 2ac44fc..ba10366 100644
--- a/chart2/source/view/axes/ScaleAutomatism.cxx
+++ b/chart2/source/view/axes/ScaleAutomatism.cxx
@@ -909,6 +909,12 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForLinear(
fDistanceNormalized = 1.0;
fDistanceMagnitude = 1.0e-307;
}
+ else if ( !rtl::math::isFinite(fDistance) )
+ {
+ // fdo#43703: Handle values bigger than limits correctly
+ fDistanceNormalized = 1.0;
+ fDistanceMagnitude = std::numeric_limits<double>::max();
+ }
else
{
// distance magnitude (a power of 10)
More information about the Libreoffice-commits
mailing list