Bug 120262 - Fileopen DOC: floating tables piled on top of each other - probably due to in-line tables not wrapping around flies
Summary: Fileopen DOC: floating tables piled on top of each other - probably due to in...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: low minor
Assignee: Miklos Vajna
URL:
Whiteboard: target:24.2.0 target:7.6.0.2 target:7...
Keywords: bibisected, bisected, filter:doc
: 116292 (view as bug list)
Depends on: 76022
Blocks: DOC-Tables RTF-Floatingtable
  Show dependency treegraph
 
Reported: 2018-10-02 08:34 UTC by Timur
Modified: 2024-01-15 21:44 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
DOCX, nocompat mode (21.54 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-07-13 12:57 UTC, Miklos Vajna
Details
Shape wrapping (nocompat mode) (14.66 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-07-14 06:31 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2018-10-02 08:34:13 UTC
The sample DOC attachment 118608 [details] from Bug 94135 has the additional regression from LO 6.0 that tables are imported with reduced width. 
Tested with 6.2+.
PDF attachment 118609 [details] is as it should look - exported with Word Viewer on Windows.
Comment 1 BogdanB 2018-10-02 18:30:21 UTC
I tried to bibisect with 5.4 and 6.0, but no succes.
On 5.4 ALL versions are good.
On 6.0 ALL versions are bad.
Comment 2 raal 2018-10-02 19:07:18 UTC
This seems to have begun at the below commit.
Adding Cc: to Mike Kaganski ; Could you possibly take a look at this one?
Thanks
 a9e158faa9a56abbd94125550076c41bb402b36a is the first bad commit
commit a9e158faa9a56abbd94125550076c41bb402b36a
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Sep 12 22:05:32 2017 +0200

    source a952d1f59f4f84380b82f1eb9e550b8f69c4be5d

author	Mike Kaganski <mike.kaganski@collabora.com>	2017-09-12 13:54:26 +0300
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2017-09-12 14:28:23 +0200
commit a952d1f59f4f84380b82f1eb9e550b8f69c4be5d (patch)
tree b1ea98ccf222a73ecd395c9517d2b9d895b68ed5
parent 83748e50026bff56aaa1c2f7bfb0b1557344d72c (diff)
tdf#112346: take Word no-wrap limit into account also for ww8
Comment 3 Mike Kaganski 2018-10-02 19:22:07 UTC
Please use more appropriate wording here. No regression in 6.0 - what you see is actually a great improvement over 5.4:

in 5.4, all the data below first page was hidden (because of the table being put into a floating frame); in 6.0, it's imported ~normally, but for some reason, with main table being a bit too close to the top-right floating rectangle, which causes its wrapping to shrink the main table on first page. Inserting a newline above the main table "fixes" the layout.

Currently, I can't invest into fixing the space above the table; but again - this isn't a regression at all.
Comment 4 Timur 2018-10-04 08:46:11 UTC
I set to "minor" than. Sorry for the noise.
Comment 5 Timur 2019-10-03 07:40:00 UTC
Repro 6.4+ as seen in screenshot attachment 154719 [details].
Comment 6 QA Administrators 2021-10-03 04:07:31 UTC Comment hidden (obsolete, spam)
Comment 7 Justin L 2023-05-30 23:37:13 UTC
These tables are now floating due to 7.6 work.
Unfortunately they are now piled on top of each other.

A couple of one-row tables are there which are not floating. They add some "structure" to the document. I guess they don't wrap around flies, and thus have one in between files becomes a new "paragraph" for the floating table to align to.
Comment 8 Justin L 2023-06-09 13:48:59 UTC
I assume at this point this is just a duplicate of bug 76022 - marking it as a dependency.

The problem of "first table shrunk in width to parallel wrapped around fly" was solved in 7.6.
Comment 9 Justin L 2023-06-09 16:42:03 UTC
This document looks to be designed pretty much identically to the minimal reproducer in bug 137822 comment 5.
Comment 10 Miklos Vajna 2023-07-13 12:57:04 UTC
Created attachment 188349 [details]
DOCX, nocompat mode

This DOC file has a number of problems. I attach an easier bugdoc as a start: this is DOCX and it's new enough that it doesn't trigger the "compatibility mode" of Word (i.e. >= 2013). I'll try to get this working first, then let's re-visit the original problem, which is harder.
Comment 11 Miklos Vajna 2023-07-14 06:31:16 UTC
Created attachment 188367 [details]
Shape wrapping (nocompat mode)

Interesting this is not specific to floating table, the attached document is just a normal shape and it has the very same problem. Looks like Writer will wrap an empty paragraph if there is almost 0 space on the side of the object, while Word has some minimal space requirement here.
Comment 12 Commit Notification 2023-07-14 09:01:16 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8bd30999098567b3bdb84a6ca65c071952192932

tdf#120262 sw floattable: don't wrap text around fly when no content would fit

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 13 Miklos Vajna 2023-07-14 12:19:34 UTC
This only fixes part of the bug.
Comment 14 Commit Notification 2023-07-17 09:21:50 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#120262 sw floattable, legacy: fix text wrap around fly when no content fits

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 15 Miklos Vajna 2023-07-17 09:24:06 UTC
Still part of the page 2 table goes to page 1, needs more fixing.
Comment 16 Commit Notification 2023-07-18 09:41:27 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9a5d1c250cbaac855b3e63d8c5fa0882ba7d14a2

tdf#120262 sw floattable, legacy: go outside body only for page frame vert pos

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 17 Miklos Vajna 2023-07-18 10:07:07 UTC
No more overlap, but some half row is still clipped on page 1 bottom, needs more work.
Comment 18 Commit Notification 2023-07-19 09:09:13 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

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

tdf#120262 sw floattable: don't wrap text around fly when no content would fit

It will be available in 7.6.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 19 Commit Notification 2023-07-19 10:18:26 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/45574624ff05673d44f11cdbbbb49e1af599133e

tdf#120262 sw floattable: no split when none of first row fits the vert space

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 20 Miklos Vajna 2023-07-19 10:20:24 UTC
Looks reasonable on master now, I think.
Comment 21 Commit Notification 2023-07-31 09:47:14 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/2e2398ee7b9e2115f6b691f107a6223455d72ef6

tdf#120262 sw floattable, legacy: fix text wrap around fly when no content fits

It will be available in 7.6.1.

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 22 Commit Notification 2023-07-31 09:50:17 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/693ad3aadbf84afa750af73c330fe7e09b38a2e7

tdf#120262 sw floattable, legacy: go outside body only for page frame vert pos

It will be available in 7.6.1.

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 23 Commit Notification 2023-08-02 06:12:46 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/7278c1facfd675dd1972a01370de4425704d9a16

tdf#120262 sw floattable: no split when none of first row fits the vert space

It will be available in 7.6.1.

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 24 Gabor Kelemen (allotropia) 2023-09-18 09:28:33 UTC
*** Bug 116292 has been marked as a duplicate of this bug. ***