diff options
Diffstat (limited to 'sc/source/ui/view/viewfun3.cxx')
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 72bd69f209f2..26c672cb64f3 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -290,8 +290,7 @@ bool ScViewFunc::CopyToClipSingleRange( ScDocument* pClipDoc, const ScRangeList& aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass(); // maSize is set in ScTransferObj ctor - ScTransferObj* pTransferObj = new ScTransferObj( ScDocumentUniquePtr(pClipDoc), aObjDesc ); - uno::Reference<css::datatransfer::XTransferable2> xTransferObj = pTransferObj; + rtl::Reference<ScTransferObj> pTransferObj(new ScTransferObj( ScDocumentUniquePtr(pClipDoc), aObjDesc )); if ( ScGlobal::xDrawClipDocShellRef.is() ) { SfxObjectShellRef aPersistRef( ScGlobal::xDrawClipDocShellRef.get() ); @@ -407,8 +406,7 @@ bool ScViewFunc::CopyToClipMultiRange( const ScDocument* pInputClipDoc, const Sc aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass(); // maSize is set in ScTransferObj ctor - ScTransferObj* pTransferObj = new ScTransferObj( std::move(pDocClip), aObjDesc ); - uno::Reference<css::datatransfer::XTransferable2> xTransferObj = pTransferObj; + rtl::Reference<ScTransferObj> pTransferObj(new ScTransferObj( std::move(pDocClip), aObjDesc )); if ( ScGlobal::xDrawClipDocShellRef.is() ) { SfxObjectShellRef aPersistRef( ScGlobal::xDrawClipDocShellRef.get() ); |