summaryrefslogtreecommitdiff
path: root/vcl/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/filter')
-rw-r--r--vcl/source/filter/graphicfilter2.cxx13
1 files changed, 6 insertions, 7 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;