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

            Bug ID: 158962
           Summary: Nested list cannot be assigned a list style that
                    differs from that of the enclosing list
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: ka...@goodtimes.fi

Created attachment 191688
  --> https://bugs.documentfoundation.org/attachment.cgi?id=191688&action=edit
Test case

The attached demonstration contains three variations of the same two-level
list:

(a) Same list style throughout

    • Main level, item 1
    • Main level, item 2
        • Nested list, item 1
        • Nested list, item 2
    • Main level, item 3

(b) Different list style applied to nested list

    • Main level, item 1
    • Main level, item 2
        – Nested list, item 1
        – Nested list, item 2
    • Main level, item 3

(c) A single multi-paragraph item, different list style applied to nested list

    • Main level, item 1, paragraph 1
      Main level, item 1, paragraph 2
        – Nested list, item 1
        – Nested list, item 2
      Main level, item 1, paragraph 3

These look fine in the editor, but the latter two have an incorrect underlying
structure.


*** Expected results ***

Note: Style attributes omitted for clarity.

(a)

    <text:list>
        <text:list-item>
            <text:p>Main level, item 1</text:p>
        </text:list-item>
        <text:list-item>
            <text:p>Main level, item 2</text:p>
            <text:list>
                <text:list-item>
                    <text:p>Nested list, item 1</text:p>
                </text:list-item>
                <text:list-item>
                    <text:p>Nested list, item 2</text:p>
                </text:list-item>
            </text:list>
        </text:list-item>
        <text:list-item>
            <text:p>Main level, item 3</text:p>
        </text:list-item>
    </text:list>

(b)

    The same as (a)

(c)

    <text:list>
        <text:list-item>
            <text:p>Main level, item 1, paragraph 1</text:p>
            <text:p>Main level, item 1, paragraph 2</text:p>
            <text:list>
                <text:list-item>
                    <text:p>Nested list, item 1</text:p>
                </text:list-item>
                <text:list-item>
                    <text:p>Nested list, item 2</text:p>
                </text:list-item>
            </text:list>
            <text:p>Main level, item 1, paragraph 3</text:p>
        </text:list-item>
    </text:list>


*** Actual results ***

(a)

    As expected.

(b)

    <text:list xml:id="...">
        <text:list-item>
            <text:p>Main level, item 1</text:p>
        </text:list-item>
        <text:list-item>
            <text:p>Main level, item 2</text:p>
        </text:list-item>
    </text:list>
    <text:list>
        <text:list-item>
            <text:list>
                <text:list-item>
                    <text:p>Nested list, item 1</text:p>
                </text:list-item>
                <text:list-item>
                    <text:p>Nested list, item 2</text:p>
                </text:list-item>
            </text:list>
        </text:list-item>
    </text:list>
    <text:list text:continue-list="...">
        <text:list-item>
            <text:p>Main level, item 3</text:p>
        </text:list-item>
    </text:list>

Applying a list style to the nested list has caused it to be removed from the
main list and placed into its own top-level list.

Instead of one, we now have three consecutive top-level lists containing
respectively
– the first item and the first paragraph of the second item
– the nested list, which is supposed to be part of the second item
– the third item.

(c)

    <text:list xml:id="...">
        <text:list-item>
            <text:p>Main level, item 1, paragraph 1</text:p>
            <text:p>Main level, item 1, paragraph 2</text:p>
        </text:list-item>
    </text:list>
    <text:list>
        <text:list-item>
            <text:list>
                <text:list-item>
                    <text:p>Nested list, item 1</text:p>
                </text:list-item>
                <text:list-item>
                    <text:p>Nested list, item 2</text:p>
                </text:list-item>
            </text:list>
        </text:list-item>
    </text:list>
    <text:list text:continue-list="...">
        <text:list-header>
            <text:p>Main level, item 1, paragraph 3</text:p>
        </text:list-header>
    </text:list>

In addition to the result in (b), paragraph 3 is marked up as `list-header`
instead of `list-item` to indicate the lack of a bullet.

When exported as HTML, the standalone sublist in cases (b) and (c) results in
invalid markup:

    <ul>
        <ul>
            <li><p>Nested list, item 1</p></li>
            <li><p>Nested list, item 2</p></li>
        </ul>
    </ul>

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to