diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-15 16:22:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-17 10:16:35 +0200 |
commit | bfd81eed4ce4ee262437938199615ff6cc2c52a0 (patch) | |
tree | 91a0886af085d64b8a67f8d72b9eb6ced076f98f /svtools | |
parent | aa881ba9ee9367c6d665ed417ccd02974e4fa5e4 (diff) |
loplugin:useuniqueptr in SvEmbedTransferHelper
Change-Id: Ie01e783fea160fba0041ae43a82ad3f4a7c961f9
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/misc/embedtransfer.cxx | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx index dc168ce5dfed..5d642c7a513f 100644 --- a/svtools/source/misc/embedtransfer.cxx +++ b/svtools/source/misc/embedtransfer.cxx @@ -59,11 +59,6 @@ SvEmbedTransferHelper::SvEmbedTransferHelper( const uno::Reference< embed::XEmbe SvEmbedTransferHelper::~SvEmbedTransferHelper() { - if ( m_pGraphic ) - { - delete m_pGraphic; - m_pGraphic = nullptr; - } } void SvEmbedTransferHelper::SetParentShellID( const OUString& rShellID ) @@ -95,7 +90,7 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo if( nFormat == SotClipboardFormatId::OBJECTDESCRIPTOR ) { TransferableObjectDescriptor aDesc; - FillTransferableObjectDescriptor( aDesc, m_xObj, m_pGraphic, m_nAspect ); + FillTransferableObjectDescriptor( aDesc, m_xObj, m_pGraphic.get(), m_nAspect ); bRet = SetTransferableObjectDescriptor( aDesc ); } else if( nFormat == SotClipboardFormatId::EMBED_SOURCE ) |