Created attachment 191557 [details] Example file from Word 2016 While looking at attachment 103717 [details] of bug 81942 I noticed that there is now an empty page in the beginning of the document. 1. Open attached file (minimized from attachment 103717 [details]) -> 2 pages instead of one Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 2eb428a8890dda29fbdc8b639fc1377080fab59f CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: threaded Not reproducible in bibisect-win-24.2 repo, only in the nightly. Does not happen, if the table is made non-floating in Word.
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.