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

            Bug ID: 174337
           Summary: FILEOPEN DOCX: numbering margin from para style fails
                    to override numbering's margins
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
            Blocks: 108770

Created attachment 209534
  --> https://bugs.documentfoundation.org/attachment.cgi?id=209534&action=edit
numbering_missingStyleIndent.docx: sample document

While reading through the numbering code for DOCX import, I noticed that one
part was only checking two levels of paragraph styles for left/first margins.
That simply cannot be right to limit inheritance to two styles.

So I made an proof document. Steps to reproduce:
-open numbering_missingStyleIndent.docx (it should NOT look 'normal')

The first numbered item (i) SHOULD start near the middle of the page, because
the paragraph style defines w:left as well as the numbering definition, which
means that the paragraph style wins.

The general priority in MS Word (highest to lowest) is:
-1: direct margins defined by the paragraph
-2: direct numbering's margins (numbering defined by the paragraph itself)
-3: a derived/child paragraph style (prior to where the numbering is defined)
-4: margins defined by the paragraph style that also defines numbering
  -5: numbering's margins
-6: margins defined by base/parent style (when numbering doesn't define any
margins).

In this particular example, we are dealing with situation #4.

The current code only checks the assigned paragraph style, and possibly one
parent style (if it determined that the assigned style did not define
numbering).

The code was sanitized somewhat by mk with
25.2 commit ceec6eacfc69e71d85b360da6e25edbd9676628a.

Prior to that it got complicated (with some fixes coming later) by
Laszlo's 6.4 commit 9f6d1d5c4c75c51f36815178507e336c504025fb

Some of that (relating to the right margin) was duplicated/simplified by
Laszlo's 7.1 commit 20ba8d8d9f4fcf7d5826fcb3366a9bff0d6a8ca1

A lot of this right-margin code might be obsolete because of mstahl's
7.6 commit db115bec9254417ef7a3faf687478fe5424ab378
    tdf#78510 sw,cui: split SvxLRSpaceItem for SwTextNode, SwTextFormatColl
but how could anyone ever be confident about that (i.e. editeng etc.)


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=108770
[Bug 108770] [META] DOCX (OOXML) bullet and numbering list-related issues
-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to