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 <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 731cb6d..c717d00 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -2493,8 +2493,8 @@
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 205bfab..f70d112 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2328,9 +2328,9 @@
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 fe968c7..f652fa4 100644
--- a/reportdesign/source/ui/inspection/metadata.cxx
+++ b/reportdesign/source/ui/inspection/metadata.cxx
@@ -187,7 +187,7 @@
// 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 b7bc577..e2cca48 100644
--- a/sal/osl/unx/profile.cxx
+++ b/sal/osl/unx/profile.cxx
@@ -1029,11 +1029,11 @@
{
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 5db922e7..d3b192f 100644
--- a/sal/osl/unx/socket.cxx
+++ b/sal/osl/unx/socket.cxx
@@ -1404,7 +1404,7 @@
{
/* 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 @@
{
/* 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 */