summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/filter/graphicfilter2.cxx13
-rw-r--r--vcl/source/gdi/impgraph.cxx2
-rw-r--r--vcl/source/gdi/pngread.cxx2
3 files changed, 8 insertions, 9 deletions
diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx
index 2f846029bb9b..ae181f4269b6 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -221,14 +221,14 @@ sal_uInt8 ImpDetectJPG_GetNextMarker( SvStream& rStm )
do
{
rStm.ReadUChar( nByte );
- if ( rStm.eof() || rStm.GetError() ) // as 0 is not allowed as marker,
- return 0; // we can use it as errorcode
+ if (!rStm.good()) // as 0 is not allowed as marker,
+ return 0; // we can use it as errorcode
}
while ( nByte != 0xff );
do
{
rStm.ReadUChar( nByte );
- if ( rStm.eof() || rStm.GetError() )
+ if (!rStm.good())
return 0;
}
while( nByte == 0xff );
@@ -263,7 +263,7 @@ bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, bool bExtendedInfo )
bool bScanFailure = false;
bool bScanFinished = false;
- while( !bScanFailure && !bScanFinished && !rStm.eof() && !rStm.GetError() )
+ while (!bScanFailure && !bScanFinished && rStm.good())
{
sal_uInt8 nMarker = ImpDetectJPG_GetNextMarker( rStm );
switch( nMarker )
@@ -555,15 +555,14 @@ bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, bool bExtendedInfo )
rStm.ReadUInt32( nLen32 );
rStm.ReadUInt32( nTemp32 );
while( ( nTemp32 != 0x70485973 ) && ( nTemp32 != 0x49444154 )
- && !rStm.eof() && !rStm.GetError() )
+ && rStm.good() )
{
rStm.SeekRel( 4 + nLen32 );
rStm.ReadUInt32( nLen32 );
rStm.ReadUInt32( nTemp32 );
}
- if ( nTemp32 == 0x70485973
- && !rStm.eof() && !rStm.GetError() )
+ if (nTemp32 == 0x70485973 && rStm.good())
{
sal_uLong nXRes;
sal_uLong nYRes;
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 5ee08a2f21c7..a9772a2fd379 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1444,7 +1444,7 @@ void ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic )
// reading which will create VDevs and other stuff, just to
// read nothing. CAUTION: Eof is only true AFTER reading another
// byte, a speciality of SvMemoryStream (!)
- if (rIStm.GetError() || rIStm.eof())
+ if (!rIStm.good())
return;
if (NATIVE_FORMAT_50 == nTmp)
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index ff34bd129eb6..2458d0269e76 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -263,7 +263,7 @@ bool PNGReaderImpl::ReadNextChunk()
// get the next chunk from the stream
// unless we are at the end of the PNG stream
- if( mrPNGStream.eof() || (mrPNGStream.GetError() != ERRCODE_NONE) )
+ if (!mrPNGStream.good())
return false;
if( !maChunkSeq.empty() && (maChunkSeq.back().nType == PNGCHUNK_IEND) )
return false;