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
Extra empty paragraph after the one containing “F” and before the two column section.
No extra empty paragraph.
Version: 126.96.36.199.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
Build ID: 64a0f66915f38c6217de274f0aa8e15618924765
CPU threads: 4; OS: Windows 6.3; UI render: default;
Locale: en-US (hu_HU); Calc: CL
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: hu-HU (hu_HU)
Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0
Not yet in:
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
Bibisected using bibisect-win32-4.3 to:
Author: Vinaya Mandke <firstname.lastname@example.org>
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: 188.8.131.52 (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
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: 184.108.40.206.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
(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.