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.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 8534373ba48b..88143e9ac594 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -488,8 +488,7 @@ void ScTabControl::DoDrag( const vcl::Region& /* rRegion */ )
aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass();
// maSize is set in ScTransferObj ctor
- ScTransferObj* pTransferObj = new ScTransferObj( pClipDoc, aObjDesc );
- css::uno::Reference<css::datatransfer::XTransferable> xTransferable( pTransferObj );
+ rtl::Reference<ScTransferObj> pTransferObj = new ScTransferObj( pClipDoc, aObjDesc );
pTransferObj->SetDragSourceFlags(ScDragSrc::Table);
@@ -498,7 +497,7 @@ void ScTabControl::DoDrag( const vcl::Region& /* rRegion */ )
pTransferObj->SetSourceCursorPos( pViewData->GetCurX(), pViewData->GetCurY() );
vcl::Window* pWindow = pViewData->GetActiveWin();
- SC_MOD()->SetDragObject( pTransferObj, nullptr ); // for internal D&D
+ SC_MOD()->SetDragObject( pTransferObj.get(), nullptr ); // for internal D&D
pTransferObj->StartDrag( pWindow, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
}