diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-20 14:23:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-21 15:46:54 +0200 |
commit | f74b888244fcefa7c03fa25db4d42c839ebbf642 (patch) | |
tree | ac0a93f54098b5c206718fb067fecca6791e8d82 /sd | |
parent | 8d7012b65650a7b2e379bc53b1d93ee616c32ae9 (diff) |
simplify PlusHdl logic
like we did with the AddToHdlList stuff, all the client code cares about
is fetching the entire list
Change-Id: Id3cefa5f316a3f979a276c64f9125943d0981842
Reviewed-on: https://gerrit.libreoffice.org/60813
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/animations/motionpathtag.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index 0a6a5ca6e94b..c6e83af4b701 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -915,18 +915,17 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList ) if( mrView.IsPlusHandlesAlwaysVisible() || bSelected ) { - sal_uInt32 nPlusHdlCnt=mpPathObj->GetPlusHdlCount(*pSmartHdl); + SdrHdlList plusList(nullptr); + mpPathObj->AddToPlusHdlList(plusList, *pSmartHdl); + sal_uInt32 nPlusHdlCnt=plusList.GetHdlCount(); for (sal_uInt32 nPlusNum=0; nPlusNum<nPlusHdlCnt; nPlusNum++) { - SdrHdl* pPlusHdl = mpPathObj->GetPlusHdl(*pSmartHdl,nPlusNum); - if (pPlusHdl!=nullptr) - { - pPlusHdl->SetObj(mpPathObj); - pPlusHdl->SetPageView(mrView.GetSdrPageView()); - pPlusHdl->SetPlusHdl(true); - rHandlerList.AddHdl(pPlusHdl); - } + SdrHdl* pPlusHdl = plusList.GetHdl(nPlusNum); + pPlusHdl->SetObj(mpPathObj); + pPlusHdl->SetPageView(mrView.GetSdrPageView()); + pPlusHdl->SetPlusHdl(true); } + plusList.MoveTo(rHandlerList); } } } |