Bug 157289 - FILESAVE DOCX: Saving curved arrow shape works all right in 7.2 but not in 24.2
Summary: FILESAVE DOCX: Saving curved arrow shape works all right in 7.2 but not in 24.2
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
7.3.1.3 release
Hardware: All All
: medium normal
Assignee: Regina Henschel
URL:
Whiteboard: target:24.2.0 target:7.6.3 target:7.5.8
Keywords: bibisected, bisected, regression
Depends on:
Blocks: OOXML-Shapes
  Show dependency treegraph
 
Reported: 2023-09-17 13:37 UTC by sdc.blanco
Modified: 2023-10-11 11:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
test file with screenshots that show differential behavior (37.35 KB, application/vnd.oasis.opendocument.text)
2023-09-17 13:37 UTC, sdc.blanco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2023-09-17 13:37:37 UTC
Created attachment 189651 [details]
test file with screenshots that show differential behavior

The attached file gives a test document and includes screenshots of the problem.

1. Insert some curved arrows into a new document.
2. Save as .docx and open in Word.

3. If saved with Version: 7.2.7.2 (x64) / LibreOffice Community
Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2
then arrows appear the same (as expected) when opened in Word.

4. If saved with Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 218a7650a5cf03f895bed19c68d6f02daec536e9
the curved arrows are NOT reproduced as expected.  

Screenshots in attached document show the obtained results.

Possible regression?
Comment 1 raal 2023-10-01 19:35:56 UTC
I can confirm with Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0c4913e03e8427a576138601958f2dbf13b8c37b
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

Works in 7.2, regression
Comment 2 raal 2023-10-01 20:13:28 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-7.3.
Adding Cc: to Bartosz Kosiorek ; Could you possibly take a look at this one?
Thanks
 78029f8b9e852fad12e7029fa3cbd4663861655c is the first bad commit
commit 78029f8b9e852fad12e7029fa3cbd4663861655c
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Mon Mar 28 12:44:51 2022 +0200

    source 6bd85136efe3d3668b59a596d692f65bf0a4982c

132048: tdf#147978 export subpaths individually in custGeom | https://gerrit.libreoffice.org/c/core/+/132048
Comment 3 Regina Henschel 2023-10-03 12:12:54 UTC
The problem is in the path definition of the circular arrow in EnhancedCustomShapeGeometry.cxx. It has top-left and bottom-right of the ellipse rectangle exchanged. Only I'm currently not sure whether to correct it there or correct it in the conversion to oox or both. I need some time for testing.
Comment 4 Commit Notification 2023-10-04 07:57:05 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/10c7bc0c824697b92c22bddacd739de9127dc80e

tdf#157289 normalize ellipse bounding box in oox export

It will be available in 24.2.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.
Comment 5 Regina Henschel 2023-10-04 09:29:03 UTC
It is fixed in the conversion to oox because that it more general and will catch other shape types too, especially user created shapes of "non-primitive" shape type.

ODF does not specify, that the first vertex in the B command is top-left of the bounding-box of the ellipse. Thus forcing this for a special shape type is not appropriate.
Comment 6 Commit Notification 2023-10-05 09:26:55 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/1983bccdf2ea620cc1fc2198fd62f286d9ad16e8

tdf#157289 normalize ellipse bounding box in oox export

It will be available in 7.6.3.

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.
Comment 7 Commit Notification 2023-10-05 10:56:18 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/bd17f560a4262c064464cf0b649f537a36bbf2f5

tdf#157289 normalize ellipse bounding box in oox export

It will be available in 7.5.8.

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.
Comment 8 sdc.blanco 2023-10-11 11:24:29 UTC
Thanks Regina! (also that this fix might be more general).

In any case, verified in relation to the OP.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: cb46ad4c4602fbb6aeab482e9370e31495e12cfe
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL threaded