diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-03-29 14:58:45 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-03-29 14:59:56 +0100 |
commit | b03b1113d82147093762923bb9b350e52fe08ffe (patch) | |
tree | be0fe9c3b193ed9b74e8b9a9bd81b1036f30703d /sc | |
parent | sc: adapt XclExpStream::CopyFromStream() to SvStream change (diff) | |
download | core-b03b1113d82147093762923bb9b350e52fe08ffe.tar.gz core-b03b1113d82147093762923bb9b350e52fe08ffe.zip |
sc: actually CopyFromStream() can just use remainingSize()
Change-Id: I16e60caa7a1baeb2b05cbe5dc8ae24a67751c390
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xestream.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index f44beddd4ae1..e741e09451c4 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -280,12 +280,8 @@ void XclExpStream::WriteZeroBytesToRecord( sal_Size nBytes ) void XclExpStream::CopyFromStream(SvStream& rInStrm, sal_uInt64 const nBytes) { - sal_uInt64 const nStrmPos = rInStrm.Tell(); - rInStrm.Seek( STREAM_SEEK_TO_END ); - sal_uInt64 const nStrmSize = rInStrm.Tell(); - rInStrm.Seek( nStrmPos ); - - sal_uInt64 nBytesLeft = ::std::min( nBytes, nStrmSize - nStrmPos ); + sal_uInt64 const nRemaining(rInStrm.remainingSize()); + sal_uInt64 nBytesLeft = ::std::min(nBytes, nRemaining); if( nBytesLeft > 0 ) { const sal_Size nMaxBuffer = 4096; |