https://issues.apache.org/ooo/show_bug.cgi?id=89051

--- Comment #3 from Pedro Giffuni <[email protected]> ---
As described by Ivan Timofeev
http://lists.freedesktop.org/archives/libreoffice/2011-November/020038.html

___

When inserting a point there is a call to
SdrDragView::ImpBegInsObjPoint (svx/source/svdraw/svddrgv.cxx).

Inside it:

- we remember the number of new point in a polypolygon:
mnInsPointNum = pMarkedPath->NbcInsPoint*;

- we call AdjustMarkHdl that calls SetMarkHandles. Inside
SetMarkHandles we add all handles - including custom ones (anchors in
Writer) and then sort handles. So, mnInsPointNum (see previous step)
becomes invalid (in Writer).

- we use [invalid] mnInsPointNum to get handle by its index *in
SdrHdlList* (var aHdl) using remembered index *in polygon*:
BegDragObj(rPnt, pOut, aHdl.GetHdl(mnInsPointNum), 0);

So, we can use mnInsPointNum only if custom (and other) handles had
placed *after* point handles in SdrHdlList.
___

Possible solution:

Rearrange the following lines of the SetMarkHandles method
(svx/source/svdraw/svdmrkv.cxx#873):

        // add custom handles (used by other apps, e.g. AnchorPos)
        AddCustomHdl();
        // sort handles
        aHdl.Sort();

to:

        // sort handles
        aHdl.Sort();
        // add custom handles (used by other apps, e.g. AnchorPos)
        AddCustomHdl();

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to