Created attachment 167152 [details] Example file from Word beginning with table Attached user made document starts with a table then it contains a continous section break and a two column section, then another continous section break. When opened in Writer the first continous section break is generating an extra empty paragraph, which in the original document was enough to change the documents layout significantly. Also if the document is not starting with a table this does not happen. Steps to reproduce: 1. Open attached document Actual results: Extra empty paragraph after the one containing “F” and before the two column section. Expected results: No extra empty paragraph. LibreOffice details: Version: 7.1.0.0.alpha1+ (x64) Build ID: 00e5c63c35307faacf76a5e2ca7953c4208244ed CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL Also in: Version: 6.0.0.3 Build ID: 64a0f66915f38c6217de274f0aa8e15618924765 CPU threads: 4; OS: Windows 6.3; UI render: default; Locale: en-US (hu_HU); Calc: CL Version: 5.0.0.5 Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b Locale: hu-HU (hu_HU) Version: 4.3.0.4 Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0 Not yet in: Version: 4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71 Additional Information: Bibisected using bibisect-win32-4.3 to: URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=2e8aad6d45c53d554ccaf26de998ede708cfc289 Author: Vinaya Mandke <vinaya.mandke@synerzip.com> Date: Fri Apr 18 15:50:51 2014 +0530 fdo#39056 fdo#75431 Section Properties if section starts with table
Created attachment 167153 [details] Screenshot of the original document side by side in Word and Writer
Created attachment 167154 [details] Example file from Word beginning with paragraph
Created attachment 167155 [details] Screenshot of the document beginning with paragraph side by side in Word and Writer - good
Created attachment 167156 [details] Example file from Word without table
Created attachment 167157 [details] Screenshot of the document having no table side by side in Word and Writer - good
I confirm it with Version: 7.0.3.1 (x64) Build ID: d7547858d014d4cf69878db179d326fc3483e082 CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-GB Calc: CL in comparison with Word 2016
Created attachment 167634 [details] sectionBreak.docx: should be only 2 pages This is obviously a bRemove issue. I thought it would be as simple as - && !m_pImpl->GetIsDummyParaAddedForTableInSection() + && !(m_pImpl->GetIsDummyParaAddedForTableInSection() && m_pImpl->GetIsFirstParagraphInSection()) But it's not.
Created attachment 172087 [details] Another example file I found one more of these baddies. Here the section break is page break type (converted to simple page break), and the second page begins with a table, causing one extra paragraph to appear below the second table. Likely the same bug, but uploading anyways just in case.
Created attachment 172088 [details] attachment 172087 [details] in Word and Writer Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community Build ID: 91330c503b7eb91d777978018b66890af87cf8f5 CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL
(In reply to Justin L from comment #7) The attachment in comment 7 shows what happens if you make a bad fix. It does not demonstrate OPs problem. To fix this properly will require an IsFirstRealParagraphInSection flag. This would be similar to IsFirstParagraphInSection, but table cells turn IsFirstParagraphInSection off - and other code relies on this capability. Essentially, there needs to be one real paragraph in the section. AFAICS, bRemove should ignore GetIsDummyParaAddedForTableInSectionPage unless it is the first real paragraph in the section. Sounds easy, but with redlines, headers, footnotes, comments, shapes, tables etc it gets rather complicated... Is it really worth the hassle to address this issue? It is a rather obscure edge case with a rather minimal impact. And yes, comment 8 has another example of this bug.
Bibisected, bug is corrected: commit ce0b9f3eb3f57f57a2315e099a0093c33987e6ca author Justin Luth <justin.luth@collabora.com> Mon Feb 13 17:47:36 2023 -0500 committer Justin Luth <jluth@mail.com> Tue Feb 14 14:21:42 2023 +0000 tree f8165a7f2142259a83b4d8afcb83cfb9c09afdfa parent 6190a8210e089195aca9b5091fcc7166fca3beaf Thank you Justin!
Verified in: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 4e70952efbc97bef7bc108e738bee346bf5de605 CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL threaded