Hi, I dug into http://openoffice.org/bugzilla/show_bug.cgi?id=89051 and I've stalled...
--Some explanations.-- 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 Wrtier). - 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 solutions.-- 1. Rearrange the following lines of the SetMarkHandles method (svx/source/svdraw/svdmrkv.cxx#805): // 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(); 2. Tweak sorting of handles somehow - method Compare (svx/source/svdraw/svdhdl.cxx#1704) looks ugly... 3. Something else. Can someone provide some comments/tips/decisions? Thanks! Ivan _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice