diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-21 15:31:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-23 08:48:52 +0200 |
commit | 0d79d216886a71436e705c93829ed66a33270a9c (patch) | |
tree | ef29702266bca9df9f39b442505479b013891517 /sd/source/ui/func/fucopy.cxx | |
parent | e8205f38c611cfc97ca0e32c911b3d373a94d230 (diff) |
long->tools::Long in pyuno..sd
Change-Id: I67c1218d225f49ea9ce789433283ab85275e39a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104627
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/func/fucopy.cxx')
-rw-r--r-- | sd/source/ui/func/fucopy.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index d0461367ca56..8a10daaec5d6 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -183,14 +183,14 @@ void FuCopy::DoExecute( SfxRequest& rReq ) if( lWidth < 0 ) { - long nTmp = ( aRect.Right() - aRect.Left() ) / -lWidth; - nNumber = static_cast<sal_uInt16>(std::min( nTmp, static_cast<long>(nNumber) )); + ::tools::Long nTmp = ( aRect.Right() - aRect.Left() ) / -lWidth; + nNumber = static_cast<sal_uInt16>(std::min( nTmp, static_cast<::tools::Long>(nNumber) )); } if( lHeight < 0 ) { - long nTmp = ( aRect.Bottom() - aRect.Top() ) / -lHeight; - nNumber = static_cast<sal_uInt16>(std::min( nTmp, static_cast<long>(nNumber) )); + ::tools::Long nTmp = ( aRect.Bottom() - aRect.Top() ) / -lHeight; + nNumber = static_cast<sal_uInt16>(std::min( nTmp, static_cast<::tools::Long>(nNumber) )); } for( sal_uInt16 i = 1; i <= nNumber; i++ ) @@ -260,9 +260,9 @@ void FuCopy::DoExecute( SfxRequest& rReq ) if( bColor ) { // probably room for optimizations, but may can lead to rounding errors - sal_uInt8 nRed = aStartColor.GetRed() + static_cast<sal_uInt8>( ( static_cast<long>(aEndColor.GetRed()) - static_cast<long>(aStartColor.GetRed()) ) * static_cast<long>(i) / static_cast<long>(nNumber) ); - sal_uInt8 nGreen = aStartColor.GetGreen() + static_cast<sal_uInt8>( ( static_cast<long>(aEndColor.GetGreen()) - static_cast<long>(aStartColor.GetGreen()) ) * static_cast<long>(i) / static_cast<long>(nNumber) ); - sal_uInt8 nBlue = aStartColor.GetBlue() + static_cast<sal_uInt8>( ( static_cast<long>(aEndColor.GetBlue()) - static_cast<long>(aStartColor.GetBlue()) ) * static_cast<long>(i) / static_cast<long>(nNumber) ); + sal_uInt8 nRed = aStartColor.GetRed() + static_cast<sal_uInt8>( ( static_cast<::tools::Long>(aEndColor.GetRed()) - static_cast<::tools::Long>(aStartColor.GetRed()) ) * static_cast<::tools::Long>(i) / static_cast<::tools::Long>(nNumber) ); + sal_uInt8 nGreen = aStartColor.GetGreen() + static_cast<sal_uInt8>( ( static_cast<::tools::Long>(aEndColor.GetGreen()) - static_cast<::tools::Long>(aStartColor.GetGreen()) ) * static_cast<::tools::Long>(i) / static_cast<::tools::Long>(nNumber) ); + sal_uInt8 nBlue = aStartColor.GetBlue() + static_cast<sal_uInt8>( ( static_cast<::tools::Long>(aEndColor.GetBlue()) - static_cast<::tools::Long>(aStartColor.GetBlue()) ) * static_cast<::tools::Long>(i) / static_cast<::tools::Long>(nNumber) ); Color aNewColor( nRed, nGreen, nBlue ); SfxItemSet aNewSet( mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR>{} ); aNewSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); |