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-14 03:27:21 +0100 |
commit | ab125155cf576e6ad1725947309cbe7eee9e8b0f (patch) | |
tree | d43cf9d105c79f3c0cff2ac75056820920cb72c4 /chart2 | |
parent | 70afe780231dc086a07494db97a2bac2ca0a0939 (diff) |
don't try to use Inf for axes calculation fdo#43703
Diffstat (limited to 'chart2')
-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) |