Bug 158855 - An extra empty paragraph appears after a table before a section break in DOCX
Summary: An extra empty paragraph appears after a table before a section break in DOCX
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:24.8.0 target:24.2.0.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Tables DOCX-Section
  Show dependency treegraph
 
Reported: 2023-12-25 09:02 UTC by Mike Kaganski
Modified: 2024-01-03 09:27 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
A table and a section break (12.29 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-12-25 09:02 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2023-12-25 09:02:24 UTC
Created attachment 191589 [details]
A table and a section break

The attached DOCX has a table covering the whole first page, and a Section Break (Next Page) immediately after the table. In total, there are two pages in the document.

Importing into Writer, the document gets an additional paragraph immediately after the table; this paragraph flows to a next page, and then the page break appears, resulting in a total of three pages.
Comment 1 Mike Kaganski 2023-12-25 09:36:45 UTC
Regression after commit 2e8aad6d45c53d554ccaf26de998ede708cfc289 (fdo#39056 fdo#75431 Section Properties if section starts with table, 2014-04-24).
Comment 2 Mike Kaganski 2023-12-25 10:03:48 UTC
https://gerrit.libreoffice.org/c/core/+/161275
Comment 3 Commit Notification 2023-12-25 12:23:59 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#158855: Make sure to not add extra paragraph after a table in a section

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 4 Timur 2023-12-25 14:47:16 UTC
Thanks Mike, looking good to me, also when saved and opened in MSO.
Comment 5 Commit Notification 2024-01-03 09:27:07 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/62e8b576b287111bd0dc79e71334f77dcf909938

tdf#158855: Make sure to not add extra paragraph after a table in a section

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.