Mixin List
Mixin class for classes containing Lists, “text:list”.
Classes:
| Name | Description |
|---|---|
ListMixin |
Mixin class for classes containing Lists. |
ListMixin
Bases: Element
Mixin class for classes containing Lists.
Used by the following classes: “draw:caption”, “draw:circle”, “draw:connector”, “draw:custom-shape”, “draw:ellipse”, “draw:image”, “draw:line”, “draw:measure”, “draw:path”, “draw:polygon”, “draw:polyline”, “draw:rect”, “draw:regular-polygon”, “draw:text-box”, “office:annotation”, “office:text”, “style:footer”, “style:footer-first”, “style:footer-left”, “style:header”, “style:header-first”, “style:header-left”, “table:covered-table-cell”, “table:table-cell”, “text:deletion”, “text:index-body”, “text:index-title”, “text:list-header”, “text:list-item”, “text:note-body”, “text:section”.
*: not implemented.
Methods:
| Name | Description |
|---|---|
get_list |
Returns a single list that matches the specified criteria. |
get_lists |
Returns all lists that match the specified criteria. |
Attributes:
| Name | Type | Description |
|---|---|---|
lists |
list[List]
|
Returns all lists as a list. |
Source code in odfdo/mixin_list.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | |
lists
property
lists: list[List]
get_list
get_list(
position: int = 0, content: str | None = None
) -> List | None
Returns a single list that matches the specified criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
position
|
int
|
The 0-based index of the matching list to return. |
0
|
content
|
str | None
|
A regex pattern to match against the list’s content. |
None
|
Returns:
| Type | Description |
|---|---|
List | None
|
List | None: A List instance, or None if no list matches the criteria. |
Source code in odfdo/mixin_list.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | |
get_lists
get_lists(
style: str | None = None, content: str | None = None
) -> list[List]
Returns all lists that match the specified criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
style
|
str | None
|
The name of the style to filter lists by. |
None
|
content
|
str | None
|
A regex pattern to match against the list’s content. |
None
|
Returns:
| Type | Description |
|---|---|
list[List]
|
list[List]: A list of |
Source code in odfdo/mixin_list.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |