diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-21 12:33:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-21 16:13:31 +0100 |
commit | 78040af9acea0ab681aa54ff23844b647bc9b4f3 (patch) | |
tree | 6fb704389c3e98594d6bf2f187bf295aa42c77ef /sc/source/ui/view/viewfun3.cxx | |
parent | 8f231fc5df201c45d16bce0b4b17f727842b2121 (diff) |
loplugin:refcounting in sc
Change-Id: Id0ba24985aab36b931fa74b266dc5bf0bef62bb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111273
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view/viewfun3.cxx')
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 5 |
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 ); } } |