Bug 92525 - docx export: Text position in shape not correct
Summary: docx export: Text position in shape not correct
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.0.0.2 rc
Hardware: Other All
: medium normal
Assignee: Attila Bakos (NISZ)
URL:
Whiteboard: target:7.3.0 target:7.2.0.0.beta2
Keywords: filter:docx
: 122898 142398 142601 (view as bug list)
Depends on:
Blocks: Shape-ODF-OOXML-export
  Show dependency treegraph
 
Reported: 2015-07-03 14:16 UTC by ralf.krapf
Modified: 2022-04-04 08:54 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (206.80 KB, image/png)
2015-07-03 14:17 UTC, ralf.krapf
Details
Original odt file (10.43 KB, application/vnd.oasis.opendocument.text)
2015-07-03 14:17 UTC, ralf.krapf
Details
Exported docx file with LO5002 (5.99 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-07-03 14:18 UTC, ralf.krapf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ralf.krapf 2015-07-03 14:16:41 UTC
The export of attached file goes wrong:
The text appears in the docx on the left side, instead of goes with the middle of the shape as in the original file.

Easy to see in the screenshot.

Cheers
Comment 1 ralf.krapf 2015-07-03 14:17:07 UTC
Created attachment 117022 [details]
Screenshot
Comment 2 ralf.krapf 2015-07-03 14:17:38 UTC
Created attachment 117023 [details]
Original odt file
Comment 3 ralf.krapf 2015-07-03 14:18:00 UTC
Created attachment 117024 [details]
Exported docx file with LO5002
Comment 4 raal 2015-07-04 04:56:51 UTC
I can confirm with Version: 5.1.0.0.alpha1+
Build ID: 7790b6a4544cf2d5ba0bcdfae31346cf2f9a0041
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-06-26_23:51:00
and word2010
Comment 5 QA Administrators 2016-09-20 10:31:57 UTC Comment hidden (obsolete)
Comment 6 ralf.krapf 2016-09-20 20:02:50 UTC
And also the same with LO 5.2.1.2.
Comment 7 Telesto 2016-12-10 13:53:24 UTC
Repro with:
Version: 5.4.0.0.alpha0+
Build ID: b894104a0b02a9b074c76feb925389d7bee6a493
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-12-10_01:00:52
Locale: nl-NL (nl_NL); Calc: CL
Comment 8 QA Administrators 2017-12-11 08:54:57 UTC Comment hidden (obsolete)
Comment 9 Xisco Faulí 2018-11-12 15:43:38 UTC
Still reproducible in

Version: 6.2.0.0.alpha1+
Build ID: 3a99ae072ac170ebed8d1f5bf65913d3412fab67
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 10 Regina Henschel 2019-10-09 17:02:17 UTC
The position of the text is determined by the draw:text-areas element. It is not the default text area, but calculated by formulas. LibreOffice (as of 6.4) is not able to export formulas to OOXML.

Using fixed values is only seemingly a solution. The values in ODF are relative to the internal coordinate system of the shape and therefore the effective position and size of the text area adapts automatically, when the user changes the size of the shape. But OOXML uses global units. Therefore the text area would become wrong, when the shape is resized. For example, if the right edge of the text area is set to 4cm, that is in the middle of a 8cm width shape, but extends the shape in case the shape is only 3cm wide.

There is no immediate solution possible.
Comment 11 Commit Notification 2021-06-23 10:58:07 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/63cd67e5e18f01aca303131e148c80398a181a41

tdf#92525 tdf#142398: fix export of simple custom shapes

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 12 Attila Bakos (NISZ) 2021-06-23 11:29:27 UTC
*** Bug 122898 has been marked as a duplicate of this bug. ***
Comment 13 Attila Bakos (NISZ) 2021-06-23 11:30:25 UTC
*** Bug 142398 has been marked as a duplicate of this bug. ***
Comment 14 Commit Notification 2021-06-24 08:34:52 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/0cfa76c0a1883289f8406551d0494cc2a30df926

tdf#92525 tdf#142398: fix export of simple custom shapes

It will be available in 7.2.0.0.beta2.

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 15 BogdanB 2021-06-26 11:22:31 UTC
Verified. Solved in
Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: f446a203fa2897bab8ae7686c948a8bf060675c6
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-24_15:16:38
Calc: threaded
Comment 16 Attila Bakos (NISZ) 2021-07-02 08:38:00 UTC
*** Bug 142601 has been marked as a duplicate of this bug. ***