https://bugs.documentfoundation.org/show_bug.cgi?id=153964

            Bug ID: 153964
           Summary: FILEOPEN DOCX COMPAT15: paragraph top margin should
                    only apply once - affecting page/col breaks
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: filter:doc, filter:docx
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: jl...@mail.com
                CC: jl...@mail.com
            Blocks: 131304

Created attachment 185748
  --> https://bugs.documentfoundation.org/attachment.cgi?id=185748&action=edit
columnMargin_combined.pdf: output from Word 2019 and LO master

The heart of the problem appears to be this: a <w:br> can occur either between
some character runs, or at the very beginning. In LO, we split this into a "new
paragraph" and thus the top margin applies to both parts.

There are several problems all related to this one concept. And that is because
even in MS Word it acts rather strangely. For example, while working in
compatibility mode, the margin of the new column might change when I hit the
save button (using Word 2019).

In Compat15 mode, this is never appropriate - the part after the break must
have a zero top margin.

In Compat14 mode the top margin should apply only if the break was the first
(visible) run in the paragraph (complicated by the fact that anchored shapes
before the break are not considered visible character runs for example).

In LO we have a few things to fix then:
-in compat14 mode with break as first run: we seem to be doubling up the top
margin after the page break. Regression in LO 6.0 by me with the unlikely
sounding commit afc96d263959d10e457b54a574f0829d20e99df4
    tdf#112352 ooxmlimport: ALWAYS treat 1st nextpage w/cols as cont
[There is also the problem where the following section OUGHT to intrude into
this section's space, but I submit that we should not try to do that any more,
since anything less than compat15 is effectively obsolete, and looks like an MS
bug which is not worth emulating.)

-in all compat modes, when the break is not the first run, then do not apply
the top margin to the portion after the break.

-in compat15 mode, when the break is the first run, then do not apply the top
margin at all, neither before nor after the break.

-and a bonus related problem: the (blue) paragraph background colour isn't
applying to both split paragraphs (neither the empty first paragraph, nor the
second split paragraph. Not bibisectable, but in 4.3 the split column break
started working.)

It is probably worth noting here the significant distinction between a section
page break and a regular page break. By definition, the section page break is a
paragraph property - and thus the following paragraph always applies it's
margin spacing. The same applies to a section column break. On the other hand,
a regular column/page break always splits a paragraph in two, with compat14
causing a dilemma about whether to apply the spacing before or after the break.


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=131304
[Bug 131304] [META] MS Word compatibilityMode = 15
-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to