Kaydet (Commit) 3ea75ad9 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1438216 Resource leak

Change-Id: I2b105221cd90ac224bb140a005ed40c30ad92837
Reviewed-on: https://gerrit.libreoffice.org/58627
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst d1fa8323
......@@ -392,7 +392,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
if( xRenderable.is() )
{
VCLXDevice* pXDevice = new VCLXDevice;
rtl::Reference<VCLXDevice> xDevice(new VCLXDevice);
OUString aPageRange;
Any aSelection;
vcl::PDFWriter::PDFWriterContext aContext;
......@@ -786,7 +786,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
OutputDevice* pOut = pPDFWriter->GetReferenceDevice();
DBG_ASSERT( pOut, "PDFExport::Export: no reference device" );
pXDevice->SetOutputDevice( pOut );
xDevice->SetOutputDevice(pOut);
if( mbAddStream )
{
......@@ -816,7 +816,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
Sequence< PropertyValue > aRenderOptions( 7 );
aRenderOptions[ 0 ].Name = "RenderDevice";
aRenderOptions[ 0 ].Value <<= Reference< awt::XDevice >( pXDevice );
aRenderOptions[ 0 ].Value <<= uno::Reference<awt::XDevice>(xDevice.get());
aRenderOptions[ 1 ].Name = "ExportNotesPages";
aRenderOptions[ 1 ].Value <<= false;
Any& rExportNotesValue = aRenderOptions[ 1 ].Value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment