Bug 153602 - FILEOPEN DOCX: extra CR added every roundtrip when section has a block-table (bRemove/isDummy)
Summary: FILEOPEN DOCX: extra CR added every roundtrip when section has a block-table ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:7.6.0
Keywords: bibisectNotNeeded, filter:docx
Depends on:
Blocks: DOCX-Paragraph
  Show dependency treegraph
 
Reported: 2023-02-13 22:47 UTC by Justin L
Modified: 2023-02-14 14:25 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
fdo53985.docx from ooxmlexport8 (19.64 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-02-13 22:47 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2023-02-13 22:47:16 UTC
Created attachment 185360 [details]
fdo53985.docx from ooxmlexport8

Each time the document is saved, an extra, empty paragraph is added at the end of the section.

These sections have a block table (a table directly in the w:body, not inside of a w:p paragraph) at the start of the section, and so a dummy paragraph is created. The dummy paragraph was preventing bRemove from becoming true when reaching the end of the section containing a sectPr.

Steps to reproduce:
-open the file and notice there is only one empty paragraph under each table.
-save as DOCX and reload. Now there are two empty paragraphs.
-this increases by one on every save.
Comment 1 Julien Nabet 2023-02-14 09:29:51 UTC
Let's update status since you assigned yourself.
Comment 2 Commit Notification 2023-02-14 14:21:57 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#153602 writerfilter: clear isDummyPara after processing table.

It will be available in 7.6.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.