summaryrefslogtreecommitdiff
path: root/filter
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 /filter
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 'filter')
-rw-r--r--filter/source/graphicfilter/itiff/ccidecom.cxx2
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx4
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
3 files changed, 5 insertions, 5 deletions
diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/filter/source/graphicfilter/itiff/ccidecom.cxx
index 815a75e5deba..9d638c0260c3 100644
--- a/filter/source/graphicfilter/itiff/ccidecom.cxx
+++ b/filter/source/graphicfilter/itiff/ccidecom.cxx
@@ -769,7 +769,7 @@ bool CCIDecompressor::ReadEOL()
while ( nInputBitsBufSize < 12 )
{
pIStream->ReadUChar( nByte );
- if ( pIStream->eof() )
+ if (!pIStream->good())
return false;
if ( pIStream->Tell() > nMaxPos )
return false;
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 988e791a6431..12e53b314478 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1234,7 +1234,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
nMaxPos = std::max(nOrigPos + nOffset + DataTypeSize() * nDataLen, nMaxPos);
}
pTIFF->ReadUInt32( nOffset );
- if ( pTIFF->eof() )
+ if (!pTIFF->good())
nOffset = 0;
nMaxPos = std::max( pTIFF->Tell(), nMaxPos );
@@ -1325,7 +1325,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
break;
}
pTIFF->ReadUInt32( nNextIfd );
- if ( pTIFF->eof() )
+ if (!pTIFF->good())
nNextIfd = 0;
}
if ( !nBitsPerSample || ( nBitsPerSample > 32 ) )
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index ebc214ef36fb..eac8803da7f4 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6774,7 +6774,7 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
nBytesRead += 6 * sizeof( sal_uInt32 ) + nStrLen + nDataLen;
- if( !rStm.eof() && nReadLen > nBytesRead && nDataLen )
+ if (rStm.good() && nReadLen > nBytesRead && nDataLen)
{
if( xOle10Stm.is() )
{
@@ -6828,7 +6828,7 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
else
rStm.SeekRel( nDataLen );
}
- } while( !rStm.eof() && nReadLen >= nBytesRead );
+ } while (rStm.good() && nReadLen >= nBytesRead);
if( !bMtfRead && pMtf )
{