diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-11 21:59:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-12 07:37:13 +0100 |
commit | 48b667a7e7d25f835f95df89162a7849d6972531 (patch) | |
tree | 50d900c95e6b2ae6bac6919a350ca3a2fd71c943 /svx/source/svdraw/svdoole2.cxx | |
parent | 693553210828538680408832157faad9654758c8 (diff) |
remove Fraction::operator tools::Long()
which was added in
commit 331e2e5ed3bf4e0b2c1fab3b7bca836170317827
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Thu Sep 14 08:49:52 2017 +0200
long->sal_Int32 in Fraction
presumably to make the change impact less code.
Instead, update the call sites to reflect the actual bitwidth
of the data we will be receiving.
Change-Id: If2a678b1cf534f39cb8cb249757462be53658309
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105607
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svdoole2.cxx')
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 23eb06465e87..7de164bcafd5 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -180,8 +180,8 @@ tools::Rectangle SdrLightEmbeddedClient_Impl::impl_getScaledRect_nothrow() const { tools::Rectangle aLogicRect( mpObj->GetLogicRect() ); // apply scaling to object area and convert to pixels - aLogicRect.SetSize( Size( tools::Long( aLogicRect.GetWidth() * m_aScaleWidth), - tools::Long( aLogicRect.GetHeight() * m_aScaleHeight) ) ); + aLogicRect.SetSize( Size( sal_Int32( aLogicRect.GetWidth() * m_aScaleWidth), + sal_Int32( aLogicRect.GetHeight() * m_aScaleHeight) ) ); return aLogicRect; } @@ -259,8 +259,8 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj aVisArea.SetSize( Size( aSz.Width, aSz.Height ) ); aVisArea = OutputDevice::LogicToLogic(aVisArea, MapMode(aObjMapUnit), MapMode(aContainerMapUnit)); - Size aScaledSize( static_cast< tools::Long >( m_aScaleWidth * Fraction( aVisArea.GetWidth() ) ), - static_cast< tools::Long >( m_aScaleHeight * Fraction( aVisArea.GetHeight() ) ) ); + Size aScaledSize( static_cast< sal_Int32 >( m_aScaleWidth * Fraction( aVisArea.GetWidth() ) ), + static_cast< sal_Int32 >( m_aScaleHeight * Fraction( aVisArea.GetHeight() ) ) ); tools::Rectangle aLogicRect( mpObj->GetLogicRect() ); // react to the change if the difference is bigger than one pixel @@ -500,8 +500,8 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl //SfxBooleanFlagGuard aGuard( m_bResizeNoScale, true ); // new size of the object area without scaling - Size aNewObjSize( tools::Long( aNewLogicRect.GetWidth() / m_aScaleWidth ), - tools::Long( aNewLogicRect.GetHeight() / m_aScaleHeight ) ); + Size aNewObjSize( sal_Int32( aNewLogicRect.GetWidth() / m_aScaleWidth ), + sal_Int32( aNewLogicRect.GetHeight() / m_aScaleHeight ) ); // now remove scaling from new placement and keep this at the new object area aNewLogicRect.SetSize( aNewObjSize ); @@ -1488,8 +1488,8 @@ void SdrOle2Obj::ImpSetVisAreaSize() // objects' visual area. The scaling will not change, but it might exist already and must // be used in calculations MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpImpl->mxObjRef->getMapUnit( GetAspect() ) ); - Size aVisSize( static_cast<tools::Long>( Fraction( maRect.GetWidth() ) / aScaleWidth ), - static_cast<tools::Long>( Fraction( maRect.GetHeight() ) / aScaleHeight ) ); + Size aVisSize( static_cast<sal_Int32>( Fraction( maRect.GetWidth() ) / aScaleWidth ), + static_cast<sal_Int32>( Fraction( maRect.GetHeight() ) / aScaleHeight ) ); aVisSize = OutputDevice::LogicToLogic( aVisSize, @@ -1508,8 +1508,8 @@ void SdrOle2Obj::ImpSetVisAreaSize() {} tools::Rectangle aAcceptedVisArea; - aAcceptedVisArea.SetSize( Size( static_cast<tools::Long>( Fraction( tools::Long( aSz.Width ) ) * aScaleWidth ), - static_cast<tools::Long>( Fraction( tools::Long( aSz.Height ) ) * aScaleHeight ) ) ); + aAcceptedVisArea.SetSize( Size( static_cast<sal_Int32>( Fraction( tools::Long( aSz.Width ) ) * aScaleWidth ), + static_cast<sal_Int32>( Fraction( tools::Long( aSz.Height ) ) * aScaleHeight ) ) ); if (aVisSize != aAcceptedVisArea.GetSize()) { // server changed VisArea to its liking and the VisArea is different than the suggested one |