Created attachment 200295 [details] forum-mso-de-125863.docx: the example document In this document, the paragraphs should not be "separated" from each other. This is about as simple as you can get. There is no paragraph direct properties (no w:pPr) and no style assigned (so it should inherit from "Normal" - which looks fairly standard to me). <w:style w:type="paragraph" w:default="1" w:styleId="Standard"> <w:name w:val="Normal"/> <w:pPr> <w:spacing w:line="264" w:lineRule="auto"/> # no w:after="xxx" defined </w:pPr> </w:style> There also are no DocDefaults <w:pPrDefault/> entries, so I'm not sure where the 0.35 cm of below spacing in the default paragraph style are coming from. It isn't a LO default for new ODT documents... This started in LO 3.6.
Created attachment 201429 [details] 166141_minimal.docx: a minimal example of .35cm below paragraph spacing when none defined It is related to settings.xml linkStyles. if (m_pSettingsTable->GetLinkStyles()) // If linked styles are enabled, set paragraph defaults from Word's default template xTextDefaults->setPropertyValue(getPropertyName(PROP_PARA_BOTTOM_MARGIN), uno::Any(sal_Int32(convertTwipToMm100(200)))); This was added by commit 8ba44dd1abbe31c1235f3b840bf27a61c3401236 Author: Miklos Vajna <vmiklos@suse.cz> on Wed Mar 14 17:12:35 2012 +0100 n#751020 implement DOCX import of linked styles This is just initial support: the default template and paragraph properties are included.
17.15.1.55 linkStyles (Automatically Update Styles From Document Template) This element specifies that styles in the given document shall be updated to match the styles in the attached template specified using the attachedTemplate element (§17.15.1.6) when the document is opened by a hosting application. This setting enables the styles contained in documents with attached templates to stay synchronized with the styles used in the attached template. If this element is omitted, then styles shall not be updated based on the document template regardless of its availability. If the attached template cannot be located or is not a valid file, then this setting should be silently ignored. [Example: Consider a WordprocessingML document which should always update its styles with those defined in the document's attached template. This requirement would be specified using the following WordprocessingML in the document settings: <w:settings> <w:linkStyles w:val="true" /> <w:attachedTemplate r:id="rId10" /> … </w:settings> It seems like the key here is "If the attached template cannot be located or is not a valid file, then this setting should be silently ignored." If there is NO attachedTemplate listed, then YES - update using the builtin Word defaults.
Created attachment 201432 [details] 166141_minimal2.docx: with attachedTemplate removed - so below spacing = 0.35cm
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/bf326cd72905df985a1f150dbaabf4470fb5aabb tdf#166141 writerfilter docx: linkStyles != 0.35cm bottom margin It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.