Bug: missing <w:spacing w:after="0" w:before="0"/> in new document(s), save a new document as docx, opening in word 2010 has an extra line after each paragraph.
Seems to be a bug in LO 3.5.1, in this email I refer to TEST1/TEST2 etc to make a distinction between the various documents I did for testing to reproduce:
Steps to reproduce:
New document in LO Writer 3.5.1.
Type a few lines with hitting return at the end.
Save as "office 2007/2010" document TEST1.
Open the document in Office 2010, and an extra empty line is added.
Save the document in Office 2010 as TEST2.
Open in Libreoffice shows the same as office 2010.
Fixing the document in Office 2010: Open TEST2 hit CTRL+A use "Abstand nach dem Absatz entfernen" which should be something like "remove space after each paragraph" in English, save as TEST3. Open in LO, add extra lines and save as TEST4, the extra lines will have the right spacing even when opening in office 2010 again.
Fixing the document in Libreoffice 3.5.1: Open TEST2 hit CTRL+A, right click, paragraph, Intents & Spacing, Below the paragraph, set to 0.0, save as TEST5.
It doesn't matter which you use for fixing, it works in both cases.
Once the document is "fixed" that way you can add extra lines with Libre Office and it will correctly use <w:spacing w:after="0" w:before="0"/> for each new line (see TEST4).
The bug is that LO 3.5.1 doesn't save the spacing information in first place for "new document.docx", although it is "0.00" for a new document. To make LO save the right paragraph spacing you have to change it to 0.1 once (hit OK) and change it to 0.0 again, save as TEST6. LO will save it the way it should in first place.
Document source difference boils down to:
TEST1.docx\word\document.xml (shorted to the important lines)
TEST6.docx (new document, with changes to 0.1, hit OK and then back to 0.0 + hit OK)
<w:spacing w:after="0" w:before="0"/>
The "original" test documents are available, but I doubt that they will be needed.
The bug is essentially the same if you use .odt, it just does not manifest since the default paragraph spacing is 0.00.
TEST1.odt\content.xml (reduced to the important difference):
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="Standard">
TEST6.odt\content.xml (new document, change spacing to 0.1 and back to 0.0):
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm"/>
<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:page-number="auto"/>
It should always save those spacings.
I guess other spacings are affected too, but they did not yet annoy me : )
Thanks for releasing 3.5.2 right after I submitted the bug report.
However: The bug is still there, just tested.
Reproduced on 126.96.36.199
Normal (Can prevent high quality/professional work)
High (saving as .docx is pretty normal, adding an extra line after each paragraph is problematic. Furthermore, in some cases this may result in penalties for users such as if a user submits a paper that has a length limit and these extra lines push it over the limit.
Thanks for reporting this one, sorry it took a few months to triage it!
*** Bug 50092 has been marked as a duplicate of this bug. ***
(In reply to comment #1)
> I guess other spacings are affected too, but they did not yet annoy me : )
Based on my testing, this at least affected the "paragraph spacing" and "line spacing", see my comment at:
(just copy my comment in bug 50092 to here below:)
* Default style of LO Writer document is SINGLE LINE SPACE, and "0" for AFTER PARAGRAPH.
* However, default style of MS Office 2010 is MULTIPLE LINE SPACE (1.15), and "10 points" AFTER PARAGRAPH, as described in this article:
* When export as .docx, Writer did not set the "<w:spacing..." attributes in "/word/styles.xml", as it is treated as DEFAULT by Writer.
Added to MAB4.2.
Setting to HIGHEST, as "MAB = HIGHEST".
*** Bug 51340 has been marked as a duplicate of this bug. ***
As discussed in bug 51340, this also affects other MSO 2010 file formats (like pptx), so changing the title.
*** Bug 53551 has been marked as a duplicate of this bug. ***
*** Bug 75017 has been marked as a duplicate of this bug. ***
Although the problem is certainly related, I don't see how bug 51340 is a duplicate to that since it is regarding PPT instead of Word and it is not about creating spacing for a new document, but reading the existing spacing correctly from an existing document.
(In reply to comment #11)
> Although the problem is certainly related, I don't see how bug 51340 is a
> duplicate to that since it is regarding PPT instead of Word
I changed the title of this bug to include other MSO formats.
> and it is not about creating spacing for a new document, but reading the existing spacing correctly from an existing document.
That is exactly the same issue:
When LibreOffice opens a MSO 2007/10/13 file, it should apply the correct PARAGRAPH SPACE and LINE HEIGHT, when para space and line height is NOT SET in the xml file:
* PARAGRAPH SPACE: should be the same as MSO 2007/10/13 (for Word format, it's 1.15; for PPT, I dont know)
* LINE HEIGHT: should be the same as MSO 2007/10/13 (for Word format, it's 10 points after each paragraph; for PPT, I dont know either, should look into the microsoft site.)
When LibreOffice save a file as MSO 2007/2010/2013 format, it should set the PARAGRAPH SPACE and LINE HEIGHT in the xml file. Doing this will avoid confusion between applications.
When the above IMPORT issue is fixed, the EXPORT part is not necessary if users are using the newer versions of LO with the fix included. But we'd better also fix the EXPORT part because someone may open your file in an older LO version and see a different view.
To see if your PPTX issue is a duplicate to this one, I have to see in the PPTX xml file if the line height is really not set (i.e., default value in MSO). (But I am not familier with the pptx style xml file, maybe someone can help?)
If it's not set, then MSO opens it as 1.5 line height and LO opens as single line height --> same issue.
Adding bug 51340 as see also instead.
Does the problem persist with a recent version of LO? I cannot reproduce using the steps given. I can only reproduced using the .docx document from bug #50092, but saving the original file again using a current LO version no longer reproduces the problem.
I tested for that issue with LO 188.8.131.52 today, and it looks fine to me. The problem does not appear any more.
From my point of view "RESOLVED".
Please make sure to test all cases that were merged to this bug.
In my tests, bug 51340, which was merged against my advice with this one, is still not resolved.
If your bugreport was closed incorrectly as a duplicate of this one, just reopen it.
I'm closing this bugreport as the original problem no longer occurs.