diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-12-12 23:51:48 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-12-13 00:18:34 +0100 |
commit | 8216e8551dad8a3bbedb4b8e663b2d96570270a0 (patch) | |
tree | 6eb4272f0ac38ae6f4cf3186f50b0d96e83e17c6 | |
parent | d8be0409037279154d6ae619e04f97e45018326d (diff) |
don't try to use Inf for axes calculation fdo#43703
-rw-r--r-- | chart2/source/view/axes/ScaleAutomatism.cxx | 6 |
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) |