From 783120996aba341519393dd0100520707249d208 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 20 Dec 2017 15:53:21 +0200 Subject: new loplugin: convertlong merge the droplong and convertuintptr into one new plugin. Limit the analysis to looking at var decl's, since that seems to be safest proposition, even if that too needs some careful analysis. Change-Id: Id005baaf05cfb157ce44a06a1c81f08559a07d1f Reviewed-on: https://gerrit.libreoffice.org/46851 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sot/source/sdstor/storage.cxx | 8 ++++---- sot/source/sdstor/ucbstorage.cxx | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'sot/source/sdstor') diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 340b3202b342..be6aa1bf2d36 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -177,9 +177,9 @@ void SotStorageStream::SetSize(sal_uInt64 const nNewSize) sal_uInt32 SotStorageStream::GetSize() const { - sal_uLong nPos = Tell(); + sal_uInt64 nPos = Tell(); const_cast(this)->Seek( STREAM_SEEK_TO_END ); - sal_uLong nSize = Tell(); + sal_uInt64 nSize = Tell(); const_cast(this)->Seek( nPos ); return nSize; } @@ -199,7 +199,7 @@ void SotStorageStream::CopyTo( SotStorageStream * pDestStm ) if( !pOwnStm || !pDestStm->pOwnStm ) { // If Ole2 or not only own StorageStreams - sal_uLong nPos = Tell(); // save position + sal_uInt64 nPos = Tell(); // save position Seek( 0 ); pDestStm->SetSize( 0 ); // empty target stream @@ -497,7 +497,7 @@ bool SotStorage::IsStorageFile( SvStream* pStream ) /** code for new storages must come first! **/ if ( pStream ) { - long nPos = pStream->Tell(); + sal_uInt64 nPos = pStream->Tell(); bool bRet = UCBStorage::IsStorageFile( pStream ); if ( !bRet ) bRet = Storage::IsStorageFile( pStream ); diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 6ec64d83ba83..272e65a82fdc 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -825,7 +825,7 @@ void UCBStorageStream_Impl::CopySourceToTemporary() // current position of the temporary stream is not changed if( m_bSourceRead ) { - sal_uLong aPos = m_pStream->Tell(); + sal_uInt64 aPos = m_pStream->Tell(); m_pStream->Seek( STREAM_SEEK_TO_END ); ReadSourceWriteTemporary(); m_pStream->Seek( aPos ); @@ -1010,10 +1010,10 @@ sal_uLong UCBStorageStream_Impl::GetSize() if( !Init() ) return 0; - sal_uLong nPos = m_pStream->Tell(); + sal_uInt64 nPos = m_pStream->Tell(); m_pStream->Seek( STREAM_SEEK_TO_END ); ReadSourceWriteTemporary(); - sal_uLong nRet = m_pStream->Tell(); + sal_uInt64 nRet = m_pStream->Tell(); m_pStream->Seek( nPos ); return nRet; @@ -2884,7 +2884,7 @@ bool UCBStorage::IsStorageFile( SvStream* pFile ) if ( !pFile ) return false; - sal_uLong nPos = pFile->Tell(); + sal_uInt64 nPos = pFile->Tell(); pFile->Seek( STREAM_SEEK_TO_END ); if ( pFile->Tell() < 4 ) return false; @@ -2914,7 +2914,7 @@ bool UCBStorage::IsStorageFile( SvStream* pFile ) OUString UCBStorage::GetLinkedFile( SvStream &rStream ) { OUString aString; - sal_uLong nPos = rStream.Tell(); + sal_uInt64 nPos = rStream.Tell(); rStream.Seek( STREAM_SEEK_TO_END ); if ( !rStream.Tell() ) return aString; -- cgit