diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-03-29 14:55:09 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-03-29 14:55:09 +0100 |
commit | fd76aa7ea8cf4d8e75c50f27a9fb57626198ba5f (patch) | |
tree | d7446a30309c5a5b4a32659166b9bc957a6b4faa /sc | |
parent | 8cc3ab84b97f2dc110f95476267e8f0a386c9466 (diff) |
sc: adapt XclExpStream::CopyFromStream() to SvStream change
Change-Id: I58c183fe2b8e7b64ec0678e5eb136b9a467f1eb4
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xestream.cxx | 11 | ||||
-rw-r--r-- | sc/source/filter/inc/xestream.hxx | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index fc511a02f460..f44beddd4ae1 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -278,15 +278,14 @@ void XclExpStream::WriteZeroBytesToRecord( sal_Size nBytes ) *this << nZero; } -sal_Size XclExpStream::CopyFromStream( SvStream& rInStrm, sal_Size nBytes ) +void XclExpStream::CopyFromStream(SvStream& rInStrm, sal_uInt64 const nBytes) { - sal_Size nStrmPos = rInStrm.Tell(); + sal_uInt64 const nStrmPos = rInStrm.Tell(); rInStrm.Seek( STREAM_SEEK_TO_END ); - sal_Size nStrmSize = rInStrm.Tell(); + sal_uInt64 const nStrmSize = rInStrm.Tell(); rInStrm.Seek( nStrmPos ); - sal_Size nBytesLeft = ::std::min( nBytes, nStrmSize - nStrmPos ); - sal_Size nRet = 0; + sal_uInt64 nBytesLeft = ::std::min( nBytes, nStrmSize - nStrmPos ); if( nBytesLeft > 0 ) { const sal_Size nMaxBuffer = 4096; @@ -299,12 +298,10 @@ sal_Size XclExpStream::CopyFromStream( SvStream& rInStrm, sal_Size nBytes ) rInStrm.Read( pBuffer, nWriteLen ); sal_Size nWriteRet = Write( pBuffer, nWriteLen ); bValid = (nWriteLen == nWriteRet); - nRet += nWriteRet; nBytesLeft -= nWriteRet; } delete[] pBuffer; } - return nRet; } void XclExpStream::WriteUnicodeBuffer( const ScfUInt16Vec& rBuffer, sal_uInt8 nFlags ) diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx index 5971bc43da1b..2d1d3aed0e9f 100644 --- a/sc/source/filter/inc/xestream.hxx +++ b/sc/source/filter/inc/xestream.hxx @@ -122,7 +122,7 @@ public: /** Copies nBytes bytes from current position of the stream rInStrm. @descr Omitting the second parameter means: read to end of stream. */ - sal_Size CopyFromStream( SvStream& rInStrm, sal_Size nBytes = STREAM_SEEK_TO_END ); + void CopyFromStream( SvStream& rInStrm, sal_uInt64 nBytes = STREAM_SEEK_TO_END ); // *** unicode string export is realized with helper class XclExpString *** // (slice length setting has no effect here -> disabled automatically) |