summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author66kesara99 <dev.kesara@gmail.com>2017-09-23 07:07:14 +0530
committerStephan Bergmann <sbergman@redhat.com>2017-09-24 20:18:56 +0200
commit16549dc267149aaf098191591acb20024ea21513 (patch)
tree6037a3e72b2289ed353f75e60faa60b0ba7b24f3
parent3f19b593019a62d97c8739e38c32902d7e19d790 (diff)
tdf#96505 Get rid of cargo cult "long" integer literals
Remove unnecessary "Long" literals in multiple locations Change-Id: Icc44546f10fed841683053eee01b788274e0add1 Reviewed-on: https://gerrit.libreoffice.org/42683 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--connectivity/source/commontools/dbtools.cxx2
-rw-r--r--connectivity/source/drivers/component/CTable.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx2
-rw-r--r--drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx14
-rw-r--r--drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx20
-rw-r--r--drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx4
-rw-r--r--dtrans/source/cnttype/wbench/testcnttype.cxx4
-rw-r--r--embedserv/source/embed/ed_ipersiststr.cxx12
-rw-r--r--embedserv/source/embed/syswinwrapper.cxx2
9 files changed, 31 insertions, 31 deletions
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 16c3d9b7782e..445d0e639275 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -175,7 +175,7 @@ sal_Int32 getDefaultNumberFormat(sal_Int32 _nDataType,
{
// generate a new format if necessary
Reference< XNumberFormats > xFormats(_xTypes, UNO_QUERY);
- OUString sNewFormat = xFormats->generateFormat( 0L, _rLocale, false, false, (sal_Int16)_nScale, 1);
+ OUString sNewFormat = xFormats->generateFormat( 0, _rLocale, false, false, (sal_Int16)_nScale, 1);
// and add it to the formatter if necessary
nFormat = xFormats->queryKey(sNewFormat, _rLocale, false);
diff --git a/connectivity/source/drivers/component/CTable.cxx b/connectivity/source/drivers/component/CTable.cxx
index a7e17a658874..c1a5e29b20fe 100644
--- a/connectivity/source/drivers/component/CTable.cxx
+++ b/connectivity/source/drivers/component/CTable.cxx
@@ -168,7 +168,7 @@ bool OComponentTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In
m_nFilePos = nNumberOfRecords;
break;
case IResultSetHelper::RELATIVE1:
- m_nFilePos = (m_nFilePos + nOffset < 0) ? 0L
+ m_nFilePos = (m_nFilePos + nOffset < 0) ? 0
: (sal_uInt32)(m_nFilePos + nOffset);
break;
case IResultSetHelper::ABSOLUTE1:
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index bed2e67af14b..a5574288a248 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2568,7 +2568,7 @@ bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32
m_nFilePos = nNumberOfRecords;
break;
case IResultSetHelper::RELATIVE1:
- m_nFilePos = (m_nFilePos + nOffset < 0) ? 0L
+ m_nFilePos = (m_nFilePos + nOffset < 0) ? 0
: (sal_uInt32)(m_nFilePos + nOffset);
break;
case IResultSetHelper::ABSOLUTE1:
diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
index f89e10858449..5657307dd5f3 100644
--- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
@@ -82,16 +82,16 @@ namespace drawinglayer
basegfx::B3DPolygon aNewPolygon;
aNewPolygon.append(aNextLeft);
- aNewPolygon.setNormal(0L, basegfx::B3DVector(aNextLeft - aLeft));
+ aNewPolygon.setNormal(0, basegfx::B3DVector(aNextLeft - aLeft));
aNewPolygon.append(aLastLeft);
- aNewPolygon.setNormal(1L, basegfx::B3DVector(aLastLeft - aLeft));
+ aNewPolygon.setNormal(1, basegfx::B3DVector(aLastLeft - aLeft));
aNewPolygon.append(aLastRight);
- aNewPolygon.setNormal(2L, basegfx::B3DVector(aLastRight - aRight));
+ aNewPolygon.setNormal(2, basegfx::B3DVector(aLastRight - aRight));
aNewPolygon.append(aNextRight);
- aNewPolygon.setNormal(3L, basegfx::B3DVector(aNextRight - aRight));
+ aNewPolygon.setNormal(3, basegfx::B3DVector(aNextRight - aRight));
aNewPolygon.setClosed(true);
@@ -163,13 +163,13 @@ namespace drawinglayer
basegfx::B3DPolygon aNewPolygon;
aNewPolygon.append(aLast);
- aNewPolygon.setNormal(0L, basegfx::B3DVector(aLast - aNull));
+ aNewPolygon.setNormal(0, basegfx::B3DVector(aLast - aNull));
aNewPolygon.append(aNext);
- aNewPolygon.setNormal(1L, basegfx::B3DVector(aNext - aNull));
+ aNewPolygon.setNormal(1, basegfx::B3DVector(aNext - aNull));
aNewPolygon.append(aNull);
- aNewPolygon.setNormal(2L, basegfx::B3DVector(-1.0, 0.0, 0.0));
+ aNewPolygon.setNormal(2, basegfx::B3DVector(-1.0, 0.0, 0.0));
aNewPolygon.setClosed(true);
diff --git a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
index 880519b3afa2..deac45e862c9 100644
--- a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
@@ -155,10 +155,10 @@ namespace
if(bCreateNormals)
{
- aNew.setNormal(0L, aSubA.getNormal(nIndexA));
- aNew.setNormal(1L, aSubB.getNormal(nIndexA));
- aNew.setNormal(2L, aSubB.getNormal(nIndexB));
- aNew.setNormal(3L, aSubA.getNormal(nIndexB));
+ aNew.setNormal(0, aSubA.getNormal(nIndexA));
+ aNew.setNormal(1, aSubB.getNormal(nIndexA));
+ aNew.setNormal(2, aSubB.getNormal(nIndexB));
+ aNew.setNormal(3, aSubA.getNormal(nIndexB));
}
if(bCreateTextureCoordinates)
@@ -173,10 +173,10 @@ namespace
fPolygonPosB += fEdgeLengthB;
const double fRelTexBR(fPolygonPosB * fTexHorMultiplicatorB);
- aNew.setTextureCoordinate(0L, basegfx::B2DPoint(fRelTexAL, fTexVerStart));
- aNew.setTextureCoordinate(1L, basegfx::B2DPoint(fRelTexBL, fTexVerStop));
- aNew.setTextureCoordinate(2L, basegfx::B2DPoint(fRelTexBR, fTexVerStop));
- aNew.setTextureCoordinate(3L, basegfx::B2DPoint(fRelTexAR, fTexVerStart));
+ aNew.setTextureCoordinate(0, basegfx::B2DPoint(fRelTexAL, fTexVerStart));
+ aNew.setTextureCoordinate(1, basegfx::B2DPoint(fRelTexBL, fTexVerStop));
+ aNew.setTextureCoordinate(2, basegfx::B2DPoint(fRelTexBR, fTexVerStop));
+ aNew.setTextureCoordinate(3, basegfx::B2DPoint(fRelTexAR, fTexVerStart));
}
rTarget.append(aNew);
@@ -601,7 +601,7 @@ namespace drawinglayer
if(bCreateTextureCoordinates)
{
- aTexRangeFront = basegfx::tools::getRange(rSliceVector[0L].getB3DPolyPolygon());
+ aTexRangeFront = basegfx::tools::getRange(rSliceVector[0].getB3DPolyPolygon());
aTexRangeBack = basegfx::tools::getRange(rSliceVector[nNumSlices - 1].getB3DPolyPolygon());
if(aTexRangeBack.getDepth() > aTexRangeBack.getWidth())
@@ -614,7 +614,7 @@ namespace drawinglayer
aTexRangeBack.getMaxZ(), aTexRangeBack.getMaxY(), aTexRangeBack.getMaxX());
}
- basegfx::B3DPoint aCenter(basegfx::tools::getRange(rSliceVector[0L].getB3DPolyPolygon()).getCenter());
+ basegfx::B3DPoint aCenter(basegfx::tools::getRange(rSliceVector[0].getB3DPolyPolygon()).getCenter());
for(a = 0; a < nLoopCount; a++)
{
diff --git a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
index b592c74b0d90..f453d03578d9 100644
--- a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
@@ -211,10 +211,10 @@ namespace drawinglayer
maCorrectedPolyPolygon = basegfx::tools::correctOutmostPolygon(maCorrectedPolyPolygon);
// check edge count of first sub-polygon. If different, reSegment polyPolygon. This ensures
- // that for polyPolygons, the subPolys 1..n only get reSegmented when polygon 0L is different
+ // that for polyPolygons, the subPolys 1..n only get reSegmented when polygon 0 is different
// at all (and not always)
const basegfx::B2DPolygon aSubCandidate(maCorrectedPolyPolygon.getB2DPolygon(0));
- const sal_uInt32 nSubEdgeCount(aSubCandidate.isClosed() ? aSubCandidate.count() : (aSubCandidate.count() ? aSubCandidate.count() - 1 : 0L));
+ const sal_uInt32 nSubEdgeCount(aSubCandidate.isClosed() ? aSubCandidate.count() : (aSubCandidate.count() ? aSubCandidate.count() - 1 : 0));
if(nSubEdgeCount != getVerticalSegments())
{
diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx
index b4cfb7a5c0d3..1b12896895f1 100644
--- a/dtrans/source/cnttype/wbench/testcnttype.cxx
+++ b/dtrans/source/cnttype/wbench/testcnttype.cxx
@@ -68,7 +68,7 @@ sal_Bool readCntTypesFromFileIntoVector( char* fname, vector< string >& vecData
return sal_False;
// set pointer to file start
- fseek( fstream, 0L, SEEK_SET );
+ fseek( fstream, 0, SEEK_SET );
char line[1024];
while ( fscanf( fstream, "%1023[^\n]s", line ) != EOF )
@@ -91,7 +91,7 @@ sal_Bool processCntTypesAndWriteResultIntoFile( char* fname, vector< string >& v
return sal_False;
// set pointer to file start
- fseek( fstream, 0L, SEEK_SET );
+ fseek( fstream, 0, SEEK_SET );
vector< string >::iterator iter_end = vecData.end( );
for ( vector< string >::iterator iter = vecData.begin( ); iter != iter_end; ++iter )
diff --git a/embedserv/source/embed/ed_ipersiststr.cxx b/embedserv/source/embed/ed_ipersiststr.cxx
index 73263b5e3646..0de9ab79fd09 100644
--- a/embedserv/source/embed/ed_ipersiststr.cxx
+++ b/embedserv/source/embed/ed_ipersiststr.cxx
@@ -70,7 +70,7 @@ uno::Reference< io::XInputStream > createTempXInStreamFromIStream(
uno::Reference < io::XOutputStream > xTempOut( io::TempFile::create(comphelper::getComponentContext(xFactory)),
uno::UNO_QUERY_THROW );
ULARGE_INTEGER nNewPos;
- LARGE_INTEGER const aZero = { 0L, 0L };
+ LARGE_INTEGER const aZero = { 0, 0 };
HRESULT hr = pStream->Seek( aZero, STREAM_SEEK_SET, &nNewPos );
if ( FAILED( hr ) ) return xResult;
@@ -129,10 +129,10 @@ HRESULT copyXTempOutToIStream( uno::Reference< io::XOutputStream > const & xTemp
// Seek to zero and truncate the stream
ULARGE_INTEGER nNewPos;
- LARGE_INTEGER const aZero = { 0L, 0L };
+ LARGE_INTEGER const aZero = { 0, 0 };
HRESULT hr = pStream->Seek( aZero, STREAM_SEEK_SET, &nNewPos );
if ( FAILED( hr ) ) return E_FAIL;
- ULARGE_INTEGER const aUZero = { 0L, 0L };
+ ULARGE_INTEGER const aUZero = { 0, 0 };
hr = pStream->SetSize( aUZero );
if ( FAILED( hr ) ) return E_FAIL;
@@ -505,7 +505,7 @@ STDMETHODIMP EmbedDocument_Impl::Load( IStorage *pStg )
if ( SUCCEEDED( hr ) )
{
ULARGE_INTEGER nNewPos;
- LARGE_INTEGER const aZero = { 0L, 0L };
+ LARGE_INTEGER const aZero = { 0, 0 };
hr = m_pExtStream->Seek( aZero, STREAM_SEEK_SET, &nNewPos );
if ( SUCCEEDED( hr ) )
{
@@ -632,7 +632,7 @@ STDMETHODIMP EmbedDocument_Impl::Save( IStorage *pStgSave, BOOL fSameAsLoad )
{
// no need to truncate the stream, the size of the stream is always the same
ULARGE_INTEGER nNewPos;
- LARGE_INTEGER const aZero = { 0L, 0L };
+ LARGE_INTEGER const aZero = { 0, 0 };
hr = pNewExtStream->Seek( aZero, STREAM_SEEK_SET, &nNewPos );
if ( SUCCEEDED( hr ) )
{
@@ -810,7 +810,7 @@ STDMETHODIMP EmbedDocument_Impl::Load( LPCOLESTR pszFileName, DWORD /*dwMode*/ )
{
// no need to truncate the stream, the size of the stream is always the same
ULARGE_INTEGER nNewPos;
- LARGE_INTEGER const aZero = { 0L, 0L };
+ LARGE_INTEGER const aZero = { 0, 0 };
hr = m_pExtStream->Seek( aZero, STREAM_SEEK_SET, &nNewPos );
if ( SUCCEEDED( hr ) )
{
diff --git a/embedserv/source/embed/syswinwrapper.cxx b/embedserv/source/embed/syswinwrapper.cxx
index b6d9f4247b67..64eefc17af38 100644
--- a/embedserv/source/embed/syswinwrapper.cxx
+++ b/embedserv/source/embed/syswinwrapper.cxx
@@ -432,7 +432,7 @@ LRESULT APIENTRY winwrap::HatchWndProc(
return DefWindowProc(hWnd, iMsg, wParam, lParam);
}
- return 0L;
+ return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */