summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-22 10:27:36 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-22 15:55:55 +0100
commit129852d379fa03c36886b5f48d6a10e530a9c3de (patch)
tree8822856292deba99867366853902f678a394aaee /sc
parent97f087f4b2737aea7ddfbb7ac637370bac871cb5 (diff)
turn some eof checks to eof or error
Change-Id: I4592d7aa86c2cc2f420bccc622ffb95aa5cefa17 Reviewed-on: https://gerrit.libreoffice.org/45077 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/lotus/lotread.cxx4
-rw-r--r--sc/source/filter/qpro/qpro.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx
index afb176ec7f19..7878c97288c0 100644
--- a/sc/source/filter/lotus/lotread.cxx
+++ b/sc/source/filter/lotus/lotread.cxx
@@ -61,7 +61,7 @@ ErrCode ImportLotus::Read()
{
pIn->ReadUInt16( nOp ).ReadUInt16( nRecLen );
- if( pIn->eof() || nNextRec > SAL_MAX_UINT32 - nRecLen - 4 )
+ if (!pIn->good() || nNextRec > SAL_MAX_UINT32 - nRecLen - 4)
eAkt = S_END;
nNextRec += nRecLen + 4;
@@ -245,7 +245,7 @@ ErrCode ImportLotus::Read(SvStream& rIn)
{
pIn->ReadUInt16( nOp ).ReadUInt16( nRecLen );
- if( pIn->eof() || nNextRec > SAL_MAX_UINT32 - nRecLen - 4 )
+ if (!pIn->good() || nNextRec > SAL_MAX_UINT32 - nRecLen - 4)
bRead = false;
else
{
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index 6326aae08cf6..0c1d18d59ffd 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -225,7 +225,7 @@ ErrCode ScQProReader::import( ScDocument *pDoc )
bool ScQProReader::recordsLeft()
{
- return mpStream && !mpStream->eof();
+ return mpStream && mpStream->good();
}
bool ScQProReader::nextRecord()