diff options
Diffstat (limited to 'filter/source/graphicfilter')
-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 { |