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 /sc/source/ui/view/tabvwsh4.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 'sc/source/ui/view/tabvwsh4.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwsh4.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index ee241c451ae3..2b5e3ba25c44 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -333,8 +333,8 @@ void ScTabViewShell::UpdateOleZoom() { vcl::Window* pWin = GetActiveWin(); Size aWinHMM = pWin->PixelToLogic( pWin->GetOutputSizePixel(), MAP_100TH_MM ); - SetZoomFactor( boost::rational<long>( aWinHMM.Width(),aObjSize.Width() ), - boost::rational<long>( aWinHMM.Height(),aObjSize.Height() ) ); + SetZoomFactor( boost::rational<sal_Int64>( aWinHMM.Width(),aObjSize.Width() ), + boost::rational<sal_Int64>( aWinHMM.Height(),aObjSize.Height() ) ); } } } @@ -362,8 +362,8 @@ void ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize ) if ( aObjSize.Width() > 0 && aObjSize.Height() > 0 ) { Size aLogicSize = GetWindow()->PixelToLogic( aSize, MAP_100TH_MM ); - SfxViewShell::SetZoomFactor( boost::rational<long>( aLogicSize.Width(),aObjSize.Width() ), - boost::rational<long>( aLogicSize.Height(),aObjSize.Height() ) ); + SfxViewShell::SetZoomFactor( boost::rational<sal_Int64>( aLogicSize.Width(),aObjSize.Width() ), + boost::rational<sal_Int64>( aLogicSize.Height(),aObjSize.Height() ) ); } Point aPos( rOfs ); @@ -401,19 +401,19 @@ void ScTabViewShell::OuterResizePixel( const Point &rOfs, const Size &rSize ) ForceMove(); } -void ScTabViewShell::SetZoomFactor( const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY ) +void ScTabViewShell::SetZoomFactor( const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY ) { // fuer OLE... - boost::rational<long> aFrac20( 1,5 ); - boost::rational<long> aFrac400( 4,1 ); + boost::rational<sal_Int64> aFrac20( 1,5 ); + boost::rational<sal_Int64> aFrac400( 4,1 ); - boost::rational<long> aNewX( rZoomX ); + boost::rational<sal_Int64> aNewX( rZoomX ); if ( aNewX < aFrac20 ) aNewX = aFrac20; if ( aNewX > aFrac400 ) aNewX = aFrac400; - boost::rational<long> aNewY( rZoomY ); + boost::rational<sal_Int64> aNewY( rZoomY ); if ( aNewY < aFrac20 ) aNewY = aFrac20; if ( aNewY > aFrac400 ) @@ -1727,7 +1727,7 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame, } else { - boost::rational<long> aFract( rAppOpt.GetZoom(), 100 ); + boost::rational<sal_Int64> aFract( rAppOpt.GetZoom(), 100 ); SetZoom( aFract, aFract, true ); SetZoomType( rAppOpt.GetZoomType(), true ); } |