Created attachment 198836 [details] forum-mso-de-132466.docx: example file One page 3, the heading "Chapter 1" is not centred (nor Chapter 2 etc.). From 24.8 (backported to 24.2.4) commit ab1697cb4c17fd7a2fbf8d374ac95fc03b4d00be Author: Michael Stahl on Fri May 3 12:12:24 2024 +0200 tdf#160402 filter,writerfilter: import locale-dependent STYLEREF names Something funny must be going on. Direct formatting of "center" is pretty clear. <w:pPr> <w:pStyle w:val="berschrift1"/> <w:jc w:val="center"/> <w:rPr> w:style w:type="paragraph" w:styleId="berschrift1"> <w:name w:val="heading 1"/> Found by Collabora's mso-test
Created attachment 198837 [details] forum-mso-de-132466.docx_mso.pdf: how it looks in Word 2019
Created attachment 199365 [details] forum-mso-de-132466min.docx: minimized version Round-tripping the original using MS Word 2010 (English) "fixes" the problem for LO. So I had to hand-modify the example to remove most of the body text.
The big difference? Before mstahl's commit, the paragraph style was "Heading 1". It looks like something to do with the header. If I remove references to the header (which of course has a STYLEREF field in it), then it loads OK.
If I understand this right, mstahl just did a better job applying an existing bad idea. It seems to go like this: -the styleRef assigns the existing style to itself (for formatting) -a clone of the style is made, and then the entire document is stepped through, and existing paragraphs are re-assigned to the clone-style. Well, as part of "changing paragraph style", you lose any direct formatting. My head is just spinning - all of this is too clever for me. Bye.
Created attachment 199801 [details] Minimized example from Word 13, DE locale For this styleref thing to properly work, you need a matching Word UI and document locale. Unfortunately a German docx does break in an English Word :(.
Created attachment 199802 [details] The minimized example in Word 2013 and Writer master