Bug 166553 - FILEOPEN DOCX: Heading 1 split by page break becomes "Normal" style after the page break
Summary: FILEOPEN DOCX: Heading 1 split by page break becomes "Normal" style after the...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3 all versions
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:26.2.0 target:25.8.1
Keywords: filter:docx
Depends on:
Blocks: DOCX-Paragraph
  Show dependency treegraph
 
Reported: 2025-05-12 15:52 UTC by Justin L
Modified: 2025-08-01 11:58 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
splitParaTopMargin.docx (17.98 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-05-12 15:52 UTC, Justin L
Details
forum-mso-en-3220_minimal.docx: minimized sample. (23.83 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-07-29 20:27 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2025-05-12 15:52:08 UTC
Created attachment 200757 [details]
splitParaTopMargin.docx

Steps to reproduce:
1.) open splitParaTopMargin.docx

Look at page 2. This should be a continuation of the Heading 1 page style, but it obviously is very different as can be seen by the non-blue, non-bold, smaller text.

This never worked. There was no page break at all in OOo 3.3. When the page break appeared in LO 4.3, then this issue could be observed.

Note that our import of the DOC version of this file (attachment 200755 [details] from bug 166552) does NOT exhibit this problem.
Comment 1 Justin L 2025-07-29 20:27:25 UTC
Created attachment 202070 [details]
forum-mso-en-3220_minimal.docx: minimized sample.

This bug report became a bit more important because I just exposed it with my 25.8 fix for bug 166544.

The fix looks pretty straight forward. In DomainMapper::lcl_startParagraphGroup(), capture the state of m_pImpl->m_bIsSplitPara and then don't force default paragraph style.
Comment 2 Justin L 2025-07-30 13:23:56 UTC
ooxmlexport4's testTdf81345_045Original also clearly shows this for columns. Fixed in 7.6 is the lost column break (bug 153592), but now the green "Section Heading" style is missing on the heading "Microsoft Visual Studio 2005".
Comment 3 Commit Notification 2025-07-30 19:09:55 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#166553 writerfilter: don't force para style when IsSplitPara

It will be available in 26.2.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 Commit Notification 2025-07-31 00:00:26 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

related tdf#166553 writerfilter: remove column-only mbIsSplitPara

It will be available in 26.2.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 Commit Notification 2025-08-01 07:25:35 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/051e3f7490541e1a67111b7f8cf72fa5d2a1bb96

tdf#166553 writerfilter: don't force para style when IsSplitPara

It will be available in 25.8.1.

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.