diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-04-09 13:01:22 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-04-09 18:09:15 +0200 |
commit | f54cb7cc81ba3c485e24e6d9820cf8dced12081b (patch) | |
tree | 9e347f3c3306101f77be68d778a291537b6cc963 /sd | |
parent | f9d747aa4ca27bcd16d8832a6bc1407f79cead0b (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 'sd')
-rw-r--r-- | sd/source/ui/func/fuconrec.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/inc/fuconrec.hxx | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index d78fd866755d..50f9c1c4fae1 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -210,7 +210,7 @@ bool FuConstructRectangle::MouseButtonDown(const MouseEvent& rMEvt) SfxItemSet aAttr(mpDoc->GetPool()); SetStyleSheet(aAttr, pObj); SetAttributes(aAttr, pObj); - SetLineEnds(aAttr, pObj); + SetLineEnds(aAttr, *pObj); pObj->SetMergedItemSet(aAttr); if( nSlotId == SID_DRAW_CAPTION_VERTICAL ) @@ -525,9 +525,9 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj) return aRetval; } -void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject const * pObj) +void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject& rObj) { - if ( (pObj->GetObjIdentifier() == OBJ_EDGE && + if ( (rObj.GetObjIdentifier() == OBJ_EDGE && nSlotId != SID_TOOL_CONNECTOR && nSlotId != SID_CONNECTOR_LINE && nSlotId != SID_CONNECTOR_LINES && @@ -541,7 +541,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject const * pObj nSlotId == SID_LINE_SQUARE_ARROW ) { // set attributes of line start and ends - SdrModel& rModel(pObj->getSdrModelFromSdrObject()); // TTTT pObj should be reference + SdrModel& rModel(rObj.getSdrModelFromSdrObject()); // arrowhead ::basegfx::B2DPolyPolygon aArrow( getPolygon( RID_SVXSTR_ARROW, rModel ) ); @@ -920,7 +920,7 @@ SdrObject* FuConstructRectangle::CreateDefaultObject(const sal_uInt16 nID, const SfxItemSet aAttr(mpDoc->GetPool()); SetStyleSheet(aAttr, pObj); SetAttributes(aAttr, pObj); - SetLineEnds(aAttr, pObj); + SetLineEnds(aAttr, *pObj); pObj->SetMergedItemSet(aAttr); } diff --git a/sd/source/ui/inc/fuconrec.hxx b/sd/source/ui/inc/fuconrec.hxx index 02a3478c55dd..0aeef38f5af0 100644 --- a/sd/source/ui/inc/fuconrec.hxx +++ b/sd/source/ui/inc/fuconrec.hxx @@ -48,7 +48,7 @@ public: virtual void Deactivate() override; void SetAttributes(SfxItemSet& rAttr, SdrObject* pObj); - void SetLineEnds(SfxItemSet& rAttr, SdrObject const * pObj); + void SetLineEnds(SfxItemSet& rAttr, SdrObject& rObj); virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; |