Bug 138039 - sw: frame in table cell layouted incorrectly
Summary: sw: frame in table cell layouted incorrectly
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.1.0 target:7.0.4
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-06 13:18 UTC by Vasily Melenchuk (CIB)
Modified: 2022-05-23 07:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test ODT file (28.84 KB, application/vnd.oasis.opendocument.text)
2020-11-06 13:19 UTC, Vasily Melenchuk (CIB)
Details
Test ODT compared in LO MSO and FO (150.79 KB, image/png)
2020-11-11 09:29 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vasily Melenchuk (CIB) 2020-11-06 13:18:51 UTC
Description:
Sample document contains set of differences caused by modified table cells/rows splitting mechanism.

Steps to Reproduce:
1. Open attached document in Writer


Actual Results:
* There is just one page in document and image is located atop of other content.
* Once image is removed it is visible that frame with red text is located at page bottom
* Writer freezes for a while during document layouting (this time is rather short with attached minimized document, but on real world example load time increased from ~4 seconds to ~12)

Expected Results:
* Document contains 2 pages: first page with tables and image is gone to second page.
* Frame with red text is located above main text area, somewhere in header area
* Document is loaded faster


Reproducible: Always


User Profile Reset: No



Additional Info:
All these differences did happen due to:

commit 6f5024de2e1a5cc533527e45b33d9a415467c48d
Author: Mike Kaganski <mike.kaganski@collabora.com>
Date:   Thu Dec 8 23:01:03 2016 +0300

    tdf#104425 sw: split rows w/large min height (fix layout loop)
    
    This solves the problem of rows with too big minimal height causing
    layout failure (the table just goes out of page, does not flow to
    next page).

Once I revert this commit, document is displayed as expected and as it was in 5.2 and before.

Additionally same behavior can be reached by disabling ConsiderTextWrapOnObjPos in document settings.
Comment 1 Vasily Melenchuk (CIB) 2020-11-06 13:19:14 UTC
Created attachment 167062 [details]
Test ODT file
Comment 2 Timur 2020-11-11 09:29:58 UTC
Created attachment 167187 [details]
Test ODT compared in LO MSO and FO
Comment 3 Telesto 2020-11-12 13:20:39 UTC
They identified commit is causing more trouble. Search for the commit hash or look at they see also at bug 104425. Mostly table loops :-(

I would be nice if they other bugs could be included instead of only fixing the issue here. As it probably will introduce a number of new bugs anyhow
Comment 4 Commit Notification 2020-11-16 13:44:36 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6b92d2e8522ecc98d2c5532f5076c20ae295168e

tdf#138039 tdf#134298 sw: layout: fix overlap of fly and table

It will be available in 7.1.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 5 Michael Stahl (allotropia) 2020-11-16 14:09:36 UTC
fixed on master
Comment 6 Commit Notification 2020-11-16 20:28:17 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/6f1cee347ea5057a3a1244d2f669fbb3fd272cbc

tdf#138039 tdf#134298 sw: layout: fix overlap of fly and table

It will be available in 7.0.4.

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.