diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-12 09:32:02 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-12 16:53:22 +0100 |
commit | c45753847dfc2b4645dc2f7500a18ec2c5d438df (patch) | |
tree | 8d04962d7a4367a92d220beb0c35effb9490395b /sc/source/ui/unoobj/docuno.cxx | |
parent | 768cfcee178b284be6d96d384364e59e40ecb375 (diff) |
Revert "remove Fraction::operator tools::Long()"
This reverts commit 48b667a7e7d25f835f95df89162a7849d6972531.
Reason for revert: some discussion required
Change-Id: Ia0990d280837fb68b7ddc9f472ec78b1467b4311
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105540
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/unoobj/docuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 09c45ecd8252..1fbbf37ac812 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2261,10 +2261,10 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec Fraction aScaleX( aLocationPixel.GetWidth(), aLocationMM.GetWidth() ); Fraction aScaleY( aLocationPixel.GetHeight(), aLocationMM.GetHeight() ); - tools::Long nX1 = aLocationPixel.Left() + static_cast<sal_Int32>( Fraction( aTargetRect.Left() - aLocationMM.Left(), 1 ) * aScaleX ); - tools::Long nX2 = aLocationPixel.Left() + static_cast<sal_Int32>( Fraction( aTargetRect.Right() - aLocationMM.Left(), 1 ) * aScaleX ); - tools::Long nY1 = aLocationPixel.Top() + static_cast<sal_Int32>( Fraction( aTargetRect.Top() - aLocationMM.Top(), 1 ) * aScaleY ); - tools::Long nY2 = aLocationPixel.Top() + static_cast<sal_Int32>( Fraction( aTargetRect.Bottom() - aLocationMM.Top(), 1 ) * aScaleY ); + tools::Long nX1 = aLocationPixel.Left() + static_cast<tools::Long>( Fraction( aTargetRect.Left() - aLocationMM.Left(), 1 ) * aScaleX ); + tools::Long nX2 = aLocationPixel.Left() + static_cast<tools::Long>( Fraction( aTargetRect.Right() - aLocationMM.Left(), 1 ) * aScaleX ); + tools::Long nY1 = aLocationPixel.Top() + static_cast<tools::Long>( Fraction( aTargetRect.Top() - aLocationMM.Top(), 1 ) * aScaleY ); + tools::Long nY2 = aLocationPixel.Top() + static_cast<tools::Long>( Fraction( aTargetRect.Bottom() - aLocationMM.Top(), 1 ) * aScaleY ); if ( nX1 > aLocationPixel.Right() ) nX1 = aLocationPixel.Right(); if ( nX2 > aLocationPixel.Right() ) nX2 = aLocationPixel.Right(); |