https://bugs.documentfoundation.org/show_bug.cgi?id=173052

            Bug ID: 173052
           Summary: Position of a programmatically set user defined
                    gluepoint is not saved correctly.
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Draw
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 208020
  --> https://bugs.documentfoundation.org/attachment.cgi?id=208020&action=edit
Demonstration of gluepoint placement bug after save/load cycle

When setting gluepoints via LibreOffice Basic, the point location is specified
relative to the PositionAlignment value. When the file is saved,
PositionAlignment is not saved. Upon reload, the gluepoint PositionAlignment is
defaulted to CENTER but the X/Y values are the original values. If the point
was set with a PositionAlignment value other than CENTER, the gluepoint
location will be incorrect because the original X/Y values are interpreted
relative to the default CENTER alignment. The X/Y values should be adjusted to
CENTER-relative values either when the gluepoint is originally set, or upon
file save.

The attached file demonstrates this error. (Page 1) The point was set using
InsertGluePointTest(). (Page 2) After running the macro, the gluepoint appears
in the correct location at the 25% point on the left edge of the rectangle.
Another macro displays relevant gluepoint data correctly. (Page 3) After a
save/load cycle, the gluepoint is now shown at 25% below the center point, i.e.
original X/Y value is interpreted relative to a CENTER PostionAlignment. This
is confirmed with the display of the gluepoint data.

The workaround is to only use PositionAlignment as CENTER and specify X/Y
values relative to this.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to