Created attachment 123614 [details] Test ODT file The attached ODT file has "keep with next paragraph" option *off* for paragraph "BBBBBBBBBBBBBB". When save as DOCX, this option is turned on unexpectly. Steps to reproduce: 1. Open the attached ODT file. Obseave that the paragraph "BBBBBBBBBBBBBB" has "keep with next paragraph" option turned off (Format - Paragraph - Text Flow - Keep with next paragraph" unchecked). 2. Save as DOCX. 3. Unzip the DOCX file, obseave the following: (1) In word/document.xml there is <w:pStyle w:val="1"/> tag for paragraph ""BBBBBBBBBBBBBB", which means this paragraph is using Style ID 1. (2) In word/style.xml, we find the style with ID I: <w:style w:styleId="1" w:type="paragraph">. Observe that there is a <w:keepNext/> option in this style. (here is the bug). Current Behaviour: There is a <w:keepNext/> for w:styleId="1" in step 3(2). This causes the paragraph to "keep with next paragraph" when open with Microsoft Word. See https://msdn.microsoft.com/en-us/library/office/documentformat.openxml.wordprocessing.keepnext.aspx Expected Behaviour: No <w:keepNext/> for w:styleId="1" in step 3(2). Version: 5.1.1.3 Build ID: 89f508ef3ecebd2cfb8e1def0f0ba9a803b88a6d CPU Threads: 2; OS Version: Windows 6.2; UI Render: default; Locale: zh-CN (zh_CN) Win 10 x64
Created attachment 123615 [details] screenshots in pdf Actually even when you open the saved DOCX file with LibreOffice Writer, "keep with next paragraph" is set to *ON* for paragraph "BBBBBBBBBBBBBB"
Repro. Arch Linux 64-bit, KDE Plasma 5 Version: 5.2.0.0.alpha0+ Build ID: 8d267cdd48e8b736a81a9e76ea5803e6847d791e CPU Threads: 8; OS Version: Linux 4.4; UI Render: default; Locale: fi-FI (fi_FI.UTF-8) Built on March 24th 2016
Repro on both OSX 10.9.5 and 10.11. I try to change the style and it never saves correctly when inspecting the docx. Version: 5.0.6.3 Build ID: 490fc03b25318460cfc54456516ea2519c11d1aa Locale: en-AU (en.UTF-8) Same also happened in 5.0.4.x More people with the problem here: https://ask.libreoffice.org/en/question/53878/writer-keep-with-next-paragraph-problem/ Very annoying for my clubs that have a page limit and I don't own MSWord!
Changing version due to AskLibO data.
Bug exists in the old LibreOffice 3.4.0 OOO340m1 (Build:11). Set version field to "3.4 all versions".
*** Bug 106657 has been marked as a duplicate of this bug. ***
Yes, bug 106657 and 98700 are mostly the same (even if I find the "keep with the next paragraph" to be wrongly set not only to a single paragraph but to all paragraphs). Please note that this bug makes using Libreoffice almost impossible when interacting with somebody who needs to work on .docx files. From this point of view, this is really a critical issue.
(In reply to Andy from comment #7) > Please note that this bug makes using Libreoffice almost impossible when > interacting with somebody who needs to work on .docx files. From this point > of view, this is really a critical issue. Everything is relative.. we have 500 other known docx issues: https://bugs.documentfoundation.org/showdependencytree.cgi?id=104520&hide_resolved=1
This bug alone made me go out and buy Microsoft Office. I was such a devotee to Libre Office, but if your paragraphs are jumping around when exporting it to someone else, it makes the export feature unusable. I'm surprised this has been a bug for years now.
Yes I can easily imagine that docx compatibility is a significant source of problems, however I expect many of the bugs to concern particular details of the import/export, that are not normally found in ALL documents; for example, font size in math equations is not imported correctly from docx (I still have to check if this bug is already notified), but this concerns only people who use math formulas in their files, who are a minority (me among them by the way). The problem discussed here, however, regards ALL text documents with the sole exception of those where you positively want ALL paragraphs to stay together. And I cannot imagine normal situations where you could desire this... So from this point of view, IMHO this is a above average critical prob
*** Bug 97676 has been marked as a duplicate of this bug. ***
Important note from bug 97676: changing paragraph style from Heading to Default _seems_ to make the problem disappear..
(In reply to Buovjaga from comment #12) > Important note from bug 97676: changing paragraph style from Heading to Default _seems_ to make the problem disappear.. Of cause it will make the problem disappear. The Heading style has "keep with next paragraph" enabled (i.e., the bug), but the default style does not have this attribute.
(In reply to Kevin Suo from comment #13) > (In reply to Buovjaga from comment #12) > > Important note from bug 97676: changing paragraph style from Heading to Default _seems_ to make the problem disappear.. > > Of cause it will make the problem disappear. The Heading style has "keep > with next paragraph" enabled (i.e., the bug), but the default style does not > have this attribute. Well, it is still a workaround and not clearly expressed in the report. I will change the summary.
The mere presence of the property "ParaKeepTogether" was enough to enable it when saving as DOCX. Normally this property doesn't exist. This applies to much more than just the Heading styles. It applies to ANYTHING that had "keep with next paragraph" enabled at one point in time as suggested by Andy in bug 106657. Proposed fix at https://gerrit.libreoffice.org/41309
Justin Luth committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=ce2e7a4e7a143937393f89c91e17b52b8dba1a74 tdf#98700 docxexport: don't force on ParaKeepTogether It will be available in 6.0.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.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7f02579376bd863a23d7f1d052aced74a5ef1906&h=libreoffice-5-4 tdf#98700 docxexport: don't force on ParaKeepTogether It will be available in 5.4.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.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=067746290351c62b502425713360019a9863519a&h=libreoffice-5-3 tdf#98700 docxexport: don't force on ParaKeepTogether It will be available in 5.3.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.