diff options
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/storage.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index cff3520264ba..bc78bddbbe04 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -181,12 +181,16 @@ sal_uInt32 SotStorageStream::GetSize() const return nSize; } -sal_uInt64 SotStorageStream::remainingSize() +sal_uInt64 SotStorageStream::TellEnd() { + // Need to flush the buffer so we materialise the stream and return the correct answer + // otherwise we return a 0 value from StgEntry::GetSize + FlushBuffer(true); + if (pOwnStm) - return pOwnStm->GetSize() - Tell(); + return pOwnStm->GetSize(); - return SvStream::remainingSize(); + return SvStream::TellEnd(); } void SotStorageStream::CopyTo( SotStorageStream * pDestStm ) |