Bug 141786 - FILESAVE DOCX export of rotated group has wrong position as group and of child elements
Summary: FILESAVE DOCX export of rotated group has wrong position as group and of chil...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Regina Henschel
URL:
Whiteboard: target:7.3.0 target:7.2.0.2
Keywords:
: 123328 123618 123620 135314 (view as bug list)
Depends on:
Blocks: DOCX-Grouped-Shapes
  Show dependency treegraph
 
Reported: 2021-04-20 22:12 UTC by Regina Henschel
Modified: 2021-11-18 12:20 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Document to reproduce the error (14.23 KB, application/vnd.oasis.opendocument.text)
2021-04-20 22:12 UTC, Regina Henschel
Details
The example file in Writer and its docx-version in Word 2019 (159.92 KB, image/png)
2021-04-21 09:13 UTC, NISZ LibreOffice Team
Details
The example files docx versions from 2 days ago and from today in Word (136.23 KB, image/png)
2021-04-21 10:17 UTC, NISZ LibreOffice Team
Details
Properties of the shape with text in Writer in ODT and DOCX formats (183.08 KB, image/png)
2021-05-10 11:05 UTC, NISZ LibreOffice Team
Details
Properties of the shape with text in Word docx and the original in Writer (179.48 KB, image/png)
2021-05-10 11:06 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2021-04-20 22:12:47 UTC
Created attachment 171321 [details]
Document to reproduce the error

Open attached document and save it to docx. Open the result in Word and compare.
The group itself has a wrong position and the child elements in the group have a wrong positions.
I see the same error, if I use a shape instead of the text box.

I have used Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 7c6605bd2c1b27c12c4a492921e537eb4bf5a98e
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2021-04-21 09:13:14 UTC
Created attachment 171327 [details]
The example file in Writer and its docx-version in Word 2019

Repro in:

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: eac00017e34e77343b9ac3638bed9c75115a23fe
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL
Comment 2 NISZ LibreOffice Team 2021-04-21 10:17:01 UTC
Created attachment 171328 [details]
The example files docx versions from 2 days ago and from today in Word

The saved docx looks different in Word (but still not good) when saved from the most recent nightly:

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 42e0ea0a6e4f48967d58fa95081c8ba5a6b08bc6
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

after
https://git.libreoffice.org/core/commit/4cb71fefc61d9015a0142f3a4fdafc5250913f2c

tdf#122962 DOCX drawingML export: fix polygon shape in group shape
Comment 3 NISZ LibreOffice Team 2021-05-10 11:02:28 UTC
I checked what's on the UI before and after the docx save in Writer and Word.
Did not checked yet what's in the files.

Some observations about the 3 objects horizontal and vertical position data, as presented on the UI of Word 19 and current master:

		Group – H	Group – W
ODT orig	5.91 cm		3.41 cm
DOCX-Writer	6,57 cm		4.07 cm
DOCX-Word	6.57 cm		4.06 cm

The group objects position values grow a little (+0.66 cm in both directions) compared to the odt original, but these new values are read by both software correctly.
This looks like a bit of an export problem.

		45 deg text – H	45 deg text – W
ODT orig	5.91 cm		3.41 cm
DOCX-Writer	6,57 cm		4.07 cm
DOCX-Word	-5.55 cm	-3.05 cm

		Yellow – H	Yellow – W
ODT orig	5.91 cm		3.41 cm
DOCX-Writer	6,57 cm		4.07 cm
DOCX-Word	-5.91 cm	-3.40 cm

The shapes with the text and the yellow rectangle are inside the group yet their horizontal and vertical positioning is indicated as being the same as the group objects.

Words UI shows the position of the grouped objects relative to the top left corner of the group.

The yellow rectangle seemingly got the original position values of the grouping shape, with a negative sign, while the shape with the text got some "random-looking" values.
Comment 4 NISZ LibreOffice Team 2021-05-10 11:05:08 UTC
Created attachment 171822 [details]
Properties of the shape with text in Writer in ODT and DOCX formats
Comment 5 NISZ LibreOffice Team 2021-05-10 11:06:49 UTC
Created attachment 171823 [details]
Properties of the shape with text in Word docx and the original in Writer
Comment 6 Regina Henschel 2021-07-11 18:51:41 UTC
Patch is in https://gerrit.libreoffice.org/c/core/+/118748
Comment 7 Commit Notification 2021-07-13 08:57:11 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

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

tdf#141786 correct position of child elements in group

It will be available in 7.3.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 8 Commit Notification 2021-07-13 13:18:44 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

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

tdf#141786 correct position of child elements in group

It will be available in 7.2.0.2.

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 9 Xisco Faulí 2021-07-21 22:07:32 UTC
*** Bug 122966 has been marked as a duplicate of this bug. ***
Comment 10 Regina Henschel 2021-07-23 12:22:31 UTC
When I saw the error in export of polyline in the code, I have fixed it. I did not know, that there exists bug 122966 for it. So bug 122966 is not really a duplicate of this bug. Now the connection is visible and only formal aspects are not worth further work on it.
Comment 11 NISZ LibreOffice Team 2021-07-26 08:20:49 UTC
*** Bug 123618 has been marked as a duplicate of this bug. ***
Comment 12 NISZ LibreOffice Team 2021-07-26 08:32:43 UTC
*** Bug 123328 has been marked as a duplicate of this bug. ***
Comment 13 NISZ LibreOffice Team 2021-07-26 14:01:21 UTC
*** Bug 123620 has been marked as a duplicate of this bug. ***
Comment 14 Justin L 2021-11-18 12:20:09 UTC
*** Bug 135314 has been marked as a duplicate of this bug. ***