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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/doc/objembed.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/view/ipclient.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm2.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 4 |
4 files changed, 16 insertions, 16 deletions
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx index d491b702f9d4..9f6f9c175995 100644 --- a/sfx2/source/doc/objembed.cxx +++ b/sfx2/source/doc/objembed.cxx @@ -180,8 +180,8 @@ void SfxObjectShell::DoDraw( OutputDevice* pDev, aSize = pDev->LogicToLogic( aSize, &aWilliMode, &aMod ); if( aSize.Width() && aSize.Height() ) { - boost::rational<long> aXF( rSize.Width(), aSize.Width() ); - boost::rational<long> aYF( rSize.Height(), aSize.Height() ); + boost::rational<sal_Int64> aXF( rSize.Width(), aSize.Width() ); + boost::rational<sal_Int64> aYF( rSize.Height(), aSize.Height() ); DoDraw_Impl( pDev, rObjPos, aXF, aYF, rSetup, nAspect ); } @@ -190,8 +190,8 @@ void SfxObjectShell::DoDraw( OutputDevice* pDev, void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev, const Point & rViewPos, - const boost::rational<long>& rScaleX, - const boost::rational<long>& rScaleY, + const boost::rational<sal_Int64>& rScaleX, + const boost::rational<sal_Int64>& rScaleY, const JobSetup & rSetup, sal_uInt16 nAspect ) { diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index ea49352d9f11..1c6cd4b06ce4 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -99,8 +99,8 @@ class SfxInPlaceClient_Impl : public ::cppu::WeakImplHelper5< embed::XEmbeddedCl public: Timer m_aTimer; // activation timeout, starts after object connection Rectangle m_aObjArea; // area of object in coordinate system of the container (without scaling) - boost::rational<long> m_aScaleWidth; // scaling that was applied to the object when it was not active - boost::rational<long> m_aScaleHeight; + boost::rational<sal_Int64> m_aScaleWidth; // scaling that was applied to the object when it was not active + boost::rational<sal_Int64> m_aScaleHeight; SfxInPlaceClient* m_pClient; sal_Int64 m_nAspect; // ViewAspect that is assigned from the container Rectangle m_aLastObjAreaPixel; // area of object in coordinate system of the container (without scaling) @@ -615,7 +615,7 @@ SfxInPlaceClient::SfxInPlaceClient( SfxViewShell* pViewShell, vcl::Window *pDraw m_pImp->acquire(); m_pImp->m_pClient = this; m_pImp->m_nAspect = nAspect; - m_pImp->m_aScaleWidth = m_pImp->m_aScaleHeight = boost::rational<long>(1); + m_pImp->m_aScaleWidth = m_pImp->m_aScaleHeight = boost::rational<sal_Int64>(1); m_pImp->m_xClient = static_cast< embed::XEmbeddedClient* >( m_pImp ); pViewShell->NewIPClient_Impl(this); m_pImp->m_aTimer.SetTimeout( SFX_CLIENTACTIVATE_TIMEOUT ); @@ -760,7 +760,7 @@ Rectangle SfxInPlaceClient::GetScaledObjArea() const } -void SfxInPlaceClient::SetSizeScale( const boost::rational<long>& rScaleWidth, const boost::rational<long>& rScaleHeight ) +void SfxInPlaceClient::SetSizeScale( const boost::rational<sal_Int64>& rScaleWidth, const boost::rational<sal_Int64>& rScaleHeight ) { if ( m_pImp->m_aScaleWidth != rScaleWidth || m_pImp->m_aScaleHeight != rScaleHeight ) { @@ -776,7 +776,7 @@ void SfxInPlaceClient::SetSizeScale( const boost::rational<long>& rScaleWidth, c } -bool SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const boost::rational<long>& rScaleWidth, const boost::rational<long>& rScaleHeight ) +bool SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const boost::rational<sal_Int64>& rScaleWidth, const boost::rational<sal_Int64>& rScaleHeight ) { if( rArea != m_pImp->m_aObjArea || m_pImp->m_aScaleWidth != rScaleWidth || m_pImp->m_aScaleHeight != rScaleHeight ) { @@ -794,13 +794,13 @@ bool SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const boost:: } -const boost::rational<long>& SfxInPlaceClient::GetScaleWidth() const +const boost::rational<sal_Int64>& SfxInPlaceClient::GetScaleWidth() const { return m_pImp->m_aScaleWidth; } -const boost::rational<long>& SfxInPlaceClient::GetScaleHeight() const +const boost::rational<sal_Int64>& SfxInPlaceClient::GetScaleHeight() const { return m_pImp->m_aScaleHeight; } @@ -955,8 +955,8 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb ) Rectangle aScaledArea = GetScaledObjArea(); m_pImp->m_aObjArea.SetSize( aNewSize ); - m_pImp->m_aScaleWidth = boost::rational<long>( aScaledArea.GetWidth(), aNewSize.Width() ); - m_pImp->m_aScaleHeight = boost::rational<long>( aScaledArea.GetHeight(), aNewSize.Height() ); + m_pImp->m_aScaleWidth = boost::rational<sal_Int64>( aScaledArea.GetWidth(), aNewSize.Width() ); + m_pImp->m_aScaleHeight = boost::rational<sal_Int64>( aScaledArea.GetHeight(), aNewSize.Height() ); } } catch (uno::Exception const& e) diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index cd9f43c1494b..bc3fb83555ae 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -385,7 +385,7 @@ void SfxViewFrame::INetState_Impl( SfxItemSet &rItemSet ) rItemSet.DisableItem( SID_CREATELINK ); } -void SfxViewFrame::SetZoomFactor( const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY ) +void SfxViewFrame::SetZoomFactor( const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY ) { GetViewShell()->SetZoomFactor( rZoomX, rZoomY ); } diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 4eb4d4b375ee..bad5377f38a1 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -853,8 +853,8 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) -void SfxViewShell::SetZoomFactor( const boost::rational<long>& rZoomX, - const boost::rational<long>& rZoomY ) +void SfxViewShell::SetZoomFactor( const boost::rational<sal_Int64>& rZoomX, + const boost::rational<sal_Int64>& rZoomY ) { DBG_ASSERT( GetWindow(), "no window" ); MapMode aMap( GetWindow()->GetMapMode() ); |