[Libreoffice-commits] core.git: svx/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Oct 4 17:47:41 UTC 2018


 svx/source/svdraw/svdoedge.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit cc633cee77e938a1da7252bb90d5b013487dc81a
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Oct 4 14:03:45 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Oct 4 19:47:15 2018 +0200

    tdf#120291 Attaching a connector makes draw Draw busy-loop
    
    regression from
        commit ffe84f49270e0a8818365ca7d1fd5242abff5562
        remove SdrObject::GetHdl in favour of AddToHdlList
    
    Change-Id: Idb15b976f6e1fcb6ffeda933ffbec96d59e6f155
    Reviewed-on: https://gerrit.libreoffice.org/61370
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index c32fdefe51d2..cc7e61c9dfe9 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -1792,9 +1792,10 @@ void SdrEdgeObj::AddToHdlList(SdrHdlList& rHdlList) const
             sal_uInt32 nO1(aEdgeInfo.nObj1Lines > 0 ? aEdgeInfo.nObj1Lines - 1 : 0);
             sal_uInt32 nO2(aEdgeInfo.nObj2Lines > 0 ? aEdgeInfo.nObj2Lines - 1 : 0);
             sal_uInt32 nM(aEdgeInfo.nMiddleLine != 0xFFFF ? 1 : 0);
-            for(sal_uInt32 nNum = 0; nNum < (nO1 + nO2 + nM); ++nNum)
+            for(sal_uInt32 i = 0; i < (nO1 + nO2 + nM); ++i)
             {
                 sal_Int32 nPt(0);
+                sal_uInt32 nNum = i;
                 std::unique_ptr<ImpEdgeHdl> pHdl(new ImpEdgeHdl(Point(),SdrHdlKind::Poly));
                 if (nNum<nO1) {
                     nPt=nNum+1;
@@ -1820,7 +1821,7 @@ void SdrEdgeObj::AddToHdlList(SdrHdlList& rHdlList) const
                     aPos.setX( aPos.X() / 2 );
                     aPos.setY( aPos.Y() / 2 );
                     pHdl->SetPos(aPos);
-                    pHdl->SetPointNum(nNum + 2);
+                    pHdl->SetPointNum(i + 2);
                     rHdlList.AddHdl(std::move(pHdl));
                 }
             }


More information about the Libreoffice-commits mailing list