Kaydet (Commit) 75c604a4 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:convertlong in ucb,sot

Change-Id: I6fa355448834701f11b84584649dfcdecd0f7b2c
Reviewed-on: https://gerrit.libreoffice.org/47596Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst c0847dc7
......@@ -81,7 +81,7 @@ static void *pre_allocateStringFn(sal_Size n)
static void pre_freeStringFn(void *data)
{
char *addr = static_cast<char*>(data) - 4;
sal_Size size = reinterpret_cast<sal_uInt32*>(addr)[0] + 12;
sal_uInt32 size = reinterpret_cast<sal_uInt32*>(addr)[0] + 12;
rtl_arena_free(pre_arena, addr, size);
}
......
......@@ -316,7 +316,7 @@ bool Storage::IsStorageFile( SvStream* pStream )
if ( pStream )
{
StgHeader aHdr;
sal_uLong nPos = pStream->Tell();
sal_uInt64 nPos = pStream->Tell();
bRet = ( aHdr.Load( *pStream ) && aHdr.Check() );
// It's not a stream error if it is too small for a OLE storage header
......@@ -374,7 +374,7 @@ Storage::Storage( SvStream& r, bool bDirect )
if( r.GetError() == ERRCODE_NONE )
{
pIo->SetStrm( &r, false );
sal_uLong nSize = r.Seek( STREAM_SEEK_TO_END );
sal_uInt64 nSize = r.Seek( STREAM_SEEK_TO_END );
r.Seek( 0 );
// Initializing is OK if the stream is empty
Init( nSize == 0 );
......@@ -419,7 +419,7 @@ Storage::Storage( UCBStorageStream& rStrm, bool bDirect )
pIo->SetStrm( &rStrm );
sal_uLong nSize = pStream->Seek( STREAM_SEEK_TO_END );
sal_uInt64 nSize = pStream->Seek( STREAM_SEEK_TO_END );
pStream->Seek( 0 );
// Initializing is OK if the stream is empty
Init( nSize == 0 );
......@@ -444,7 +444,7 @@ void Storage::Init( bool bCreate )
OSL_ENSURE( pIo, "The pointer may not be empty at this point!" );
if( pIo->Good() && pIo->GetStrm() )
{
sal_uLong nSize = pIo->GetStrm()->Seek( STREAM_SEEK_TO_END );
sal_uInt64 nSize = pIo->GetStrm()->Seek( STREAM_SEEK_TO_END );
pIo->GetStrm()->Seek( 0 );
if( nSize )
{
......
......@@ -111,8 +111,8 @@ void StgCache::SetPhysPageSize( short n )
if ( n >= 512 )
{
m_nPageSize = n;
sal_uLong nPos = m_pStrm->Tell();
sal_uLong nFileSize = m_pStrm->Seek( STREAM_SEEK_TO_END );
sal_uInt64 nPos = m_pStrm->Tell();
sal_uInt64 nFileSize = m_pStrm->Seek( STREAM_SEEK_TO_END );
m_nPages = lcl_GetPageCount( nFileSize, m_nPageSize );
m_pStrm->Seek( nPos );
}
......@@ -295,7 +295,7 @@ bool StgCache::Open( const OUString& rName, StreamMode nMode )
SetStrm( pFileStrm, true );
if( pFileStrm->IsOpen() )
{
sal_uLong nFileSize = m_pStrm->Seek( STREAM_SEEK_TO_END );
sal_uInt64 nFileSize = m_pStrm->Seek( STREAM_SEEK_TO_END );
m_nPages = lcl_GetPageCount( nFileSize, m_nPageSize );
m_pStrm->Seek( 0 );
}
......@@ -384,7 +384,7 @@ bool StgCache::Write( sal_Int32 nPage, void const * pBuf )
{
m_pStrm->Seek(nPos);
}
sal_uLong nRes = m_pStrm->WriteBytes( pBuf, nBytes );
size_t nRes = m_pStrm->WriteBytes( pBuf, nBytes );
if( nRes != nBytes )
SetError( SVSTREAM_WRITE_ERROR );
else
......
......@@ -625,7 +625,7 @@ bool StgDirEntry::Tmp2Strm()
OSL_ENSURE( m_pStgStrm, "The pointer may not be NULL!" );
if ( !m_pStgStrm )
return false;
sal_uLong n = m_pTmpStrm->GetSize();
sal_uInt64 n = m_pTmpStrm->GetSize();
StgStrm* pNewStrm;
StgIo& rIo = m_pStgStrm->GetIo();
sal_uLong nThreshold = (sal_uLong) rIo.m_aHdr.GetThreshold();
......@@ -639,7 +639,7 @@ bool StgDirEntry::Tmp2Strm()
m_pTmpStrm->Seek( 0 );
while( n )
{
sal_uLong nn = n;
sal_uInt64 nn = n;
if( nn > 4096 )
nn = 4096;
if (m_pTmpStrm->ReadBytes( p, nn ) != nn)
......
......@@ -179,8 +179,8 @@ storeError OStoreDirectory_Impl::iterate (storeFindData &rFindData)
// Setup FindData.
sal_Char *p = xNode->m_aNameBlock.m_pData;
sal_Size n = rtl_str_getLength (p);
sal_Size k = rFindData.m_nLength;
sal_Int32 n = rtl_str_getLength (p);
sal_Int32 k = rFindData.m_nLength;
n = convertTextToUnicode (
m_hTextCvt, p, n,
......@@ -191,7 +191,7 @@ storeError OStoreDirectory_Impl::iterate (storeFindData &rFindData)
memset (&rFindData.m_pszName[n], 0, k);
}
rFindData.m_nLength = static_cast<sal_Int32>(n);
rFindData.m_nLength = n;
rFindData.m_nAttrib |= aPage.attrib();
// Leave.
......
......@@ -195,10 +195,10 @@ void SfxStringListItem::SetStringList( const css::uno::Sequence< OUString >& rLi
void SfxStringListItem::GetStringList( css::uno::Sequence< OUString >& rList ) const
{
long nCount = mpList->size();
size_t nCount = mpList->size();
rList.realloc( nCount );
for( long i=0; i < nCount; i++ )
for( size_t i=0; i < nCount; i++ )
rList[i] = (*mpList)[i];
}
......
......@@ -151,8 +151,8 @@ bool CachedContentResultSet::CCRS_Cache
{
if( !m_pResult )
return false;
long nStart = m_pResult->StartIndex;
long nEnd = nStart;
sal_Int32 nStart = m_pResult->StartIndex;
sal_Int32 nEnd = nStart;
if( m_pResult->Orientation )
nEnd += m_pResult->Rows.getLength() - 1;
else
......@@ -166,7 +166,7 @@ sal_Int32 CachedContentResultSet::CCRS_Cache
{
if( !m_pResult )
return 0;
long nEnd = m_pResult->StartIndex;
sal_Int32 nEnd = m_pResult->StartIndex;
if( m_pResult->Orientation )
return nEnd += m_pResult->Rows.getLength() - 1;
else
......@@ -192,7 +192,7 @@ bool CachedContentResultSet::CCRS_Cache
if( !( m_pResult->FetchError & FetchError::EXCEPTION ) )
return false;
long nEnd = m_pResult->StartIndex;
sal_Int32 nEnd = m_pResult->StartIndex;
if( m_pResult->Orientation )
nEnd += m_pResult->Rows.getLength();
......@@ -209,7 +209,7 @@ Any& CachedContentResultSet::CCRS_Cache
if( !hasRow( nRow ) )
throw SQLException();
long nDiff = nRow - m_pResult->StartIndex;
sal_Int32 nDiff = nRow - m_pResult->StartIndex;
if( nDiff < 0 )
nDiff *= -1;
......@@ -222,7 +222,7 @@ void CachedContentResultSet::CCRS_Cache
//remind that this row was mapped
if( !m_pResult )
return;
long nDiff = nRow - m_pResult->StartIndex;
sal_Int32 nDiff = nRow - m_pResult->StartIndex;
if( nDiff < 0 )
nDiff *= -1;
Sequence< sal_Bool >* pMappedReminder = getMappedReminder();
......@@ -235,7 +235,7 @@ bool CachedContentResultSet::CCRS_Cache
{
if( !m_pMappedReminder || !m_pResult )
return false;
long nDiff = nRow - m_pResult->StartIndex;
sal_Int32 nDiff = nRow - m_pResult->StartIndex;
if( nDiff < 0 )
nDiff *= -1;
if( nDiff < m_pMappedReminder->getLength() )
......
......@@ -380,14 +380,14 @@ void SortedDynamicResultSet::impl_disposing()
void SortedDynamicResultSet::SendNotify()
{
long nCount = maActions.Count();
sal_Int32 nCount = maActions.Count();
if ( nCount && mxListener.is() )
{
Sequence< ListAction > aActionList( maActions.Count() );
ListAction *pActionList = aActionList.getArray();
for ( long i=0; i<nCount; i++ )
for ( sal_Int32 i=0; i<nCount; i++ )
{
pActionList[ i ] = *(maActions.GetAction( i ));
}
......
......@@ -877,7 +877,7 @@ sal_IntPtr SortedResultSet::CompareImpl( const Reference < XResultSet >& xResult
Reference < XRow > xRowTwo( xResultTwo, UNO_QUERY );
sal_IntPtr nCompare = 0;
sal_IntPtr nColumn = pSortInfo->mnColumn;
sal_Int32 nColumn = pSortInfo->mnColumn;
switch ( pSortInfo->mnType )
{
......@@ -1535,7 +1535,7 @@ void SortedResultSet::BuildSortInfo(
OUString aPropName;
SortInfo *pInfo;
for ( sal_IntPtr i=xSortInfo.getLength(); i > 0; )
for ( sal_Int32 i=xSortInfo.getLength(); i > 0; )
{
--i;
nColumn = pSortInfo[ i ].ColumnIndex;
......
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