diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-23 14:53:30 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-23 16:38:36 +0000 |
commit | d57f707bbd4ca19f5c1112383f533615a7c7e8a2 (patch) | |
tree | 83b972fc5d1fc0b9d8396be9f72a1648e37cdfd5 /vcl/source/gdi | |
parent | 13de958fc3455934ba74eab00e03f49518567df0 (diff) |
add svm cppunit test
and rely on new safe multiple check of
commit 4f0b226600fdad4e5aef9313fe8754c765cfee42
Author: Caolán McNamara <caolanm@redhat.com>
Date: Tue Mar 21 11:23:09 2017 +0000
check for overflow in multiply
rather than trying to detect them here in advance
Change-Id: I7fb9a9960e428cf00f745b6156a588e2c990c03f
Reviewed-on: https://gerrit.libreoffice.org/35595
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/svmconverter.cxx | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx index 89e42dd0f94c..ea4485828081 100644 --- a/vcl/source/gdi/svmconverter.cxx +++ b/vcl/source/gdi/svmconverter.cxx @@ -171,21 +171,7 @@ bool ImplReadMapMode(SvStream& rIStm, MapMode& rMapMode) return false; } - Fraction aX(nXNum, nXDenom); - if (!aX.IsValid() || rtl::math::round(aX, 6) == 0.0) - { - SAL_WARN("vcl.gdi", "Parsing error: invalid mapmode fraction"); - return false; - } - - Fraction aY(nYNum, nYDenom); - if (!aY.IsValid() || rtl::math::round(aY, 6) == 0.0) - { - SAL_WARN("vcl.gdi", "Parsing error: invalid mapmode fraction"); - return false; - } - - rMapMode = MapMode((MapUnit) nUnit, aOrg, aX, aY); + rMapMode = MapMode((MapUnit) nUnit, aOrg, Fraction(nXNum, nXDenom), Fraction(nYNum, nYDenom)); return true; } |