summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xistream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/excel/xistream.cxx')
-rw-r--r--sc/source/filter/excel/xistream.cxx64
1 files changed, 32 insertions, 32 deletions
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index a2be5dadf7c4..31cf3d5ced08 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -179,7 +179,7 @@ bool XclImpBiff5Decrypter::OnVerifyEncryptionData( const uno::Sequence< beans::N
return maEncryptionData.getLength();
}
-void XclImpBiff5Decrypter::OnUpdate( sal_Size /*nOldStrmPos*/, sal_Size nNewStrmPos, sal_uInt16 nRecSize )
+void XclImpBiff5Decrypter::OnUpdate( std::size_t /*nOldStrmPos*/, std::size_t nNewStrmPos, sal_uInt16 nRecSize )
{
maCodec.InitCipher();
maCodec.Skip( (nNewStrmPos + nRecSize) & 0x0F );
@@ -256,7 +256,7 @@ bool XclImpBiff8Decrypter::OnVerifyEncryptionData( const uno::Sequence< beans::N
return maEncryptionData.getLength();
}
-void XclImpBiff8Decrypter::OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 /*nRecSize*/ )
+void XclImpBiff8Decrypter::OnUpdate( std::size_t nOldStrmPos, std::size_t nNewStrmPos, sal_uInt16 /*nRecSize*/ )
{
if( nNewStrmPos != nOldStrmPos )
{
@@ -304,12 +304,12 @@ sal_uInt16 XclImpBiff8Decrypter::OnRead( SvStream& rStrm, sal_uInt8* pnData, sal
return nRet;
}
-sal_uInt32 XclImpBiff8Decrypter::GetBlock( sal_Size nStrmPos )
+sal_uInt32 XclImpBiff8Decrypter::GetBlock( std::size_t nStrmPos )
{
return static_cast< sal_uInt32 >( nStrmPos / EXC_ENCR_BLOCKSIZE );
}
-sal_uInt16 XclImpBiff8Decrypter::GetOffset( sal_Size nStrmPos )
+sal_uInt16 XclImpBiff8Decrypter::GetOffset( std::size_t nStrmPos )
{
return static_cast< sal_uInt16 >( nStrmPos % EXC_ENCR_BLOCKSIZE );
}
@@ -327,7 +327,7 @@ XclImpStreamPos::XclImpStreamPos() :
}
void XclImpStreamPos::Set(
- const SvStream& rStrm, sal_Size nNextPos, sal_Size nCurrSize,
+ const SvStream& rStrm, std::size_t nNextPos, std::size_t nCurrSize,
sal_uInt16 nRawRecId, sal_uInt16 nRawRecSize, sal_uInt16 nRawRecLeft,
bool bValid )
{
@@ -341,7 +341,7 @@ void XclImpStreamPos::Set(
}
void XclImpStreamPos::Get(
- SvStream& rStrm, sal_Size& rnNextPos, sal_Size& rnCurrSize,
+ SvStream& rStrm, std::size_t& rnNextPos, std::size_t& rnCurrSize,
sal_uInt16& rnRawRecId, sal_uInt16& rnRawRecSize, sal_uInt16& rnRawRecLeft,
bool& rbValid ) const
{
@@ -430,7 +430,7 @@ bool XclImpStream::StartNextRecord()
/* #i4266# Counter to ignore zero records (id==len==0) (i.e. the application
"Crystal Report" writes zero records between other records) */
- sal_Size nZeroRecCount = 5;
+ std::size_t nZeroRecCount = 5;
bool bIsZeroRec = false;
do
@@ -449,7 +449,7 @@ bool XclImpStream::StartNextRecord()
return mbValidRec;
}
-bool XclImpStream::StartNextRecord( sal_Size nNextRecPos )
+bool XclImpStream::StartNextRecord( std::size_t nNextRecPos )
{
mnNextRecPos = nNextRecPos;
return StartNextRecord();
@@ -537,12 +537,12 @@ void XclImpStream::SeekGlobalPosition()
}
}
-sal_Size XclImpStream::GetRecPos() const
+std::size_t XclImpStream::GetRecPos() const
{
return mbValid ? (mnCurrRecSize - mnRawRecLeft) : EXC_REC_SEEK_TO_END;
}
-sal_Size XclImpStream::GetRecSize()
+std::size_t XclImpStream::GetRecSize()
{
if( !mbHasComplRec )
{
@@ -555,7 +555,7 @@ sal_Size XclImpStream::GetRecSize()
return mnComplRecSize;
}
-sal_Size XclImpStream::GetRecLeft()
+std::size_t XclImpStream::GetRecLeft()
{
return mbValid ? (GetRecSize() - GetRecPos()) : 0;
}
@@ -577,12 +577,12 @@ sal_uInt16 XclImpStream::GetNextRecId()
return nRecId;
}
-sal_uInt16 XclImpStream::PeekRecId( sal_Size nPos )
+sal_uInt16 XclImpStream::PeekRecId( std::size_t nPos )
{
sal_uInt16 nRecId = EXC_ID_UNKNOWN;
if (mbValidRec && nPos < mnStreamSize)
{
- sal_Size nCurPos = mrStrm.Tell();
+ sal_uInt64 const nCurPos = mrStrm.Tell();
mrStrm.Seek(nPos);
mrStrm.ReadUInt16( nRecId );
mrStrm.Seek(nCurPos);
@@ -694,13 +694,13 @@ double XclImpStream::ReadDouble()
return nValue;
}
-sal_Size XclImpStream::Read( void* pData, sal_Size nBytes )
+std::size_t XclImpStream::Read( void* pData, std::size_t nBytes )
{
- sal_Size nRet = 0;
+ std::size_t nRet = 0;
if( mbValid && pData && (nBytes > 0) )
{
sal_uInt8* pnBuffer = static_cast< sal_uInt8* >( pData );
- sal_Size nBytesLeft = nBytes;
+ std::size_t nBytesLeft = nBytes;
while( mbValid && (nBytesLeft > 0) )
{
@@ -719,18 +719,18 @@ sal_Size XclImpStream::Read( void* pData, sal_Size nBytes )
return nRet;
}
-sal_Size XclImpStream::CopyToStream( SvStream& rOutStrm, sal_Size nBytes )
+std::size_t XclImpStream::CopyToStream( SvStream& rOutStrm, std::size_t nBytes )
{
- sal_Size nRet = 0;
+ std::size_t nRet = 0;
if( mbValid && (nBytes > 0) )
{
- const sal_Size nMaxBuffer = 4096;
+ const std::size_t nMaxBuffer = 4096;
std::unique_ptr<sal_uInt8[]> pnBuffer(new sal_uInt8[ ::std::min( nBytes, nMaxBuffer ) ]);
- sal_Size nBytesLeft = nBytes;
+ std::size_t nBytesLeft = nBytes;
while( mbValid && (nBytesLeft > 0) )
{
- sal_Size nReadSize = ::std::min( nBytesLeft, nMaxBuffer );
+ std::size_t nReadSize = ::std::min( nBytesLeft, nMaxBuffer );
nRet += Read( pnBuffer.get(), nReadSize );
// writing more bytes than read results in invalid memory access
SAL_WARN_IF(nRet != nReadSize, "sc", "read less bytes than requested");
@@ -752,11 +752,11 @@ void XclImpStream::CopyRecordToStream( SvStream& rOutStrm )
}
}
-void XclImpStream::Seek( sal_Size nPos )
+void XclImpStream::Seek( std::size_t nPos )
{
if( mbValidRec )
{
- sal_Size nCurrPos = GetRecPos();
+ std::size_t nCurrPos = GetRecPos();
if( !mbValid || (nPos < nCurrPos) ) // from invalid state or backward
{
RestorePosition( maFirstRec );
@@ -769,10 +769,10 @@ void XclImpStream::Seek( sal_Size nPos )
}
}
-void XclImpStream::Ignore( sal_Size nBytes )
+void XclImpStream::Ignore( std::size_t nBytes )
{
// implementation similar to Read(), but without really reading anything
- sal_Size nBytesLeft = nBytes;
+ std::size_t nBytesLeft = nBytes;
while( mbValid && (nBytesLeft > 0) )
{
sal_uInt16 nReadSize = GetMaxRawReadSize( nBytesLeft );
@@ -785,7 +785,7 @@ void XclImpStream::Ignore( sal_Size nBytes )
}
}
-sal_Size XclImpStream::ReadUniStringExtHeader(
+std::size_t XclImpStream::ReadUniStringExtHeader(
bool& rb16Bit, bool& rbRich, bool& rbFareast,
sal_uInt16& rnFormatRuns, sal_uInt32& rnExtInf, sal_uInt8 nFlags )
{
@@ -798,7 +798,7 @@ sal_Size XclImpStream::ReadUniStringExtHeader(
return rnExtInf + 4 * rnFormatRuns;
}
-sal_Size XclImpStream::ReadUniStringExtHeader( bool& rb16Bit, sal_uInt8 nFlags )
+std::size_t XclImpStream::ReadUniStringExtHeader( bool& rb16Bit, sal_uInt8 nFlags )
{
bool bRich, bFareast;
sal_uInt16 nCrun;
@@ -861,7 +861,7 @@ OUString XclImpStream::ReadRawUniString( sal_uInt16 nChars, bool b16Bit )
OUString XclImpStream::ReadUniString( sal_uInt16 nChars, sal_uInt8 nFlags )
{
bool b16Bit;
- sal_Size nExtSize = ReadUniStringExtHeader( b16Bit, nFlags );
+ std::size_t nExtSize = ReadUniStringExtHeader( b16Bit, nFlags );
OUString aRet( ReadRawUniString( nChars, b16Bit ) );
Ignore( nExtSize );
return aRet;
@@ -906,7 +906,7 @@ void XclImpStream::IgnoreRawUniString( sal_uInt16 nChars, bool b16Bit )
void XclImpStream::IgnoreUniString( sal_uInt16 nChars, sal_uInt8 nFlags )
{
bool b16Bit;
- sal_Size nExtSize = ReadUniStringExtHeader( b16Bit, nFlags );
+ std::size_t nExtSize = ReadUniStringExtHeader( b16Bit, nFlags );
IgnoreRawUniString( nChars, b16Bit );
Ignore( nExtSize );
}
@@ -946,7 +946,7 @@ void XclImpStream::RestorePosition( const XclImpStreamPos& rPos )
bool XclImpStream::ReadNextRawRecHeader()
{
- sal_Size nSeekedPos = mrStrm.Seek( mnNextRecPos );
+ std::size_t nSeekedPos = mrStrm.Seek( mnNextRecPos );
bool bRet = (nSeekedPos == mnNextRecPos) && (mnNextRecPos + 4 <= mnStreamSize);
if( bRet )
{
@@ -1035,9 +1035,9 @@ bool XclImpStream::EnsureRawReadSize( sal_uInt16 nBytes )
return mbValid;
}
-sal_uInt16 XclImpStream::GetMaxRawReadSize( sal_Size nBytes ) const
+sal_uInt16 XclImpStream::GetMaxRawReadSize( std::size_t nBytes ) const
{
- return static_cast< sal_uInt16 >( ::std::min< sal_Size >( nBytes, mnRawRecLeft ) );
+ return static_cast< sal_uInt16 >( ::std::min< std::size_t >( nBytes, mnRawRecLeft ) );
}
sal_uInt16 XclImpStream::ReadRawData( void* pData, sal_uInt16 nBytes )