summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorayhanyalcinsoy <ayhanyalcinsoy@pisilinux.org>2019-12-27 15:23:57 +0300
committerMichael Stahl <michael.stahl@cib.de>2020-01-08 17:47:54 +0100
commitc1599fc5c9800086548595d1f1464619a7024d06 (patch)
treebc73d11d1a8791d848f692234752c66205b09152
parenta86a2a1c1ceb7203857d4317913c5b1bb9feb4aa (diff)
tdf#96505:Get rid of cargo cult long integer literals
Change-Id: I6ee1f79d4b96c4ed161eff11c1b75574d89902dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85843 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
-rw-r--r--editeng/source/editeng/impedit2.cxx2
-rw-r--r--editeng/source/rtf/rtfitem.cxx2
-rw-r--r--fpicker/source/office/fileview.cxx4
-rw-r--r--hwpfilter/source/hgzip.cxx4
-rw-r--r--i18npool/source/collator/gencoll_rule.cxx2
5 files changed, 7 insertions, 7 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index cd7ddad07c3e..2ee7d52496af 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3659,7 +3659,7 @@ Range ImpEditEngine::GetInvalidYOffsets( ParaPortion* pPortion )
&& nPropLineSpace && ( nPropLineSpace < 100 ) )
{
const EditLine& rL = pPortion->GetLines()[nFirstInvalid];
- long n = rL.GetTxtHeight() * ( 100L - nPropLineSpace );
+ long n = rL.GetTxtHeight() * ( 100 - nPropLineSpace );
n /= 100;
aRange.Min() -= n;
aRange.Max() += n;
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 297469d85a58..2ada3d2a6289 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -417,7 +417,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
if( IsCalcValue() )
CalcValue();
- nTokenValue = short( 100L * aLSpace.GetLineHeight() / nTokenValue );
+ nTokenValue = short( 100 * aLSpace.GetLineHeight() / nTokenValue );
aLSpace.SetPropLineSpace( static_cast<sal_uInt16>(nTokenValue) );
aLSpace.SetLineSpaceRule( SvxLineSpaceRule::Auto );
diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx
index b09f589a32ba..c6fe831a73ec 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -1213,8 +1213,8 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl(
OSL_ENSURE( nMinTimeout > 0, "SvtFileView_Impl::GetFolderContent_Impl: invalid minimum timeout!" );
if ( nMinTimeout <= 0 )
nMinTimeout = sal_Int32( 1000 );
- pTimeout->Seconds = nMinTimeout / 1000L;
- pTimeout->Nanosec = ( nMinTimeout % 1000L ) * 1000000L;
+ pTimeout->Seconds = nMinTimeout / 1000;
+ pTimeout->Nanosec = ( nMinTimeout % 1000 ) * 1000000;
m_xContentEnumerator->enumerateFolderContent( _rFolder, this );
diff --git a/hwpfilter/source/hgzip.cxx b/hwpfilter/source/hgzip.cxx
index e813cd01b98e..d26ea22c8824 100644
--- a/hwpfilter/source/hgzip.cxx
+++ b/hwpfilter/source/hgzip.cxx
@@ -66,7 +66,7 @@ gz_stream *gz_open(HStream & _stream)
//s->_inputstream = NULL;
s->z_err = Z_OK;
s->z_eof = 0;
- s->crc = crc32(0L, Z_NULL, 0);
+ s->crc = crc32(0, Z_NULL, 0);
s->msg = nullptr;
s->mode = 'r';
@@ -194,7 +194,7 @@ size_t gz_read(gz_stream * file, voidp buf, unsigned len)
else if (s->z_err == Z_OK)
{
inflateReset(&(s->stream));
- s->crc = crc32(0L, Z_NULL, 0);
+ s->crc = crc32(0, Z_NULL, 0);
}
}
if (s->z_err != Z_OK || s->z_eof)
diff --git a/i18npool/source/collator/gencoll_rule.cxx b/i18npool/source/collator/gencoll_rule.cxx
index 5eb659c280b1..091ff6b2fa90 100644
--- a/i18npool/source/collator/gencoll_rule.cxx
+++ b/i18npool/source/collator/gencoll_rule.cxx
@@ -88,7 +88,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
exit(1);
}
- fseek(fp, 0L, SEEK_END);
+ fseek(fp, 0, SEEK_END);
int fileSize = ftell(fp);
rewind(fp);