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 /sd/source/ui/view/viewshe2.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 'sd/source/ui/view/viewshe2.cxx')
-rw-r--r-- | sd/source/ui/view/viewshe2.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 3724d462142a..7408267060ca 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -332,7 +332,7 @@ void ViewShell::Scroll(long nScrollX, long nScrollY) */ void ViewShell::SetZoom(long nZoom) { - boost::rational<long> aUIScale(nZoom, 100); + boost::rational<sal_Int64> aUIScale(nZoom, 100); aUIScale *= GetDoc()->GetUIScale(); if (mpHorizontalRuler.get() != NULL) @@ -399,7 +399,7 @@ void ViewShell::ScrollCenter() void ViewShell::SetZoomRect(const Rectangle& rZoomRect) { long nZoom = GetActiveWindow()->SetZoomRect(rZoomRect); - boost::rational<long> aUIScale(nZoom, 100); + boost::rational<sal_Int64> aUIScale(nZoom, 100); aUIScale *= GetDoc()->GetUIScale(); Point aPos = GetActiveWindow()->GetWinViewPos(); @@ -651,7 +651,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize, /** * Set zoom factor for InPlace */ -void ViewShell::SetZoomFactor(const boost::rational<long>& rZoomX, const boost::rational<long>&) +void ViewShell::SetZoomFactor(const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>&) { long nZoom = (long)(boost::rational_cast<double>(rZoomX) * 100); SetZoom(nZoom); @@ -870,8 +870,8 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) if( pObj->IsChart() ) //charts never should be stretched see #i84323# for example aObjAreaSize = aDrawSize; - boost::rational<long> aScaleWidth (aDrawSize.Width(), aObjAreaSize.Width() ); - boost::rational<long> aScaleHeight(aDrawSize.Height(), aObjAreaSize.Height() ); + boost::rational<sal_Int64> aScaleWidth (aDrawSize.Width(), aObjAreaSize.Width() ); + boost::rational<sal_Int64> aScaleHeight(aDrawSize.Height(), aObjAreaSize.Height() ); rational_ReduceInaccurate(aScaleWidth, 10); // kompatibel zum SdrOle2Obj rational_ReduceInaccurate(aScaleHeight, 10); pSdClient->SetSizeScale(aScaleWidth, aScaleHeight); |