summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 3c09f8bc3312..fd1d0dc6547b 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -316,19 +316,13 @@ void PPDDecompressStream::Open( const OUString& i_rFile )
mpFileStream->Seek( 0 );
// check for compress'ed or gzip'ed file
- sal_uLong nCompressMethod = 0;
- if( aLine.getLength() > 1 && static_cast<unsigned char>(aLine[0]) == 0x1f )
- {
- if( static_cast<unsigned char>(aLine[1]) == 0x8b ) // check for gzip
- nCompressMethod = ZCODEC_DEFAULT_COMPRESSION | ZCODEC_GZ_LIB;
- }
-
- if( nCompressMethod != 0 )
+ if( aLine.getLength() > 1 && static_cast<unsigned char>(aLine[0]) == 0x1f
+ && static_cast<unsigned char>(aLine[1]) == 0x8b /* check for gzip */ )
{
// so let's try to decompress the stream
mpMemStream = new SvMemoryStream( 4096, 4096 );
ZCodec aCodec;
- aCodec.BeginCompression( nCompressMethod );
+ aCodec.BeginCompression( ZCODEC_DEFAULT_COMPRESSION | ZCODEC_GZ_LIB );
long nComp = aCodec.Decompress( *mpFileStream, *mpMemStream );
aCodec.EndCompression();
if( nComp < 0 )