<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 - "current point" is not tracked when evaluate commands of custom shapes"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=125782">125782</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"current point" is not tracked when evaluate commands of 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>LibreOffice
          </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=152029" name="attach_152029" title="TearDrop shape with screenshot, how it looks in Word">attachment 152029</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=152029&action=edit" title="TearDrop shape with screenshot, how it looks in Word">[details]</a></span>
TearDrop shape with screenshot, how it looks in Word

The custom shapes are defined by the draw:enhanced-path attribute of the
<draw:enhanced-geometry> element in ODF. This path uses commands like lineto
and arcto. Some of the commands refer to "current point" as start of its
segment. In the current implementation such "current point" is not tracked.
That works as long as the coordinates of the "current point" are not needed for
the command itself.

But the quadratic Bézier curve is implemented, so that the equivalent cubic
Bézier  curve is used. And for getting the first control point the coordinates
of the start point are needed.

The current implementation assumes, that the "current point" is the previous
point in the point sequence. But that is wrong in case the previous command is
one of the several 'arc' commands. For those commands the last coordinate pair
represents an angle.

The error becomes visible in the "teardrop" shape. Is has a path with
'arcangleto' followed by 'quadraticcurveto'. See attachment.

I suggest to solve the problem by tracking the "current point" in
EnhancedCustomShape2d::CreateSubPath(). That has the advantage, that not only
command 'quadraticcurveto' can be implemented properly, but the command
'closepath' too.</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>