summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-03-29 14:58:45 +0100
committerMichael Stahl <mstahl@redhat.com>2014-03-29 14:59:56 +0100
commitb03b1113d82147093762923bb9b350e52fe08ffe (patch)
treebe0fe9c3b193ed9b74e8b9a9bd81b1036f30703d /sc
parentfd76aa7ea8cf4d8e75c50f27a9fb57626198ba5f (diff)
sc: actually CopyFromStream() can just use remainingSize()
Change-Id: I16e60caa7a1baeb2b05cbe5dc8ae24a67751c390
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xestream.cxx8
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;