diff options
Diffstat (limited to 'sc/source/ui/navipi/content.cxx')
-rw-r--r-- | sc/source/ui/navipi/content.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index f06dc527471b..71405a56d22d 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -1283,9 +1283,9 @@ static void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, ScDra rRange.aEnd.Col(), rRange.aEnd.Row(), aMark ) ) { - ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP ); + ScDocumentUniquePtr pClipDoc(new ScDocument( SCDOCMODE_CLIP )); ScClipParam aClipParam(rRange, false); - rSrcDoc.CopyToClip(aClipParam, pClipDoc, &aMark, false, false); + rSrcDoc.CopyToClip(aClipParam, pClipDoc.get(), &aMark, false, false); // pClipDoc->ExtendMerge( rRange, sal_True ); TransferableObjectDescriptor aObjDesc; @@ -1293,7 +1293,7 @@ static void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, ScDra aObjDesc.maDisplayName = pSrcShell->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->SetDragSource( pSrcShell, aMark ); pTransferObj->SetDragSourceFlags( nFlags ); |