Bug 158986 - FILEOPEN: RTF: Extra page break
Summary: FILEOPEN: RTF: Extra page break
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+ Master
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:24.8.0 target:24.2.2 target:24...
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2024-01-02 17:51 UTC by Xisco Faulí
Modified: 2024-03-28 14:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Comparsion MSO vs LibreOffice 24.8 master (225.68 KB, image/png)
2024-01-02 17:51 UTC, Xisco Faulí
Details
DOCX version of the bugdoc, converted using Word. (29.59 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-02-22 08:53 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2024-01-02 17:51:56 UTC
Created attachment 191709 [details]
Comparsion MSO vs LibreOffice 24.8 master

Steps to reproduce:
1. Open attachment 86496 [details] from bug 69782

-> There is a page break between page 1 and 2. See comparison

Reproduced in

Version: 24.2.0.0.beta1+ (X86_64) / LibreOffice Community
Build ID: 0034d2ab9382da86340738137218791a4ccc9c90
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: fr-FR (es_ES.UTF-8); UI: en-US
Calc: threaded

[Bug found by office-interoperability-tools]
Comment 1 Xisco Faulí 2024-01-02 17:52:32 UTC
Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.com>	2023-05-30 08:21:33 +0200
committer	Miklos Vajna <vmiklos@collabora.com>	2023-05-30 12:49:52 +0200
commit d785d26a5599d3d546b96958b0f1c6d5ed777a0d (patch)
tree 781599f1be544d032738fa1ba3e4628cacae1d40
parent 5655cc201e5a80997fe21bc2a0c7abcbe4fb488f (diff)
sw floattable: handle \nobrkwrptbl in the RTF filter

Bisected with: bibisect-linux64-7.6
Comment 2 Miklos Vajna 2024-02-22 08:53:02 UTC
Created attachment 192708 [details]
DOCX version of the bugdoc, converted using Word.

Hmm, it appears to me that the RTF import just started using part of the Writer layout after the above commit, but the root of the problem is that Writer layout misbehaves.

I attach the bugdoc that is the same as the RTF one, just converted to DOCX, that looks OK with linux-64-24.2.git oldest, but breaks with linux-64-24.2.git master.

bibisecting leads to:

commit c303981cfd95ce1c3881366023d5495ae2edce97
Author:     Michael Stahl <michael.stahl@allotropia.de>
AuthorDate: Wed Aug 23 15:50:59 2023 +0200
Commit:     Michael Stahl <michael.stahl@allotropia.de>
CommitDate: Thu Aug 24 12:43:25 2023 +0200

    tdf#156724 sw: layout: fix tables not splitting due to footnotes differently

Xisco, what do you think how we should proceed here? An option is that I just disable floating table import from RTF to "fix" the regression (but the problem will be there still with DOCX), an other option is to say that this is layout problem that RTF exposed and focus on fixing DOCX, which would potentially mean updating the "regression by" field. Thanks.
Comment 3 Miklos Vajna 2024-02-23 07:04:07 UTC
Nevermind, I'll look at the DOCX/layout side.
Comment 4 Commit Notification 2024-02-23 09:53:18 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/397d72e582c725d162c7e0b819dc6c0bb62e42b0

Related: tdf#158986 sw floattable: fix unexpected page break with sections

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.
Comment 5 Miklos Vajna 2024-02-23 15:32:50 UTC
Let me see the actual RTF problem.
Comment 6 Commit Notification 2024-02-26 08:17:52 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#158986 sw floattable: fix RTF import of table followed by \sect

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.
Comment 7 Xisco Faulí 2024-02-27 08:44:33 UTC
Verified in

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 589ac948c0650a16c734db7337c6c31b950be151
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

@Miklos, thanks for fixing this issue!!
Comment 8 Commit Notification 2024-02-28 10:37:44 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#158986 sw floattable, RTF import: use more setNeedPar()

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.
Comment 9 Commit Notification 2024-02-29 10:05:58 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/0ed1604de9448e0898a6894d9a8262272aea4766

tdf#158986 sw floattable: fix RTF import of table followed by \sect

It will be available in 24.2.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 10 Commit Notification 2024-02-29 10:06:00 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

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

Related: tdf#158986 sw floattable, RTF import: use more setNeedPar()

It will be available in 24.2.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 11 Commit Notification 2024-03-08 19:58:50 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

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

Related: tdf#158986 sw floattable: fix unexpected page break with sections

It will be available in 24.2.3.

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.