[Libreoffice-commits] core.git: editeng/source fpicker/source hwpfilter/source i18npool/source

ayhanyalcinsoy (via logerrit) logerrit at kemper.freedesktop.org
Wed Jan 8 16:51:48 UTC 2020


 editeng/source/editeng/impedit2.cxx       |    2 +-
 editeng/source/rtf/rtfitem.cxx            |    2 +-
 fpicker/source/office/fileview.cxx        |    4 ++--
 hwpfilter/source/hgzip.cxx                |    4 ++--
 i18npool/source/collator/gencoll_rule.cxx |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit c1599fc5c9800086548595d1f1464619a7024d06
Author:     ayhanyalcinsoy <ayhanyalcinsoy at pisilinux.org>
AuthorDate: Fri Dec 27 15:23:57 2019 +0300
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Wed Jan 8 17:47:54 2020 +0100

    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 at cib.de>

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);
 


More information about the Libreoffice-commits mailing list