Bug 118528 - FILEOPEN ODT Table rendered in wrong position. Position change reverts after save.
Summary: FILEOPEN ODT Table rendered in wrong position. Position change reverts after ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.2.0 target:6.1.1
Keywords: bibisected, bisected, regression
: 114908 (view as bug list)
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2018-07-03 18:17 UTC by CK
Modified: 2018-07-25 09:35 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Problematic document using tables (257.15 KB, application/vnd.oasis.opendocument.text)
2018-07-03 18:17 UTC, CK
Details

Note You need to log in before you can comment on or make changes to this bug.
Description CK 2018-07-03 18:17:53 UTC
Created attachment 143296 [details]
Problematic document using tables

How to reproduce:
1-Open attached document. A table with two columns, and one row is rendered as being halfway down the first page.
2-Select the first row in the top table (has red lower border)
3-Make a edit to the table, for example change color of border
4>>This causes the table to jump up to its correct position at the top of the page.
5-Save document and close it. Reopen document. 
6>>We're now back to the rendering of #1 (except for the color-change) with the table starting halfway down the page.

(Exporting as pdf is true to what is displayed on screen)
Comment 1 Dieter Praas 2018-07-03 18:59:55 UTC
CK, I confirm the behaviour, but I don't know, if this is a bug or not. I noticed, that you have four tables, but I don't know why. I don't think, that this is necessary. Perhaps something went wrong by creating the tables.
Comment 2 Buovjaga 2018-07-15 15:39:07 UTC
Bisected with Win 5.2 repo to https://cgit.freedesktop.org/libreoffice/core/commit/?id=0d127baed75929e744d5b6249f510012cfbc0e88

tdf#91083 - .doc: emulate table keep-with-next paragraph
connect table with the following paragraph.  Move forward to a new page
together with the following paragraph if necessary.

There is a heading in the problematic table. If I untick "Keep with next paragraph" from Heading 1's style Text flow, the position change does not revert.

Adding Cc: to Justin Luth

Justin can decide if this is a bug or not.
Comment 3 Justin L 2018-07-17 05:58:25 UTC
Yes, four tables (one row/two column), and all four have the first paragraph with a heading style. So the emulation logic (all rows keep with next) is kicking in because all rows (1) have the first paragraph in the row with a "keep with next" property.

So far, all the complaints about this patch have been related to styles, and the export emulation writes the keep property directly into the paragraph, so I can improve this by ignoring the style values.
Comment 4 Commit Notification 2018-07-18 19:18:27 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ef86b2e7a08ea25c434db85087d094f030f762cc

tdf#118528 sw layout: only direct formatting for EmulateTableKeep

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Justin L 2018-07-18 19:25:10 UTC
*** Bug 114908 has been marked as a duplicate of this bug. ***
Comment 6 Commit Notification 2018-07-25 08:21:23 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6db143f43874a817b7a920dea41939bf9439ca9b&h=libreoffice-6-1

tdf#118528 sw layout: only direct formatting for EmulateTableKeep

It will be available in 6.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.