Open Alister71 opened 5 years ago
When importing multilevel numbered list, numbering of second inner level is reset starting second parent item. Actually, new concreteList with override level is assigned to inner list starting second occurence of inner <ol></ol> container. To fix this situation it is enough to change initialization of inner class ListItemContentState of ListHelper.java ListItemContentState.isFirstItem should be initialized with false value, not true. https://github.com/plutext/docx4j-ImportXHTML/blob/master/src/main/java/org/docx4j/convert/in/xhtml/ListHelper.java#L175 Instead of protected boolean isFirstItem = true; should be protected boolean isFirstItem = false; The example of multilevel numbered list treatment is at stackoverflow: https://stackoverflow.com/questions/55144169/when-importing-multilevel-list-from-xhtml-to-docx-a-few-concrete-lists-are-gener
<ol></ol>
protected boolean isFirstItem = true;
protected boolean isFirstItem = false;
I have the same problem
When importing multilevel numbered list, numbering of second inner level is reset starting second parent item. Actually, new concreteList with override level is assigned to inner list starting second occurence of inner
<ol></ol>
container. To fix this situation it is enough to change initialization of inner class ListItemContentState of ListHelper.java ListItemContentState.isFirstItem should be initialized with false value, not true. https://github.com/plutext/docx4j-ImportXHTML/blob/master/src/main/java/org/docx4j/convert/in/xhtml/ListHelper.java#L175 Instead ofprotected boolean isFirstItem = true;
should beprotected boolean isFirstItem = false;
The example of multilevel numbered list treatment is at stackoverflow: https://stackoverflow.com/questions/55144169/when-importing-multilevel-list-from-xhtml-to-docx-a-few-concrete-lists-are-gener