Bug 144045 - FILEOPEN DOCX Text boxes slip into table
Summary: FILEOPEN DOCX Text boxes slip into table
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0 target:7.3.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Textbox DOCX-Floatingtable
  Show dependency treegraph
 
Reported: 2021-08-24 07:06 UTC by Aron Budea
Modified: 2022-01-27 13:34 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample DOCX (20.85 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-08-24 07:06 UTC, Aron Budea
Details
Screenshot from Word (54.12 KB, image/png)
2021-08-24 07:06 UTC, Aron Budea
Details
Screenshot from Writer in 7.3 (112.19 KB, image/png)
2021-08-24 07:08 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2021-08-24 07:06:25 UTC
Created attachment 174506 [details]
Sample DOCX

Open the attached DOCX, coming from Word.

Note how the text boxes slip into the table.

The table itself is a floating table, so some quirks could be expected, however the document looked fairly close to the original until the following commit, bibisected using repo bibisect-linux-64-7.1. Adding CC: to Daniel Arato.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=c9eb53f200225f2ee6ca695e1326843a487aee51
author		Daniel Arato (NISZ) <arato.daniel@nisz.hu>	2020-10-14 15:46:23 +0200
committer	László Németh <nemeth@numbertext.org>	2020-10-27 13:27:55 +0100

tdf#135198 sw editing: text box fell out of its shape
Comment 1 Aron Budea 2021-08-24 07:06:58 UTC
Created attachment 174507 [details]
Screenshot from Word
Comment 2 Aron Budea 2021-08-24 07:08:55 UTC
Created attachment 174508 [details]
Screenshot from Writer in 7.3
Comment 3 Dániel Arató (NISZ) 2021-09-29 14:27:39 UTC
The commit before c9eb53f20022, the one found with bisect was ebea072fa7d7.
Using ebea072fa7d7, you ostensibly get the text boxes positioned correctly, but if you try to select them you will find that they are detached from the frames they are supposed to be in. All c9eb53f20022 did was make this problem more apparent.

So the real problem is the frames themselves being stuck inside the table, not the text boxes per se.
Comment 4 Aron Budea 2021-09-29 15:51:05 UTC
Good catch, thanks for pointing that out! Turns out that's a regression as well, and could be bibisected to the following commit using repo bibisect-linux-64-7.0.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=27d04f6dbf38aa28fb7215590d578c4567db5770
author		Attila Bakos <bakos.attilakaroly@nisz.hu>	2020-03-19 14:40:36 +0100
committer	László Németh <nemeth@numbertext.org>	2020-04-07 12:44:17 +0200

tdf#119038 DOCX: fix FollowTextFlow handling
Comment 5 Attila Bakos (NISZ) 2021-09-30 09:31:59 UTC
(In reply to Aron Budea from comment #4)
> Good catch, thanks for pointing that out! Turns out that's a regression as
> well, and could be bibisected to the following commit using repo
> bibisect-linux-64-7.0.
> 
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=27d04f6dbf38aa28fb7215590d578c4567db5770
> author		Attila Bakos <bakos.attilakaroly@nisz.hu>	2020-03-19 14:40:36 +0100
> committer	László Németh <nemeth@numbertext.org>	2020-04-07 12:44:17 +0200
> 
> tdf#119038 DOCX: fix FollowTextFlow handling

After I fix the Group Shape Text Box supporting tickets, I will fix this one as well. Unfortunately, is seems to me the LayoutInCell option in Word not really equals to FollowTextFlow, as that commit maps that.
Solution might be introducing a new function something like LayoutInCell to Writer, or introducing a new compat-flag which modifies FllowTextFlow in that cases like this.
Fix coming soon, and
Adding CC: to Attila Bakos
Comment 6 Attila Bakos (NISZ) 2022-01-26 15:17:54 UTC
(In reply to Attila Bakos (NISZ) from comment #5)
> (In reply to Aron Budea from comment #4)
> > Good catch, thanks for pointing that out! Turns out that's a regression as
> > well, and could be bibisected to the following commit using repo
> > bibisect-linux-64-7.0.
> > 
> > https://cgit.freedesktop.org/libreoffice/core/commit/
> > ?id=27d04f6dbf38aa28fb7215590d578c4567db5770
> > author		Attila Bakos <bakos.attilakaroly@nisz.hu>	2020-03-19 14:40:36 +0100
> > committer	László Németh <nemeth@numbertext.org>	2020-04-07 12:44:17 +0200
> > 
> > tdf#119038 DOCX: fix FollowTextFlow handling
> 
> After I fix the Group Shape Text Box supporting tickets, I will fix this one
> as well. Unfortunately, is seems to me the LayoutInCell option in Word not
> really equals to FollowTextFlow, as that commit maps that.
> Solution might be introducing a new function something like LayoutInCell to
> Writer, or introducing a new compat-flag which modifies FllowTextFlow in
> that cases like this.
> Fix coming soon, and
> Adding CC: to Attila Bakos

Group Shapes are ready, so fix is there:  https://gerrit.libreoffice.org/c/core/+/128413 tdf#144045 tdf#142484 Limit off-page positioning to textboxes
Comment 7 Aron Budea 2022-01-26 23:39:51 UTC
For the record Miklos had two fixes related to this that make the sample DOCX look nice already:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=3eb6d764b3023500f2299d36bf1860bc8e67db9f
https://cgit.freedesktop.org/libreoffice/core/commit/?id=e993638d5ecd33783f2eebdccfa87a81e5a8a2c5

Of course further related fixes/improvements awe always welcome.
Comment 8 Attila Bakos (NISZ) 2022-01-27 08:18:58 UTC
(In reply to Aron Budea from comment #7)
> For the record Miklos had two fixes related to this that make the sample
> DOCX look nice already:
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=3eb6d764b3023500f2299d36bf1860bc8e67db9f
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=e993638d5ecd33783f2eebdccfa87a81e5a8a2c5
> 
> Of course further related fixes/improvements awe always welcome.

You are right, i did not known about these fixes and make a new one. Only when i finished the test that time i recognized, the fix is independent from me. :)
Should i close this ticket as fixed?
Comment 9 Aron Budea 2022-01-27 13:04:26 UTC
Yes, I think we can, thank you!