[Libreoffice-bugs] [Bug 121890] New: enhanced path formula values "left" and "top" are wrongly calculated for general custom shapes

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Dec 3 22:08:25 UTC 2018


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

            Bug ID: 121890
           Summary: enhanced path formula values "left" and "top" are
                    wrongly calculated for general custom shapes
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Draw
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: rb.henschel at t-online.de

Created attachment 147255
  --> https://bugs.documentfoundation.org/attachment.cgi?id=147255&action=edit
Document showing the wrong positions

The attached file has three custom shapes in red and for each a blue rectangle
indicating size and position as given by the svg:x, svg:y, svg:width and
svg:height attributes.

The top-left custom shape has a viewBox of svg:viewBox="0 0 21600 21600" and a
constant path draw:enhanced-path="M 5400 0 L 5400 21600 M 0 5400 L 21600 5400 F
N". It is rendered correctly.

The bottom-left custom shape has the values shifted be -5400. So it is
svg:viewBox="-5400 -5400 21600 21600" and draw:enhanced-path="M 0 -5400 L 0
16200 M -5400 0 L 16200 0 F N". It is rendered correctly too. LibreOffice is
able to use a svg:viewBox, where the top/left coordinates are not zero.

The top-right custom shape has the values for the path not given directly but
using formulas with left, right, top and bottom.
draw:enhanced-path="M 0 ?f1 L 0 ?f3 M ?f0 0 L ?f2 0 F N">
     <draw:equation draw:name="f0" draw:formula="left" />
     <draw:equation draw:name="f1" draw:formula="top" />
     <draw:equation draw:name="f2" draw:formula="right" />
     <draw:equation draw:name="f3" draw:formula="bottom" />
Now the lines start in 0|0 instead of -5400|0 and 0|-5400. The values for left
and top are apparently set to 0. Such is the default value for MS custom
shapes, but not for the general case of ODF "non-primitive" type custom shapes.
In ODF left and top are specified in table 11:
left| The left position of the svg:viewBox attribute is used.
top | The top position of the svg:viewBox attribute is used.
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#attribute-draw_formula

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20181203/fb769f8b/attachment.html>


More information about the Libreoffice-bugs mailing list