[Libreoffice-bugs] [Bug 48350] New: FILESAVE: missing <w:spacing w:after="0" w:before="0"/> in new document.docx

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 5 21:14:06 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=48350

             Bug #: 48350
           Summary: FILESAVE: missing <w:spacing w:after="0"
                    w:before="0"/> in new document.docx
    Classification: Unclassified
           Product: LibreOffice
           Version: LibO 3.5.1 Release
          Platform: x86-64 (AMD64)
        OS/Version: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
        AssignedTo: libreoffice-bugs at lists.freedesktop.org
        ReportedBy: jou at gmx.net


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)
<w:body>
<w:p>
<w:pPr>
<w:pStyle w:val="style0"/>
</w:pPr>
<w:r>
<w:rPr>
</w:rPr>
<w:t>1</w:t>
</w:r>
</w:p>

TEST6.docx (new document, with changes to 0.1, hit OK and then back to 0.0 +
hit OK)
<w:body>
<w:p>
<w:pPr>
<w:pStyle w:val="style0"/>
<w:spacing w:after="0" w:before="0"/>
</w:pPr>
<w:r>
<w:rPr>
</w:rPr>
<w:t>1</w:t>
</w:r>
</w:p>


The "original" test documents are available, but I doubt that they will be
needed.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Libreoffice-bugs mailing list