diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-22 10:02:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-22 13:33:46 +0100 |
commit | df2e78f1a8a1dc628eb26c8173ba1f6bae0ca6f4 (patch) | |
tree | 6aaf6d2f2613c3de773e3d3134b0d1354e0d0b12 /filter | |
parent | 2161d04688be77112c281a1ada5263b963677c43 (diff) |
replace check of eof and GetError with good
Change-Id: I7d9f04262ab5420e9a14813fa1274bb9d01e3291
Reviewed-on: https://gerrit.libreoffice.org/45076
Tested-by: Jenkins <ci@libreoffice.org>
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/ipbm/ipbm.cxx | 12 | ||||
-rw-r--r-- | filter/source/graphicfilter/ipict/ipict.cxx | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx index ca63bb570b3e..3228b0bdc3ee 100644 --- a/filter/source/graphicfilter/ipbm/ipbm.cxx +++ b/filter/source/graphicfilter/ipbm/ipbm.cxx @@ -281,7 +281,7 @@ bool PBMReader::ImplReadBody() case 0 : while ( nHeight != mnHeight ) { - if ( mrPBM.eof() || mrPBM.GetError() ) + if (!mrPBM.good()) return false; if ( --nShift < 0 ) @@ -303,7 +303,7 @@ bool PBMReader::ImplReadBody() case 1 : while ( nHeight != mnHeight ) { - if ( mrPBM.eof() || mrPBM.GetError() ) + if (!mrPBM.good()) return false; mrPBM.ReadUChar( nDat ); @@ -321,7 +321,7 @@ bool PBMReader::ImplReadBody() case 2 : while ( nHeight != mnHeight ) { - if ( mrPBM.eof() || mrPBM.GetError() ) + if (!mrPBM.good()) return false; sal_uInt8 nR, nG, nB; @@ -346,7 +346,7 @@ bool PBMReader::ImplReadBody() case 0 : while ( !bFinished ) { - if ( mrPBM.eof() || mrPBM.GetError() ) + if (!mrPBM.good()) return false; mrPBM.ReadUChar( nDat ); @@ -405,7 +405,7 @@ bool PBMReader::ImplReadBody() continue; } - if ( mrPBM.eof() || mrPBM.GetError() ) + if (!mrPBM.good()) return false; mrPBM.ReadUChar( nDat ); @@ -478,7 +478,7 @@ bool PBMReader::ImplReadBody() continue; } - if ( mrPBM.eof() || mrPBM.GetError() ) + if (!mrPBM.good()) return false; mrPBM.ReadUChar( nDat ); diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index b5d88979f7c8..67292c76a46b 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -1213,7 +1213,7 @@ void PictReader::ReadHeader() // a small test to check if versionOp code exists after the bdbox ( with no extra NOP codes) pPict->Seek(nOffset+10); pPict->ReadBytes(sBuf, 2); - if (pPict->eof() || pPict->GetError()) break; + if (!pPict->good()) break; if (sBuf[0] == 0x11 || (sBuf[0] == 0x00 && sBuf[1] == 0x11)) ; // maybe ok else continue; } @@ -1231,7 +1231,7 @@ void PictReader::ReadHeader() if (st >= 3 && actualConfid != 20) continue; aBoundingRect=tools::Rectangle( x1,y1, x2, y2 ); - if (pPict->eof() || pPict->GetError()) continue; + if (!pPict->good()) continue; // read version pPict->ReadBytes(sBuf, 2); // version 1 file @@ -1250,7 +1250,7 @@ void PictReader::ReadHeader() } while ( sBuf[0] == 0x00 && numZero < 10); actualConfid -= (numZero-1); // extra nop are dubious - if (pPict->eof() || pPict->GetError()) continue; + if (!pPict->good()) continue; if (sBuf[0] != 0x11) continue; // not a version opcode // abnormal version 1 file if (sBuf[1] == 0x01 ) { @@ -1265,7 +1265,7 @@ void PictReader::ReadHeader() // 3 Bytes ignored : end of version arg 0x02FF (ie: 0xFF), HeaderOp : 0x0C00 pPict->SeekRel( 3 ); pPict->ReadInt16( nExtVer ).ReadInt16( nReserved ); - if (pPict->eof() || pPict->GetError()) continue; + if (!pPict->good()) continue; if ( nExtVer == -2 ) // extended version 2 picture { |