Description: The "Expand word space on lines with manual line breaks in justified paragraphs" setting in Tools, Options, LibreOffice Writer, Compatibility is treated as though it is always checked when exporting a document to docx format, i.e. the word space is always expanded. Export to doc format and pdf format honours the setting correctly. Steps to Reproduce: 1. Set a paragraph to be justified; 2. Insert a line break (Shift-Enter) within the paragraph; 3. Go to Tools, Options, LibreOffice Writer, Compatibility and clear the checkbox labelled "Expand word space on lines with manual line breaks in justified paragraphs" and click OK; 4. Save a copy of the document to docx format; 5. Open the docx file (either in Word or in Writer). Actual Results: The word space in the part of the paragraph before the line break is expanded. Expected Results: The word space in the part of the paragraph before the line break should not be expanded. Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Created attachment 131269 [details] Document for try
Created attachment 131270 [details] What I get with Word 2010
Hi Matthew, I don't reproduce with LO 5.2.5.1 Build ID: 0312e1a284a7d50ca85a365c316c7abbf20a4d22 CPU Threads: 2; OS Version: Windows 6.1; UI Render: default; Locale: en-US (fr_FR); Calc: CL Spaces are not expanded.
Thank you, Jacques, but you have inserted a page break (Ctrl-Enter) instead of a line break (Shift-Enter).
Created attachment 131279 [details] The right file to try Sorry Matthew, It seems you have to set 'Use as Default', after uncheck 'Expand word space...', beneath the window, to get hte right behavior. Else, at each launching of LibreOffice, this setting will be checked again.
Jacques, the bug is visible in the file you just attached (assuming you cleared the checkbox in LibreOffice before saving as docx).
Yes Matthew, This is clearly visible. Did you try : Tools > Options > LibreOffice Writer > Compatibility Uncheck "Expand word space on lines with manual line breaks in justified paragraphs" and click on "Use as Default". After closing and launching of LibreOffice, there will be no more expand spacing. There is a choice to do, but no bug for me. Don't you think so?
You are half-right. If I change the default setting, then follow my procedure and open the docx file in Writer, the word space is not expanded. But if I open it in Word, the word space *is* expanded, and should not be.
Hi Matthew, Try to save the file to the .doc format. It works. Have a nice day, Jacques
It *is* a bug.
A proposed patch was committed on 12th April https://gerrit.libreoffice.org/#/c/36485/ but apparently it also requires a matching unit test. Could somebody have a look at this, please?
Created attachment 133688 [details] ODF reproducer Try the patch with this document. It should write the new element (in ODF, DoNotJustifyLinesWithManualBreak is true in settings.xml), but it does not.
nikki committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9ad9c5183f348384b62ec88459a3a5922e423d83 Fix tdf#106029 - Add setting XML_doNotExpandShiftReturn when exporting to docx 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.
I have tested the latest daily master build, Build ID: cc8390df26dad04a74425804dbd7ba068daca0c2, and it works correctly now. Could this fix be made available in 5.3.5?
nikki committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=44655d5e8311196ec309bec267eaebd9828ee273&h=libreoffice-5-4 Fix tdf#106029 - Add setting XML_doNotExpandShiftReturn when exporting to docx It will be available in 5.4.1. 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.
nikki committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a59cf3ecab2f327801c2b580d20df9e8b643cc6c&h=libreoffice-5-3 Fix tdf#106029 - Add setting XML_doNotExpandShiftReturn when exporting to docx It will be available in 5.3.5. 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.