Created attachment 143473 [details] The original document in ODF format. LibreOffice Writer has page styles, Microsoft Word doesn't. This means that every time a document with multiple page styles is saved as DOCX and reopened, page styles have to be converted back and forth. This works well when the page styles are separated with manual breaks with directly set next page styles, but it doesn't if the next page style is applied via the Next style property from the page style settings and pages are separated with regular page breaks. I think that in this case regular page breaks should be converted to page breaks with style changes to preserve the original layout as much as possible. Interestingly, if the page has a next style property, and there are no page breaks set at all between pages (so when the text flows freely from one to the next page) LibreOffice adds page breaks with style changes automatically. Steps to reproduce: 1. Create a new document in LibreOffice Writer. 2. Open the “Style and Formatting” sidebar by pressing F11, and select the “Page Styles” view. 3. Create a new page style: Name it as you like, set the Next Style to “Default style” and set the page orientation to Landscape. 4. Apply the newly created page style and add some random text. 5. Press Ctrl+Enter to insert a page break. The next page should be in portrait, if everything was done right. Add some more random text to this page. 6. Save the document as DOCX and reload it. Actual results: Both the first and second page are in landscape. Expected results: Only the first page should be in landscape, the second page should be in portrait. LibreOffice details: Version: 6.2.0.0.alpha0+ Build ID: bb1d5780226bb1b9156580972eea9aa849178742 CPU threads: 1; OS: Windows 6.1; UI render: default; TinderBox: Win-x86@42, Branch:master, Time: 2018-07-03_05:56:48 Locale: hu-HU (hu_HU); Calc: group threaded
Created attachment 143474 [details] The same document saved as DOCX.
Created attachment 143475 [details] A screenshot showcasing the issue.
I confirm it with Version: 6.2.0.0.alpha0+ (x64) Build ID: b0e291a7efcd3af2a72d0b622b1f1b84723f011f CPU threads: 4; OS: Windows 10.0; UI render: GL; TinderBox: Win-x86_64@42, Branch:master, Time: 2018-06-30_23:43:40 Locale: en-US (de_DE); Calc: CL Additional information: The new page style is missing in the document and in the page style list.
Regression introduced by: https://cgit.freedesktop.org/libreoffice/core/commit/?id=2df0d9d32d05f08ccf673fd0f61f650438511acb author PriyankaGaikwad <priyanka.gaikwad@synerzip.com> 2014-05-30 17:23:45 +0530 committer Miklos Vajna <vmiklos@collabora.co.uk> 2014-06-04 08:05:00 +0000 commit 2df0d9d32d05f08ccf673fd0f61f650438511acb (patch) tree 04db38af0c96180262d89c5e86ebe23db1efcac2 parent ce1d0fc63bedc5c908c0f5e92445aa16ae1326df (diff) fdo#78907 : File crashed while saving. - There is pagebreak in file and footer has nested table. - While exporting LO write section break instead of PAGE_BREAK. - Due to this it was writing two sections in file and same footer for both sections. - This was causing wrong table depth values due to this it was crashing while writing table. - So in MSWordExportBase::OutputSectionBreaks if next node has RES_BREAK(page break) then bNewPageDesc value should be false. Bisected with: bibisect-44max
I think I can fix it...
Patch in gerrit: https://gerrit.libreoffice.org/#/c/57338/
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b0e2dbca5164c494a669bd48f8ff058f4c1ad710 tdf#118702: partially revert the fix for tdf#78907 It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7196aa63832c9d7fe59b31f98cd64696795d2841&h=libreoffice-6-1 tdf#118702: partially revert the fix for tdf#78907 It will be available in 6.1.0.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=ded5c0dd0f8146f7b6b77b43114458259d72d6d3&h=libreoffice-6-0 tdf#118702: partially revert the fix for tdf#78907 It will be available in 6.0.7. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-6-0-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=bedfe49492a9a5bdca1da46feb813ba5ed130720&h=libreoffice-6-0-6 tdf#118702: partially revert the fix for tdf#78907 It will be available in 6.0.6. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
VERIFIED with Version: 6.3.2.2 (x64) Build-ID: 98b30e735bda24bc04ab42594c85f7fd8be07b9c CPU-Threads: 4; BS: Windows 10.0; UI-Render: GL; VCL: win; Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE Calc: threaded