summaryrefslogtreecommitdiff
path: root/sc/source/ui/navipi/content.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-11 15:40:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-12 09:56:01 +0200
commit389da66dfc96d06c407bff156c4ea21e940c5e06 (patch)
tree2d1ebce6bdb2d952700ed5aaeb808289e9f72a7d /sc/source/ui/navipi/content.cxx
parenta651dbcfca9e198b5c2561076961504586bc6bea (diff)
remove unused uno::Reference vars
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/navipi/content.cxx')
-rw-r--r--sc/source/ui/navipi/content.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 8fd837c3c5b5..ec66b99e073b 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -1267,13 +1267,12 @@ static void lcl_DoDragObject( ScDocShell* pSrcShell, const OUString& rName, ScCo
aObjDesc.maDisplayName = pSrcShell->GetMedium()->GetURLObject().GetURLNoPass();
// maSize is set in ScDrawTransferObj ctor
- ScDrawTransferObj* pTransferObj = new ScDrawTransferObj( pDragModel, pSrcShell, aObjDesc );
- uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj );
+ rtl::Reference<ScDrawTransferObj> pTransferObj = new ScDrawTransferObj( pDragModel, pSrcShell, aObjDesc );
pTransferObj->SetDragSourceObj( pObject, nTab );
pTransferObj->SetDragSourceFlags(ScDragSrc::Navigator);
- SC_MOD()->SetDragObject( nullptr, pTransferObj );
+ SC_MOD()->SetDragObject( nullptr, pTransferObj.get() );
pWin->ReleaseMouse();
pTransferObj->StartDrag( pWin, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
}
@@ -1301,13 +1300,12 @@ static void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, ScDra
aObjDesc.maDisplayName = pSrcShell->GetMedium()->GetURLObject().GetURLNoPass();
// maSize is set in ScTransferObj ctor
- ScTransferObj* pTransferObj = new ScTransferObj( pClipDoc, aObjDesc );
- uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj );
+ rtl::Reference<ScTransferObj> pTransferObj = new ScTransferObj( pClipDoc, aObjDesc );
pTransferObj->SetDragSource( pSrcShell, aMark );
pTransferObj->SetDragSourceFlags( nFlags );
- SC_MOD()->SetDragObject( pTransferObj, nullptr ); // for internal D&D
+ SC_MOD()->SetDragObject( pTransferObj.get(), nullptr ); // for internal D&D
pWin->ReleaseMouse();
pTransferObj->StartDrag( pWin, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
}
@@ -1446,8 +1444,7 @@ void ScContentTree::DoDrag()
if (bDoLinkTrans)
{
- ScLinkTransferObj* pTransferObj = new ScLinkTransferObj;
- uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj );
+ rtl::Reference<ScLinkTransferObj> pTransferObj = new ScLinkTransferObj;
if ( !aLinkURL.isEmpty() )
pTransferObj->SetLinkURL( aLinkURL, aLinkText );