Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.