Created attachment 197863 [details] Example file from Word 2021 Attached document has two different page breaks: page break and section break. The Heading 1 after these has 18 pt spacing before set. In Word 2021 this spacing is ignored after a page break, but not after the section break. In Writer it started to be ignored in both cases. 1. Open attached file 2. Go to the second and third pages -> the Heading 1 paragraph should have the spacing before applied at the top of the third page, but it is missing. Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 83910246044c1e05a3b50e25d21ac6a31566cc38 CPU threads: 6; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win Locale: en-GB (en_GB); UI: en-US Calc: threaded Seems to have started in 24.2.4 with: https://git.libreoffice.org/core/+/abd90828cf101581a07b9d1c371a8c3156521e9f%5E%21 author Miklos Vajna <vmiklos@collabora.com> Tue May 07 08:13:37 2024 +0200 committer Michael Stahl <michael.stahl@allotropia.de> Tue May 14 11:15:21 2024 +0200 tree 0c32f30b545248604ac19bdf09dc7a8c1433b4db parent 95fdda2f027f2bcdd135b3f55c549d6f2339e086 [diff] tdf#160952 sw: ignore top margin of para on non-first pages with newer DOCX Adding CC to: Miklos Vajna
Created attachment 197864 [details] The example file in Word 2021 and Writer master
Can repro on: Version: 25.2.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: ab60c81f77f45315ba3cfc7cae6c1d9144588663 CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb) Locale: en-GB (en_GB.UTF-8); UI: en-US Calc: threaded
Thanks, interesting. Do you understand the Word behavior here? Why is the margin ignored in case of the above commit's bugdoc, but not here? Is that because top margins should be ignored after implicit breaks, but not when there is an explicit "section break (next page)"?
It's a mess, page break ignores whitespace, but not "section break (next page)". I'll take a look.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ae7900dd42a65aaf60df6b21b9ad511496b209d9 tdf#164095 sw: fix missing top margin on paragraph after changing page style It will be available in 25.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.
Should work now. Note that the commit adds a test doc that shows the top margin is wanted after "section break (next page)", but not after an explicit page break, so we do that to match Word.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-25-2": https://git.libreoffice.org/core/commit/64a5c93d4230ff0deccf2cccbaec52463ff07149 tdf#164095 sw: fix missing top margin on paragraph after changing page style It will be available in 25.2.0.0.beta2. 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.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/222b0cf18578d7407d67ef52370313b64bb1d7d7 tdf#164095 sw: fix missing top margin on paragraph after changing page style It will be available in 24.8.5. 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.