Convert to docx behaviour changed for lists in version 7.5.x

Hi. I’ve encountered strange behavior in version 7.5.4 (I guess, in 7.5.x).

Look at a simple list – simple-list.odt (10.9 KB)

  1. Item 1
    a. Item 1.1
    b. Item 1.2
  2. Item 2

If I convert it to docx all letters in the second level become “a” –
simple-list-7-5-4.docx (5.6 KB)
. Like:

  1. Item 1
    a. Item 1.1
    a. Item 1.2
  2. Item 2

In version 7.4.7 (like in previous versions) I get the expected correct behavior with letters “a” and “b” –
simple-list-7-4-7.docx (5.5 KB)

Please pay attention that in a source odt the list style of the second level is switched within the list of the first level.

   <text:list text:style-name="Numbering_20_123">
    <text:list-item>
     <text:p text:style-name="P8">Item 1</text:p>
     <text:list text:style-name="Numbering_20_abc">
      <text:list-item>
       <text:p text:style-name="P10"><text:span text:style-name="T2">Item 1.1</text:span> </text:p>
      </text:list-item>
      <text:list-item>
       <text:p text:style-name="P10"><text:span text:style-name="T2">Item 1.2</text:span> </text:p>
      </text:list-item>
     </text:list>
    </text:list-item>
    <text:list-item>
     <text:p text:style-name="P8">Item 2</text:p>
    </text:list-item>
   </text:list>

I can make LO Writer convert the list in the right way. For this I need three sibling list tags: first (numbered) with item 1, second (lettered) with one extra nested list and items 1.1 and 1.2 and finally the third (the continued first list) with item 2. This way conversion goes as expected. In fact, this is the way LO Writer creates lists itself.

Please look at this case.

If it is a 7.5.x version bug, I’ll post it as a regression.

If it is a correct behavior, which was corrected in 7.5.x, I’ll correct my files.

tdf#155823 ? But that was since 7.4 (and fixed in 7.5.5)…

Thank you for the prompt answer. Still, looks like another issue. In my case 7.4.7 works OK and my problem is with all items, not the last one. I’ll check it with 7.5.5 and more than two items and return with results.

Independently from tdf#155823 mentioned by @mikekaganski (which I didn’t study in detail, having just discovered it), your initial .odt is structurally-wise faulty. This may be the cause of the apparent corruption when converting to .docx because numbering (list and chapter, all the same) is one of the most delicate compatibility issue.


The problem stems from the definition of a list. What makes a list specific is its list style. Most of the time Writer users create list with Format>Bullets & Numbering (or its toolbar equivalences) where they control nearly nothing (from an abstract typographical point of view). This approach was provided as a “compatibility” bridge with Word where the concept is a real mess. Since this is compatibility feature (most users qualify it “intuitive” while it is not) tries to deal with not-otherwise-advertised lists (you don’t specify where it starts nor where it ends), Writer must make guesses trying to rely on its strong theoretical basis. And what user did does disturbs this guess-party.


First of all, users don’t realise that all lists in Writer are multi-level with a huge versatility in the numbering scheme (practically all levels are independent from each other). Consequently, when a nested list is needed, a single list style will do.


Second, and most important, a list style associated with a paragraph will define the “type” of a list. All paragraphs with the same list style will be part of the same list. Of course, you can split this “type” into several instances by restarting numbering. The list style characterises a list type and gives this type its homogeneity and personality.


Your .odt is totally direct formatted. By itself this already results in formatting nightmare. But when lists are involved, this turns into formatting hell.


You configured your first level-1 to be numbered with the use of the button in the toolbar. This associated your 1. and 2. items to Numbering 123 list style. When you typed your first level-2, you again numbered it with the toolbar button, choosing alphabetics. But this associated items to Numbering abc.

This is obvious in the XML snippet you show in your question.


Consequently, instead of having a single nested list, you have two independent lists: one with numbers where only level-1 items are present, one with letters where only level-2 are present. These lists are intermixed, which is allowed but gives surprising results for incautious users. Level-1 numbers in the second list are not synchronised with those of the first list.


I don’t know exactly how you typed the second alpha-item, the one listed as b, but it may have incurred another hazard of the kind which detached it from the list “type” of the a item.


When you original source document is not consistent, don’t expect conversion to alien format where theoretical foundation is not assured (such as .docx) to perform smoothly.


List numbering (and in a lesser extent chapter numbering because the choice is more restricted) is a complex feature which is not clearly explained in the official documentation. It is exacerbated by direct formatting (which unfortunately most users consider easy and intuitive). The only reliable approach is styling. But it requires some thinking ahead. You can’t dive into writing your document, unless you type just as you would do with a text editor, i.e. absolutely no formatting. Formatting would be added at a later stage with styles.

At this stage, without deep analysis of tdf#155823, you’re the sole responsible for the erratic conversion to .docx. You should structure very rigorously your documents. Then if they don’t display or convert as intended, ask for help here.

Yes, you are right; and this is a bug. Please file it.

Thank you for your help and sorry for delay in answering. I create fodt format programmatically according to v1.3 specification from Asciidoc documents.

I fully agree with you, that LO/fodt ability to create the sole list style for all levels is a must feature to use in most cases.

But Asciidoc specification allows and to some extent enforces styling each sublist independently. This originates probably from DocBook, and in DocBook from HTML. My understanding was that fodt also supports styling lists this way. LibreOffice prior to 7.5 correctly handled such lists. Moreover, in Writer 7.5 (as in prior versions) with the user interface I can create the following document (this looks like more bulky version of a code from my original post) and it is correctly exported to MS Word. Guess, the majority of Writer users use this approach)))

   <text:list xml:id="list174352192884549" text:continue-list="list2593985853" text:style-name="Numbering_20_123">
    <text:list-item text:start-value="1">
     <text:p text:style-name="P10"><text:span text:style-name="T5">Item 1</text:span></text:p>
    </text:list-item>
   </text:list>
   <text:list xml:id="list3820854523" text:style-name="Numbering_20_abc">
    <text:list-item>
     <text:list>
      <text:list-item>
       <text:p text:style-name="P15">Item 1.1</text:p>
      </text:list-item>
      <text:list-item>
       <text:p text:style-name="P15">Item 1.2</text:p>
      </text:list-item>
     </text:list>
    </text:list-item>
   </text:list>
   <text:list xml:id="list174350702425346" text:continue-list="list174352192884549" text:style-name="Numbering_20_123">
    <text:list-item>
     <text:p text:style-name="P10"><text:span text:style-name="T5">Item 2</text:span></text:p>
    </text:list-item>
   </text:list>

So, looks like a bug for me and I’ll post it. Although the bug is not critical, not even important: current users don’t have a chance to face it and users who do things right have less than no chance to face it.

@mikekaganski, Checked 7.5.5., it didn’t fix this bug as expected. Searched for 7.5 from 7.4 release notes. Looks like this commit Diff - cd3c16fbcb4f8e5e4c4448bc7cda96e8476d6aec^! - core - Gitiles (fixes 129101 – CTRL+A & Cut very slow (see comment 38)) is the only commit that concerns lists. But I can’t check it