summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-04-09 13:01:22 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-04-09 18:09:15 +0200
commitf54cb7cc81ba3c485e24e6d9820cf8dced12081b (patch)
tree9e347f3c3306101f77be68d778a291537b6cc963 /sc/source/ui
parentf9d747aa4ca27bcd16d8832a6bc1407f79cead0b (diff)
GetLineEnds: Use SdrObject& instead of pointers
Change-Id: I154363d54139319f584d24401d47aa9374869d47 Reviewed-on: https://gerrit.libreoffice.org/52628 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/app/drwtrans.cxx6
-rw-r--r--sc/source/ui/drawfunc/fuconrec.cxx8
-rw-r--r--sc/source/ui/inc/drwtrans.hxx2
-rw-r--r--sc/source/ui/inc/fuconrec.hxx2
-rw-r--r--sc/source/ui/navipi/content.cxx2
5 files changed, 10 insertions, 10 deletions
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 12cfa00f3bca..3fa00a949b55 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -638,13 +638,13 @@ void ScDrawTransferObj::SetDragSource( const ScDrawView* pView )
//! add as listener with document, delete pDragSourceView if document gone
}
-void ScDrawTransferObj::SetDragSourceObj( SdrObject* pObj, SCTAB nTab )
+void ScDrawTransferObj::SetDragSourceObj( SdrObject& rObj, SCTAB nTab )
{
DELETEZ( pDragSourceView );
- pDragSourceView = new SdrView(pObj->getSdrModelFromSdrObject()); // TTTT pObj should be reference
+ pDragSourceView = new SdrView(rObj.getSdrModelFromSdrObject());
pDragSourceView->ShowSdrPage(pDragSourceView->GetModel()->GetPage(nTab));
SdrPageView* pPV = pDragSourceView->GetSdrPageView();
- pDragSourceView->MarkObj(pObj, pPV);
+ pDragSourceView->MarkObj(&rObj, pPV); // TTTT MarkObj should take SdrObject&
//! add as listener with document, delete pDragSourceView if document gone
}
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx
index 6aba5faad5fc..05727fbe36f0 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -117,7 +117,7 @@ bool FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
if (pObj)
{
SfxItemSet aAttr(pObj->getSdrModelFromSdrObject().GetItemPool());
- SetLineEnds(aAttr, pObj, aSfxRequest.GetSlot());
+ SetLineEnds(aAttr, *pObj, aSfxRequest.GetSlot());
pObj->SetMergedItemSet(aAttr);
}
@@ -214,9 +214,9 @@ void FuConstRectangle::Activate()
FuConstruct::Activate();
}
-void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, const SdrObject* pObj, sal_uInt16 nSlotId)
+void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, const SdrObject& rObj, sal_uInt16 nSlotId)
{
- SdrModel& rModel(pObj->getSdrModelFromSdrObject()); // TTTT pObj should be reference
+ SdrModel& rModel(rObj.getSdrModelFromSdrObject());
if ( nSlotId == SID_LINE_ARROW_START ||
nSlotId == SID_LINE_ARROW_END ||
@@ -448,7 +448,7 @@ SdrObject* FuConstRectangle::CreateDefaultObject(const sal_uInt16 nID, const too
}
SfxItemSet aAttr(pDrDoc->GetItemPool());
- SetLineEnds(aAttr, pObj, nID);
+ SetLineEnds(aAttr, *pObj, nID);
pObj->SetMergedItemSet(aAttr);
}
diff --git a/sc/source/ui/inc/drwtrans.hxx b/sc/source/ui/inc/drwtrans.hxx
index be1137ed37e8..cf2fdaeaeb40 100644
--- a/sc/source/ui/inc/drwtrans.hxx
+++ b/sc/source/ui/inc/drwtrans.hxx
@@ -83,7 +83,7 @@ public:
void SetDrawPersist( const SfxObjectShellRef& rRef );
void SetDragSource( const ScDrawView* pView );
- void SetDragSourceObj( SdrObject* pObj, SCTAB nTab );
+ void SetDragSourceObj( SdrObject& rObj, SCTAB nTab );
void SetDragSourceFlags( ScDragSrc nFlags );
void SetDragWasInternal();
diff --git a/sc/source/ui/inc/fuconrec.hxx b/sc/source/ui/inc/fuconrec.hxx
index b18d38029c69..ab9b77f42591 100644
--- a/sc/source/ui/inc/fuconrec.hxx
+++ b/sc/source/ui/inc/fuconrec.hxx
@@ -36,7 +36,7 @@ class FuConstRectangle : public FuConstruct
virtual void Activate() override;
virtual void Deactivate() override;
- static void SetLineEnds(SfxItemSet& rAttr, const SdrObject* pObj, sal_uInt16 nSlotId);
+ static void SetLineEnds(SfxItemSet& rAttr, const SdrObject& rObj, sal_uInt16 nSlotId);
// Create default drawing objects via keyboard
virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) override;
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index a414160700c7..f1c905fd3fe4 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -1262,7 +1262,7 @@ static void lcl_DoDragObject( ScDocShell* pSrcShell, const OUString& rName, ScCo
rtl::Reference<ScDrawTransferObj> pTransferObj = new ScDrawTransferObj( pDragModel, pSrcShell, aObjDesc );
- pTransferObj->SetDragSourceObj( pObject, nTab );
+ pTransferObj->SetDragSourceObj( *pObject, nTab );
pTransferObj->SetDragSourceFlags(ScDragSrc::Navigator);
SC_MOD()->SetDragObject( nullptr, pTransferObj.get() );