filter/source/svg/svgexport.cxx | 4 ++-- filter/source/svg/svgwriter.cxx | 6 +++--- reportdesign/source/ui/inspection/metadata.cxx | 2 +- sal/osl/unx/profile.cxx | 4 ++-- sal/osl/unx/socket.cxx | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-)
New commits: commit b44ad15cd78892f2f1d7fe83ccda9fc41dc9c9a5 Author: Onur Yilmaz <onuryilmaz0...@gmail.com> AuthorDate: Mon Jan 27 11:46:12 2020 +0300 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Jan 28 16:53:27 2020 +0100 tdf#96505: Get rid of cargo cult long integer literals I checked return values. Long variables didn't affect the calculation. Change-Id: Ia3713eedf275de71b1096d1fe7e22da012a7f94e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87493 Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 731cb6d4561e..c717d00596ef 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -2493,8 +2493,8 @@ void SVGExport::writeMtf( const GDIMetaFile& rMtf ) aAttr = OUString::number( aSize.Height() ) + "mm"; AddAttribute( XML_NAMESPACE_NONE, "height", aAttr ); - aAttr = "0 0 " + OUString::number( aSize.Width() * 100L ) + " " + - OUString::number( aSize.Height() * 100L ); + aAttr = "0 0 " + OUString::number( aSize.Width() * 100 ) + " " + + OUString::number( aSize.Height() * 100 ); AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr ); AddAttribute( XML_NAMESPACE_NONE, "version", "1.1" ); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 205bfabc6d4a..f70d11200be7 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -2328,9 +2328,9 @@ void SVGActionWriter::ImplWriteGradientStop( const Color& rColor, double fOffset Color SVGActionWriter::ImplGetColorWithIntensity( const Color& rColor, sal_uInt16 nIntensity ) { - sal_uInt8 nNewRed = static_cast<sal_uInt8>( static_cast<long>(rColor.GetRed()) * nIntensity / 100L ); - sal_uInt8 nNewGreen = static_cast<sal_uInt8>( static_cast<long>(rColor.GetGreen()) * nIntensity / 100L ); - sal_uInt8 nNewBlue = static_cast<sal_uInt8>( static_cast<long>(rColor.GetBlue()) * nIntensity / 100L ); + sal_uInt8 nNewRed = static_cast<sal_uInt8>( static_cast<long>(rColor.GetRed()) * nIntensity / 100 ); + sal_uInt8 nNewGreen = static_cast<sal_uInt8>( static_cast<long>(rColor.GetGreen()) * nIntensity / 100 ); + sal_uInt8 nNewBlue = static_cast<sal_uInt8>( static_cast<long>(rColor.GetBlue()) * nIntensity / 100 ); return Color( nNewRed, nNewGreen, nNewBlue); } diff --git a/reportdesign/source/ui/inspection/metadata.cxx b/reportdesign/source/ui/inspection/metadata.cxx index fe968c7fddd6..f652fa4a4723 100644 --- a/reportdesign/source/ui/inspection/metadata.cxx +++ b/reportdesign/source/ui/inspection/metadata.cxx @@ -187,7 +187,7 @@ namespace rptui // initialization if(!s_pPropertyInfos) getPropertyInfo(); - OPropertyInfoImpl aSearch(_rName, 0L, OUString(), "", PropUIFlags::NONE); + OPropertyInfoImpl aSearch(_rName, 0, OUString(), "", PropUIFlags::NONE); const OPropertyInfoImpl* pPropInfo = ::std::lower_bound( s_pPropertyInfos, s_pPropertyInfos + s_nCount, aSearch, PropertyInfoLessByName() ); diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index b7bc5771fd64..e2cca48ab8c6 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -1029,11 +1029,11 @@ static bool OslProfile_rewindFile(osl_TFile* pFile, bool bTruncate) { pFile->m_pReadPtr = pFile->m_ReadBuf + sizeof(pFile->m_ReadBuf); - bRet = (lseek(pFile->m_Handle, SEEK_SET, 0L) == 0); + bRet = (lseek(pFile->m_Handle, SEEK_SET, 0) == 0); if (bTruncate) { - bRet &= (ftruncate(pFile->m_Handle, 0L) == 0); + bRet &= (ftruncate(pFile->m_Handle, 0) == 0); } } diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx index 5db922e7674d..d3b192f4e1f1 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -1404,7 +1404,7 @@ oslSocketResult SAL_CALL osl_connectSocketTo(oslSocket pSocket, { /* divide milliseconds into seconds and microseconds */ tv.tv_sec= pTimeout->Seconds; - tv.tv_usec= pTimeout->Nanosec / 1000L; + tv.tv_usec= pTimeout->Nanosec / 1000; } /* select */ @@ -2217,7 +2217,7 @@ sal_Int32 SAL_CALL osl_demultiplexSocketEvents(oslSocketSet IncomingSet, { /* non-blocking call */ tv.tv_sec = pTimeout->Seconds; - tv.tv_usec = pTimeout->Nanosec / 1000L; + tv.tv_usec = pTimeout->Nanosec / 1000; } /* get max handle from all sets */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits