summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-12-12 23:51:48 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-12-13 00:18:34 +0100
commit8216e8551dad8a3bbedb4b8e663b2d96570270a0 (patch)
tree6eb4272f0ac38ae6f4cf3186f50b0d96e83e17c6 /chart2
parentd8be0409037279154d6ae619e04f97e45018326d (diff)
don't try to use Inf for axes calculation fdo#43703
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/axes/ScaleAutomatism.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx
index 2ac44fc13bb2..ba10366aa5c9 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)