summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/excel/xistream.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index 1487a0e867a0..e5ec510d9953 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -1034,10 +1034,13 @@ void XclImpStream::RestorePosition( const XclImpStreamPos& rPos )
bool XclImpStream::ReadNextRawRecHeader()
{
- mrStrm.Seek( mnNextRecPos );
- bool bRet = mnNextRecPos + 4 <= mnStreamSize;
+ sal_Size nSeekedPos = mrStrm.Seek( mnNextRecPos );
+ bool bRet = (nSeekedPos == mnNextRecPos) && (mnNextRecPos + 4 <= mnStreamSize);
if( bRet )
+ {
mrStrm >> mnRawRecId >> mnRawRecSize;
+ bRet = mrStrm.good();
+ }
return bRet;
}