Paragraphs and numbering

Jens Tröger jens.troeger at
Sun Mar 25 23:10:15 UTC 2018


I’d like to get some confirmation on how Writer document represent numbered paragraphs. See the paragraph properties service, <>.

If `NumberingIsNumber` is True then it’s a list item of sorts: `NumberingLevel` tells me which level in the nesting hierarchy it might be but really just counts the numbers of tab-indents. There’s a max of 10 levels (i.e. tab-indents). For each of the levels there exists a set of “rules” (`NumberingRules`) that contain the “type” (`NumberingType`) for each level. Meaning that I can get more information about a list item by getting its type = rules[level].

The `NumberingIsOutline` values seems to be unreliable, and `OutlineLevel` is greater than 1 if the paragraph is a heading of sorts. By default, “Title” and “Heading 1” are both 1. So checking whether a paragraph is a heading depends on the `OutlineLevel` rather than the `NumberingIsOutline` boolean.

Is that about right? What did I miss with respect to document hierarchy?


Jens Tröger <>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the LibreOffice mailing list