Bug 148707 - Multiple V or B commands are not rendered ODF conform
Summary: Multiple V or B commands are not rendered ODF conform
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL: https://docs.oasis-open.org/office/Op...
Whiteboard: target:7.4.0
Keywords:
Depends on: 148714
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-21 13:09 UTC by Regina Henschel
Modified: 2022-05-10 21:02 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example with command V and example with command B (13.07 KB, application/vnd.oasis.opendocument.presentation)
2022-04-21 13:09 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2022-04-21 13:09:35 UTC
Created attachment 179706 [details]
Example with command V and example with command B

Open attached document in PowerPoint or in Scribus, for example. You will see two arcs with a gap between them. Now open the document in LibreOffice. You will see the two arcs connected by a straight line.

The arcs are generated by command V and command B respectively. There is only one command letter but data for two arcs. ODF allows to omit the second command letter if it would be the same.

The command V makes a "moveto" to the start point of the arc and then draws it clockwise. The command B makes a "moveto" to the start point and then draws the arc counter-clockwise.
There exist similar commands W and A, which start with a "lineto" instead of the "moveto". They need to be used for the second arc, if you really want to connect the two arcs.

Before this bug can be fixed, it is necessary to correct those mso_spt* shapes, which use these commands. I know already that the "curved*Arrow" shapes are affected, but I have not yet systematically searched whether more of the mso_spt* shapes are affected. (Bug report will follow.) Shapes from OOXML are not effected because they do not use these commands.
Comment 1 Regina Henschel 2022-04-22 13:57:23 UTC
The problem is in lines #2338 to #2370 in
https://opengrok.libreoffice.org/xref/core/svx/source/customshapes/EnhancedCustomShape2d.cxx?r=d5fb8d50

The current implementation makes a moveto at the beginning and then continues with the same code as the variants A and W. There it loops over the parameter groups. Instead it need to make the case distinction whether moveto or lineto is used inside this loop so that it is considered for each parameter group.
Comment 2 raal 2022-04-23 11:50:47 UTC
Confirm Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 8279d89d6e037def78f50c72fab2116ca56bef52
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded Jumbo
Comment 3 Commit Notification 2022-05-05 19:28:35 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/124382eba6aaeb475b4077920c082bf5c51ac029

tdf#148707 implicit moveTo on all not only on first

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.