Paragraph spacing differs when opening DOCX

We are considering LO as a MS Word replacement and checking out the reproduction of existing DOCX documents.
When opening a docx with a text frame the first paragraph of the frame gets a “Spacing / Abwove paragraph” of 0,42 cm whereas the source document in MS Word has not (0 pt).

I have attached a minimal anonymized document that is quite similiar to the source document for the sake of reproduction. Text Frame first paragraph.docx

You can easily see the difference in the options of the two programs too.

My question is: How should I move forward with such problems. Is there a chance that this gets corrected in the DOCX import?

My question is: How should I move forward with such problems

Very good question! You should report them.

is there really a chance of getting this fixed? When searching only for paragraph spacing I get 206 open bugs beginning with 2015. I can’t even check if this issue has already been reported in a reasonable time :frowning:

I can’t even check if this issue has already been reported

Why would you want to spend time checking that? Just file a bug report.

And yes, there are many bugs. There are no guarantee that it would get fixed. Some bugs get fixed within hours (a great luck, but e.g. yesterday I fixed such a bug), some wait years.

alright. thanks for your quick replies!

And just to be sure I did not mean to step on anybodies toe about the bug fixing time! Sorry for that if I hurt your developer pride. (Coming from one developer to the other)

You’re the one to blame (or rather the author of this document).

First remark: the outline rectangle with the fish picture is not a frame but some drawing object like a rectangle or text box. It has not the same properties as a frame and you’ll meet many compatibility problems if your documents are stuffed with such graphics objects instead of true text frames.

Now to the heart of the problem.

The first paragraph in the rectangle is styled Frame Contents as the rest of the text in this rectangle. Paragraph style Frame Contents has 0-spacing above and below. But, someone added manually a 0,42cm-above and 0,21cm-below spacing. This is called direct formatting and reapplying the style won’t erase it because added direct formatting takes precedence over style attributes.

This spacing is present in the original .docx.

The difference in rendering comes from a difference in behaviour between Word and Writer.
Word deliberately ignores any spacing-above at top of page while Writer follows any paragraph settings, even if this may look unusual. This allows, among other effects, to offset chapter title down in the page to make it more prominent without using weird subterfuges.

This is a known difference and you can force Word compatibility in Tools>Options, LibreOffice Writer>Compatibility. There the third check box (in v6.4.4.2) read Add paragraph and table spacings at tops of pages. Uncheck this box and you’ll get identical formatting.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer) or comment the relevant answer.

wow. Right between the eyes. Thank you!

But, someone added manually a 0,42cm-above and 0,21cm-below spacing

No, only 0,21cm-below. The OOXML does not have any “above”:

    <w:spacing w:after="120"/>

It looks like we apply the contextual spacing in case of existing spacing-after, which shouldn’t be in drawings: DomainMapper.cxx (revision b216fc5b) - OpenGrok cross reference for /core/writerfilter/source/dmapper/DomainMapper.cxx

This is a little hard to follow for me now. I will probably have time to investigate this further later this year. For now I am using the recommended compatibility setting.
I have seen some other problems that arise when using this compatibility setting. I will probably file report this issues separately.

@rominator: thank you for your effort! Every report makes LibreOffice better.