summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 2906bb2690c9..4e7687cc7925 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2086,12 +2086,12 @@ bool PDFWriterImpl::compressStream( SvMemoryStream* pStream )
pStream->Seek( STREAM_SEEK_TO_END );
sal_uLong nEndPos = pStream->Tell();
pStream->Seek( STREAM_SEEK_TO_BEGIN );
- ZCodec* pCodec = new ZCodec( 0x4000, 0x4000 );
+ ZCodec pCodec( 0x4000, 0x4000 );
SvMemoryStream aStream;
- pCodec->BeginCompression();
- pCodec->Write( aStream, (const sal_uInt8*)pStream->GetData(), nEndPos );
- pCodec->EndCompression();
- delete pCodec;
+ pCodec.BeginCompression();
+ pCodec.Write( aStream, (const sal_uInt8*)pStream->GetData(), nEndPos );
+ pCodec.EndCompression();
+ assert(false);
nEndPos = aStream.Tell();
pStream->Seek( STREAM_SEEK_TO_BEGIN );
aStream.Seek( STREAM_SEEK_TO_BEGIN );
@@ -3701,12 +3701,11 @@ sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8* pEncoding,
"end\n"
"end\n" );
#ifndef DEBUG_DISABLE_PDFCOMPRESSION
- ZCodec* pCodec = new ZCodec( 0x4000, 0x4000 );
+ ZCodec pCodec( 0x4000, 0x4000 );
SvMemoryStream aStream;
- pCodec->BeginCompression();
- pCodec->Write( aStream, (const sal_uInt8*)aContents.getStr(), aContents.getLength() );
- pCodec->EndCompression();
- delete pCodec;
+ pCodec.BeginCompression();
+ pCodec.Write( aStream, (const sal_uInt8*)aContents.getStr(), aContents.getLength() );
+ pCodec.EndCompression();
#endif
#if OSL_DEBUG_LEVEL > 1