kogmbh/WebODF — pull request #565 by satsuper (2014-04-30 03:57:32+00:00)
Title: List numbering

This PR adds support for displaying multi level list numbering. The approach used was to use a different counter for each level instead of using nested CSS counters. This was because you can limit the levels of numbering displayed to a subset of the current level e.g. displaying two levels

1\. Level 1
1\.1\. Level 2
1\.1\. Level 3
1\.1\. Level 4

The nested counter approach was not compatible with the above option of list numbering.

Also added was continuing the numbering of previous lists in the document. This approach was modeled off existing code in OdfCanvas that partially implemented this feature but due to a regression this code was not being reached anymore.

The approach looks at the text:list elements to see if they need to be continued then uses string replace on CSS rules to change the CSS counter the list uses for its numbering.

Lists can either continue the list directly preceding them in document or they can continue a list anywhere in the document by referencing its xml:id. Both these cases are handled in this PR.