summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabcont.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/tabcont.cxx')
-rw-r--r--sc/source/ui/view/tabcont.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 62d270613978..5e0d005d513f 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -483,16 +483,16 @@ void ScTabControl::DoDrag()
aTabMark.ResetMark(); // doesn't change marked table information
aTabMark.SetMarkArea( aTabRange );
- ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
+ ScDocumentUniquePtr pClipDoc(new ScDocument( SCDOCMODE_CLIP ));
ScClipParam aClipParam(aTabRange, false);
- rDoc.CopyToClip(aClipParam, pClipDoc, &aTabMark, false, false);
+ rDoc.CopyToClip(aClipParam, pClipDoc.get(), &aTabMark, false, false);
TransferableObjectDescriptor aObjDesc;
pDocSh->FillTransferableObjectDescriptor( aObjDesc );
aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass();
// maSize is set in ScTransferObj ctor
- rtl::Reference<ScTransferObj> pTransferObj = new ScTransferObj( pClipDoc, aObjDesc );
+ rtl::Reference<ScTransferObj> pTransferObj = new ScTransferObj( std::move(pClipDoc), aObjDesc );
pTransferObj->SetDragSourceFlags(ScDragSrc::Table);