diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-05-21 12:44:53 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-21 15:30:16 +0200 |
commit | 47169087c176a419cf4382e3bdb23b39df1575cd (patch) | |
tree | 6fbe2695501c492b6abeed251b2c1c177a31afee | |
parent | a1ec916df8b5b65c342c8a796150e5f29e5f2ae3 (diff) |
Remove unnecessary GZCodec derivation
Change-Id: Id710a1fe4a3c1593add69bb2a7014d26f9499e87
-rw-r--r-- | filter/source/svg/svgfilter.cxx | 4 | ||||
-rw-r--r-- | filter/source/svg/svgimport.cxx | 4 | ||||
-rw-r--r-- | include/tools/zcodec.hxx | 17 | ||||
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 8 |
4 files changed, 11 insertions, 22 deletions
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index 734b01af4e2b..2ca7de74249c 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -370,8 +370,8 @@ OUString SAL_CALL SVGFilter::detect(Sequence<PropertyValue>& rDescriptor) throw return OUString(); xSeek->seek(0); - GZCodec aCodec; - aCodec.BeginCompression(); + ZCodec aCodec; + aCodec.BeginCompression(ZCODEC_DEFAULT_COMPRESSION, false, true); aCodec.Decompress(*aStream.get(), *pMemoryStream); aCodec.EndCompression(); pMemoryStream->Seek(STREAM_SEEK_TO_BEGIN); diff --git a/filter/source/svg/svgimport.cxx b/filter/source/svg/svgimport.cxx index 45ab0b876668..fc32d0f94eec 100644 --- a/filter/source/svg/svgimport.cxx +++ b/filter/source/svg/svgimport.cxx @@ -67,8 +67,8 @@ bool SVGFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) return false; SvStream* pMemoryStream = new SvMemoryStream; - GZCodec aCodec; - aCodec.BeginCompression(); + ZCodec aCodec; + aCodec.BeginCompression(ZCODEC_DEFAULT_COMPRESSION, false, true); aCodec.Decompress(*aStream.get(), *pMemoryStream); aCodec.EndCompression(); pMemoryStream->Seek(STREAM_SEEK_TO_BEGIN); diff --git a/include/tools/zcodec.hxx b/include/tools/zcodec.hxx index f2444af3b68e..464443318637 100644 --- a/include/tools/zcodec.hxx +++ b/include/tools/zcodec.hxx @@ -52,10 +52,10 @@ private: public: ZCodec( sal_uIntPtr nInBuf = 0x8000UL, sal_uIntPtr nOutBuf = 0x8000UL ); - virtual ~ZCodec(); + ~ZCodec(); - virtual void BeginCompression( int nCompressLevel = ZCODEC_DEFAULT_COMPRESSION, bool updateCrc = false, bool gzLib = false ); - virtual long EndCompression(); + void BeginCompression( int nCompressLevel = ZCODEC_DEFAULT_COMPRESSION, bool updateCrc = false, bool gzLib = false ); + long EndCompression(); bool IsFinished () const { return mbFinish; } long Compress( SvStream& rIStm, SvStream& rOStm ); @@ -72,17 +72,6 @@ public: sal_uIntPtr GetCRC(); }; -class GZCodec : public ZCodec -{ -public: - GZCodec(){}; - virtual ~GZCodec(){}; - virtual void BeginCompression( int nCompressLevel = ZCODEC_DEFAULT_COMPRESSION, bool updateCrc = false, bool gzLib = true ) SAL_OVERRIDE - { - ZCodec::BeginCompression( nCompressLevel, updateCrc, gzLib ); - }; -}; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 2144a5825762..2485d442aa99 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -655,9 +655,9 @@ static bool ImpPeekGraphicFormat( SvStream& rStream, OUString& rFormatExtension, // check if it is gzipped -> svgz if(sFirstBytes[0] == 0x1F && sFirstBytes[1] == 0x8B) { - GZCodec aCodec; + ZCodec aCodec; rStream.Seek(nStreamPos); - aCodec.BeginCompression(); + aCodec.BeginCompression(ZCODEC_DEFAULT_COMPRESSION, false, true); nDecompressedSize = aCodec.Read(rStream, sExtendedOrDecompressedFirstBytes, 2048); nCheckSize = nDecompressedSize < 256 ? nDecompressedSize : 256; aCodec.EndCompression(); @@ -1517,10 +1517,10 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat if(aTwoBytes[0] == 0x1F && aTwoBytes[1] == 0x8B) { SvMemoryStream aMemStream; - GZCodec aCodec; + ZCodec aCodec; long nMemoryLength; - aCodec.BeginCompression(); + aCodec.BeginCompression(ZCODEC_DEFAULT_COMPRESSION, false, true); nMemoryLength = aCodec.Decompress(rIStream, aMemStream); aCodec.EndCompression(); |