Kaydet (Commit) 16549dc2 authored tarafından 66kesara99's avatar 66kesara99 Kaydeden (comit) Stephan Bergmann

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/42683Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 3f19b593
......@@ -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);
......
......@@ -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:
......
......@@ -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:
......
......@@ -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);
......
......@@ -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++)
{
......
......@@ -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())
{
......
......@@ -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 )
......
......@@ -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 ) )
{
......
......@@ -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: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment