Summary: | FILEOPEN RTF Floating table with image creates unexpected page break | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Gabor Kelemen (allotropia) <kelemeng> |
Component: | Writer | Assignee: | Justin L <jluth> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aron.budea, jluth, raal |
Priority: | medium | Keywords: | bibisected, bisected, regression |
Version: | 24.2.0.0 beta1+ | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=118828 https://bugs.documentfoundation.org/show_bug.cgi?id=158586 |
||
Whiteboard: | target:24.8.0 target:24.2.0.2 target:7.6.6 | ||
Crash report or crash signature: | Regression By: | Justin Luth | |
Bug Depends on: | |||
Bug Blocks: | 155045 | ||
Attachments: |
Example file from Word 2016
The example file in Word 2016 and Writer floating-table_min.rtf: minimized version of attachment_191557 |
Description
Gabor Kelemen (allotropia)
2023-12-22 08:30:30 UTC
Created attachment 191558 [details] The example file in Word 2016 and Writer Don't worry about the table itself falling apart, that's bug 118828 I can confirm with 24.2 This seems to have begun at the below commit in bibisect repository/OS linux-64-24.2. Adding Cc: to Justin Luth ; Could you possibly take a look at this one? Thanks 5f1178b545f19fea22f7d3101d821c335964edbe is the first bad commit commit 5f1178b545f19fea22f7d3101d821c335964edbe Author: Jenkins Build User <tdf@maggie.tdf> Date: Tue Dec 19 17:03:43 2023 +0100 source 7abb319821e641599f92e5f4ad2d7c0e377851fa 160984: tdf#158586 RTF writerfilter: substitute hasProperties for inFrame | https://gerrit.libreoffice.org/c/core/+/160984 Created attachment 191606 [details]
floating-table_min.rtf: minimized version of attachment_191557
Ahh, RTF. No good deed goes unpunished.
This is related to the \pagebb command (break page before paragraph). Simply removing that from both examples "fixes" the problem.
As I minimized the document, it really seemed to depend on several unrelated factors like having a shape defined etc. Prior to my fix, this minimized document lost the floating table. So I think my patch is fine, but there are just a TON of RTF bugs that will float to the surface. I assume it previously just "got lost" as the page break got applied to paragraph properties that were never applied as we jump from frame to shape to {\cell}.
This \pagebb is defined first thing - before any paragraph etc. Therefore it probably should just be ignored.
(In reply to Justin L from comment #4) I assume it previously just "got lost" Nope - the page break in floating-table.rtf is tied to the "c" paragraph (which ought to be in the table). After my patch, there is an extra paragraph ahead of that, so now the page break "exhibits" itself. Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/4399bccc5ee5a3fa69a8818e7ae265c144d33d64 tdf#158826 rtfimport: ignore page break before document starts It will be available in 24.8.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. Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/8d37b8e6430715860934ccaec8c0d1b448ac4d8c tdf#158826 rtfimport: ignore page break before document starts It will be available in 24.2.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. Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/f2ebcfc09a9d2bac9792b0215f5d97bd990ffcef tdf#158826 rtfimport: ignore page break before document starts It will be available in 7.6.6. 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. |