Description: Five page style generated on export to DOCX (only 1 with DOC) Steps to Reproduce: 1. Open the attached file 2. Save As DOCX 3. File reload 4. Sidebar -> Styles deck -> Page styles Actual Results: 5 styles Expected Results: 1 additional Reproducible: Always User Profile Reset: No Additional Info: Found in 7.1 4.4.7.2 LibreOffice 3.5.0rc3 Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735 not not in 3.3.0 (result not really comparable, pretty broken)
Created attachment 165441 [details] Example file
@Justin Curious what you're analyses is about this example file here. DOC seems to be better exported DOC does a better job page style wise. The page break is also seen in DOC. Not sure if it's required for some reason (or if it should be reported in a different bug)
It looks like two extra page styles are created for every "footnote section". That ought to be unnecessary.
(In reply to Telesto from comment #2) > The page break is also seen in DOC. > Not sure if it's required for some reason (or if it should be reported in a > different bug) The page break is necessary because Word has no concept of page styles, so it has no idea that FirstPage is followed by DefaultPage. Thus it needs to be emulated with a section-page-break. Normally, first page and the following page styles are virtually identical. In that case, export creates a single section with a special "first" header and that takes care of the problem without a page break. In this particular document, the left and right margins are different, so they can't be treated as a single section (not IsPlausableSingleWordSection).
(In reply to Justin L from comment #3) > It looks like two extra page styles are created for every "footnote > section". That ought to be unnecessary. Thanks to Michael Stahl's 7.0 change it ought to be possible to ignore footnote sections for closeSectionGroup: if (m_aPropertyStacks[eId].size() == 1) // bug 112202 only top level !!! m_pLastSectionContext = m_aPropertyStacks[eId].top(); Perhaps it would be possible to skip this function altogether for comments and footnotes. (Michael already in that commit excluded comments from most of the code in closeSectionGroup).
Proposed fix at https://gerrit.libreoffice.org/c/core/+/102723
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/df2f2c8bf1004d00dd6cdff0e3edb9bf5777ffbd tdf#136706 writerfilter: don't create page style for footnote It will be available in 7.1.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a06fe0d7ee665be29f3218f093fcabd601bf99ac tdf#136706 writerfilter: revert my info-gathering assert It will be available in 7.1.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.