<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - enhanced path formula values "left" and "top" are wrongly calculated for general custom shapes"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=121890">121890</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>enhanced path formula values "left" and "top" are wrongly calculated for general custom shapes
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>Inherited From OOo
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Draw
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rb.henschel@t-online.de
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=147255" name="attach_147255" title="Document showing the wrong positions">attachment 147255</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=147255&action=edit" title="Document showing the wrong positions">[details]</a></span>
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.
<a href="http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#attribute-draw_formula">http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#attribute-draw_formula</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>