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

            Bug ID: 148758
           Summary: Do not start enhanced-path with commands which require
                    a current point
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: minor
          Priority: medium
         Component: Draw
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 179753
  --> https://bugs.documentfoundation.org/attachment.cgi?id=179753&action=edit
File with the mentioned shapes

The commands A (arcto) and W (clockwise-arcto) require a current point because
they start with drawing a line from current point to start of arc. In case they
are uses at start or after a N (endpath) command, there exist no current point
and therefore the enhanced-path is faulty. Rendering of faulty enhanced-paths
is undefined.

Unfortunately there are preset shapes, for which LibreOffice produces such
faulty enhanced-path. LibreOffice itself is error tolerant and does an implied
moveto on rendering. But for interoperability we should not write faulty paths.

Effected shapes are these shapes from binary MS Office import: EllipseRibbon,
EllipseRibbon2, WedgeEllipseCallout, TextArchDownCurve, TextArchDownPour,
TextArchUpCurve, TextArchUpPour, TextButtonCurve, TextButtonPour,
TextCircleCurve, TextCirclePour.

The faulty path can be simply avoided for new documents converted from binary
MS Office by using B (arc) instead of A and V (clockwise-arc) instead of W.
This can be changed in

https://opengrok.libreoffice.org/xref/core/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
That is an easy-hack.

More effort would be to change our preset shapes provided in the UI and to
change import filter, so that existing documents are repaired, or to change
export filter to write correct enhanced-paths. However, I would not do that
until there is a specific complaint from a user.

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

Reply via email to