summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-10-17 14:00:57 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-10-17 14:24:16 +0100
commit722d993a4384d8c4f294994757894af09348ac4f (patch)
treece7b21b51c9fab31f7b329a83f49e46ca34e1172 /sc
parent644ded05e6ca6ec428f2e3015238c9448c3300d2 (diff)
check that seeks and reads succeeded
Diffstat (limited to 'sc')
-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;
}