Bug 147126 - [DOCX] Diagrams/shapes text imported was wrong font size now missing in 7.4
Summary: [DOCX] Diagrams/shapes text imported was wrong font size now missing in 7.4
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) rc
Hardware: All All
: high normal
Assignee: Attila Bakos (NISZ)
Whiteboard: target:7.4.0
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: DOCX-Grouped-Shapes
  Show dependency treegraph
Reported: 2022-02-02 11:25 UTC by Rafael Lima
Modified: 2024-02-20 14:59 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Screenshot showing the problem (179.26 KB, image/png)
2022-02-02 11:25 UTC, Rafael Lima
Sample DOCX file (76.90 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-02-02 11:26 UTC, Rafael Lima
How it looks after changing anchor type in 7.4 (193.01 KB, image/jpeg)
2022-02-04 10:09 UTC, Attila Bakos (NISZ)
Resolved Fixed (162.96 KB, image/jpeg)
2022-02-09 13:24 UTC, Attila Bakos (NISZ)

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2022-02-02 11:25:16 UTC
Created attachment 177986 [details]
Screenshot showing the problem

Font size of text within shapes/diagrams is being imported incorrectly, which breaks the shape layout.

For instance, in the attached DOCX file notice that the font size is 11pt in MS Word, but it is imported as 12pt in LO Writer (see attached screenshot).

I am using LO 7.3 rc2 on Windows, but I got the same result with LO 7.2.5 on Linux.

Weirdly, using LO 7.4 alpha, the text was not imported.
Comment 1 Rafael Lima 2022-02-02 11:26:31 UTC
Created attachment 177987 [details]
Sample DOCX file

This is the DOCX file I used to take the screenshot.
Comment 2 Timur 2022-02-02 19:45:12 UTC Comment hidden (obsolete)
Comment 3 Timur 2022-02-03 12:15:03 UTC
Bug is now about the current state and that is missing text from 7.4:
commit a0018b7bdfa3b444f90e432d5a8e79ae55feb96d
Date:   Mon Jan 3 14:43:29 2022 +0100
    source 2951cbdf3a6e2b62461665546b47e1d253fcb834
    pre cce57fd94e9335c5dd5f3725a5fe54f5d3929e8d

author	Attila Bakos (NISZ) <bakos.attilakaroly@nisz.hu> Nov 10 2021 
tdf#143574 OOXML export/import of textboxes in group shapes

CC Attila please see this.
Comment 4 Timur 2022-02-03 12:31:25 UTC
Let's keep info on font size, It was OK 11 in LO 6.4 and NOK 12 in LO 7.0.
To be opened another bug after this one.

commit cc08f5eaff12abdf2eccad93df3520cc08735e2c
Date:   Fri Nov 22 11:07:19 2019 +0100
    source 334409fbde555a957cd34e295cc27f2c2bf6e194
    pre a2fbc48afdaf693f1a24e1de5cea21250bfab5ed

author	Justin Luth <justin.luth@collabora.com>	Tue Oct 22 2019 
tdf#128153 docx/VML: apply style properties to shape text
Comment 5 Attila Bakos (NISZ) 2022-02-04 10:09:04 UTC
Created attachment 178034 [details]
How it looks after changing anchor type in 7.4

I have just seen this.
The problem likely the missing implementation of As_char anchor for group-shapes in textboxhelper, what i am working for now. If you change the anchor to another type (at char for example as in my attachemnt) what is implemented the text will be shown. Of course this have to be fixed, so i am on it. Patch soon. :)
And, the font size is fixed ;)
Comment 6 Attila Bakos (NISZ) 2022-02-09 13:24:23 UTC
Created attachment 178168 [details]
Resolved Fixed

There is the patch for this:
After i finish the test for it, and passes Jenkins it can be merged, and the problem will be fixed as in my attachment...
Comment 7 Commit Notification 2022-03-01 16:53:57 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "master":


tdf#147126 sw: fix missing as_char anchoring of group textboxes

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:

Affected users are encouraged to test the fix and report feedback.
Comment 8 Timur 2022-03-04 15:20:29 UTC
I set Verified. Thanks.
Comment 9 Attila Bakos (NISZ) 2022-03-07 12:26:05 UTC
you are welcome!