[Libreoffice-commits] core.git: basic/source
Asela Dasanayaka
rukmal.tb at gmail.com
Wed Aug 24 12:20:24 UTC 2016
basic/source/classes/image.cxx | 4 ++--
basic/source/classes/sb.cxx | 6 +++---
basic/source/comp/buffer.cxx | 2 +-
basic/source/inc/filefmt.hxx | 6 +++---
basic/source/runtime/ddectrl.cxx | 2 +-
basic/source/runtime/methods.cxx | 2 +-
basic/source/sbx/sbxbase.cxx | 2 +-
basic/source/sbx/sbxobj.cxx | 2 +-
basic/source/sbx/sbxvar.cxx | 2 +-
9 files changed, 14 insertions(+), 14 deletions(-)
New commits:
commit 057ae1cfcac518e5693e75aca87d307ce90ba6fb
Author: Asela Dasanayaka <rukmal.tb at gmail.com>
Date: Wed Aug 3 10:18:16 2016 +0530
tdf#96505 get rid of "long" integer literals 'L'
Remove L from integer literals in module basic all 0L, 1L, 2L and 3L
Change-Id: Ia46ce3d206020e16fc17e95731244a557941528c
Reviewed-on: https://gerrit.libreoffice.org/27816
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 1e1fecc..05ec8a2 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -579,7 +579,7 @@ void SbiImage::AddString( const OUString& r )
{
sal_Int32 len = r.getLength() + 1;
sal_uInt32 needed = nStringOff + len;
- if( needed > 0xFFFFFF00L )
+ if( needed > 0xFFFFFF00 )
{
bError = true; // out of mem!
}
@@ -696,7 +696,7 @@ void SbiImage::ReleaseLegacyBuffer()
bool SbiImage::ExceedsLegacyLimits()
{
- return ( nStringSize > 0xFF00L ) || ( CalcLegacyOffset( nCodeSize ) > 0xFF00L );
+ return ( nStringSize > 0xFF00 ) || ( CalcLegacyOffset( nCodeSize ) > 0xFF00 );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index a4de8a1..6964406 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1527,7 +1527,7 @@ sal_uInt16 StarBASIC::GetVBErrorCode( SbError nError )
SbError StarBASIC::GetSfxFromVBError( sal_uInt16 nError )
{
- SbError nRet = 0L;
+ SbError nRet = 0;
if( SbiRuntime::isVBAEnabled() )
{
@@ -1539,7 +1539,7 @@ SbError StarBASIC::GetSfxFromVBError( sal_uInt16 nError )
case 8:
case 12:
case 73:
- return 0L;
+ return 0;
case 10:
return ERRCODE_BASIC_ARRAY_FIX;
case 14:
@@ -1553,7 +1553,7 @@ SbError StarBASIC::GetSfxFromVBError( sal_uInt16 nError )
case 92:
return ERRCODE_BASIC_LOOP_NOT_INIT;
default:
- nRet = 0L;
+ nRet = 0;
}
}
const SFX_VB_ErrorItem* pErrItem;
diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index fdb2fa4..7d95705 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -20,7 +20,7 @@
#include "buffer.hxx"
#include "parser.hxx"
-const static sal_uInt32 UP_LIMIT=0xFFFFFF00L;
+const static sal_uInt32 UP_LIMIT=0xFFFFFF00;
// The SbiBuffer will be expanded in increments of at least 16 Bytes.
// This is necessary, because many classes emanate from a buffer length
diff --git a/basic/source/inc/filefmt.hxx b/basic/source/inc/filefmt.hxx
index d6ef8c8..94be6db 100644
--- a/basic/source/inc/filefmt.hxx
+++ b/basic/source/inc/filefmt.hxx
@@ -43,9 +43,9 @@ class SvStream;
// Version 13: tdf#94617 store methods nStart information greater than sal_Int16 limit
//
-#define B_LEGACYVERSION 0x00000011L
-#define B_EXT_IMG_VERSION 0x00000012L
-#define B_CURVERSION 0x00000013L
+#define B_LEGACYVERSION 0x00000011
+#define B_EXT_IMG_VERSION 0x00000012
+#define B_CURVERSION 0x00000013
// The file contains either a module- or a library-record.
// Those records contain further records. Every record's got
diff --git a/basic/source/runtime/ddectrl.cxx b/basic/source/runtime/ddectrl.cxx
index 384d19d..fb84c1a 100644
--- a/basic/source/runtime/ddectrl.cxx
+++ b/basic/source/runtime/ddectrl.cxx
@@ -133,7 +133,7 @@ SbError SbiDdeControl::Terminate( size_t nChannel )
delete pConv;
aConvList[nChannel-1] = DDE_FREECHANNEL;
- return 0L;
+ return 0;
}
SbError SbiDdeControl::TerminateAll()
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 562c797..468cb9f 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -204,7 +204,7 @@ RTLFUNC(Error)
else
{
OUString aErrorMsg;
- SbError nErr = 0L;
+ SbError nErr = 0;
sal_Int32 nCode = 0;
if( rPar.Count() == 1 )
{
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index f1f9518..7ff452d 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -248,7 +248,7 @@ bool SbxBase::Store( SvStream& rStrm )
.WriteUInt16( static_cast<sal_uInt16>(GetFlags()) )
.WriteUInt16( GetVersion() );
sal_Size nOldPos = rStrm.Tell();
- rStrm.WriteUInt32( 0L );
+ rStrm.WriteUInt32( 0 );
bool bRes = StoreData( rStrm );
sal_Size nNewPos = rStrm.Tell();
rStrm.Seek( nOldPos );
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 29803ad..d1b4ad9 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -641,7 +641,7 @@ bool SbxObject::StoreData( SvStream& rStrm ) const
write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aClassName, RTL_TEXTENCODING_ASCII_US);
write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aDfltProp, RTL_TEXTENCODING_ASCII_US);
sal_Size nPos = rStrm.Tell();
- rStrm.WriteUInt32( 0L );
+ rStrm.WriteUInt32( 0 );
sal_Size nNew = rStrm.Tell();
rStrm.Seek( nPos );
rStrm.WriteUInt32( nNew - nPos );
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 8ed87ae..386de36 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -497,7 +497,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
}
else
{
- rStrm.SeekRel( -1L );
+ rStrm.SeekRel( -1 );
rStrm.ReadUInt16( nType );
maName = read_uInt16_lenPrefixed_uInt8s_ToOUString(rStrm,
RTL_TEXTENCODING_ASCII_US);
More information about the Libreoffice-commits
mailing list