summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfun3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/viewfun3.cxx')
-rw-r--r--sc/source/ui/view/viewfun3.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index f8c8e5770d57..e4ba7302799e 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -426,7 +426,7 @@ bool ScViewFunc::CopyToClipMultiRange( const ScDocument* pInputClipDoc, const Sc
return bDone;
}
-ScTransferObj* ScViewFunc::CopyToTransferable()
+rtl::Reference<ScTransferObj> ScViewFunc::CopyToTransferable()
{
ScRange aRange;
if ( GetViewData().GetSimpleArea( aRange ) == SC_MARK_SIMPLE )
@@ -453,8 +453,7 @@ ScTransferObj* ScViewFunc::CopyToTransferable()
TransferableObjectDescriptor aObjDesc;
pDocSh->FillTransferableObjectDescriptor( aObjDesc );
aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass();
- ScTransferObj* pTransferObj = new ScTransferObj( std::move(pClipDoc), aObjDesc );
- return pTransferObj;
+ return new ScTransferObj( std::move(pClipDoc), aObjDesc );
}
}