diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-05-21 11:59:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-21 15:30:15 +0200 |
commit | 5e82dc511ea266776a06c9da62c41e873b2cbafc (patch) | |
tree | 9177da95bfb2e6889b1a650c08fb208d73743e4a | |
parent | e05a20024989a4a1a51f7d2278d5bc55f06e5570 (diff) |
Simplify logic
Change-Id: I2350c1a4d57a0e25753756e99d2b93ab3f2f6997
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 12 |
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 ) |