diff options
author | David Tardon <dtardon@redhat.com> | 2014-10-16 15:30:32 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-10-16 17:44:44 +0200 |
commit | 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e (patch) | |
tree | 80c42b34da7e7ee05843b572f7311b3c230de9dd /svx/source/dialog/pagectrl.cxx | |
parent | ada4862afc3227b04c12960ded761db24f61257e (diff) |
fdo#84854 it seems long is not enough on 32 bit
Fraction used BigInt internally for computations, rational does nothing
like that.
Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
Diffstat (limited to 'svx/source/dialog/pagectrl.cxx')
-rw-r--r-- | svx/source/dialog/pagectrl.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx index 998271eafb3d..1da00e992e20 100644 --- a/svx/source/dialog/pagectrl.cxx +++ b/svx/source/dialog/pagectrl.cxx @@ -102,8 +102,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxPageWindow(vcl::Win void SvxPageWindow::Paint(const Rectangle&) { - boost::rational<long> aXScale(aWinSize.Width(),std::max((long)(aSize.Width() * 2 + aSize.Width() / 8),1L)); - boost::rational<long> aYScale(aWinSize.Height(),std::max(aSize.Height(),1L)); + boost::rational<sal_Int64> aXScale(aWinSize.Width(),std::max((long)(aSize.Width() * 2 + aSize.Width() / 8),1L)); + boost::rational<sal_Int64> aYScale(aWinSize.Height(),std::max(aSize.Height(),1L)); MapMode aMapMode(GetMapMode()); if(aYScale < aXScale) @@ -126,9 +126,9 @@ void SvxPageWindow::Paint(const Rectangle&) if (aSize.Width() > aSize.Height()) { // Draw Landscape page of the same size - boost::rational<long> aX = aMapMode.GetScaleX(); - boost::rational<long> aY = aMapMode.GetScaleY(); - boost::rational<long> a2(3, 2); + boost::rational<sal_Int64> aX = aMapMode.GetScaleX(); + boost::rational<sal_Int64> aY = aMapMode.GetScaleY(); + boost::rational<sal_Int64> a2(3, 2); aX *= a2; aY *= a2; aMapMode.SetScaleX(aX); |