From d6a6b34a3de134063e7df9612501491f1100740d Mon Sep 17 00:00:00 2001 From: Jerome Dumonteil Date: Sat, 9 Mar 2024 18:13:38 +0100 Subject: [PATCH] update dependencies, doc, version --- doc/bookmark.html | 715 - doc/cell.html | 1209 - doc/const.html | 767 - doc/container.html | 1135 - doc/content.html | 392 - doc/datatype.html | 760 - doc/document.html | 3188 -- doc/draw_page.html | 596 - doc/element.html | 11046 ------ doc/element_typed.html | 735 - doc/frame.html | 1853 - doc/header.html | 536 - doc/header_rows.html | 246 - doc/image.html | 805 - doc/index.html | 46561 +----------------------- doc/link.html | 530 - doc/list.html | 928 - doc/manifest.html | 451 - doc/meta.html | 2191 -- doc/note.html | 1580 - doc/odfdo.html | 59027 +++++++++++++++++++++++++++++++ doc/paragraph.html | 3405 -- doc/paragraph_base.html | 1162 - doc/reference.html | 1808 - doc/row.html | 2608 -- doc/scripts/diff.html | 262 - doc/scripts/folder.html | 174 - doc/scripts/headers.html | 385 - doc/scripts/highlight.html | 577 - doc/scripts/index.html | 95 - doc/scripts/replace.html | 326 - doc/scripts/show.html | 488 - doc/scripts/styles.html | 521 - doc/scriptutils.html | 209 - doc/search.js | 46 + doc/section.html | 359 - doc/shapes.html | 2581 -- doc/smil.html | 977 - doc/style.html | 3887 -- doc/styles.html | 466 - doc/table.html | 10327 ------ doc/templates/index.html | 53 - doc/toc.html | 2582 -- doc/tracked_changes.html | 3811 -- doc/utils/cache_map.html | 656 - doc/utils/cached_element.html | 116 - doc/utils/coordinates.html | 345 - doc/utils/formula.html | 137 - doc/utils/index.html | 852 - doc/utils/str_convert.html | 170 - doc/utils/style_constants.html | 135 - doc/utils/xpath_query.html | 288 - doc/variable.html | 4972 --- doc/version.html | 91 - doc/xmlpart.html | 410 - poetry.lock | 93 +- pyproject.toml | 2 +- 57 files changed, 59124 insertions(+), 121503 deletions(-) delete mode 100644 doc/bookmark.html delete mode 100644 doc/cell.html delete mode 100644 doc/const.html delete mode 100644 doc/container.html delete mode 100644 doc/content.html delete mode 100644 doc/datatype.html delete mode 100644 doc/document.html delete mode 100644 doc/draw_page.html delete mode 100644 doc/element.html delete mode 100644 doc/element_typed.html delete mode 100644 doc/frame.html delete mode 100644 doc/header.html delete mode 100644 doc/header_rows.html delete mode 100644 doc/image.html delete mode 100644 doc/link.html delete mode 100644 doc/list.html delete mode 100644 doc/manifest.html delete mode 100644 doc/meta.html delete mode 100644 doc/note.html create mode 100644 doc/odfdo.html delete mode 100644 doc/paragraph.html delete mode 100644 doc/paragraph_base.html delete mode 100644 doc/reference.html delete mode 100644 doc/row.html delete mode 100644 doc/scripts/diff.html delete mode 100644 doc/scripts/folder.html delete mode 100644 doc/scripts/headers.html delete mode 100644 doc/scripts/highlight.html delete mode 100644 doc/scripts/index.html delete mode 100644 doc/scripts/replace.html delete mode 100644 doc/scripts/show.html delete mode 100644 doc/scripts/styles.html delete mode 100644 doc/scriptutils.html create mode 100644 doc/search.js delete mode 100644 doc/section.html delete mode 100644 doc/shapes.html delete mode 100644 doc/smil.html delete mode 100644 doc/style.html delete mode 100644 doc/styles.html delete mode 100644 doc/table.html delete mode 100644 doc/templates/index.html delete mode 100644 doc/toc.html delete mode 100644 doc/tracked_changes.html delete mode 100644 doc/utils/cache_map.html delete mode 100644 doc/utils/cached_element.html delete mode 100644 doc/utils/coordinates.html delete mode 100644 doc/utils/formula.html delete mode 100644 doc/utils/index.html delete mode 100644 doc/utils/str_convert.html delete mode 100644 doc/utils/style_constants.html delete mode 100644 doc/utils/xpath_query.html delete mode 100644 doc/variable.html delete mode 100644 doc/version.html delete mode 100644 doc/xmlpart.html diff --git a/doc/bookmark.html b/doc/bookmark.html deleted file mode 100644 index faacc27..0000000 --- a/doc/bookmark.html +++ /dev/null @@ -1,715 +0,0 @@ - - - - - - -odfdo.bookmark API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.bookmark

-
-
-

Bookmark class for "text:bookmark".

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-"""Bookmark class for "text:bookmark".
-"""
-from __future__ import annotations
-
-from typing import Any
-
-from .element import Element, PropDef, register_element_class
-
-
-class Bookmark(Element):
-    """
-    Bookmark class for ODF "text:bookmark"
-
-    Arguments:
-
-        name -- str
-    """
-
-    _tag = "text:bookmark"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-
-Bookmark._define_attribut_property()
-
-
-class BookmarkStart(Element):
-    """
-    BookmarkStart class for ODF "text:bookmark-start"
-
-    Arguments:
-
-        name -- str
-    """
-
-    _tag = "text:bookmark-start"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-
-BookmarkStart._define_attribut_property()
-
-
-class BookmarkEnd(Element):
-    """
-    BookmarkEnd class for ODF "text:bookmark-end"
-
-    Arguments:
-
-        name -- str
-    """
-
-    _tag = "text:bookmark-end"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-
-BookmarkEnd._define_attribut_property()
-
-register_element_class(Bookmark)
-register_element_class(BookmarkStart)
-register_element_class(BookmarkEnd)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class Bookmark -(name: str = '', **kwargs: Any) -
-
-

Bookmark class for ODF "text:bookmark"

-

Arguments

-

name – str

-
- -Expand source code - -
class Bookmark(Element):
-    """
-    Bookmark class for ODF "text:bookmark"
-
-    Arguments:
-
-        name -- str
-    """
-
-    _tag = "text:bookmark"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class BookmarkEnd -(name: str = '', **kwargs: Any) -
-
-

BookmarkEnd class for ODF "text:bookmark-end"

-

Arguments

-

name – str

-
- -Expand source code - -
class BookmarkEnd(Element):
-    """
-    BookmarkEnd class for ODF "text:bookmark-end"
-
-    Arguments:
-
-        name -- str
-    """
-
-    _tag = "text:bookmark-end"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class BookmarkStart -(name: str = '', **kwargs: Any) -
-
-

BookmarkStart class for ODF "text:bookmark-start"

-

Arguments

-

name – str

-
- -Expand source code - -
class BookmarkStart(Element):
-    """
-    BookmarkStart class for ODF "text:bookmark-start"
-
-    Arguments:
-
-        name -- str
-    """
-
-    _tag = "text:bookmark-start"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/cell.html b/doc/cell.html deleted file mode 100644 index 65da7ad..0000000 --- a/doc/cell.html +++ /dev/null @@ -1,1209 +0,0 @@ - - - - - - -odfdo.cell API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.cell

-
-
-

Table class for "table:table" and HeaderRows, Cell, Row, Column, -NamedRange related classes.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2012 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Table class for "table:table" and HeaderRows, Cell, Row, Column,
-NamedRange related classes.
-"""
-from __future__ import annotations
-
-import contextlib
-from datetime import date, datetime, timedelta
-from decimal import Decimal
-from typing import Any
-
-from .datatype import Boolean, Date, DateTime, Duration
-from .element import Element, register_element_class_list
-from .element_typed import ElementTyped
-from .utils import bytes_to_str
-
-
-class Cell(ElementTyped):
-    """ "table:table-cell" table cell element."""
-
-    _tag = "table:table-cell"
-    _caching = True
-
-    def __init__(
-        self,
-        value: Any = None,
-        text: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        formula: str | None = None,
-        repeated: int | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a cell element containing the given value. The textual
-        representation is automatically formatted but can be provided. Cell
-        type can be deduced as well, unless the number is a percentage or
-        currency. If cell type is "currency", the currency must be given.
-        The cell can be repeated on the given number of columns.
-
-        Arguments:
-
-            value -- bool, int, float, Decimal, date, datetime, str,
-                     timedelta
-
-            text -- str
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                         'string' or 'time'
-
-            currency -- three-letter str
-
-            repeated -- int
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        self.x = None
-        self.y = None
-        if self._do_init:
-            self.set_value(
-                value,
-                text=text,
-                cell_type=cell_type,
-                currency=currency,
-                formula=formula,
-            )
-            if repeated and repeated > 1:
-                self.repeated = repeated
-            if style is not None:
-                self.style = style
-
-    @property
-    def clone(self) -> Cell:
-        clone = Element.clone.fget(self)  # type: ignore
-        clone.y = self.y
-        clone.x = self.x
-        if hasattr(self, "_tmap"):
-            if hasattr(self, "_rmap"):
-                clone._rmap = self._rmap[:]
-            clone._tmap = self._tmap[:]
-            clone._cmap = self._cmap[:]
-        return clone
-
-    @property
-    def value(
-        self,
-    ) -> str | bool | int | float | Decimal | date | datetime | timedelta | None:
-        """Set / get the value of the cell. The type is read from the
-        'office:value-type' attribute of the cell. When setting the value,
-        the type of the value will determine the new value_type of the cell.
-
-        Warning: use this method for boolean, float or string only.
-        """
-        value_type = self.get_attribute_string("office:value-type")
-        if value_type == "boolean":
-            return self.get_attribute("office:boolean-value")
-        if value_type in {"float", "percentage", "currency"}:
-            value_decimal = Decimal(str(self.get_attribute_string("office:value")))
-            # Return 3 instead of 3.0 if possible
-            if int(value_decimal) == value_decimal:
-                return int(value_decimal)
-            return value_decimal
-        if value_type == "date":
-            value_str = str(self.get_attribute_string("office:date-value"))
-            if "T" in value_str:
-                return DateTime.decode(value_str)
-            return Date.decode(value_str)
-        if value_type == "time":
-            return Duration.decode(str(self.get_attribute_string("office:time-value")))
-        if value_type == "string":
-            value = self.get_attribute_string("office:string-value")
-            if value is not None:
-                return value
-            value_list = []
-            for para in self.get_elements("text:p"):
-                value_list.append(para.text_recursive)
-            return "\n".join(value_list)
-        return None
-
-    @value.setter
-    def value(self, value: str | bytes | bool | int | float | Decimal | None) -> None:
-        self.clear()
-        if value is None:
-            return
-        if isinstance(value, (str, bytes)):
-            if isinstance(value, bytes):
-                value = bytes_to_str(value)
-            self.set_attribute("office:value-type", "string")
-            self.set_attribute("office:string-value", value)
-            self.text = value
-            return
-        if value is True or value is False:
-            self.set_attribute("office:value-type", "boolean")
-            value_bool = Boolean.encode(value)
-            self.set_attribute("office:boolean-value", value_bool)
-            self.text = value_bool
-            return
-        if isinstance(value, (int, float, Decimal)):
-            self.set_attribute("office:value-type", "float")
-            value_str = str(value)
-            self.set_attribute("office:value", value_str)
-            self.text = value_str
-            return
-        raise TypeError(f"Unknown value type, try with set_value() : {value!r}")
-
-    @property
-    def float(self) -> float:
-        """Set / get the value of the cell as a float (or 0.0)."""
-        for tag in ("office:value", "office:string-value", "office:boolean-value"):
-            read_attr = self.get_attribute(tag)
-            if isinstance(read_attr, str):
-                with contextlib.suppress(ValueError, TypeError):
-                    return float(read_attr)
-        return 0.0
-
-    @float.setter
-    def float(self, value: str | float | int | Decimal) -> None:
-        try:
-            value_float = float(value)
-        except (ValueError, TypeError):
-            value_float = 0.0
-        value_str = str(value_float)
-        self.clear()
-        self.set_attribute("office:value", value_str)
-        self.set_attribute("office:value-type", "float")
-        self.text = value_str
-
-    @property
-    def string(self) -> str:
-        """Set / get the value of the cell as a string (or '')."""
-        value = self.get_attribute_string("office:string-value")
-        if isinstance(value, str):
-            return value
-        return ""
-
-    @string.setter
-    def string(
-        self,
-        value: str | bytes | int | float | Decimal | bool | None,  # type: ignore
-    ) -> None:
-        self.clear()
-        if value is None:
-            value_str = ""
-        else:
-            value_str = str(value)
-        self.set_attribute("office:value-type", "string")
-        self.set_attribute("office:string-value", value_str)
-        self.text = value_str
-
-    def set_value(
-        self,
-        value: (
-            str  # type: ignore
-            | bytes
-            | float
-            | int
-            | Decimal
-            | bool
-            | datetime
-            | date
-            | timedelta
-            | None
-        ),
-        text: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        formula: str | None = None,
-    ) -> None:
-        """Set the cell state from the Python value type.
-
-        Text is how the cell is displayed. Cell type is guessed,
-        unless provided.
-
-        For monetary values, provide the name of the currency.
-
-        Arguments:
-
-            value -- Python type
-
-            text -- str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                        'currency' or 'percentage'
-
-            currency -- str
-        """
-        self.clear()
-        text = self.set_value_and_type(
-            value=value,
-            text=text,
-            value_type=cell_type,
-            currency=currency,
-        )
-        if text is not None:
-            self.text_content = text
-        if formula is not None:
-            self.formula = formula
-
-    @property
-    def type(self) -> str | None:
-        """Get / set the type of the cell: boolean, float, date, string
-        or time.
-
-        Return: str | None
-        """
-        return self.get_attribute_string("office:value-type")
-
-    @type.setter
-    def type(self, cell_type: str) -> None:
-        self.set_attribute("office:value-type", cell_type)
-
-    @property
-    def currency(self) -> str | None:
-        """Get / set the currency used for monetary values.
-
-        Return: str | None
-        """
-        return self.get_attribute_string("office:currency")
-
-    @currency.setter
-    def currency(self, currency: str) -> None:
-        self.set_attribute("office:currency", currency)
-
-    def _set_repeated(self, repeated: int | None) -> None:
-        """Internal only. Set the numnber of times the cell is repeated, or
-        None to delete. Without changing cache.
-        """
-        if repeated is None or repeated < 2:
-            with contextlib.suppress(KeyError):
-                self.del_attribute("table:number-columns-repeated")
-            return
-        self.set_attribute("table:number-columns-repeated", str(repeated))
-
-    @property
-    def repeated(self) -> int | None:
-        """Get / set the number of times the cell is repeated.
-
-        Always None when using the table API.
-
-        Return: int or None
-        """
-        repeated = self.get_attribute("table:number-columns-repeated")
-        if repeated is None:
-            return None
-        return int(repeated)
-
-    @repeated.setter
-    def repeated(self, repeated: int | None) -> None:
-        self._set_repeated(repeated)
-        # update cache
-        child: Element = self
-        while True:
-            # look for Row, parent may be group of rows
-            upper = child.parent
-            if not upper:
-                # lonely cell
-                return
-            # parent may be group of rows, not table
-            if isinstance(upper, Element) and upper._tag == "table:table-row":
-                break
-            child = upper
-        # fixme : need to optimize this
-        if isinstance(upper, Element) and upper._tag == "table:table-row":
-            upper._compute_row_cache()
-
-    @property
-    def style(self) -> str | None:
-        """Get / set the style of the cell itself.
-
-        Return: str | None
-        """
-        return self.get_attribute_string("table:style-name")
-
-    @style.setter
-    def style(self, style: str | Element) -> None:
-        self.set_style_attribute("table:style-name", style)
-
-    @property
-    def formula(self) -> str | None:
-        """Get / set the formula of the cell, or None if undefined.
-
-        The formula is not interpreted in any way.
-
-        Return: str | None
-        """
-        return self.get_attribute_string("table:formula")
-
-    @formula.setter
-    def formula(self, formula: str | None) -> None:
-        self.set_attribute("table:formula", formula)
-
-    def is_empty(self, aggressive: bool = False) -> bool:
-        if self.value is not None or self.children:
-            return False
-        if not aggressive and self.style is not None:
-            return False
-        return True
-
-    def _is_spanned(self) -> bool:
-        if self.tag == "table:covered-table-cell":
-            return True
-        if self.get_attribute("table:number-columns-spanned") is not None:
-            return True
-        if self.get_attribute("table:number-rows-spanned") is not None:
-            return True
-        return False
-
-
-register_element_class_list(Cell, (Cell._tag, "table:covered-table-cell"))
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class Cell -(value: Any = None, text: str | None = None, cell_type: str | None = None, currency: str | None = None, formula: str | None = None, repeated: int | None = None, style: str | None = None, **kwargs: Any) -
-
-

"table:table-cell" table cell element.

-

Create a cell element containing the given value. The textual -representation is automatically formatted but can be provided. Cell -type can be deduced as well, unless the number is a percentage or -currency. If cell type is "currency", the currency must be given. -The cell can be repeated on the given number of columns.

-

Arguments

-

value – bool, int, float, Decimal, date, datetime, str, -timedelta

-

text – str

-

cell_type – 'boolean', 'currency', 'date', 'float', 'percentage', -'string' or 'time'

-

currency – three-letter str

-

repeated – int

-

style – str

-
- -Expand source code - -
class Cell(ElementTyped):
-    """ "table:table-cell" table cell element."""
-
-    _tag = "table:table-cell"
-    _caching = True
-
-    def __init__(
-        self,
-        value: Any = None,
-        text: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        formula: str | None = None,
-        repeated: int | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a cell element containing the given value. The textual
-        representation is automatically formatted but can be provided. Cell
-        type can be deduced as well, unless the number is a percentage or
-        currency. If cell type is "currency", the currency must be given.
-        The cell can be repeated on the given number of columns.
-
-        Arguments:
-
-            value -- bool, int, float, Decimal, date, datetime, str,
-                     timedelta
-
-            text -- str
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                         'string' or 'time'
-
-            currency -- three-letter str
-
-            repeated -- int
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        self.x = None
-        self.y = None
-        if self._do_init:
-            self.set_value(
-                value,
-                text=text,
-                cell_type=cell_type,
-                currency=currency,
-                formula=formula,
-            )
-            if repeated and repeated > 1:
-                self.repeated = repeated
-            if style is not None:
-                self.style = style
-
-    @property
-    def clone(self) -> Cell:
-        clone = Element.clone.fget(self)  # type: ignore
-        clone.y = self.y
-        clone.x = self.x
-        if hasattr(self, "_tmap"):
-            if hasattr(self, "_rmap"):
-                clone._rmap = self._rmap[:]
-            clone._tmap = self._tmap[:]
-            clone._cmap = self._cmap[:]
-        return clone
-
-    @property
-    def value(
-        self,
-    ) -> str | bool | int | float | Decimal | date | datetime | timedelta | None:
-        """Set / get the value of the cell. The type is read from the
-        'office:value-type' attribute of the cell. When setting the value,
-        the type of the value will determine the new value_type of the cell.
-
-        Warning: use this method for boolean, float or string only.
-        """
-        value_type = self.get_attribute_string("office:value-type")
-        if value_type == "boolean":
-            return self.get_attribute("office:boolean-value")
-        if value_type in {"float", "percentage", "currency"}:
-            value_decimal = Decimal(str(self.get_attribute_string("office:value")))
-            # Return 3 instead of 3.0 if possible
-            if int(value_decimal) == value_decimal:
-                return int(value_decimal)
-            return value_decimal
-        if value_type == "date":
-            value_str = str(self.get_attribute_string("office:date-value"))
-            if "T" in value_str:
-                return DateTime.decode(value_str)
-            return Date.decode(value_str)
-        if value_type == "time":
-            return Duration.decode(str(self.get_attribute_string("office:time-value")))
-        if value_type == "string":
-            value = self.get_attribute_string("office:string-value")
-            if value is not None:
-                return value
-            value_list = []
-            for para in self.get_elements("text:p"):
-                value_list.append(para.text_recursive)
-            return "\n".join(value_list)
-        return None
-
-    @value.setter
-    def value(self, value: str | bytes | bool | int | float | Decimal | None) -> None:
-        self.clear()
-        if value is None:
-            return
-        if isinstance(value, (str, bytes)):
-            if isinstance(value, bytes):
-                value = bytes_to_str(value)
-            self.set_attribute("office:value-type", "string")
-            self.set_attribute("office:string-value", value)
-            self.text = value
-            return
-        if value is True or value is False:
-            self.set_attribute("office:value-type", "boolean")
-            value_bool = Boolean.encode(value)
-            self.set_attribute("office:boolean-value", value_bool)
-            self.text = value_bool
-            return
-        if isinstance(value, (int, float, Decimal)):
-            self.set_attribute("office:value-type", "float")
-            value_str = str(value)
-            self.set_attribute("office:value", value_str)
-            self.text = value_str
-            return
-        raise TypeError(f"Unknown value type, try with set_value() : {value!r}")
-
-    @property
-    def float(self) -> float:
-        """Set / get the value of the cell as a float (or 0.0)."""
-        for tag in ("office:value", "office:string-value", "office:boolean-value"):
-            read_attr = self.get_attribute(tag)
-            if isinstance(read_attr, str):
-                with contextlib.suppress(ValueError, TypeError):
-                    return float(read_attr)
-        return 0.0
-
-    @float.setter
-    def float(self, value: str | float | int | Decimal) -> None:
-        try:
-            value_float = float(value)
-        except (ValueError, TypeError):
-            value_float = 0.0
-        value_str = str(value_float)
-        self.clear()
-        self.set_attribute("office:value", value_str)
-        self.set_attribute("office:value-type", "float")
-        self.text = value_str
-
-    @property
-    def string(self) -> str:
-        """Set / get the value of the cell as a string (or '')."""
-        value = self.get_attribute_string("office:string-value")
-        if isinstance(value, str):
-            return value
-        return ""
-
-    @string.setter
-    def string(
-        self,
-        value: str | bytes | int | float | Decimal | bool | None,  # type: ignore
-    ) -> None:
-        self.clear()
-        if value is None:
-            value_str = ""
-        else:
-            value_str = str(value)
-        self.set_attribute("office:value-type", "string")
-        self.set_attribute("office:string-value", value_str)
-        self.text = value_str
-
-    def set_value(
-        self,
-        value: (
-            str  # type: ignore
-            | bytes
-            | float
-            | int
-            | Decimal
-            | bool
-            | datetime
-            | date
-            | timedelta
-            | None
-        ),
-        text: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        formula: str | None = None,
-    ) -> None:
-        """Set the cell state from the Python value type.
-
-        Text is how the cell is displayed. Cell type is guessed,
-        unless provided.
-
-        For monetary values, provide the name of the currency.
-
-        Arguments:
-
-            value -- Python type
-
-            text -- str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                        'currency' or 'percentage'
-
-            currency -- str
-        """
-        self.clear()
-        text = self.set_value_and_type(
-            value=value,
-            text=text,
-            value_type=cell_type,
-            currency=currency,
-        )
-        if text is not None:
-            self.text_content = text
-        if formula is not None:
-            self.formula = formula
-
-    @property
-    def type(self) -> str | None:
-        """Get / set the type of the cell: boolean, float, date, string
-        or time.
-
-        Return: str | None
-        """
-        return self.get_attribute_string("office:value-type")
-
-    @type.setter
-    def type(self, cell_type: str) -> None:
-        self.set_attribute("office:value-type", cell_type)
-
-    @property
-    def currency(self) -> str | None:
-        """Get / set the currency used for monetary values.
-
-        Return: str | None
-        """
-        return self.get_attribute_string("office:currency")
-
-    @currency.setter
-    def currency(self, currency: str) -> None:
-        self.set_attribute("office:currency", currency)
-
-    def _set_repeated(self, repeated: int | None) -> None:
-        """Internal only. Set the numnber of times the cell is repeated, or
-        None to delete. Without changing cache.
-        """
-        if repeated is None or repeated < 2:
-            with contextlib.suppress(KeyError):
-                self.del_attribute("table:number-columns-repeated")
-            return
-        self.set_attribute("table:number-columns-repeated", str(repeated))
-
-    @property
-    def repeated(self) -> int | None:
-        """Get / set the number of times the cell is repeated.
-
-        Always None when using the table API.
-
-        Return: int or None
-        """
-        repeated = self.get_attribute("table:number-columns-repeated")
-        if repeated is None:
-            return None
-        return int(repeated)
-
-    @repeated.setter
-    def repeated(self, repeated: int | None) -> None:
-        self._set_repeated(repeated)
-        # update cache
-        child: Element = self
-        while True:
-            # look for Row, parent may be group of rows
-            upper = child.parent
-            if not upper:
-                # lonely cell
-                return
-            # parent may be group of rows, not table
-            if isinstance(upper, Element) and upper._tag == "table:table-row":
-                break
-            child = upper
-        # fixme : need to optimize this
-        if isinstance(upper, Element) and upper._tag == "table:table-row":
-            upper._compute_row_cache()
-
-    @property
-    def style(self) -> str | None:
-        """Get / set the style of the cell itself.
-
-        Return: str | None
-        """
-        return self.get_attribute_string("table:style-name")
-
-    @style.setter
-    def style(self, style: str | Element) -> None:
-        self.set_style_attribute("table:style-name", style)
-
-    @property
-    def formula(self) -> str | None:
-        """Get / set the formula of the cell, or None if undefined.
-
-        The formula is not interpreted in any way.
-
-        Return: str | None
-        """
-        return self.get_attribute_string("table:formula")
-
-    @formula.setter
-    def formula(self, formula: str | None) -> None:
-        self.set_attribute("table:formula", formula)
-
-    def is_empty(self, aggressive: bool = False) -> bool:
-        if self.value is not None or self.children:
-            return False
-        if not aggressive and self.style is not None:
-            return False
-        return True
-
-    def _is_spanned(self) -> bool:
-        if self.tag == "table:covered-table-cell":
-            return True
-        if self.get_attribute("table:number-columns-spanned") is not None:
-            return True
-        if self.get_attribute("table:number-rows-spanned") is not None:
-            return True
-        return False
-
-

Ancestors

- -

Instance variables

-
-
var cloneCell
-
-
-
- -Expand source code - -
@property
-def clone(self) -> Cell:
-    clone = Element.clone.fget(self)  # type: ignore
-    clone.y = self.y
-    clone.x = self.x
-    if hasattr(self, "_tmap"):
-        if hasattr(self, "_rmap"):
-            clone._rmap = self._rmap[:]
-        clone._tmap = self._tmap[:]
-        clone._cmap = self._cmap[:]
-    return clone
-
-
-
var currency : str | None
-
-

Get / set the currency used for monetary values.

-

Return: str | None

-
- -Expand source code - -
@property
-def currency(self) -> str | None:
-    """Get / set the currency used for monetary values.
-
-    Return: str | None
-    """
-    return self.get_attribute_string("office:currency")
-
-
-
var float : float
-
-

Set / get the value of the cell as a float (or 0.0).

-
- -Expand source code - -
@property
-def float(self) -> float:
-    """Set / get the value of the cell as a float (or 0.0)."""
-    for tag in ("office:value", "office:string-value", "office:boolean-value"):
-        read_attr = self.get_attribute(tag)
-        if isinstance(read_attr, str):
-            with contextlib.suppress(ValueError, TypeError):
-                return float(read_attr)
-    return 0.0
-
-
-
var formula : str | None
-
-

Get / set the formula of the cell, or None if undefined.

-

The formula is not interpreted in any way.

-

Return: str | None

-
- -Expand source code - -
@property
-def formula(self) -> str | None:
-    """Get / set the formula of the cell, or None if undefined.
-
-    The formula is not interpreted in any way.
-
-    Return: str | None
-    """
-    return self.get_attribute_string("table:formula")
-
-
-
var repeated : int | None
-
-

Get / set the number of times the cell is repeated.

-

Always None when using the table API.

-

Return: int or None

-
- -Expand source code - -
@property
-def repeated(self) -> int | None:
-    """Get / set the number of times the cell is repeated.
-
-    Always None when using the table API.
-
-    Return: int or None
-    """
-    repeated = self.get_attribute("table:number-columns-repeated")
-    if repeated is None:
-        return None
-    return int(repeated)
-
-
-
var string : str
-
-

Set / get the value of the cell as a string (or '').

-
- -Expand source code - -
@property
-def string(self) -> str:
-    """Set / get the value of the cell as a string (or '')."""
-    value = self.get_attribute_string("office:string-value")
-    if isinstance(value, str):
-        return value
-    return ""
-
-
-
var style : str | None
-
-

Get / set the style of the cell itself.

-

Return: str | None

-
- -Expand source code - -
@property
-def style(self) -> str | None:
-    """Get / set the style of the cell itself.
-
-    Return: str | None
-    """
-    return self.get_attribute_string("table:style-name")
-
-
-
var type : str | None
-
-

Get / set the type of the cell: boolean, float, date, string -or time.

-

Return: str | None

-
- -Expand source code - -
@property
-def type(self) -> str | None:
-    """Get / set the type of the cell: boolean, float, date, string
-    or time.
-
-    Return: str | None
-    """
-    return self.get_attribute_string("office:value-type")
-
-
-
var value : str | bool | int | float | decimal.Decimal | datetime.date | datetime.datetime | datetime.timedelta | None
-
-

Set / get the value of the cell. The type is read from the -'office:value-type' attribute of the cell. When setting the value, -the type of the value will determine the new value_type of the cell.

-

Warning: use this method for boolean, float or string only.

-
- -Expand source code - -
@property
-def value(
-    self,
-) -> str | bool | int | float | Decimal | date | datetime | timedelta | None:
-    """Set / get the value of the cell. The type is read from the
-    'office:value-type' attribute of the cell. When setting the value,
-    the type of the value will determine the new value_type of the cell.
-
-    Warning: use this method for boolean, float or string only.
-    """
-    value_type = self.get_attribute_string("office:value-type")
-    if value_type == "boolean":
-        return self.get_attribute("office:boolean-value")
-    if value_type in {"float", "percentage", "currency"}:
-        value_decimal = Decimal(str(self.get_attribute_string("office:value")))
-        # Return 3 instead of 3.0 if possible
-        if int(value_decimal) == value_decimal:
-            return int(value_decimal)
-        return value_decimal
-    if value_type == "date":
-        value_str = str(self.get_attribute_string("office:date-value"))
-        if "T" in value_str:
-            return DateTime.decode(value_str)
-        return Date.decode(value_str)
-    if value_type == "time":
-        return Duration.decode(str(self.get_attribute_string("office:time-value")))
-    if value_type == "string":
-        value = self.get_attribute_string("office:string-value")
-        if value is not None:
-            return value
-        value_list = []
-        for para in self.get_elements("text:p"):
-            value_list.append(para.text_recursive)
-        return "\n".join(value_list)
-    return None
-
-
-
-

Methods

-
-
-def set_value(self, value: str | bytes | float | int | Decimal | bool | datetime | date | timedelta | None, text: str | None = None, cell_type: str | None = None, currency: str | None = None, formula: str | None = None) ‑> None -
-
-

Set the cell state from the Python value type.

-

Text is how the cell is displayed. Cell type is guessed, -unless provided.

-

For monetary values, provide the name of the currency.

-

Arguments

-

value – Python type

-

text – str

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency' or 'percentage'

-

currency – str

-
- -Expand source code - -
def set_value(
-    self,
-    value: (
-        str  # type: ignore
-        | bytes
-        | float
-        | int
-        | Decimal
-        | bool
-        | datetime
-        | date
-        | timedelta
-        | None
-    ),
-    text: str | None = None,
-    cell_type: str | None = None,
-    currency: str | None = None,
-    formula: str | None = None,
-) -> None:
-    """Set the cell state from the Python value type.
-
-    Text is how the cell is displayed. Cell type is guessed,
-    unless provided.
-
-    For monetary values, provide the name of the currency.
-
-    Arguments:
-
-        value -- Python type
-
-        text -- str
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                    'currency' or 'percentage'
-
-        currency -- str
-    """
-    self.clear()
-    text = self.set_value_and_type(
-        value=value,
-        text=text,
-        value_type=cell_type,
-        currency=currency,
-    )
-    if text is not None:
-        self.text_content = text
-    if formula is not None:
-        self.formula = formula
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/const.html b/doc/const.html deleted file mode 100644 index 860f9f1..0000000 --- a/doc/const.html +++ /dev/null @@ -1,767 +0,0 @@ - - - - - - -odfdo.const API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.const

-
-
-

Constants, XML tags and ODF headers.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-"""Constants, XML tags and ODF headers.
-"""
-from __future__ import annotations
-
-ODF_TEMPLATES = {
-    "text": "text.ott",
-    "texte": "text.ott",
-    "spreadsheet": "spreadsheet.ots",
-    "tableur": "spreadsheet.ots",
-    "presentation": "presentation.otp",
-    # Follow the spec
-    "drawing": "drawing.otg",
-    # Follow the mimetype
-    "graphics": "drawing.otg",
-    "graphic": "drawing.otg",
-    # TODO
-    #'chart': 'templates/chart.otc',
-    #'image': 'templates/image.oti',
-    #'formula': 'templates/image.otf',
-    #'master': 'templates/image.odm',
-    #'web': 'templates/image.oth',
-}
-
-ODF_TEXT = "application/vnd.oasis.opendocument.text"
-ODF_TEXT_TEMPLATE = "application/vnd.oasis.opendocument.text-template"
-ODF_SPREADSHEET = "application/vnd.oasis.opendocument.spreadsheet"
-ODF_SPREADSHEET_TEMPLATE = "application/vnd.oasis.opendocument.spreadsheet-template"
-ODF_PRESENTATION = "application/vnd.oasis.opendocument.presentation"
-ODF_PRESENTATION_TEMPLATE = "application/vnd.oasis.opendocument.presentation-template"
-ODF_DRAWING = "application/vnd.oasis.opendocument.graphics"
-ODF_DRAWING_TEMPLATE = "application/vnd.oasis.opendocument.graphics-template"
-ODF_CHART = "application/vnd.oasis.opendocument.chart"
-ODF_CHART_TEMPLATE = "application/vnd.oasis.opendocument.chart-template"
-ODF_IMAGE = "application/vnd.oasis.opendocument.image"
-ODF_IMAGE_TEMPLATE = "application/vnd.oasis.opendocument.image-template"
-ODF_FORMULA = "application/vnd.oasis.opendocument.formula"
-ODF_FORMULA_TEMPLATE = "application/vnd.oasis.opendocument.formula-template"
-ODF_MASTER = "application/vnd.oasis.opendocument.text-master"
-ODF_WEB = "application/vnd.oasis.opendocument.text-web"
-
-# File extensions and their mimetype
-ODF_EXTENSIONS = {
-    "odt": ODF_TEXT,
-    "ott": ODF_TEXT_TEMPLATE,
-    "ods": ODF_SPREADSHEET,
-    "ots": ODF_SPREADSHEET_TEMPLATE,
-    "odp": ODF_PRESENTATION,
-    "otp": ODF_PRESENTATION_TEMPLATE,
-    "odg": ODF_DRAWING,
-    "otg": ODF_DRAWING_TEMPLATE,
-    "odc": ODF_CHART,
-    "otc": ODF_CHART_TEMPLATE,
-    "odi": ODF_IMAGE,
-    "oti": ODF_IMAGE_TEMPLATE,
-    "odf": ODF_FORMULA,
-    "otf": ODF_FORMULA_TEMPLATE,
-    "odm": ODF_MASTER,
-    "oth": ODF_WEB,
-}
-
-# Mimetypes and their file extension
-ODF_MIMETYPES = {
-    ODF_TEXT: "odt",
-    ODF_TEXT_TEMPLATE: "ott",
-    ODF_SPREADSHEET: "ods",
-    ODF_SPREADSHEET_TEMPLATE: "ots",
-    ODF_PRESENTATION: "odp",
-    ODF_PRESENTATION_TEMPLATE: "otp",
-    ODF_DRAWING: "odg",
-    ODF_DRAWING_TEMPLATE: "otg",
-    ODF_CHART: "odc",
-    ODF_CHART_TEMPLATE: "otc",
-    ODF_IMAGE: "odi",
-    ODF_IMAGE_TEMPLATE: "oti",
-    ODF_FORMULA: "odf",
-    ODF_FORMULA_TEMPLATE: "otf",
-    ODF_MASTER: "odm",
-    ODF_WEB: "oth",
-}
-
-# Standard parts in the container (other are regular paths)
-ODF_PARTS = ("content", "meta", "settings", "styles", "manifest")
-
-# Paths of standard parts
-ODF_CONTENT = "content.xml"
-ODF_META = "meta.xml"
-ODF_SETTINGS = "settings.xml"
-ODF_STYLES = "styles.xml"
-ODF_MANIFEST = "META-INF/manifest.xml"
-
-# Presentation classes (for layout)
-ODF_CLASSES = (
-    "title",
-    "outline",
-    "subtitle",
-    "text",
-    "graphic",
-    "object",
-    "chart",
-    "table",
-    "orgchart",
-    "page",
-    "notes",
-    "handout",
-)
-
-ODF_PROPERTIES = {
-    "chart:angle-offset",
-    "chart:auto-position",
-    "chart:auto-size",
-    "chart:axis-label-position",
-    "chart:axis-position",
-    "chart:connect-bars",
-    "chart:data-label-number",
-    "chart:data-label-symbol",
-    "chart:data-label-text",
-    "chart:deep",
-    "chart:display-label",
-    "chart:error-category",
-    "chart:error-lower-indicator",
-    "chart:error-lower-limit",
-    "chart:error-lower-range",
-    "chart:error-margin",
-    "chart:error-percentage",
-    "chart:error-upper-indicator",
-    "chart:error-upper-limit",
-    "chart:error-upper-range",
-    "chart:gap-width",
-    "chart:group-bars-per-axis",
-    "chart:hole-size",
-    "chart:include-hidden-cells",
-    "chart:interpolation",
-    "chart:interval-major",
-    "chart:interval-minor-divisor",
-    "chart:japanese-candle-stick",
-    "chart:label-arrangement",
-    "chart:label-position",
-    "chart:label-position-negative",
-    "chart:lines",
-    "chart:link-data-style-to-source",
-    "chart:logarithmic",
-    "chart:maximum",
-    "chart:mean-value",
-    "chart:minimum",
-    "chart:origin",
-    "chart:overlap",
-    "chart:percentage",
-    "chart:pie-offset",
-    "chart:regression-type",
-    "chart:reverse-direction",
-    "chart:right-angled-axes",
-    "chart:scale-text",
-    "chart:series-source",
-    "chart:solid-type",
-    "chart:sort-by-x-values",
-    "chart:spline-order",
-    "chart:spline-resolution",
-    "chart:stacked",
-    "chart:symbol-height",
-    "chart:symbol-name",
-    "chart:symbol-type",
-    "chart:symbol-width",
-    "chart:text-overlap",
-    "chart:three-dimensional",
-    "chart:tick-mark-position",
-    "chart:tick-marks-major-inner",
-    "chart:tick-marks-major-outer",
-    "chart:tick-marks-minor-inner",
-    "chart:tick-marks-minor-outer",
-    "chart:treat-empty-cells",
-    "chart:vertical",
-    "chart:visible",
-    "dr3d:ambient-color",
-    "dr3d:back-scale",
-    "dr3d:backface-culling",
-    "dr3d:close-back",
-    "dr3d:close-front",
-    "dr3d:depth",
-    "dr3d:diffuse-color",
-    "dr3d:edge-rounding",
-    "dr3d:edge-rounding-mode",
-    "dr3d:emissive-color",
-    "dr3d:end-angle",
-    "dr3d:horizontal-segments",
-    "dr3d:lighting-mode",
-    "dr3d:normals-direction",
-    "dr3d:normals-kind",
-    "dr3d:shadow",
-    "dr3d:shininess",
-    "dr3d:specular-color",
-    "dr3d:texture-filter",
-    "dr3d:texture-generation-mode-x",
-    "dr3d:texture-generation-mode-y",
-    "dr3d:texture-kind",
-    "dr3d:texture-mode",
-    "dr3d:vertical-segments",
-    "draw:auto-grow-height",
-    "draw:auto-grow-width",
-    "draw:background-size",
-    "draw:blue",
-    "draw:caption-angle",
-    "draw:caption-angle-type",
-    "draw:caption-escape",
-    "draw:caption-escape-direction",
-    "draw:caption-fit-line-length",
-    "draw:caption-gap",
-    "draw:caption-line-length",
-    "draw:caption-type",
-    "draw:color-inversion",
-    "draw:color-mode",
-    "draw:contrast",
-    "draw:decimal-places",
-    "draw:draw-aspect",
-    "draw:end-guide",
-    "draw:end-line-spacing-horizontal",
-    "draw:end-line-spacing-vertical",
-    "draw:fill",
-    "draw:fill-color",
-    "draw:fill-gradient-name",
-    "draw:fill-hatch-name",
-    "draw:fill-hatch-solid",
-    "draw:fill-image-height",
-    "draw:fill-image-name",
-    "draw:fill-image-ref-point",
-    "draw:fill-image-ref-point-x",
-    "draw:fill-image-ref-point-y",
-    "draw:fill-image-width",
-    "draw:fit-to-contour",
-    "draw:fit-to-size",
-    "draw:frame-display-border",
-    "draw:frame-display-scrollbar",
-    "draw:frame-margin-horizontal",
-    "draw:frame-margin-vertical",
-    "draw:gamma",
-    "draw:gradient-step-count",
-    "draw:green",
-    "draw:guide-distance",
-    "draw:guide-overhang",
-    "draw:image-opacity",
-    "draw:line-distance",
-    "draw:luminance",
-    "draw:marker-end",
-    "draw:marker-end-center",
-    "draw:marker-end-width",
-    "draw:marker-start",
-    "draw:marker-start-center",
-    "draw:marker-start-width",
-    "draw:measure-align",
-    "draw:measure-vertical-align",
-    "draw:ole-draw-aspect",
-    "draw:opacity",
-    "draw:opacity-name",
-    "draw:parallel",
-    "draw:placing",
-    "draw:red",
-    "draw:secondary-fill-color",
-    "draw:shadow",
-    "draw:shadow-color",
-    "draw:shadow-offset-x",
-    "draw:shadow-offset-y",
-    "draw:shadow-opacity",
-    "draw:show-unit",
-    "draw:start-guide",
-    "draw:start-line-spacing-horizontal",
-    "draw:start-line-spacing-vertical",
-    "draw:stroke",
-    "draw:stroke-dash",
-    "draw:stroke-dash-names",
-    "draw:stroke-linejoin",
-    "draw:symbol-color",
-    "draw:textarea-horizontal-align",
-    "draw:textarea-vertical-align",
-    "draw:tile-repeat-offset",
-    "draw:unit",
-    "draw:visible-area-height",
-    "draw:visible-area-left",
-    "draw:visible-area-top",
-    "draw:visible-area-width",
-    "draw:wrap-influence-on-position",
-    "fo:background-color",
-    "fo:border",
-    "fo:border-bottom",
-    "fo:border-left",
-    "fo:border-right",
-    "fo:border-top",
-    "fo:break-after",
-    "fo:break-before",
-    "fo:clip",
-    "fo:color",
-    "fo:country",
-    "fo:font-family",
-    "fo:font-size",
-    "fo:font-style",
-    "fo:font-variant",
-    "fo:font-weight",
-    "fo:height",
-    "fo:hyphenate",
-    "fo:hyphenation-keep",
-    "fo:hyphenation-ladder-count",
-    "fo:hyphenation-push-char-count",
-    "fo:hyphenation-remain-char-count",
-    "fo:keep-together",
-    "fo:keep-with-next",
-    "fo:language",
-    "fo:letter-spacing",
-    "fo:line-height",
-    "fo:margin",
-    "fo:margin-bottom",
-    "fo:margin-left",
-    "fo:margin-right",
-    "fo:margin-top",
-    "fo:max-height",
-    "fo:max-width",
-    "fo:min-height",
-    "fo:min-width",
-    "fo:orphans",
-    "fo:padding",
-    "fo:padding-bottom",
-    "fo:padding-left",
-    "fo:padding-right",
-    "fo:padding-top",
-    "fo:page-height",
-    "fo:page-width",
-    "fo:script",
-    "fo:text-align",
-    "fo:text-align-last",
-    "fo:text-indent",
-    "fo:text-shadow",
-    "fo:text-transform",
-    "fo:widows",
-    "fo:width",
-    "fo:wrap-option",
-    "presentation:background-objects-visible",
-    "presentation:background-visible",
-    "presentation:display-date-time",
-    "presentation:display-footer",
-    "presentation:display-header",
-    "presentation:display-page-number",
-    "presentation:duration",
-    "presentation:transition-speed",
-    "presentation:transition-style",
-    "presentation:transition-type",
-    "presentation:visibility",
-    "smil:direction",
-    "smil:fadeColor",
-    "smil:subtype",
-    "smil:type",
-    "style:auto-text-indent",
-    "style:background-transparency",
-    "style:border-line-width",
-    "style:border-line-width-bottom",
-    "style:border-line-width-left",
-    "style:border-line-width-right",
-    "style:border-line-width-top",
-    "style:cell-protect",
-    "style:column-width",
-    "style:country-asian",
-    "style:country-complex",
-    "style:decimal-places",
-    "style:diagonal-bl-tr",
-    "style:diagonal-bl-tr-widths",
-    "style:diagonal-tl-br",
-    "style:diagonal-tl-br-widths",
-    "style:direction",
-    "style:dynamic-spacing",
-    "style:editable",
-    "style:first-page-number",
-    "style:flow-with-text",
-    "style:font-charset",
-    "style:font-charset-asian",
-    "style:font-charset-complex",
-    "style:font-family-asian",
-    "style:font-family-complex",
-    "style:font-family-generic",
-    "style:font-family-generic-asian",
-    "style:font-family-generic-complex",
-    "style:font-independent-line-spacing",
-    "style:font-name",
-    "style:font-name-asian",
-    "style:font-name-complex",
-    "style:font-pitch",
-    "style:font-pitch-asian",
-    "style:font-pitch-complex",
-    "style:font-relief",
-    "style:font-size-asian",
-    "style:font-size-complex",
-    "style:font-size-rel",
-    "style:font-size-rel-asian",
-    "style:font-size-rel-complex",
-    "style:font-style-asian",
-    "style:font-style-complex",
-    "style:font-style-name",
-    "style:font-style-name-asian",
-    "style:font-style-name-complex",
-    "style:font-weight-asian",
-    "style:font-weight-complex",
-    "style:footnote-max-height",
-    "style:glyph-orientation-vertical",
-    "style:horizontal-pos",
-    "style:horizontal-rel",
-    "style:join-border",
-    "style:justify-single-word",
-    "style:language-asian",
-    "style:language-complex",
-    "style:layout-grid-base-height",
-    "style:layout-grid-base-width",
-    "style:layout-grid-color",
-    "style:layout-grid-display",
-    "style:layout-grid-lines",
-    "style:layout-grid-mode",
-    "style:layout-grid-print",
-    "style:layout-grid-ruby-below",
-    "style:layout-grid-ruby-height",
-    "style:layout-grid-snap-to",
-    "style:layout-grid-standard-mode",
-    "style:letter-kerning",
-    "style:line-break",
-    "style:line-height-at-least",
-    "style:line-spacing",
-    "style:may-break-between-rows",
-    "style:min-row-height",
-    "style:mirror",
-    "style:num-format",
-    "style:num-letter-sync",
-    "style:num-prefix",
-    "style:num-suffix",
-    "style:number-wrapped-paragraphs",
-    "style:overflow-behavior",
-    "style:page-number",
-    "style:paper-tray-name",
-    "style:print",
-    "style:print-content",
-    "style:print-orientation",
-    "style:print-page-order",
-    "style:protect",
-    "style:punctuation-wrap",
-    "style:register-true",
-    "style:register-truth-ref-style-name",
-    "style:rel-column-width",
-    "style:rel-height",
-    "style:rel-width",
-    "style:repeat",
-    "style:repeat-content",
-    "style:rfc-language-tag",
-    "style:rfc-language-tag-asian",
-    "style:rfc-language-tag-complex",
-    "style:rotation-align",
-    "style:rotation-angle",
-    "style:row-height",
-    "style:ruby-align",
-    "style:ruby-position",
-    "style:run-through",
-    "style:scale-to",
-    "style:scale-to-pages",
-    "style:script-asian",
-    "style:script-complex",
-    "style:script-type",
-    "style:shadow",
-    "style:shrink-to-fit",
-    "style:snap-to-layout-grid",
-    "style:tab-stop-distance",
-    "style:table-centering",
-    "style:text-align-source",
-    "style:text-autospace",
-    "style:text-blinking",
-    "style:text-combine",
-    "style:text-combine-end-char",
-    "style:text-combine-start-char",
-    "style:text-emphasize",
-    "style:text-line-through-color",
-    "style:text-line-through-mode",
-    "style:text-line-through-style",
-    "style:text-line-through-text",
-    "style:text-line-through-text-style",
-    "style:text-line-through-type",
-    "style:text-line-through-width",
-    "style:text-outline",
-    "style:text-overline-color",
-    "style:text-overline-mode",
-    "style:text-overline-style",
-    "style:text-overline-type",
-    "style:text-overline-width",
-    "style:text-position",
-    "style:text-rotation-angle",
-    "style:text-rotation-scale",
-    "style:text-scale",
-    "style:text-underline-color",
-    "style:text-underline-mode",
-    "style:text-underline-style",
-    "style:text-underline-type",
-    "style:text-underline-width",
-    "style:use-optimal-column-width",
-    "style:use-optimal-row-height",
-    "style:use-window-font-color",
-    "style:vertical-align",
-    "style:vertical-pos",
-    "style:vertical-rel",
-    "style:width",
-    "style:wrap",
-    "style:wrap-contour",
-    "style:wrap-contour-mode",
-    "style:wrap-dynamic-threshold",
-    "style:writing-mode",
-    "style:writing-mode-automatic",
-    "svg:fill-rule",
-    "svg:height",
-    "svg:stroke-color",
-    "svg:stroke-linecap",
-    "svg:stroke-opacity",
-    "svg:stroke-width",
-    "svg:width",
-    "svg:x",
-    "svg:y",
-    "table:align",
-    "table:border-model",
-    "table:display",
-    "text:anchor-page-number",
-    "text:anchor-type",
-    "text:animation",
-    "text:animation-delay",
-    "text:animation-direction",
-    "text:animation-repeat",
-    "text:animation-start-inside",
-    "text:animation-steps",
-    "text:animation-stop-inside",
-    "text:condition",
-    "text:display",
-    "text:dont-balance-text-columns",
-    "text:line-break",
-    "text:line-number",
-    "text:list-level-position-and-space-mode",
-    "text:min-label-distance",
-    "text:min-label-width",
-    "text:number-lines",
-    "text:space-before",
-}
-
-# from CSS3 color map
-CSS3_COLORMAP = {
-    "indigo": (75, 0, 130),
-    "gold": (255, 215, 0),
-    "firebrick": (178, 34, 34),
-    "indianred": (205, 92, 92),
-    "yellow": (255, 255, 0),
-    "darkolivegreen": (85, 107, 47),
-    "darkseagreen": (143, 188, 143),
-    "slategrey": (112, 128, 144),
-    "darkslategrey": (47, 79, 79),
-    "mediumvioletred": (199, 21, 133),
-    "mediumorchid": (186, 85, 211),
-    "chartreuse": (127, 255, 0),
-    "mediumslateblue": (123, 104, 238),
-    "black": (0, 0, 0),
-    "springgreen": (0, 255, 127),
-    "crimson": (220, 20, 60),
-    "lightsalmon": (255, 160, 122),
-    "brown": (165, 42, 42),
-    "turquoise": (64, 224, 208),
-    "olivedrab": (107, 142, 35),
-    "lightcyan": (224, 255, 255),
-    "cyan": (0, 255, 255),
-    "silver": (192, 192, 192),
-    "skyblue": (135, 206, 235),
-    "gray": (128, 128, 128),
-    "darkturquoise": (0, 206, 209),
-    "goldenrod": (218, 165, 32),
-    "darkgreen": (0, 100, 0),
-    "darkviolet": (148, 0, 211),
-    "darkgray": (169, 169, 169),
-    "lightpink": (255, 182, 193),
-    "teal": (0, 128, 128),
-    "darkmagenta": (139, 0, 139),
-    "lightgoldenrodyellow": (250, 250, 210),
-    "lavender": (230, 230, 250),
-    "yellowgreen": (154, 205, 50),
-    "thistle": (216, 191, 216),
-    "violet": (238, 130, 238),
-    "navy": (0, 0, 128),
-    "dimgrey": (105, 105, 105),
-    "orchid": (218, 112, 214),
-    "blue": (0, 0, 255),
-    "ghostwhite": (248, 248, 255),
-    "honeydew": (240, 255, 240),
-    "cornflowerblue": (100, 149, 237),
-    "darkblue": (0, 0, 139),
-    "darkkhaki": (189, 183, 107),
-    "mediumpurple": (147, 112, 216),
-    "cornsilk": (255, 248, 220),
-    "red": (255, 0, 0),
-    "bisque": (255, 228, 196),
-    "slategray": (112, 128, 144),
-    "darkcyan": (0, 139, 139),
-    "khaki": (240, 230, 140),
-    "wheat": (245, 222, 179),
-    "deepskyblue": (0, 191, 255),
-    "darkred": (139, 0, 0),
-    "steelblue": (70, 130, 180),
-    "aliceblue": (240, 248, 255),
-    "lightslategrey": (119, 136, 153),
-    "gainsboro": (220, 220, 220),
-    "mediumturquoise": (72, 209, 204),
-    "floralwhite": (255, 250, 240),
-    "plum": (221, 160, 221),
-    "purple": (128, 0, 128),
-    "lightgrey": (211, 211, 211),
-    "burlywood": (222, 184, 135),
-    "darksalmon": (233, 150, 122),
-    "beige": (245, 245, 220),
-    "azure": (240, 255, 255),
-    "lightsteelblue": (176, 196, 222),
-    "oldlace": (253, 245, 230),
-    "greenyellow": (173, 255, 47),
-    "royalblue": (65, 105, 225),
-    "lightseagreen": (32, 178, 170),
-    "sienna": (160, 82, 45),
-    "lightcoral": (240, 128, 128),
-    "orangered": (255, 69, 0),
-    "navajowhite": (255, 222, 173),
-    "lime": (0, 255, 0),
-    "palegreen": (152, 251, 152),
-    "mistyrose": (255, 228, 225),
-    "seashell": (255, 245, 238),
-    "mediumspringgreen": (0, 250, 154),
-    "fuchsia": (255, 0, 255),
-    "papayawhip": (255, 239, 213),
-    "blanchedalmond": (255, 235, 205),
-    "peru": (205, 133, 63),
-    "aquamarine": (127, 255, 212),
-    "white": (255, 255, 255),
-    "darkslategray": (47, 79, 79),
-    "lightgray": (211, 211, 211),
-    "ivory": (255, 255, 240),
-    "dodgerblue": (30, 144, 255),
-    "lawngreen": (124, 252, 0),
-    "chocolate": (210, 105, 30),
-    "orange": (255, 165, 0),
-    "forestgreen": (34, 139, 34),
-    "darkgrey": (169, 169, 169),
-    "olive": (128, 128, 0),
-    "mintcream": (245, 255, 250),
-    "antiquewhite": (250, 235, 215),
-    "darkorange": (255, 140, 0),
-    "cadetblue": (95, 158, 160),
-    "moccasin": (255, 228, 181),
-    "limegreen": (50, 205, 50),
-    "saddlebrown": (139, 69, 19),
-    "grey": (128, 128, 128),
-    "darkslateblue": (72, 61, 139),
-    "lightskyblue": (135, 206, 250),
-    "deeppink": (255, 20, 147),
-    "coral": (255, 127, 80),
-    "aqua": (0, 255, 255),
-    "darkgoldenrod": (184, 134, 11),
-    "maroon": (128, 0, 0),
-    "sandybrown": (244, 164, 96),
-    "tan": (210, 180, 140),
-    "magenta": (255, 0, 255),
-    "rosybrown": (188, 143, 143),
-    "pink": (255, 192, 203),
-    "lightblue": (173, 216, 230),
-    "palevioletred": (216, 112, 147),
-    "mediumseagreen": (60, 179, 113),
-    "slateblue": (106, 90, 205),
-    "dimgray": (105, 105, 105),
-    "powderblue": (176, 224, 230),
-    "seagreen": (46, 139, 87),
-    "snow": (255, 250, 250),
-    "mediumblue": (0, 0, 205),
-    "midnightblue": (25, 25, 112),
-    "paleturquoise": (175, 238, 238),
-    "palegoldenrod": (238, 232, 170),
-    "whitesmoke": (245, 245, 245),
-    "darkorchid": (153, 50, 204),
-    "salmon": (250, 128, 114),
-    "lightslategray": (119, 136, 153),
-    "lemonchiffon": (255, 250, 205),
-    "lightgreen": (144, 238, 144),
-    "tomato": (255, 99, 71),
-    "hotpink": (255, 105, 180),
-    "lightyellow": (255, 255, 224),
-    "lavenderblush": (255, 240, 245),
-    "linen": (250, 240, 230),
-    "mediumaquamarine": (102, 205, 170),
-    "green": (0, 128, 0),
-    "blueviolet": (138, 43, 226),
-    "peachpuff": (255, 218, 185),
-}
-
-
-
-
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/container.html b/doc/container.html deleted file mode 100644 index b47257d..0000000 --- a/doc/container.html +++ /dev/null @@ -1,1135 +0,0 @@ - - - - - - -odfdo.container API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.container

-
-
-

Container class, ODF file management.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-"""Container class, ODF file management.
-"""
-from __future__ import annotations
-
-import contextlib
-import io
-import os
-import shutil
-import time
-from copy import deepcopy
-from pathlib import Path, PurePath
-from zipfile import ZIP_DEFLATED, ZIP_STORED, BadZipfile, ZipFile, is_zipfile
-
-from .const import (
-    ODF_CONTENT,
-    ODF_EXTENSIONS,
-    ODF_MANIFEST,
-    ODF_META,
-    ODF_MIMETYPES,
-    ODF_SETTINGS,
-    ODF_STYLES,
-)
-from .scriptutils import printwarn
-from .utils import bytes_to_str, str_to_bytes
-
-
-def normalize_path(path: str) -> str:
-    if path.endswith("/"):  # folder
-        return PurePath(path[:-1]).as_posix() + "/"
-    return PurePath(path).as_posix()
-
-
-class Container:
-    """Representation of the ODF file."""
-
-    def __init__(self, path: Path | str | io.BytesIO | None = None) -> None:
-        self.__parts: dict[str, bytes | None] = {}
-        self.__parts_ts: dict[str, int] = {}
-        self.__path_like: Path | str | io.BytesIO | None = None
-        self.__packaging: str = "zip"
-        self.path: Path | None = None  # or Path
-        if path:
-            self.open(path)
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} type={self.mimetype} path={self.path}>"
-
-    def open(self, path_or_file: Path | str | io.BytesIO) -> None:
-        """Load the content of an ODF file."""
-        self.__path_like = path_or_file
-        if isinstance(path_or_file, (str, Path)):
-            self.path = Path(path_or_file)
-            if not self.path.exists():
-                raise FileNotFoundError(str(self.path))
-        if (self.path or isinstance(path_or_file, io.BytesIO)) and is_zipfile(
-            path_or_file
-        ):
-            self.__packaging = "zip"
-            return self._read_zip()
-        if self.path:
-            is_folder = False
-            with contextlib.suppress(OSError):
-                is_folder = self.path.is_dir()
-            if is_folder:
-                self.__packaging = "folder"
-                return self._read_folder()
-        raise TypeError(f"Document format not managed by odfdo: {type(path_or_file)}.")
-
-    def _read_zip(self) -> None:
-        if isinstance(self.__path_like, io.BytesIO):
-            self.__path_like.seek(0)
-        with ZipFile(self.__path_like) as zf:  # type: ignore
-            mimetype = bytes_to_str(zf.read("mimetype"))
-            if mimetype not in ODF_MIMETYPES:
-                raise ValueError(f"Document of unknown type {mimetype}")
-            self.__parts["mimetype"] = str_to_bytes(mimetype)
-        if self.path is None:
-            if isinstance(self.__path_like, io.BytesIO):
-                self.__path_like.seek(0)
-            # read the full file at once and forget file
-            with ZipFile(self.__path_like) as zf:  # type: ignore
-                for name in zf.namelist():
-                    upath = normalize_path(name)
-                    self.__parts[upath] = zf.read(name)
-            self.__path_like = None
-
-    def _read_folder(self) -> None:
-        try:
-            mimetype, timestamp = self._get_folder_part("mimetype")
-        except OSError:
-            printwarn("Corrupted or not an OpenDocument folder (missing mimetype)")
-            mimetype = b""
-            timestamp = int(time.time())
-        if bytes_to_str(mimetype) not in ODF_MIMETYPES:
-            message = f"Document of unknown type {mimetype!r}, try with ODF Text."
-            printwarn(message)
-            self.__parts["mimetype"] = str_to_bytes(ODF_EXTENSIONS["odt"])
-            self.__parts_ts["mimetype"] = timestamp
-
-    def _parse_folder(self, folder: str) -> list[str]:
-        parts = []
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        root = self.path / folder
-        for path in root.iterdir():
-            if path.name.startswith("."):  # no hidden files
-                continue
-            relative_path = path.relative_to(self.path)
-            if path.is_file():
-                parts.append(relative_path.as_posix())
-            if path.is_dir():
-                sub_parts = self._parse_folder(str(relative_path))
-                if sub_parts:
-                    parts.extend(sub_parts)
-                else:
-                    # store leaf directories
-                    parts.append(relative_path.as_posix() + "/")
-        return parts
-
-    def _get_folder_parts(self) -> list[str]:
-        """Get the list of members in the ODF folder."""
-        return self._parse_folder("")
-
-    def _get_folder_part(self, name: str) -> tuple[bytes, int]:
-        """Get bytes of a part from the ODF folder, with timestamp."""
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        path = self.path / name
-        timestamp = int(path.stat().st_mtime)
-        if path.is_dir():
-            return (b"", timestamp)
-        return (path.read_bytes(), timestamp)
-
-    def _get_folder_part_timestamp(self, name: str) -> int:
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        path = self.path / name
-        try:
-            timestamp = int(path.stat().st_mtime)
-        except OSError:
-            timestamp = -1
-        return timestamp
-
-    def _get_zip_part(self, name: str) -> bytes | None:
-        """Get bytes of a part from the Zip ODF file. No cache."""
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        try:
-            with ZipFile(self.path) as zf:
-                upath = normalize_path(name)
-                self.__parts[upath] = zf.read(name)
-                return self.__parts[upath]
-        except BadZipfile:
-            return None
-
-    def _get_all_zip_part(self) -> None:
-        """Read all parts. No cache."""
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        try:
-            with ZipFile(self.path) as zf:
-                for name in zf.namelist():
-                    upath = normalize_path(name)
-                    self.__parts[upath] = zf.read(name)
-        except BadZipfile:
-            pass
-
-    def _save_zip(self, target: str | Path | io.BytesIO) -> None:
-        """Save a Zip ODF from the available parts."""
-        parts = self.__parts
-        with ZipFile(target, "w", compression=ZIP_DEFLATED) as filezip:
-            # Parts to save, except manifest at the end
-            part_names = list(parts.keys())
-            try:
-                part_names.remove(ODF_MANIFEST)
-            except ValueError:
-                printwarn(f"Missing '{ODF_MANIFEST}'")
-            # "Pretty-save" parts in some order
-            # mimetype requires to be first and uncompressed
-            mimetype = parts.get("mimetype")
-            if mimetype is None:
-                raise ValueError("Mimetype is not defined")
-            try:
-                filezip.writestr("mimetype", mimetype, ZIP_STORED)
-                part_names.remove("mimetype")
-            except (ValueError, KeyError):
-                printwarn("Missing 'mimetype'")
-            # XML parts
-            for path in ODF_CONTENT, ODF_META, ODF_SETTINGS, ODF_STYLES:
-                if path not in parts:
-                    printwarn(f"Missing '{path}'")
-                    continue
-                part = parts[path]
-                if part is None:
-                    continue
-                filezip.writestr(path, part)
-                part_names.remove(path)
-            # Everything else
-            for path in part_names:
-                data = parts[path]
-                if data is None:
-                    # Deleted
-                    continue
-                filezip.writestr(path, data)
-            # Manifest
-            with contextlib.suppress(KeyError):
-                part = parts[ODF_MANIFEST]
-                if part is not None:
-                    filezip.writestr(ODF_MANIFEST, part)
-
-    def _save_folder(self, folder: Path | str) -> None:
-        """Save a folder ODF from the available parts."""
-
-        def dump(part_path: str, content: bytes) -> None:
-            if part_path.endswith("/"):  # folder
-                is_folder = True
-                pure_path = PurePath(folder, part_path[:-1])
-            else:
-                is_folder = False
-                pure_path = PurePath(folder, part_path)
-            path = Path(pure_path)
-            if is_folder:
-                path.mkdir(parents=True, exist_ok=True)
-            else:
-                path.parent.mkdir(parents=True, exist_ok=True)
-                path.write_bytes(content)
-                path.chmod(0o666)
-
-        for part_path, data in self.__parts.items():
-            if data is None:
-                # Deleted
-                continue
-            dump(part_path, data)
-
-    # Public API
-
-    def get_parts(self) -> list[str]:
-        """Get the list of members."""
-        if not self.path:
-            # maybe a file like zip archive
-            return list(self.__parts.keys())
-        if self.__packaging == "zip":
-            parts = []
-            with ZipFile(self.path) as zf:
-                for name in zf.namelist():
-                    upath = normalize_path(name)
-                    parts.append(upath)
-            return parts
-        elif self.__packaging == "folder":
-            return self._get_folder_parts()
-        else:
-            raise ValueError("Unable to provide parts of the document")
-
-    def get_part(self, path: str) -> str | bytes | None:
-        """Get the bytes of a part of the ODF."""
-        path = str(path)
-        if path in self.__parts:
-            part = self.__parts[path]
-            if part is None:
-                raise ValueError(f'Part "{path}" is deleted')
-            if self.__packaging == "folder":
-                cache_ts = self.__parts_ts.get(path, -1)
-                current_ts = self._get_folder_part_timestamp(path)
-                if current_ts != cache_ts:
-                    part, timestamp = self._get_folder_part(path)
-                    self.__parts[path] = part
-                    self.__parts_ts[path] = timestamp
-            return part
-        if self.__packaging == "zip":
-            return self._get_zip_part(path)
-        if self.__packaging == "folder":
-            part, timestamp = self._get_folder_part(path)
-            self.__parts[path] = part
-            self.__parts_ts[path] = timestamp
-            return part
-        return None
-
-    @property
-    def mimetype(self) -> str:
-        """Return str value of mimetype of the document."""
-        with contextlib.suppress(Exception):
-            b_mimetype = self.get_part("mimetype")
-            if isinstance(b_mimetype, bytes):
-                return bytes_to_str(b_mimetype)
-        return ""
-
-    @mimetype.setter
-    def mimetype(self, mimetype: str | bytes) -> None:
-        """Set mimetype value of the document."""
-        if isinstance(mimetype, str):
-            self.__parts["mimetype"] = str_to_bytes(mimetype)
-        elif isinstance(mimetype, bytes):
-            self.__parts["mimetype"] = mimetype
-        else:
-            raise TypeError(f'Wrong mimetype "{mimetype!r}"')
-
-    def set_part(self, path: str, data: bytes) -> None:
-        """Replace or add a new part."""
-        self.__parts[path] = data
-
-    def del_part(self, path: str) -> None:
-        """Mark a part for deletion."""
-        self.__parts[path] = None
-
-    @property
-    def clone(self) -> Container:
-        """Make a copy of this container with no path."""
-        if self.path and self.__packaging == "zip":
-            self._get_all_zip_part()
-        clone = deepcopy(self)
-        clone.path = None
-        return clone
-
-    @staticmethod
-    def _do_backup(target: str | Path) -> None:
-        path = Path(target)
-        if not path.exists():
-            return
-        back_file = Path(path.stem + ".backup" + path.suffix)
-        if back_file.is_dir():
-            try:
-                shutil.rmtree(back_file)
-            except OSError as e:
-                printwarn(str(e))
-        try:
-            shutil.move(target, back_file)
-        except OSError as e:
-            printwarn(str(e))
-
-    def _save_packaging(self, packaging: str | None) -> str:
-        if not packaging:
-            packaging = self.__packaging if self.__packaging else "zip"
-        packaging = packaging.strip().lower()
-        # if packaging not in ('zip', 'flat', 'folder'):
-        if packaging not in ("zip", "folder"):
-            raise ValueError(f'Packaging of type "{packaging}" is not supported')
-        return packaging
-
-    def _save_target(self, target: str | Path | io.BytesIO | None) -> str | io.BytesIO:
-        if target is None:
-            target = self.path
-        if isinstance(target, Path):
-            target = str(target)
-        if isinstance(target, str):
-            while target.endswith(os.sep):
-                target = target[:-1]
-            while target.endswith(".folder"):
-                target = target.split(".folder", 1)[0]
-        return target  # type: ignore
-
-    def _save_as_zip(self, target: str | Path | io.BytesIO, backup: bool) -> None:
-        if isinstance(target, (str, Path)) and backup:
-            self._do_backup(target)
-        self._save_zip(target)
-
-    def _save_as_folder(self, target: str | Path, backup: bool) -> None:
-        if not isinstance(target, (str, Path)):
-            raise TypeError(
-                f"Saving in folder format requires a folder name, not '{target!r}'"
-            )
-        if not str(target).endswith(".folder"):
-            target = str(target) + ".folder"
-        if backup:
-            self._do_backup(target)
-        else:
-            path = Path(target)
-            if path.exists():
-                try:
-                    shutil.rmtree(path)
-                except OSError as e:
-                    printwarn(str(e))
-        self._save_folder(target)
-
-    def save(
-        self,
-        target: str | Path | io.BytesIO | None,
-        packaging: str | None = None,
-        backup: bool = False,
-    ) -> None:
-        """Save the container to the given target, a path or a file-like
-        object.
-
-        Package the output document in the same format than current document,
-        unless "packaging" is different.
-
-        Arguments:
-
-            target -- str or file-like or Path
-
-            packaging -- 'zip', or for debugging purpose 'folder'
-
-            backup -- boolean
-        """
-        parts = self.__parts
-        packaging = self._save_packaging(packaging)
-        # Load parts else they will be considered deleted
-        for path in self.get_parts():
-            if path not in parts:
-                self.get_part(path)
-        target = self._save_target(target)
-        if packaging == "folder":
-            if isinstance(target, io.BytesIO):
-                raise TypeError(
-                    "Impossible to save on io.BytesIO with 'folder' packaging"
-                )
-            self._save_as_folder(target, backup)
-        else:
-            # default:
-            self._save_as_zip(target, backup)
-
-
-
-
-
-
-
-

Functions

-
-
-def normalize_path(path: str) ‑> str -
-
-
-
- -Expand source code - -
def normalize_path(path: str) -> str:
-    if path.endswith("/"):  # folder
-        return PurePath(path[:-1]).as_posix() + "/"
-    return PurePath(path).as_posix()
-
-
-
-
-
-

Classes

-
-
-class Container -(path: Path | str | io.BytesIO | None = None) -
-
-

Representation of the ODF file.

-
- -Expand source code - -
class Container:
-    """Representation of the ODF file."""
-
-    def __init__(self, path: Path | str | io.BytesIO | None = None) -> None:
-        self.__parts: dict[str, bytes | None] = {}
-        self.__parts_ts: dict[str, int] = {}
-        self.__path_like: Path | str | io.BytesIO | None = None
-        self.__packaging: str = "zip"
-        self.path: Path | None = None  # or Path
-        if path:
-            self.open(path)
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} type={self.mimetype} path={self.path}>"
-
-    def open(self, path_or_file: Path | str | io.BytesIO) -> None:
-        """Load the content of an ODF file."""
-        self.__path_like = path_or_file
-        if isinstance(path_or_file, (str, Path)):
-            self.path = Path(path_or_file)
-            if not self.path.exists():
-                raise FileNotFoundError(str(self.path))
-        if (self.path or isinstance(path_or_file, io.BytesIO)) and is_zipfile(
-            path_or_file
-        ):
-            self.__packaging = "zip"
-            return self._read_zip()
-        if self.path:
-            is_folder = False
-            with contextlib.suppress(OSError):
-                is_folder = self.path.is_dir()
-            if is_folder:
-                self.__packaging = "folder"
-                return self._read_folder()
-        raise TypeError(f"Document format not managed by odfdo: {type(path_or_file)}.")
-
-    def _read_zip(self) -> None:
-        if isinstance(self.__path_like, io.BytesIO):
-            self.__path_like.seek(0)
-        with ZipFile(self.__path_like) as zf:  # type: ignore
-            mimetype = bytes_to_str(zf.read("mimetype"))
-            if mimetype not in ODF_MIMETYPES:
-                raise ValueError(f"Document of unknown type {mimetype}")
-            self.__parts["mimetype"] = str_to_bytes(mimetype)
-        if self.path is None:
-            if isinstance(self.__path_like, io.BytesIO):
-                self.__path_like.seek(0)
-            # read the full file at once and forget file
-            with ZipFile(self.__path_like) as zf:  # type: ignore
-                for name in zf.namelist():
-                    upath = normalize_path(name)
-                    self.__parts[upath] = zf.read(name)
-            self.__path_like = None
-
-    def _read_folder(self) -> None:
-        try:
-            mimetype, timestamp = self._get_folder_part("mimetype")
-        except OSError:
-            printwarn("Corrupted or not an OpenDocument folder (missing mimetype)")
-            mimetype = b""
-            timestamp = int(time.time())
-        if bytes_to_str(mimetype) not in ODF_MIMETYPES:
-            message = f"Document of unknown type {mimetype!r}, try with ODF Text."
-            printwarn(message)
-            self.__parts["mimetype"] = str_to_bytes(ODF_EXTENSIONS["odt"])
-            self.__parts_ts["mimetype"] = timestamp
-
-    def _parse_folder(self, folder: str) -> list[str]:
-        parts = []
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        root = self.path / folder
-        for path in root.iterdir():
-            if path.name.startswith("."):  # no hidden files
-                continue
-            relative_path = path.relative_to(self.path)
-            if path.is_file():
-                parts.append(relative_path.as_posix())
-            if path.is_dir():
-                sub_parts = self._parse_folder(str(relative_path))
-                if sub_parts:
-                    parts.extend(sub_parts)
-                else:
-                    # store leaf directories
-                    parts.append(relative_path.as_posix() + "/")
-        return parts
-
-    def _get_folder_parts(self) -> list[str]:
-        """Get the list of members in the ODF folder."""
-        return self._parse_folder("")
-
-    def _get_folder_part(self, name: str) -> tuple[bytes, int]:
-        """Get bytes of a part from the ODF folder, with timestamp."""
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        path = self.path / name
-        timestamp = int(path.stat().st_mtime)
-        if path.is_dir():
-            return (b"", timestamp)
-        return (path.read_bytes(), timestamp)
-
-    def _get_folder_part_timestamp(self, name: str) -> int:
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        path = self.path / name
-        try:
-            timestamp = int(path.stat().st_mtime)
-        except OSError:
-            timestamp = -1
-        return timestamp
-
-    def _get_zip_part(self, name: str) -> bytes | None:
-        """Get bytes of a part from the Zip ODF file. No cache."""
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        try:
-            with ZipFile(self.path) as zf:
-                upath = normalize_path(name)
-                self.__parts[upath] = zf.read(name)
-                return self.__parts[upath]
-        except BadZipfile:
-            return None
-
-    def _get_all_zip_part(self) -> None:
-        """Read all parts. No cache."""
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        try:
-            with ZipFile(self.path) as zf:
-                for name in zf.namelist():
-                    upath = normalize_path(name)
-                    self.__parts[upath] = zf.read(name)
-        except BadZipfile:
-            pass
-
-    def _save_zip(self, target: str | Path | io.BytesIO) -> None:
-        """Save a Zip ODF from the available parts."""
-        parts = self.__parts
-        with ZipFile(target, "w", compression=ZIP_DEFLATED) as filezip:
-            # Parts to save, except manifest at the end
-            part_names = list(parts.keys())
-            try:
-                part_names.remove(ODF_MANIFEST)
-            except ValueError:
-                printwarn(f"Missing '{ODF_MANIFEST}'")
-            # "Pretty-save" parts in some order
-            # mimetype requires to be first and uncompressed
-            mimetype = parts.get("mimetype")
-            if mimetype is None:
-                raise ValueError("Mimetype is not defined")
-            try:
-                filezip.writestr("mimetype", mimetype, ZIP_STORED)
-                part_names.remove("mimetype")
-            except (ValueError, KeyError):
-                printwarn("Missing 'mimetype'")
-            # XML parts
-            for path in ODF_CONTENT, ODF_META, ODF_SETTINGS, ODF_STYLES:
-                if path not in parts:
-                    printwarn(f"Missing '{path}'")
-                    continue
-                part = parts[path]
-                if part is None:
-                    continue
-                filezip.writestr(path, part)
-                part_names.remove(path)
-            # Everything else
-            for path in part_names:
-                data = parts[path]
-                if data is None:
-                    # Deleted
-                    continue
-                filezip.writestr(path, data)
-            # Manifest
-            with contextlib.suppress(KeyError):
-                part = parts[ODF_MANIFEST]
-                if part is not None:
-                    filezip.writestr(ODF_MANIFEST, part)
-
-    def _save_folder(self, folder: Path | str) -> None:
-        """Save a folder ODF from the available parts."""
-
-        def dump(part_path: str, content: bytes) -> None:
-            if part_path.endswith("/"):  # folder
-                is_folder = True
-                pure_path = PurePath(folder, part_path[:-1])
-            else:
-                is_folder = False
-                pure_path = PurePath(folder, part_path)
-            path = Path(pure_path)
-            if is_folder:
-                path.mkdir(parents=True, exist_ok=True)
-            else:
-                path.parent.mkdir(parents=True, exist_ok=True)
-                path.write_bytes(content)
-                path.chmod(0o666)
-
-        for part_path, data in self.__parts.items():
-            if data is None:
-                # Deleted
-                continue
-            dump(part_path, data)
-
-    # Public API
-
-    def get_parts(self) -> list[str]:
-        """Get the list of members."""
-        if not self.path:
-            # maybe a file like zip archive
-            return list(self.__parts.keys())
-        if self.__packaging == "zip":
-            parts = []
-            with ZipFile(self.path) as zf:
-                for name in zf.namelist():
-                    upath = normalize_path(name)
-                    parts.append(upath)
-            return parts
-        elif self.__packaging == "folder":
-            return self._get_folder_parts()
-        else:
-            raise ValueError("Unable to provide parts of the document")
-
-    def get_part(self, path: str) -> str | bytes | None:
-        """Get the bytes of a part of the ODF."""
-        path = str(path)
-        if path in self.__parts:
-            part = self.__parts[path]
-            if part is None:
-                raise ValueError(f'Part "{path}" is deleted')
-            if self.__packaging == "folder":
-                cache_ts = self.__parts_ts.get(path, -1)
-                current_ts = self._get_folder_part_timestamp(path)
-                if current_ts != cache_ts:
-                    part, timestamp = self._get_folder_part(path)
-                    self.__parts[path] = part
-                    self.__parts_ts[path] = timestamp
-            return part
-        if self.__packaging == "zip":
-            return self._get_zip_part(path)
-        if self.__packaging == "folder":
-            part, timestamp = self._get_folder_part(path)
-            self.__parts[path] = part
-            self.__parts_ts[path] = timestamp
-            return part
-        return None
-
-    @property
-    def mimetype(self) -> str:
-        """Return str value of mimetype of the document."""
-        with contextlib.suppress(Exception):
-            b_mimetype = self.get_part("mimetype")
-            if isinstance(b_mimetype, bytes):
-                return bytes_to_str(b_mimetype)
-        return ""
-
-    @mimetype.setter
-    def mimetype(self, mimetype: str | bytes) -> None:
-        """Set mimetype value of the document."""
-        if isinstance(mimetype, str):
-            self.__parts["mimetype"] = str_to_bytes(mimetype)
-        elif isinstance(mimetype, bytes):
-            self.__parts["mimetype"] = mimetype
-        else:
-            raise TypeError(f'Wrong mimetype "{mimetype!r}"')
-
-    def set_part(self, path: str, data: bytes) -> None:
-        """Replace or add a new part."""
-        self.__parts[path] = data
-
-    def del_part(self, path: str) -> None:
-        """Mark a part for deletion."""
-        self.__parts[path] = None
-
-    @property
-    def clone(self) -> Container:
-        """Make a copy of this container with no path."""
-        if self.path and self.__packaging == "zip":
-            self._get_all_zip_part()
-        clone = deepcopy(self)
-        clone.path = None
-        return clone
-
-    @staticmethod
-    def _do_backup(target: str | Path) -> None:
-        path = Path(target)
-        if not path.exists():
-            return
-        back_file = Path(path.stem + ".backup" + path.suffix)
-        if back_file.is_dir():
-            try:
-                shutil.rmtree(back_file)
-            except OSError as e:
-                printwarn(str(e))
-        try:
-            shutil.move(target, back_file)
-        except OSError as e:
-            printwarn(str(e))
-
-    def _save_packaging(self, packaging: str | None) -> str:
-        if not packaging:
-            packaging = self.__packaging if self.__packaging else "zip"
-        packaging = packaging.strip().lower()
-        # if packaging not in ('zip', 'flat', 'folder'):
-        if packaging not in ("zip", "folder"):
-            raise ValueError(f'Packaging of type "{packaging}" is not supported')
-        return packaging
-
-    def _save_target(self, target: str | Path | io.BytesIO | None) -> str | io.BytesIO:
-        if target is None:
-            target = self.path
-        if isinstance(target, Path):
-            target = str(target)
-        if isinstance(target, str):
-            while target.endswith(os.sep):
-                target = target[:-1]
-            while target.endswith(".folder"):
-                target = target.split(".folder", 1)[0]
-        return target  # type: ignore
-
-    def _save_as_zip(self, target: str | Path | io.BytesIO, backup: bool) -> None:
-        if isinstance(target, (str, Path)) and backup:
-            self._do_backup(target)
-        self._save_zip(target)
-
-    def _save_as_folder(self, target: str | Path, backup: bool) -> None:
-        if not isinstance(target, (str, Path)):
-            raise TypeError(
-                f"Saving in folder format requires a folder name, not '{target!r}'"
-            )
-        if not str(target).endswith(".folder"):
-            target = str(target) + ".folder"
-        if backup:
-            self._do_backup(target)
-        else:
-            path = Path(target)
-            if path.exists():
-                try:
-                    shutil.rmtree(path)
-                except OSError as e:
-                    printwarn(str(e))
-        self._save_folder(target)
-
-    def save(
-        self,
-        target: str | Path | io.BytesIO | None,
-        packaging: str | None = None,
-        backup: bool = False,
-    ) -> None:
-        """Save the container to the given target, a path or a file-like
-        object.
-
-        Package the output document in the same format than current document,
-        unless "packaging" is different.
-
-        Arguments:
-
-            target -- str or file-like or Path
-
-            packaging -- 'zip', or for debugging purpose 'folder'
-
-            backup -- boolean
-        """
-        parts = self.__parts
-        packaging = self._save_packaging(packaging)
-        # Load parts else they will be considered deleted
-        for path in self.get_parts():
-            if path not in parts:
-                self.get_part(path)
-        target = self._save_target(target)
-        if packaging == "folder":
-            if isinstance(target, io.BytesIO):
-                raise TypeError(
-                    "Impossible to save on io.BytesIO with 'folder' packaging"
-                )
-            self._save_as_folder(target, backup)
-        else:
-            # default:
-            self._save_as_zip(target, backup)
-
-

Instance variables

-
-
var cloneContainer
-
-

Make a copy of this container with no path.

-
- -Expand source code - -
@property
-def clone(self) -> Container:
-    """Make a copy of this container with no path."""
-    if self.path and self.__packaging == "zip":
-        self._get_all_zip_part()
-    clone = deepcopy(self)
-    clone.path = None
-    return clone
-
-
-
var mimetype : str
-
-

Return str value of mimetype of the document.

-
- -Expand source code - -
@property
-def mimetype(self) -> str:
-    """Return str value of mimetype of the document."""
-    with contextlib.suppress(Exception):
-        b_mimetype = self.get_part("mimetype")
-        if isinstance(b_mimetype, bytes):
-            return bytes_to_str(b_mimetype)
-    return ""
-
-
-
-

Methods

-
-
-def del_part(self, path: str) ‑> None -
-
-

Mark a part for deletion.

-
- -Expand source code - -
def del_part(self, path: str) -> None:
-    """Mark a part for deletion."""
-    self.__parts[path] = None
-
-
-
-def get_part(self, path: str) ‑> str | bytes | None -
-
-

Get the bytes of a part of the ODF.

-
- -Expand source code - -
def get_part(self, path: str) -> str | bytes | None:
-    """Get the bytes of a part of the ODF."""
-    path = str(path)
-    if path in self.__parts:
-        part = self.__parts[path]
-        if part is None:
-            raise ValueError(f'Part "{path}" is deleted')
-        if self.__packaging == "folder":
-            cache_ts = self.__parts_ts.get(path, -1)
-            current_ts = self._get_folder_part_timestamp(path)
-            if current_ts != cache_ts:
-                part, timestamp = self._get_folder_part(path)
-                self.__parts[path] = part
-                self.__parts_ts[path] = timestamp
-        return part
-    if self.__packaging == "zip":
-        return self._get_zip_part(path)
-    if self.__packaging == "folder":
-        part, timestamp = self._get_folder_part(path)
-        self.__parts[path] = part
-        self.__parts_ts[path] = timestamp
-        return part
-    return None
-
-
-
-def get_parts(self) ‑> list[str] -
-
-

Get the list of members.

-
- -Expand source code - -
def get_parts(self) -> list[str]:
-    """Get the list of members."""
-    if not self.path:
-        # maybe a file like zip archive
-        return list(self.__parts.keys())
-    if self.__packaging == "zip":
-        parts = []
-        with ZipFile(self.path) as zf:
-            for name in zf.namelist():
-                upath = normalize_path(name)
-                parts.append(upath)
-        return parts
-    elif self.__packaging == "folder":
-        return self._get_folder_parts()
-    else:
-        raise ValueError("Unable to provide parts of the document")
-
-
-
-def open(self, path_or_file: Path | str | io.BytesIO) ‑> None -
-
-

Load the content of an ODF file.

-
- -Expand source code - -
def open(self, path_or_file: Path | str | io.BytesIO) -> None:
-    """Load the content of an ODF file."""
-    self.__path_like = path_or_file
-    if isinstance(path_or_file, (str, Path)):
-        self.path = Path(path_or_file)
-        if not self.path.exists():
-            raise FileNotFoundError(str(self.path))
-    if (self.path or isinstance(path_or_file, io.BytesIO)) and is_zipfile(
-        path_or_file
-    ):
-        self.__packaging = "zip"
-        return self._read_zip()
-    if self.path:
-        is_folder = False
-        with contextlib.suppress(OSError):
-            is_folder = self.path.is_dir()
-        if is_folder:
-            self.__packaging = "folder"
-            return self._read_folder()
-    raise TypeError(f"Document format not managed by odfdo: {type(path_or_file)}.")
-
-
-
-def save(self, target: str | Path | io.BytesIO | None, packaging: str | None = None, backup: bool = False) ‑> None -
-
-

Save the container to the given target, a path or a file-like -object.

-

Package the output document in the same format than current document, -unless "packaging" is different.

-

Arguments

-

target – str or file-like or Path

-

packaging – 'zip', or for debugging purpose 'folder'

-

backup – boolean

-
- -Expand source code - -
def save(
-    self,
-    target: str | Path | io.BytesIO | None,
-    packaging: str | None = None,
-    backup: bool = False,
-) -> None:
-    """Save the container to the given target, a path or a file-like
-    object.
-
-    Package the output document in the same format than current document,
-    unless "packaging" is different.
-
-    Arguments:
-
-        target -- str or file-like or Path
-
-        packaging -- 'zip', or for debugging purpose 'folder'
-
-        backup -- boolean
-    """
-    parts = self.__parts
-    packaging = self._save_packaging(packaging)
-    # Load parts else they will be considered deleted
-    for path in self.get_parts():
-        if path not in parts:
-            self.get_part(path)
-    target = self._save_target(target)
-    if packaging == "folder":
-        if isinstance(target, io.BytesIO):
-            raise TypeError(
-                "Impossible to save on io.BytesIO with 'folder' packaging"
-            )
-        self._save_as_folder(target, backup)
-    else:
-        # default:
-        self._save_as_zip(target, backup)
-
-
-
-def set_part(self, path: str, data: bytes) ‑> None -
-
-

Replace or add a new part.

-
- -Expand source code - -
def set_part(self, path: str, data: bytes) -> None:
-    """Replace or add a new part."""
-    self.__parts[path] = data
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/content.html b/doc/content.html deleted file mode 100644 index d53ec02..0000000 --- a/doc/content.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - -odfdo.content API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.content

-
-
-

Content class for content.xml part.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-"""Content class for content.xml part.
-"""
-from __future__ import annotations
-
-from odfdo.element import Element
-
-from .style import Style
-from .xmlpart import XmlPart
-
-
-class Content(XmlPart):
-    @property
-    def body(self) -> Element:
-        body = self.root.document_body
-        if not isinstance(body, Element):
-            raise ValueError("No body found in document")  # noqa:TRY004
-        return body
-
-    # The following two seem useless but they match styles API
-
-    def _get_style_contexts(self, family: str | None) -> tuple:
-        if family == "font-face":
-            return (self.get_element("//office:font-face-decls"),)
-        return (
-            self.get_element("//office:font-face-decls"),
-            self.get_element("//office:automatic-styles"),
-        )
-
-    def __str__(self) -> str:
-        return str(self.body)
-
-    # Public API
-
-    def get_styles(self, family: str | None = None) -> list[Style]:
-        """Return the list of styles in the Content part, optionally limited
-        to the given family.
-
-        Arguments:
-
-            family -- str or None
-
-        Return: list of Style
-        """
-        result: list[Style] = []
-        for context in self._get_style_contexts(family):
-            if context is None:
-                continue
-            result.extend(context.get_styles(family=family))
-        return result
-
-    def get_style(
-        self,
-        family: str,
-        name_or_element: str | Element | None = None,
-        display_name: str | None = None,
-    ) -> Style | None:
-        """Return the style uniquely identified by the name/family pair. If
-        the argument is already a style object, it will return it.
-
-        If the name is None, the default style is fetched.
-
-        If the name is not the internal name but the name you gave in the
-        desktop application, use display_name instead.
-
-        Arguments:
-
-            family -- 'paragraph', 'text', 'graphic', 'table', 'list',
-                      'number'
-
-            name_or_element -- str or Style
-
-            display_name -- str
-
-        Return: Style or None if not found
-        """
-        for context in self._get_style_contexts(family):
-            if context is None:
-                continue
-            style = context.get_style(
-                family,
-                name_or_element=name_or_element,
-                display_name=display_name,
-            )
-            if style is not None:
-                return style
-        return None
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class Content -(part_name: str, container: Container) -
-
-

Representation of an XML part.

-

Abstraction of the XML library behind.

-
- -Expand source code - -
class Content(XmlPart):
-    @property
-    def body(self) -> Element:
-        body = self.root.document_body
-        if not isinstance(body, Element):
-            raise ValueError("No body found in document")  # noqa:TRY004
-        return body
-
-    # The following two seem useless but they match styles API
-
-    def _get_style_contexts(self, family: str | None) -> tuple:
-        if family == "font-face":
-            return (self.get_element("//office:font-face-decls"),)
-        return (
-            self.get_element("//office:font-face-decls"),
-            self.get_element("//office:automatic-styles"),
-        )
-
-    def __str__(self) -> str:
-        return str(self.body)
-
-    # Public API
-
-    def get_styles(self, family: str | None = None) -> list[Style]:
-        """Return the list of styles in the Content part, optionally limited
-        to the given family.
-
-        Arguments:
-
-            family -- str or None
-
-        Return: list of Style
-        """
-        result: list[Style] = []
-        for context in self._get_style_contexts(family):
-            if context is None:
-                continue
-            result.extend(context.get_styles(family=family))
-        return result
-
-    def get_style(
-        self,
-        family: str,
-        name_or_element: str | Element | None = None,
-        display_name: str | None = None,
-    ) -> Style | None:
-        """Return the style uniquely identified by the name/family pair. If
-        the argument is already a style object, it will return it.
-
-        If the name is None, the default style is fetched.
-
-        If the name is not the internal name but the name you gave in the
-        desktop application, use display_name instead.
-
-        Arguments:
-
-            family -- 'paragraph', 'text', 'graphic', 'table', 'list',
-                      'number'
-
-            name_or_element -- str or Style
-
-            display_name -- str
-
-        Return: Style or None if not found
-        """
-        for context in self._get_style_contexts(family):
-            if context is None:
-                continue
-            style = context.get_style(
-                family,
-                name_or_element=name_or_element,
-                display_name=display_name,
-            )
-            if style is not None:
-                return style
-        return None
-
-

Ancestors

- -

Instance variables

-
-
var bodyElement
-
-
-
- -Expand source code - -
@property
-def body(self) -> Element:
-    body = self.root.document_body
-    if not isinstance(body, Element):
-        raise ValueError("No body found in document")  # noqa:TRY004
-    return body
-
-
-
-

Methods

-
-
-def get_style(self, family: str, name_or_element: str | Element | None = None, display_name: str | None = None) ‑> Style | None -
-
-

Return the style uniquely identified by the name/family pair. If -the argument is already a style object, it will return it.

-

If the name is None, the default style is fetched.

-

If the name is not the internal name but the name you gave in the -desktop application, use display_name instead.

-

Arguments

-

family – 'paragraph', 'text', 'graphic', 'table', 'list', -'number'

-

name_or_element – str or Style

-

display_name – str

-

Return: Style or None if not found

-
- -Expand source code - -
def get_style(
-    self,
-    family: str,
-    name_or_element: str | Element | None = None,
-    display_name: str | None = None,
-) -> Style | None:
-    """Return the style uniquely identified by the name/family pair. If
-    the argument is already a style object, it will return it.
-
-    If the name is None, the default style is fetched.
-
-    If the name is not the internal name but the name you gave in the
-    desktop application, use display_name instead.
-
-    Arguments:
-
-        family -- 'paragraph', 'text', 'graphic', 'table', 'list',
-                  'number'
-
-        name_or_element -- str or Style
-
-        display_name -- str
-
-    Return: Style or None if not found
-    """
-    for context in self._get_style_contexts(family):
-        if context is None:
-            continue
-        style = context.get_style(
-            family,
-            name_or_element=name_or_element,
-            display_name=display_name,
-        )
-        if style is not None:
-            return style
-    return None
-
-
-
-def get_styles(self, family: str | None = None) ‑> list[Style] -
-
-

Return the list of styles in the Content part, optionally limited -to the given family.

-

Arguments

-

family – str or None

-

Return: list of Style

-
- -Expand source code - -
def get_styles(self, family: str | None = None) -> list[Style]:
-    """Return the list of styles in the Content part, optionally limited
-    to the given family.
-
-    Arguments:
-
-        family -- str or None
-
-    Return: list of Style
-    """
-    result: list[Style] = []
-    for context in self._get_style_contexts(family):
-        if context is None:
-            continue
-        result.extend(context.get_styles(family=family))
-    return result
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/datatype.html b/doc/datatype.html deleted file mode 100644 index c7aebf3..0000000 --- a/doc/datatype.html +++ /dev/null @@ -1,760 +0,0 @@ - - - - - - -odfdo.datatype API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.datatype

-
-
-

Data types (Boolean, Date, DateTime, Duration, Unit).

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-"""Data types (Boolean, Date, DateTime, Duration, Unit).
-"""
-from __future__ import annotations
-
-import contextlib
-from datetime import date, datetime, timedelta
-from decimal import Decimal
-from functools import total_ordering
-
-DATE_FORMAT = "%Y-%m-%d"
-
-DATETIME_FORMAT = DATE_FORMAT + "T%H:%M:%S"
-DATETIME_FORMAT_MICRO = DATETIME_FORMAT + ".%f"
-
-DURATION_FORMAT = "PT%02dH%02dM%02dS"
-
-
-class Boolean:
-    """Class for conversion between ODF boolean format and Python bool."""
-
-    @staticmethod
-    def decode(data: str) -> bool:
-        if data == "true":
-            return True
-        elif data == "false":
-            return False
-        raise ValueError(f"boolean {data!r} is invalid")
-
-    @staticmethod
-    def encode(value: bool | str | bytes) -> str:
-        if value is True or str(value).lower() == "true":
-            return "true"
-        elif value is False or str(value).lower() == "false":
-            return "false"
-        raise TypeError(f"{value!r} is not a boolean")
-
-
-class Date:
-    """Class for conversion between ODF date formats and Python datetime."""
-
-    @staticmethod
-    def decode(data: str) -> datetime:
-        return datetime.strptime(data, DATE_FORMAT)
-
-    @staticmethod
-    def encode(value: datetime | date) -> str:
-        return value.strftime(DATE_FORMAT)
-
-
-class DateTime:
-    """Class for conversion between ODF date/hour formats and Python datetime."""
-
-    @staticmethod
-    def decode(data: str) -> datetime:
-        if data.endswith("Z"):
-            data = data[:-1] + "+0000"
-
-        with contextlib.suppress(ValueError):
-            # fix for nanoseconds:
-            return datetime.strptime(data[0:26] + data[29:], DATETIME_FORMAT_MICRO)
-        with contextlib.suppress(ValueError):
-            return datetime.strptime(data, DATETIME_FORMAT_MICRO)
-        return datetime.strptime(data, DATETIME_FORMAT)
-
-    @staticmethod
-    def encode(value: datetime) -> str:
-        return value.strftime(DATETIME_FORMAT)
-
-
-class Duration:
-    """Class for conversion between ODF duration s (ISO 8601 format) and
-    Python timedelta"""
-
-    @staticmethod
-    def decode(data: str) -> timedelta:
-        if data.startswith("P"):
-            sign = 1
-        elif data.startswith("-P"):
-            sign = -1
-        else:
-            raise ValueError(f"duration not valid {data!r}")
-
-        days = 0
-        hours = 0
-        minutes = 0
-        seconds = 0
-
-        buffer = ""
-        for c in data:
-            if c.isdigit():
-                buffer += c
-            elif c == "D":
-                days = int(buffer)
-                buffer = ""
-            elif c == "H":
-                hours = int(buffer)
-                buffer = ""
-            elif c == "M":
-                minutes = int(buffer)
-                buffer = ""
-            elif c == "S":
-                seconds = int(buffer)
-                buffer = ""
-                break
-        if buffer != "":
-            raise ValueError(f"duration not valid {data!r}")
-
-        return timedelta(
-            days=sign * days,
-            hours=sign * hours,
-            minutes=sign * minutes,
-            seconds=sign * seconds,
-        )
-
-    @staticmethod
-    def encode(value: timedelta) -> str:
-        if not isinstance(value, timedelta):
-            raise TypeError(f"duration must be a timedelta: {value!r}")
-
-        days = value.days
-        if days < 0:
-            microseconds = -(
-                (days * 24 * 60 * 60 + value.seconds) * 1000000 + value.microseconds
-            )
-            sign = "-"
-        else:
-            microseconds = (
-                days * 24 * 60 * 60 + value.seconds
-            ) * 1000000 + value.microseconds
-            sign = ""
-
-        hours = microseconds / (60 * 60 * 1000000)
-        microseconds %= 60 * 60 * 1000000
-
-        minutes = microseconds / (60 * 1000000)
-        microseconds %= 60 * 1000000
-
-        seconds = microseconds / 1000000
-
-        return sign + DURATION_FORMAT % (hours, minutes, seconds)
-
-
-@total_ordering
-class Unit:
-    """Class for conversion between ODF units and Python types."""
-
-    def __init__(self, value: str | float | int | Decimal, unit: str = "cm"):
-        if isinstance(value, str):
-            digits = []
-            nondigits = []
-            for char in value:
-                if char.isdigit() or char == ".":
-                    digits.append(char)
-                else:
-                    nondigits.append(char)
-            value = "".join(digits)
-            if nondigits:
-                unit = "".join(nondigits)
-        elif isinstance(value, float):
-            value = str(value)
-        self.value = Decimal(value)
-        self.unit = unit
-
-    def __str__(self) -> str:
-        return str(self.value) + self.unit
-
-    def __repr__(self) -> str:
-        return f"{object.__repr__(self)} {self}"
-
-    def _check_other(self, other: Unit) -> None:
-        if not isinstance(other, Unit):
-            raise TypeError(f"Can only compare Unit: {other!r}")
-        if self.unit != other.unit:
-            raise NotImplementedError(f"Conversion not implemented yet {other!r}")
-
-    def __lt__(self, other: Unit) -> bool:
-        self._check_other(other)
-        return self.value < other.value
-
-    def __eq__(self, other: object) -> bool:
-        if not isinstance(other, Unit):
-            return False
-        self._check_other(other)
-        return self.value == other.value
-
-    def convert(self, unit: str, dpi: int | Decimal | float = 72) -> Unit:
-        if unit == "px":
-            if self.unit == "in":
-                return Unit(int(self.value * int(dpi)), "px")
-            elif self.unit == "cm":
-                return Unit(int(self.value / Decimal("2.54") * int(dpi)), "px")
-            raise NotImplementedError(str(self.unit))
-        raise NotImplementedError(str(unit))
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class Boolean -
-
-

Class for conversion between ODF boolean format and Python bool.

-
- -Expand source code - -
class Boolean:
-    """Class for conversion between ODF boolean format and Python bool."""
-
-    @staticmethod
-    def decode(data: str) -> bool:
-        if data == "true":
-            return True
-        elif data == "false":
-            return False
-        raise ValueError(f"boolean {data!r} is invalid")
-
-    @staticmethod
-    def encode(value: bool | str | bytes) -> str:
-        if value is True or str(value).lower() == "true":
-            return "true"
-        elif value is False or str(value).lower() == "false":
-            return "false"
-        raise TypeError(f"{value!r} is not a boolean")
-
-

Static methods

-
-
-def decode(data: str) ‑> bool -
-
-
-
- -Expand source code - -
@staticmethod
-def decode(data: str) -> bool:
-    if data == "true":
-        return True
-    elif data == "false":
-        return False
-    raise ValueError(f"boolean {data!r} is invalid")
-
-
-
-def encode(value: bool | str | bytes) ‑> str -
-
-
-
- -Expand source code - -
@staticmethod
-def encode(value: bool | str | bytes) -> str:
-    if value is True or str(value).lower() == "true":
-        return "true"
-    elif value is False or str(value).lower() == "false":
-        return "false"
-    raise TypeError(f"{value!r} is not a boolean")
-
-
-
-
-
-class Date -
-
-

Class for conversion between ODF date formats and Python datetime.

-
- -Expand source code - -
class Date:
-    """Class for conversion between ODF date formats and Python datetime."""
-
-    @staticmethod
-    def decode(data: str) -> datetime:
-        return datetime.strptime(data, DATE_FORMAT)
-
-    @staticmethod
-    def encode(value: datetime | date) -> str:
-        return value.strftime(DATE_FORMAT)
-
-

Static methods

-
-
-def decode(data: str) ‑> datetime.datetime -
-
-
-
- -Expand source code - -
@staticmethod
-def decode(data: str) -> datetime:
-    return datetime.strptime(data, DATE_FORMAT)
-
-
-
-def encode(value: datetime | date) ‑> str -
-
-
-
- -Expand source code - -
@staticmethod
-def encode(value: datetime | date) -> str:
-    return value.strftime(DATE_FORMAT)
-
-
-
-
-
-class DateTime -
-
-

Class for conversion between ODF date/hour formats and Python datetime.

-
- -Expand source code - -
class DateTime:
-    """Class for conversion between ODF date/hour formats and Python datetime."""
-
-    @staticmethod
-    def decode(data: str) -> datetime:
-        if data.endswith("Z"):
-            data = data[:-1] + "+0000"
-
-        with contextlib.suppress(ValueError):
-            # fix for nanoseconds:
-            return datetime.strptime(data[0:26] + data[29:], DATETIME_FORMAT_MICRO)
-        with contextlib.suppress(ValueError):
-            return datetime.strptime(data, DATETIME_FORMAT_MICRO)
-        return datetime.strptime(data, DATETIME_FORMAT)
-
-    @staticmethod
-    def encode(value: datetime) -> str:
-        return value.strftime(DATETIME_FORMAT)
-
-

Static methods

-
-
-def decode(data: str) ‑> datetime.datetime -
-
-
-
- -Expand source code - -
@staticmethod
-def decode(data: str) -> datetime:
-    if data.endswith("Z"):
-        data = data[:-1] + "+0000"
-
-    with contextlib.suppress(ValueError):
-        # fix for nanoseconds:
-        return datetime.strptime(data[0:26] + data[29:], DATETIME_FORMAT_MICRO)
-    with contextlib.suppress(ValueError):
-        return datetime.strptime(data, DATETIME_FORMAT_MICRO)
-    return datetime.strptime(data, DATETIME_FORMAT)
-
-
-
-def encode(value: datetime) ‑> str -
-
-
-
- -Expand source code - -
@staticmethod
-def encode(value: datetime) -> str:
-    return value.strftime(DATETIME_FORMAT)
-
-
-
-
-
-class Duration -
-
-

Class for conversion between ODF duration s (ISO 8601 format) and -Python timedelta

-
- -Expand source code - -
class Duration:
-    """Class for conversion between ODF duration s (ISO 8601 format) and
-    Python timedelta"""
-
-    @staticmethod
-    def decode(data: str) -> timedelta:
-        if data.startswith("P"):
-            sign = 1
-        elif data.startswith("-P"):
-            sign = -1
-        else:
-            raise ValueError(f"duration not valid {data!r}")
-
-        days = 0
-        hours = 0
-        minutes = 0
-        seconds = 0
-
-        buffer = ""
-        for c in data:
-            if c.isdigit():
-                buffer += c
-            elif c == "D":
-                days = int(buffer)
-                buffer = ""
-            elif c == "H":
-                hours = int(buffer)
-                buffer = ""
-            elif c == "M":
-                minutes = int(buffer)
-                buffer = ""
-            elif c == "S":
-                seconds = int(buffer)
-                buffer = ""
-                break
-        if buffer != "":
-            raise ValueError(f"duration not valid {data!r}")
-
-        return timedelta(
-            days=sign * days,
-            hours=sign * hours,
-            minutes=sign * minutes,
-            seconds=sign * seconds,
-        )
-
-    @staticmethod
-    def encode(value: timedelta) -> str:
-        if not isinstance(value, timedelta):
-            raise TypeError(f"duration must be a timedelta: {value!r}")
-
-        days = value.days
-        if days < 0:
-            microseconds = -(
-                (days * 24 * 60 * 60 + value.seconds) * 1000000 + value.microseconds
-            )
-            sign = "-"
-        else:
-            microseconds = (
-                days * 24 * 60 * 60 + value.seconds
-            ) * 1000000 + value.microseconds
-            sign = ""
-
-        hours = microseconds / (60 * 60 * 1000000)
-        microseconds %= 60 * 60 * 1000000
-
-        minutes = microseconds / (60 * 1000000)
-        microseconds %= 60 * 1000000
-
-        seconds = microseconds / 1000000
-
-        return sign + DURATION_FORMAT % (hours, minutes, seconds)
-
-

Static methods

-
-
-def decode(data: str) ‑> datetime.timedelta -
-
-
-
- -Expand source code - -
@staticmethod
-def decode(data: str) -> timedelta:
-    if data.startswith("P"):
-        sign = 1
-    elif data.startswith("-P"):
-        sign = -1
-    else:
-        raise ValueError(f"duration not valid {data!r}")
-
-    days = 0
-    hours = 0
-    minutes = 0
-    seconds = 0
-
-    buffer = ""
-    for c in data:
-        if c.isdigit():
-            buffer += c
-        elif c == "D":
-            days = int(buffer)
-            buffer = ""
-        elif c == "H":
-            hours = int(buffer)
-            buffer = ""
-        elif c == "M":
-            minutes = int(buffer)
-            buffer = ""
-        elif c == "S":
-            seconds = int(buffer)
-            buffer = ""
-            break
-    if buffer != "":
-        raise ValueError(f"duration not valid {data!r}")
-
-    return timedelta(
-        days=sign * days,
-        hours=sign * hours,
-        minutes=sign * minutes,
-        seconds=sign * seconds,
-    )
-
-
-
-def encode(value: timedelta) ‑> str -
-
-
-
- -Expand source code - -
@staticmethod
-def encode(value: timedelta) -> str:
-    if not isinstance(value, timedelta):
-        raise TypeError(f"duration must be a timedelta: {value!r}")
-
-    days = value.days
-    if days < 0:
-        microseconds = -(
-            (days * 24 * 60 * 60 + value.seconds) * 1000000 + value.microseconds
-        )
-        sign = "-"
-    else:
-        microseconds = (
-            days * 24 * 60 * 60 + value.seconds
-        ) * 1000000 + value.microseconds
-        sign = ""
-
-    hours = microseconds / (60 * 60 * 1000000)
-    microseconds %= 60 * 60 * 1000000
-
-    minutes = microseconds / (60 * 1000000)
-    microseconds %= 60 * 1000000
-
-    seconds = microseconds / 1000000
-
-    return sign + DURATION_FORMAT % (hours, minutes, seconds)
-
-
-
-
-
-class Unit -(value: str | float | int | Decimal, unit: str = 'cm') -
-
-

Class for conversion between ODF units and Python types.

-
- -Expand source code - -
@total_ordering
-class Unit:
-    """Class for conversion between ODF units and Python types."""
-
-    def __init__(self, value: str | float | int | Decimal, unit: str = "cm"):
-        if isinstance(value, str):
-            digits = []
-            nondigits = []
-            for char in value:
-                if char.isdigit() or char == ".":
-                    digits.append(char)
-                else:
-                    nondigits.append(char)
-            value = "".join(digits)
-            if nondigits:
-                unit = "".join(nondigits)
-        elif isinstance(value, float):
-            value = str(value)
-        self.value = Decimal(value)
-        self.unit = unit
-
-    def __str__(self) -> str:
-        return str(self.value) + self.unit
-
-    def __repr__(self) -> str:
-        return f"{object.__repr__(self)} {self}"
-
-    def _check_other(self, other: Unit) -> None:
-        if not isinstance(other, Unit):
-            raise TypeError(f"Can only compare Unit: {other!r}")
-        if self.unit != other.unit:
-            raise NotImplementedError(f"Conversion not implemented yet {other!r}")
-
-    def __lt__(self, other: Unit) -> bool:
-        self._check_other(other)
-        return self.value < other.value
-
-    def __eq__(self, other: object) -> bool:
-        if not isinstance(other, Unit):
-            return False
-        self._check_other(other)
-        return self.value == other.value
-
-    def convert(self, unit: str, dpi: int | Decimal | float = 72) -> Unit:
-        if unit == "px":
-            if self.unit == "in":
-                return Unit(int(self.value * int(dpi)), "px")
-            elif self.unit == "cm":
-                return Unit(int(self.value / Decimal("2.54") * int(dpi)), "px")
-            raise NotImplementedError(str(self.unit))
-        raise NotImplementedError(str(unit))
-
-

Methods

-
-
-def convert(self, unit: str, dpi: int | Decimal | float = 72) ‑> Unit -
-
-
-
- -Expand source code - -
def convert(self, unit: str, dpi: int | Decimal | float = 72) -> Unit:
-    if unit == "px":
-        if self.unit == "in":
-            return Unit(int(self.value * int(dpi)), "px")
-        elif self.unit == "cm":
-            return Unit(int(self.value / Decimal("2.54") * int(dpi)), "px")
-        raise NotImplementedError(str(self.unit))
-    raise NotImplementedError(str(unit))
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/document.html b/doc/document.html deleted file mode 100644 index 2e1c4a2..0000000 --- a/doc/document.html +++ /dev/null @@ -1,3188 +0,0 @@ - - - - - - -odfdo.document API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.document

-
-
-

Document class, root of the ODF document.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Document class, root of the ODF document.
-"""
-from __future__ import annotations
-
-import io
-import posixpath
-from contextlib import suppress
-from copy import deepcopy
-from importlib import resources as rso
-from mimetypes import guess_type
-from operator import itemgetter
-from pathlib import Path
-from typing import Any
-from uuid import uuid4
-
-from .const import (
-    ODF_CONTENT,
-    ODF_MANIFEST,
-    ODF_META,
-    ODF_SETTINGS,
-    ODF_STYLES,
-    ODF_TEMPLATES,
-)
-from .container import Container
-from .content import Content
-from .element import Element
-from .manifest import Manifest
-from .meta import Meta
-from .style import Style
-from .styles import Styles
-from .utils import FAMILY_ODF_STD, bytes_to_str
-from .xmlpart import XmlPart
-
-AUTOMATIC_PREFIX = "odfdo_auto_"
-
-UNDERLINE_LVL = ["=", "-", ":", "`", "'", '"', "~", "^", "_", "*", "+"]
-
-
-def _underline_string(level: int, name: str) -> str:
-    """Underline string of the name."""
-    if level >= len(UNDERLINE_LVL):
-        return "\n"
-    return UNDERLINE_LVL[level] * len(name)
-
-
-def _show_styles(element: Element, level: int = 0) -> str | None:
-    output: list[str] = []
-    attributes = element.attributes
-    children = element.children
-    # Don't show the empty elements
-    if not attributes and not children:
-        return None
-    tag_name = element.tag
-    output.append(tag_name)
-    # Underline the name
-    output.append(_underline_string(level, tag_name))
-    # Add a separation between name and attributes
-    output[-1] += "\n"
-
-    # Attributes
-    attrs: list[str] = []
-    for key, value in attributes.items():
-        attrs.append(f"{key}: {value}")
-    if attrs:
-        attrs.sort()
-        # Add a separation between attributes and children
-        attrs[-1] += "\n"
-        output.extend(attrs)
-
-    # Children
-    # Sort children according to their names
-    children2 = [(child.tag, child) for child in children]
-    children2.sort()
-    children = [child for name, child in children2]
-    for child in children:
-        child_output = _show_styles(child, level + 1)
-        if child_output:
-            output.append(child_output)
-    return "\n".join(output)
-
-
-def _get_part_path(path: str) -> str:
-    """Transition to real path of XML parts"""
-    return {
-        "content": ODF_CONTENT,
-        "meta": ODF_META,
-        "settings": ODF_SETTINGS,
-        "styles": ODF_STYLES,
-        "manifest": ODF_MANIFEST,
-    }.get(path, path)
-
-
-def _get_part_class(
-    path: str,
-) -> type[XmlPart] | None:
-    return {
-        ODF_CONTENT: Content,
-        ODF_META: Meta,
-        ODF_SETTINGS: XmlPart,
-        ODF_STYLES: Styles,
-        ODF_MANIFEST: Manifest,
-    }.get(path)
-
-
-def container_from_template(template: str | Path | io.BytesIO) -> Container:
-    """Return a Container instance based on template argument.
-
-    Internal use only."""
-    template_container = Container()
-    if isinstance(template, str) and template in ODF_TEMPLATES:
-        template = ODF_TEMPLATES[template]
-        with rso.as_file(
-            rso.files("odfdo.templates").joinpath(template)
-        ) as template_path:
-            template_container.open(template_path)
-    else:
-        # custome template
-        template_container.open(template)
-    # Return a copy of the template container
-    container = template_container.clone
-    # Change type from template to regular
-    mimetype = container.mimetype.replace("-template", "")
-    container.mimetype = mimetype
-    # Update the manifest
-    manifest = Manifest(ODF_MANIFEST, container)
-    manifest.set_media_type("/", mimetype)
-    container.set_part(ODF_MANIFEST, manifest.serialize())
-    return container
-
-
-class Document:
-    """Abstraction of the ODF document.
-
-    To create a new Document, several possibilities:
-
-        - Document() or Document("text") -> an "empty" document of type text
-        - Document("spreadsheet") -> an "empty" document of type spreadsheet
-        - Document("presentation") -> an "empty" document of type presentation
-        - Document("drawing") -> an "empty" document of type drawing
-
-        Meaning of “empty”: these documents are copies of the default
-        templates documents provided with this library, which, as templates,
-        are not really empty. It may be useful to clear the newly created
-        document: document.body.clear(), or adjust meta informations like
-        description or default language: document.meta.set_language('fr-FR')
-
-    If the argument is not a known template type, or is a Path,
-    Document(file) will load the content of the ODF file.
-
-    To explicitly create a document from a custom template, use the
-    Document.new(path) method whose argument is the path to the template file.
-    """
-
-    def __init__(
-        self,
-        target: str | bytes | Path | Container | io.BytesIO | None = "text",
-    ) -> None:
-        # Cache of XML parts
-        self.__xmlparts: dict[str, XmlPart] = {}
-        # Cache of the body
-        self.__body: Element | None = None
-        self.container: Container | None = None
-        if isinstance(target, bytes):
-            # eager conversion
-            target = bytes_to_str(target)
-        if target is None:
-            # empty document, you probably don't wnat this.
-            self.container = Container()
-            return
-        if isinstance(target, Path):
-            # let's assume we open a container on existing file
-            self.container = Container(target)
-            return
-        if isinstance(target, Container):
-            # special internal case, use an existing container
-            self.container = target
-            return
-        if isinstance(target, str):
-            if target in ODF_TEMPLATES:
-                # assuming a new document from templates
-                self.container = container_from_template(target)
-                return
-            # let's assume we open a container on existing file
-            self.container = Container(target)
-            return
-        if isinstance(target, io.BytesIO):
-            self.container = Container(target)
-            return
-        raise TypeError(f"Unknown Document source type: '{target!r}'")
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} type={self.get_type()} path={self.path}>"
-
-    def __str__(self) -> str:
-        try:
-            return str(self.get_formatted_text())
-        except NotImplementedError:
-            return self.body.text_recursive
-
-    @classmethod
-    def new(cls, template: str | Path | io.BytesIO = "text") -> Document:
-        """Create a Document from a template.
-
-        The template argument is expected to be the path to a ODF template.
-
-        Arguments:
-
-            template -- str or Path or file-like (io.BytesIO)
-
-        Return : ODF document -- Document
-        """
-        container = container_from_template(template)
-        return cls(container)
-
-    # Public API
-
-    @property
-    def path(self) -> Path | None:
-        """Shortcut to Document.Container.path."""
-        if not self.container:
-            return None
-        return self.container.path
-
-    @path.setter
-    def path(self, path_or_str: str | Path) -> None:
-        """Shortcut to Document.Container.path
-
-        Only accepting str or Path."""
-        if not self.container:
-            return
-        self.container.path = Path(path_or_str)
-
-    def get_parts(self) -> list[str]:
-        """Return available part names with path inside the archive, e.g.
-        ['content.xml', ..., 'Pictures/100000000000032000000258912EB1C3.jpg']
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        return self.container.get_parts()
-
-    def get_part(self, path: str) -> XmlPart | str | bytes | None:
-        """Return the bytes of the given part. The path is relative to the
-        archive, e.g. "Pictures/1003200258912EB1C3.jpg".
-
-        'content', 'meta', 'settings', 'styles' and 'manifest' are shortcuts
-        to the real path, e.g. content.xml, and return a dedicated object with
-        its own API.
-
-        path formated as URI, so always use '/' separator
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        # "./ObjectReplacements/Object 1"
-        path = path.lstrip("./")
-        path = _get_part_path(path)
-        cls = _get_part_class(path)
-        # Raw bytes
-        if cls is None:
-            return self.container.get_part(path)
-        # XML part
-        part = self.__xmlparts.get(path)
-        if part is None:
-            self.__xmlparts[path] = part = cls(path, self.container)
-        return part
-
-    def set_part(self, path: str, data: bytes) -> None:
-        """Set the bytes of the given part. The path is relative to the
-        archive, e.g. "Pictures/1003200258912EB1C3.jpg".
-
-        path formated as URI, so always use '/' separator
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        # "./ObjectReplacements/Object 1"
-        path = path.lstrip("./")
-        path = _get_part_path(path)
-        cls = _get_part_class(path)
-        # XML part overwritten
-        if cls is not None:
-            with suppress(KeyError):
-                self.__xmlparts[path]
-        self.container.set_part(path, data)
-
-    def del_part(self, path: str) -> None:
-        """Mark a part for deletion. The path is relative to the archive,
-        e.g. "Pictures/1003200258912EB1C3.jpg"
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        path = _get_part_path(path)
-        cls = _get_part_class(path)
-        if path == ODF_MANIFEST or cls is not None:
-            raise ValueError(f"part '{path}' is mandatory")
-        self.container.del_part(path)
-
-    @property
-    def mimetype(self) -> str:
-        if not self.container:
-            raise ValueError("Empty Container")
-        return self.container.mimetype
-
-    @mimetype.setter
-    def mimetype(self, mimetype: str) -> None:
-        if not self.container:
-            raise ValueError("Empty Container")
-        self.container.mimetype = mimetype
-
-    def get_type(self) -> str:
-        """Get the ODF type (also called class) of this document.
-
-        Return: 'chart', 'database', 'formula', 'graphics',
-            'graphics-template', 'image', 'presentation',
-            'presentation-template', 'spreadsheet', 'spreadsheet-template',
-            'text', 'text-master', 'text-template' or 'text-web'
-        """
-        # The mimetype must be with the form:
-        # application/vnd.oasis.opendocument.text
-
-        # Isolate and return the last part
-        return self.mimetype.rsplit(".", 1)[-1]
-
-    @property
-    def body(self) -> Element:
-        """Return the body element of the content part, where actual content
-        is stored.
-        """
-        if self.__body is None:
-            self.__body = self.content.body
-        return self.__body
-
-    @property
-    def meta(self) -> Meta:
-        """Return the meta part (meta.xml) of the document, where meta data
-        are stored."""
-        metadata = self.get_part(ODF_META)
-        if metadata is None or not isinstance(metadata, Meta):
-            raise ValueError("Empty Meta")
-        return metadata
-
-    @property
-    def manifest(self) -> Manifest:
-        """Return the manifest part (manifest.xml) of the document."""
-        manifest = self.get_part(ODF_MANIFEST)
-        if manifest is None or not isinstance(manifest, Manifest):
-            raise ValueError("Empty Manifest")
-        return manifest
-
-    def _get_formatted_text_footnotes(
-        self,
-        result: list[str],
-        context: dict,
-        rst_mode: bool,
-    ) -> None:
-        # Separate text from notes
-        if rst_mode:
-            result.append("\n")
-        else:
-            result.append("----\n")
-        for citation, body in context["footnotes"]:
-            if rst_mode:
-                result.append(f".. [#] {body}\n")
-            else:
-                result.append(f"[{citation}] {body}\n")
-        # Append a \n after the notes
-        result.append("\n")
-        # Reset for the next paragraph
-        context["footnotes"] = []
-
-    def _get_formatted_text_annotations(
-        self,
-        result: list[str],
-        context: dict,
-        rst_mode: bool,
-    ) -> None:
-        # Insert the annotations
-        # With a separation
-        if rst_mode:
-            result.append("\n")
-        else:
-            result.append("----\n")
-        for annotation in context["annotations"]:
-            if rst_mode:
-                result.append(f".. [#] {annotation}\n")
-            else:
-                result.append(f"[*] {annotation}\n")
-        context["annotations"] = []
-
-    def _get_formatted_text_images(
-        self,
-        result: list[str],
-        context: dict,
-        rst_mode: bool,
-    ) -> None:
-        # Insert the images ref, only in rst mode
-        result.append("\n")
-        for ref, filename, (width, height) in context["images"]:
-            result.append(f".. {ref} image:: {filename}\n")
-            if width is not None:
-                result.append(f"   :width: {width}\n")
-            if height is not None:
-                result.append(f"   :height: {height}\n")
-        context["images"] = []
-
-    def _get_formatted_text_endnotes(
-        self,
-        result: list[str],
-        context: dict,
-        rst_mode: bool,
-    ) -> None:
-        # Append the end notes
-        if rst_mode:
-            result.append("\n\n")
-        else:
-            result.append("\n========\n")
-        for citation, body in context["endnotes"]:
-            if rst_mode:
-                result.append(f".. [*] {body}\n")
-            else:
-                result.append(f"({citation}) {body}\n")
-
-    def get_formatted_text(self, rst_mode: bool = False) -> str:
-        """Return content as text, with some formatting."""
-        # For the moment, only "type='text'"
-        doc_type = self.get_type()
-        if doc_type == "spreadsheet":
-            return self._tables_csv()
-        if doc_type in {
-            "text",
-            "text-template",
-            "presentation",
-            "presentation-template",
-        }:
-            return self._formatted_text(rst_mode)
-        raise NotImplementedError(f"Type of document '{doc_type}' not supported yet")
-
-    def _tables_csv(self) -> str:
-        return "\n\n".join(str(table) for table in self.body.get_tables())
-
-    def _formatted_text(self, rst_mode: bool) -> str:
-        # Initialize an empty context
-        context = {
-            "document": self,
-            "footnotes": [],
-            "endnotes": [],
-            "annotations": [],
-            "rst_mode": rst_mode,
-            "img_counter": 0,
-            "images": [],
-            "no_img_level": 0,
-        }
-        body = self.body
-        # Get the text
-        result = []
-        for child in body.children:
-            # self._get_formatted_text_child(result, element, context, rst_mode)
-            # if child.tag == "table:table":
-            #     result.append(child.get_formatted_text(context))
-            #     return
-            result.append(child.get_formatted_text(context))
-            if context["footnotes"]:
-                self._get_formatted_text_footnotes(result, context, rst_mode)
-            if context["annotations"]:
-                self._get_formatted_text_annotations(result, context, rst_mode)
-            # Insert the images ref, only in rst mode
-            if context["images"]:
-                self._get_formatted_text_images(result, context, rst_mode)
-        if context["endnotes"]:
-            self._get_formatted_text_endnotes(result, context, rst_mode)
-        return "".join(result)
-
-    def get_formated_meta(self) -> str:
-        """Return meta informations as text, with some formatting."""
-        result: list[str] = []
-
-        # Simple values
-        def print_info(name: str, value: Any) -> None:
-            if value:
-                result.append(f"{name}: {value}")
-
-        meta = self.meta
-        print_info("Title", meta.get_title())
-        print_info("Subject", meta.get_subject())
-        print_info("Language", meta.get_language())
-        print_info("Modification date", meta.get_modification_date())
-        print_info("Creation date", meta.get_creation_date())
-        print_info("Initial creator", meta.get_initial_creator())
-        print_info("Keyword", meta.get_keywords())
-        print_info("Editing duration", meta.get_editing_duration())
-        print_info("Editing cycles", meta.get_editing_cycles())
-        print_info("Generator", meta.get_generator())
-
-        # Statistic
-        result.append("Statistic:")
-        statistic = meta.get_statistic()
-        if statistic:
-            for name, data in statistic.items():
-                result.append(f"  - {name[5:].replace('-', ' ').capitalize()}: {data}")
-
-        # User defined metadata
-        result.append("User defined metadata:")
-        user_metadata = meta.get_user_defined_metadata()
-        for name, data2 in user_metadata.items():
-            result.append(f"  - {name}: {data2}")
-
-        # And the description
-        print_info("Description", meta.get_description())
-
-        return "\n".join(result) + "\n"
-
-    def add_file(self, path_or_file: str | Path) -> str:
-        """Insert a file from a path or a file-like object in the container.
-
-        Return the full path to reference in the content.
-
-        Arguments:
-
-            path_or_file -- str or Path or file-like
-
-        Return: str (URI)
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        name = ""
-        # Folder for added files (FIXME hard-coded and copied)
-        manifest = self.manifest
-        medias = manifest.get_paths()
-        # uuid = str(uuid4())
-
-        if isinstance(path_or_file, (str, Path)):
-            path = Path(path_or_file)
-            extension = path.suffix.lower()
-            name = f"{path.stem}{extension}"
-            if posixpath.join("Pictures", name) in medias:
-                name = f"{path.stem}_{uuid4()}{extension}"
-        else:
-            path = None
-            name = getattr(path_or_file, "name", None)
-            if not name:
-                name = str(uuid4())
-        media_type, _encoding = guess_type(name)
-        if not media_type:
-            media_type = "application/octet-stream"
-        if manifest.get_media_type("Pictures/") is None:
-            manifest.add_full_path("Pictures/")
-        full_path = posixpath.join("Pictures", name)
-        if path is None:
-            self.container.set_part(full_path, path_or_file.read())
-        else:
-            self.container.set_part(full_path, path.read_bytes())
-        manifest.add_full_path(full_path, media_type)
-        return full_path
-
-    @property
-    def clone(self) -> Document:
-        """Return an exact copy of the document.
-
-        Return: Document
-        """
-        clone = object.__new__(self.__class__)
-        for name in self.__dict__:
-            if name == "_Document__body":
-                setattr(clone, name, None)
-            elif name == "_Document__xmlparts":
-                setattr(clone, name, {})
-            elif name == "container":
-                if not self.container:
-                    raise ValueError("Empty Container")
-                setattr(clone, name, self.container.clone)
-            else:
-                value = deepcopy(getattr(self, name))
-                setattr(clone, name, value)
-        return clone
-
-    def save(
-        self,
-        target: str | Path | io.BytesIO | None = None,
-        packaging: str = "zip",
-        pretty: bool = False,
-        backup: bool = False,
-    ) -> None:
-        """Save the document, at the same place it was opened or at the given
-        target path. Target can also be a file-like object. It can be saved
-        as a Zip file (default) or as files in a folder (for debugging
-        purpose). XML parts can be pretty printed.
-
-        Arguments:
-
-            target -- str or file-like object
-
-            packaging -- 'zip' or 'folder'
-
-            pretty -- bool
-
-            backup -- bool
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        # Some advertising
-        self.meta.set_generator_default()
-        # Synchronize data with container
-        container = self.container
-        for path, part in self.__xmlparts.items():
-            if part is not None:
-                container.set_part(path, part.serialize(pretty))
-        # Save the container
-        container.save(target, packaging=packaging, backup=backup)
-
-    @property
-    def content(self) -> Content:
-        content: Content | None = self.get_part(ODF_CONTENT)  # type:ignore
-        if content is None:
-            raise ValueError("Empty Content")
-        return content
-
-    @property
-    def styles(self) -> Styles:
-        styles: Styles | None = self.get_part(ODF_STYLES)  # type:ignore
-        if styles is None:
-            raise ValueError("Empty Styles")
-        return styles
-
-    # Styles over several parts
-
-    def get_styles(
-        self,
-        family: str | bytes = "",
-        automatic: bool = False,
-    ) -> list[Style | Element]:
-        # compatibility with old versions:
-
-        if isinstance(family, bytes):
-            family = bytes_to_str(family)
-        return self.content.get_styles(family=family) + self.styles.get_styles(
-            family=family, automatic=automatic
-        )
-
-    def get_style(
-        self,
-        family: str,
-        name_or_element: str | Style | None = None,
-        display_name: str | None = None,
-    ) -> Style | None:
-        """Return the style uniquely identified by the name/family pair. If
-        the argument is already a style object, it will return it.
-
-        If the name is None, the default style is fetched.
-
-        If the name is not the internal name but the name you gave in a
-        desktop application, use display_name instead.
-
-        Arguments:
-
-            family -- 'paragraph', 'text',  'graphic', 'table', 'list',
-                      'number', 'page-layout', 'master-page'
-
-            name -- str or Element or None
-
-            display_name -- str
-
-        Return: Style or None if not found.
-        """
-        # 1. content.xml
-        element = self.content.get_style(
-            family, name_or_element=name_or_element, display_name=display_name
-        )
-        if element is not None:
-            return element
-        # 2. styles.xml
-        return self.styles.get_style(
-            family,
-            name_or_element=name_or_element,
-            display_name=display_name,
-        )
-
-    @staticmethod
-    def _pseudo_style_attribute(style_element: Style | Element, attribute: str) -> Any:
-        if hasattr(style_element, attribute):
-            return getattr(style_element, attribute)
-        return ""
-
-    def _set_automatic_name(self, style: Style, family: str) -> None:
-        """Generate a name for the new automatic style."""
-        if not hasattr(style, "name"):
-            # do nothing
-            return
-        styles = self.get_styles(family=family, automatic=True)
-        max_index = 0
-        for existing_style in styles:
-            if not hasattr(existing_style, "name"):
-                continue
-            if not existing_style.name.startswith(AUTOMATIC_PREFIX):
-                continue
-            try:
-                index = int(existing_style.name[len(AUTOMATIC_PREFIX) :])
-            except ValueError:
-                continue
-            max_index = max(max_index, index)
-
-        style.name = f"{AUTOMATIC_PREFIX}{max_index+1}"
-
-    def _insert_style_get_common_styles(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.styles.get_element("office:styles")
-        existing = self.styles.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_automatic_styles(
-        self,
-        style: Style,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.content.get_element("office:automatic-styles")
-        # A name ?
-        if name:
-            if hasattr(style, "name"):
-                style.name = name
-            existing = self.content.get_style(family, name)
-        else:
-            self._set_automatic_name(style, family)
-            existing = None
-        return existing, style_container
-
-    def _insert_style_get_default_styles(
-        self,
-        style: Style,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.styles.get_element("office:styles")
-        style.tag = "style:default-style"
-        if name:
-            style.del_attribute("style:name")
-        existing = self.styles.get_style(family)
-        return existing, style_container
-
-    def _insert_style_get_master_page(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.styles.get_element("office:master-styles")
-        existing = self.styles.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_font_face_default(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.styles.get_element("office:font-face-decls")
-        existing = self.styles.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_font_face(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.content.get_element("office:font-face-decls")
-        existing = self.content.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_page_layout(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        # force to automatic
-        style_container = self.styles.get_element("office:automatic-styles")
-        existing = self.styles.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_draw_fill_image(
-        self,
-        name: str,
-    ) -> tuple[Any, Any]:
-        # special case for 'draw:fill-image' pseudo style
-        # not family and style_element.__class__.__name__ == "DrawFillImage"
-        style_container = self.styles.get_element("office:styles")
-        existing = self.styles.get_style("", name)
-        return existing, style_container
-
-    def _insert_style_standard(
-        self,
-        style: Style,
-        name: str,
-        family: str,
-        automatic: bool,
-        default: bool,
-    ) -> tuple[Any, Any]:
-        # Common style
-        if name and automatic is False and default is False:
-            return self._insert_style_get_common_styles(family, name)
-        # Automatic style
-        elif automatic is True and default is False:
-            return self._insert_style_get_automatic_styles(style, family, name)
-        # Default style
-        elif automatic is False and default is True:
-            return self._insert_style_get_default_styles(style, family, name)
-        else:
-            raise AttributeError("Invalid combination of arguments")
-
-    def insert_style(  # noqa: C901
-        self,
-        style: Style | str,
-        name: str = "",
-        automatic: bool = False,
-        default: bool = False,
-    ) -> Any:
-        """Insert the given style object in the document, as required by the
-        style family and type.
-
-        The style is expected to be a common style with a name. In case it
-        was created with no name, the given can be set on the fly.
-
-        If automatic is True, the style will be inserted as an automatic
-        style.
-
-        If default is True, the style will be inserted as a default style and
-        would replace any existing default style of the same family. Any name
-        or display name would be ignored.
-
-        Automatic and default arguments are mutually exclusive.
-
-        All styles can't be used as default styles. Default styles are
-        allowed for the following families: paragraph, text, section, table,
-        table-column, table-row, table-cell, table-page, chart, drawing-page,
-        graphic, presentation, control and ruby.
-
-        Arguments:
-
-            style -- Style or str
-
-            name -- str
-
-            automatic -- bool
-
-            default -- bool
-
-        Return : style name -- str
-        """
-
-        # if style is a str, assume it is the Style definition
-        if isinstance(style, str):
-            style_element: Style = Element.from_tag(style)  # type: ignore
-        else:
-            style_element = style
-        if not isinstance(style_element, Element):
-            raise TypeError(f"Unknown Style type: '{style!r}'")
-
-        # Get family and name
-        family = self._pseudo_style_attribute(style_element, "family")
-        if not name:
-            name = self._pseudo_style_attribute(style_element, "name")
-
-        # Master page style
-        if family == "master-page":
-            existing, style_container = self._insert_style_get_master_page(family, name)
-        # Font face declarations
-        elif family == "font-face":
-            if default:
-                existing, style_container = self._insert_style_get_font_face_default(
-                    family, name
-                )
-            else:
-                existing, style_container = self._insert_style_get_font_face(
-                    family, name
-                )
-        # page layout style
-        elif family == "page-layout":
-            existing, style_container = self._insert_style_get_page_layout(family, name)
-        # Common style
-        elif family in FAMILY_ODF_STD or family in {"number"}:
-            existing, style_container = self._insert_style_standard(
-                style_element, name, family, automatic, default
-            )
-        elif not family and style_element.__class__.__name__ == "DrawFillImage":
-            # special case for 'draw:fill-image' pseudo style
-            existing, style_container = self._insert_style_get_draw_fill_image(name)
-        # Invalid style
-        else:
-            raise ValueError(
-                "Invalid style: "
-                f"{style_element}, tag:{style_element.tag}, family:{family}"
-            )
-
-        # Insert it!
-        if existing is not None:
-            style_container.delete(existing)
-        style_container.append(style_element)
-        return self._pseudo_style_attribute(style_element, "name")
-
-    def get_styled_elements(self, name: str = "") -> list[Element]:
-        """Brute-force to find paragraphs, tables, etc. using the given style
-        name (or all by default).
-
-        Arguments:
-
-            name -- str
-
-        Return: list
-        """
-        # Header, footer, etc. have styles too
-        return self.content.root.get_styled_elements(
-            name
-        ) + self.styles.root.get_styled_elements(name)
-
-    def show_styles(
-        self,
-        automatic: bool = True,
-        common: bool = True,
-        properties: bool = False,
-    ) -> str:
-        infos = []
-        for style in self.get_styles():
-            try:
-                name = style.name  # type: ignore
-            except AttributeError:
-                print("--------------")
-                print(style.__class__)
-                print(style.serialize())
-                raise
-            if style.__class__.__name__ == "DrawFillImage":
-                family = ""
-            else:
-                family = str(style.family)  # type: ignore
-            parent = style.parent
-            is_auto = parent and parent.tag == "office:automatic-styles"
-            if is_auto and automatic is False or not is_auto and common is False:
-                continue
-            is_used = bool(self.get_styled_elements(name))
-            infos.append(
-                {
-                    "type": "auto  " if is_auto else "common",
-                    "used": "y" if is_used else "n",
-                    "family": family,
-                    "parent": self._pseudo_style_attribute(style, "parent_style") or "",
-                    "name": name or "",
-                    "display_name": self._pseudo_style_attribute(style, "display_name")
-                    or "",
-                    "properties": style.get_properties() if properties else None,  # type: ignore
-                }
-            )
-        if not infos:
-            return ""
-        # Sort by family and name
-        infos.sort(key=itemgetter("family", "name"))
-        # Show common and used first
-        infos.sort(key=itemgetter("type", "used"), reverse=True)
-        max_family = str(max([len(x["family"]) for x in infos]))  # type: ignore
-        max_parent = str(max([len(x["parent"]) for x in infos]))  # type: ignore
-        formater = (
-            "%(type)s used:%(used)s family:%(family)-0"
-            + max_family
-            + "s parent:%(parent)-0"
-            + max_parent
-            + "s name:%(name)s"
-        )
-        output = []
-        for info in infos:
-            line = formater % info
-            if info["display_name"]:
-                line += " display_name:" + info["display_name"]  # type: ignore
-            output.append(line)
-            if info["properties"]:
-                for name, value in info["properties"].items():  # type: ignore
-                    output.append(f"   - {name}: {value}")
-        output.append("")
-        return "\n".join(output)
-
-    def delete_styles(self) -> int:
-        """Remove all style information from content and all styles.
-
-        Return: number of deleted styles
-        """
-        # First remove references to styles
-        for element in self.get_styled_elements():
-            for attribute in (
-                "text:style-name",
-                "draw:style-name",
-                "draw:text-style-name",
-                "table:style-name",
-                "style:page-layout-name",
-            ):
-                try:
-                    element.del_attribute(attribute)
-                except KeyError:
-                    continue
-        # Then remove supposedly orphaned styles
-        deleted = 0
-        for style in self.get_styles():
-            if style.name is None:  # type: ignore
-                # Don't delete default styles
-                continue
-            # elif type(style) is odf_master_page:
-            #    # Don't suppress header and footer, just styling was removed
-            #    continue
-            style.delete()
-            deleted += 1
-        return deleted
-
-    def merge_styles_from(self, document: Document) -> None:
-        """Copy all the styles of a document into ourself.
-
-        Styles with the same type and name will be replaced, so only unique
-        styles will be preserved.
-        """
-        manifest = self.manifest
-        document_manifest = document.manifest
-        for style in document.get_styles():
-            tagname = style.tag
-            family = self._pseudo_style_attribute(style, "family")
-            stylename = style.name  # type: ignore
-            container = style.parent
-            container_name = container.tag  # type: ignore
-            partname = container.parent.tag  # type: ignore
-            # The destination part
-            if partname == "office:document-styles":
-                part: Content | Styles = self.styles
-            elif partname == "office:document-content":
-                part = self.content
-            else:
-                raise NotImplementedError(partname)
-            # Implemented containers
-            if container_name not in {
-                "office:styles",
-                "office:automatic-styles",
-                "office:master-styles",
-                "office:font-face-decls",
-            }:
-                raise NotImplementedError(container_name)
-            dest = part.get_element(f"//{container_name}")
-            # Implemented style types
-            # if tagname not in registered_styles:
-            #    raise NotImplementedError(tagname)
-            duplicate = part.get_style(family, stylename)
-            if duplicate is not None:
-                duplicate.delete()
-            dest.append(style)
-            # Copy images from the header/footer
-            if tagname == "style:master-page":
-                query = "descendant::draw:image"
-                for image in style.get_elements(query):
-                    url = image.url  # type: ignore
-                    part_url = document.get_part(url)
-                    # Manually add the part to keep the name
-                    self.set_part(url, part_url)  # type: ignore
-                    media_type = document_manifest.get_media_type(url)
-                    manifest.add_full_path(url, media_type)  # type: ignore
-            # Copy images from the fill-image
-            elif tagname == "draw:fill-image":
-                url = style.url  # type: ignore
-                part_url = document.get_part(url)
-                self.set_part(url, part_url)  # type: ignore
-                media_type = document_manifest.get_media_type(url)
-                manifest.add_full_path(url, media_type)  # type: ignore
-
-    def add_page_break_style(self) -> None:
-        """Ensure that the document contains the style required for a manual page break.
-
-        Then a manual page break can be added to the document with:
-            from paragraph import PageBreak
-            ...
-            document.body.append(PageBreak())
-
-        Note: this style uses the property 'fo:break-after', another
-        possibility could be the property 'fo:break-before'
-        """
-        if existing := self.get_style(  # noqa: SIM102
-            family="paragraph",
-            name_or_element="odfdopagebreak",
-        ):
-            if properties := existing.get_properties():  # noqa: SIM102
-                if properties["fo:break-after"] == "page":
-                    return
-        style = (
-            '<style:style style:family="paragraph" style:parent-style-name="Standard" '
-            'style:name="odfdopagebreak">'
-            '<style:paragraph-properties fo:break-after="page"/></style:style>'
-        )
-        self.insert_style(style, automatic=False)
-
-
-
-
-
-
-
-

Functions

-
-
-def container_from_template(template: str | Path | io.BytesIO) ‑> Container -
-
-

Return a Container instance based on template argument.

-

Internal use only.

-
- -Expand source code - -
def container_from_template(template: str | Path | io.BytesIO) -> Container:
-    """Return a Container instance based on template argument.
-
-    Internal use only."""
-    template_container = Container()
-    if isinstance(template, str) and template in ODF_TEMPLATES:
-        template = ODF_TEMPLATES[template]
-        with rso.as_file(
-            rso.files("odfdo.templates").joinpath(template)
-        ) as template_path:
-            template_container.open(template_path)
-    else:
-        # custome template
-        template_container.open(template)
-    # Return a copy of the template container
-    container = template_container.clone
-    # Change type from template to regular
-    mimetype = container.mimetype.replace("-template", "")
-    container.mimetype = mimetype
-    # Update the manifest
-    manifest = Manifest(ODF_MANIFEST, container)
-    manifest.set_media_type("/", mimetype)
-    container.set_part(ODF_MANIFEST, manifest.serialize())
-    return container
-
-
-
-
-
-

Classes

-
-
-class Document -(target: str | bytes | Path | Container | io.BytesIO | None = 'text') -
-
-

Abstraction of the ODF document.

-

To create a new Document, several possibilities:

-
- Document() or Document("text") -> an "empty" document of type text
-- Document("spreadsheet") -> an "empty" document of type spreadsheet
-- Document("presentation") -> an "empty" document of type presentation
-- Document("drawing") -> an "empty" document of type drawing
-
-Meaning of “empty”: these documents are copies of the default
-templates documents provided with this library, which, as templates,
-are not really empty. It may be useful to clear the newly created
-document: document.body.clear(), or adjust meta informations like
-description or default language: document.meta.set_language('fr-FR')
-
-

If the argument is not a known template type, or is a Path, -Document(file) will load the content of the ODF file.

-

To explicitly create a document from a custom template, use the -Document.new(path) method whose argument is the path to the template file.

-
- -Expand source code - -
class Document:
-    """Abstraction of the ODF document.
-
-    To create a new Document, several possibilities:
-
-        - Document() or Document("text") -> an "empty" document of type text
-        - Document("spreadsheet") -> an "empty" document of type spreadsheet
-        - Document("presentation") -> an "empty" document of type presentation
-        - Document("drawing") -> an "empty" document of type drawing
-
-        Meaning of “empty”: these documents are copies of the default
-        templates documents provided with this library, which, as templates,
-        are not really empty. It may be useful to clear the newly created
-        document: document.body.clear(), or adjust meta informations like
-        description or default language: document.meta.set_language('fr-FR')
-
-    If the argument is not a known template type, or is a Path,
-    Document(file) will load the content of the ODF file.
-
-    To explicitly create a document from a custom template, use the
-    Document.new(path) method whose argument is the path to the template file.
-    """
-
-    def __init__(
-        self,
-        target: str | bytes | Path | Container | io.BytesIO | None = "text",
-    ) -> None:
-        # Cache of XML parts
-        self.__xmlparts: dict[str, XmlPart] = {}
-        # Cache of the body
-        self.__body: Element | None = None
-        self.container: Container | None = None
-        if isinstance(target, bytes):
-            # eager conversion
-            target = bytes_to_str(target)
-        if target is None:
-            # empty document, you probably don't wnat this.
-            self.container = Container()
-            return
-        if isinstance(target, Path):
-            # let's assume we open a container on existing file
-            self.container = Container(target)
-            return
-        if isinstance(target, Container):
-            # special internal case, use an existing container
-            self.container = target
-            return
-        if isinstance(target, str):
-            if target in ODF_TEMPLATES:
-                # assuming a new document from templates
-                self.container = container_from_template(target)
-                return
-            # let's assume we open a container on existing file
-            self.container = Container(target)
-            return
-        if isinstance(target, io.BytesIO):
-            self.container = Container(target)
-            return
-        raise TypeError(f"Unknown Document source type: '{target!r}'")
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} type={self.get_type()} path={self.path}>"
-
-    def __str__(self) -> str:
-        try:
-            return str(self.get_formatted_text())
-        except NotImplementedError:
-            return self.body.text_recursive
-
-    @classmethod
-    def new(cls, template: str | Path | io.BytesIO = "text") -> Document:
-        """Create a Document from a template.
-
-        The template argument is expected to be the path to a ODF template.
-
-        Arguments:
-
-            template -- str or Path or file-like (io.BytesIO)
-
-        Return : ODF document -- Document
-        """
-        container = container_from_template(template)
-        return cls(container)
-
-    # Public API
-
-    @property
-    def path(self) -> Path | None:
-        """Shortcut to Document.Container.path."""
-        if not self.container:
-            return None
-        return self.container.path
-
-    @path.setter
-    def path(self, path_or_str: str | Path) -> None:
-        """Shortcut to Document.Container.path
-
-        Only accepting str or Path."""
-        if not self.container:
-            return
-        self.container.path = Path(path_or_str)
-
-    def get_parts(self) -> list[str]:
-        """Return available part names with path inside the archive, e.g.
-        ['content.xml', ..., 'Pictures/100000000000032000000258912EB1C3.jpg']
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        return self.container.get_parts()
-
-    def get_part(self, path: str) -> XmlPart | str | bytes | None:
-        """Return the bytes of the given part. The path is relative to the
-        archive, e.g. "Pictures/1003200258912EB1C3.jpg".
-
-        'content', 'meta', 'settings', 'styles' and 'manifest' are shortcuts
-        to the real path, e.g. content.xml, and return a dedicated object with
-        its own API.
-
-        path formated as URI, so always use '/' separator
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        # "./ObjectReplacements/Object 1"
-        path = path.lstrip("./")
-        path = _get_part_path(path)
-        cls = _get_part_class(path)
-        # Raw bytes
-        if cls is None:
-            return self.container.get_part(path)
-        # XML part
-        part = self.__xmlparts.get(path)
-        if part is None:
-            self.__xmlparts[path] = part = cls(path, self.container)
-        return part
-
-    def set_part(self, path: str, data: bytes) -> None:
-        """Set the bytes of the given part. The path is relative to the
-        archive, e.g. "Pictures/1003200258912EB1C3.jpg".
-
-        path formated as URI, so always use '/' separator
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        # "./ObjectReplacements/Object 1"
-        path = path.lstrip("./")
-        path = _get_part_path(path)
-        cls = _get_part_class(path)
-        # XML part overwritten
-        if cls is not None:
-            with suppress(KeyError):
-                self.__xmlparts[path]
-        self.container.set_part(path, data)
-
-    def del_part(self, path: str) -> None:
-        """Mark a part for deletion. The path is relative to the archive,
-        e.g. "Pictures/1003200258912EB1C3.jpg"
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        path = _get_part_path(path)
-        cls = _get_part_class(path)
-        if path == ODF_MANIFEST or cls is not None:
-            raise ValueError(f"part '{path}' is mandatory")
-        self.container.del_part(path)
-
-    @property
-    def mimetype(self) -> str:
-        if not self.container:
-            raise ValueError("Empty Container")
-        return self.container.mimetype
-
-    @mimetype.setter
-    def mimetype(self, mimetype: str) -> None:
-        if not self.container:
-            raise ValueError("Empty Container")
-        self.container.mimetype = mimetype
-
-    def get_type(self) -> str:
-        """Get the ODF type (also called class) of this document.
-
-        Return: 'chart', 'database', 'formula', 'graphics',
-            'graphics-template', 'image', 'presentation',
-            'presentation-template', 'spreadsheet', 'spreadsheet-template',
-            'text', 'text-master', 'text-template' or 'text-web'
-        """
-        # The mimetype must be with the form:
-        # application/vnd.oasis.opendocument.text
-
-        # Isolate and return the last part
-        return self.mimetype.rsplit(".", 1)[-1]
-
-    @property
-    def body(self) -> Element:
-        """Return the body element of the content part, where actual content
-        is stored.
-        """
-        if self.__body is None:
-            self.__body = self.content.body
-        return self.__body
-
-    @property
-    def meta(self) -> Meta:
-        """Return the meta part (meta.xml) of the document, where meta data
-        are stored."""
-        metadata = self.get_part(ODF_META)
-        if metadata is None or not isinstance(metadata, Meta):
-            raise ValueError("Empty Meta")
-        return metadata
-
-    @property
-    def manifest(self) -> Manifest:
-        """Return the manifest part (manifest.xml) of the document."""
-        manifest = self.get_part(ODF_MANIFEST)
-        if manifest is None or not isinstance(manifest, Manifest):
-            raise ValueError("Empty Manifest")
-        return manifest
-
-    def _get_formatted_text_footnotes(
-        self,
-        result: list[str],
-        context: dict,
-        rst_mode: bool,
-    ) -> None:
-        # Separate text from notes
-        if rst_mode:
-            result.append("\n")
-        else:
-            result.append("----\n")
-        for citation, body in context["footnotes"]:
-            if rst_mode:
-                result.append(f".. [#] {body}\n")
-            else:
-                result.append(f"[{citation}] {body}\n")
-        # Append a \n after the notes
-        result.append("\n")
-        # Reset for the next paragraph
-        context["footnotes"] = []
-
-    def _get_formatted_text_annotations(
-        self,
-        result: list[str],
-        context: dict,
-        rst_mode: bool,
-    ) -> None:
-        # Insert the annotations
-        # With a separation
-        if rst_mode:
-            result.append("\n")
-        else:
-            result.append("----\n")
-        for annotation in context["annotations"]:
-            if rst_mode:
-                result.append(f".. [#] {annotation}\n")
-            else:
-                result.append(f"[*] {annotation}\n")
-        context["annotations"] = []
-
-    def _get_formatted_text_images(
-        self,
-        result: list[str],
-        context: dict,
-        rst_mode: bool,
-    ) -> None:
-        # Insert the images ref, only in rst mode
-        result.append("\n")
-        for ref, filename, (width, height) in context["images"]:
-            result.append(f".. {ref} image:: {filename}\n")
-            if width is not None:
-                result.append(f"   :width: {width}\n")
-            if height is not None:
-                result.append(f"   :height: {height}\n")
-        context["images"] = []
-
-    def _get_formatted_text_endnotes(
-        self,
-        result: list[str],
-        context: dict,
-        rst_mode: bool,
-    ) -> None:
-        # Append the end notes
-        if rst_mode:
-            result.append("\n\n")
-        else:
-            result.append("\n========\n")
-        for citation, body in context["endnotes"]:
-            if rst_mode:
-                result.append(f".. [*] {body}\n")
-            else:
-                result.append(f"({citation}) {body}\n")
-
-    def get_formatted_text(self, rst_mode: bool = False) -> str:
-        """Return content as text, with some formatting."""
-        # For the moment, only "type='text'"
-        doc_type = self.get_type()
-        if doc_type == "spreadsheet":
-            return self._tables_csv()
-        if doc_type in {
-            "text",
-            "text-template",
-            "presentation",
-            "presentation-template",
-        }:
-            return self._formatted_text(rst_mode)
-        raise NotImplementedError(f"Type of document '{doc_type}' not supported yet")
-
-    def _tables_csv(self) -> str:
-        return "\n\n".join(str(table) for table in self.body.get_tables())
-
-    def _formatted_text(self, rst_mode: bool) -> str:
-        # Initialize an empty context
-        context = {
-            "document": self,
-            "footnotes": [],
-            "endnotes": [],
-            "annotations": [],
-            "rst_mode": rst_mode,
-            "img_counter": 0,
-            "images": [],
-            "no_img_level": 0,
-        }
-        body = self.body
-        # Get the text
-        result = []
-        for child in body.children:
-            # self._get_formatted_text_child(result, element, context, rst_mode)
-            # if child.tag == "table:table":
-            #     result.append(child.get_formatted_text(context))
-            #     return
-            result.append(child.get_formatted_text(context))
-            if context["footnotes"]:
-                self._get_formatted_text_footnotes(result, context, rst_mode)
-            if context["annotations"]:
-                self._get_formatted_text_annotations(result, context, rst_mode)
-            # Insert the images ref, only in rst mode
-            if context["images"]:
-                self._get_formatted_text_images(result, context, rst_mode)
-        if context["endnotes"]:
-            self._get_formatted_text_endnotes(result, context, rst_mode)
-        return "".join(result)
-
-    def get_formated_meta(self) -> str:
-        """Return meta informations as text, with some formatting."""
-        result: list[str] = []
-
-        # Simple values
-        def print_info(name: str, value: Any) -> None:
-            if value:
-                result.append(f"{name}: {value}")
-
-        meta = self.meta
-        print_info("Title", meta.get_title())
-        print_info("Subject", meta.get_subject())
-        print_info("Language", meta.get_language())
-        print_info("Modification date", meta.get_modification_date())
-        print_info("Creation date", meta.get_creation_date())
-        print_info("Initial creator", meta.get_initial_creator())
-        print_info("Keyword", meta.get_keywords())
-        print_info("Editing duration", meta.get_editing_duration())
-        print_info("Editing cycles", meta.get_editing_cycles())
-        print_info("Generator", meta.get_generator())
-
-        # Statistic
-        result.append("Statistic:")
-        statistic = meta.get_statistic()
-        if statistic:
-            for name, data in statistic.items():
-                result.append(f"  - {name[5:].replace('-', ' ').capitalize()}: {data}")
-
-        # User defined metadata
-        result.append("User defined metadata:")
-        user_metadata = meta.get_user_defined_metadata()
-        for name, data2 in user_metadata.items():
-            result.append(f"  - {name}: {data2}")
-
-        # And the description
-        print_info("Description", meta.get_description())
-
-        return "\n".join(result) + "\n"
-
-    def add_file(self, path_or_file: str | Path) -> str:
-        """Insert a file from a path or a file-like object in the container.
-
-        Return the full path to reference in the content.
-
-        Arguments:
-
-            path_or_file -- str or Path or file-like
-
-        Return: str (URI)
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        name = ""
-        # Folder for added files (FIXME hard-coded and copied)
-        manifest = self.manifest
-        medias = manifest.get_paths()
-        # uuid = str(uuid4())
-
-        if isinstance(path_or_file, (str, Path)):
-            path = Path(path_or_file)
-            extension = path.suffix.lower()
-            name = f"{path.stem}{extension}"
-            if posixpath.join("Pictures", name) in medias:
-                name = f"{path.stem}_{uuid4()}{extension}"
-        else:
-            path = None
-            name = getattr(path_or_file, "name", None)
-            if not name:
-                name = str(uuid4())
-        media_type, _encoding = guess_type(name)
-        if not media_type:
-            media_type = "application/octet-stream"
-        if manifest.get_media_type("Pictures/") is None:
-            manifest.add_full_path("Pictures/")
-        full_path = posixpath.join("Pictures", name)
-        if path is None:
-            self.container.set_part(full_path, path_or_file.read())
-        else:
-            self.container.set_part(full_path, path.read_bytes())
-        manifest.add_full_path(full_path, media_type)
-        return full_path
-
-    @property
-    def clone(self) -> Document:
-        """Return an exact copy of the document.
-
-        Return: Document
-        """
-        clone = object.__new__(self.__class__)
-        for name in self.__dict__:
-            if name == "_Document__body":
-                setattr(clone, name, None)
-            elif name == "_Document__xmlparts":
-                setattr(clone, name, {})
-            elif name == "container":
-                if not self.container:
-                    raise ValueError("Empty Container")
-                setattr(clone, name, self.container.clone)
-            else:
-                value = deepcopy(getattr(self, name))
-                setattr(clone, name, value)
-        return clone
-
-    def save(
-        self,
-        target: str | Path | io.BytesIO | None = None,
-        packaging: str = "zip",
-        pretty: bool = False,
-        backup: bool = False,
-    ) -> None:
-        """Save the document, at the same place it was opened or at the given
-        target path. Target can also be a file-like object. It can be saved
-        as a Zip file (default) or as files in a folder (for debugging
-        purpose). XML parts can be pretty printed.
-
-        Arguments:
-
-            target -- str or file-like object
-
-            packaging -- 'zip' or 'folder'
-
-            pretty -- bool
-
-            backup -- bool
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        # Some advertising
-        self.meta.set_generator_default()
-        # Synchronize data with container
-        container = self.container
-        for path, part in self.__xmlparts.items():
-            if part is not None:
-                container.set_part(path, part.serialize(pretty))
-        # Save the container
-        container.save(target, packaging=packaging, backup=backup)
-
-    @property
-    def content(self) -> Content:
-        content: Content | None = self.get_part(ODF_CONTENT)  # type:ignore
-        if content is None:
-            raise ValueError("Empty Content")
-        return content
-
-    @property
-    def styles(self) -> Styles:
-        styles: Styles | None = self.get_part(ODF_STYLES)  # type:ignore
-        if styles is None:
-            raise ValueError("Empty Styles")
-        return styles
-
-    # Styles over several parts
-
-    def get_styles(
-        self,
-        family: str | bytes = "",
-        automatic: bool = False,
-    ) -> list[Style | Element]:
-        # compatibility with old versions:
-
-        if isinstance(family, bytes):
-            family = bytes_to_str(family)
-        return self.content.get_styles(family=family) + self.styles.get_styles(
-            family=family, automatic=automatic
-        )
-
-    def get_style(
-        self,
-        family: str,
-        name_or_element: str | Style | None = None,
-        display_name: str | None = None,
-    ) -> Style | None:
-        """Return the style uniquely identified by the name/family pair. If
-        the argument is already a style object, it will return it.
-
-        If the name is None, the default style is fetched.
-
-        If the name is not the internal name but the name you gave in a
-        desktop application, use display_name instead.
-
-        Arguments:
-
-            family -- 'paragraph', 'text',  'graphic', 'table', 'list',
-                      'number', 'page-layout', 'master-page'
-
-            name -- str or Element or None
-
-            display_name -- str
-
-        Return: Style or None if not found.
-        """
-        # 1. content.xml
-        element = self.content.get_style(
-            family, name_or_element=name_or_element, display_name=display_name
-        )
-        if element is not None:
-            return element
-        # 2. styles.xml
-        return self.styles.get_style(
-            family,
-            name_or_element=name_or_element,
-            display_name=display_name,
-        )
-
-    @staticmethod
-    def _pseudo_style_attribute(style_element: Style | Element, attribute: str) -> Any:
-        if hasattr(style_element, attribute):
-            return getattr(style_element, attribute)
-        return ""
-
-    def _set_automatic_name(self, style: Style, family: str) -> None:
-        """Generate a name for the new automatic style."""
-        if not hasattr(style, "name"):
-            # do nothing
-            return
-        styles = self.get_styles(family=family, automatic=True)
-        max_index = 0
-        for existing_style in styles:
-            if not hasattr(existing_style, "name"):
-                continue
-            if not existing_style.name.startswith(AUTOMATIC_PREFIX):
-                continue
-            try:
-                index = int(existing_style.name[len(AUTOMATIC_PREFIX) :])
-            except ValueError:
-                continue
-            max_index = max(max_index, index)
-
-        style.name = f"{AUTOMATIC_PREFIX}{max_index+1}"
-
-    def _insert_style_get_common_styles(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.styles.get_element("office:styles")
-        existing = self.styles.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_automatic_styles(
-        self,
-        style: Style,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.content.get_element("office:automatic-styles")
-        # A name ?
-        if name:
-            if hasattr(style, "name"):
-                style.name = name
-            existing = self.content.get_style(family, name)
-        else:
-            self._set_automatic_name(style, family)
-            existing = None
-        return existing, style_container
-
-    def _insert_style_get_default_styles(
-        self,
-        style: Style,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.styles.get_element("office:styles")
-        style.tag = "style:default-style"
-        if name:
-            style.del_attribute("style:name")
-        existing = self.styles.get_style(family)
-        return existing, style_container
-
-    def _insert_style_get_master_page(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.styles.get_element("office:master-styles")
-        existing = self.styles.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_font_face_default(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.styles.get_element("office:font-face-decls")
-        existing = self.styles.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_font_face(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.content.get_element("office:font-face-decls")
-        existing = self.content.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_page_layout(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        # force to automatic
-        style_container = self.styles.get_element("office:automatic-styles")
-        existing = self.styles.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_draw_fill_image(
-        self,
-        name: str,
-    ) -> tuple[Any, Any]:
-        # special case for 'draw:fill-image' pseudo style
-        # not family and style_element.__class__.__name__ == "DrawFillImage"
-        style_container = self.styles.get_element("office:styles")
-        existing = self.styles.get_style("", name)
-        return existing, style_container
-
-    def _insert_style_standard(
-        self,
-        style: Style,
-        name: str,
-        family: str,
-        automatic: bool,
-        default: bool,
-    ) -> tuple[Any, Any]:
-        # Common style
-        if name and automatic is False and default is False:
-            return self._insert_style_get_common_styles(family, name)
-        # Automatic style
-        elif automatic is True and default is False:
-            return self._insert_style_get_automatic_styles(style, family, name)
-        # Default style
-        elif automatic is False and default is True:
-            return self._insert_style_get_default_styles(style, family, name)
-        else:
-            raise AttributeError("Invalid combination of arguments")
-
-    def insert_style(  # noqa: C901
-        self,
-        style: Style | str,
-        name: str = "",
-        automatic: bool = False,
-        default: bool = False,
-    ) -> Any:
-        """Insert the given style object in the document, as required by the
-        style family and type.
-
-        The style is expected to be a common style with a name. In case it
-        was created with no name, the given can be set on the fly.
-
-        If automatic is True, the style will be inserted as an automatic
-        style.
-
-        If default is True, the style will be inserted as a default style and
-        would replace any existing default style of the same family. Any name
-        or display name would be ignored.
-
-        Automatic and default arguments are mutually exclusive.
-
-        All styles can't be used as default styles. Default styles are
-        allowed for the following families: paragraph, text, section, table,
-        table-column, table-row, table-cell, table-page, chart, drawing-page,
-        graphic, presentation, control and ruby.
-
-        Arguments:
-
-            style -- Style or str
-
-            name -- str
-
-            automatic -- bool
-
-            default -- bool
-
-        Return : style name -- str
-        """
-
-        # if style is a str, assume it is the Style definition
-        if isinstance(style, str):
-            style_element: Style = Element.from_tag(style)  # type: ignore
-        else:
-            style_element = style
-        if not isinstance(style_element, Element):
-            raise TypeError(f"Unknown Style type: '{style!r}'")
-
-        # Get family and name
-        family = self._pseudo_style_attribute(style_element, "family")
-        if not name:
-            name = self._pseudo_style_attribute(style_element, "name")
-
-        # Master page style
-        if family == "master-page":
-            existing, style_container = self._insert_style_get_master_page(family, name)
-        # Font face declarations
-        elif family == "font-face":
-            if default:
-                existing, style_container = self._insert_style_get_font_face_default(
-                    family, name
-                )
-            else:
-                existing, style_container = self._insert_style_get_font_face(
-                    family, name
-                )
-        # page layout style
-        elif family == "page-layout":
-            existing, style_container = self._insert_style_get_page_layout(family, name)
-        # Common style
-        elif family in FAMILY_ODF_STD or family in {"number"}:
-            existing, style_container = self._insert_style_standard(
-                style_element, name, family, automatic, default
-            )
-        elif not family and style_element.__class__.__name__ == "DrawFillImage":
-            # special case for 'draw:fill-image' pseudo style
-            existing, style_container = self._insert_style_get_draw_fill_image(name)
-        # Invalid style
-        else:
-            raise ValueError(
-                "Invalid style: "
-                f"{style_element}, tag:{style_element.tag}, family:{family}"
-            )
-
-        # Insert it!
-        if existing is not None:
-            style_container.delete(existing)
-        style_container.append(style_element)
-        return self._pseudo_style_attribute(style_element, "name")
-
-    def get_styled_elements(self, name: str = "") -> list[Element]:
-        """Brute-force to find paragraphs, tables, etc. using the given style
-        name (or all by default).
-
-        Arguments:
-
-            name -- str
-
-        Return: list
-        """
-        # Header, footer, etc. have styles too
-        return self.content.root.get_styled_elements(
-            name
-        ) + self.styles.root.get_styled_elements(name)
-
-    def show_styles(
-        self,
-        automatic: bool = True,
-        common: bool = True,
-        properties: bool = False,
-    ) -> str:
-        infos = []
-        for style in self.get_styles():
-            try:
-                name = style.name  # type: ignore
-            except AttributeError:
-                print("--------------")
-                print(style.__class__)
-                print(style.serialize())
-                raise
-            if style.__class__.__name__ == "DrawFillImage":
-                family = ""
-            else:
-                family = str(style.family)  # type: ignore
-            parent = style.parent
-            is_auto = parent and parent.tag == "office:automatic-styles"
-            if is_auto and automatic is False or not is_auto and common is False:
-                continue
-            is_used = bool(self.get_styled_elements(name))
-            infos.append(
-                {
-                    "type": "auto  " if is_auto else "common",
-                    "used": "y" if is_used else "n",
-                    "family": family,
-                    "parent": self._pseudo_style_attribute(style, "parent_style") or "",
-                    "name": name or "",
-                    "display_name": self._pseudo_style_attribute(style, "display_name")
-                    or "",
-                    "properties": style.get_properties() if properties else None,  # type: ignore
-                }
-            )
-        if not infos:
-            return ""
-        # Sort by family and name
-        infos.sort(key=itemgetter("family", "name"))
-        # Show common and used first
-        infos.sort(key=itemgetter("type", "used"), reverse=True)
-        max_family = str(max([len(x["family"]) for x in infos]))  # type: ignore
-        max_parent = str(max([len(x["parent"]) for x in infos]))  # type: ignore
-        formater = (
-            "%(type)s used:%(used)s family:%(family)-0"
-            + max_family
-            + "s parent:%(parent)-0"
-            + max_parent
-            + "s name:%(name)s"
-        )
-        output = []
-        for info in infos:
-            line = formater % info
-            if info["display_name"]:
-                line += " display_name:" + info["display_name"]  # type: ignore
-            output.append(line)
-            if info["properties"]:
-                for name, value in info["properties"].items():  # type: ignore
-                    output.append(f"   - {name}: {value}")
-        output.append("")
-        return "\n".join(output)
-
-    def delete_styles(self) -> int:
-        """Remove all style information from content and all styles.
-
-        Return: number of deleted styles
-        """
-        # First remove references to styles
-        for element in self.get_styled_elements():
-            for attribute in (
-                "text:style-name",
-                "draw:style-name",
-                "draw:text-style-name",
-                "table:style-name",
-                "style:page-layout-name",
-            ):
-                try:
-                    element.del_attribute(attribute)
-                except KeyError:
-                    continue
-        # Then remove supposedly orphaned styles
-        deleted = 0
-        for style in self.get_styles():
-            if style.name is None:  # type: ignore
-                # Don't delete default styles
-                continue
-            # elif type(style) is odf_master_page:
-            #    # Don't suppress header and footer, just styling was removed
-            #    continue
-            style.delete()
-            deleted += 1
-        return deleted
-
-    def merge_styles_from(self, document: Document) -> None:
-        """Copy all the styles of a document into ourself.
-
-        Styles with the same type and name will be replaced, so only unique
-        styles will be preserved.
-        """
-        manifest = self.manifest
-        document_manifest = document.manifest
-        for style in document.get_styles():
-            tagname = style.tag
-            family = self._pseudo_style_attribute(style, "family")
-            stylename = style.name  # type: ignore
-            container = style.parent
-            container_name = container.tag  # type: ignore
-            partname = container.parent.tag  # type: ignore
-            # The destination part
-            if partname == "office:document-styles":
-                part: Content | Styles = self.styles
-            elif partname == "office:document-content":
-                part = self.content
-            else:
-                raise NotImplementedError(partname)
-            # Implemented containers
-            if container_name not in {
-                "office:styles",
-                "office:automatic-styles",
-                "office:master-styles",
-                "office:font-face-decls",
-            }:
-                raise NotImplementedError(container_name)
-            dest = part.get_element(f"//{container_name}")
-            # Implemented style types
-            # if tagname not in registered_styles:
-            #    raise NotImplementedError(tagname)
-            duplicate = part.get_style(family, stylename)
-            if duplicate is not None:
-                duplicate.delete()
-            dest.append(style)
-            # Copy images from the header/footer
-            if tagname == "style:master-page":
-                query = "descendant::draw:image"
-                for image in style.get_elements(query):
-                    url = image.url  # type: ignore
-                    part_url = document.get_part(url)
-                    # Manually add the part to keep the name
-                    self.set_part(url, part_url)  # type: ignore
-                    media_type = document_manifest.get_media_type(url)
-                    manifest.add_full_path(url, media_type)  # type: ignore
-            # Copy images from the fill-image
-            elif tagname == "draw:fill-image":
-                url = style.url  # type: ignore
-                part_url = document.get_part(url)
-                self.set_part(url, part_url)  # type: ignore
-                media_type = document_manifest.get_media_type(url)
-                manifest.add_full_path(url, media_type)  # type: ignore
-
-    def add_page_break_style(self) -> None:
-        """Ensure that the document contains the style required for a manual page break.
-
-        Then a manual page break can be added to the document with:
-            from paragraph import PageBreak
-            ...
-            document.body.append(PageBreak())
-
-        Note: this style uses the property 'fo:break-after', another
-        possibility could be the property 'fo:break-before'
-        """
-        if existing := self.get_style(  # noqa: SIM102
-            family="paragraph",
-            name_or_element="odfdopagebreak",
-        ):
-            if properties := existing.get_properties():  # noqa: SIM102
-                if properties["fo:break-after"] == "page":
-                    return
-        style = (
-            '<style:style style:family="paragraph" style:parent-style-name="Standard" '
-            'style:name="odfdopagebreak">'
-            '<style:paragraph-properties fo:break-after="page"/></style:style>'
-        )
-        self.insert_style(style, automatic=False)
-
-

Static methods

-
-
-def new(template: str | Path | io.BytesIO = 'text') ‑> Document -
-
-

Create a Document from a template.

-

The template argument is expected to be the path to a ODF template.

-

Arguments

-

template – str or Path or file-like (io.BytesIO)

-

Return : ODF document – Document

-
- -Expand source code - -
@classmethod
-def new(cls, template: str | Path | io.BytesIO = "text") -> Document:
-    """Create a Document from a template.
-
-    The template argument is expected to be the path to a ODF template.
-
-    Arguments:
-
-        template -- str or Path or file-like (io.BytesIO)
-
-    Return : ODF document -- Document
-    """
-    container = container_from_template(template)
-    return cls(container)
-
-
-
-

Instance variables

-
-
var bodyElement
-
-

Return the body element of the content part, where actual content -is stored.

-
- -Expand source code - -
@property
-def body(self) -> Element:
-    """Return the body element of the content part, where actual content
-    is stored.
-    """
-    if self.__body is None:
-        self.__body = self.content.body
-    return self.__body
-
-
-
var cloneDocument
-
-

Return an exact copy of the document.

-

Return: Document

-
- -Expand source code - -
@property
-def clone(self) -> Document:
-    """Return an exact copy of the document.
-
-    Return: Document
-    """
-    clone = object.__new__(self.__class__)
-    for name in self.__dict__:
-        if name == "_Document__body":
-            setattr(clone, name, None)
-        elif name == "_Document__xmlparts":
-            setattr(clone, name, {})
-        elif name == "container":
-            if not self.container:
-                raise ValueError("Empty Container")
-            setattr(clone, name, self.container.clone)
-        else:
-            value = deepcopy(getattr(self, name))
-            setattr(clone, name, value)
-    return clone
-
-
-
var contentContent
-
-
-
- -Expand source code - -
@property
-def content(self) -> Content:
-    content: Content | None = self.get_part(ODF_CONTENT)  # type:ignore
-    if content is None:
-        raise ValueError("Empty Content")
-    return content
-
-
-
var manifestManifest
-
-

Return the manifest part (manifest.xml) of the document.

-
- -Expand source code - -
@property
-def manifest(self) -> Manifest:
-    """Return the manifest part (manifest.xml) of the document."""
-    manifest = self.get_part(ODF_MANIFEST)
-    if manifest is None or not isinstance(manifest, Manifest):
-        raise ValueError("Empty Manifest")
-    return manifest
-
-
-
var metaMeta
-
-

Return the meta part (meta.xml) of the document, where meta data -are stored.

-
- -Expand source code - -
@property
-def meta(self) -> Meta:
-    """Return the meta part (meta.xml) of the document, where meta data
-    are stored."""
-    metadata = self.get_part(ODF_META)
-    if metadata is None or not isinstance(metadata, Meta):
-        raise ValueError("Empty Meta")
-    return metadata
-
-
-
var mimetype : str
-
-
-
- -Expand source code - -
@property
-def mimetype(self) -> str:
-    if not self.container:
-        raise ValueError("Empty Container")
-    return self.container.mimetype
-
-
-
var path : pathlib.Path | None
-
-

Shortcut to Document.Container.path.

-
- -Expand source code - -
@property
-def path(self) -> Path | None:
-    """Shortcut to Document.Container.path."""
-    if not self.container:
-        return None
-    return self.container.path
-
-
-
var stylesStyles
-
-
-
- -Expand source code - -
@property
-def styles(self) -> Styles:
-    styles: Styles | None = self.get_part(ODF_STYLES)  # type:ignore
-    if styles is None:
-        raise ValueError("Empty Styles")
-    return styles
-
-
-
-

Methods

-
-
-def add_file(self, path_or_file: str | Path) ‑> str -
-
-

Insert a file from a path or a file-like object in the container.

-

Return the full path to reference in the content.

-

Arguments

-

path_or_file – str or Path or file-like

-

Return: str (URI)

-
- -Expand source code - -
def add_file(self, path_or_file: str | Path) -> str:
-    """Insert a file from a path or a file-like object in the container.
-
-    Return the full path to reference in the content.
-
-    Arguments:
-
-        path_or_file -- str or Path or file-like
-
-    Return: str (URI)
-    """
-    if not self.container:
-        raise ValueError("Empty Container")
-    name = ""
-    # Folder for added files (FIXME hard-coded and copied)
-    manifest = self.manifest
-    medias = manifest.get_paths()
-    # uuid = str(uuid4())
-
-    if isinstance(path_or_file, (str, Path)):
-        path = Path(path_or_file)
-        extension = path.suffix.lower()
-        name = f"{path.stem}{extension}"
-        if posixpath.join("Pictures", name) in medias:
-            name = f"{path.stem}_{uuid4()}{extension}"
-    else:
-        path = None
-        name = getattr(path_or_file, "name", None)
-        if not name:
-            name = str(uuid4())
-    media_type, _encoding = guess_type(name)
-    if not media_type:
-        media_type = "application/octet-stream"
-    if manifest.get_media_type("Pictures/") is None:
-        manifest.add_full_path("Pictures/")
-    full_path = posixpath.join("Pictures", name)
-    if path is None:
-        self.container.set_part(full_path, path_or_file.read())
-    else:
-        self.container.set_part(full_path, path.read_bytes())
-    manifest.add_full_path(full_path, media_type)
-    return full_path
-
-
-
-def add_page_break_style(self) ‑> None -
-
-

Ensure that the document contains the style required for a manual page break.

-

Then a manual page break can be added to the document with: -from paragraph import PageBreak -… -document.body.append(PageBreak())

-

Note: this style uses the property 'fo:break-after', another -possibility could be the property 'fo:break-before'

-
- -Expand source code - -
def add_page_break_style(self) -> None:
-    """Ensure that the document contains the style required for a manual page break.
-
-    Then a manual page break can be added to the document with:
-        from paragraph import PageBreak
-        ...
-        document.body.append(PageBreak())
-
-    Note: this style uses the property 'fo:break-after', another
-    possibility could be the property 'fo:break-before'
-    """
-    if existing := self.get_style(  # noqa: SIM102
-        family="paragraph",
-        name_or_element="odfdopagebreak",
-    ):
-        if properties := existing.get_properties():  # noqa: SIM102
-            if properties["fo:break-after"] == "page":
-                return
-    style = (
-        '<style:style style:family="paragraph" style:parent-style-name="Standard" '
-        'style:name="odfdopagebreak">'
-        '<style:paragraph-properties fo:break-after="page"/></style:style>'
-    )
-    self.insert_style(style, automatic=False)
-
-
-
-def del_part(self, path: str) ‑> None -
-
-

Mark a part for deletion. The path is relative to the archive, -e.g. "Pictures/1003200258912EB1C3.jpg"

-
- -Expand source code - -
def del_part(self, path: str) -> None:
-    """Mark a part for deletion. The path is relative to the archive,
-    e.g. "Pictures/1003200258912EB1C3.jpg"
-    """
-    if not self.container:
-        raise ValueError("Empty Container")
-    path = _get_part_path(path)
-    cls = _get_part_class(path)
-    if path == ODF_MANIFEST or cls is not None:
-        raise ValueError(f"part '{path}' is mandatory")
-    self.container.del_part(path)
-
-
-
-def delete_styles(self) ‑> int -
-
-

Remove all style information from content and all styles.

-

Return: number of deleted styles

-
- -Expand source code - -
def delete_styles(self) -> int:
-    """Remove all style information from content and all styles.
-
-    Return: number of deleted styles
-    """
-    # First remove references to styles
-    for element in self.get_styled_elements():
-        for attribute in (
-            "text:style-name",
-            "draw:style-name",
-            "draw:text-style-name",
-            "table:style-name",
-            "style:page-layout-name",
-        ):
-            try:
-                element.del_attribute(attribute)
-            except KeyError:
-                continue
-    # Then remove supposedly orphaned styles
-    deleted = 0
-    for style in self.get_styles():
-        if style.name is None:  # type: ignore
-            # Don't delete default styles
-            continue
-        # elif type(style) is odf_master_page:
-        #    # Don't suppress header and footer, just styling was removed
-        #    continue
-        style.delete()
-        deleted += 1
-    return deleted
-
-
-
-def get_formated_meta(self) ‑> str -
-
-

Return meta informations as text, with some formatting.

-
- -Expand source code - -
def get_formated_meta(self) -> str:
-    """Return meta informations as text, with some formatting."""
-    result: list[str] = []
-
-    # Simple values
-    def print_info(name: str, value: Any) -> None:
-        if value:
-            result.append(f"{name}: {value}")
-
-    meta = self.meta
-    print_info("Title", meta.get_title())
-    print_info("Subject", meta.get_subject())
-    print_info("Language", meta.get_language())
-    print_info("Modification date", meta.get_modification_date())
-    print_info("Creation date", meta.get_creation_date())
-    print_info("Initial creator", meta.get_initial_creator())
-    print_info("Keyword", meta.get_keywords())
-    print_info("Editing duration", meta.get_editing_duration())
-    print_info("Editing cycles", meta.get_editing_cycles())
-    print_info("Generator", meta.get_generator())
-
-    # Statistic
-    result.append("Statistic:")
-    statistic = meta.get_statistic()
-    if statistic:
-        for name, data in statistic.items():
-            result.append(f"  - {name[5:].replace('-', ' ').capitalize()}: {data}")
-
-    # User defined metadata
-    result.append("User defined metadata:")
-    user_metadata = meta.get_user_defined_metadata()
-    for name, data2 in user_metadata.items():
-        result.append(f"  - {name}: {data2}")
-
-    # And the description
-    print_info("Description", meta.get_description())
-
-    return "\n".join(result) + "\n"
-
-
-
-def get_formatted_text(self, rst_mode: bool = False) ‑> str -
-
-

Return content as text, with some formatting.

-
- -Expand source code - -
def get_formatted_text(self, rst_mode: bool = False) -> str:
-    """Return content as text, with some formatting."""
-    # For the moment, only "type='text'"
-    doc_type = self.get_type()
-    if doc_type == "spreadsheet":
-        return self._tables_csv()
-    if doc_type in {
-        "text",
-        "text-template",
-        "presentation",
-        "presentation-template",
-    }:
-        return self._formatted_text(rst_mode)
-    raise NotImplementedError(f"Type of document '{doc_type}' not supported yet")
-
-
-
-def get_part(self, path: str) ‑> XmlPart | str | bytes | None -
-
-

Return the bytes of the given part. The path is relative to the -archive, e.g. "Pictures/1003200258912EB1C3.jpg".

-

'content', 'meta', 'settings', 'styles' and 'manifest' are shortcuts -to the real path, e.g. content.xml, and return a dedicated object with -its own API.

-

path formated as URI, so always use '/' separator

-
- -Expand source code - -
def get_part(self, path: str) -> XmlPart | str | bytes | None:
-    """Return the bytes of the given part. The path is relative to the
-    archive, e.g. "Pictures/1003200258912EB1C3.jpg".
-
-    'content', 'meta', 'settings', 'styles' and 'manifest' are shortcuts
-    to the real path, e.g. content.xml, and return a dedicated object with
-    its own API.
-
-    path formated as URI, so always use '/' separator
-    """
-    if not self.container:
-        raise ValueError("Empty Container")
-    # "./ObjectReplacements/Object 1"
-    path = path.lstrip("./")
-    path = _get_part_path(path)
-    cls = _get_part_class(path)
-    # Raw bytes
-    if cls is None:
-        return self.container.get_part(path)
-    # XML part
-    part = self.__xmlparts.get(path)
-    if part is None:
-        self.__xmlparts[path] = part = cls(path, self.container)
-    return part
-
-
-
-def get_parts(self) ‑> list[str] -
-
-

Return available part names with path inside the archive, e.g. -['content.xml', …, 'Pictures/100000000000032000000258912EB1C3.jpg']

-
- -Expand source code - -
def get_parts(self) -> list[str]:
-    """Return available part names with path inside the archive, e.g.
-    ['content.xml', ..., 'Pictures/100000000000032000000258912EB1C3.jpg']
-    """
-    if not self.container:
-        raise ValueError("Empty Container")
-    return self.container.get_parts()
-
-
-
-def get_style(self, family: str, name_or_element: str | Style | None = None, display_name: str | None = None) ‑> Style | None -
-
-

Return the style uniquely identified by the name/family pair. If -the argument is already a style object, it will return it.

-

If the name is None, the default style is fetched.

-

If the name is not the internal name but the name you gave in a -desktop application, use display_name instead.

-

Arguments

-

family – 'paragraph', 'text', -'graphic', 'table', 'list', -'number', 'page-layout', 'master-page'

-

name – str or Element or None

-

display_name – str

-

Return: Style or None if not found.

-
- -Expand source code - -
def get_style(
-    self,
-    family: str,
-    name_or_element: str | Style | None = None,
-    display_name: str | None = None,
-) -> Style | None:
-    """Return the style uniquely identified by the name/family pair. If
-    the argument is already a style object, it will return it.
-
-    If the name is None, the default style is fetched.
-
-    If the name is not the internal name but the name you gave in a
-    desktop application, use display_name instead.
-
-    Arguments:
-
-        family -- 'paragraph', 'text',  'graphic', 'table', 'list',
-                  'number', 'page-layout', 'master-page'
-
-        name -- str or Element or None
-
-        display_name -- str
-
-    Return: Style or None if not found.
-    """
-    # 1. content.xml
-    element = self.content.get_style(
-        family, name_or_element=name_or_element, display_name=display_name
-    )
-    if element is not None:
-        return element
-    # 2. styles.xml
-    return self.styles.get_style(
-        family,
-        name_or_element=name_or_element,
-        display_name=display_name,
-    )
-
-
-
-def get_styled_elements(self, name: str = '') ‑> list[Element] -
-
-

Brute-force to find paragraphs, tables, etc. using the given style -name (or all by default).

-

Arguments

-

name – str

-

Return: list

-
- -Expand source code - -
def get_styled_elements(self, name: str = "") -> list[Element]:
-    """Brute-force to find paragraphs, tables, etc. using the given style
-    name (or all by default).
-
-    Arguments:
-
-        name -- str
-
-    Return: list
-    """
-    # Header, footer, etc. have styles too
-    return self.content.root.get_styled_elements(
-        name
-    ) + self.styles.root.get_styled_elements(name)
-
-
-
-def get_styles(self, family: str | bytes = '', automatic: bool = False) ‑> list[Style | Element] -
-
-
-
- -Expand source code - -
def get_styles(
-    self,
-    family: str | bytes = "",
-    automatic: bool = False,
-) -> list[Style | Element]:
-    # compatibility with old versions:
-
-    if isinstance(family, bytes):
-        family = bytes_to_str(family)
-    return self.content.get_styles(family=family) + self.styles.get_styles(
-        family=family, automatic=automatic
-    )
-
-
-
-def get_type(self) ‑> str -
-
-

Get the ODF type (also called class) of this document.

-

Return: 'chart', 'database', 'formula', 'graphics', -'graphics-template', 'image', 'presentation', -'presentation-template', 'spreadsheet', 'spreadsheet-template', -'text', 'text-master', 'text-template' or 'text-web'

-
- -Expand source code - -
def get_type(self) -> str:
-    """Get the ODF type (also called class) of this document.
-
-    Return: 'chart', 'database', 'formula', 'graphics',
-        'graphics-template', 'image', 'presentation',
-        'presentation-template', 'spreadsheet', 'spreadsheet-template',
-        'text', 'text-master', 'text-template' or 'text-web'
-    """
-    # The mimetype must be with the form:
-    # application/vnd.oasis.opendocument.text
-
-    # Isolate and return the last part
-    return self.mimetype.rsplit(".", 1)[-1]
-
-
-
-def insert_style(self, style: Style | str, name: str = '', automatic: bool = False, default: bool = False) ‑> Any -
-
-

Insert the given style object in the document, as required by the -style family and type.

-

The style is expected to be a common style with a name. In case it -was created with no name, the given can be set on the fly.

-

If automatic is True, the style will be inserted as an automatic -style.

-

If default is True, the style will be inserted as a default style and -would replace any existing default style of the same family. Any name -or display name would be ignored.

-

Automatic and default arguments are mutually exclusive.

-

All styles can't be used as default styles. Default styles are -allowed for the following families: paragraph, text, section, table, -table-column, table-row, table-cell, table-page, chart, drawing-page, -graphic, presentation, control and ruby.

-

Arguments

-

style – Style or str

-

name – str

-

automatic – bool

-

default – bool

-

Return : style name – str

-
- -Expand source code - -
def insert_style(  # noqa: C901
-    self,
-    style: Style | str,
-    name: str = "",
-    automatic: bool = False,
-    default: bool = False,
-) -> Any:
-    """Insert the given style object in the document, as required by the
-    style family and type.
-
-    The style is expected to be a common style with a name. In case it
-    was created with no name, the given can be set on the fly.
-
-    If automatic is True, the style will be inserted as an automatic
-    style.
-
-    If default is True, the style will be inserted as a default style and
-    would replace any existing default style of the same family. Any name
-    or display name would be ignored.
-
-    Automatic and default arguments are mutually exclusive.
-
-    All styles can't be used as default styles. Default styles are
-    allowed for the following families: paragraph, text, section, table,
-    table-column, table-row, table-cell, table-page, chart, drawing-page,
-    graphic, presentation, control and ruby.
-
-    Arguments:
-
-        style -- Style or str
-
-        name -- str
-
-        automatic -- bool
-
-        default -- bool
-
-    Return : style name -- str
-    """
-
-    # if style is a str, assume it is the Style definition
-    if isinstance(style, str):
-        style_element: Style = Element.from_tag(style)  # type: ignore
-    else:
-        style_element = style
-    if not isinstance(style_element, Element):
-        raise TypeError(f"Unknown Style type: '{style!r}'")
-
-    # Get family and name
-    family = self._pseudo_style_attribute(style_element, "family")
-    if not name:
-        name = self._pseudo_style_attribute(style_element, "name")
-
-    # Master page style
-    if family == "master-page":
-        existing, style_container = self._insert_style_get_master_page(family, name)
-    # Font face declarations
-    elif family == "font-face":
-        if default:
-            existing, style_container = self._insert_style_get_font_face_default(
-                family, name
-            )
-        else:
-            existing, style_container = self._insert_style_get_font_face(
-                family, name
-            )
-    # page layout style
-    elif family == "page-layout":
-        existing, style_container = self._insert_style_get_page_layout(family, name)
-    # Common style
-    elif family in FAMILY_ODF_STD or family in {"number"}:
-        existing, style_container = self._insert_style_standard(
-            style_element, name, family, automatic, default
-        )
-    elif not family and style_element.__class__.__name__ == "DrawFillImage":
-        # special case for 'draw:fill-image' pseudo style
-        existing, style_container = self._insert_style_get_draw_fill_image(name)
-    # Invalid style
-    else:
-        raise ValueError(
-            "Invalid style: "
-            f"{style_element}, tag:{style_element.tag}, family:{family}"
-        )
-
-    # Insert it!
-    if existing is not None:
-        style_container.delete(existing)
-    style_container.append(style_element)
-    return self._pseudo_style_attribute(style_element, "name")
-
-
-
-def merge_styles_from(self, document: Document) ‑> None -
-
-

Copy all the styles of a document into ourself.

-

Styles with the same type and name will be replaced, so only unique -styles will be preserved.

-
- -Expand source code - -
def merge_styles_from(self, document: Document) -> None:
-    """Copy all the styles of a document into ourself.
-
-    Styles with the same type and name will be replaced, so only unique
-    styles will be preserved.
-    """
-    manifest = self.manifest
-    document_manifest = document.manifest
-    for style in document.get_styles():
-        tagname = style.tag
-        family = self._pseudo_style_attribute(style, "family")
-        stylename = style.name  # type: ignore
-        container = style.parent
-        container_name = container.tag  # type: ignore
-        partname = container.parent.tag  # type: ignore
-        # The destination part
-        if partname == "office:document-styles":
-            part: Content | Styles = self.styles
-        elif partname == "office:document-content":
-            part = self.content
-        else:
-            raise NotImplementedError(partname)
-        # Implemented containers
-        if container_name not in {
-            "office:styles",
-            "office:automatic-styles",
-            "office:master-styles",
-            "office:font-face-decls",
-        }:
-            raise NotImplementedError(container_name)
-        dest = part.get_element(f"//{container_name}")
-        # Implemented style types
-        # if tagname not in registered_styles:
-        #    raise NotImplementedError(tagname)
-        duplicate = part.get_style(family, stylename)
-        if duplicate is not None:
-            duplicate.delete()
-        dest.append(style)
-        # Copy images from the header/footer
-        if tagname == "style:master-page":
-            query = "descendant::draw:image"
-            for image in style.get_elements(query):
-                url = image.url  # type: ignore
-                part_url = document.get_part(url)
-                # Manually add the part to keep the name
-                self.set_part(url, part_url)  # type: ignore
-                media_type = document_manifest.get_media_type(url)
-                manifest.add_full_path(url, media_type)  # type: ignore
-        # Copy images from the fill-image
-        elif tagname == "draw:fill-image":
-            url = style.url  # type: ignore
-            part_url = document.get_part(url)
-            self.set_part(url, part_url)  # type: ignore
-            media_type = document_manifest.get_media_type(url)
-            manifest.add_full_path(url, media_type)  # type: ignore
-
-
-
-def save(self, target: str | Path | io.BytesIO | None = None, packaging: str = 'zip', pretty: bool = False, backup: bool = False) ‑> None -
-
-

Save the document, at the same place it was opened or at the given -target path. Target can also be a file-like object. It can be saved -as a Zip file (default) or as files in a folder (for debugging -purpose). XML parts can be pretty printed.

-

Arguments

-

target – str or file-like object

-

packaging – 'zip' or 'folder'

-

pretty – bool

-

backup – bool

-
- -Expand source code - -
def save(
-    self,
-    target: str | Path | io.BytesIO | None = None,
-    packaging: str = "zip",
-    pretty: bool = False,
-    backup: bool = False,
-) -> None:
-    """Save the document, at the same place it was opened or at the given
-    target path. Target can also be a file-like object. It can be saved
-    as a Zip file (default) or as files in a folder (for debugging
-    purpose). XML parts can be pretty printed.
-
-    Arguments:
-
-        target -- str or file-like object
-
-        packaging -- 'zip' or 'folder'
-
-        pretty -- bool
-
-        backup -- bool
-    """
-    if not self.container:
-        raise ValueError("Empty Container")
-    # Some advertising
-    self.meta.set_generator_default()
-    # Synchronize data with container
-    container = self.container
-    for path, part in self.__xmlparts.items():
-        if part is not None:
-            container.set_part(path, part.serialize(pretty))
-    # Save the container
-    container.save(target, packaging=packaging, backup=backup)
-
-
-
-def set_part(self, path: str, data: bytes) ‑> None -
-
-

Set the bytes of the given part. The path is relative to the -archive, e.g. "Pictures/1003200258912EB1C3.jpg".

-

path formated as URI, so always use '/' separator

-
- -Expand source code - -
def set_part(self, path: str, data: bytes) -> None:
-    """Set the bytes of the given part. The path is relative to the
-    archive, e.g. "Pictures/1003200258912EB1C3.jpg".
-
-    path formated as URI, so always use '/' separator
-    """
-    if not self.container:
-        raise ValueError("Empty Container")
-    # "./ObjectReplacements/Object 1"
-    path = path.lstrip("./")
-    path = _get_part_path(path)
-    cls = _get_part_class(path)
-    # XML part overwritten
-    if cls is not None:
-        with suppress(KeyError):
-            self.__xmlparts[path]
-    self.container.set_part(path, data)
-
-
-
-def show_styles(self, automatic: bool = True, common: bool = True, properties: bool = False) ‑> str -
-
-
-
- -Expand source code - -
def show_styles(
-    self,
-    automatic: bool = True,
-    common: bool = True,
-    properties: bool = False,
-) -> str:
-    infos = []
-    for style in self.get_styles():
-        try:
-            name = style.name  # type: ignore
-        except AttributeError:
-            print("--------------")
-            print(style.__class__)
-            print(style.serialize())
-            raise
-        if style.__class__.__name__ == "DrawFillImage":
-            family = ""
-        else:
-            family = str(style.family)  # type: ignore
-        parent = style.parent
-        is_auto = parent and parent.tag == "office:automatic-styles"
-        if is_auto and automatic is False or not is_auto and common is False:
-            continue
-        is_used = bool(self.get_styled_elements(name))
-        infos.append(
-            {
-                "type": "auto  " if is_auto else "common",
-                "used": "y" if is_used else "n",
-                "family": family,
-                "parent": self._pseudo_style_attribute(style, "parent_style") or "",
-                "name": name or "",
-                "display_name": self._pseudo_style_attribute(style, "display_name")
-                or "",
-                "properties": style.get_properties() if properties else None,  # type: ignore
-            }
-        )
-    if not infos:
-        return ""
-    # Sort by family and name
-    infos.sort(key=itemgetter("family", "name"))
-    # Show common and used first
-    infos.sort(key=itemgetter("type", "used"), reverse=True)
-    max_family = str(max([len(x["family"]) for x in infos]))  # type: ignore
-    max_parent = str(max([len(x["parent"]) for x in infos]))  # type: ignore
-    formater = (
-        "%(type)s used:%(used)s family:%(family)-0"
-        + max_family
-        + "s parent:%(parent)-0"
-        + max_parent
-        + "s name:%(name)s"
-    )
-    output = []
-    for info in infos:
-        line = formater % info
-        if info["display_name"]:
-            line += " display_name:" + info["display_name"]  # type: ignore
-        output.append(line)
-        if info["properties"]:
-            for name, value in info["properties"].items():  # type: ignore
-                output.append(f"   - {name}: {value}")
-    output.append("")
-    return "\n".join(output)
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/draw_page.html b/doc/draw_page.html deleted file mode 100644 index 34abfc4..0000000 --- a/doc/draw_page.html +++ /dev/null @@ -1,596 +0,0 @@ - - - - - - -odfdo.draw_page API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.draw_page

-
-
-

DrawPage class for "draw:page".

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-"""DrawPage class for "draw:page".
-"""
-from __future__ import annotations
-
-from typing import Any
-
-from .element import Element, PropDef, register_element_class
-from .shapes import registered_shapes
-from .smil import AnimPar, AnimTransFilter
-
-
-class DrawPage(Element):
-    """ODF draw page "draw:page", for pages of presentation and drawings."""
-
-    _tag = "draw:page"
-    _properties = (
-        PropDef("name", "draw:name"),
-        PropDef("draw_id", "draw:id"),
-        PropDef("master_page", "draw:master-page-name"),
-        PropDef(
-            "presentation_page_layout", "presentation:presentation-page-layout-name"
-        ),
-        PropDef("style", "draw:style-name"),
-    )
-
-    def __init__(
-        self,
-        draw_id: str | None = None,
-        name: str | None = None,
-        master_page: str | None = None,
-        presentation_page_layout: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """
-        Arguments:
-
-            draw_id -- str
-
-            name -- str
-
-            master_page -- str
-
-            presentation_page_layout -- str
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if draw_id:
-                self.draw_id = draw_id
-            if name:
-                self.name = name
-            if master_page:
-                self.master_page = master_page
-            if presentation_page_layout:
-                self.presentation_page_layout = presentation_page_layout
-            if style:
-                self.style = style
-
-    def set_transition(
-        self,
-        smil_type: str,
-        subtype: str | None = None,
-        dur: str = "2s",
-    ) -> None:
-        # Create the new animation
-        anim_page = AnimPar(presentation_node_type="timing-root")
-        anim_begin = AnimPar(smil_begin=f"{self.draw_id}.begin")
-        transition = AnimTransFilter(
-            smil_dur=dur, smil_type=smil_type, smil_subtype=subtype
-        )
-        anim_page.append(anim_begin)
-        anim_begin.append(transition)
-
-        # Replace when already a transition:
-        #   anim:seq => After the frame's transition
-        #   cf page 349 of OpenDocument-v1.0-os.pdf
-        #   Conclusion: We must delete the first child 'anim:par'
-        existing = self.get_element("anim:par")
-        if existing:
-            self.delete(existing)
-        self.append(anim_page)
-
-    def get_shapes(self) -> list[Element]:
-        query = "(descendant::" + "|descendant::".join(registered_shapes) + ")"
-        return self.get_elements(query)
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        result: list[str] = []
-        for child in self.children:
-            if child.tag == "presentation:notes":
-                # No need for an advanced odf_notes.get_formatted_text()
-                # because the text seems to be only contained in paragraphs
-                # and frames, that we already handle
-                for sub_child in child.children:
-                    result.append(sub_child.get_formatted_text(context))
-                result.append("\n")
-            result.append(child.get_formatted_text(context))
-        result.append("\n")
-        return "".join(result)
-
-
-DrawPage._define_attribut_property()
-
-register_element_class(DrawPage)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class DrawPage -(draw_id: str | None = None, name: str | None = None, master_page: str | None = None, presentation_page_layout: str | None = None, style: str | None = None, **kwargs: Any) -
-
-

ODF draw page "draw:page", for pages of presentation and drawings.

-

Arguments

-

draw_id – str

-

name – str

-

master_page – str

-

presentation_page_layout – str

-

style – str

-
- -Expand source code - -
class DrawPage(Element):
-    """ODF draw page "draw:page", for pages of presentation and drawings."""
-
-    _tag = "draw:page"
-    _properties = (
-        PropDef("name", "draw:name"),
-        PropDef("draw_id", "draw:id"),
-        PropDef("master_page", "draw:master-page-name"),
-        PropDef(
-            "presentation_page_layout", "presentation:presentation-page-layout-name"
-        ),
-        PropDef("style", "draw:style-name"),
-    )
-
-    def __init__(
-        self,
-        draw_id: str | None = None,
-        name: str | None = None,
-        master_page: str | None = None,
-        presentation_page_layout: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """
-        Arguments:
-
-            draw_id -- str
-
-            name -- str
-
-            master_page -- str
-
-            presentation_page_layout -- str
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if draw_id:
-                self.draw_id = draw_id
-            if name:
-                self.name = name
-            if master_page:
-                self.master_page = master_page
-            if presentation_page_layout:
-                self.presentation_page_layout = presentation_page_layout
-            if style:
-                self.style = style
-
-    def set_transition(
-        self,
-        smil_type: str,
-        subtype: str | None = None,
-        dur: str = "2s",
-    ) -> None:
-        # Create the new animation
-        anim_page = AnimPar(presentation_node_type="timing-root")
-        anim_begin = AnimPar(smil_begin=f"{self.draw_id}.begin")
-        transition = AnimTransFilter(
-            smil_dur=dur, smil_type=smil_type, smil_subtype=subtype
-        )
-        anim_page.append(anim_begin)
-        anim_begin.append(transition)
-
-        # Replace when already a transition:
-        #   anim:seq => After the frame's transition
-        #   cf page 349 of OpenDocument-v1.0-os.pdf
-        #   Conclusion: We must delete the first child 'anim:par'
-        existing = self.get_element("anim:par")
-        if existing:
-            self.delete(existing)
-        self.append(anim_page)
-
-    def get_shapes(self) -> list[Element]:
-        query = "(descendant::" + "|descendant::".join(registered_shapes) + ")"
-        return self.get_elements(query)
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        result: list[str] = []
-        for child in self.children:
-            if child.tag == "presentation:notes":
-                # No need for an advanced odf_notes.get_formatted_text()
-                # because the text seems to be only contained in paragraphs
-                # and frames, that we already handle
-                for sub_child in child.children:
-                    result.append(sub_child.get_formatted_text(context))
-                result.append("\n")
-            result.append(child.get_formatted_text(context))
-        result.append("\n")
-        return "".join(result)
-
-

Ancestors

- -

Instance variables

-
-
var draw_id : str | bool | None
-
-

Get/set the attribute draw:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var master_page : str | bool | None
-
-

Get/set the attribute draw:master-page-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute draw:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var presentation_page_layout : str | bool | None
-
-

Get/set the attribute presentation:presentation-page-layout-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute draw:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def get_shapes(self) ‑> list[Element] -
-
-
-
- -Expand source code - -
def get_shapes(self) -> list[Element]:
-    query = "(descendant::" + "|descendant::".join(registered_shapes) + ")"
-    return self.get_elements(query)
-
-
-
-def set_transition(self, smil_type: str, subtype: str | None = None, dur: str = '2s') ‑> None -
-
-
-
- -Expand source code - -
def set_transition(
-    self,
-    smil_type: str,
-    subtype: str | None = None,
-    dur: str = "2s",
-) -> None:
-    # Create the new animation
-    anim_page = AnimPar(presentation_node_type="timing-root")
-    anim_begin = AnimPar(smil_begin=f"{self.draw_id}.begin")
-    transition = AnimTransFilter(
-        smil_dur=dur, smil_type=smil_type, smil_subtype=subtype
-    )
-    anim_page.append(anim_begin)
-    anim_begin.append(transition)
-
-    # Replace when already a transition:
-    #   anim:seq => After the frame's transition
-    #   cf page 349 of OpenDocument-v1.0-os.pdf
-    #   Conclusion: We must delete the first child 'anim:par'
-    existing = self.get_element("anim:par")
-    if existing:
-        self.delete(existing)
-    self.append(anim_page)
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/element.html b/doc/element.html deleted file mode 100644 index 6958759..0000000 --- a/doc/element.html +++ /dev/null @@ -1,11046 +0,0 @@ - - - - - - -odfdo.element API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.element

-
-
-

Element, super class of all ODF classes.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Element, super class of all ODF classes.
-"""
-from __future__ import annotations
-
-import contextlib
-import re
-import sys
-from collections.abc import Callable, Iterable
-from copy import deepcopy
-from datetime import datetime, timedelta
-from decimal import Decimal
-from functools import cache
-from re import search
-from typing import Any, NamedTuple
-
-from lxml.etree import Element as lxml_Element
-from lxml.etree import (
-    XPath,
-    _Element,
-    _ElementStringResult,
-    _ElementUnicodeResult,
-    fromstring,
-    tostring,
-)
-
-from .datatype import Boolean, DateTime
-from .utils import (
-    FAMILY_MAPPING,
-    FAMILY_ODF_STD,
-    CachedElement,
-    make_xpath_query,
-    str_to_bytes,
-    to_str,
-)
-
-ODF_NAMESPACES = {
-    "anim": "urn:oasis:names:tc:opendocument:xmlns:animation:1.0",
-    "calcext": "urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0",
-    "chart": "urn:oasis:names:tc:opendocument:xmlns:chart:1.0",
-    "config": "urn:oasis:names:tc:opendocument:xmlns:config:1.0",
-    "css3t": "http://www.w3.org/TR/css3-text/",
-    "dc": "http://purl.org/dc/elements/1.1/",
-    "dom": "http://www.w3.org/2001/xml-events",
-    "dr3d": "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0",
-    "draw": "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0",
-    "drawooo": "http://openoffice.org/2010/draw",
-    "field": "urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0",
-    "fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0",
-    "form": "urn:oasis:names:tc:opendocument:xmlns:form:1.0",
-    "formx": "urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0",
-    "grddl": "http://www.w3.org/2003/g/data-view#",
-    "loext": "urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0",
-    "manifest": "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0",
-    "math": "http://www.w3.org/1998/Math/MathML",
-    "meta": "urn:oasis:names:tc:opendocument:xmlns:meta:1.0",
-    "number": "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0",
-    "of": "urn:oasis:names:tc:opendocument:xmlns:of:1.2",
-    "office": "urn:oasis:names:tc:opendocument:xmlns:office:1.0",
-    "officeooo": "http://openoffice.org/2009/office",
-    "ooo": "http://openoffice.org/2004/office",
-    "oooc": "http://openoffice.org/2004/calc",
-    "ooow": "http://openoffice.org/2004/writer",
-    "presentation": "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0",
-    "rdfa": "http://docs.oasis-open.org/opendocument/meta/rdfa#",
-    "rpt": "http://openoffice.org/2005/report",
-    "script": "urn:oasis:names:tc:opendocument:xmlns:script:1.0",
-    "smil": "urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0",
-    "style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0",
-    "svg": "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0",
-    "table": "urn:oasis:names:tc:opendocument:xmlns:table:1.0",
-    "tableooo": "http://openoffice.org/2009/table",
-    "text": "urn:oasis:names:tc:opendocument:xmlns:text:1.0",
-    "xforms": "http://www.w3.org/2002/xforms",
-    "xlink": "http://www.w3.org/1999/xlink",
-    "xml": "http://www.w3.org/XML/1998/namespace",
-    "xsd": "http://www.w3.org/2001/XMLSchema",
-    "xsi": "http://www.w3.org/2001/XMLSchema-instance",
-}
-FIRST_CHILD = 0
-LAST_CHILD = 1
-NEXT_SIBLING = 2
-PREV_SIBLING = 3
-STOPMARKER = 5
-
-# An empty XML document with all namespaces declared
-NAMESPACES_XML = b"""<?xml version="1.0" encoding="UTF-8"?>
-<office:document
-  xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
-  xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
-  xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
-  xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
-  xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
-  xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
-  xmlns:xlink="http://www.w3.org/1999/xlink"
-  xmlns:dc="http://purl.org/dc/elements/1.1/"
-  xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
-  xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
-  xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
-  xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
-  xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
-  xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
-  xmlns:math="http://www.w3.org/1998/Math/MathML"
-  xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
-  xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
-  xmlns:ooo="http://openoffice.org/2004/office"
-  xmlns:oooc="http://openoffice.org/2004/calc"
-  xmlns:ooow="http://openoffice.org/2004/writer"
-  xmlns:xforms="http://www.w3.org/2002/xforms"
-  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"
-  xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
-  xmlns:rpt="http://openoffice.org/2005/report"
-  xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml"
-  xmlns:grddl="http://www.w3.org/2003/g/data-view#"
-  xmlns:officeooo="http://openoffice.org/2009/office"
-  xmlns:tableooo="http://openoffice.org/2009/table"
-  xmlns:drawooo="http://openoffice.org/2010/draw"
-  xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
-  xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
-  xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0"
-  xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
-  xmlns:css3t="http://www.w3.org/TR/css3-text/"
-  xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
-  xmlns:dom="http://www.w3.org/2001/xml-events"
-  xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"
-  xmlns:rdfa="http://docs.oasis-open.org/opendocument/meta/rdfa#"
-  office:version="1.1">%s</office:document>
-"""
-
-
-class PropDef(NamedTuple):
-    name: str
-    attr: str
-    family: str = ""
-
-
-def _decode_qname(qname: str) -> tuple[str | None, str]:
-    """Turn a prefixed qualified name to a (uri, name) pair."""
-    if ":" in qname:
-        prefix, name = qname.split(":")
-        try:
-            uri = ODF_NAMESPACES[prefix]
-        except KeyError as e:
-            raise ValueError(f'XML prefix "{prefix}" is unknown') from e
-        return uri, name
-    return None, qname
-
-
-def _uri_to_prefix(uri: str) -> str:
-    """Find the prefix associated to the given URI."""
-    for key, value in ODF_NAMESPACES.items():
-        if value == uri:
-            return key
-    raise ValueError(f"uri {uri!r} not found")
-
-
-def _get_prefixed_name(tag: str) -> str:
-    """Replace lxml "{uri}name" syntax with "prefix:name" one."""
-    if "}" not in tag:
-        return f":{tag}"
-    uri, name = tag.split("}", 1)
-    prefix = _uri_to_prefix(uri[1:])
-    return f"{prefix}:{name}"
-
-
-def _get_lxml_tag(qname: str) -> str:
-    """Replace "prefix:name" syntax with lxml "{uri}name" one."""
-    uri, name = _decode_qname(qname)
-    return f"{{{uri}}}{name}"
-
-
-def _get_lxml_tag_or_name(qname: str) -> str:
-    """Replace "prefix:name" syntax with lxml "{uri}name" one or "name"."""
-    uri, name = _decode_qname(qname)
-    if uri is None:
-        return name
-    return f"{{{uri}}}{name}"
-
-
-def _family_style_tagname(family: str) -> str:
-    try:
-        return FAMILY_MAPPING[family]
-    except KeyError as e:
-        raise ValueError(f"unknown family: {family}") from e
-
-
-@cache
-def xpath_compile(path: str) -> XPath:
-    return XPath(path, namespaces=ODF_NAMESPACES, regexp=False)
-
-
-_xpath_text = xpath_compile("//text()")  #  descendant and self
-_xpath_text_descendant = xpath_compile("descendant::text()")
-_xpath_text_main = xpath_compile("//*[not (parent::office:annotation)]/text()")
-_xpath_text_main_descendant = xpath_compile(
-    "descendant::text()[not (parent::office:annotation)]"
-)
-
-_class_registry: dict[str, type[Element]] = {}
-
-
-def register_element_class(cls: type[Element]) -> None:
-    """Associate a qualified element name to a Python class that handles this
-    type of element.
-
-    Getting the right Python class when loading an existing ODF document is
-    then transparent. Unassociated elements will be handled by the base
-    Element class.
-
-    Arguments:
-
-        cls -- Python class, subtype of Element.
-    """
-    # Turn tag name into what lxml is expecting
-    _register_element_class(cls, cls._tag)
-
-
-def register_element_class_list(cls: type[Element], tag_list: Iterable[str]) -> None:
-    """Associate a qualified element name to a Python class that handles this
-    type of element.
-
-    Getting the right Python class when loading an existing ODF document is
-    then transparent. Unassociated elements will be handled by the base
-    Element class.
-
-    Most styles use the "style:style" qualified name and only differ by their
-    "style:family" attribute. So the "family" attribute was added to register
-    specialized style classes.
-
-    Arguments:
-
-        cls -- Python class
-
-        tag_list -- iterable of qname tags for the class
-    """
-    # Turn tag name into what lxml is expecting
-    for qname in tag_list:
-        _register_element_class(cls, qname)
-
-
-def _register_element_class(cls: type[Element], qname: str) -> None:
-    # Turn tag name into what lxml is expecting
-    tag = _get_lxml_tag(qname)
-    if tag not in _class_registry:
-        _class_registry[tag] = cls
-
-
-class Text(str):
-    """Representation of an XML text node. Created to hide the specifics of
-    lxml in searching text nodes using XPath.
-
-    Constructed like any str object but only accepts lxml text objects.
-    """
-
-    # There's some black magic in inheriting from str
-    def __init__(
-        self,
-        text_result: _ElementUnicodeResult | _ElementStringResult,
-    ) -> None:
-        self.__parent = text_result.getparent()
-        self.__is_text = text_result.is_text
-        self.__is_tail = text_result.is_tail
-
-    @property
-    def parent(self) -> Element | None:
-        parent = self.__parent
-        # XXX happens just because of the unit test
-        if parent is None:
-            return None
-        return Element.from_tag(tag_or_elem=parent)
-
-    def is_text(self) -> bool:
-        return self.__is_text
-
-    def is_tail(self) -> bool:
-        return self.__is_tail
-
-
-class Element(CachedElement):
-    """Super class of all ODF classes.
-
-    Representation of an XML element. Abstraction of the XML library behind.
-    """
-
-    _tag: str = ""
-    _caching: bool = False
-    _properties: tuple[PropDef, ...] = ()
-
-    def __init__(self, **kwargs: Any) -> None:
-        tag_or_elem = kwargs.pop("tag_or_elem", None)
-        if tag_or_elem is None:
-            # Instance for newly created object: create new lxml element and
-            # continue by subclass __init__
-            # If the tag key word exists, make a custom element
-            self._do_init = True
-            tag = kwargs.pop("tag", self._tag)
-            self.__element = self.make_etree_element(tag)
-        else:
-            # called with an existing lxml element, sould be a result of
-            # from_tag() casting, do not execute the subclass __init__
-            if not isinstance(tag_or_elem, _Element):
-                raise TypeError(f'"{type(tag_or_elem)}" is not an element node')
-            self._do_init = False
-            self.__element = tag_or_elem
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} tag={self.tag}>"
-
-    def __str__(self) -> str:
-        return self.text_recursive
-
-    @classmethod
-    def from_tag(cls, tag_or_elem: str | _Element) -> Element:
-        """Element class and subclass factory.
-
-        Turn an lxml Element or ODF string tag into an ODF XML Element
-        of the relevant class.
-
-        Arguments:
-
-            tag_or_elem -- ODF str tag or lxml.Element
-
-        Return: Element (or subclass) instance
-        """
-        if isinstance(tag_or_elem, str):
-            # assume the argument is a prefix:name tag
-            elem = cls.make_etree_element(tag_or_elem)
-        else:
-            elem = tag_or_elem
-        klass = _class_registry.get(elem.tag, cls)
-        return klass(tag_or_elem=elem)
-
-    @classmethod
-    def from_tag_for_clone(
-        cls: type,
-        tree_element: _Element,
-        cache: tuple | None,
-    ) -> Element:
-        tag = to_str(tree_element.tag)
-        klass = _class_registry.get(tag, cls)
-        element = klass(tag_or_elem=tree_element)
-        if cache and element._caching:
-            element._tmap = cache[0]
-            element._cmap = cache[1]
-            if len(cache) == 3:
-                element._rmap = cache[2]
-        return element
-
-    @staticmethod
-    def make_etree_element(tag: str) -> _Element:
-        if not isinstance(tag, str):
-            raise TypeError(f"Tag is not str: {tag!r}")
-        tag = tag.strip()
-        if not tag:
-            raise ValueError("Tag is empty")
-        if "<" not in tag:
-            # Qualified name
-            # XXX don't build the element from scratch or lxml will pollute with
-            # repeated namespace declarations
-            tag = f"<{tag}/>"
-        # XML fragment
-        root = fromstring(NAMESPACES_XML % str_to_bytes(tag))
-        return root[0]
-
-    @staticmethod
-    def _generic_attrib_getter(attr_name: str, family: str | None = None) -> Callable:
-        name = _get_lxml_tag(attr_name)
-
-        def getter(self: Element) -> str | bool | None:
-            try:
-                if family and self.family != family:  # type: ignore
-                    return None
-            except AttributeError:
-                return None
-            value = self.__element.get(name)
-            if value is None:
-                return None
-            elif value in ("true", "false"):
-                return Boolean.decode(value)
-            return str(value)
-
-        return getter
-
-    @staticmethod
-    def _generic_attrib_setter(attr_name: str, family: str | None = None) -> Callable:
-        name = _get_lxml_tag(attr_name)
-
-        def setter(self: Element, value: Any) -> None:
-            try:
-                if family and self.family != family:  # type: ignore
-                    return None
-            except AttributeError:
-                return None
-            if value is None:
-                with contextlib.suppress(KeyError):
-                    del self.__element.attrib[name]
-                return
-            if isinstance(value, bool):
-                value = Boolean.encode(value)
-            self.__element.set(name, str(value))
-
-        return setter
-
-    @classmethod
-    def _define_attribut_property(cls: type[Element]) -> None:
-        for prop in cls._properties:
-            setattr(
-                cls,
-                prop.name,
-                property(
-                    cls._generic_attrib_getter(prop.attr, prop.family or None),
-                    cls._generic_attrib_setter(prop.attr, prop.family or None),
-                    None,
-                    f"Get/set the attribute {prop.attr}",
-                ),
-            )
-
-    @staticmethod
-    def _make_before_regex(
-        before: str | None,
-        after: str | None,
-    ) -> re.Pattern:
-        # 1) before xor after is not None
-        if before is not None:
-            return re.compile(before)
-        else:
-            if after is None:
-                raise ValueError("Both 'before' and 'after' are None")
-            return re.compile(after)
-
-    @staticmethod
-    def _search_negative_position(
-        xpath_result: list,
-        regex: re.Pattern,
-    ) -> tuple[str, re.Match]:
-        # Found the last text that matches the regex
-        text = None
-        for a_text in xpath_result:
-            if regex.search(str(a_text)) is not None:
-                text = a_text
-        if text is None:
-            raise ValueError(f"Text not found: '{xpath_result}'")
-        if not isinstance(text, str):
-            raise TypeError(f"Text not found or text not of type str: '{text}'")
-        return text, list(regex.finditer(text))[-1]
-
-    @staticmethod
-    def _search_positive_position(
-        xpath_result: list,
-        regex: re.Pattern,
-        position: int,
-    ) -> tuple[str, re.Match]:
-        # Found the last text that matches the regex
-        count = 0
-        for text in xpath_result:
-            found_nb = len(regex.findall(str(text)))
-            if found_nb + count >= position + 1:
-                break
-            count += found_nb
-        else:
-            raise ValueError(f"Text not found: '{xpath_result}'")
-        if not isinstance(text, str):
-            raise TypeError(f"Text not found or text not of type str: '{text}'")
-        return text, list(regex.finditer(text))[position - count]
-
-    def _insert_before_after(
-        self,
-        current: _Element,
-        element: _Element,
-        before: str | None,
-        after: str | None,
-        position: int,
-        xpath_text: XPath,
-    ) -> tuple[int, str]:
-        regex = self._make_before_regex(before, after)
-        xpath_result = xpath_text(current)
-        if not isinstance(xpath_result, list):
-            raise TypeError("Bad XPath result")
-        # position = -1
-        if position < 0:
-            text, sre = self._search_negative_position(xpath_result, regex)
-        # position >= 0
-        else:
-            text, sre = self._search_positive_position(xpath_result, regex, position)
-        # Compute pos
-        if before is None:
-            pos = sre.end()
-        else:
-            pos = sre.start()
-        return pos, text
-
-    def _insert_find_text(
-        self,
-        current: _Element,
-        element: _Element,
-        before: str | None,
-        after: str | None,
-        position: int,
-        xpath_text: XPath,
-    ) -> tuple[int, str]:
-        # Find the text
-        xpath_result = xpath_text(current)
-        if not isinstance(xpath_result, list):
-            raise TypeError("Bad XPath result")
-        count = 0
-        for text in xpath_result:
-            if not isinstance(text, str):
-                continue
-            found_nb = len(text)
-            if found_nb + count >= position:
-                break
-            count += found_nb
-        else:
-            raise ValueError("Text not found")
-        # We insert before the character
-        pos = position - count
-        return pos, text
-
-    def _insert(
-        self,
-        element: Element,
-        before: str | None = None,
-        after: str | None = None,
-        position: int = 0,
-        main_text: bool = False,
-    ) -> None:
-        """Insert an element before or after the characters in the text which
-        match the regex before/after.
-
-        When the regex matches more of one part of the text, position can be
-        set to choice which part must be used. If before and after are None,
-        we use only position that is the number of characters. If position is
-        positive and before=after=None, we insert before the position
-        character. But if position=-1, we insert after the last character.
-
-
-        Arguments:
-
-        element -- Element
-
-        before -- str regex
-
-        after -- str regex
-
-        position -- int
-        """
-        # not implemented: if main_text is True, filter out the annotations texts in computation.
-        current = self.__element
-        xelement = element.__element
-
-        if main_text:
-            xpath_text = _xpath_text_main_descendant
-        else:
-            xpath_text = _xpath_text_descendant
-
-        # 1) before xor after is not None
-        if (before is not None) ^ (after is not None):
-            pos, text = self._insert_before_after(
-                current,
-                xelement,
-                before,
-                after,
-                position,
-                xpath_text,
-            )
-        # 2) before=after=None => only with position
-        elif before is None and after is None:
-            # Hack if position is negative => quickly
-            if position < 0:
-                current.append(xelement)
-                return
-            pos, text = self._insert_find_text(
-                current,
-                xelement,
-                before,
-                after,
-                position,
-                xpath_text,
-            )
-        else:
-            raise ValueError("bad combination of arguments")
-
-        # Compute new texts
-        text_before = text[:pos] if text[:pos] else None
-        text_after = text[pos:] if text[pos:] else None
-
-        # Insert!
-        parent = text.getparent()  # type: ignore
-        if text.is_text:  # type: ignore
-            parent.text = text_before
-            element.tail = text_after
-            parent.insert(0, xelement)
-        else:
-            parent.addnext(xelement)
-            parent.tail = text_before
-            element.tail = text_after
-
-    def _insert_between(  # noqa: C901
-        self,
-        element: Element,
-        from_: str,
-        to: str,
-    ) -> None:
-        """Insert the given empty element to wrap the text beginning with
-        "from_" and ending with "to".
-
-        Example 1: '<p>toto tata titi</p>
-
-        We want to insert a link around "tata".
-
-        Result 1: '<p>toto <a>tata</a> titi</p>
-
-        Example 2: '<p><span>toto</span> tata titi</p>
-
-        We want to insert a link around "tata".
-
-        Result 2: '<p><span>toto</span> <a>tata</a> titi</p>
-
-        Example 3: '<p>toto <span> tata </span> titi</p>'
-
-        We want to insert a link from "tata" to "titi" included.
-
-        Result 3: '<p>toto <span> </span>'
-                  '<a><span>tata </span> titi</a></p>'
-
-        Example 4: '<p>toto <span>tata titi</span> tutu</p>'
-
-        We want to insert a link from "titi" to "tutu"
-
-        Result 4: '<p>toto <span>tata </span><a><span>titi</span></a>'
-                  '<a> tutu</a></p>'
-
-        Example 5: '<p>toto <span>tata titi</span> '
-                   '<span>tutu tyty</span></p>'
-
-        We want to insert a link from "titi" to "tutu"
-
-        Result 5: '<p>toto <span>tata </span><a><span>titi</span><a> '
-                  '<a> <span>tutu</span></a><span> tyty</span></p>'
-        """
-        current = self.__element
-        wrapper = element.__element
-
-        xpath_result = _xpath_text_descendant(current)
-        if not isinstance(xpath_result, list):
-            raise TypeError("Bad XPath result")
-
-        for text in xpath_result:
-            if not isinstance(text, str):
-                raise TypeError("Text not found or text not of type str")
-            if from_ not in text:
-                continue
-            from_index = text.index(from_)
-            text_before = text[:from_index]
-            text_after = text[from_index:]
-            from_container = text.getparent()  # type: ignore
-            if not isinstance(from_container, _Element):
-                raise TypeError("Bad XPath result")
-            # Include from_index to match a single word
-            to_index = text.find(to, from_index)
-            if to_index >= 0:
-                # Simple case: "from" and "to" in the same element
-                to_end = to_index + len(to)
-                if text.is_text:  # type: ignore
-                    from_container.text = text_before
-                    wrapper.text = text[to_index:to_end]
-                    wrapper.tail = text[to_end:]
-                    from_container.insert(0, wrapper)
-                else:
-                    from_container.tail = text_before
-                    wrapper.text = text[to_index:to_end]
-                    wrapper.tail = text[to_end:]
-                    parent = from_container.getparent()
-                    index = parent.index(from_container)  # type: ignore
-                    parent.insert(index + 1, wrapper)  # type: ignore
-                return
-            else:
-                # Exit to the second part where we search for the end text
-                break
-        else:
-            raise ValueError("Start text not found")
-
-        # The container is split in two
-        container2 = deepcopy(from_container)
-        if text.is_text:  # type: ignore
-            from_container.text = text_before
-            from_container.tail = None
-            container2.text = text_after
-            from_container.tail = None
-        else:
-            from_container.tail = text_before
-            container2.tail = text_after
-        # Stack the copy into the surrounding element
-        wrapper.append(container2)
-        parent = from_container.getparent()
-        index = parent.index(from_container)  # type: ignore
-        parent.insert(index + 1, wrapper)  # type: ignore
-
-        xpath_result = _xpath_text_descendant(wrapper)
-        if not isinstance(xpath_result, list):
-            raise TypeError("Bad XPath result")
-
-        for text in xpath_result:
-            if not isinstance(text, str):
-                raise TypeError("Text not found or text not of type str")
-            if to not in text:
-                continue
-            to_end = text.index(to) + len(to)
-            text_before = text[:to_end]
-            text_after = text[to_end:]
-            container_to = text.getparent()  # type: ignore
-            if not isinstance(container_to, _Element):
-                raise TypeError("Bad XPath result")
-            if text.is_text:  # type: ignore
-                container_to.text = text_before
-                container_to.tail = text_after
-            else:
-                container_to.tail = text_before
-                next_one = container_to.getnext()
-                if next_one is None:
-                    next_one = container_to.getparent()
-                next_one.tail = text_after  # type: ignore
-            return
-        raise ValueError("End text not found")
-
-    @property
-    def tag(self) -> str:
-        """Get/set the underlying xml tag with the given qualified name.
-
-        Warning: direct change of tag does not change the element class.
-
-        Arguments:
-
-            qname -- str (e.g. "text:span")
-        """
-        return _get_prefixed_name(self.__element.tag)
-
-    @tag.setter
-    def tag(self, qname: str) -> None:
-        self.__element.tag = _get_lxml_tag(qname)
-
-    def elements_repeated_sequence(
-        self,
-        xpath_instance: XPath,
-        name: str,
-    ) -> list[tuple[int, int]]:
-        """Utility method for table module."""
-        lxml_tag = _get_lxml_tag_or_name(name)
-        element = self.__element
-        sub_elements = xpath_instance(element)
-        if not isinstance(sub_elements, list):
-            raise TypeError("Bad XPath result.")
-        result: list[tuple[int, int]] = []
-        idx = -1
-        for sub_element in sub_elements:
-            if not isinstance(sub_element, _Element):
-                continue
-            idx += 1
-            value = sub_element.get(lxml_tag)
-            if value is None:
-                result.append((idx, 1))
-                continue
-            try:
-                int_value = int(value)
-            except ValueError:
-                int_value = 1
-            result.append((idx, max(int_value, 1)))
-        return result
-
-    def get_elements(self, xpath_query: XPath | str) -> list[Element]:
-        cache: tuple | None = None
-        element = self.__element
-        if isinstance(xpath_query, str):
-            new_xpath_query = xpath_compile(xpath_query)
-            result = new_xpath_query(element)
-        else:
-            result = xpath_query(element)
-        if not isinstance(result, list):
-            raise TypeError("Bad XPath result")
-
-        if hasattr(self, "_tmap"):
-            if hasattr(self, "_rmap"):
-                cache = (self._tmap, self._cmap, self._rmap)
-            else:
-                cache = (self._tmap, self._cmap)
-        return [
-            Element.from_tag_for_clone(e, cache)
-            for e in result
-            if isinstance(e, _Element)
-        ]
-
-    # fixme : need original get_element as wrapper of get_elements
-
-    def get_element(self, xpath_query: XPath | str) -> Element | None:
-        element = self.__element
-        result = element.xpath(f"({xpath_query})[1]", namespaces=ODF_NAMESPACES)
-        if result:
-            return Element.from_tag(result[0])  # type:ignore
-        return None
-
-    def _get_element_idx(self, xpath_query: XPath | str, idx: int) -> Element | None:
-        element = self.__element
-        result = element.xpath(f"({xpath_query})[{idx + 1}]", namespaces=ODF_NAMESPACES)
-        if result:
-            return Element.from_tag(result[0])  # type:ignore
-        return None
-
-    def _get_element_idx2(self, xpath_instance: XPath, idx: int) -> Element | None:
-        element = self.__element
-        result = xpath_instance(element, idx=idx + 1)
-        if result:
-            return Element.from_tag(result[0])  # type:ignore
-        return None
-
-    @property
-    def attributes(self) -> dict[str, str]:
-        return {
-            _get_prefixed_name(str(key)): str(value)
-            for key, value in self.__element.attrib.items()
-        }
-
-    def get_attribute(self, name: str) -> str | bool | None:
-        """Return the attribute value as type str | bool | None."""
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        value = element.get(lxml_tag)
-        if value is None:
-            return None
-        elif value in ("true", "false"):
-            return Boolean.decode(value)
-        return str(value)
-
-    def get_attribute_integer(self, name: str) -> int | None:
-        """Return either the attribute as type int, or None."""
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        value = element.get(lxml_tag)
-        if value is None:
-            return None
-        try:
-            return int(value)
-        except ValueError:
-            return None
-
-    def get_attribute_string(self, name: str) -> str | None:
-        """Return either the attribute as type str, or None."""
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        value = element.get(lxml_tag)
-        if value is None:
-            return None
-        return str(value)
-
-    def set_attribute(self, name: str, value: bool | str | None) -> None:
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        if isinstance(value, bool):
-            value = Boolean.encode(value)
-        elif value is None:
-            with contextlib.suppress(KeyError):
-                del element.attrib[lxml_tag]
-            return
-        element.set(lxml_tag, str(value))
-
-    def set_style_attribute(self, name: str, value: Element | str) -> None:
-        """Shortcut to accept a style object as a value."""
-        if isinstance(value, Element):
-            value = str(value.name)  # type:ignore
-        return self.set_attribute(name, value)
-
-    def del_attribute(self, name: str) -> None:
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        del element.attrib[lxml_tag]
-
-    @property
-    def text(self) -> str:
-        """Get / set the text content of the element."""
-        return self.__element.text or ""
-
-    @text.setter
-    def text(self, text: str | None) -> None:
-        if text is None:
-            text = ""
-        try:
-            self.__element.text = text
-        except TypeError as e:
-            raise TypeError(f'Str type expected: "{type(text)}"') from e
-
-    @property
-    def text_recursive(self) -> str:
-        return "".join(str(x) for x in self.__element.itertext())
-
-    @property
-    def tail(self) -> str | None:
-        """Get / set the text immediately following the element."""
-        return self.__element.tail
-
-    @tail.setter
-    def tail(self, text: str | None) -> None:
-        self.__element.tail = text or ""
-
-    def search(self, pattern: str) -> int | None:
-        """Return the first position of the pattern in the text content of
-        the element, or None if not found.
-
-        Python regular expression syntax applies.
-
-        Arguments:
-
-            pattern -- str
-
-        Return: int or None
-        """
-        match = re.search(pattern, self.text_recursive)
-        if match is None:
-            return None
-        return match.start()
-
-    def match(self, pattern: str) -> bool:
-        """return True if the pattern is found one or more times anywhere in
-        the text content of the element.
-
-        Python regular expression syntax applies.
-
-        Arguments:
-
-            pattern -- str
-
-        Return: bool
-        """
-        return self.search(pattern) is not None
-
-    def replace(self, pattern: str, new: str | None = None) -> int:
-        """Replace the pattern with the given text, or delete if text is an
-        empty string, and return the number of replacements. By default, only
-        return the number of occurences that would be replaced.
-
-        It cannot replace patterns found across several element, like a word
-        split into two consecutive spans.
-
-        Python regular expression syntax applies.
-
-        Arguments:
-
-            pattern -- str
-
-            new -- str
-
-        Return: int
-        """
-        if not isinstance(pattern, str):
-            # Fail properly if the pattern is an non-ascii bytestring
-            pattern = str(pattern)
-        cpattern = re.compile(pattern)
-        count = 0
-        for text in self.xpath("descendant::text()"):
-            if new is None:
-                count += len(cpattern.findall(str(text)))
-            else:
-                new_text, number = cpattern.subn(new, str(text))
-                container = text.parent
-                if text.is_text():  # type: ignore
-                    container.text = new_text  # type: ignore
-                else:
-                    container.tail = new_text  # type: ignore
-                count += number
-        return count
-
-    @property
-    def root(self) -> Element:
-        element = self.__element
-        tree = element.getroottree()
-        root = tree.getroot()
-        return Element.from_tag(root)
-
-    @property
-    def parent(self) -> Element | None:
-        element = self.__element
-        parent = element.getparent()
-        if parent is None:
-            # Already at root
-            return None
-        return Element.from_tag(parent)
-
-    @property
-    def is_bound(self) -> bool:
-        return self.parent is not None
-
-    # def get_next_sibling(self):
-    #     element = self.__element
-    #     next_one = element.getnext()
-    #     if next_one is None:
-    #         return None
-    #     return Element.from_tag(next_one)
-    #
-    # def get_prev_sibling(self):
-    #     element = self.__element
-    #     prev = element.getprevious()
-    #     if prev is None:
-    #         return None
-    #     return Element.from_tag(prev)
-
-    @property
-    def children(self) -> list[Element]:
-        element = self.__element
-        return [
-            Element.from_tag(e)
-            for e in element.iterchildren()
-            if isinstance(e, _Element)
-        ]
-
-    def index(self, child: Element) -> int:
-        """Return the position of the child in this element.
-
-        Inspired by lxml
-        """
-        return self.__element.index(child.__element)
-
-    @property
-    def text_content(self) -> str:
-        """Get / set the text of the embedded paragraph, including embeded
-        annotations, cells...
-
-        Set create a paragraph if missing
-        """
-        return "\n".join(
-            child.text_recursive for child in self.get_elements("descendant::text:p")
-        )
-
-    @text_content.setter
-    def text_content(self, text: str | None) -> None:
-        paragraphs = self.get_elements("text:p")
-        if not paragraphs:
-            # E.g., text:p in draw:text-box in draw:frame
-            paragraphs = self.get_elements("*/text:p")
-        if paragraphs:
-            paragraph = paragraphs.pop(0)
-            for obsolete in paragraphs:
-                obsolete.delete()
-        else:
-            paragraph = Element.from_tag("text:p")
-            self.insert(paragraph, FIRST_CHILD)
-        # As "text_content" returned all text nodes, "text_content"
-        # will overwrite all text nodes and children that may contain them
-        element = paragraph.__element
-        # Clear but the attributes
-        del element[:]
-        element.text = text
-
-    def _erase_text_content(self) -> None:
-        paragraphs = self.get_elements("text:p")
-        if not paragraphs:
-            # E.g., text:p in draw:text-box in draw:frame
-            paragraphs = self.get_elements("*/text:p")
-        if paragraphs:
-            paragraphs.pop(0)
-            for obsolete in paragraphs:
-                obsolete.delete()
-
-    def is_empty(self) -> bool:
-        """Check if the element is empty : no text, no children, no tail.
-
-        Return: Boolean
-        """
-        element = self.__element
-        if element.tail is not None:
-            return False
-        if element.text is not None:
-            return False
-        if list(element.iterchildren()):
-            return False
-        return True
-
-    def _get_successor(self, target: Element) -> tuple[Element | None, Element | None]:
-        element = self.__element
-        next_one = element.getnext()
-        if next_one is not None:
-            return Element.from_tag(next_one), target
-        parent = self.parent
-        if parent is None:
-            return None, None
-        return parent._get_successor(target.parent)  # type:ignore
-
-    def _get_between_base(  # noqa:C901
-        self,
-        tag1: Element,
-        tag2: Element,
-    ) -> list[Element]:
-        def find_any_id(elem: Element) -> tuple[str, str, str]:
-            elem_tag = elem.tag
-            for attribute in (
-                "text:id",
-                "text:change-id",
-                "text:name",
-                "office:name",
-                "text:ref-name",
-                "xml:id",
-            ):
-                idx = elem.get_attribute(attribute)
-                if idx is not None:
-                    return elem_tag, attribute, str(idx)
-            raise ValueError(f"No Id found in {elem.serialize()}")
-
-        def common_ancestor(
-            tag1: str,
-            attr1: str,
-            val1: str,
-            tag2: str,
-            attr2: str,
-            val2: str,
-        ) -> Element | None:
-            root = self.root
-            request1 = f'descendant::{tag1}[@{attr1}="{val1}"]'
-            request2 = f'descendant::{tag2}[@{attr2}="{val2}"]'
-            ancestor = root.xpath(request1)[0]
-            if ancestor is None:
-                return None
-            while True:
-                # print "up",
-                new_ancestor = ancestor.parent
-                if new_ancestor is None:
-                    return None
-                has_tag2 = new_ancestor.xpath(request2)
-                ancestor = new_ancestor
-                if not has_tag2:
-                    continue
-                # print 'found'
-                break
-            # print up.serialize()
-            return ancestor
-
-        elem1_tag, elem1_attr, elem1_val = find_any_id(tag1)
-        elem2_tag, elem2_attr, elem2_val = find_any_id(tag2)
-        ancestor_result = common_ancestor(
-            elem1_tag,
-            elem1_attr,
-            elem1_val,
-            elem2_tag,
-            elem2_attr,
-            elem2_val,
-        )
-        if ancestor_result is None:
-            raise RuntimeError(f"No common ancestor for {elem1_tag} {elem2_tag}")
-        ancestor = ancestor_result.clone
-        path1 = f'{elem1_tag}[@{elem1_attr}="{elem1_val}"]'
-        path2 = f'{elem2_tag}[@{elem2_attr}="{elem2_val}"]'
-        result = ancestor.clone
-        for child in result.children:
-            result.delete(child)
-        result.text = ""
-        result.tail = ""
-        target = result
-        current = ancestor.children[0]
-
-        state = 0
-        while True:
-            if current is None:
-                raise RuntimeError(f"No current ancestor for {elem1_tag} {elem2_tag}")
-            # print 'current', state, current.serialize()
-            if state == 0:  # before tag 1
-                if current.xpath(f"descendant-or-self::{path1}"):
-                    if current.xpath(f"self::{path1}"):
-                        tail = current.tail
-                        if tail:
-                            # got a tail => the parent should be either t:p or t:h
-                            target.text = tail  # type: ignore
-                        current, target = current._get_successor(target)  # type: ignore
-                        state = 1
-                        continue
-                    # got T1 in chidren, need further analysis
-                    new_target = current.clone
-                    for child in new_target.children:
-                        new_target.delete(child)
-                    new_target.text = ""
-                    new_target.tail = ""
-                    target.append(new_target)  # type: ignore
-                    target = new_target
-                    current = current.children[0]
-                    continue
-                else:
-                    # before tag1 : forget element, go to next one
-                    current, target = current._get_successor(target)  # type: ignore
-                    continue
-            elif state == 1:  # collect elements
-                further = False
-                if current.xpath(f"descendant-or-self::{path2}"):
-                    if current.xpath(f"self::{path2}"):
-                        # end of trip
-                        break
-                    # got T2 in chidren, need further analysis
-                    further = True
-                # further analysis needed :
-                if further:
-                    new_target = current.clone
-                    for child in new_target.children:
-                        new_target.delete(child)
-                    new_target.text = ""
-                    new_target.tail = ""
-                    target.append(new_target)  # type: ignore
-                    target = new_target
-                    current = current.children[0]
-                    continue
-                # collect
-                target.append(current.clone)  # type: ignore
-                current, target = current._get_successor(target)  # type: ignore
-                continue
-        # Now resu should be the "parent" of inserted parts
-        # - a text:h or text:p sigle item (simple case)
-        # - a upper element, with some text:p, text:h in it => need to be
-        #   stripped to have a list of text:p, text:h
-        if result.tag in {"text:p", "text:h"}:
-            inner = [result]
-        else:
-            inner = result.children
-        return inner
-
-    def get_between(
-        self,
-        tag1: Element,
-        tag2: Element,
-        as_text: bool = False,
-        clean: bool = True,
-        no_header: bool = True,
-    ) -> list | Element | str:
-        """Returns elements between tag1 and tag2, tag1 and tag2 shall
-        be unique and having an id attribute.
-        (WARN: buggy if tag1/tag2 defines a malformed odf xml.)
-        If as_text is True: returns the text content.
-        If clean is True: suppress unwanted tags (deletions marks, ...)
-        If no_header is True: existing text:h are changed in text:p
-        By default: returns a list of Element, cleaned and without headers.
-
-        Implementation and standard retrictions:
-        Only text:h and text:p sould be 'cut' by an insert tag, so inner parts
-        of insert tags are:
-
-            - any text:h, text:p or sub tag of these
-
-            - some text, part of a parent text:h or text:p
-
-        Arguments:
-
-            tag1 -- Element
-
-            tag2 -- Element
-
-            as_text -- boolean
-
-            clean -- boolean
-
-            no_header -- boolean
-
-        Return: list of odf_paragraph or odf_header
-        """
-        inner = self._get_between_base(tag1, tag2)
-
-        if clean:
-            clean_tags = (
-                "text:change",
-                "text:change-start",
-                "text:change-end",
-                "text:reference-mark",
-                "text:reference-mark-start",
-                "text:reference-mark-end",
-            )
-            request_self = " | ".join(["self::%s" % c for c in clean_tags])
-            inner = [e for e in inner if not e.xpath(request_self)]
-            request = " | ".join([f"descendant::{tag}" for tag in clean_tags])
-            for element in inner:
-                to_del = element.xpath(request)
-                for elem in to_del:
-                    if isinstance(elem, Element):
-                        element.delete(elem)
-        if no_header:  # crude replace t:h by t:p
-            new_inner = []
-            for element in inner:
-                if element.tag == "text:h":
-                    children = element.children
-                    text = element.__element.text
-                    para = Element.from_tag("text:p")
-                    para.text = text or ""
-                    for c in children:
-                        para.append(c)
-                    new_inner.append(para)
-                else:
-                    new_inner.append(element)
-            inner = new_inner
-        if as_text:
-            return "\n".join([e.get_formatted_text() for e in inner])
-        else:
-            return inner
-
-    def insert(
-        self,
-        element: Element,
-        xmlposition: int | None = None,
-        position: int | None = None,
-        start: bool = False,
-    ) -> None:
-        """Insert an element relatively to ourself.
-
-        Insert either using DOM vocabulary or by numeric position.
-        If text start is True, insert the element before any existing text.
-
-        Position start at 0.
-
-        Arguments:
-
-            element -- Element
-
-            xmlposition -- FIRST_CHILD, LAST_CHILD, NEXT_SIBLING
-                           or PREV_SIBLING
-
-            start -- Boolean
-
-            position -- int
-        """
-        # child_tag = element.tag
-        current = self.__element
-        _element = element.__element
-        if start:
-            text = current.text
-            if text is not None:
-                current.text = None
-                tail = _element.tail
-                if tail is None:
-                    tail = text
-                else:
-                    tail = tail + text
-                _element.tail = tail
-            position = 0
-        if position is not None:
-            current.insert(position, _element)
-        elif xmlposition is FIRST_CHILD:
-            current.insert(0, _element)
-        elif xmlposition is LAST_CHILD:
-            current.append(_element)
-        elif xmlposition is NEXT_SIBLING:
-            parent = current.getparent()
-            index = parent.index(current)  # type: ignore
-            parent.insert(index + 1, _element)  # type: ignore
-        elif xmlposition is PREV_SIBLING:
-            parent = current.getparent()
-            index = parent.index(current)  # type: ignore
-            parent.insert(index, _element)  # type: ignore
-        else:
-            raise ValueError("(xml)position must be defined")
-
-    def extend(self, odf_elements: Iterable[Element]) -> None:
-        """Fast append elements at the end of ourself using extend."""
-        if odf_elements:
-            current = self.__element
-            elements = [element.__element for element in odf_elements]
-            current.extend(elements)
-
-    def append(self, str_or_element: str | Element) -> None:
-        """Insert element or text in the last position."""
-        current = self.__element
-        if isinstance(str_or_element, str):
-            # Has children ?
-            children = list(current.iterchildren())
-            if children:
-                # Append to tail of the last child
-                last_child = children[-1]
-                text = last_child.tail
-                text = text if text is not None else ""
-                text += str_or_element
-                last_child.tail = text
-            else:
-                # Append to text of the element
-                text = current.text
-                text = text if text is not None else ""
-                text += str_or_element
-                current.text = text
-        elif isinstance(str_or_element, Element):
-            current.append(str_or_element.__element)
-        else:
-            raise TypeError(f'Element or string expected, not "{type(str_or_element)}"')
-
-    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-        """Delete the given element from the XML tree. If no element is given,
-        "self" is deleted. The XML library may allow to continue to use an
-        element now "orphan" as long as you have a reference to it.
-
-        if keep_tail is True (default), the tail text is not erased.
-
-        Arguments:
-
-            child -- Element
-
-            keep_tail -- boolean (default to True), True for most usages.
-        """
-        if child is None:
-            parent = self.parent
-            if parent is None:
-                raise ValueError(f"Can't delete the root element\n{self.serialize()}")
-            child = self
-        else:
-            parent = self
-        if keep_tail and child.__element.tail is not None:
-            current = child.__element
-            tail = str(current.tail)
-            current.tail = None
-            prev = current.getprevious()
-            if prev is not None:
-                if prev.tail is None:
-                    prev.tail = tail
-                else:
-                    prev.tail += tail
-            else:
-                if parent.__element.text is None:
-                    parent.__element.text = tail
-                else:
-                    parent.__element.text += tail
-        parent.__element.remove(child.__element)
-
-    def replace_element(self, old_element: Element, new_element: Element) -> None:
-        """Replaces in place a sub element with the element passed as second
-        argument.
-
-        Warning : no clone for old element.
-        """
-        current = self.__element
-        current.replace(old_element.__element, new_element.__element)
-
-    def strip_elements(
-        self,
-        sub_elements: Element | Iterable[Element],
-    ) -> Element | list:
-        """Remove the tags of provided elements, keeping inner childs and text.
-
-        Return : the striped element.
-
-        Warning : no clone in sub_elements list.
-
-        Arguments:
-
-            sub_elements -- Element or list of Element
-        """
-        if not sub_elements:
-            return self
-        if isinstance(sub_elements, Element):
-            sub_elements = (sub_elements,)
-        replacer = _get_lxml_tag("text:this-will-be-removed")
-        for element in sub_elements:
-            element.__element.tag = replacer
-        strip = ("text:this-will-be-removed",)
-        return self.strip_tags(strip=strip, default=None)
-
-    def strip_tags(
-        self,
-        strip: Iterable[str] | None = None,
-        protect: Iterable[str] | None = None,
-        default: str | None = "text:p",
-    ) -> Element | list:
-        """Remove the tags listed in strip, recursively, keeping inner childs
-        and text. Tags listed in protect stop the removal one level depth. If
-        the first level element is stripped, default is used to embed the
-        content in the default element. If default is None and first level is
-        striped, a list of text and children is returned. Return : the striped
-        element.
-
-        strip_tags should be used by on purpose methods (strip_span ...)
-        (Method name taken from lxml).
-
-        Arguments:
-
-            strip -- iterable list of str odf tags, or None
-
-            protect -- iterable list of str odf tags, or None
-
-            default -- str odf tag, or None
-
-        Return:
-
-            Element.
-        """
-        if not strip:
-            return self
-        if not protect:
-            protect = ()
-        protected = False
-        element, modified = Element._strip_tags(self, strip, protect, protected)
-        if modified and isinstance(element, list) and default:
-            new = Element.from_tag(default)
-            for content in element:
-                if isinstance(content, Element):
-                    new.append(content)
-                else:
-                    new.text = content
-            element = new
-        return element
-
-    @staticmethod
-    def _strip_tags(  # noqa:C901
-        element: Element,
-        strip: Iterable[str],
-        protect: Iterable[str],
-        protected: bool,
-    ) -> tuple[Element | list, bool]:
-        """Sub method for strip_tags()."""
-        element_clone = element.clone
-        modified = False
-        children = []
-        if protect and element.tag in protect:
-            protect_below = True
-        else:
-            protect_below = False
-        for child in element_clone.children:
-            striped_child, is_modified = Element._strip_tags(
-                child, strip, protect, protect_below
-            )
-            if is_modified:
-                modified = True
-            if isinstance(striped_child, list):
-                children.extend(striped_child)
-            else:
-                children.append(striped_child)
-
-        text = element_clone.text
-        tail = element_clone.tail
-        if not protected and strip and element.tag in strip:
-            element_result: list[Element | str] = []
-            if text is not None:
-                element_result.append(text)
-            for child in children:
-                element_result.append(child)
-            if tail is not None:
-                element_result.append(tail)
-            return (element_result, True)
-        else:
-            if not modified:
-                return (element, False)
-            element.clear()
-            try:
-                for key, value in element_clone.attributes.items():
-                    element.set_attribute(key, value)
-            except ValueError:
-                sys.stderr.write(f"strip_tags(): bad attribute in {element_clone}\n")
-            if text is not None:
-                element.append(text)
-            for child in children:
-                element.append(child)
-            if tail is not None:
-                element.tail = tail
-            return (element, True)
-
-    def xpath(self, xpath_query: str) -> list[Element | Text]:
-        """Apply XPath query to the element and its subtree. Return list of
-        Element or Text instances translated from the nodes found.
-        """
-        element = self.__element
-        xpath_instance = xpath_compile(xpath_query)
-        elements = xpath_instance(element)
-        result: list[Element | Text] = []
-        if hasattr(elements, "__iter__"):
-            for obj in elements:  # type: ignore
-                if isinstance(obj, (_ElementStringResult, _ElementUnicodeResult)):
-                    result.append(Text(obj))
-                elif isinstance(obj, _Element):
-                    result.append(Element.from_tag(obj))
-                # else:
-                #     result.append(obj)
-        return result
-
-    def clear(self) -> None:
-        """Remove text, children and attributes from the element."""
-        self.__element.clear()
-        if hasattr(self, "_tmap"):
-            self._tmap: list[int] = []
-        if hasattr(self, "_cmap"):
-            self._cmap: list[int] = []
-        if hasattr(self, "_rmap"):
-            self._rmap: list[int] = []
-        if hasattr(self, "_indexes"):
-            remember = False
-            if "_rmap" in self._indexes:
-                remember = True
-            self._indexes: dict[str, dict] = {}
-            self._indexes["_cmap"] = {}
-            self._indexes["_tmap"] = {}
-            if remember:
-                self._indexes["_rmap"] = {}
-
-    @property
-    def clone(self) -> Element:
-        clone = deepcopy(self.__element)
-        root = lxml_Element("ROOT", nsmap=ODF_NAMESPACES)
-        root.append(clone)
-        return self.from_tag(clone)
-
-        # slow data = tostring(self.__element, encoding='unicode')
-        # return self.from_tag(data)
-
-    @staticmethod
-    def _strip_namespaces(data: str) -> str:
-        """Remove xmlns:* fields from serialized XML."""
-        return re.sub(r' xmlns:\w*="[\w:\-\/\.#]*"', "", data)
-
-    def serialize(self, pretty: bool = False, with_ns: bool = False) -> str:
-        """Return text serialization of XML element."""
-        # This copy bypasses serialization side-effects in lxml
-        native = deepcopy(self.__element)
-        data = tostring(
-            native, with_tail=False, pretty_print=pretty, encoding="unicode"
-        )
-        if with_ns:
-            return data
-        # Remove namespaces
-        return self._strip_namespaces(data)
-
-    # Element helpers usable from any context
-
-    @property
-    def document_body(self) -> Element | None:
-        """Return the document body : 'office:body'"""
-        return self.get_element("//office:body/*[1]")
-
-    @document_body.setter
-    def document_body(self, new_body: Element) -> None:
-        """Change in place the full document body content."""
-        body = self.document_body
-        if body is None:
-            raise ValueError("//office:body not found in document")
-        tail = body.tail
-        body.clear()
-        for item in new_body.children:
-            body.append(item)
-        if tail:
-            body.tail = tail
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        """This function should return a beautiful version of the text."""
-        return ""
-
-    def get_styled_elements(self, name: str = "") -> list[Element]:
-        """Brute-force to find paragraphs, tables, etc. using the given style
-        name (or all by default).
-
-        Arguments:
-
-            name -- str
-
-        Return: list
-        """
-        # FIXME incomplete (and possibly inaccurate)
-        return (
-            self._filtered_elements("descendant::*", text_style=name)
-            + self._filtered_elements("descendant::*", draw_style=name)
-            + self._filtered_elements("descendant::*", draw_text_style=name)
-            + self._filtered_elements("descendant::*", table_style=name)
-            + self._filtered_elements("descendant::*", page_layout=name)
-            + self._filtered_elements("descendant::*", master_page=name)
-            + self._filtered_elements("descendant::*", parent_style=name)
-        )
-
-    # Common attributes
-
-    def _get_inner_text(self, tag: str) -> str | None:
-        element = self.get_element(tag)
-        if element is None:
-            return None
-        return element.text
-
-    def _set_inner_text(self, tag: str, text: str) -> None:
-        element = self.get_element(tag)
-        if element is None:
-            element = Element.from_tag(tag)
-            self.append(element)
-        element.text = text
-
-    # Dublin core
-
-    @property
-    def dc_creator(self) -> str | None:
-        """Get dc:creator value.
-
-        Return: str (or None if inexistant)
-        """
-        return self._get_inner_text("dc:creator")
-
-    @dc_creator.setter
-    def dc_creator(self, creator: str) -> None:
-        """Set dc:creator value.
-
-        Arguments:
-
-            creator -- str
-        """
-        self._set_inner_text("dc:creator", creator)
-
-    @property
-    def dc_date(self) -> datetime | None:
-        """Get the dc:date value.
-
-        Return: datetime (or None if inexistant)
-        """
-        date = self._get_inner_text("dc:date")
-        if date is None:
-            return None
-        return DateTime.decode(date)
-
-    @dc_date.setter
-    def dc_date(self, date: datetime) -> None:
-        """Set the dc:date value.
-
-        Arguments:
-
-            darz -- datetime
-        """
-        self._set_inner_text("dc:date", DateTime.encode(date))
-
-    # SVG
-
-    @property
-    def svg_title(self) -> str | None:
-        return self._get_inner_text("svg:title")
-
-    @svg_title.setter
-    def svg_title(self, title: str) -> None:
-        self._set_inner_text("svg:title", title)
-
-    @property
-    def svg_description(self) -> str | None:
-        return self._get_inner_text("svg:desc")
-
-    @svg_description.setter
-    def svg_description(self, description: str) -> None:
-        self._set_inner_text("svg:desc", description)
-
-    # Sections
-
-    def get_sections(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the sections that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Element
-        """
-        return self._filtered_elements(
-            "text:section", text_style=style, content=content
-        )
-
-    def get_section(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the section that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:section", position, content=content
-        )
-
-    # Paragraphs
-
-    def get_paragraphs(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the paragraphs that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Paragraph
-        """
-        return self._filtered_elements(
-            "descendant::text:p", text_style=style, content=content
-        )
-
-    def get_paragraph(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the paragraph that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Paragraph or None if not found
-        """
-        return self._filtered_element("descendant::text:p", position, content=content)
-
-    # Span
-
-    def get_spans(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the spans that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Span
-        """
-        return self._filtered_elements(
-            "descendant::text:span", text_style=style, content=content
-        )
-
-    def get_span(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the span that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Span or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:span", position, content=content
-        )
-
-    # Headers
-
-    def get_headers(
-        self,
-        style: str | None = None,
-        outline_level: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the Headers that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Header
-        """
-        return self._filtered_elements(
-            "descendant::text:h",
-            text_style=style,
-            outline_level=outline_level,
-            content=content,
-        )
-
-    def get_header(
-        self,
-        position: int = 0,
-        outline_level: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the Header that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Header or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:h",
-            position,
-            outline_level=outline_level,
-            content=content,
-        )
-
-    # Lists
-
-    def get_lists(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the lists that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of List
-        """
-        return self._filtered_elements(
-            "descendant::text:list", text_style=style, content=content
-        )
-
-    def get_list(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the list that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: List or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:list", position, content=content
-        )
-
-    # Frames
-
-    def get_frames(
-        self,
-        presentation_class: str | None = None,
-        style: str | None = None,
-        title: str | None = None,
-        description: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the frames that match the criteria.
-
-        Arguments:
-
-            presentation_class -- str
-
-            style -- str
-
-            title -- str regex
-
-            description -- str regex
-
-            content -- str regex
-
-        Return: list of Frame
-        """
-        return self._filtered_elements(
-            "descendant::draw:frame",
-            presentation_class=presentation_class,
-            draw_style=style,
-            svg_title=title,
-            svg_desc=description,
-            content=content,
-        )
-
-    def get_frame(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        presentation_class: str | None = None,
-        title: str | None = None,
-        description: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the section that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            presentation_class -- str
-
-            title -- str regex
-
-            description -- str regex
-
-            content -- str regex
-
-        Return: Frame or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:frame",
-            position,
-            draw_name=name,
-            presentation_class=presentation_class,
-            svg_title=title,
-            svg_desc=description,
-            content=content,
-        )
-
-    # Images
-
-    def get_images(
-        self,
-        style: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the images matching the criteria.
-
-        Arguments:
-
-            style -- str
-
-            url -- str regex
-
-            content -- str regex
-
-        Return: list of Element
-        """
-        return self._filtered_elements(
-            "descendant::draw:image", text_style=style, url=url, content=content
-        )
-
-    def get_image(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the image matching the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            url -- str regex
-
-            content -- str regex
-
-        Return: Element or None if not found
-        """
-        # The frame is holding the name
-        if name is not None:
-            frame = self._filtered_element(
-                "descendant::draw:frame", position, draw_name=name
-            )
-            if frame is None:
-                return None
-            # The name is supposedly unique
-            return frame.get_element("draw:image")
-        return self._filtered_element(
-            "descendant::draw:image", position, url=url, content=content
-        )
-
-    # Tables
-
-    def get_tables(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the tables that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Table
-        """
-        return self._filtered_elements(
-            "descendant::table:table", table_style=style, content=content
-        )
-
-    def get_table(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the table that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            content -- str regex
-
-        Return: Table or None if not found
-        """
-        if name is None and content is None:
-            result = self._filtered_element("descendant::table:table", position)
-        else:
-            result = self._filtered_element(
-                "descendant::table:table",
-                position,
-                table_name=name,
-                content=content,
-            )
-        return result
-
-    # Named Range
-
-    def get_named_ranges(self) -> list[Element]:
-        """Return all the tables named ranges.
-
-        Return: list of odf_named_range
-        """
-        named_ranges = self.get_elements(
-            "descendant::table:named-expressions/table:named-range"
-        )
-        return named_ranges
-
-    def get_named_range(self, name: str) -> Element | None:
-        """Return the named range of specified name, or None if not found.
-
-        Arguments:
-
-            name -- str
-
-        Return: NamedRange
-        """
-        named_range = self.get_elements(
-            f'descendant::table:named-expressions/table:named-range[@table:name="{name}"][1]'
-        )
-        if named_range:
-            return named_range[0]
-        else:
-            return None
-
-    def append_named_range(self, named_range: Element) -> None:
-        """Append the named range to the spreadsheet, replacing existing named
-        range of same name if any.
-
-        Arguments:
-
-            named_range --  NamedRange
-        """
-        if self.tag != "office:spreadsheet":
-            raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
-        named_expressions = self.get_element("table:named-expressions")
-        if not named_expressions:
-            named_expressions = Element.from_tag("table:named-expressions")
-            self.append(named_expressions)
-        # exists ?
-        current = named_expressions.get_element(
-            f'table:named-range[@table:name="{named_range.name}"][1]'  # type:ignore
-        )
-        if current:
-            named_expressions.delete(current)
-        named_expressions.append(named_range)
-
-    def delete_named_range(self, name: str) -> None:
-        """Delete the Named Range of specified name from the spreadsheet.
-
-        Arguments:
-
-            name -- str
-        """
-        if self.tag != "office:spreadsheet":
-            raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
-        named_range = self.get_named_range(name)
-        if not named_range:
-            return
-        named_range.delete()
-        named_expressions = self.get_element("table:named-expressions")
-        if not named_expressions:
-            return
-        element = named_expressions.__element
-        children = list(element.iterchildren())
-        if not children:
-            self.delete(named_expressions)
-
-    # Notes
-
-    def get_notes(
-        self,
-        note_class: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the notes that match the criteria.
-
-        Arguments:
-
-            note_class -- 'footnote' or 'endnote'
-
-            content -- str regex
-
-        Return: list of Note
-        """
-        return self._filtered_elements(
-            "descendant::text:note", note_class=note_class, content=content
-        )
-
-    def get_note(
-        self,
-        position: int = 0,
-        note_id: str | None = None,
-        note_class: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the note that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            note_id -- str
-
-            note_class -- 'footnote' or 'endnote'
-
-            content -- str regex
-
-        Return: Note or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:note",
-            position,
-            text_id=note_id,
-            note_class=note_class,
-            content=content,
-        )
-
-    # Annotations
-
-    def get_annotations(
-        self,
-        creator: str | None = None,
-        start_date: datetime | None = None,
-        end_date: datetime | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the annotations that match the criteria.
-
-        Arguments:
-
-            creator -- str
-
-            start_date -- datetime instance
-
-            end_date --  datetime instance
-
-            content -- str regex
-
-        Return: list of Annotation
-        """
-        annotations = []
-        for annotation in self._filtered_elements(
-            "descendant::office:annotation", content=content
-        ):
-            if creator is not None and creator != annotation.dc_creator:
-                continue
-            date = annotation.dc_date
-            if date is None:
-                continue
-            if start_date is not None and date < start_date:
-                continue
-            if end_date is not None and date >= end_date:
-                continue
-            annotations.append(annotation)
-        return annotations
-
-    def get_annotation(
-        self,
-        position: int = 0,
-        creator: str | None = None,
-        start_date: datetime | None = None,
-        end_date: datetime | None = None,
-        content: str | None = None,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the annotation that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            creator -- str
-
-            start_date -- datetime instance
-
-            end_date -- datetime instance
-
-            content -- str regex
-
-            name -- str
-
-        Return: Annotation or None if not found
-        """
-        if name is not None:
-            return self._filtered_element(
-                "descendant::office:annotation", 0, office_name=name
-            )
-        annotations = self.get_annotations(
-            creator=creator, start_date=start_date, end_date=end_date, content=content
-        )
-        if not annotations:
-            return None
-        try:
-            return annotations[position]
-        except IndexError:
-            return None
-
-    def get_annotation_ends(self) -> list[Element]:
-        """Return all the annotation ends.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::office:annotation-end")
-
-    def get_annotation_end(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the annotation end that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::office:annotation-end", position, office_name=name
-        )
-
-    # office:names
-
-    def get_office_names(self) -> list[str]:
-        """Return all the used office:name tags values of the element.
-
-        Return: list of unique str
-        """
-        name_xpath_query = xpath_compile("//@office:name")
-        response = name_xpath_query(self.__element)
-        if not isinstance(response, list):
-            return []
-        return list({str(name) for name in response if name})
-
-    # Variables
-
-    def get_variable_decls(self) -> Element:
-        """Return the container for variable declarations. Created if not
-        found.
-
-        Return: Element
-        """
-        variable_decls = self.get_element("//text:variable-decls")
-        if variable_decls is None:
-            body = self.document_body
-            if not body:
-                raise ValueError("Empty document.body")
-            body.insert(Element.from_tag("text:variable-decls"), FIRST_CHILD)
-            variable_decls = body.get_element("//text:variable-decls")
-
-        return variable_decls  # type:ignore
-
-    def get_variable_decl_list(self) -> list[Element]:
-        """Return all the variable declarations.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:variable-decl")
-
-    def get_variable_decl(self, name: str, position: int = 0) -> Element | None:
-        """return the variable declaration for the given name.
-
-        Arguments:
-
-            name -- str
-
-            position -- int
-
-        return: Element or none if not found
-        """
-        return self._filtered_element(
-            "descendant::text:variable-decl", position, text_name=name
-        )
-
-    def get_variable_sets(self, name: str | None = None) -> list[Element]:
-        """Return all the variable sets that match the criteria.
-
-        Arguments:
-
-            name -- str
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:variable-set", text_name=name)
-
-    def get_variable_set(self, name: str, position: int = -1) -> Element | None:
-        """Return the variable set for the given name (last one by default).
-
-        Arguments:
-
-            name -- str
-
-            position -- int
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:variable-set", position, text_name=name
-        )
-
-    def get_variable_set_value(
-        self,
-        name: str,
-        value_type: str | None = None,
-    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-        """Return the last value of the given variable name.
-
-        Arguments:
-
-            name -- str
-
-            value_type -- 'boolean', 'currency', 'date', 'float',
-                          'percentage', 'string', 'time' or automatic
-
-        Return: most appropriate Python type
-        """
-        variable_set = self.get_variable_set(name)
-        if not variable_set:
-            return None
-        return variable_set.get_value(value_type)  # type: ignore
-
-    # User fields
-
-    def get_user_field_decls(self) -> Element | None:
-        """Return the container for user field declarations. Created if not
-        found.
-
-        Return: Element
-        """
-        user_field_decls = self.get_element("//text:user-field-decls")
-        if user_field_decls is None:
-            body = self.document_body
-            if not body:
-                raise ValueError("Empty document.body")
-            body.insert(Element.from_tag("text:user-field-decls"), FIRST_CHILD)
-            user_field_decls = body.get_element("//text:user-field-decls")
-
-        return user_field_decls
-
-    def get_user_field_decl_list(self) -> list[Element]:
-        """Return all the user field declarations.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:user-field-decl")
-
-    def get_user_field_decl(self, name: str, position: int = 0) -> Element | None:
-        """return the user field declaration for the given name.
-
-        return: Element or none if not found
-        """
-        return self._filtered_element(
-            "descendant::text:user-field-decl", position, text_name=name
-        )
-
-    def get_user_field_value(
-        self, name: str, value_type: str | None = None
-    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-        """Return the value of the given user field name.
-
-        Arguments:
-
-            name -- str
-
-            value_type -- 'boolean', 'currency', 'date', 'float',
-                          'percentage', 'string', 'time' or automatic
-
-        Return: most appropriate Python type
-        """
-        user_field_decl = self.get_user_field_decl(name)
-        if user_field_decl is None:
-            return None
-        return user_field_decl.get_value(value_type)  # type: ignore
-
-    # User defined fields
-    # They are fields who should contain a copy of a user defined medtadata
-
-    def get_user_defined_list(self) -> list[Element]:
-        """Return all the user defined field declarations.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:user-defined")
-
-    def get_user_defined(self, name: str, position: int = 0) -> Element | None:
-        """return the user defined declaration for the given name.
-
-        return: Element or none if not found
-        """
-        return self._filtered_element(
-            "descendant::text:user-defined", position, text_name=name
-        )
-
-    def get_user_defined_value(
-        self, name: str, value_type: str | None = None
-    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-        """Return the value of the given user defined field name.
-
-        Arguments:
-
-            name -- str
-
-            value_type -- 'boolean', 'date', 'float',
-                          'string', 'time' or automatic
-
-        Return: most appropriate Python type
-        """
-        user_defined = self.get_user_defined(name)
-        if user_defined is None:
-            return None
-        return user_defined.get_value(value_type)  # type: ignore
-
-    # Draw Pages
-
-    def get_draw_pages(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw pages that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of DrawPage
-        """
-        return self._filtered_elements(
-            "descendant::draw:page", draw_style=style, content=content
-        )
-
-    def get_draw_page(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw page that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            content -- str regex
-
-        Return: DrawPage or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:page", position, draw_name=name, content=content
-        )
-
-    # Links
-
-    def get_links(
-        self,
-        name: str | None = None,
-        title: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the links that match the criteria.
-
-        Arguments:
-
-            name -- str
-
-            title -- str
-
-            url -- str regex
-
-            content -- str regex
-
-        Return: list of Element
-        """
-        return self._filtered_elements(
-            "descendant::text:a",
-            office_name=name,
-            office_title=title,
-            url=url,
-            content=content,
-        )
-
-    def get_link(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        title: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the link that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            title -- str
-
-            url -- str regex
-
-            content -- str regex
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:a",
-            position,
-            office_name=name,
-            office_title=title,
-            url=url,
-            content=content,
-        )
-
-    # Bookmarks
-
-    def get_bookmarks(self) -> list[Element]:
-        """Return all the bookmarks.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:bookmark")
-
-    def get_bookmark(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the bookmark that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Bookmark or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:bookmark", position, text_name=name
-        )
-
-    def get_bookmark_starts(self) -> list[Element]:
-        """Return all the bookmark starts.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:bookmark-start")
-
-    def get_bookmark_start(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the bookmark start that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:bookmark-start", position, text_name=name
-        )
-
-    def get_bookmark_ends(self) -> list[Element]:
-        """Return all the bookmark ends.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:bookmark-end")
-
-    def get_bookmark_end(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the bookmark end that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:bookmark-end", position, text_name=name
-        )
-
-    # Reference marks
-
-    def get_reference_marks_single(self) -> list[Element]:
-        """Return all the reference marks. Search only the tags
-        text:reference-mark.
-        Consider using : get_reference_marks()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:reference-mark")
-
-    def get_reference_mark_single(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the reference mark that matches the criteria. Search only the
-        tags text:reference-mark.
-        Consider using : get_reference_mark()
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:reference-mark", position, text_name=name
-        )
-
-    def get_reference_mark_starts(self) -> list[Element]:
-        """Return all the reference mark starts. Search only the tags
-        text:reference-mark-start.
-        Consider using : get_reference_marks()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:reference-mark-start")
-
-    def get_reference_mark_start(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the reference mark start that matches the criteria. Search
-        only the tags text:reference-mark-start.
-        Consider using : get_reference_mark()
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:reference-mark-start", position, text_name=name
-        )
-
-    def get_reference_mark_ends(self) -> list[Element]:
-        """Return all the reference mark ends. Search only the tags
-        text:reference-mark-end.
-        Consider using : get_reference_marks()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:reference-mark-end")
-
-    def get_reference_mark_end(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the reference mark end that matches the criteria. Search only
-        the tags text:reference-mark-end.
-        Consider using : get_reference_marks()
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:reference-mark-end", position, text_name=name
-        )
-
-    def get_reference_marks(self) -> list[Element]:
-        """Return all the reference marks, either single position reference
-        (text:reference-mark) or start of range reference
-        (text:reference-mark-start).
-
-        Return: list of Element
-        """
-        return self._filtered_elements(
-            "descendant::text:reference-mark-start | descendant::text:reference-mark"
-        )
-
-    def get_reference_mark(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the reference mark that match the criteria. Either single
-        position reference mark (text:reference-mark) or start of range
-        reference (text:reference-mark-start).
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        if name:
-            request = (
-                f"descendant::text:reference-mark-start"
-                f'[@text:name="{name}"] '
-                f"| descendant::text:reference-mark"
-                f'[@text:name="{name}"]'
-            )
-            return self._filtered_element(request, position=0)
-        request = (
-            "descendant::text:reference-mark-start | descendant::text:reference-mark"
-        )
-        return self._filtered_element(request, position)
-
-    def get_references(self, name: str | None = None) -> list[Element]:
-        """Return all the references (text:reference-ref). If name is
-        provided, returns the references of that name.
-
-        Return: list of Element
-
-        Arguments:
-
-            name -- str or None
-        """
-        if name is None:
-            return self._filtered_elements("descendant::text:reference-ref")
-        request = f'descendant::text:reference-ref[@text:ref-name="{name}"]'
-        return self._filtered_elements(request)
-
-    # Shapes elements
-
-    # Groups
-
-    def get_draw_groups(
-        self,
-        title: str | None = None,
-        description: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        return self._filtered_elements(
-            "descendant::draw:g",
-            svg_title=title,
-            svg_desc=description,
-            content=content,
-        )
-
-    def get_draw_group(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        title: str | None = None,
-        description: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        return self._filtered_element(
-            "descendant::draw:g",
-            position,
-            draw_name=name,
-            svg_title=title,
-            svg_desc=description,
-            content=content,
-        )
-
-    # Lines
-
-    def get_draw_lines(
-        self,
-        draw_style: str | None = None,
-        draw_text_style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw lines that match the criteria.
-
-        Arguments:
-
-            draw_style -- str
-
-            draw_text_style -- str
-
-            content -- str regex
-
-        Return: list of odf_shape
-        """
-        return self._filtered_elements(
-            "descendant::draw:line",
-            draw_style=draw_style,
-            draw_text_style=draw_text_style,
-            content=content,
-        )
-
-    def get_draw_line(
-        self,
-        position: int = 0,
-        id: str | None = None,  # noqa:A002
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw line that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            id -- str
-
-            content -- str regex
-
-        Return: odf_shape or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:line", position, draw_id=id, content=content
-        )
-
-    # Rectangles
-
-    def get_draw_rectangles(
-        self,
-        draw_style: str | None = None,
-        draw_text_style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw rectangles that match the criteria.
-
-        Arguments:
-
-            draw_style -- str
-
-            draw_text_style -- str
-
-            content -- str regex
-
-        Return: list of odf_shape
-        """
-        return self._filtered_elements(
-            "descendant::draw:rect",
-            draw_style=draw_style,
-            draw_text_style=draw_text_style,
-            content=content,
-        )
-
-    def get_draw_rectangle(
-        self,
-        position: int = 0,
-        id: str | None = None,  # noqa:A002
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw rectangle that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            id -- str
-
-            content -- str regex
-
-        Return: odf_shape or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:rect", position, draw_id=id, content=content
-        )
-
-    # Ellipse
-
-    def get_draw_ellipses(
-        self,
-        draw_style: str | None = None,
-        draw_text_style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw ellipses that match the criteria.
-
-        Arguments:
-
-            draw_style -- str
-
-            draw_text_style -- str
-
-            content -- str regex
-
-        Return: list of odf_shape
-        """
-        return self._filtered_elements(
-            "descendant::draw:ellipse",
-            draw_style=draw_style,
-            draw_text_style=draw_text_style,
-            content=content,
-        )
-
-    def get_draw_ellipse(
-        self,
-        position: int = 0,
-        id: str | None = None,  # noqa:A002
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw ellipse that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            id -- str
-
-            content -- str regex
-
-        Return: odf_shape or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:ellipse", position, draw_id=id, content=content
-        )
-
-    # Connectors
-
-    def get_draw_connectors(
-        self,
-        draw_style: str | None = None,
-        draw_text_style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw connectors that match the criteria.
-
-        Arguments:
-
-            draw_style -- str
-
-            draw_text_style -- str
-
-            content -- str regex
-
-        Return: list of odf_shape
-        """
-        return self._filtered_elements(
-            "descendant::draw:connector",
-            draw_style=draw_style,
-            draw_text_style=draw_text_style,
-            content=content,
-        )
-
-    def get_draw_connector(
-        self,
-        position: int = 0,
-        id: str | None = None,  # noqa:A002
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw connector that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            id -- str
-
-            content -- str regex
-
-        Return: odf_shape or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:connector", position, draw_id=id, content=content
-        )
-
-    def get_orphan_draw_connectors(self) -> list[Element]:
-        """Return a list of connectors which don't have any shape connected
-        to them.
-        """
-        connectors = []
-        for connector in self.get_draw_connectors():
-            start_shape = connector.get_attribute("draw:start-shape")
-            end_shape = connector.get_attribute("draw:end-shape")
-            if start_shape is None and end_shape is None:
-                connectors.append(connector)
-        return connectors
-
-    # Tracked changes and text change
-
-    def get_tracked_changes(self) -> Element | None:
-        """Return the tracked-changes part in the text body."""
-        return self.get_element("//text:tracked-changes")
-
-    def get_changes_ids(self) -> list[Element | Text]:
-        """Return a list of ids that refers to a change region in the tracked
-        changes list.
-        """
-        # Insertion changes
-        xpath_query = "descendant::text:change-start/@text:change-id"
-        # Deletion changes
-        xpath_query += " | descendant::text:change/@text:change-id"
-        return self.xpath(xpath_query)
-
-    def get_text_change_deletions(self) -> list[Element]:
-        """Return all the text changes of deletion kind: the tags text:change.
-        Consider using : get_text_changes()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:text:change")
-
-    def get_text_change_deletion(
-        self,
-        position: int = 0,
-        idx: str | None = None,
-    ) -> Element | None:
-        """Return the text change of deletion kind that matches the criteria.
-        Search only for the tags text:change.
-        Consider using : get_text_change()
-
-        Arguments:
-
-            position -- int
-
-            idx -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:change", position, change_id=idx
-        )
-
-    def get_text_change_starts(self) -> list[Element]:
-        """Return all the text change-start. Search only for the tags
-        text:change-start.
-        Consider using : get_text_changes()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:change-start")
-
-    def get_text_change_start(
-        self,
-        position: int = 0,
-        idx: str | None = None,
-    ) -> Element | None:
-        """Return the text change-start that matches the criteria. Search
-        only the tags text:change-start.
-        Consider using : get_text_change()
-
-        Arguments:
-
-            position -- int
-
-            idx -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:change-start", position, change_id=idx
-        )
-
-    def get_text_change_ends(self) -> list[Element]:
-        """Return all the text change-end. Search only the tags
-        text:change-end.
-        Consider using : get_text_changes()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:change-end")
-
-    def get_text_change_end(
-        self,
-        position: int = 0,
-        idx: str | None = None,
-    ) -> Element | None:
-        """Return the text change-end that matches the criteria. Search only
-        the tags text:change-end.
-        Consider using : get_text_change()
-
-        Arguments:
-
-            position -- int
-
-            idx -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:change-end", position, change_id=idx
-        )
-
-    def get_text_changes(self) -> list[Element]:
-        """Return all the text changes, either single deletion
-        (text:change) or start of range of changes (text:change-start).
-
-        Return: list of Element
-        """
-        request = "descendant::text:change-start | descendant::text:change"
-        return self._filtered_elements(request)
-
-    def get_text_change(
-        self,
-        position: int = 0,
-        idx: str | None = None,
-    ) -> Element | None:
-        """Return the text change that matches the criteria. Either single
-        deletion (text:change) or start of range of changes (text:change-start).
-        position : index of the element to retrieve if several matches, default
-        is 0.
-        idx : change-id of the element.
-
-        Arguments:
-
-            position -- int
-
-            idx -- str
-
-        Return: Element or None if not found
-        """
-        if idx:
-            request = (
-                f'descendant::text:change-start[@text:change-id="{idx}"] '
-                f'| descendant::text:change[@text:change-id="{idx}"]'
-            )
-            return self._filtered_element(request, 0)
-        request = "descendant::text:change-start | descendant::text:change"
-        return self._filtered_element(request, position)
-
-    # Table Of Content
-
-    def get_tocs(self) -> list[Element]:
-        """Return all the tables of contents.
-
-        Return: list of odf_toc
-        """
-        return self._filtered_elements("text:table-of-content")
-
-    def get_toc(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the table of contents that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: odf_toc or None if not found
-        """
-        return self._filtered_element(
-            "text:table-of-content", position, content=content
-        )
-
-    # Styles
-
-    @staticmethod
-    def _get_style_tagname(family: str | None, is_default: bool = False) -> str:
-        """Widely match possible tag names given the family (or not)."""
-        if not family:
-            tagname = "(style:default-style|*[@style:name]|draw:fill-image|draw:marker)"
-        elif is_default:
-            # Default style
-            tagname = "style:default-style"
-        else:
-            tagname = _family_style_tagname(family)
-            # if famattr:
-            #    # Include family default style
-            #    tagname = '(%s|style:default-style)' % tagname
-            if family in FAMILY_ODF_STD:
-                # Include family default style
-                tagname = f"({tagname}|style:default-style)"
-        return tagname
-
-    def get_styles(self, family: str | None = None) -> list[Element]:
-        # Both common and default styles
-        tagname = self._get_style_tagname(family)
-        return self._filtered_elements(tagname, family=family)
-
-    def get_style(
-        self,
-        family: str,
-        name_or_element: str | Element | None = None,
-        display_name: str | None = None,
-    ) -> Element | None:
-        """Return the style uniquely identified by the family/name pair. If
-        the argument is already a style object, it will return it.
-
-        If the name is not the internal name but the name you gave in the
-        desktop application, use display_name instead.
-
-        Arguments:
-
-            family -- 'paragraph', 'text', 'graphic', 'table', 'list',
-                      'number'
-
-            name_or_element -- str or Style
-
-            display_name -- str
-
-        Return: odf_style or None if not found
-        """
-        if isinstance(name_or_element, Element):
-            name = self.get_attribute("style:name")
-            if name is not None:
-                return name_or_element
-            else:
-                raise ValueError(f"Not a odf_style ? {name_or_element!r}")
-        style_name = name_or_element
-        is_default = not (style_name or display_name)
-        tagname = self._get_style_tagname(family, is_default=is_default)
-        # famattr became None if no "style:family" attribute
-        if family:
-            return self._filtered_element(
-                tagname,
-                0,
-                style_name=style_name,
-                display_name=display_name,
-                family=family,
-            )
-        else:
-            return self._filtered_element(
-                tagname,
-                0,
-                draw_name=style_name or display_name,
-                family=family,
-            )
-
-    def _filtered_element(
-        self,
-        query_string: str,
-        position: int,
-        **kwargs: Any,
-    ) -> Element | None:
-        results = self._filtered_elements(query_string, **kwargs)
-        try:
-            return results[position]
-        except IndexError:
-            return None
-
-    def _filtered_elements(
-        self,
-        query_string: str,
-        content: str | None = None,
-        url: str | None = None,
-        svg_title: str | None = None,
-        svg_desc: str | None = None,
-        dc_creator: str | None = None,
-        dc_date: datetime | None = None,
-        **kwargs: Any,
-    ) -> list[Element]:
-        query = make_xpath_query(query_string, **kwargs)
-        elements = self.get_elements(query)
-        # Filter the elements with the regex (TODO use XPath)
-        if content is not None:
-            elements = [element for element in elements if element.match(content)]
-        if url is not None:
-            filtered = []
-            for element in elements:
-                url_attr = element.get_attribute("xlink:href")
-                if isinstance(url_attr, str) and search(url, url_attr) is not None:
-                    filtered.append(element)
-            elements = filtered
-        if dc_date is None:
-            dt_dc_date = None
-        else:
-            dt_dc_date = DateTime.encode(dc_date)
-        for variable, childname in [
-            (svg_title, "svg:title"),
-            (svg_desc, "svg:desc"),
-            (dc_creator, "descendant::dc:creator"),
-            (dt_dc_date, "descendant::dc:date"),
-        ]:
-            if not variable:
-                continue
-            filtered = []
-            for element in elements:
-                child = element.get_element(childname)
-                if child and child.match(variable):
-                    filtered.append(element)
-            elements = filtered
-        return elements
-
-
-
-
-
-
-
-

Functions

-
-
-def register_element_class(cls: type[Element]) ‑> None -
-
-

Associate a qualified element name to a Python class that handles this -type of element.

-

Getting the right Python class when loading an existing ODF document is -then transparent. Unassociated elements will be handled by the base -Element class.

-

Arguments

-

cls – Python class, subtype of Element.

-
- -Expand source code - -
def register_element_class(cls: type[Element]) -> None:
-    """Associate a qualified element name to a Python class that handles this
-    type of element.
-
-    Getting the right Python class when loading an existing ODF document is
-    then transparent. Unassociated elements will be handled by the base
-    Element class.
-
-    Arguments:
-
-        cls -- Python class, subtype of Element.
-    """
-    # Turn tag name into what lxml is expecting
-    _register_element_class(cls, cls._tag)
-
-
-
-def register_element_class_list(cls: type[Element], tag_list: Iterable[str]) ‑> None -
-
-

Associate a qualified element name to a Python class that handles this -type of element.

-

Getting the right Python class when loading an existing ODF document is -then transparent. Unassociated elements will be handled by the base -Element class.

-

Most styles use the "style:style" qualified name and only differ by their -"style:family" attribute. So the "family" attribute was added to register -specialized style classes.

-

Arguments

-

cls – Python class

-

tag_list – iterable of qname tags for the class

-
- -Expand source code - -
def register_element_class_list(cls: type[Element], tag_list: Iterable[str]) -> None:
-    """Associate a qualified element name to a Python class that handles this
-    type of element.
-
-    Getting the right Python class when loading an existing ODF document is
-    then transparent. Unassociated elements will be handled by the base
-    Element class.
-
-    Most styles use the "style:style" qualified name and only differ by their
-    "style:family" attribute. So the "family" attribute was added to register
-    specialized style classes.
-
-    Arguments:
-
-        cls -- Python class
-
-        tag_list -- iterable of qname tags for the class
-    """
-    # Turn tag name into what lxml is expecting
-    for qname in tag_list:
-        _register_element_class(cls, qname)
-
-
-
-def xpath_compile(path: str) ‑> lxml.etree.XPath -
-
-
-
- -Expand source code - -
@cache
-def xpath_compile(path: str) -> XPath:
-    return XPath(path, namespaces=ODF_NAMESPACES, regexp=False)
-
-
-
-
-
-

Classes

-
-
-class Element -(**kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class Element(CachedElement):
-    """Super class of all ODF classes.
-
-    Representation of an XML element. Abstraction of the XML library behind.
-    """
-
-    _tag: str = ""
-    _caching: bool = False
-    _properties: tuple[PropDef, ...] = ()
-
-    def __init__(self, **kwargs: Any) -> None:
-        tag_or_elem = kwargs.pop("tag_or_elem", None)
-        if tag_or_elem is None:
-            # Instance for newly created object: create new lxml element and
-            # continue by subclass __init__
-            # If the tag key word exists, make a custom element
-            self._do_init = True
-            tag = kwargs.pop("tag", self._tag)
-            self.__element = self.make_etree_element(tag)
-        else:
-            # called with an existing lxml element, sould be a result of
-            # from_tag() casting, do not execute the subclass __init__
-            if not isinstance(tag_or_elem, _Element):
-                raise TypeError(f'"{type(tag_or_elem)}" is not an element node')
-            self._do_init = False
-            self.__element = tag_or_elem
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} tag={self.tag}>"
-
-    def __str__(self) -> str:
-        return self.text_recursive
-
-    @classmethod
-    def from_tag(cls, tag_or_elem: str | _Element) -> Element:
-        """Element class and subclass factory.
-
-        Turn an lxml Element or ODF string tag into an ODF XML Element
-        of the relevant class.
-
-        Arguments:
-
-            tag_or_elem -- ODF str tag or lxml.Element
-
-        Return: Element (or subclass) instance
-        """
-        if isinstance(tag_or_elem, str):
-            # assume the argument is a prefix:name tag
-            elem = cls.make_etree_element(tag_or_elem)
-        else:
-            elem = tag_or_elem
-        klass = _class_registry.get(elem.tag, cls)
-        return klass(tag_or_elem=elem)
-
-    @classmethod
-    def from_tag_for_clone(
-        cls: type,
-        tree_element: _Element,
-        cache: tuple | None,
-    ) -> Element:
-        tag = to_str(tree_element.tag)
-        klass = _class_registry.get(tag, cls)
-        element = klass(tag_or_elem=tree_element)
-        if cache and element._caching:
-            element._tmap = cache[0]
-            element._cmap = cache[1]
-            if len(cache) == 3:
-                element._rmap = cache[2]
-        return element
-
-    @staticmethod
-    def make_etree_element(tag: str) -> _Element:
-        if not isinstance(tag, str):
-            raise TypeError(f"Tag is not str: {tag!r}")
-        tag = tag.strip()
-        if not tag:
-            raise ValueError("Tag is empty")
-        if "<" not in tag:
-            # Qualified name
-            # XXX don't build the element from scratch or lxml will pollute with
-            # repeated namespace declarations
-            tag = f"<{tag}/>"
-        # XML fragment
-        root = fromstring(NAMESPACES_XML % str_to_bytes(tag))
-        return root[0]
-
-    @staticmethod
-    def _generic_attrib_getter(attr_name: str, family: str | None = None) -> Callable:
-        name = _get_lxml_tag(attr_name)
-
-        def getter(self: Element) -> str | bool | None:
-            try:
-                if family and self.family != family:  # type: ignore
-                    return None
-            except AttributeError:
-                return None
-            value = self.__element.get(name)
-            if value is None:
-                return None
-            elif value in ("true", "false"):
-                return Boolean.decode(value)
-            return str(value)
-
-        return getter
-
-    @staticmethod
-    def _generic_attrib_setter(attr_name: str, family: str | None = None) -> Callable:
-        name = _get_lxml_tag(attr_name)
-
-        def setter(self: Element, value: Any) -> None:
-            try:
-                if family and self.family != family:  # type: ignore
-                    return None
-            except AttributeError:
-                return None
-            if value is None:
-                with contextlib.suppress(KeyError):
-                    del self.__element.attrib[name]
-                return
-            if isinstance(value, bool):
-                value = Boolean.encode(value)
-            self.__element.set(name, str(value))
-
-        return setter
-
-    @classmethod
-    def _define_attribut_property(cls: type[Element]) -> None:
-        for prop in cls._properties:
-            setattr(
-                cls,
-                prop.name,
-                property(
-                    cls._generic_attrib_getter(prop.attr, prop.family or None),
-                    cls._generic_attrib_setter(prop.attr, prop.family or None),
-                    None,
-                    f"Get/set the attribute {prop.attr}",
-                ),
-            )
-
-    @staticmethod
-    def _make_before_regex(
-        before: str | None,
-        after: str | None,
-    ) -> re.Pattern:
-        # 1) before xor after is not None
-        if before is not None:
-            return re.compile(before)
-        else:
-            if after is None:
-                raise ValueError("Both 'before' and 'after' are None")
-            return re.compile(after)
-
-    @staticmethod
-    def _search_negative_position(
-        xpath_result: list,
-        regex: re.Pattern,
-    ) -> tuple[str, re.Match]:
-        # Found the last text that matches the regex
-        text = None
-        for a_text in xpath_result:
-            if regex.search(str(a_text)) is not None:
-                text = a_text
-        if text is None:
-            raise ValueError(f"Text not found: '{xpath_result}'")
-        if not isinstance(text, str):
-            raise TypeError(f"Text not found or text not of type str: '{text}'")
-        return text, list(regex.finditer(text))[-1]
-
-    @staticmethod
-    def _search_positive_position(
-        xpath_result: list,
-        regex: re.Pattern,
-        position: int,
-    ) -> tuple[str, re.Match]:
-        # Found the last text that matches the regex
-        count = 0
-        for text in xpath_result:
-            found_nb = len(regex.findall(str(text)))
-            if found_nb + count >= position + 1:
-                break
-            count += found_nb
-        else:
-            raise ValueError(f"Text not found: '{xpath_result}'")
-        if not isinstance(text, str):
-            raise TypeError(f"Text not found or text not of type str: '{text}'")
-        return text, list(regex.finditer(text))[position - count]
-
-    def _insert_before_after(
-        self,
-        current: _Element,
-        element: _Element,
-        before: str | None,
-        after: str | None,
-        position: int,
-        xpath_text: XPath,
-    ) -> tuple[int, str]:
-        regex = self._make_before_regex(before, after)
-        xpath_result = xpath_text(current)
-        if not isinstance(xpath_result, list):
-            raise TypeError("Bad XPath result")
-        # position = -1
-        if position < 0:
-            text, sre = self._search_negative_position(xpath_result, regex)
-        # position >= 0
-        else:
-            text, sre = self._search_positive_position(xpath_result, regex, position)
-        # Compute pos
-        if before is None:
-            pos = sre.end()
-        else:
-            pos = sre.start()
-        return pos, text
-
-    def _insert_find_text(
-        self,
-        current: _Element,
-        element: _Element,
-        before: str | None,
-        after: str | None,
-        position: int,
-        xpath_text: XPath,
-    ) -> tuple[int, str]:
-        # Find the text
-        xpath_result = xpath_text(current)
-        if not isinstance(xpath_result, list):
-            raise TypeError("Bad XPath result")
-        count = 0
-        for text in xpath_result:
-            if not isinstance(text, str):
-                continue
-            found_nb = len(text)
-            if found_nb + count >= position:
-                break
-            count += found_nb
-        else:
-            raise ValueError("Text not found")
-        # We insert before the character
-        pos = position - count
-        return pos, text
-
-    def _insert(
-        self,
-        element: Element,
-        before: str | None = None,
-        after: str | None = None,
-        position: int = 0,
-        main_text: bool = False,
-    ) -> None:
-        """Insert an element before or after the characters in the text which
-        match the regex before/after.
-
-        When the regex matches more of one part of the text, position can be
-        set to choice which part must be used. If before and after are None,
-        we use only position that is the number of characters. If position is
-        positive and before=after=None, we insert before the position
-        character. But if position=-1, we insert after the last character.
-
-
-        Arguments:
-
-        element -- Element
-
-        before -- str regex
-
-        after -- str regex
-
-        position -- int
-        """
-        # not implemented: if main_text is True, filter out the annotations texts in computation.
-        current = self.__element
-        xelement = element.__element
-
-        if main_text:
-            xpath_text = _xpath_text_main_descendant
-        else:
-            xpath_text = _xpath_text_descendant
-
-        # 1) before xor after is not None
-        if (before is not None) ^ (after is not None):
-            pos, text = self._insert_before_after(
-                current,
-                xelement,
-                before,
-                after,
-                position,
-                xpath_text,
-            )
-        # 2) before=after=None => only with position
-        elif before is None and after is None:
-            # Hack if position is negative => quickly
-            if position < 0:
-                current.append(xelement)
-                return
-            pos, text = self._insert_find_text(
-                current,
-                xelement,
-                before,
-                after,
-                position,
-                xpath_text,
-            )
-        else:
-            raise ValueError("bad combination of arguments")
-
-        # Compute new texts
-        text_before = text[:pos] if text[:pos] else None
-        text_after = text[pos:] if text[pos:] else None
-
-        # Insert!
-        parent = text.getparent()  # type: ignore
-        if text.is_text:  # type: ignore
-            parent.text = text_before
-            element.tail = text_after
-            parent.insert(0, xelement)
-        else:
-            parent.addnext(xelement)
-            parent.tail = text_before
-            element.tail = text_after
-
-    def _insert_between(  # noqa: C901
-        self,
-        element: Element,
-        from_: str,
-        to: str,
-    ) -> None:
-        """Insert the given empty element to wrap the text beginning with
-        "from_" and ending with "to".
-
-        Example 1: '<p>toto tata titi</p>
-
-        We want to insert a link around "tata".
-
-        Result 1: '<p>toto <a>tata</a> titi</p>
-
-        Example 2: '<p><span>toto</span> tata titi</p>
-
-        We want to insert a link around "tata".
-
-        Result 2: '<p><span>toto</span> <a>tata</a> titi</p>
-
-        Example 3: '<p>toto <span> tata </span> titi</p>'
-
-        We want to insert a link from "tata" to "titi" included.
-
-        Result 3: '<p>toto <span> </span>'
-                  '<a><span>tata </span> titi</a></p>'
-
-        Example 4: '<p>toto <span>tata titi</span> tutu</p>'
-
-        We want to insert a link from "titi" to "tutu"
-
-        Result 4: '<p>toto <span>tata </span><a><span>titi</span></a>'
-                  '<a> tutu</a></p>'
-
-        Example 5: '<p>toto <span>tata titi</span> '
-                   '<span>tutu tyty</span></p>'
-
-        We want to insert a link from "titi" to "tutu"
-
-        Result 5: '<p>toto <span>tata </span><a><span>titi</span><a> '
-                  '<a> <span>tutu</span></a><span> tyty</span></p>'
-        """
-        current = self.__element
-        wrapper = element.__element
-
-        xpath_result = _xpath_text_descendant(current)
-        if not isinstance(xpath_result, list):
-            raise TypeError("Bad XPath result")
-
-        for text in xpath_result:
-            if not isinstance(text, str):
-                raise TypeError("Text not found or text not of type str")
-            if from_ not in text:
-                continue
-            from_index = text.index(from_)
-            text_before = text[:from_index]
-            text_after = text[from_index:]
-            from_container = text.getparent()  # type: ignore
-            if not isinstance(from_container, _Element):
-                raise TypeError("Bad XPath result")
-            # Include from_index to match a single word
-            to_index = text.find(to, from_index)
-            if to_index >= 0:
-                # Simple case: "from" and "to" in the same element
-                to_end = to_index + len(to)
-                if text.is_text:  # type: ignore
-                    from_container.text = text_before
-                    wrapper.text = text[to_index:to_end]
-                    wrapper.tail = text[to_end:]
-                    from_container.insert(0, wrapper)
-                else:
-                    from_container.tail = text_before
-                    wrapper.text = text[to_index:to_end]
-                    wrapper.tail = text[to_end:]
-                    parent = from_container.getparent()
-                    index = parent.index(from_container)  # type: ignore
-                    parent.insert(index + 1, wrapper)  # type: ignore
-                return
-            else:
-                # Exit to the second part where we search for the end text
-                break
-        else:
-            raise ValueError("Start text not found")
-
-        # The container is split in two
-        container2 = deepcopy(from_container)
-        if text.is_text:  # type: ignore
-            from_container.text = text_before
-            from_container.tail = None
-            container2.text = text_after
-            from_container.tail = None
-        else:
-            from_container.tail = text_before
-            container2.tail = text_after
-        # Stack the copy into the surrounding element
-        wrapper.append(container2)
-        parent = from_container.getparent()
-        index = parent.index(from_container)  # type: ignore
-        parent.insert(index + 1, wrapper)  # type: ignore
-
-        xpath_result = _xpath_text_descendant(wrapper)
-        if not isinstance(xpath_result, list):
-            raise TypeError("Bad XPath result")
-
-        for text in xpath_result:
-            if not isinstance(text, str):
-                raise TypeError("Text not found or text not of type str")
-            if to not in text:
-                continue
-            to_end = text.index(to) + len(to)
-            text_before = text[:to_end]
-            text_after = text[to_end:]
-            container_to = text.getparent()  # type: ignore
-            if not isinstance(container_to, _Element):
-                raise TypeError("Bad XPath result")
-            if text.is_text:  # type: ignore
-                container_to.text = text_before
-                container_to.tail = text_after
-            else:
-                container_to.tail = text_before
-                next_one = container_to.getnext()
-                if next_one is None:
-                    next_one = container_to.getparent()
-                next_one.tail = text_after  # type: ignore
-            return
-        raise ValueError("End text not found")
-
-    @property
-    def tag(self) -> str:
-        """Get/set the underlying xml tag with the given qualified name.
-
-        Warning: direct change of tag does not change the element class.
-
-        Arguments:
-
-            qname -- str (e.g. "text:span")
-        """
-        return _get_prefixed_name(self.__element.tag)
-
-    @tag.setter
-    def tag(self, qname: str) -> None:
-        self.__element.tag = _get_lxml_tag(qname)
-
-    def elements_repeated_sequence(
-        self,
-        xpath_instance: XPath,
-        name: str,
-    ) -> list[tuple[int, int]]:
-        """Utility method for table module."""
-        lxml_tag = _get_lxml_tag_or_name(name)
-        element = self.__element
-        sub_elements = xpath_instance(element)
-        if not isinstance(sub_elements, list):
-            raise TypeError("Bad XPath result.")
-        result: list[tuple[int, int]] = []
-        idx = -1
-        for sub_element in sub_elements:
-            if not isinstance(sub_element, _Element):
-                continue
-            idx += 1
-            value = sub_element.get(lxml_tag)
-            if value is None:
-                result.append((idx, 1))
-                continue
-            try:
-                int_value = int(value)
-            except ValueError:
-                int_value = 1
-            result.append((idx, max(int_value, 1)))
-        return result
-
-    def get_elements(self, xpath_query: XPath | str) -> list[Element]:
-        cache: tuple | None = None
-        element = self.__element
-        if isinstance(xpath_query, str):
-            new_xpath_query = xpath_compile(xpath_query)
-            result = new_xpath_query(element)
-        else:
-            result = xpath_query(element)
-        if not isinstance(result, list):
-            raise TypeError("Bad XPath result")
-
-        if hasattr(self, "_tmap"):
-            if hasattr(self, "_rmap"):
-                cache = (self._tmap, self._cmap, self._rmap)
-            else:
-                cache = (self._tmap, self._cmap)
-        return [
-            Element.from_tag_for_clone(e, cache)
-            for e in result
-            if isinstance(e, _Element)
-        ]
-
-    # fixme : need original get_element as wrapper of get_elements
-
-    def get_element(self, xpath_query: XPath | str) -> Element | None:
-        element = self.__element
-        result = element.xpath(f"({xpath_query})[1]", namespaces=ODF_NAMESPACES)
-        if result:
-            return Element.from_tag(result[0])  # type:ignore
-        return None
-
-    def _get_element_idx(self, xpath_query: XPath | str, idx: int) -> Element | None:
-        element = self.__element
-        result = element.xpath(f"({xpath_query})[{idx + 1}]", namespaces=ODF_NAMESPACES)
-        if result:
-            return Element.from_tag(result[0])  # type:ignore
-        return None
-
-    def _get_element_idx2(self, xpath_instance: XPath, idx: int) -> Element | None:
-        element = self.__element
-        result = xpath_instance(element, idx=idx + 1)
-        if result:
-            return Element.from_tag(result[0])  # type:ignore
-        return None
-
-    @property
-    def attributes(self) -> dict[str, str]:
-        return {
-            _get_prefixed_name(str(key)): str(value)
-            for key, value in self.__element.attrib.items()
-        }
-
-    def get_attribute(self, name: str) -> str | bool | None:
-        """Return the attribute value as type str | bool | None."""
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        value = element.get(lxml_tag)
-        if value is None:
-            return None
-        elif value in ("true", "false"):
-            return Boolean.decode(value)
-        return str(value)
-
-    def get_attribute_integer(self, name: str) -> int | None:
-        """Return either the attribute as type int, or None."""
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        value = element.get(lxml_tag)
-        if value is None:
-            return None
-        try:
-            return int(value)
-        except ValueError:
-            return None
-
-    def get_attribute_string(self, name: str) -> str | None:
-        """Return either the attribute as type str, or None."""
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        value = element.get(lxml_tag)
-        if value is None:
-            return None
-        return str(value)
-
-    def set_attribute(self, name: str, value: bool | str | None) -> None:
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        if isinstance(value, bool):
-            value = Boolean.encode(value)
-        elif value is None:
-            with contextlib.suppress(KeyError):
-                del element.attrib[lxml_tag]
-            return
-        element.set(lxml_tag, str(value))
-
-    def set_style_attribute(self, name: str, value: Element | str) -> None:
-        """Shortcut to accept a style object as a value."""
-        if isinstance(value, Element):
-            value = str(value.name)  # type:ignore
-        return self.set_attribute(name, value)
-
-    def del_attribute(self, name: str) -> None:
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        del element.attrib[lxml_tag]
-
-    @property
-    def text(self) -> str:
-        """Get / set the text content of the element."""
-        return self.__element.text or ""
-
-    @text.setter
-    def text(self, text: str | None) -> None:
-        if text is None:
-            text = ""
-        try:
-            self.__element.text = text
-        except TypeError as e:
-            raise TypeError(f'Str type expected: "{type(text)}"') from e
-
-    @property
-    def text_recursive(self) -> str:
-        return "".join(str(x) for x in self.__element.itertext())
-
-    @property
-    def tail(self) -> str | None:
-        """Get / set the text immediately following the element."""
-        return self.__element.tail
-
-    @tail.setter
-    def tail(self, text: str | None) -> None:
-        self.__element.tail = text or ""
-
-    def search(self, pattern: str) -> int | None:
-        """Return the first position of the pattern in the text content of
-        the element, or None if not found.
-
-        Python regular expression syntax applies.
-
-        Arguments:
-
-            pattern -- str
-
-        Return: int or None
-        """
-        match = re.search(pattern, self.text_recursive)
-        if match is None:
-            return None
-        return match.start()
-
-    def match(self, pattern: str) -> bool:
-        """return True if the pattern is found one or more times anywhere in
-        the text content of the element.
-
-        Python regular expression syntax applies.
-
-        Arguments:
-
-            pattern -- str
-
-        Return: bool
-        """
-        return self.search(pattern) is not None
-
-    def replace(self, pattern: str, new: str | None = None) -> int:
-        """Replace the pattern with the given text, or delete if text is an
-        empty string, and return the number of replacements. By default, only
-        return the number of occurences that would be replaced.
-
-        It cannot replace patterns found across several element, like a word
-        split into two consecutive spans.
-
-        Python regular expression syntax applies.
-
-        Arguments:
-
-            pattern -- str
-
-            new -- str
-
-        Return: int
-        """
-        if not isinstance(pattern, str):
-            # Fail properly if the pattern is an non-ascii bytestring
-            pattern = str(pattern)
-        cpattern = re.compile(pattern)
-        count = 0
-        for text in self.xpath("descendant::text()"):
-            if new is None:
-                count += len(cpattern.findall(str(text)))
-            else:
-                new_text, number = cpattern.subn(new, str(text))
-                container = text.parent
-                if text.is_text():  # type: ignore
-                    container.text = new_text  # type: ignore
-                else:
-                    container.tail = new_text  # type: ignore
-                count += number
-        return count
-
-    @property
-    def root(self) -> Element:
-        element = self.__element
-        tree = element.getroottree()
-        root = tree.getroot()
-        return Element.from_tag(root)
-
-    @property
-    def parent(self) -> Element | None:
-        element = self.__element
-        parent = element.getparent()
-        if parent is None:
-            # Already at root
-            return None
-        return Element.from_tag(parent)
-
-    @property
-    def is_bound(self) -> bool:
-        return self.parent is not None
-
-    # def get_next_sibling(self):
-    #     element = self.__element
-    #     next_one = element.getnext()
-    #     if next_one is None:
-    #         return None
-    #     return Element.from_tag(next_one)
-    #
-    # def get_prev_sibling(self):
-    #     element = self.__element
-    #     prev = element.getprevious()
-    #     if prev is None:
-    #         return None
-    #     return Element.from_tag(prev)
-
-    @property
-    def children(self) -> list[Element]:
-        element = self.__element
-        return [
-            Element.from_tag(e)
-            for e in element.iterchildren()
-            if isinstance(e, _Element)
-        ]
-
-    def index(self, child: Element) -> int:
-        """Return the position of the child in this element.
-
-        Inspired by lxml
-        """
-        return self.__element.index(child.__element)
-
-    @property
-    def text_content(self) -> str:
-        """Get / set the text of the embedded paragraph, including embeded
-        annotations, cells...
-
-        Set create a paragraph if missing
-        """
-        return "\n".join(
-            child.text_recursive for child in self.get_elements("descendant::text:p")
-        )
-
-    @text_content.setter
-    def text_content(self, text: str | None) -> None:
-        paragraphs = self.get_elements("text:p")
-        if not paragraphs:
-            # E.g., text:p in draw:text-box in draw:frame
-            paragraphs = self.get_elements("*/text:p")
-        if paragraphs:
-            paragraph = paragraphs.pop(0)
-            for obsolete in paragraphs:
-                obsolete.delete()
-        else:
-            paragraph = Element.from_tag("text:p")
-            self.insert(paragraph, FIRST_CHILD)
-        # As "text_content" returned all text nodes, "text_content"
-        # will overwrite all text nodes and children that may contain them
-        element = paragraph.__element
-        # Clear but the attributes
-        del element[:]
-        element.text = text
-
-    def _erase_text_content(self) -> None:
-        paragraphs = self.get_elements("text:p")
-        if not paragraphs:
-            # E.g., text:p in draw:text-box in draw:frame
-            paragraphs = self.get_elements("*/text:p")
-        if paragraphs:
-            paragraphs.pop(0)
-            for obsolete in paragraphs:
-                obsolete.delete()
-
-    def is_empty(self) -> bool:
-        """Check if the element is empty : no text, no children, no tail.
-
-        Return: Boolean
-        """
-        element = self.__element
-        if element.tail is not None:
-            return False
-        if element.text is not None:
-            return False
-        if list(element.iterchildren()):
-            return False
-        return True
-
-    def _get_successor(self, target: Element) -> tuple[Element | None, Element | None]:
-        element = self.__element
-        next_one = element.getnext()
-        if next_one is not None:
-            return Element.from_tag(next_one), target
-        parent = self.parent
-        if parent is None:
-            return None, None
-        return parent._get_successor(target.parent)  # type:ignore
-
-    def _get_between_base(  # noqa:C901
-        self,
-        tag1: Element,
-        tag2: Element,
-    ) -> list[Element]:
-        def find_any_id(elem: Element) -> tuple[str, str, str]:
-            elem_tag = elem.tag
-            for attribute in (
-                "text:id",
-                "text:change-id",
-                "text:name",
-                "office:name",
-                "text:ref-name",
-                "xml:id",
-            ):
-                idx = elem.get_attribute(attribute)
-                if idx is not None:
-                    return elem_tag, attribute, str(idx)
-            raise ValueError(f"No Id found in {elem.serialize()}")
-
-        def common_ancestor(
-            tag1: str,
-            attr1: str,
-            val1: str,
-            tag2: str,
-            attr2: str,
-            val2: str,
-        ) -> Element | None:
-            root = self.root
-            request1 = f'descendant::{tag1}[@{attr1}="{val1}"]'
-            request2 = f'descendant::{tag2}[@{attr2}="{val2}"]'
-            ancestor = root.xpath(request1)[0]
-            if ancestor is None:
-                return None
-            while True:
-                # print "up",
-                new_ancestor = ancestor.parent
-                if new_ancestor is None:
-                    return None
-                has_tag2 = new_ancestor.xpath(request2)
-                ancestor = new_ancestor
-                if not has_tag2:
-                    continue
-                # print 'found'
-                break
-            # print up.serialize()
-            return ancestor
-
-        elem1_tag, elem1_attr, elem1_val = find_any_id(tag1)
-        elem2_tag, elem2_attr, elem2_val = find_any_id(tag2)
-        ancestor_result = common_ancestor(
-            elem1_tag,
-            elem1_attr,
-            elem1_val,
-            elem2_tag,
-            elem2_attr,
-            elem2_val,
-        )
-        if ancestor_result is None:
-            raise RuntimeError(f"No common ancestor for {elem1_tag} {elem2_tag}")
-        ancestor = ancestor_result.clone
-        path1 = f'{elem1_tag}[@{elem1_attr}="{elem1_val}"]'
-        path2 = f'{elem2_tag}[@{elem2_attr}="{elem2_val}"]'
-        result = ancestor.clone
-        for child in result.children:
-            result.delete(child)
-        result.text = ""
-        result.tail = ""
-        target = result
-        current = ancestor.children[0]
-
-        state = 0
-        while True:
-            if current is None:
-                raise RuntimeError(f"No current ancestor for {elem1_tag} {elem2_tag}")
-            # print 'current', state, current.serialize()
-            if state == 0:  # before tag 1
-                if current.xpath(f"descendant-or-self::{path1}"):
-                    if current.xpath(f"self::{path1}"):
-                        tail = current.tail
-                        if tail:
-                            # got a tail => the parent should be either t:p or t:h
-                            target.text = tail  # type: ignore
-                        current, target = current._get_successor(target)  # type: ignore
-                        state = 1
-                        continue
-                    # got T1 in chidren, need further analysis
-                    new_target = current.clone
-                    for child in new_target.children:
-                        new_target.delete(child)
-                    new_target.text = ""
-                    new_target.tail = ""
-                    target.append(new_target)  # type: ignore
-                    target = new_target
-                    current = current.children[0]
-                    continue
-                else:
-                    # before tag1 : forget element, go to next one
-                    current, target = current._get_successor(target)  # type: ignore
-                    continue
-            elif state == 1:  # collect elements
-                further = False
-                if current.xpath(f"descendant-or-self::{path2}"):
-                    if current.xpath(f"self::{path2}"):
-                        # end of trip
-                        break
-                    # got T2 in chidren, need further analysis
-                    further = True
-                # further analysis needed :
-                if further:
-                    new_target = current.clone
-                    for child in new_target.children:
-                        new_target.delete(child)
-                    new_target.text = ""
-                    new_target.tail = ""
-                    target.append(new_target)  # type: ignore
-                    target = new_target
-                    current = current.children[0]
-                    continue
-                # collect
-                target.append(current.clone)  # type: ignore
-                current, target = current._get_successor(target)  # type: ignore
-                continue
-        # Now resu should be the "parent" of inserted parts
-        # - a text:h or text:p sigle item (simple case)
-        # - a upper element, with some text:p, text:h in it => need to be
-        #   stripped to have a list of text:p, text:h
-        if result.tag in {"text:p", "text:h"}:
-            inner = [result]
-        else:
-            inner = result.children
-        return inner
-
-    def get_between(
-        self,
-        tag1: Element,
-        tag2: Element,
-        as_text: bool = False,
-        clean: bool = True,
-        no_header: bool = True,
-    ) -> list | Element | str:
-        """Returns elements between tag1 and tag2, tag1 and tag2 shall
-        be unique and having an id attribute.
-        (WARN: buggy if tag1/tag2 defines a malformed odf xml.)
-        If as_text is True: returns the text content.
-        If clean is True: suppress unwanted tags (deletions marks, ...)
-        If no_header is True: existing text:h are changed in text:p
-        By default: returns a list of Element, cleaned and without headers.
-
-        Implementation and standard retrictions:
-        Only text:h and text:p sould be 'cut' by an insert tag, so inner parts
-        of insert tags are:
-
-            - any text:h, text:p or sub tag of these
-
-            - some text, part of a parent text:h or text:p
-
-        Arguments:
-
-            tag1 -- Element
-
-            tag2 -- Element
-
-            as_text -- boolean
-
-            clean -- boolean
-
-            no_header -- boolean
-
-        Return: list of odf_paragraph or odf_header
-        """
-        inner = self._get_between_base(tag1, tag2)
-
-        if clean:
-            clean_tags = (
-                "text:change",
-                "text:change-start",
-                "text:change-end",
-                "text:reference-mark",
-                "text:reference-mark-start",
-                "text:reference-mark-end",
-            )
-            request_self = " | ".join(["self::%s" % c for c in clean_tags])
-            inner = [e for e in inner if not e.xpath(request_self)]
-            request = " | ".join([f"descendant::{tag}" for tag in clean_tags])
-            for element in inner:
-                to_del = element.xpath(request)
-                for elem in to_del:
-                    if isinstance(elem, Element):
-                        element.delete(elem)
-        if no_header:  # crude replace t:h by t:p
-            new_inner = []
-            for element in inner:
-                if element.tag == "text:h":
-                    children = element.children
-                    text = element.__element.text
-                    para = Element.from_tag("text:p")
-                    para.text = text or ""
-                    for c in children:
-                        para.append(c)
-                    new_inner.append(para)
-                else:
-                    new_inner.append(element)
-            inner = new_inner
-        if as_text:
-            return "\n".join([e.get_formatted_text() for e in inner])
-        else:
-            return inner
-
-    def insert(
-        self,
-        element: Element,
-        xmlposition: int | None = None,
-        position: int | None = None,
-        start: bool = False,
-    ) -> None:
-        """Insert an element relatively to ourself.
-
-        Insert either using DOM vocabulary or by numeric position.
-        If text start is True, insert the element before any existing text.
-
-        Position start at 0.
-
-        Arguments:
-
-            element -- Element
-
-            xmlposition -- FIRST_CHILD, LAST_CHILD, NEXT_SIBLING
-                           or PREV_SIBLING
-
-            start -- Boolean
-
-            position -- int
-        """
-        # child_tag = element.tag
-        current = self.__element
-        _element = element.__element
-        if start:
-            text = current.text
-            if text is not None:
-                current.text = None
-                tail = _element.tail
-                if tail is None:
-                    tail = text
-                else:
-                    tail = tail + text
-                _element.tail = tail
-            position = 0
-        if position is not None:
-            current.insert(position, _element)
-        elif xmlposition is FIRST_CHILD:
-            current.insert(0, _element)
-        elif xmlposition is LAST_CHILD:
-            current.append(_element)
-        elif xmlposition is NEXT_SIBLING:
-            parent = current.getparent()
-            index = parent.index(current)  # type: ignore
-            parent.insert(index + 1, _element)  # type: ignore
-        elif xmlposition is PREV_SIBLING:
-            parent = current.getparent()
-            index = parent.index(current)  # type: ignore
-            parent.insert(index, _element)  # type: ignore
-        else:
-            raise ValueError("(xml)position must be defined")
-
-    def extend(self, odf_elements: Iterable[Element]) -> None:
-        """Fast append elements at the end of ourself using extend."""
-        if odf_elements:
-            current = self.__element
-            elements = [element.__element for element in odf_elements]
-            current.extend(elements)
-
-    def append(self, str_or_element: str | Element) -> None:
-        """Insert element or text in the last position."""
-        current = self.__element
-        if isinstance(str_or_element, str):
-            # Has children ?
-            children = list(current.iterchildren())
-            if children:
-                # Append to tail of the last child
-                last_child = children[-1]
-                text = last_child.tail
-                text = text if text is not None else ""
-                text += str_or_element
-                last_child.tail = text
-            else:
-                # Append to text of the element
-                text = current.text
-                text = text if text is not None else ""
-                text += str_or_element
-                current.text = text
-        elif isinstance(str_or_element, Element):
-            current.append(str_or_element.__element)
-        else:
-            raise TypeError(f'Element or string expected, not "{type(str_or_element)}"')
-
-    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-        """Delete the given element from the XML tree. If no element is given,
-        "self" is deleted. The XML library may allow to continue to use an
-        element now "orphan" as long as you have a reference to it.
-
-        if keep_tail is True (default), the tail text is not erased.
-
-        Arguments:
-
-            child -- Element
-
-            keep_tail -- boolean (default to True), True for most usages.
-        """
-        if child is None:
-            parent = self.parent
-            if parent is None:
-                raise ValueError(f"Can't delete the root element\n{self.serialize()}")
-            child = self
-        else:
-            parent = self
-        if keep_tail and child.__element.tail is not None:
-            current = child.__element
-            tail = str(current.tail)
-            current.tail = None
-            prev = current.getprevious()
-            if prev is not None:
-                if prev.tail is None:
-                    prev.tail = tail
-                else:
-                    prev.tail += tail
-            else:
-                if parent.__element.text is None:
-                    parent.__element.text = tail
-                else:
-                    parent.__element.text += tail
-        parent.__element.remove(child.__element)
-
-    def replace_element(self, old_element: Element, new_element: Element) -> None:
-        """Replaces in place a sub element with the element passed as second
-        argument.
-
-        Warning : no clone for old element.
-        """
-        current = self.__element
-        current.replace(old_element.__element, new_element.__element)
-
-    def strip_elements(
-        self,
-        sub_elements: Element | Iterable[Element],
-    ) -> Element | list:
-        """Remove the tags of provided elements, keeping inner childs and text.
-
-        Return : the striped element.
-
-        Warning : no clone in sub_elements list.
-
-        Arguments:
-
-            sub_elements -- Element or list of Element
-        """
-        if not sub_elements:
-            return self
-        if isinstance(sub_elements, Element):
-            sub_elements = (sub_elements,)
-        replacer = _get_lxml_tag("text:this-will-be-removed")
-        for element in sub_elements:
-            element.__element.tag = replacer
-        strip = ("text:this-will-be-removed",)
-        return self.strip_tags(strip=strip, default=None)
-
-    def strip_tags(
-        self,
-        strip: Iterable[str] | None = None,
-        protect: Iterable[str] | None = None,
-        default: str | None = "text:p",
-    ) -> Element | list:
-        """Remove the tags listed in strip, recursively, keeping inner childs
-        and text. Tags listed in protect stop the removal one level depth. If
-        the first level element is stripped, default is used to embed the
-        content in the default element. If default is None and first level is
-        striped, a list of text and children is returned. Return : the striped
-        element.
-
-        strip_tags should be used by on purpose methods (strip_span ...)
-        (Method name taken from lxml).
-
-        Arguments:
-
-            strip -- iterable list of str odf tags, or None
-
-            protect -- iterable list of str odf tags, or None
-
-            default -- str odf tag, or None
-
-        Return:
-
-            Element.
-        """
-        if not strip:
-            return self
-        if not protect:
-            protect = ()
-        protected = False
-        element, modified = Element._strip_tags(self, strip, protect, protected)
-        if modified and isinstance(element, list) and default:
-            new = Element.from_tag(default)
-            for content in element:
-                if isinstance(content, Element):
-                    new.append(content)
-                else:
-                    new.text = content
-            element = new
-        return element
-
-    @staticmethod
-    def _strip_tags(  # noqa:C901
-        element: Element,
-        strip: Iterable[str],
-        protect: Iterable[str],
-        protected: bool,
-    ) -> tuple[Element | list, bool]:
-        """Sub method for strip_tags()."""
-        element_clone = element.clone
-        modified = False
-        children = []
-        if protect and element.tag in protect:
-            protect_below = True
-        else:
-            protect_below = False
-        for child in element_clone.children:
-            striped_child, is_modified = Element._strip_tags(
-                child, strip, protect, protect_below
-            )
-            if is_modified:
-                modified = True
-            if isinstance(striped_child, list):
-                children.extend(striped_child)
-            else:
-                children.append(striped_child)
-
-        text = element_clone.text
-        tail = element_clone.tail
-        if not protected and strip and element.tag in strip:
-            element_result: list[Element | str] = []
-            if text is not None:
-                element_result.append(text)
-            for child in children:
-                element_result.append(child)
-            if tail is not None:
-                element_result.append(tail)
-            return (element_result, True)
-        else:
-            if not modified:
-                return (element, False)
-            element.clear()
-            try:
-                for key, value in element_clone.attributes.items():
-                    element.set_attribute(key, value)
-            except ValueError:
-                sys.stderr.write(f"strip_tags(): bad attribute in {element_clone}\n")
-            if text is not None:
-                element.append(text)
-            for child in children:
-                element.append(child)
-            if tail is not None:
-                element.tail = tail
-            return (element, True)
-
-    def xpath(self, xpath_query: str) -> list[Element | Text]:
-        """Apply XPath query to the element and its subtree. Return list of
-        Element or Text instances translated from the nodes found.
-        """
-        element = self.__element
-        xpath_instance = xpath_compile(xpath_query)
-        elements = xpath_instance(element)
-        result: list[Element | Text] = []
-        if hasattr(elements, "__iter__"):
-            for obj in elements:  # type: ignore
-                if isinstance(obj, (_ElementStringResult, _ElementUnicodeResult)):
-                    result.append(Text(obj))
-                elif isinstance(obj, _Element):
-                    result.append(Element.from_tag(obj))
-                # else:
-                #     result.append(obj)
-        return result
-
-    def clear(self) -> None:
-        """Remove text, children and attributes from the element."""
-        self.__element.clear()
-        if hasattr(self, "_tmap"):
-            self._tmap: list[int] = []
-        if hasattr(self, "_cmap"):
-            self._cmap: list[int] = []
-        if hasattr(self, "_rmap"):
-            self._rmap: list[int] = []
-        if hasattr(self, "_indexes"):
-            remember = False
-            if "_rmap" in self._indexes:
-                remember = True
-            self._indexes: dict[str, dict] = {}
-            self._indexes["_cmap"] = {}
-            self._indexes["_tmap"] = {}
-            if remember:
-                self._indexes["_rmap"] = {}
-
-    @property
-    def clone(self) -> Element:
-        clone = deepcopy(self.__element)
-        root = lxml_Element("ROOT", nsmap=ODF_NAMESPACES)
-        root.append(clone)
-        return self.from_tag(clone)
-
-        # slow data = tostring(self.__element, encoding='unicode')
-        # return self.from_tag(data)
-
-    @staticmethod
-    def _strip_namespaces(data: str) -> str:
-        """Remove xmlns:* fields from serialized XML."""
-        return re.sub(r' xmlns:\w*="[\w:\-\/\.#]*"', "", data)
-
-    def serialize(self, pretty: bool = False, with_ns: bool = False) -> str:
-        """Return text serialization of XML element."""
-        # This copy bypasses serialization side-effects in lxml
-        native = deepcopy(self.__element)
-        data = tostring(
-            native, with_tail=False, pretty_print=pretty, encoding="unicode"
-        )
-        if with_ns:
-            return data
-        # Remove namespaces
-        return self._strip_namespaces(data)
-
-    # Element helpers usable from any context
-
-    @property
-    def document_body(self) -> Element | None:
-        """Return the document body : 'office:body'"""
-        return self.get_element("//office:body/*[1]")
-
-    @document_body.setter
-    def document_body(self, new_body: Element) -> None:
-        """Change in place the full document body content."""
-        body = self.document_body
-        if body is None:
-            raise ValueError("//office:body not found in document")
-        tail = body.tail
-        body.clear()
-        for item in new_body.children:
-            body.append(item)
-        if tail:
-            body.tail = tail
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        """This function should return a beautiful version of the text."""
-        return ""
-
-    def get_styled_elements(self, name: str = "") -> list[Element]:
-        """Brute-force to find paragraphs, tables, etc. using the given style
-        name (or all by default).
-
-        Arguments:
-
-            name -- str
-
-        Return: list
-        """
-        # FIXME incomplete (and possibly inaccurate)
-        return (
-            self._filtered_elements("descendant::*", text_style=name)
-            + self._filtered_elements("descendant::*", draw_style=name)
-            + self._filtered_elements("descendant::*", draw_text_style=name)
-            + self._filtered_elements("descendant::*", table_style=name)
-            + self._filtered_elements("descendant::*", page_layout=name)
-            + self._filtered_elements("descendant::*", master_page=name)
-            + self._filtered_elements("descendant::*", parent_style=name)
-        )
-
-    # Common attributes
-
-    def _get_inner_text(self, tag: str) -> str | None:
-        element = self.get_element(tag)
-        if element is None:
-            return None
-        return element.text
-
-    def _set_inner_text(self, tag: str, text: str) -> None:
-        element = self.get_element(tag)
-        if element is None:
-            element = Element.from_tag(tag)
-            self.append(element)
-        element.text = text
-
-    # Dublin core
-
-    @property
-    def dc_creator(self) -> str | None:
-        """Get dc:creator value.
-
-        Return: str (or None if inexistant)
-        """
-        return self._get_inner_text("dc:creator")
-
-    @dc_creator.setter
-    def dc_creator(self, creator: str) -> None:
-        """Set dc:creator value.
-
-        Arguments:
-
-            creator -- str
-        """
-        self._set_inner_text("dc:creator", creator)
-
-    @property
-    def dc_date(self) -> datetime | None:
-        """Get the dc:date value.
-
-        Return: datetime (or None if inexistant)
-        """
-        date = self._get_inner_text("dc:date")
-        if date is None:
-            return None
-        return DateTime.decode(date)
-
-    @dc_date.setter
-    def dc_date(self, date: datetime) -> None:
-        """Set the dc:date value.
-
-        Arguments:
-
-            darz -- datetime
-        """
-        self._set_inner_text("dc:date", DateTime.encode(date))
-
-    # SVG
-
-    @property
-    def svg_title(self) -> str | None:
-        return self._get_inner_text("svg:title")
-
-    @svg_title.setter
-    def svg_title(self, title: str) -> None:
-        self._set_inner_text("svg:title", title)
-
-    @property
-    def svg_description(self) -> str | None:
-        return self._get_inner_text("svg:desc")
-
-    @svg_description.setter
-    def svg_description(self, description: str) -> None:
-        self._set_inner_text("svg:desc", description)
-
-    # Sections
-
-    def get_sections(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the sections that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Element
-        """
-        return self._filtered_elements(
-            "text:section", text_style=style, content=content
-        )
-
-    def get_section(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the section that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:section", position, content=content
-        )
-
-    # Paragraphs
-
-    def get_paragraphs(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the paragraphs that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Paragraph
-        """
-        return self._filtered_elements(
-            "descendant::text:p", text_style=style, content=content
-        )
-
-    def get_paragraph(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the paragraph that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Paragraph or None if not found
-        """
-        return self._filtered_element("descendant::text:p", position, content=content)
-
-    # Span
-
-    def get_spans(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the spans that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Span
-        """
-        return self._filtered_elements(
-            "descendant::text:span", text_style=style, content=content
-        )
-
-    def get_span(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the span that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Span or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:span", position, content=content
-        )
-
-    # Headers
-
-    def get_headers(
-        self,
-        style: str | None = None,
-        outline_level: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the Headers that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Header
-        """
-        return self._filtered_elements(
-            "descendant::text:h",
-            text_style=style,
-            outline_level=outline_level,
-            content=content,
-        )
-
-    def get_header(
-        self,
-        position: int = 0,
-        outline_level: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the Header that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Header or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:h",
-            position,
-            outline_level=outline_level,
-            content=content,
-        )
-
-    # Lists
-
-    def get_lists(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the lists that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of List
-        """
-        return self._filtered_elements(
-            "descendant::text:list", text_style=style, content=content
-        )
-
-    def get_list(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the list that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: List or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:list", position, content=content
-        )
-
-    # Frames
-
-    def get_frames(
-        self,
-        presentation_class: str | None = None,
-        style: str | None = None,
-        title: str | None = None,
-        description: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the frames that match the criteria.
-
-        Arguments:
-
-            presentation_class -- str
-
-            style -- str
-
-            title -- str regex
-
-            description -- str regex
-
-            content -- str regex
-
-        Return: list of Frame
-        """
-        return self._filtered_elements(
-            "descendant::draw:frame",
-            presentation_class=presentation_class,
-            draw_style=style,
-            svg_title=title,
-            svg_desc=description,
-            content=content,
-        )
-
-    def get_frame(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        presentation_class: str | None = None,
-        title: str | None = None,
-        description: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the section that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            presentation_class -- str
-
-            title -- str regex
-
-            description -- str regex
-
-            content -- str regex
-
-        Return: Frame or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:frame",
-            position,
-            draw_name=name,
-            presentation_class=presentation_class,
-            svg_title=title,
-            svg_desc=description,
-            content=content,
-        )
-
-    # Images
-
-    def get_images(
-        self,
-        style: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the images matching the criteria.
-
-        Arguments:
-
-            style -- str
-
-            url -- str regex
-
-            content -- str regex
-
-        Return: list of Element
-        """
-        return self._filtered_elements(
-            "descendant::draw:image", text_style=style, url=url, content=content
-        )
-
-    def get_image(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the image matching the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            url -- str regex
-
-            content -- str regex
-
-        Return: Element or None if not found
-        """
-        # The frame is holding the name
-        if name is not None:
-            frame = self._filtered_element(
-                "descendant::draw:frame", position, draw_name=name
-            )
-            if frame is None:
-                return None
-            # The name is supposedly unique
-            return frame.get_element("draw:image")
-        return self._filtered_element(
-            "descendant::draw:image", position, url=url, content=content
-        )
-
-    # Tables
-
-    def get_tables(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the tables that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Table
-        """
-        return self._filtered_elements(
-            "descendant::table:table", table_style=style, content=content
-        )
-
-    def get_table(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the table that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            content -- str regex
-
-        Return: Table or None if not found
-        """
-        if name is None and content is None:
-            result = self._filtered_element("descendant::table:table", position)
-        else:
-            result = self._filtered_element(
-                "descendant::table:table",
-                position,
-                table_name=name,
-                content=content,
-            )
-        return result
-
-    # Named Range
-
-    def get_named_ranges(self) -> list[Element]:
-        """Return all the tables named ranges.
-
-        Return: list of odf_named_range
-        """
-        named_ranges = self.get_elements(
-            "descendant::table:named-expressions/table:named-range"
-        )
-        return named_ranges
-
-    def get_named_range(self, name: str) -> Element | None:
-        """Return the named range of specified name, or None if not found.
-
-        Arguments:
-
-            name -- str
-
-        Return: NamedRange
-        """
-        named_range = self.get_elements(
-            f'descendant::table:named-expressions/table:named-range[@table:name="{name}"][1]'
-        )
-        if named_range:
-            return named_range[0]
-        else:
-            return None
-
-    def append_named_range(self, named_range: Element) -> None:
-        """Append the named range to the spreadsheet, replacing existing named
-        range of same name if any.
-
-        Arguments:
-
-            named_range --  NamedRange
-        """
-        if self.tag != "office:spreadsheet":
-            raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
-        named_expressions = self.get_element("table:named-expressions")
-        if not named_expressions:
-            named_expressions = Element.from_tag("table:named-expressions")
-            self.append(named_expressions)
-        # exists ?
-        current = named_expressions.get_element(
-            f'table:named-range[@table:name="{named_range.name}"][1]'  # type:ignore
-        )
-        if current:
-            named_expressions.delete(current)
-        named_expressions.append(named_range)
-
-    def delete_named_range(self, name: str) -> None:
-        """Delete the Named Range of specified name from the spreadsheet.
-
-        Arguments:
-
-            name -- str
-        """
-        if self.tag != "office:spreadsheet":
-            raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
-        named_range = self.get_named_range(name)
-        if not named_range:
-            return
-        named_range.delete()
-        named_expressions = self.get_element("table:named-expressions")
-        if not named_expressions:
-            return
-        element = named_expressions.__element
-        children = list(element.iterchildren())
-        if not children:
-            self.delete(named_expressions)
-
-    # Notes
-
-    def get_notes(
-        self,
-        note_class: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the notes that match the criteria.
-
-        Arguments:
-
-            note_class -- 'footnote' or 'endnote'
-
-            content -- str regex
-
-        Return: list of Note
-        """
-        return self._filtered_elements(
-            "descendant::text:note", note_class=note_class, content=content
-        )
-
-    def get_note(
-        self,
-        position: int = 0,
-        note_id: str | None = None,
-        note_class: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the note that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            note_id -- str
-
-            note_class -- 'footnote' or 'endnote'
-
-            content -- str regex
-
-        Return: Note or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:note",
-            position,
-            text_id=note_id,
-            note_class=note_class,
-            content=content,
-        )
-
-    # Annotations
-
-    def get_annotations(
-        self,
-        creator: str | None = None,
-        start_date: datetime | None = None,
-        end_date: datetime | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the annotations that match the criteria.
-
-        Arguments:
-
-            creator -- str
-
-            start_date -- datetime instance
-
-            end_date --  datetime instance
-
-            content -- str regex
-
-        Return: list of Annotation
-        """
-        annotations = []
-        for annotation in self._filtered_elements(
-            "descendant::office:annotation", content=content
-        ):
-            if creator is not None and creator != annotation.dc_creator:
-                continue
-            date = annotation.dc_date
-            if date is None:
-                continue
-            if start_date is not None and date < start_date:
-                continue
-            if end_date is not None and date >= end_date:
-                continue
-            annotations.append(annotation)
-        return annotations
-
-    def get_annotation(
-        self,
-        position: int = 0,
-        creator: str | None = None,
-        start_date: datetime | None = None,
-        end_date: datetime | None = None,
-        content: str | None = None,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the annotation that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            creator -- str
-
-            start_date -- datetime instance
-
-            end_date -- datetime instance
-
-            content -- str regex
-
-            name -- str
-
-        Return: Annotation or None if not found
-        """
-        if name is not None:
-            return self._filtered_element(
-                "descendant::office:annotation", 0, office_name=name
-            )
-        annotations = self.get_annotations(
-            creator=creator, start_date=start_date, end_date=end_date, content=content
-        )
-        if not annotations:
-            return None
-        try:
-            return annotations[position]
-        except IndexError:
-            return None
-
-    def get_annotation_ends(self) -> list[Element]:
-        """Return all the annotation ends.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::office:annotation-end")
-
-    def get_annotation_end(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the annotation end that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::office:annotation-end", position, office_name=name
-        )
-
-    # office:names
-
-    def get_office_names(self) -> list[str]:
-        """Return all the used office:name tags values of the element.
-
-        Return: list of unique str
-        """
-        name_xpath_query = xpath_compile("//@office:name")
-        response = name_xpath_query(self.__element)
-        if not isinstance(response, list):
-            return []
-        return list({str(name) for name in response if name})
-
-    # Variables
-
-    def get_variable_decls(self) -> Element:
-        """Return the container for variable declarations. Created if not
-        found.
-
-        Return: Element
-        """
-        variable_decls = self.get_element("//text:variable-decls")
-        if variable_decls is None:
-            body = self.document_body
-            if not body:
-                raise ValueError("Empty document.body")
-            body.insert(Element.from_tag("text:variable-decls"), FIRST_CHILD)
-            variable_decls = body.get_element("//text:variable-decls")
-
-        return variable_decls  # type:ignore
-
-    def get_variable_decl_list(self) -> list[Element]:
-        """Return all the variable declarations.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:variable-decl")
-
-    def get_variable_decl(self, name: str, position: int = 0) -> Element | None:
-        """return the variable declaration for the given name.
-
-        Arguments:
-
-            name -- str
-
-            position -- int
-
-        return: Element or none if not found
-        """
-        return self._filtered_element(
-            "descendant::text:variable-decl", position, text_name=name
-        )
-
-    def get_variable_sets(self, name: str | None = None) -> list[Element]:
-        """Return all the variable sets that match the criteria.
-
-        Arguments:
-
-            name -- str
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:variable-set", text_name=name)
-
-    def get_variable_set(self, name: str, position: int = -1) -> Element | None:
-        """Return the variable set for the given name (last one by default).
-
-        Arguments:
-
-            name -- str
-
-            position -- int
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:variable-set", position, text_name=name
-        )
-
-    def get_variable_set_value(
-        self,
-        name: str,
-        value_type: str | None = None,
-    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-        """Return the last value of the given variable name.
-
-        Arguments:
-
-            name -- str
-
-            value_type -- 'boolean', 'currency', 'date', 'float',
-                          'percentage', 'string', 'time' or automatic
-
-        Return: most appropriate Python type
-        """
-        variable_set = self.get_variable_set(name)
-        if not variable_set:
-            return None
-        return variable_set.get_value(value_type)  # type: ignore
-
-    # User fields
-
-    def get_user_field_decls(self) -> Element | None:
-        """Return the container for user field declarations. Created if not
-        found.
-
-        Return: Element
-        """
-        user_field_decls = self.get_element("//text:user-field-decls")
-        if user_field_decls is None:
-            body = self.document_body
-            if not body:
-                raise ValueError("Empty document.body")
-            body.insert(Element.from_tag("text:user-field-decls"), FIRST_CHILD)
-            user_field_decls = body.get_element("//text:user-field-decls")
-
-        return user_field_decls
-
-    def get_user_field_decl_list(self) -> list[Element]:
-        """Return all the user field declarations.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:user-field-decl")
-
-    def get_user_field_decl(self, name: str, position: int = 0) -> Element | None:
-        """return the user field declaration for the given name.
-
-        return: Element or none if not found
-        """
-        return self._filtered_element(
-            "descendant::text:user-field-decl", position, text_name=name
-        )
-
-    def get_user_field_value(
-        self, name: str, value_type: str | None = None
-    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-        """Return the value of the given user field name.
-
-        Arguments:
-
-            name -- str
-
-            value_type -- 'boolean', 'currency', 'date', 'float',
-                          'percentage', 'string', 'time' or automatic
-
-        Return: most appropriate Python type
-        """
-        user_field_decl = self.get_user_field_decl(name)
-        if user_field_decl is None:
-            return None
-        return user_field_decl.get_value(value_type)  # type: ignore
-
-    # User defined fields
-    # They are fields who should contain a copy of a user defined medtadata
-
-    def get_user_defined_list(self) -> list[Element]:
-        """Return all the user defined field declarations.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:user-defined")
-
-    def get_user_defined(self, name: str, position: int = 0) -> Element | None:
-        """return the user defined declaration for the given name.
-
-        return: Element or none if not found
-        """
-        return self._filtered_element(
-            "descendant::text:user-defined", position, text_name=name
-        )
-
-    def get_user_defined_value(
-        self, name: str, value_type: str | None = None
-    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-        """Return the value of the given user defined field name.
-
-        Arguments:
-
-            name -- str
-
-            value_type -- 'boolean', 'date', 'float',
-                          'string', 'time' or automatic
-
-        Return: most appropriate Python type
-        """
-        user_defined = self.get_user_defined(name)
-        if user_defined is None:
-            return None
-        return user_defined.get_value(value_type)  # type: ignore
-
-    # Draw Pages
-
-    def get_draw_pages(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw pages that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of DrawPage
-        """
-        return self._filtered_elements(
-            "descendant::draw:page", draw_style=style, content=content
-        )
-
-    def get_draw_page(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw page that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            content -- str regex
-
-        Return: DrawPage or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:page", position, draw_name=name, content=content
-        )
-
-    # Links
-
-    def get_links(
-        self,
-        name: str | None = None,
-        title: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the links that match the criteria.
-
-        Arguments:
-
-            name -- str
-
-            title -- str
-
-            url -- str regex
-
-            content -- str regex
-
-        Return: list of Element
-        """
-        return self._filtered_elements(
-            "descendant::text:a",
-            office_name=name,
-            office_title=title,
-            url=url,
-            content=content,
-        )
-
-    def get_link(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        title: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the link that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            title -- str
-
-            url -- str regex
-
-            content -- str regex
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:a",
-            position,
-            office_name=name,
-            office_title=title,
-            url=url,
-            content=content,
-        )
-
-    # Bookmarks
-
-    def get_bookmarks(self) -> list[Element]:
-        """Return all the bookmarks.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:bookmark")
-
-    def get_bookmark(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the bookmark that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Bookmark or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:bookmark", position, text_name=name
-        )
-
-    def get_bookmark_starts(self) -> list[Element]:
-        """Return all the bookmark starts.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:bookmark-start")
-
-    def get_bookmark_start(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the bookmark start that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:bookmark-start", position, text_name=name
-        )
-
-    def get_bookmark_ends(self) -> list[Element]:
-        """Return all the bookmark ends.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:bookmark-end")
-
-    def get_bookmark_end(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the bookmark end that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:bookmark-end", position, text_name=name
-        )
-
-    # Reference marks
-
-    def get_reference_marks_single(self) -> list[Element]:
-        """Return all the reference marks. Search only the tags
-        text:reference-mark.
-        Consider using : get_reference_marks()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:reference-mark")
-
-    def get_reference_mark_single(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the reference mark that matches the criteria. Search only the
-        tags text:reference-mark.
-        Consider using : get_reference_mark()
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:reference-mark", position, text_name=name
-        )
-
-    def get_reference_mark_starts(self) -> list[Element]:
-        """Return all the reference mark starts. Search only the tags
-        text:reference-mark-start.
-        Consider using : get_reference_marks()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:reference-mark-start")
-
-    def get_reference_mark_start(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the reference mark start that matches the criteria. Search
-        only the tags text:reference-mark-start.
-        Consider using : get_reference_mark()
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:reference-mark-start", position, text_name=name
-        )
-
-    def get_reference_mark_ends(self) -> list[Element]:
-        """Return all the reference mark ends. Search only the tags
-        text:reference-mark-end.
-        Consider using : get_reference_marks()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:reference-mark-end")
-
-    def get_reference_mark_end(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the reference mark end that matches the criteria. Search only
-        the tags text:reference-mark-end.
-        Consider using : get_reference_marks()
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:reference-mark-end", position, text_name=name
-        )
-
-    def get_reference_marks(self) -> list[Element]:
-        """Return all the reference marks, either single position reference
-        (text:reference-mark) or start of range reference
-        (text:reference-mark-start).
-
-        Return: list of Element
-        """
-        return self._filtered_elements(
-            "descendant::text:reference-mark-start | descendant::text:reference-mark"
-        )
-
-    def get_reference_mark(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the reference mark that match the criteria. Either single
-        position reference mark (text:reference-mark) or start of range
-        reference (text:reference-mark-start).
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        if name:
-            request = (
-                f"descendant::text:reference-mark-start"
-                f'[@text:name="{name}"] '
-                f"| descendant::text:reference-mark"
-                f'[@text:name="{name}"]'
-            )
-            return self._filtered_element(request, position=0)
-        request = (
-            "descendant::text:reference-mark-start | descendant::text:reference-mark"
-        )
-        return self._filtered_element(request, position)
-
-    def get_references(self, name: str | None = None) -> list[Element]:
-        """Return all the references (text:reference-ref). If name is
-        provided, returns the references of that name.
-
-        Return: list of Element
-
-        Arguments:
-
-            name -- str or None
-        """
-        if name is None:
-            return self._filtered_elements("descendant::text:reference-ref")
-        request = f'descendant::text:reference-ref[@text:ref-name="{name}"]'
-        return self._filtered_elements(request)
-
-    # Shapes elements
-
-    # Groups
-
-    def get_draw_groups(
-        self,
-        title: str | None = None,
-        description: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        return self._filtered_elements(
-            "descendant::draw:g",
-            svg_title=title,
-            svg_desc=description,
-            content=content,
-        )
-
-    def get_draw_group(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        title: str | None = None,
-        description: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        return self._filtered_element(
-            "descendant::draw:g",
-            position,
-            draw_name=name,
-            svg_title=title,
-            svg_desc=description,
-            content=content,
-        )
-
-    # Lines
-
-    def get_draw_lines(
-        self,
-        draw_style: str | None = None,
-        draw_text_style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw lines that match the criteria.
-
-        Arguments:
-
-            draw_style -- str
-
-            draw_text_style -- str
-
-            content -- str regex
-
-        Return: list of odf_shape
-        """
-        return self._filtered_elements(
-            "descendant::draw:line",
-            draw_style=draw_style,
-            draw_text_style=draw_text_style,
-            content=content,
-        )
-
-    def get_draw_line(
-        self,
-        position: int = 0,
-        id: str | None = None,  # noqa:A002
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw line that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            id -- str
-
-            content -- str regex
-
-        Return: odf_shape or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:line", position, draw_id=id, content=content
-        )
-
-    # Rectangles
-
-    def get_draw_rectangles(
-        self,
-        draw_style: str | None = None,
-        draw_text_style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw rectangles that match the criteria.
-
-        Arguments:
-
-            draw_style -- str
-
-            draw_text_style -- str
-
-            content -- str regex
-
-        Return: list of odf_shape
-        """
-        return self._filtered_elements(
-            "descendant::draw:rect",
-            draw_style=draw_style,
-            draw_text_style=draw_text_style,
-            content=content,
-        )
-
-    def get_draw_rectangle(
-        self,
-        position: int = 0,
-        id: str | None = None,  # noqa:A002
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw rectangle that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            id -- str
-
-            content -- str regex
-
-        Return: odf_shape or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:rect", position, draw_id=id, content=content
-        )
-
-    # Ellipse
-
-    def get_draw_ellipses(
-        self,
-        draw_style: str | None = None,
-        draw_text_style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw ellipses that match the criteria.
-
-        Arguments:
-
-            draw_style -- str
-
-            draw_text_style -- str
-
-            content -- str regex
-
-        Return: list of odf_shape
-        """
-        return self._filtered_elements(
-            "descendant::draw:ellipse",
-            draw_style=draw_style,
-            draw_text_style=draw_text_style,
-            content=content,
-        )
-
-    def get_draw_ellipse(
-        self,
-        position: int = 0,
-        id: str | None = None,  # noqa:A002
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw ellipse that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            id -- str
-
-            content -- str regex
-
-        Return: odf_shape or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:ellipse", position, draw_id=id, content=content
-        )
-
-    # Connectors
-
-    def get_draw_connectors(
-        self,
-        draw_style: str | None = None,
-        draw_text_style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw connectors that match the criteria.
-
-        Arguments:
-
-            draw_style -- str
-
-            draw_text_style -- str
-
-            content -- str regex
-
-        Return: list of odf_shape
-        """
-        return self._filtered_elements(
-            "descendant::draw:connector",
-            draw_style=draw_style,
-            draw_text_style=draw_text_style,
-            content=content,
-        )
-
-    def get_draw_connector(
-        self,
-        position: int = 0,
-        id: str | None = None,  # noqa:A002
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw connector that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            id -- str
-
-            content -- str regex
-
-        Return: odf_shape or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:connector", position, draw_id=id, content=content
-        )
-
-    def get_orphan_draw_connectors(self) -> list[Element]:
-        """Return a list of connectors which don't have any shape connected
-        to them.
-        """
-        connectors = []
-        for connector in self.get_draw_connectors():
-            start_shape = connector.get_attribute("draw:start-shape")
-            end_shape = connector.get_attribute("draw:end-shape")
-            if start_shape is None and end_shape is None:
-                connectors.append(connector)
-        return connectors
-
-    # Tracked changes and text change
-
-    def get_tracked_changes(self) -> Element | None:
-        """Return the tracked-changes part in the text body."""
-        return self.get_element("//text:tracked-changes")
-
-    def get_changes_ids(self) -> list[Element | Text]:
-        """Return a list of ids that refers to a change region in the tracked
-        changes list.
-        """
-        # Insertion changes
-        xpath_query = "descendant::text:change-start/@text:change-id"
-        # Deletion changes
-        xpath_query += " | descendant::text:change/@text:change-id"
-        return self.xpath(xpath_query)
-
-    def get_text_change_deletions(self) -> list[Element]:
-        """Return all the text changes of deletion kind: the tags text:change.
-        Consider using : get_text_changes()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:text:change")
-
-    def get_text_change_deletion(
-        self,
-        position: int = 0,
-        idx: str | None = None,
-    ) -> Element | None:
-        """Return the text change of deletion kind that matches the criteria.
-        Search only for the tags text:change.
-        Consider using : get_text_change()
-
-        Arguments:
-
-            position -- int
-
-            idx -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:change", position, change_id=idx
-        )
-
-    def get_text_change_starts(self) -> list[Element]:
-        """Return all the text change-start. Search only for the tags
-        text:change-start.
-        Consider using : get_text_changes()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:change-start")
-
-    def get_text_change_start(
-        self,
-        position: int = 0,
-        idx: str | None = None,
-    ) -> Element | None:
-        """Return the text change-start that matches the criteria. Search
-        only the tags text:change-start.
-        Consider using : get_text_change()
-
-        Arguments:
-
-            position -- int
-
-            idx -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:change-start", position, change_id=idx
-        )
-
-    def get_text_change_ends(self) -> list[Element]:
-        """Return all the text change-end. Search only the tags
-        text:change-end.
-        Consider using : get_text_changes()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:change-end")
-
-    def get_text_change_end(
-        self,
-        position: int = 0,
-        idx: str | None = None,
-    ) -> Element | None:
-        """Return the text change-end that matches the criteria. Search only
-        the tags text:change-end.
-        Consider using : get_text_change()
-
-        Arguments:
-
-            position -- int
-
-            idx -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:change-end", position, change_id=idx
-        )
-
-    def get_text_changes(self) -> list[Element]:
-        """Return all the text changes, either single deletion
-        (text:change) or start of range of changes (text:change-start).
-
-        Return: list of Element
-        """
-        request = "descendant::text:change-start | descendant::text:change"
-        return self._filtered_elements(request)
-
-    def get_text_change(
-        self,
-        position: int = 0,
-        idx: str | None = None,
-    ) -> Element | None:
-        """Return the text change that matches the criteria. Either single
-        deletion (text:change) or start of range of changes (text:change-start).
-        position : index of the element to retrieve if several matches, default
-        is 0.
-        idx : change-id of the element.
-
-        Arguments:
-
-            position -- int
-
-            idx -- str
-
-        Return: Element or None if not found
-        """
-        if idx:
-            request = (
-                f'descendant::text:change-start[@text:change-id="{idx}"] '
-                f'| descendant::text:change[@text:change-id="{idx}"]'
-            )
-            return self._filtered_element(request, 0)
-        request = "descendant::text:change-start | descendant::text:change"
-        return self._filtered_element(request, position)
-
-    # Table Of Content
-
-    def get_tocs(self) -> list[Element]:
-        """Return all the tables of contents.
-
-        Return: list of odf_toc
-        """
-        return self._filtered_elements("text:table-of-content")
-
-    def get_toc(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the table of contents that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: odf_toc or None if not found
-        """
-        return self._filtered_element(
-            "text:table-of-content", position, content=content
-        )
-
-    # Styles
-
-    @staticmethod
-    def _get_style_tagname(family: str | None, is_default: bool = False) -> str:
-        """Widely match possible tag names given the family (or not)."""
-        if not family:
-            tagname = "(style:default-style|*[@style:name]|draw:fill-image|draw:marker)"
-        elif is_default:
-            # Default style
-            tagname = "style:default-style"
-        else:
-            tagname = _family_style_tagname(family)
-            # if famattr:
-            #    # Include family default style
-            #    tagname = '(%s|style:default-style)' % tagname
-            if family in FAMILY_ODF_STD:
-                # Include family default style
-                tagname = f"({tagname}|style:default-style)"
-        return tagname
-
-    def get_styles(self, family: str | None = None) -> list[Element]:
-        # Both common and default styles
-        tagname = self._get_style_tagname(family)
-        return self._filtered_elements(tagname, family=family)
-
-    def get_style(
-        self,
-        family: str,
-        name_or_element: str | Element | None = None,
-        display_name: str | None = None,
-    ) -> Element | None:
-        """Return the style uniquely identified by the family/name pair. If
-        the argument is already a style object, it will return it.
-
-        If the name is not the internal name but the name you gave in the
-        desktop application, use display_name instead.
-
-        Arguments:
-
-            family -- 'paragraph', 'text', 'graphic', 'table', 'list',
-                      'number'
-
-            name_or_element -- str or Style
-
-            display_name -- str
-
-        Return: odf_style or None if not found
-        """
-        if isinstance(name_or_element, Element):
-            name = self.get_attribute("style:name")
-            if name is not None:
-                return name_or_element
-            else:
-                raise ValueError(f"Not a odf_style ? {name_or_element!r}")
-        style_name = name_or_element
-        is_default = not (style_name or display_name)
-        tagname = self._get_style_tagname(family, is_default=is_default)
-        # famattr became None if no "style:family" attribute
-        if family:
-            return self._filtered_element(
-                tagname,
-                0,
-                style_name=style_name,
-                display_name=display_name,
-                family=family,
-            )
-        else:
-            return self._filtered_element(
-                tagname,
-                0,
-                draw_name=style_name or display_name,
-                family=family,
-            )
-
-    def _filtered_element(
-        self,
-        query_string: str,
-        position: int,
-        **kwargs: Any,
-    ) -> Element | None:
-        results = self._filtered_elements(query_string, **kwargs)
-        try:
-            return results[position]
-        except IndexError:
-            return None
-
-    def _filtered_elements(
-        self,
-        query_string: str,
-        content: str | None = None,
-        url: str | None = None,
-        svg_title: str | None = None,
-        svg_desc: str | None = None,
-        dc_creator: str | None = None,
-        dc_date: datetime | None = None,
-        **kwargs: Any,
-    ) -> list[Element]:
-        query = make_xpath_query(query_string, **kwargs)
-        elements = self.get_elements(query)
-        # Filter the elements with the regex (TODO use XPath)
-        if content is not None:
-            elements = [element for element in elements if element.match(content)]
-        if url is not None:
-            filtered = []
-            for element in elements:
-                url_attr = element.get_attribute("xlink:href")
-                if isinstance(url_attr, str) and search(url, url_attr) is not None:
-                    filtered.append(element)
-            elements = filtered
-        if dc_date is None:
-            dt_dc_date = None
-        else:
-            dt_dc_date = DateTime.encode(dc_date)
-        for variable, childname in [
-            (svg_title, "svg:title"),
-            (svg_desc, "svg:desc"),
-            (dc_creator, "descendant::dc:creator"),
-            (dt_dc_date, "descendant::dc:date"),
-        ]:
-            if not variable:
-                continue
-            filtered = []
-            for element in elements:
-                child = element.get_element(childname)
-                if child and child.match(variable):
-                    filtered.append(element)
-            elements = filtered
-        return elements
-
-

Ancestors

- -

Subclasses

- -

Static methods

-
-
-def from_tag(tag_or_elem: str | _Element) ‑> Element -
-
-

Element class and subclass factory.

-

Turn an lxml Element or ODF string tag into an ODF XML Element -of the relevant class.

-

Arguments

-

tag_or_elem – ODF str tag or lxml.Element

-

Return: Element (or subclass) instance

-
- -Expand source code - -
@classmethod
-def from_tag(cls, tag_or_elem: str | _Element) -> Element:
-    """Element class and subclass factory.
-
-    Turn an lxml Element or ODF string tag into an ODF XML Element
-    of the relevant class.
-
-    Arguments:
-
-        tag_or_elem -- ODF str tag or lxml.Element
-
-    Return: Element (or subclass) instance
-    """
-    if isinstance(tag_or_elem, str):
-        # assume the argument is a prefix:name tag
-        elem = cls.make_etree_element(tag_or_elem)
-    else:
-        elem = tag_or_elem
-    klass = _class_registry.get(elem.tag, cls)
-    return klass(tag_or_elem=elem)
-
-
-
-def from_tag_for_clone(tree_element: _Element, cache: tuple | None) ‑> Element -
-
-
-
- -Expand source code - -
@classmethod
-def from_tag_for_clone(
-    cls: type,
-    tree_element: _Element,
-    cache: tuple | None,
-) -> Element:
-    tag = to_str(tree_element.tag)
-    klass = _class_registry.get(tag, cls)
-    element = klass(tag_or_elem=tree_element)
-    if cache and element._caching:
-        element._tmap = cache[0]
-        element._cmap = cache[1]
-        if len(cache) == 3:
-            element._rmap = cache[2]
-    return element
-
-
-
-def make_etree_element(tag: str) ‑> lxml.etree._Element -
-
-
-
- -Expand source code - -
@staticmethod
-def make_etree_element(tag: str) -> _Element:
-    if not isinstance(tag, str):
-        raise TypeError(f"Tag is not str: {tag!r}")
-    tag = tag.strip()
-    if not tag:
-        raise ValueError("Tag is empty")
-    if "<" not in tag:
-        # Qualified name
-        # XXX don't build the element from scratch or lxml will pollute with
-        # repeated namespace declarations
-        tag = f"<{tag}/>"
-    # XML fragment
-    root = fromstring(NAMESPACES_XML % str_to_bytes(tag))
-    return root[0]
-
-
-
-

Instance variables

-
-
var attributes : dict[str, str]
-
-
-
- -Expand source code - -
@property
-def attributes(self) -> dict[str, str]:
-    return {
-        _get_prefixed_name(str(key)): str(value)
-        for key, value in self.__element.attrib.items()
-    }
-
-
-
var children : list[Element]
-
-
-
- -Expand source code - -
@property
-def children(self) -> list[Element]:
-    element = self.__element
-    return [
-        Element.from_tag(e)
-        for e in element.iterchildren()
-        if isinstance(e, _Element)
-    ]
-
-
-
var cloneElement
-
-
-
- -Expand source code - -
@property
-def clone(self) -> Element:
-    clone = deepcopy(self.__element)
-    root = lxml_Element("ROOT", nsmap=ODF_NAMESPACES)
-    root.append(clone)
-    return self.from_tag(clone)
-
-    # slow data = tostring(self.__element, encoding='unicode')
-    # return self.from_tag(data)
-
-
-
var dc_creator : str | None
-
-

Get dc:creator value.

-

Return: str (or None if inexistant)

-
- -Expand source code - -
@property
-def dc_creator(self) -> str | None:
-    """Get dc:creator value.
-
-    Return: str (or None if inexistant)
-    """
-    return self._get_inner_text("dc:creator")
-
-
-
var dc_date : datetime.datetime | None
-
-

Get the dc:date value.

-

Return: datetime (or None if inexistant)

-
- -Expand source code - -
@property
-def dc_date(self) -> datetime | None:
-    """Get the dc:date value.
-
-    Return: datetime (or None if inexistant)
-    """
-    date = self._get_inner_text("dc:date")
-    if date is None:
-        return None
-    return DateTime.decode(date)
-
-
-
var document_bodyElement | None
-
-

Return the document body : 'office:body'

-
- -Expand source code - -
@property
-def document_body(self) -> Element | None:
-    """Return the document body : 'office:body'"""
-    return self.get_element("//office:body/*[1]")
-
-
-
var is_bound : bool
-
-
-
- -Expand source code - -
@property
-def is_bound(self) -> bool:
-    return self.parent is not None
-
-
-
var parentElement | None
-
-
-
- -Expand source code - -
@property
-def parent(self) -> Element | None:
-    element = self.__element
-    parent = element.getparent()
-    if parent is None:
-        # Already at root
-        return None
-    return Element.from_tag(parent)
-
-
-
var rootElement
-
-
-
- -Expand source code - -
@property
-def root(self) -> Element:
-    element = self.__element
-    tree = element.getroottree()
-    root = tree.getroot()
-    return Element.from_tag(root)
-
-
-
var svg_description : str | None
-
-
-
- -Expand source code - -
@property
-def svg_description(self) -> str | None:
-    return self._get_inner_text("svg:desc")
-
-
-
var svg_title : str | None
-
-
-
- -Expand source code - -
@property
-def svg_title(self) -> str | None:
-    return self._get_inner_text("svg:title")
-
-
-
var tag : str
-
-

Get/set the underlying xml tag with the given qualified name.

-

Warning: direct change of tag does not change the element class.

-

Arguments

-

qname – str (e.g. "text:span")

-
- -Expand source code - -
@property
-def tag(self) -> str:
-    """Get/set the underlying xml tag with the given qualified name.
-
-    Warning: direct change of tag does not change the element class.
-
-    Arguments:
-
-        qname -- str (e.g. "text:span")
-    """
-    return _get_prefixed_name(self.__element.tag)
-
-
-
var tail : str | None
-
-

Get / set the text immediately following the element.

-
- -Expand source code - -
@property
-def tail(self) -> str | None:
-    """Get / set the text immediately following the element."""
-    return self.__element.tail
-
-
-
var text : str
-
-

Get / set the text content of the element.

-
- -Expand source code - -
@property
-def text(self) -> str:
-    """Get / set the text content of the element."""
-    return self.__element.text or ""
-
-
-
var text_content : str
-
-

Get / set the text of the embedded paragraph, including embeded -annotations, cells…

-

Set create a paragraph if missing

-
- -Expand source code - -
@property
-def text_content(self) -> str:
-    """Get / set the text of the embedded paragraph, including embeded
-    annotations, cells...
-
-    Set create a paragraph if missing
-    """
-    return "\n".join(
-        child.text_recursive for child in self.get_elements("descendant::text:p")
-    )
-
-
-
var text_recursive : str
-
-
-
- -Expand source code - -
@property
-def text_recursive(self) -> str:
-    return "".join(str(x) for x in self.__element.itertext())
-
-
-
-

Methods

-
-
-def append(self, str_or_element: str | Element) ‑> None -
-
-

Insert element or text in the last position.

-
- -Expand source code - -
def append(self, str_or_element: str | Element) -> None:
-    """Insert element or text in the last position."""
-    current = self.__element
-    if isinstance(str_or_element, str):
-        # Has children ?
-        children = list(current.iterchildren())
-        if children:
-            # Append to tail of the last child
-            last_child = children[-1]
-            text = last_child.tail
-            text = text if text is not None else ""
-            text += str_or_element
-            last_child.tail = text
-        else:
-            # Append to text of the element
-            text = current.text
-            text = text if text is not None else ""
-            text += str_or_element
-            current.text = text
-    elif isinstance(str_or_element, Element):
-        current.append(str_or_element.__element)
-    else:
-        raise TypeError(f'Element or string expected, not "{type(str_or_element)}"')
-
-
-
-def append_named_range(self, named_range: Element) ‑> None -
-
-

Append the named range to the spreadsheet, replacing existing named -range of same name if any.

-

Arguments

-

named_range – -NamedRange

-
- -Expand source code - -
def append_named_range(self, named_range: Element) -> None:
-    """Append the named range to the spreadsheet, replacing existing named
-    range of same name if any.
-
-    Arguments:
-
-        named_range --  NamedRange
-    """
-    if self.tag != "office:spreadsheet":
-        raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
-    named_expressions = self.get_element("table:named-expressions")
-    if not named_expressions:
-        named_expressions = Element.from_tag("table:named-expressions")
-        self.append(named_expressions)
-    # exists ?
-    current = named_expressions.get_element(
-        f'table:named-range[@table:name="{named_range.name}"][1]'  # type:ignore
-    )
-    if current:
-        named_expressions.delete(current)
-    named_expressions.append(named_range)
-
-
-
-def clear(self) ‑> None -
-
-

Remove text, children and attributes from the element.

-
- -Expand source code - -
def clear(self) -> None:
-    """Remove text, children and attributes from the element."""
-    self.__element.clear()
-    if hasattr(self, "_tmap"):
-        self._tmap: list[int] = []
-    if hasattr(self, "_cmap"):
-        self._cmap: list[int] = []
-    if hasattr(self, "_rmap"):
-        self._rmap: list[int] = []
-    if hasattr(self, "_indexes"):
-        remember = False
-        if "_rmap" in self._indexes:
-            remember = True
-        self._indexes: dict[str, dict] = {}
-        self._indexes["_cmap"] = {}
-        self._indexes["_tmap"] = {}
-        if remember:
-            self._indexes["_rmap"] = {}
-
-
-
-def del_attribute(self, name: str) ‑> None -
-
-
-
- -Expand source code - -
def del_attribute(self, name: str) -> None:
-    element = self.__element
-    lxml_tag = _get_lxml_tag_or_name(name)
-    del element.attrib[lxml_tag]
-
-
-
-def delete(self, child: Element | None = None, keep_tail: bool = True) ‑> None -
-
-

Delete the given element from the XML tree. If no element is given, -"self" is deleted. The XML library may allow to continue to use an -element now "orphan" as long as you have a reference to it.

-

if keep_tail is True (default), the tail text is not erased.

-

Arguments

-

child – Element

-

keep_tail – boolean (default to True), True for most usages.

-
- -Expand source code - -
def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-    """Delete the given element from the XML tree. If no element is given,
-    "self" is deleted. The XML library may allow to continue to use an
-    element now "orphan" as long as you have a reference to it.
-
-    if keep_tail is True (default), the tail text is not erased.
-
-    Arguments:
-
-        child -- Element
-
-        keep_tail -- boolean (default to True), True for most usages.
-    """
-    if child is None:
-        parent = self.parent
-        if parent is None:
-            raise ValueError(f"Can't delete the root element\n{self.serialize()}")
-        child = self
-    else:
-        parent = self
-    if keep_tail and child.__element.tail is not None:
-        current = child.__element
-        tail = str(current.tail)
-        current.tail = None
-        prev = current.getprevious()
-        if prev is not None:
-            if prev.tail is None:
-                prev.tail = tail
-            else:
-                prev.tail += tail
-        else:
-            if parent.__element.text is None:
-                parent.__element.text = tail
-            else:
-                parent.__element.text += tail
-    parent.__element.remove(child.__element)
-
-
-
-def delete_named_range(self, name: str) ‑> None -
-
-

Delete the Named Range of specified name from the spreadsheet.

-

Arguments

-

name – str

-
- -Expand source code - -
def delete_named_range(self, name: str) -> None:
-    """Delete the Named Range of specified name from the spreadsheet.
-
-    Arguments:
-
-        name -- str
-    """
-    if self.tag != "office:spreadsheet":
-        raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
-    named_range = self.get_named_range(name)
-    if not named_range:
-        return
-    named_range.delete()
-    named_expressions = self.get_element("table:named-expressions")
-    if not named_expressions:
-        return
-    element = named_expressions.__element
-    children = list(element.iterchildren())
-    if not children:
-        self.delete(named_expressions)
-
-
-
-def elements_repeated_sequence(self, xpath_instance: XPath, name: str) ‑> list[tuple[int, int]] -
-
-

Utility method for table module.

-
- -Expand source code - -
def elements_repeated_sequence(
-    self,
-    xpath_instance: XPath,
-    name: str,
-) -> list[tuple[int, int]]:
-    """Utility method for table module."""
-    lxml_tag = _get_lxml_tag_or_name(name)
-    element = self.__element
-    sub_elements = xpath_instance(element)
-    if not isinstance(sub_elements, list):
-        raise TypeError("Bad XPath result.")
-    result: list[tuple[int, int]] = []
-    idx = -1
-    for sub_element in sub_elements:
-        if not isinstance(sub_element, _Element):
-            continue
-        idx += 1
-        value = sub_element.get(lxml_tag)
-        if value is None:
-            result.append((idx, 1))
-            continue
-        try:
-            int_value = int(value)
-        except ValueError:
-            int_value = 1
-        result.append((idx, max(int_value, 1)))
-    return result
-
-
-
-def extend(self, odf_elements: Iterable[Element]) ‑> None -
-
-

Fast append elements at the end of ourself using extend.

-
- -Expand source code - -
def extend(self, odf_elements: Iterable[Element]) -> None:
-    """Fast append elements at the end of ourself using extend."""
-    if odf_elements:
-        current = self.__element
-        elements = [element.__element for element in odf_elements]
-        current.extend(elements)
-
-
-
-def get_annotation(self, position: int = 0, creator: str | None = None, start_date: datetime | None = None, end_date: datetime | None = None, content: str | None = None, name: str | None = None) ‑> Element | None -
-
-

Return the annotation that matches the criteria.

-

Arguments

-

position – int

-

creator – str

-

start_date – datetime instance

-

end_date – datetime instance

-

content – str regex

-

name – str

-

Return: Annotation or None if not found

-
- -Expand source code - -
def get_annotation(
-    self,
-    position: int = 0,
-    creator: str | None = None,
-    start_date: datetime | None = None,
-    end_date: datetime | None = None,
-    content: str | None = None,
-    name: str | None = None,
-) -> Element | None:
-    """Return the annotation that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        creator -- str
-
-        start_date -- datetime instance
-
-        end_date -- datetime instance
-
-        content -- str regex
-
-        name -- str
-
-    Return: Annotation or None if not found
-    """
-    if name is not None:
-        return self._filtered_element(
-            "descendant::office:annotation", 0, office_name=name
-        )
-    annotations = self.get_annotations(
-        creator=creator, start_date=start_date, end_date=end_date, content=content
-    )
-    if not annotations:
-        return None
-    try:
-        return annotations[position]
-    except IndexError:
-        return None
-
-
-
-def get_annotation_end(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the annotation end that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_annotation_end(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the annotation end that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::office:annotation-end", position, office_name=name
-    )
-
-
-
-def get_annotation_ends(self) ‑> list[Element] -
-
-

Return all the annotation ends.

-

Return: list of Element

-
- -Expand source code - -
def get_annotation_ends(self) -> list[Element]:
-    """Return all the annotation ends.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::office:annotation-end")
-
-
-
-def get_annotations(self, creator: str | None = None, start_date: datetime | None = None, end_date: datetime | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the annotations that match the criteria.

-

Arguments

-

creator – str

-

start_date – datetime instance

-

end_date – -datetime instance

-

content – str regex

-

Return: list of Annotation

-
- -Expand source code - -
def get_annotations(
-    self,
-    creator: str | None = None,
-    start_date: datetime | None = None,
-    end_date: datetime | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the annotations that match the criteria.
-
-    Arguments:
-
-        creator -- str
-
-        start_date -- datetime instance
-
-        end_date --  datetime instance
-
-        content -- str regex
-
-    Return: list of Annotation
-    """
-    annotations = []
-    for annotation in self._filtered_elements(
-        "descendant::office:annotation", content=content
-    ):
-        if creator is not None and creator != annotation.dc_creator:
-            continue
-        date = annotation.dc_date
-        if date is None:
-            continue
-        if start_date is not None and date < start_date:
-            continue
-        if end_date is not None and date >= end_date:
-            continue
-        annotations.append(annotation)
-    return annotations
-
-
-
-def get_attribute(self, name: str) ‑> str | bool | None -
-
-

Return the attribute value as type str | bool | None.

-
- -Expand source code - -
def get_attribute(self, name: str) -> str | bool | None:
-    """Return the attribute value as type str | bool | None."""
-    element = self.__element
-    lxml_tag = _get_lxml_tag_or_name(name)
-    value = element.get(lxml_tag)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-def get_attribute_integer(self, name: str) ‑> int | None -
-
-

Return either the attribute as type int, or None.

-
- -Expand source code - -
def get_attribute_integer(self, name: str) -> int | None:
-    """Return either the attribute as type int, or None."""
-    element = self.__element
-    lxml_tag = _get_lxml_tag_or_name(name)
-    value = element.get(lxml_tag)
-    if value is None:
-        return None
-    try:
-        return int(value)
-    except ValueError:
-        return None
-
-
-
-def get_attribute_string(self, name: str) ‑> str | None -
-
-

Return either the attribute as type str, or None.

-
- -Expand source code - -
def get_attribute_string(self, name: str) -> str | None:
-    """Return either the attribute as type str, or None."""
-    element = self.__element
-    lxml_tag = _get_lxml_tag_or_name(name)
-    value = element.get(lxml_tag)
-    if value is None:
-        return None
-    return str(value)
-
-
-
-def get_between(self, tag1: Element, tag2: Element, as_text: bool = False, clean: bool = True, no_header: bool = True) ‑> list | Element | str -
-
-

Returns elements between tag1 and tag2, tag1 and tag2 shall -be unique and having an id attribute. -(WARN: buggy if tag1/tag2 defines a malformed odf xml.) -If as_text is True: returns the text content. -If clean is True: suppress unwanted tags (deletions marks, …) -If no_header is True: existing text:h are changed in text:p -By default: returns a list of Element, cleaned and without headers.

-

Implementation and standard retrictions: -Only text:h and text:p sould be 'cut' by an insert tag, so inner parts -of insert tags are:

-
- any text:h, text:p or sub tag of these
-
-- some text, part of a parent text:h or text:p
-
-

Arguments

-

tag1 – Element

-

tag2 – Element

-

as_text – boolean

-

clean – boolean

-

no_header – boolean

-

Return: list of odf_paragraph or odf_header

-
- -Expand source code - -
def get_between(
-    self,
-    tag1: Element,
-    tag2: Element,
-    as_text: bool = False,
-    clean: bool = True,
-    no_header: bool = True,
-) -> list | Element | str:
-    """Returns elements between tag1 and tag2, tag1 and tag2 shall
-    be unique and having an id attribute.
-    (WARN: buggy if tag1/tag2 defines a malformed odf xml.)
-    If as_text is True: returns the text content.
-    If clean is True: suppress unwanted tags (deletions marks, ...)
-    If no_header is True: existing text:h are changed in text:p
-    By default: returns a list of Element, cleaned and without headers.
-
-    Implementation and standard retrictions:
-    Only text:h and text:p sould be 'cut' by an insert tag, so inner parts
-    of insert tags are:
-
-        - any text:h, text:p or sub tag of these
-
-        - some text, part of a parent text:h or text:p
-
-    Arguments:
-
-        tag1 -- Element
-
-        tag2 -- Element
-
-        as_text -- boolean
-
-        clean -- boolean
-
-        no_header -- boolean
-
-    Return: list of odf_paragraph or odf_header
-    """
-    inner = self._get_between_base(tag1, tag2)
-
-    if clean:
-        clean_tags = (
-            "text:change",
-            "text:change-start",
-            "text:change-end",
-            "text:reference-mark",
-            "text:reference-mark-start",
-            "text:reference-mark-end",
-        )
-        request_self = " | ".join(["self::%s" % c for c in clean_tags])
-        inner = [e for e in inner if not e.xpath(request_self)]
-        request = " | ".join([f"descendant::{tag}" for tag in clean_tags])
-        for element in inner:
-            to_del = element.xpath(request)
-            for elem in to_del:
-                if isinstance(elem, Element):
-                    element.delete(elem)
-    if no_header:  # crude replace t:h by t:p
-        new_inner = []
-        for element in inner:
-            if element.tag == "text:h":
-                children = element.children
-                text = element.__element.text
-                para = Element.from_tag("text:p")
-                para.text = text or ""
-                for c in children:
-                    para.append(c)
-                new_inner.append(para)
-            else:
-                new_inner.append(element)
-        inner = new_inner
-    if as_text:
-        return "\n".join([e.get_formatted_text() for e in inner])
-    else:
-        return inner
-
-
-
-def get_bookmark(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the bookmark that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

Return: Bookmark or None if not found

-
- -Expand source code - -
def get_bookmark(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the bookmark that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Bookmark or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:bookmark", position, text_name=name
-    )
-
-
-
-def get_bookmark_end(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the bookmark end that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_bookmark_end(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the bookmark end that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:bookmark-end", position, text_name=name
-    )
-
-
-
-def get_bookmark_ends(self) ‑> list[Element] -
-
-

Return all the bookmark ends.

-

Return: list of Element

-
- -Expand source code - -
def get_bookmark_ends(self) -> list[Element]:
-    """Return all the bookmark ends.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:bookmark-end")
-
-
-
-def get_bookmark_start(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the bookmark start that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_bookmark_start(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the bookmark start that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:bookmark-start", position, text_name=name
-    )
-
-
-
-def get_bookmark_starts(self) ‑> list[Element] -
-
-

Return all the bookmark starts.

-

Return: list of Element

-
- -Expand source code - -
def get_bookmark_starts(self) -> list[Element]:
-    """Return all the bookmark starts.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:bookmark-start")
-
-
-
-def get_bookmarks(self) ‑> list[Element] -
-
-

Return all the bookmarks.

-

Return: list of Element

-
- -Expand source code - -
def get_bookmarks(self) -> list[Element]:
-    """Return all the bookmarks.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:bookmark")
-
-
-
-def get_changes_ids(self) ‑> list[Element | Text] -
-
-

Return a list of ids that refers to a change region in the tracked -changes list.

-
- -Expand source code - -
def get_changes_ids(self) -> list[Element | Text]:
-    """Return a list of ids that refers to a change region in the tracked
-    changes list.
-    """
-    # Insertion changes
-    xpath_query = "descendant::text:change-start/@text:change-id"
-    # Deletion changes
-    xpath_query += " | descendant::text:change/@text:change-id"
-    return self.xpath(xpath_query)
-
-
-
-def get_draw_connector(self, position: int = 0, id: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the draw connector that matches the criteria.

-

Arguments

-

position – int

-

id – str

-

content – str regex

-

Return: odf_shape or None if not found

-
- -Expand source code - -
def get_draw_connector(
-    self,
-    position: int = 0,
-    id: str | None = None,  # noqa:A002
-    content: str | None = None,
-) -> Element | None:
-    """Return the draw connector that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        id -- str
-
-        content -- str regex
-
-    Return: odf_shape or None if not found
-    """
-    return self._filtered_element(
-        "descendant::draw:connector", position, draw_id=id, content=content
-    )
-
-
-
-def get_draw_connectors(self, draw_style: str | None = None, draw_text_style: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the draw connectors that match the criteria.

-

Arguments

-

draw_style – str

-

draw_text_style – str

-

content – str regex

-

Return: list of odf_shape

-
- -Expand source code - -
def get_draw_connectors(
-    self,
-    draw_style: str | None = None,
-    draw_text_style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the draw connectors that match the criteria.
-
-    Arguments:
-
-        draw_style -- str
-
-        draw_text_style -- str
-
-        content -- str regex
-
-    Return: list of odf_shape
-    """
-    return self._filtered_elements(
-        "descendant::draw:connector",
-        draw_style=draw_style,
-        draw_text_style=draw_text_style,
-        content=content,
-    )
-
-
-
-def get_draw_ellipse(self, position: int = 0, id: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the draw ellipse that matches the criteria.

-

Arguments

-

position – int

-

id – str

-

content – str regex

-

Return: odf_shape or None if not found

-
- -Expand source code - -
def get_draw_ellipse(
-    self,
-    position: int = 0,
-    id: str | None = None,  # noqa:A002
-    content: str | None = None,
-) -> Element | None:
-    """Return the draw ellipse that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        id -- str
-
-        content -- str regex
-
-    Return: odf_shape or None if not found
-    """
-    return self._filtered_element(
-        "descendant::draw:ellipse", position, draw_id=id, content=content
-    )
-
-
-
-def get_draw_ellipses(self, draw_style: str | None = None, draw_text_style: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the draw ellipses that match the criteria.

-

Arguments

-

draw_style – str

-

draw_text_style – str

-

content – str regex

-

Return: list of odf_shape

-
- -Expand source code - -
def get_draw_ellipses(
-    self,
-    draw_style: str | None = None,
-    draw_text_style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the draw ellipses that match the criteria.
-
-    Arguments:
-
-        draw_style -- str
-
-        draw_text_style -- str
-
-        content -- str regex
-
-    Return: list of odf_shape
-    """
-    return self._filtered_elements(
-        "descendant::draw:ellipse",
-        draw_style=draw_style,
-        draw_text_style=draw_text_style,
-        content=content,
-    )
-
-
-
-def get_draw_group(self, position: int = 0, name: str | None = None, title: str | None = None, description: str | None = None, content: str | None = None) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_draw_group(
-    self,
-    position: int = 0,
-    name: str | None = None,
-    title: str | None = None,
-    description: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    return self._filtered_element(
-        "descendant::draw:g",
-        position,
-        draw_name=name,
-        svg_title=title,
-        svg_desc=description,
-        content=content,
-    )
-
-
-
-def get_draw_groups(self, title: str | None = None, description: str | None = None, content: str | None = None) ‑> list[Element] -
-
-
-
- -Expand source code - -
def get_draw_groups(
-    self,
-    title: str | None = None,
-    description: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    return self._filtered_elements(
-        "descendant::draw:g",
-        svg_title=title,
-        svg_desc=description,
-        content=content,
-    )
-
-
-
-def get_draw_line(self, position: int = 0, id: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the draw line that matches the criteria.

-

Arguments

-

position – int

-

id – str

-

content – str regex

-

Return: odf_shape or None if not found

-
- -Expand source code - -
def get_draw_line(
-    self,
-    position: int = 0,
-    id: str | None = None,  # noqa:A002
-    content: str | None = None,
-) -> Element | None:
-    """Return the draw line that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        id -- str
-
-        content -- str regex
-
-    Return: odf_shape or None if not found
-    """
-    return self._filtered_element(
-        "descendant::draw:line", position, draw_id=id, content=content
-    )
-
-
-
-def get_draw_lines(self, draw_style: str | None = None, draw_text_style: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the draw lines that match the criteria.

-

Arguments

-

draw_style – str

-

draw_text_style – str

-

content – str regex

-

Return: list of odf_shape

-
- -Expand source code - -
def get_draw_lines(
-    self,
-    draw_style: str | None = None,
-    draw_text_style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the draw lines that match the criteria.
-
-    Arguments:
-
-        draw_style -- str
-
-        draw_text_style -- str
-
-        content -- str regex
-
-    Return: list of odf_shape
-    """
-    return self._filtered_elements(
-        "descendant::draw:line",
-        draw_style=draw_style,
-        draw_text_style=draw_text_style,
-        content=content,
-    )
-
-
-
-def get_draw_page(self, position: int = 0, name: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the draw page that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

content – str regex

-

Return: DrawPage or None if not found

-
- -Expand source code - -
def get_draw_page(
-    self,
-    position: int = 0,
-    name: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the draw page that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-        content -- str regex
-
-    Return: DrawPage or None if not found
-    """
-    return self._filtered_element(
-        "descendant::draw:page", position, draw_name=name, content=content
-    )
-
-
-
-def get_draw_pages(self, style: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the draw pages that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of DrawPage

-
- -Expand source code - -
def get_draw_pages(
-    self,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the draw pages that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of DrawPage
-    """
-    return self._filtered_elements(
-        "descendant::draw:page", draw_style=style, content=content
-    )
-
-
-
-def get_draw_rectangle(self, position: int = 0, id: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the draw rectangle that matches the criteria.

-

Arguments

-

position – int

-

id – str

-

content – str regex

-

Return: odf_shape or None if not found

-
- -Expand source code - -
def get_draw_rectangle(
-    self,
-    position: int = 0,
-    id: str | None = None,  # noqa:A002
-    content: str | None = None,
-) -> Element | None:
-    """Return the draw rectangle that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        id -- str
-
-        content -- str regex
-
-    Return: odf_shape or None if not found
-    """
-    return self._filtered_element(
-        "descendant::draw:rect", position, draw_id=id, content=content
-    )
-
-
-
-def get_draw_rectangles(self, draw_style: str | None = None, draw_text_style: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the draw rectangles that match the criteria.

-

Arguments

-

draw_style – str

-

draw_text_style – str

-

content – str regex

-

Return: list of odf_shape

-
- -Expand source code - -
def get_draw_rectangles(
-    self,
-    draw_style: str | None = None,
-    draw_text_style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the draw rectangles that match the criteria.
-
-    Arguments:
-
-        draw_style -- str
-
-        draw_text_style -- str
-
-        content -- str regex
-
-    Return: list of odf_shape
-    """
-    return self._filtered_elements(
-        "descendant::draw:rect",
-        draw_style=draw_style,
-        draw_text_style=draw_text_style,
-        content=content,
-    )
-
-
-
-def get_element(self, xpath_query: XPath | str) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_element(self, xpath_query: XPath | str) -> Element | None:
-    element = self.__element
-    result = element.xpath(f"({xpath_query})[1]", namespaces=ODF_NAMESPACES)
-    if result:
-        return Element.from_tag(result[0])  # type:ignore
-    return None
-
-
-
-def get_elements(self, xpath_query: XPath | str) ‑> list[Element] -
-
-
-
- -Expand source code - -
def get_elements(self, xpath_query: XPath | str) -> list[Element]:
-    cache: tuple | None = None
-    element = self.__element
-    if isinstance(xpath_query, str):
-        new_xpath_query = xpath_compile(xpath_query)
-        result = new_xpath_query(element)
-    else:
-        result = xpath_query(element)
-    if not isinstance(result, list):
-        raise TypeError("Bad XPath result")
-
-    if hasattr(self, "_tmap"):
-        if hasattr(self, "_rmap"):
-            cache = (self._tmap, self._cmap, self._rmap)
-        else:
-            cache = (self._tmap, self._cmap)
-    return [
-        Element.from_tag_for_clone(e, cache)
-        for e in result
-        if isinstance(e, _Element)
-    ]
-
-
-
-def get_formatted_text(self, context: dict | None = None) ‑> str -
-
-

This function should return a beautiful version of the text.

-
- -Expand source code - -
def get_formatted_text(self, context: dict | None = None) -> str:
-    """This function should return a beautiful version of the text."""
-    return ""
-
-
-
-def get_frame(self, position: int = 0, name: str | None = None, presentation_class: str | None = None, title: str | None = None, description: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the section that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

presentation_class – str

-

title – str regex

-

description – str regex

-

content – str regex

-

Return: Frame or None if not found

-
- -Expand source code - -
def get_frame(
-    self,
-    position: int = 0,
-    name: str | None = None,
-    presentation_class: str | None = None,
-    title: str | None = None,
-    description: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the section that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-        presentation_class -- str
-
-        title -- str regex
-
-        description -- str regex
-
-        content -- str regex
-
-    Return: Frame or None if not found
-    """
-    return self._filtered_element(
-        "descendant::draw:frame",
-        position,
-        draw_name=name,
-        presentation_class=presentation_class,
-        svg_title=title,
-        svg_desc=description,
-        content=content,
-    )
-
-
-
-def get_frames(self, presentation_class: str | None = None, style: str | None = None, title: str | None = None, description: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the frames that match the criteria.

-

Arguments

-

presentation_class – str

-

style – str

-

title – str regex

-

description – str regex

-

content – str regex

-

Return: list of Frame

-
- -Expand source code - -
def get_frames(
-    self,
-    presentation_class: str | None = None,
-    style: str | None = None,
-    title: str | None = None,
-    description: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the frames that match the criteria.
-
-    Arguments:
-
-        presentation_class -- str
-
-        style -- str
-
-        title -- str regex
-
-        description -- str regex
-
-        content -- str regex
-
-    Return: list of Frame
-    """
-    return self._filtered_elements(
-        "descendant::draw:frame",
-        presentation_class=presentation_class,
-        draw_style=style,
-        svg_title=title,
-        svg_desc=description,
-        content=content,
-    )
-
-
-
-def get_header(self, position: int = 0, outline_level: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the Header that matches the criteria.

-

Arguments

-

position – int

-

content – str regex

-

Return: Header or None if not found

-
- -Expand source code - -
def get_header(
-    self,
-    position: int = 0,
-    outline_level: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the Header that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: Header or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:h",
-        position,
-        outline_level=outline_level,
-        content=content,
-    )
-
-
-
-def get_headers(self, style: str | None = None, outline_level: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the Headers that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of Header

-
- -Expand source code - -
def get_headers(
-    self,
-    style: str | None = None,
-    outline_level: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the Headers that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of Header
-    """
-    return self._filtered_elements(
-        "descendant::text:h",
-        text_style=style,
-        outline_level=outline_level,
-        content=content,
-    )
-
-
-
-def get_image(self, position: int = 0, name: str | None = None, url: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the image matching the criteria.

-

Arguments

-

position – int

-

name – str

-

url – str regex

-

content – str regex

-

Return: Element or None if not found

-
- -Expand source code - -
def get_image(
-    self,
-    position: int = 0,
-    name: str | None = None,
-    url: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the image matching the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-        url -- str regex
-
-        content -- str regex
-
-    Return: Element or None if not found
-    """
-    # The frame is holding the name
-    if name is not None:
-        frame = self._filtered_element(
-            "descendant::draw:frame", position, draw_name=name
-        )
-        if frame is None:
-            return None
-        # The name is supposedly unique
-        return frame.get_element("draw:image")
-    return self._filtered_element(
-        "descendant::draw:image", position, url=url, content=content
-    )
-
-
-
-def get_images(self, style: str | None = None, url: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the images matching the criteria.

-

Arguments

-

style – str

-

url – str regex

-

content – str regex

-

Return: list of Element

-
- -Expand source code - -
def get_images(
-    self,
-    style: str | None = None,
-    url: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the images matching the criteria.
-
-    Arguments:
-
-        style -- str
-
-        url -- str regex
-
-        content -- str regex
-
-    Return: list of Element
-    """
-    return self._filtered_elements(
-        "descendant::draw:image", text_style=style, url=url, content=content
-    )
-
-
- -
-

Return the link that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

title – str

-

url – str regex

-

content – str regex

-

Return: Element or None if not found

-
- -Expand source code - -
def get_link(
-    self,
-    position: int = 0,
-    name: str | None = None,
-    title: str | None = None,
-    url: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the link that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-        title -- str
-
-        url -- str regex
-
-        content -- str regex
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:a",
-        position,
-        office_name=name,
-        office_title=title,
-        url=url,
-        content=content,
-    )
-
-
- -
-

Return all the links that match the criteria.

-

Arguments

-

name – str

-

title – str

-

url – str regex

-

content – str regex

-

Return: list of Element

-
- -Expand source code - -
def get_links(
-    self,
-    name: str | None = None,
-    title: str | None = None,
-    url: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the links that match the criteria.
-
-    Arguments:
-
-        name -- str
-
-        title -- str
-
-        url -- str regex
-
-        content -- str regex
-
-    Return: list of Element
-    """
-    return self._filtered_elements(
-        "descendant::text:a",
-        office_name=name,
-        office_title=title,
-        url=url,
-        content=content,
-    )
-
-
-
-def get_list(self, position: int = 0, content: str | None = None) ‑> Element | None -
-
-

Return the list that matches the criteria.

-

Arguments

-

position – int

-

content – str regex

-

Return: List or None if not found

-
- -Expand source code - -
def get_list(
-    self,
-    position: int = 0,
-    content: str | None = None,
-) -> Element | None:
-    """Return the list that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: List or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:list", position, content=content
-    )
-
-
-
-def get_lists(self, style: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the lists that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of List

-
- -Expand source code - -
def get_lists(
-    self,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the lists that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of List
-    """
-    return self._filtered_elements(
-        "descendant::text:list", text_style=style, content=content
-    )
-
-
-
-def get_named_range(self, name: str) ‑> Element | None -
-
-

Return the named range of specified name, or None if not found.

-

Arguments

-

name – str

-

Return: NamedRange

-
- -Expand source code - -
def get_named_range(self, name: str) -> Element | None:
-    """Return the named range of specified name, or None if not found.
-
-    Arguments:
-
-        name -- str
-
-    Return: NamedRange
-    """
-    named_range = self.get_elements(
-        f'descendant::table:named-expressions/table:named-range[@table:name="{name}"][1]'
-    )
-    if named_range:
-        return named_range[0]
-    else:
-        return None
-
-
-
-def get_named_ranges(self) ‑> list[Element] -
-
-

Return all the tables named ranges.

-

Return: list of odf_named_range

-
- -Expand source code - -
def get_named_ranges(self) -> list[Element]:
-    """Return all the tables named ranges.
-
-    Return: list of odf_named_range
-    """
-    named_ranges = self.get_elements(
-        "descendant::table:named-expressions/table:named-range"
-    )
-    return named_ranges
-
-
-
-def get_note(self, position: int = 0, note_id: str | None = None, note_class: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the note that matches the criteria.

-

Arguments

-

position – int

-

note_id – str

-

note_class – 'footnote' or 'endnote'

-

content – str regex

-

Return: Note or None if not found

-
- -Expand source code - -
def get_note(
-    self,
-    position: int = 0,
-    note_id: str | None = None,
-    note_class: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the note that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        note_id -- str
-
-        note_class -- 'footnote' or 'endnote'
-
-        content -- str regex
-
-    Return: Note or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:note",
-        position,
-        text_id=note_id,
-        note_class=note_class,
-        content=content,
-    )
-
-
-
-def get_notes(self, note_class: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the notes that match the criteria.

-

Arguments

-

note_class – 'footnote' or 'endnote'

-

content – str regex

-

Return: list of Note

-
- -Expand source code - -
def get_notes(
-    self,
-    note_class: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the notes that match the criteria.
-
-    Arguments:
-
-        note_class -- 'footnote' or 'endnote'
-
-        content -- str regex
-
-    Return: list of Note
-    """
-    return self._filtered_elements(
-        "descendant::text:note", note_class=note_class, content=content
-    )
-
-
-
-def get_office_names(self) ‑> list[str] -
-
-

Return all the used office:name tags values of the element.

-

Return: list of unique str

-
- -Expand source code - -
def get_office_names(self) -> list[str]:
-    """Return all the used office:name tags values of the element.
-
-    Return: list of unique str
-    """
-    name_xpath_query = xpath_compile("//@office:name")
-    response = name_xpath_query(self.__element)
-    if not isinstance(response, list):
-        return []
-    return list({str(name) for name in response if name})
-
-
-
-def get_orphan_draw_connectors(self) ‑> list[Element] -
-
-

Return a list of connectors which don't have any shape connected -to them.

-
- -Expand source code - -
def get_orphan_draw_connectors(self) -> list[Element]:
-    """Return a list of connectors which don't have any shape connected
-    to them.
-    """
-    connectors = []
-    for connector in self.get_draw_connectors():
-        start_shape = connector.get_attribute("draw:start-shape")
-        end_shape = connector.get_attribute("draw:end-shape")
-        if start_shape is None and end_shape is None:
-            connectors.append(connector)
-    return connectors
-
-
-
-def get_paragraph(self, position: int = 0, content: str | None = None) ‑> Element | None -
-
-

Return the paragraph that matches the criteria.

-

Arguments

-

position – int

-

content – str regex

-

Return: Paragraph or None if not found

-
- -Expand source code - -
def get_paragraph(
-    self,
-    position: int = 0,
-    content: str | None = None,
-) -> Element | None:
-    """Return the paragraph that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: Paragraph or None if not found
-    """
-    return self._filtered_element("descendant::text:p", position, content=content)
-
-
-
-def get_paragraphs(self, style: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the paragraphs that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of Paragraph

-
- -Expand source code - -
def get_paragraphs(
-    self,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the paragraphs that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of Paragraph
-    """
-    return self._filtered_elements(
-        "descendant::text:p", text_style=style, content=content
-    )
-
-
-
-def get_reference_mark(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the reference mark that match the criteria. Either single -position reference mark (text:reference-mark) or start of range -reference (text:reference-mark-start).

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_reference_mark(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the reference mark that match the criteria. Either single
-    position reference mark (text:reference-mark) or start of range
-    reference (text:reference-mark-start).
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    if name:
-        request = (
-            f"descendant::text:reference-mark-start"
-            f'[@text:name="{name}"] '
-            f"| descendant::text:reference-mark"
-            f'[@text:name="{name}"]'
-        )
-        return self._filtered_element(request, position=0)
-    request = (
-        "descendant::text:reference-mark-start | descendant::text:reference-mark"
-    )
-    return self._filtered_element(request, position)
-
-
-
-def get_reference_mark_end(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the reference mark end that matches the criteria. Search only -the tags text:reference-mark-end. -Consider using : get_reference_marks()

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_reference_mark_end(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the reference mark end that matches the criteria. Search only
-    the tags text:reference-mark-end.
-    Consider using : get_reference_marks()
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:reference-mark-end", position, text_name=name
-    )
-
-
-
-def get_reference_mark_ends(self) ‑> list[Element] -
-
-

Return all the reference mark ends. Search only the tags -text:reference-mark-end. -Consider using : get_reference_marks()

-

Return: list of Element

-
- -Expand source code - -
def get_reference_mark_ends(self) -> list[Element]:
-    """Return all the reference mark ends. Search only the tags
-    text:reference-mark-end.
-    Consider using : get_reference_marks()
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:reference-mark-end")
-
-
-
-def get_reference_mark_single(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the reference mark that matches the criteria. Search only the -tags text:reference-mark. -Consider using : get_reference_mark()

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_reference_mark_single(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the reference mark that matches the criteria. Search only the
-    tags text:reference-mark.
-    Consider using : get_reference_mark()
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:reference-mark", position, text_name=name
-    )
-
-
-
-def get_reference_mark_start(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the reference mark start that matches the criteria. Search -only the tags text:reference-mark-start. -Consider using : get_reference_mark()

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_reference_mark_start(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the reference mark start that matches the criteria. Search
-    only the tags text:reference-mark-start.
-    Consider using : get_reference_mark()
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:reference-mark-start", position, text_name=name
-    )
-
-
-
-def get_reference_mark_starts(self) ‑> list[Element] -
-
-

Return all the reference mark starts. Search only the tags -text:reference-mark-start. -Consider using : get_reference_marks()

-

Return: list of Element

-
- -Expand source code - -
def get_reference_mark_starts(self) -> list[Element]:
-    """Return all the reference mark starts. Search only the tags
-    text:reference-mark-start.
-    Consider using : get_reference_marks()
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:reference-mark-start")
-
-
-
-def get_reference_marks(self) ‑> list[Element] -
-
-

Return all the reference marks, either single position reference -(text:reference-mark) or start of range reference -(text:reference-mark-start).

-

Return: list of Element

-
- -Expand source code - -
def get_reference_marks(self) -> list[Element]:
-    """Return all the reference marks, either single position reference
-    (text:reference-mark) or start of range reference
-    (text:reference-mark-start).
-
-    Return: list of Element
-    """
-    return self._filtered_elements(
-        "descendant::text:reference-mark-start | descendant::text:reference-mark"
-    )
-
-
-
-def get_reference_marks_single(self) ‑> list[Element] -
-
-

Return all the reference marks. Search only the tags -text:reference-mark. -Consider using : get_reference_marks()

-

Return: list of Element

-
- -Expand source code - -
def get_reference_marks_single(self) -> list[Element]:
-    """Return all the reference marks. Search only the tags
-    text:reference-mark.
-    Consider using : get_reference_marks()
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:reference-mark")
-
-
-
-def get_references(self, name: str | None = None) ‑> list[Element] -
-
-

Return all the references (text:reference-ref). If name is -provided, returns the references of that name.

-

Return: list of Element

-

Arguments

-

name – str or None

-
- -Expand source code - -
def get_references(self, name: str | None = None) -> list[Element]:
-    """Return all the references (text:reference-ref). If name is
-    provided, returns the references of that name.
-
-    Return: list of Element
-
-    Arguments:
-
-        name -- str or None
-    """
-    if name is None:
-        return self._filtered_elements("descendant::text:reference-ref")
-    request = f'descendant::text:reference-ref[@text:ref-name="{name}"]'
-    return self._filtered_elements(request)
-
-
-
-def get_section(self, position: int = 0, content: str | None = None) ‑> Element | None -
-
-

Return the section that matches the criteria.

-

Arguments

-

position – int

-

content – str regex

-

Return: Element or None if not found

-
- -Expand source code - -
def get_section(
-    self,
-    position: int = 0,
-    content: str | None = None,
-) -> Element | None:
-    """Return the section that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:section", position, content=content
-    )
-
-
-
-def get_sections(self, style: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the sections that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of Element

-
- -Expand source code - -
def get_sections(
-    self,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the sections that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of Element
-    """
-    return self._filtered_elements(
-        "text:section", text_style=style, content=content
-    )
-
-
-
-def get_span(self, position: int = 0, content: str | None = None) ‑> Element | None -
-
-

Return the span that matches the criteria.

-

Arguments

-

position – int

-

content – str regex

-

Return: Span or None if not found

-
- -Expand source code - -
def get_span(
-    self,
-    position: int = 0,
-    content: str | None = None,
-) -> Element | None:
-    """Return the span that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: Span or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:span", position, content=content
-    )
-
-
-
-def get_spans(self, style: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the spans that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of Span

-
- -Expand source code - -
def get_spans(
-    self,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the spans that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of Span
-    """
-    return self._filtered_elements(
-        "descendant::text:span", text_style=style, content=content
-    )
-
-
-
-def get_style(self, family: str, name_or_element: str | Element | None = None, display_name: str | None = None) ‑> Element | None -
-
-

Return the style uniquely identified by the family/name pair. If -the argument is already a style object, it will return it.

-

If the name is not the internal name but the name you gave in the -desktop application, use display_name instead.

-

Arguments

-

family – 'paragraph', 'text', 'graphic', 'table', 'list', -'number'

-

name_or_element – str or Style

-

display_name – str

-

Return: odf_style or None if not found

-
- -Expand source code - -
def get_style(
-    self,
-    family: str,
-    name_or_element: str | Element | None = None,
-    display_name: str | None = None,
-) -> Element | None:
-    """Return the style uniquely identified by the family/name pair. If
-    the argument is already a style object, it will return it.
-
-    If the name is not the internal name but the name you gave in the
-    desktop application, use display_name instead.
-
-    Arguments:
-
-        family -- 'paragraph', 'text', 'graphic', 'table', 'list',
-                  'number'
-
-        name_or_element -- str or Style
-
-        display_name -- str
-
-    Return: odf_style or None if not found
-    """
-    if isinstance(name_or_element, Element):
-        name = self.get_attribute("style:name")
-        if name is not None:
-            return name_or_element
-        else:
-            raise ValueError(f"Not a odf_style ? {name_or_element!r}")
-    style_name = name_or_element
-    is_default = not (style_name or display_name)
-    tagname = self._get_style_tagname(family, is_default=is_default)
-    # famattr became None if no "style:family" attribute
-    if family:
-        return self._filtered_element(
-            tagname,
-            0,
-            style_name=style_name,
-            display_name=display_name,
-            family=family,
-        )
-    else:
-        return self._filtered_element(
-            tagname,
-            0,
-            draw_name=style_name or display_name,
-            family=family,
-        )
-
-
-
-def get_styled_elements(self, name: str = '') ‑> list[Element] -
-
-

Brute-force to find paragraphs, tables, etc. using the given style -name (or all by default).

-

Arguments

-

name – str

-

Return: list

-
- -Expand source code - -
def get_styled_elements(self, name: str = "") -> list[Element]:
-    """Brute-force to find paragraphs, tables, etc. using the given style
-    name (or all by default).
-
-    Arguments:
-
-        name -- str
-
-    Return: list
-    """
-    # FIXME incomplete (and possibly inaccurate)
-    return (
-        self._filtered_elements("descendant::*", text_style=name)
-        + self._filtered_elements("descendant::*", draw_style=name)
-        + self._filtered_elements("descendant::*", draw_text_style=name)
-        + self._filtered_elements("descendant::*", table_style=name)
-        + self._filtered_elements("descendant::*", page_layout=name)
-        + self._filtered_elements("descendant::*", master_page=name)
-        + self._filtered_elements("descendant::*", parent_style=name)
-    )
-
-
-
-def get_styles(self, family: str | None = None) ‑> list[Element] -
-
-
-
- -Expand source code - -
def get_styles(self, family: str | None = None) -> list[Element]:
-    # Both common and default styles
-    tagname = self._get_style_tagname(family)
-    return self._filtered_elements(tagname, family=family)
-
-
-
-def get_table(self, position: int = 0, name: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the table that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

content – str regex

-

Return: Table or None if not found

-
- -Expand source code - -
def get_table(
-    self,
-    position: int = 0,
-    name: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the table that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-        content -- str regex
-
-    Return: Table or None if not found
-    """
-    if name is None and content is None:
-        result = self._filtered_element("descendant::table:table", position)
-    else:
-        result = self._filtered_element(
-            "descendant::table:table",
-            position,
-            table_name=name,
-            content=content,
-        )
-    return result
-
-
-
-def get_tables(self, style: str | None = None, content: str | None = None) ‑> list[Element] -
-
-

Return all the tables that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of Table

-
- -Expand source code - -
def get_tables(
-    self,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the tables that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of Table
-    """
-    return self._filtered_elements(
-        "descendant::table:table", table_style=style, content=content
-    )
-
-
-
-def get_text_change(self, position: int = 0, idx: str | None = None) ‑> Element | None -
-
-

Return the text change that matches the criteria. Either single -deletion (text:change) or start of range of changes (text:change-start). -position : index of the element to retrieve if several matches, default -is 0. -idx : change-id of the element.

-

Arguments

-

position – int

-

idx – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_text_change(
-    self,
-    position: int = 0,
-    idx: str | None = None,
-) -> Element | None:
-    """Return the text change that matches the criteria. Either single
-    deletion (text:change) or start of range of changes (text:change-start).
-    position : index of the element to retrieve if several matches, default
-    is 0.
-    idx : change-id of the element.
-
-    Arguments:
-
-        position -- int
-
-        idx -- str
-
-    Return: Element or None if not found
-    """
-    if idx:
-        request = (
-            f'descendant::text:change-start[@text:change-id="{idx}"] '
-            f'| descendant::text:change[@text:change-id="{idx}"]'
-        )
-        return self._filtered_element(request, 0)
-    request = "descendant::text:change-start | descendant::text:change"
-    return self._filtered_element(request, position)
-
-
-
-def get_text_change_deletion(self, position: int = 0, idx: str | None = None) ‑> Element | None -
-
-

Return the text change of deletion kind that matches the criteria. -Search only for the tags text:change. -Consider using : get_text_change()

-

Arguments

-

position – int

-

idx – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_text_change_deletion(
-    self,
-    position: int = 0,
-    idx: str | None = None,
-) -> Element | None:
-    """Return the text change of deletion kind that matches the criteria.
-    Search only for the tags text:change.
-    Consider using : get_text_change()
-
-    Arguments:
-
-        position -- int
-
-        idx -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:change", position, change_id=idx
-    )
-
-
-
-def get_text_change_deletions(self) ‑> list[Element] -
-
-

Return all the text changes of deletion kind: the tags text:change. -Consider using : get_text_changes()

-

Return: list of Element

-
- -Expand source code - -
def get_text_change_deletions(self) -> list[Element]:
-    """Return all the text changes of deletion kind: the tags text:change.
-    Consider using : get_text_changes()
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:text:change")
-
-
-
-def get_text_change_end(self, position: int = 0, idx: str | None = None) ‑> Element | None -
-
-

Return the text change-end that matches the criteria. Search only -the tags text:change-end. -Consider using : get_text_change()

-

Arguments

-

position – int

-

idx – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_text_change_end(
-    self,
-    position: int = 0,
-    idx: str | None = None,
-) -> Element | None:
-    """Return the text change-end that matches the criteria. Search only
-    the tags text:change-end.
-    Consider using : get_text_change()
-
-    Arguments:
-
-        position -- int
-
-        idx -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:change-end", position, change_id=idx
-    )
-
-
-
-def get_text_change_ends(self) ‑> list[Element] -
-
-

Return all the text change-end. Search only the tags -text:change-end. -Consider using : get_text_changes()

-

Return: list of Element

-
- -Expand source code - -
def get_text_change_ends(self) -> list[Element]:
-    """Return all the text change-end. Search only the tags
-    text:change-end.
-    Consider using : get_text_changes()
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:change-end")
-
-
-
-def get_text_change_start(self, position: int = 0, idx: str | None = None) ‑> Element | None -
-
-

Return the text change-start that matches the criteria. Search -only the tags text:change-start. -Consider using : get_text_change()

-

Arguments

-

position – int

-

idx – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_text_change_start(
-    self,
-    position: int = 0,
-    idx: str | None = None,
-) -> Element | None:
-    """Return the text change-start that matches the criteria. Search
-    only the tags text:change-start.
-    Consider using : get_text_change()
-
-    Arguments:
-
-        position -- int
-
-        idx -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:change-start", position, change_id=idx
-    )
-
-
-
-def get_text_change_starts(self) ‑> list[Element] -
-
-

Return all the text change-start. Search only for the tags -text:change-start. -Consider using : get_text_changes()

-

Return: list of Element

-
- -Expand source code - -
def get_text_change_starts(self) -> list[Element]:
-    """Return all the text change-start. Search only for the tags
-    text:change-start.
-    Consider using : get_text_changes()
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:change-start")
-
-
-
-def get_text_changes(self) ‑> list[Element] -
-
-

Return all the text changes, either single deletion -(text:change) or start of range of changes (text:change-start).

-

Return: list of Element

-
- -Expand source code - -
def get_text_changes(self) -> list[Element]:
-    """Return all the text changes, either single deletion
-    (text:change) or start of range of changes (text:change-start).
-
-    Return: list of Element
-    """
-    request = "descendant::text:change-start | descendant::text:change"
-    return self._filtered_elements(request)
-
-
-
-def get_toc(self, position: int = 0, content: str | None = None) ‑> Element | None -
-
-

Return the table of contents that matches the criteria.

-

Arguments

-

position – int

-

content – str regex

-

Return: odf_toc or None if not found

-
- -Expand source code - -
def get_toc(
-    self,
-    position: int = 0,
-    content: str | None = None,
-) -> Element | None:
-    """Return the table of contents that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: odf_toc or None if not found
-    """
-    return self._filtered_element(
-        "text:table-of-content", position, content=content
-    )
-
-
-
-def get_tocs(self) ‑> list[Element] -
-
-

Return all the tables of contents.

-

Return: list of odf_toc

-
- -Expand source code - -
def get_tocs(self) -> list[Element]:
-    """Return all the tables of contents.
-
-    Return: list of odf_toc
-    """
-    return self._filtered_elements("text:table-of-content")
-
-
-
-def get_tracked_changes(self) ‑> Element | None -
-
-

Return the tracked-changes part in the text body.

-
- -Expand source code - -
def get_tracked_changes(self) -> Element | None:
-    """Return the tracked-changes part in the text body."""
-    return self.get_element("//text:tracked-changes")
-
-
-
-def get_user_defined(self, name: str, position: int = 0) ‑> Element | None -
-
-

return the user defined declaration for the given name.

-

return: Element or none if not found

-
- -Expand source code - -
def get_user_defined(self, name: str, position: int = 0) -> Element | None:
-    """return the user defined declaration for the given name.
-
-    return: Element or none if not found
-    """
-    return self._filtered_element(
-        "descendant::text:user-defined", position, text_name=name
-    )
-
-
-
-def get_user_defined_list(self) ‑> list[Element] -
-
-

Return all the user defined field declarations.

-

Return: list of Element

-
- -Expand source code - -
def get_user_defined_list(self) -> list[Element]:
-    """Return all the user defined field declarations.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:user-defined")
-
-
-
-def get_user_defined_value(self, name: str, value_type: str | None = None) ‑> bool | str | int | float | decimal.Decimal | datetime.datetime | datetime.timedelta | None -
-
-

Return the value of the given user defined field name.

-

Arguments

-

name – str

-

value_type – 'boolean', 'date', 'float', -'string', 'time' or automatic

-

Return: most appropriate Python type

-
- -Expand source code - -
def get_user_defined_value(
-    self, name: str, value_type: str | None = None
-) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-    """Return the value of the given user defined field name.
-
-    Arguments:
-
-        name -- str
-
-        value_type -- 'boolean', 'date', 'float',
-                      'string', 'time' or automatic
-
-    Return: most appropriate Python type
-    """
-    user_defined = self.get_user_defined(name)
-    if user_defined is None:
-        return None
-    return user_defined.get_value(value_type)  # type: ignore
-
-
-
-def get_user_field_decl(self, name: str, position: int = 0) ‑> Element | None -
-
-

return the user field declaration for the given name.

-

return: Element or none if not found

-
- -Expand source code - -
def get_user_field_decl(self, name: str, position: int = 0) -> Element | None:
-    """return the user field declaration for the given name.
-
-    return: Element or none if not found
-    """
-    return self._filtered_element(
-        "descendant::text:user-field-decl", position, text_name=name
-    )
-
-
-
-def get_user_field_decl_list(self) ‑> list[Element] -
-
-

Return all the user field declarations.

-

Return: list of Element

-
- -Expand source code - -
def get_user_field_decl_list(self) -> list[Element]:
-    """Return all the user field declarations.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:user-field-decl")
-
-
-
-def get_user_field_decls(self) ‑> Element | None -
-
-

Return the container for user field declarations. Created if not -found.

-

Return: Element

-
- -Expand source code - -
def get_user_field_decls(self) -> Element | None:
-    """Return the container for user field declarations. Created if not
-    found.
-
-    Return: Element
-    """
-    user_field_decls = self.get_element("//text:user-field-decls")
-    if user_field_decls is None:
-        body = self.document_body
-        if not body:
-            raise ValueError("Empty document.body")
-        body.insert(Element.from_tag("text:user-field-decls"), FIRST_CHILD)
-        user_field_decls = body.get_element("//text:user-field-decls")
-
-    return user_field_decls
-
-
-
-def get_user_field_value(self, name: str, value_type: str | None = None) ‑> bool | str | int | float | decimal.Decimal | datetime.datetime | datetime.timedelta | None -
-
-

Return the value of the given user field name.

-

Arguments

-

name – str

-

value_type – 'boolean', 'currency', 'date', 'float', -'percentage', 'string', 'time' or automatic

-

Return: most appropriate Python type

-
- -Expand source code - -
def get_user_field_value(
-    self, name: str, value_type: str | None = None
-) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-    """Return the value of the given user field name.
-
-    Arguments:
-
-        name -- str
-
-        value_type -- 'boolean', 'currency', 'date', 'float',
-                      'percentage', 'string', 'time' or automatic
-
-    Return: most appropriate Python type
-    """
-    user_field_decl = self.get_user_field_decl(name)
-    if user_field_decl is None:
-        return None
-    return user_field_decl.get_value(value_type)  # type: ignore
-
-
-
-def get_variable_decl(self, name: str, position: int = 0) ‑> Element | None -
-
-

return the variable declaration for the given name.

-

Arguments

-

name – str

-

position – int

-

return: Element or none if not found

-
- -Expand source code - -
def get_variable_decl(self, name: str, position: int = 0) -> Element | None:
-    """return the variable declaration for the given name.
-
-    Arguments:
-
-        name -- str
-
-        position -- int
-
-    return: Element or none if not found
-    """
-    return self._filtered_element(
-        "descendant::text:variable-decl", position, text_name=name
-    )
-
-
-
-def get_variable_decl_list(self) ‑> list[Element] -
-
-

Return all the variable declarations.

-

Return: list of Element

-
- -Expand source code - -
def get_variable_decl_list(self) -> list[Element]:
-    """Return all the variable declarations.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:variable-decl")
-
-
-
-def get_variable_decls(self) ‑> Element -
-
-

Return the container for variable declarations. Created if not -found.

-

Return: Element

-
- -Expand source code - -
def get_variable_decls(self) -> Element:
-    """Return the container for variable declarations. Created if not
-    found.
-
-    Return: Element
-    """
-    variable_decls = self.get_element("//text:variable-decls")
-    if variable_decls is None:
-        body = self.document_body
-        if not body:
-            raise ValueError("Empty document.body")
-        body.insert(Element.from_tag("text:variable-decls"), FIRST_CHILD)
-        variable_decls = body.get_element("//text:variable-decls")
-
-    return variable_decls  # type:ignore
-
-
-
-def get_variable_set(self, name: str, position: int = -1) ‑> Element | None -
-
-

Return the variable set for the given name (last one by default).

-

Arguments

-

name – str

-

position – int

-

Return: Element or None if not found

-
- -Expand source code - -
def get_variable_set(self, name: str, position: int = -1) -> Element | None:
-    """Return the variable set for the given name (last one by default).
-
-    Arguments:
-
-        name -- str
-
-        position -- int
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:variable-set", position, text_name=name
-    )
-
-
-
-def get_variable_set_value(self, name: str, value_type: str | None = None) ‑> bool | str | int | float | decimal.Decimal | datetime.datetime | datetime.timedelta | None -
-
-

Return the last value of the given variable name.

-

Arguments

-

name – str

-

value_type – 'boolean', 'currency', 'date', 'float', -'percentage', 'string', 'time' or automatic

-

Return: most appropriate Python type

-
- -Expand source code - -
def get_variable_set_value(
-    self,
-    name: str,
-    value_type: str | None = None,
-) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-    """Return the last value of the given variable name.
-
-    Arguments:
-
-        name -- str
-
-        value_type -- 'boolean', 'currency', 'date', 'float',
-                      'percentage', 'string', 'time' or automatic
-
-    Return: most appropriate Python type
-    """
-    variable_set = self.get_variable_set(name)
-    if not variable_set:
-        return None
-    return variable_set.get_value(value_type)  # type: ignore
-
-
-
-def get_variable_sets(self, name: str | None = None) ‑> list[Element] -
-
-

Return all the variable sets that match the criteria.

-

Arguments

-

name – str

-

Return: list of Element

-
- -Expand source code - -
def get_variable_sets(self, name: str | None = None) -> list[Element]:
-    """Return all the variable sets that match the criteria.
-
-    Arguments:
-
-        name -- str
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:variable-set", text_name=name)
-
-
-
-def index(self, child: Element) ‑> int -
-
-

Return the position of the child in this element.

-

Inspired by lxml

-
- -Expand source code - -
def index(self, child: Element) -> int:
-    """Return the position of the child in this element.
-
-    Inspired by lxml
-    """
-    return self.__element.index(child.__element)
-
-
-
-def insert(self, element: Element, xmlposition: int | None = None, position: int | None = None, start: bool = False) ‑> None -
-
-

Insert an element relatively to ourself.

-

Insert either using DOM vocabulary or by numeric position. -If text start is True, insert the element before any existing text.

-

Position start at 0.

-

Arguments

-

element – Element

-

xmlposition – FIRST_CHILD, LAST_CHILD, NEXT_SIBLING -or PREV_SIBLING

-

start – Boolean

-

position – int

-
- -Expand source code - -
def insert(
-    self,
-    element: Element,
-    xmlposition: int | None = None,
-    position: int | None = None,
-    start: bool = False,
-) -> None:
-    """Insert an element relatively to ourself.
-
-    Insert either using DOM vocabulary or by numeric position.
-    If text start is True, insert the element before any existing text.
-
-    Position start at 0.
-
-    Arguments:
-
-        element -- Element
-
-        xmlposition -- FIRST_CHILD, LAST_CHILD, NEXT_SIBLING
-                       or PREV_SIBLING
-
-        start -- Boolean
-
-        position -- int
-    """
-    # child_tag = element.tag
-    current = self.__element
-    _element = element.__element
-    if start:
-        text = current.text
-        if text is not None:
-            current.text = None
-            tail = _element.tail
-            if tail is None:
-                tail = text
-            else:
-                tail = tail + text
-            _element.tail = tail
-        position = 0
-    if position is not None:
-        current.insert(position, _element)
-    elif xmlposition is FIRST_CHILD:
-        current.insert(0, _element)
-    elif xmlposition is LAST_CHILD:
-        current.append(_element)
-    elif xmlposition is NEXT_SIBLING:
-        parent = current.getparent()
-        index = parent.index(current)  # type: ignore
-        parent.insert(index + 1, _element)  # type: ignore
-    elif xmlposition is PREV_SIBLING:
-        parent = current.getparent()
-        index = parent.index(current)  # type: ignore
-        parent.insert(index, _element)  # type: ignore
-    else:
-        raise ValueError("(xml)position must be defined")
-
-
-
-def is_empty(self) ‑> bool -
-
-

Check if the element is empty : no text, no children, no tail.

-

Return: Boolean

-
- -Expand source code - -
def is_empty(self) -> bool:
-    """Check if the element is empty : no text, no children, no tail.
-
-    Return: Boolean
-    """
-    element = self.__element
-    if element.tail is not None:
-        return False
-    if element.text is not None:
-        return False
-    if list(element.iterchildren()):
-        return False
-    return True
-
-
-
-def match(self, pattern: str) ‑> bool -
-
-

return True if the pattern is found one or more times anywhere in -the text content of the element.

-

Python regular expression syntax applies.

-

Arguments

-

pattern – str

-

Return: bool

-
- -Expand source code - -
def match(self, pattern: str) -> bool:
-    """return True if the pattern is found one or more times anywhere in
-    the text content of the element.
-
-    Python regular expression syntax applies.
-
-    Arguments:
-
-        pattern -- str
-
-    Return: bool
-    """
-    return self.search(pattern) is not None
-
-
-
-def replace(self, pattern: str, new: str | None = None) ‑> int -
-
-

Replace the pattern with the given text, or delete if text is an -empty string, and return the number of replacements. By default, only -return the number of occurences that would be replaced.

-

It cannot replace patterns found across several element, like a word -split into two consecutive spans.

-

Python regular expression syntax applies.

-

Arguments

-

pattern – str

-

new – str

-

Return: int

-
- -Expand source code - -
def replace(self, pattern: str, new: str | None = None) -> int:
-    """Replace the pattern with the given text, or delete if text is an
-    empty string, and return the number of replacements. By default, only
-    return the number of occurences that would be replaced.
-
-    It cannot replace patterns found across several element, like a word
-    split into two consecutive spans.
-
-    Python regular expression syntax applies.
-
-    Arguments:
-
-        pattern -- str
-
-        new -- str
-
-    Return: int
-    """
-    if not isinstance(pattern, str):
-        # Fail properly if the pattern is an non-ascii bytestring
-        pattern = str(pattern)
-    cpattern = re.compile(pattern)
-    count = 0
-    for text in self.xpath("descendant::text()"):
-        if new is None:
-            count += len(cpattern.findall(str(text)))
-        else:
-            new_text, number = cpattern.subn(new, str(text))
-            container = text.parent
-            if text.is_text():  # type: ignore
-                container.text = new_text  # type: ignore
-            else:
-                container.tail = new_text  # type: ignore
-            count += number
-    return count
-
-
-
-def replace_element(self, old_element: Element, new_element: Element) ‑> None -
-
-

Replaces in place a sub element with the element passed as second -argument.

-

Warning : no clone for old element.

-
- -Expand source code - -
def replace_element(self, old_element: Element, new_element: Element) -> None:
-    """Replaces in place a sub element with the element passed as second
-    argument.
-
-    Warning : no clone for old element.
-    """
-    current = self.__element
-    current.replace(old_element.__element, new_element.__element)
-
-
-
-def search(self, pattern: str) ‑> int | None -
-
-

Return the first position of the pattern in the text content of -the element, or None if not found.

-

Python regular expression syntax applies.

-

Arguments

-

pattern – str

-

Return: int or None

-
- -Expand source code - -
def search(self, pattern: str) -> int | None:
-    """Return the first position of the pattern in the text content of
-    the element, or None if not found.
-
-    Python regular expression syntax applies.
-
-    Arguments:
-
-        pattern -- str
-
-    Return: int or None
-    """
-    match = re.search(pattern, self.text_recursive)
-    if match is None:
-        return None
-    return match.start()
-
-
-
-def serialize(self, pretty: bool = False, with_ns: bool = False) ‑> str -
-
-

Return text serialization of XML element.

-
- -Expand source code - -
def serialize(self, pretty: bool = False, with_ns: bool = False) -> str:
-    """Return text serialization of XML element."""
-    # This copy bypasses serialization side-effects in lxml
-    native = deepcopy(self.__element)
-    data = tostring(
-        native, with_tail=False, pretty_print=pretty, encoding="unicode"
-    )
-    if with_ns:
-        return data
-    # Remove namespaces
-    return self._strip_namespaces(data)
-
-
-
-def set_attribute(self, name: str, value: bool | str | None) ‑> None -
-
-
-
- -Expand source code - -
def set_attribute(self, name: str, value: bool | str | None) -> None:
-    element = self.__element
-    lxml_tag = _get_lxml_tag_or_name(name)
-    if isinstance(value, bool):
-        value = Boolean.encode(value)
-    elif value is None:
-        with contextlib.suppress(KeyError):
-            del element.attrib[lxml_tag]
-        return
-    element.set(lxml_tag, str(value))
-
-
-
-def set_style_attribute(self, name: str, value: Element | str) ‑> None -
-
-

Shortcut to accept a style object as a value.

-
- -Expand source code - -
def set_style_attribute(self, name: str, value: Element | str) -> None:
-    """Shortcut to accept a style object as a value."""
-    if isinstance(value, Element):
-        value = str(value.name)  # type:ignore
-    return self.set_attribute(name, value)
-
-
-
-def strip_elements(self, sub_elements: Element | Iterable[Element]) ‑> Element | list -
-
-

Remove the tags of provided elements, keeping inner childs and text.

-

Return : the striped element.

-

Warning : no clone in sub_elements list.

-

Arguments

-

sub_elements – Element or list of Element

-
- -Expand source code - -
def strip_elements(
-    self,
-    sub_elements: Element | Iterable[Element],
-) -> Element | list:
-    """Remove the tags of provided elements, keeping inner childs and text.
-
-    Return : the striped element.
-
-    Warning : no clone in sub_elements list.
-
-    Arguments:
-
-        sub_elements -- Element or list of Element
-    """
-    if not sub_elements:
-        return self
-    if isinstance(sub_elements, Element):
-        sub_elements = (sub_elements,)
-    replacer = _get_lxml_tag("text:this-will-be-removed")
-    for element in sub_elements:
-        element.__element.tag = replacer
-    strip = ("text:this-will-be-removed",)
-    return self.strip_tags(strip=strip, default=None)
-
-
-
-def strip_tags(self, strip: Iterable[str] | None = None, protect: Iterable[str] | None = None, default: str | None = 'text:p') ‑> Element | list -
-
-

Remove the tags listed in strip, recursively, keeping inner childs -and text. Tags listed in protect stop the removal one level depth. If -the first level element is stripped, default is used to embed the -content in the default element. If default is None and first level is -striped, a list of text and children is returned. Return : the striped -element.

-

strip_tags should be used by on purpose methods (strip_span …) -(Method name taken from lxml).

-

Arguments

-

strip – iterable list of str odf tags, or None

-

protect – iterable list of str odf tags, or None

-

default – str odf tag, or None

-

Return

-

Element.

-
- -Expand source code - -
def strip_tags(
-    self,
-    strip: Iterable[str] | None = None,
-    protect: Iterable[str] | None = None,
-    default: str | None = "text:p",
-) -> Element | list:
-    """Remove the tags listed in strip, recursively, keeping inner childs
-    and text. Tags listed in protect stop the removal one level depth. If
-    the first level element is stripped, default is used to embed the
-    content in the default element. If default is None and first level is
-    striped, a list of text and children is returned. Return : the striped
-    element.
-
-    strip_tags should be used by on purpose methods (strip_span ...)
-    (Method name taken from lxml).
-
-    Arguments:
-
-        strip -- iterable list of str odf tags, or None
-
-        protect -- iterable list of str odf tags, or None
-
-        default -- str odf tag, or None
-
-    Return:
-
-        Element.
-    """
-    if not strip:
-        return self
-    if not protect:
-        protect = ()
-    protected = False
-    element, modified = Element._strip_tags(self, strip, protect, protected)
-    if modified and isinstance(element, list) and default:
-        new = Element.from_tag(default)
-        for content in element:
-            if isinstance(content, Element):
-                new.append(content)
-            else:
-                new.text = content
-        element = new
-    return element
-
-
-
-def xpath(self, xpath_query: str) ‑> list[Element | Text] -
-
-

Apply XPath query to the element and its subtree. Return list of -Element or Text instances translated from the nodes found.

-
- -Expand source code - -
def xpath(self, xpath_query: str) -> list[Element | Text]:
-    """Apply XPath query to the element and its subtree. Return list of
-    Element or Text instances translated from the nodes found.
-    """
-    element = self.__element
-    xpath_instance = xpath_compile(xpath_query)
-    elements = xpath_instance(element)
-    result: list[Element | Text] = []
-    if hasattr(elements, "__iter__"):
-        for obj in elements:  # type: ignore
-            if isinstance(obj, (_ElementStringResult, _ElementUnicodeResult)):
-                result.append(Text(obj))
-            elif isinstance(obj, _Element):
-                result.append(Element.from_tag(obj))
-            # else:
-            #     result.append(obj)
-    return result
-
-
-
-
-
-class PropDef -(name: ForwardRef('str'), attr: ForwardRef('str'), family: ForwardRef('str') = '') -
-
-

PropDef(name, attr, family)

-
- -Expand source code - -
class PropDef(NamedTuple):
-    name: str
-    attr: str
-    family: str = ""
-
-

Ancestors

-
    -
  • builtins.tuple
  • -
-

Instance variables

-
-
var attr : str
-
-

Alias for field number 1

-
-
var family : str
-
-

Alias for field number 2

-
-
var name : str
-
-

Alias for field number 0

-
-
-
-
-class Text -(text_result: _ElementUnicodeResult | _ElementStringResult) -
-
-

Representation of an XML text node. Created to hide the specifics of -lxml in searching text nodes using XPath.

-

Constructed like any str object but only accepts lxml text objects.

-
- -Expand source code - -
class Text(str):
-    """Representation of an XML text node. Created to hide the specifics of
-    lxml in searching text nodes using XPath.
-
-    Constructed like any str object but only accepts lxml text objects.
-    """
-
-    # There's some black magic in inheriting from str
-    def __init__(
-        self,
-        text_result: _ElementUnicodeResult | _ElementStringResult,
-    ) -> None:
-        self.__parent = text_result.getparent()
-        self.__is_text = text_result.is_text
-        self.__is_tail = text_result.is_tail
-
-    @property
-    def parent(self) -> Element | None:
-        parent = self.__parent
-        # XXX happens just because of the unit test
-        if parent is None:
-            return None
-        return Element.from_tag(tag_or_elem=parent)
-
-    def is_text(self) -> bool:
-        return self.__is_text
-
-    def is_tail(self) -> bool:
-        return self.__is_tail
-
-

Ancestors

-
    -
  • builtins.str
  • -
-

Instance variables

-
-
var parentElement | None
-
-
-
- -Expand source code - -
@property
-def parent(self) -> Element | None:
-    parent = self.__parent
-    # XXX happens just because of the unit test
-    if parent is None:
-        return None
-    return Element.from_tag(tag_or_elem=parent)
-
-
-
-

Methods

-
-
-def is_tail(self) ‑> bool -
-
-
-
- -Expand source code - -
def is_tail(self) -> bool:
-    return self.__is_tail
-
-
-
-def is_text(self) ‑> bool -
-
-
-
- -Expand source code - -
def is_text(self) -> bool:
-    return self.__is_text
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/element_typed.html b/doc/element_typed.html deleted file mode 100644 index 7c71e63..0000000 --- a/doc/element_typed.html +++ /dev/null @@ -1,735 +0,0 @@ - - - - - - -odfdo.element_typed API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.element_typed

-
-
-

ElmentTyped subclass of Element.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-"""ElmentTyped subclass of Element.
-"""
-from __future__ import annotations
-
-import contextlib
-from datetime import date, datetime, timedelta
-from decimal import Decimal
-from typing import Any
-
-from .datatype import Boolean, Date, DateTime, Duration
-from .element import Element
-from .utils import bytes_to_str
-
-
-class ElementTyped(Element):
-    def set_value_and_type(  # noqa: C901
-        self,
-        value: Any,
-        value_type: str | None = None,
-        text: str | None = None,
-        currency: str | None = None,
-    ) -> str | None:
-        # Remove possible previous value and type
-        for name in (
-            "office:value-type",
-            "office:boolean-value",
-            "office:value",
-            "office:date-value",
-            "office:string-value",
-            "office:time-value",
-            "table:formula",
-            "office:currency",
-            "calcext:value-type",
-            "loext:value-type",
-        ):
-            with contextlib.suppress(KeyError):
-                self.del_attribute(name)
-        if isinstance(value, bytes):
-            value = bytes_to_str(value)
-        if isinstance(value_type, bytes):
-            value_type = bytes_to_str(value_type)
-        if isinstance(text, bytes):
-            text = bytes_to_str(text)
-        if isinstance(currency, bytes):
-            currency = bytes_to_str(currency)
-        if value is None:
-            self._erase_text_content()
-            return text
-        if isinstance(value, bool):
-            if value_type is None:
-                value_type = "boolean"
-            if text is None:
-                text = "true" if value else "false"
-            value = Boolean.encode(value)
-        elif isinstance(value, (int, float, Decimal)):
-            if value_type == "percentage":
-                text = "%d %%" % int(value * 100)
-            if value_type is None:
-                value_type = "float"
-            if text is None:
-                text = str(value)
-            value = str(value)
-        elif isinstance(value, datetime):
-            if value_type is None:
-                value_type = "date"
-            if text is None:
-                text = str(DateTime.encode(value))
-            value = DateTime.encode(value)
-        elif isinstance(value, date):
-            if value_type is None:
-                value_type = "date"
-            if text is None:
-                text = str(Date.encode(value))
-            value = Date.encode(value)
-        elif isinstance(value, str):
-            if value_type is None:
-                value_type = "string"
-            if text is None:
-                text = value
-        elif isinstance(value, timedelta):
-            if value_type is None:
-                value_type = "time"
-            if text is None:
-                text = str(Duration.encode(value))
-            value = Duration.encode(value)
-        elif value is not None:
-            raise TypeError(f"Type unknown: '{value!r}'")
-
-        if value_type is not None:
-            self.set_attribute("office:value-type", value_type)
-            self.set_attribute("calcext:value-type", value_type)
-        if value_type == "boolean":
-            self.set_attribute("office:boolean-value", value)
-        elif value_type == "currency":
-            self.set_attribute("office:value", value)
-            self.set_attribute("office:currency", currency)
-        elif value_type == "date":
-            self.set_attribute("office:date-value", value)
-        elif value_type in ("float", "percentage"):
-            self.set_attribute("office:value", value)
-            self.set_attribute("calcext:value", value)
-        elif value_type == "string":
-            self.set_attribute("office:string-value", value)
-        elif value_type == "time":
-            self.set_attribute("office:time-value", value)
-
-        return text
-
-    def _get_typed_value(  # noqa: C901
-        self,
-        value_type: str | None = None,
-        try_get_text: bool = True,
-    ) -> tuple[Any, str | None]:
-        """Return Python typed value.
-
-        Only for "with office:value-type" elements, not for meta fields."""
-        value: Decimal | str | bool | None = None
-        if value_type is None:
-            read_value_type = self.get_attribute("office:value-type")
-            if isinstance(read_value_type, bool):
-                raise TypeError(
-                    f'Wrong type for "office:value-type": {type(read_value_type)}'
-                )
-            value_type = read_value_type
-        # value_type = to_str(value_type)
-        if value_type == "boolean":
-            value = self.get_attribute("office:boolean-value")
-            return (value, value_type)
-        if value_type in {"float", "percentage", "currency"}:
-            read_number = self.get_attribute("office:value")
-            if not isinstance(read_number, (Decimal, str)):
-                raise TypeError(f'Wrong type for "office:value": {type(read_number)}')
-            value = Decimal(read_number)
-            # Return 3 instead of 3.0 if possible
-            if int(value) == value:
-                return (int(value), value_type)
-            return (value, value_type)
-        if value_type == "date":
-            read_attribute = self.get_attribute("office:date-value")
-            if not isinstance(read_attribute, str):
-                raise TypeError(
-                    f'Wrong type for "office:date-value": {type(read_attribute)}'
-                )
-            if "T" in read_attribute:
-                return (DateTime.decode(read_attribute), value_type)
-            return (Date.decode(read_attribute), value_type)
-        if value_type == "string":
-            value = self.get_attribute("office:string-value")
-            if value is not None:
-                return (str(value), value_type)
-            if try_get_text:
-                list_value = [
-                    para.text_recursive for para in self.get_elements("text:p")
-                ]
-                if list_value:
-                    return ("\n".join(list_value), value_type)
-            return (None, value_type)
-        if value_type == "time":
-            read_value = self.get_attribute("office:time-value")
-            if not isinstance(read_value, str):
-                raise TypeError(
-                    f'Wrong type for "office:time-value": {type(read_value)}'
-                )
-            time_value = Duration.decode(read_value)
-            return (time_value, value_type)
-        if value_type is None:
-            return (None, None)
-        raise ValueError(f'Unexpected value type: "{value_type}"')
-
-    def get_value(
-        self,
-        value_type: str | None = None,
-        try_get_text: bool = True,
-        get_type: bool = False,
-    ) -> Any | tuple[Any, str]:
-        """Return Python typed value.
-
-        Only for "with office:value-type" elements, not for meta fields."""
-        if get_type:
-            return self._get_typed_value(
-                value_type=value_type,
-                try_get_text=try_get_text,
-            )
-        return self._get_typed_value(
-            value_type=value_type,
-            try_get_text=try_get_text,
-        )[0]
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class ElementTyped -(**kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class ElementTyped(Element):
-    def set_value_and_type(  # noqa: C901
-        self,
-        value: Any,
-        value_type: str | None = None,
-        text: str | None = None,
-        currency: str | None = None,
-    ) -> str | None:
-        # Remove possible previous value and type
-        for name in (
-            "office:value-type",
-            "office:boolean-value",
-            "office:value",
-            "office:date-value",
-            "office:string-value",
-            "office:time-value",
-            "table:formula",
-            "office:currency",
-            "calcext:value-type",
-            "loext:value-type",
-        ):
-            with contextlib.suppress(KeyError):
-                self.del_attribute(name)
-        if isinstance(value, bytes):
-            value = bytes_to_str(value)
-        if isinstance(value_type, bytes):
-            value_type = bytes_to_str(value_type)
-        if isinstance(text, bytes):
-            text = bytes_to_str(text)
-        if isinstance(currency, bytes):
-            currency = bytes_to_str(currency)
-        if value is None:
-            self._erase_text_content()
-            return text
-        if isinstance(value, bool):
-            if value_type is None:
-                value_type = "boolean"
-            if text is None:
-                text = "true" if value else "false"
-            value = Boolean.encode(value)
-        elif isinstance(value, (int, float, Decimal)):
-            if value_type == "percentage":
-                text = "%d %%" % int(value * 100)
-            if value_type is None:
-                value_type = "float"
-            if text is None:
-                text = str(value)
-            value = str(value)
-        elif isinstance(value, datetime):
-            if value_type is None:
-                value_type = "date"
-            if text is None:
-                text = str(DateTime.encode(value))
-            value = DateTime.encode(value)
-        elif isinstance(value, date):
-            if value_type is None:
-                value_type = "date"
-            if text is None:
-                text = str(Date.encode(value))
-            value = Date.encode(value)
-        elif isinstance(value, str):
-            if value_type is None:
-                value_type = "string"
-            if text is None:
-                text = value
-        elif isinstance(value, timedelta):
-            if value_type is None:
-                value_type = "time"
-            if text is None:
-                text = str(Duration.encode(value))
-            value = Duration.encode(value)
-        elif value is not None:
-            raise TypeError(f"Type unknown: '{value!r}'")
-
-        if value_type is not None:
-            self.set_attribute("office:value-type", value_type)
-            self.set_attribute("calcext:value-type", value_type)
-        if value_type == "boolean":
-            self.set_attribute("office:boolean-value", value)
-        elif value_type == "currency":
-            self.set_attribute("office:value", value)
-            self.set_attribute("office:currency", currency)
-        elif value_type == "date":
-            self.set_attribute("office:date-value", value)
-        elif value_type in ("float", "percentage"):
-            self.set_attribute("office:value", value)
-            self.set_attribute("calcext:value", value)
-        elif value_type == "string":
-            self.set_attribute("office:string-value", value)
-        elif value_type == "time":
-            self.set_attribute("office:time-value", value)
-
-        return text
-
-    def _get_typed_value(  # noqa: C901
-        self,
-        value_type: str | None = None,
-        try_get_text: bool = True,
-    ) -> tuple[Any, str | None]:
-        """Return Python typed value.
-
-        Only for "with office:value-type" elements, not for meta fields."""
-        value: Decimal | str | bool | None = None
-        if value_type is None:
-            read_value_type = self.get_attribute("office:value-type")
-            if isinstance(read_value_type, bool):
-                raise TypeError(
-                    f'Wrong type for "office:value-type": {type(read_value_type)}'
-                )
-            value_type = read_value_type
-        # value_type = to_str(value_type)
-        if value_type == "boolean":
-            value = self.get_attribute("office:boolean-value")
-            return (value, value_type)
-        if value_type in {"float", "percentage", "currency"}:
-            read_number = self.get_attribute("office:value")
-            if not isinstance(read_number, (Decimal, str)):
-                raise TypeError(f'Wrong type for "office:value": {type(read_number)}')
-            value = Decimal(read_number)
-            # Return 3 instead of 3.0 if possible
-            if int(value) == value:
-                return (int(value), value_type)
-            return (value, value_type)
-        if value_type == "date":
-            read_attribute = self.get_attribute("office:date-value")
-            if not isinstance(read_attribute, str):
-                raise TypeError(
-                    f'Wrong type for "office:date-value": {type(read_attribute)}'
-                )
-            if "T" in read_attribute:
-                return (DateTime.decode(read_attribute), value_type)
-            return (Date.decode(read_attribute), value_type)
-        if value_type == "string":
-            value = self.get_attribute("office:string-value")
-            if value is not None:
-                return (str(value), value_type)
-            if try_get_text:
-                list_value = [
-                    para.text_recursive for para in self.get_elements("text:p")
-                ]
-                if list_value:
-                    return ("\n".join(list_value), value_type)
-            return (None, value_type)
-        if value_type == "time":
-            read_value = self.get_attribute("office:time-value")
-            if not isinstance(read_value, str):
-                raise TypeError(
-                    f'Wrong type for "office:time-value": {type(read_value)}'
-                )
-            time_value = Duration.decode(read_value)
-            return (time_value, value_type)
-        if value_type is None:
-            return (None, None)
-        raise ValueError(f'Unexpected value type: "{value_type}"')
-
-    def get_value(
-        self,
-        value_type: str | None = None,
-        try_get_text: bool = True,
-        get_type: bool = False,
-    ) -> Any | tuple[Any, str]:
-        """Return Python typed value.
-
-        Only for "with office:value-type" elements, not for meta fields."""
-        if get_type:
-            return self._get_typed_value(
-                value_type=value_type,
-                try_get_text=try_get_text,
-            )
-        return self._get_typed_value(
-            value_type=value_type,
-            try_get_text=try_get_text,
-        )[0]
-
-

Ancestors

- -

Subclasses

- -

Methods

-
-
-def get_value(self, value_type: str | None = None, try_get_text: bool = True, get_type: bool = False) ‑> typing.Any | tuple[typing.Any, str] -
-
-

Return Python typed value.

-

Only for "with office:value-type" elements, not for meta fields.

-
- -Expand source code - -
def get_value(
-    self,
-    value_type: str | None = None,
-    try_get_text: bool = True,
-    get_type: bool = False,
-) -> Any | tuple[Any, str]:
-    """Return Python typed value.
-
-    Only for "with office:value-type" elements, not for meta fields."""
-    if get_type:
-        return self._get_typed_value(
-            value_type=value_type,
-            try_get_text=try_get_text,
-        )
-    return self._get_typed_value(
-        value_type=value_type,
-        try_get_text=try_get_text,
-    )[0]
-
-
-
-def set_value_and_type(self, value: Any, value_type: str | None = None, text: str | None = None, currency: str | None = None) ‑> str | None -
-
-
-
- -Expand source code - -
def set_value_and_type(  # noqa: C901
-    self,
-    value: Any,
-    value_type: str | None = None,
-    text: str | None = None,
-    currency: str | None = None,
-) -> str | None:
-    # Remove possible previous value and type
-    for name in (
-        "office:value-type",
-        "office:boolean-value",
-        "office:value",
-        "office:date-value",
-        "office:string-value",
-        "office:time-value",
-        "table:formula",
-        "office:currency",
-        "calcext:value-type",
-        "loext:value-type",
-    ):
-        with contextlib.suppress(KeyError):
-            self.del_attribute(name)
-    if isinstance(value, bytes):
-        value = bytes_to_str(value)
-    if isinstance(value_type, bytes):
-        value_type = bytes_to_str(value_type)
-    if isinstance(text, bytes):
-        text = bytes_to_str(text)
-    if isinstance(currency, bytes):
-        currency = bytes_to_str(currency)
-    if value is None:
-        self._erase_text_content()
-        return text
-    if isinstance(value, bool):
-        if value_type is None:
-            value_type = "boolean"
-        if text is None:
-            text = "true" if value else "false"
-        value = Boolean.encode(value)
-    elif isinstance(value, (int, float, Decimal)):
-        if value_type == "percentage":
-            text = "%d %%" % int(value * 100)
-        if value_type is None:
-            value_type = "float"
-        if text is None:
-            text = str(value)
-        value = str(value)
-    elif isinstance(value, datetime):
-        if value_type is None:
-            value_type = "date"
-        if text is None:
-            text = str(DateTime.encode(value))
-        value = DateTime.encode(value)
-    elif isinstance(value, date):
-        if value_type is None:
-            value_type = "date"
-        if text is None:
-            text = str(Date.encode(value))
-        value = Date.encode(value)
-    elif isinstance(value, str):
-        if value_type is None:
-            value_type = "string"
-        if text is None:
-            text = value
-    elif isinstance(value, timedelta):
-        if value_type is None:
-            value_type = "time"
-        if text is None:
-            text = str(Duration.encode(value))
-        value = Duration.encode(value)
-    elif value is not None:
-        raise TypeError(f"Type unknown: '{value!r}'")
-
-    if value_type is not None:
-        self.set_attribute("office:value-type", value_type)
-        self.set_attribute("calcext:value-type", value_type)
-    if value_type == "boolean":
-        self.set_attribute("office:boolean-value", value)
-    elif value_type == "currency":
-        self.set_attribute("office:value", value)
-        self.set_attribute("office:currency", currency)
-    elif value_type == "date":
-        self.set_attribute("office:date-value", value)
-    elif value_type in ("float", "percentage"):
-        self.set_attribute("office:value", value)
-        self.set_attribute("calcext:value", value)
-    elif value_type == "string":
-        self.set_attribute("office:string-value", value)
-    elif value_type == "time":
-        self.set_attribute("office:time-value", value)
-
-    return text
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/frame.html b/doc/frame.html deleted file mode 100644 index d936588..0000000 --- a/doc/frame.html +++ /dev/null @@ -1,1853 +0,0 @@ - - - - - - -odfdo.frame API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.frame

-
-
-

Frame class for "draw:frame".

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-"""Frame class for "draw:frame".
-"""
-from __future__ import annotations
-
-from collections.abc import Iterable
-from decimal import Decimal
-from typing import Any
-
-from .datatype import Unit
-from .element import Element, PropDef, register_element_class
-from .image import DrawImage
-from .paragraph import Paragraph
-from .style import Style
-
-# This DPI is computed to have:
-# 640 px (width of your wiki) <==> 17 cm (width of a normal ODT page)
-DPI: Decimal = 640 * Decimal("2.54") / 17
-
-
-def default_frame_position_style(
-    name: str = "FramePosition",
-    horizontal_pos: str = "from-left",
-    vertical_pos: str = "from-top",
-    horizontal_rel: str = "paragraph",
-    vertical_rel: str = "paragraph",
-) -> Style:
-    """Helper style for positioning frames in desktop applications that need
-    it.
-
-    Default arguments should be enough.
-
-    Use the returned Style as the frame style or build a new graphic style
-    with this style as the parent.
-    """
-    return Style(
-        family="graphic",
-        name=name,
-        horizontal_pos=horizontal_pos,
-        horizontal_rel=horizontal_rel,
-        vertical_pos=vertical_pos,
-        vertical_rel=vertical_rel,
-    )
-
-
-class AnchorMix:
-    """Anchor parameter, how the element is attached to its environment.
-
-    value can be: 'page', 'frame', 'paragraph', 'char' or 'as-char'
-    """
-
-    ANCHOR_VALUE_CHOICE = {  # noqa: RUF012
-        "page",
-        "frame",
-        "paragraph",
-        "char",
-        "as-char",
-    }
-
-    @property
-    def anchor_type(self) -> str | None:
-        "Anchor_type getter/setter."
-        return self.get_attribute_string("text:anchor-type")  # type: ignore
-
-    @anchor_type.setter
-    def anchor_type(self, anchor_type: str) -> None:
-        if anchor_type not in self.ANCHOR_VALUE_CHOICE:
-            raise TypeError(f"anchor_type not valid: '{anchor_type!r}'")
-        self.set_attribute("text:anchor-type", anchor_type)  # type: ignore
-
-    @property
-    def anchor_page(self) -> int | None:
-        """getter/setter for the number of the page when the anchor type is
-        'page'.
-
-        type : int or None
-        """
-        anchor_page = self.get_attribute("text:anchor-page-number")  # type: ignore
-        if anchor_page is None:
-            return None
-        return int(anchor_page)
-
-    @anchor_page.setter
-    def anchor_page(self, anchor_page: int | None) -> None:
-        self.set_attribute("text:anchor-page-number", anchor_page)  # type: ignore
-
-
-class PosMix:
-    """Position relative to anchor point.
-
-    Setting the position may require a specific style for actual display on
-    some graphical rendering softwares.
-
-    Position is a (left, top) tuple with items including the unit,
-    e.g. ('10cm', '15cm').
-    """
-
-    @property
-    def position(self) -> tuple:
-        "getter/setter"
-        get_attr = self.get_attribute  # type: ignore
-        return get_attr("svg:x"), get_attr("svg:y")
-
-    @position.setter
-    def position(self, position: tuple | list) -> None:
-        self.pos_x = position[0]
-        self.pos_y = position[1]
-
-
-class ZMix:
-    """z-index position
-
-    z-index is an integer
-    """
-
-    @property
-    def z_index(self) -> int | None:
-        "getter/setter"
-        z_index = self.get_attribute("draw:z-index")  # type: ignore
-        if z_index is None:
-            return None
-        return int(z_index)
-
-    @z_index.setter
-    def z_index(self, z_index: int) -> None:
-        self.set_attribute("draw:z-index", z_index)  # type: ignore
-
-
-class SizeMix:
-    """Size of the frame.
-
-    Size is a (width, height) tuple with items including the unit,
-    e.g. ('10cm', '15cm').
-    """
-
-    @property
-    def size(self) -> tuple:
-        "getter/setter"
-        return (self.width, self.height)
-
-    @size.setter
-    def size(self, size: tuple | list) -> None:
-        self.width = size[0]
-        self.height = size[1]
-
-
-class Frame(Element, AnchorMix, PosMix, ZMix, SizeMix):
-    """ODF Frame "draw:frame"
-
-    Frames are not useful by themselves. You should consider calling
-    Frame.image_frame() or Frame.text_frame directly.
-    """
-
-    _tag = "draw:frame"
-    _properties = (
-        PropDef("name", "draw:name"),
-        PropDef("draw_id", "draw:id"),
-        PropDef("width", "svg:width"),
-        PropDef("height", "svg:height"),
-        PropDef("style", "draw:style-name"),
-        PropDef("pos_x", "svg:x"),
-        PropDef("pos_y", "svg:y"),
-        PropDef("presentation_class", "presentation:class"),
-        PropDef("layer", "draw:layer"),
-        PropDef("presentation_style", "presentation:style-name"),
-    )
-
-    def __init__(  # noqa:  C901
-        self,
-        name: str | None = None,
-        draw_id: str | None = None,
-        style: str | None = None,
-        position: tuple | None = None,
-        size: tuple = ("1cm", "1cm"),
-        z_index: int = 0,
-        presentation_class: str | None = None,
-        anchor_type: str | None = None,
-        anchor_page: int | None = None,
-        layer: str | None = None,
-        presentation_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a frame element of the given size. Position is relative to the
-        context the frame is inserted in. If positioned by page, give the page
-        number and the x, y position.
-
-        Size is a (width, height) tuple and position is a (left, top) tuple; items
-        are strings including the unit, e.g. ('10cm', '15cm').
-
-        Frames are not useful by themselves. You should consider calling:
-            Frame.image_frame()
-        or
-            Frame.text_frame()
-
-
-        Arguments:
-
-            name -- str
-
-            draw_id -- str
-
-            style -- str
-
-            position -- (str, str)
-
-            size -- (str, str)
-
-            z_index -- int (default 0)
-
-            presentation_class -- str
-
-            anchor_type -- 'page', 'frame', 'paragraph', 'char' or 'as-char'
-
-            anchor_page -- int, page number is anchor_type is 'page'
-
-            layer -- str
-
-            presentation_style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.size = size
-            self.z_index = z_index
-            if name:
-                self.name = name
-            if draw_id is not None:
-                self.draw_id = draw_id
-            if style is not None:
-                self.style = style
-            if position is not None:
-                self.position = position
-            if presentation_class is not None:
-                self.presentation_class = presentation_class
-            if anchor_type:
-                self.anchor_type = anchor_type
-            if position and not anchor_type:
-                self.anchor_type = "paragraph"
-            if anchor_page is not None:
-                self.anchor_page = anchor_page
-            if layer is not None:
-                self.layer = layer
-            if presentation_style is not None:
-                self.presentation_style = presentation_style
-
-    @classmethod
-    def image_frame(
-        cls,
-        image: Element | str,
-        text: str | None = None,
-        name: str | None = None,
-        draw_id: str | None = None,
-        style: str | None = None,
-        position: tuple | None = None,
-        size: tuple = ("1cm", "1cm"),
-        z_index: int = 0,
-        presentation_class: str | None = None,
-        anchor_type: str | None = None,
-        anchor_page: int | None = None,
-        layer: str | None = None,
-        presentation_style: str | None = None,
-        **kwargs: Any,
-    ) -> Element:
-        """Create a ready-to-use image, since image must be embedded in a
-        frame.
-
-        The optionnal text will appear above the image.
-
-        Arguments:
-
-            image -- DrawImage or str, DrawImage element or URL of the image
-
-            text -- str, text for the image
-
-            See Frame() initialization for the other arguments
-
-        Return: Frame
-        """
-        frame = cls(
-            name=name,
-            draw_id=draw_id,
-            style=style,
-            position=position,
-            size=size,
-            z_index=z_index,
-            presentation_class=presentation_class,
-            anchor_type=anchor_type,
-            anchor_page=anchor_page,
-            layer=layer,
-            presentation_style=presentation_style,
-            **kwargs,
-        )
-        image_element = frame.set_image(image)
-        if text:
-            image_element.text_content = text
-        return frame
-
-    @classmethod
-    def text_frame(
-        cls,
-        text_or_element: Iterable[Element] | Element | str,
-        text_style: str | None = None,
-        name: str | None = None,
-        draw_id: str | None = None,
-        style: str | None = None,
-        position: tuple | None = None,
-        size: tuple = ("1cm", "1cm"),
-        z_index: int = 0,
-        presentation_class: str | None = None,
-        anchor_type: str | None = None,
-        anchor_page: int | None = None,
-        layer: str | None = None,
-        presentation_style: str | None = None,
-        **kwargs: Any,
-    ) -> Element:
-        """Create a ready-to-use text box, since text box must be embedded in
-        a frame.
-
-        The optionnal text will appear above the image.
-
-        Arguments:
-
-            text_or_element -- str or Element, or list of them, text content
-                               of the text box.
-
-            text_style -- str, name of the style for the text
-
-            See Frame() initialization for the other arguments
-
-        Return: Frame
-        """
-        frame = cls(
-            name=name,
-            draw_id=draw_id,
-            style=style,
-            position=position,
-            size=size,
-            z_index=z_index,
-            presentation_class=presentation_class,
-            anchor_type=anchor_type,
-            anchor_page=anchor_page,
-            layer=layer,
-            presentation_style=presentation_style,
-            **kwargs,
-        )
-        frame.set_text_box(text_or_element, text_style)
-        return frame
-
-    @property
-    def text_content(self) -> str:
-        text_box = self.get_element("draw:text-box")
-        if text_box is None:
-            return ""
-        return text_box.text_content
-
-    @text_content.setter
-    def text_content(self, text_or_element: Element | str) -> None:
-        text_box = self.get_element("draw:text-box")
-        if text_box is None:
-            text_box = Element.from_tag("draw:text-box")
-            self.append(text_box)
-        if isinstance(text_or_element, Element):
-            text_box.clear()
-            text_box.append(text_or_element)
-        else:
-            text_box.text_content = text_or_element
-
-    def get_image(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        return self.get_element("draw:image")
-
-    def set_image(self, url_or_element: Element | str) -> Element:
-        image = self.get_image()
-        if image is None:
-            if isinstance(url_or_element, Element):
-                image = url_or_element
-                self.append(image)
-            else:
-                image = DrawImage(url_or_element)
-                self.append(image)
-        else:
-            if isinstance(url_or_element, Element):
-                image.delete()
-                image = url_or_element
-                self.append(image)
-            else:
-                image.set_url(url_or_element)  # type: ignore
-        return image
-
-    def get_text_box(self) -> Element | None:
-        return self.get_element("draw:text-box")
-
-    def set_text_box(
-        self,
-        text_or_element: Iterable[Element | str] | Element | str,
-        text_style: str | None = None,
-    ) -> Element:
-        text_box = self.get_text_box()
-        if text_box is None:
-            text_box = Element.from_tag("draw:text-box")
-            self.append(text_box)
-        else:
-            text_box.clear()
-        if isinstance(text_or_element, (Element, str)):
-            text_or_element_list: Iterable[Element | str] = [text_or_element]
-        else:
-            text_or_element_list = text_or_element
-        for item in text_or_element_list:
-            if isinstance(item, str):
-                text_box.append(Paragraph(item, style=text_style))
-            else:
-                text_box.append(item)
-        return text_box
-
-    @staticmethod
-    def _get_formatted_text_subresult(context: dict, element: Element) -> str:
-        str_list = ["  "]
-        for child in element.children:
-            str_list.append(child.get_formatted_text(context))
-        subresult = "".join(str_list)
-        subresult = subresult.replace("\n", "\n  ")
-        return subresult.rstrip(" ")
-
-    def get_formatted_text(  # noqa:  C901
-        self,
-        context: dict | None = None,
-    ) -> str:
-        if not context:
-            context = {}
-        result = []
-        for element in self.children:
-            tag = element.tag
-            if tag == "draw:image":
-                if context["rst_mode"]:
-                    filename = element.get_attribute("xlink:href")
-
-                    # Compute width and height
-                    width, height = self.size
-                    if width is not None:
-                        width = Unit(width)
-                        width = width.convert("px", DPI)
-                    if height is not None:
-                        height = Unit(height)
-                        height = height.convert("px", DPI)
-
-                    # Insert or not ?
-                    if context["no_img_level"]:
-                        context["img_counter"] += 1
-                        ref = f"|img{context['img_counter']}|"
-                        result.append(ref)
-                        context["images"].append((ref, filename, (width, height)))
-                    else:
-                        result.append(f"\n.. image:: {filename}\n")
-                        if width is not None:
-                            result.append(f"   :width: {width}\n")
-                        if height is not None:
-                            result.append(f"   :height: {height}\n")
-                else:
-                    result.append(f"[Image {element.get_attribute('xlink:href')}]\n")
-            elif tag == "draw:text-box":
-                result.append(self._get_formatted_text_subresult(context, element))
-            else:
-                result.append(element.get_formatted_text(context))
-        result.append("\n")
-        return "".join(result)
-
-
-Frame._define_attribut_property()
-
-register_element_class(Frame)
-
-
-
-
-
-
-
-

Functions

-
-
-def default_frame_position_style(name: str = 'FramePosition', horizontal_pos: str = 'from-left', vertical_pos: str = 'from-top', horizontal_rel: str = 'paragraph', vertical_rel: str = 'paragraph') ‑> Style -
-
-

Helper style for positioning frames in desktop applications that need -it.

-

Default arguments should be enough.

-

Use the returned Style as the frame style or build a new graphic style -with this style as the parent.

-
- -Expand source code - -
def default_frame_position_style(
-    name: str = "FramePosition",
-    horizontal_pos: str = "from-left",
-    vertical_pos: str = "from-top",
-    horizontal_rel: str = "paragraph",
-    vertical_rel: str = "paragraph",
-) -> Style:
-    """Helper style for positioning frames in desktop applications that need
-    it.
-
-    Default arguments should be enough.
-
-    Use the returned Style as the frame style or build a new graphic style
-    with this style as the parent.
-    """
-    return Style(
-        family="graphic",
-        name=name,
-        horizontal_pos=horizontal_pos,
-        horizontal_rel=horizontal_rel,
-        vertical_pos=vertical_pos,
-        vertical_rel=vertical_rel,
-    )
-
-
-
-
-
-

Classes

-
-
-class AnchorMix -
-
-

Anchor parameter, how the element is attached to its environment.

-

value can be: 'page', 'frame', 'paragraph', 'char' or 'as-char'

-
- -Expand source code - -
class AnchorMix:
-    """Anchor parameter, how the element is attached to its environment.
-
-    value can be: 'page', 'frame', 'paragraph', 'char' or 'as-char'
-    """
-
-    ANCHOR_VALUE_CHOICE = {  # noqa: RUF012
-        "page",
-        "frame",
-        "paragraph",
-        "char",
-        "as-char",
-    }
-
-    @property
-    def anchor_type(self) -> str | None:
-        "Anchor_type getter/setter."
-        return self.get_attribute_string("text:anchor-type")  # type: ignore
-
-    @anchor_type.setter
-    def anchor_type(self, anchor_type: str) -> None:
-        if anchor_type not in self.ANCHOR_VALUE_CHOICE:
-            raise TypeError(f"anchor_type not valid: '{anchor_type!r}'")
-        self.set_attribute("text:anchor-type", anchor_type)  # type: ignore
-
-    @property
-    def anchor_page(self) -> int | None:
-        """getter/setter for the number of the page when the anchor type is
-        'page'.
-
-        type : int or None
-        """
-        anchor_page = self.get_attribute("text:anchor-page-number")  # type: ignore
-        if anchor_page is None:
-            return None
-        return int(anchor_page)
-
-    @anchor_page.setter
-    def anchor_page(self, anchor_page: int | None) -> None:
-        self.set_attribute("text:anchor-page-number", anchor_page)  # type: ignore
-
-

Subclasses

- -

Class variables

-
-
var ANCHOR_VALUE_CHOICE
-
-
-
-
-

Instance variables

-
-
var anchor_page : int | None
-
-

getter/setter for the number of the page when the anchor type is -'page'.

-

type : int or None

-
- -Expand source code - -
@property
-def anchor_page(self) -> int | None:
-    """getter/setter for the number of the page when the anchor type is
-    'page'.
-
-    type : int or None
-    """
-    anchor_page = self.get_attribute("text:anchor-page-number")  # type: ignore
-    if anchor_page is None:
-        return None
-    return int(anchor_page)
-
-
-
var anchor_type : str | None
-
-

Anchor_type getter/setter.

-
- -Expand source code - -
@property
-def anchor_type(self) -> str | None:
-    "Anchor_type getter/setter."
-    return self.get_attribute_string("text:anchor-type")  # type: ignore
-
-
-
-
-
-class Frame -(name: str | None = None, draw_id: str | None = None, style: str | None = None, position: tuple | None = None, size: tuple = ('1cm', '1cm'), z_index: int = 0, presentation_class: str | None = None, anchor_type: str | None = None, anchor_page: int | None = None, layer: str | None = None, presentation_style: str | None = None, **kwargs: Any) -
-
-

ODF Frame "draw:frame"

-

Frames are not useful by themselves. You should consider calling -Frame.image_frame() or Frame.text_frame directly.

-

Create a frame element of the given size. Position is relative to the -context the frame is inserted in. If positioned by page, give the page -number and the x, y position.

-

Size is a (width, height) tuple and position is a (left, top) tuple; items -are strings including the unit, e.g. ('10cm', '15cm').

-

Frames are not useful by themselves. You should consider calling: -Frame.image_frame() -or -Frame.text_frame()

-

Arguments

-

name – str

-

draw_id – str

-

style – str

-

position – (str, str)

-

size – (str, str)

-

z_index – int (default 0)

-

presentation_class – str

-

anchor_type – 'page', 'frame', 'paragraph', 'char' or 'as-char'

-

anchor_page – int, page number is anchor_type is 'page'

-

layer – str

-

presentation_style – str

-
- -Expand source code - -
class Frame(Element, AnchorMix, PosMix, ZMix, SizeMix):
-    """ODF Frame "draw:frame"
-
-    Frames are not useful by themselves. You should consider calling
-    Frame.image_frame() or Frame.text_frame directly.
-    """
-
-    _tag = "draw:frame"
-    _properties = (
-        PropDef("name", "draw:name"),
-        PropDef("draw_id", "draw:id"),
-        PropDef("width", "svg:width"),
-        PropDef("height", "svg:height"),
-        PropDef("style", "draw:style-name"),
-        PropDef("pos_x", "svg:x"),
-        PropDef("pos_y", "svg:y"),
-        PropDef("presentation_class", "presentation:class"),
-        PropDef("layer", "draw:layer"),
-        PropDef("presentation_style", "presentation:style-name"),
-    )
-
-    def __init__(  # noqa:  C901
-        self,
-        name: str | None = None,
-        draw_id: str | None = None,
-        style: str | None = None,
-        position: tuple | None = None,
-        size: tuple = ("1cm", "1cm"),
-        z_index: int = 0,
-        presentation_class: str | None = None,
-        anchor_type: str | None = None,
-        anchor_page: int | None = None,
-        layer: str | None = None,
-        presentation_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a frame element of the given size. Position is relative to the
-        context the frame is inserted in. If positioned by page, give the page
-        number and the x, y position.
-
-        Size is a (width, height) tuple and position is a (left, top) tuple; items
-        are strings including the unit, e.g. ('10cm', '15cm').
-
-        Frames are not useful by themselves. You should consider calling:
-            Frame.image_frame()
-        or
-            Frame.text_frame()
-
-
-        Arguments:
-
-            name -- str
-
-            draw_id -- str
-
-            style -- str
-
-            position -- (str, str)
-
-            size -- (str, str)
-
-            z_index -- int (default 0)
-
-            presentation_class -- str
-
-            anchor_type -- 'page', 'frame', 'paragraph', 'char' or 'as-char'
-
-            anchor_page -- int, page number is anchor_type is 'page'
-
-            layer -- str
-
-            presentation_style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.size = size
-            self.z_index = z_index
-            if name:
-                self.name = name
-            if draw_id is not None:
-                self.draw_id = draw_id
-            if style is not None:
-                self.style = style
-            if position is not None:
-                self.position = position
-            if presentation_class is not None:
-                self.presentation_class = presentation_class
-            if anchor_type:
-                self.anchor_type = anchor_type
-            if position and not anchor_type:
-                self.anchor_type = "paragraph"
-            if anchor_page is not None:
-                self.anchor_page = anchor_page
-            if layer is not None:
-                self.layer = layer
-            if presentation_style is not None:
-                self.presentation_style = presentation_style
-
-    @classmethod
-    def image_frame(
-        cls,
-        image: Element | str,
-        text: str | None = None,
-        name: str | None = None,
-        draw_id: str | None = None,
-        style: str | None = None,
-        position: tuple | None = None,
-        size: tuple = ("1cm", "1cm"),
-        z_index: int = 0,
-        presentation_class: str | None = None,
-        anchor_type: str | None = None,
-        anchor_page: int | None = None,
-        layer: str | None = None,
-        presentation_style: str | None = None,
-        **kwargs: Any,
-    ) -> Element:
-        """Create a ready-to-use image, since image must be embedded in a
-        frame.
-
-        The optionnal text will appear above the image.
-
-        Arguments:
-
-            image -- DrawImage or str, DrawImage element or URL of the image
-
-            text -- str, text for the image
-
-            See Frame() initialization for the other arguments
-
-        Return: Frame
-        """
-        frame = cls(
-            name=name,
-            draw_id=draw_id,
-            style=style,
-            position=position,
-            size=size,
-            z_index=z_index,
-            presentation_class=presentation_class,
-            anchor_type=anchor_type,
-            anchor_page=anchor_page,
-            layer=layer,
-            presentation_style=presentation_style,
-            **kwargs,
-        )
-        image_element = frame.set_image(image)
-        if text:
-            image_element.text_content = text
-        return frame
-
-    @classmethod
-    def text_frame(
-        cls,
-        text_or_element: Iterable[Element] | Element | str,
-        text_style: str | None = None,
-        name: str | None = None,
-        draw_id: str | None = None,
-        style: str | None = None,
-        position: tuple | None = None,
-        size: tuple = ("1cm", "1cm"),
-        z_index: int = 0,
-        presentation_class: str | None = None,
-        anchor_type: str | None = None,
-        anchor_page: int | None = None,
-        layer: str | None = None,
-        presentation_style: str | None = None,
-        **kwargs: Any,
-    ) -> Element:
-        """Create a ready-to-use text box, since text box must be embedded in
-        a frame.
-
-        The optionnal text will appear above the image.
-
-        Arguments:
-
-            text_or_element -- str or Element, or list of them, text content
-                               of the text box.
-
-            text_style -- str, name of the style for the text
-
-            See Frame() initialization for the other arguments
-
-        Return: Frame
-        """
-        frame = cls(
-            name=name,
-            draw_id=draw_id,
-            style=style,
-            position=position,
-            size=size,
-            z_index=z_index,
-            presentation_class=presentation_class,
-            anchor_type=anchor_type,
-            anchor_page=anchor_page,
-            layer=layer,
-            presentation_style=presentation_style,
-            **kwargs,
-        )
-        frame.set_text_box(text_or_element, text_style)
-        return frame
-
-    @property
-    def text_content(self) -> str:
-        text_box = self.get_element("draw:text-box")
-        if text_box is None:
-            return ""
-        return text_box.text_content
-
-    @text_content.setter
-    def text_content(self, text_or_element: Element | str) -> None:
-        text_box = self.get_element("draw:text-box")
-        if text_box is None:
-            text_box = Element.from_tag("draw:text-box")
-            self.append(text_box)
-        if isinstance(text_or_element, Element):
-            text_box.clear()
-            text_box.append(text_or_element)
-        else:
-            text_box.text_content = text_or_element
-
-    def get_image(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        return self.get_element("draw:image")
-
-    def set_image(self, url_or_element: Element | str) -> Element:
-        image = self.get_image()
-        if image is None:
-            if isinstance(url_or_element, Element):
-                image = url_or_element
-                self.append(image)
-            else:
-                image = DrawImage(url_or_element)
-                self.append(image)
-        else:
-            if isinstance(url_or_element, Element):
-                image.delete()
-                image = url_or_element
-                self.append(image)
-            else:
-                image.set_url(url_or_element)  # type: ignore
-        return image
-
-    def get_text_box(self) -> Element | None:
-        return self.get_element("draw:text-box")
-
-    def set_text_box(
-        self,
-        text_or_element: Iterable[Element | str] | Element | str,
-        text_style: str | None = None,
-    ) -> Element:
-        text_box = self.get_text_box()
-        if text_box is None:
-            text_box = Element.from_tag("draw:text-box")
-            self.append(text_box)
-        else:
-            text_box.clear()
-        if isinstance(text_or_element, (Element, str)):
-            text_or_element_list: Iterable[Element | str] = [text_or_element]
-        else:
-            text_or_element_list = text_or_element
-        for item in text_or_element_list:
-            if isinstance(item, str):
-                text_box.append(Paragraph(item, style=text_style))
-            else:
-                text_box.append(item)
-        return text_box
-
-    @staticmethod
-    def _get_formatted_text_subresult(context: dict, element: Element) -> str:
-        str_list = ["  "]
-        for child in element.children:
-            str_list.append(child.get_formatted_text(context))
-        subresult = "".join(str_list)
-        subresult = subresult.replace("\n", "\n  ")
-        return subresult.rstrip(" ")
-
-    def get_formatted_text(  # noqa:  C901
-        self,
-        context: dict | None = None,
-    ) -> str:
-        if not context:
-            context = {}
-        result = []
-        for element in self.children:
-            tag = element.tag
-            if tag == "draw:image":
-                if context["rst_mode"]:
-                    filename = element.get_attribute("xlink:href")
-
-                    # Compute width and height
-                    width, height = self.size
-                    if width is not None:
-                        width = Unit(width)
-                        width = width.convert("px", DPI)
-                    if height is not None:
-                        height = Unit(height)
-                        height = height.convert("px", DPI)
-
-                    # Insert or not ?
-                    if context["no_img_level"]:
-                        context["img_counter"] += 1
-                        ref = f"|img{context['img_counter']}|"
-                        result.append(ref)
-                        context["images"].append((ref, filename, (width, height)))
-                    else:
-                        result.append(f"\n.. image:: {filename}\n")
-                        if width is not None:
-                            result.append(f"   :width: {width}\n")
-                        if height is not None:
-                            result.append(f"   :height: {height}\n")
-                else:
-                    result.append(f"[Image {element.get_attribute('xlink:href')}]\n")
-            elif tag == "draw:text-box":
-                result.append(self._get_formatted_text_subresult(context, element))
-            else:
-                result.append(element.get_formatted_text(context))
-        result.append("\n")
-        return "".join(result)
-
-

Ancestors

- -

Static methods

-
-
-def image_frame(image: Element | str, text: str | None = None, name: str | None = None, draw_id: str | None = None, style: str | None = None, position: tuple | None = None, size: tuple = ('1cm', '1cm'), z_index: int = 0, presentation_class: str | None = None, anchor_type: str | None = None, anchor_page: int | None = None, layer: str | None = None, presentation_style: str | None = None, **kwargs: Any) ‑> Element -
-
-

Create a ready-to-use image, since image must be embedded in a -frame.

-

The optionnal text will appear above the image.

-

Arguments

-

image – DrawImage or str, DrawImage element or URL of the image

-

text – str, text for the image

-

See Frame() initialization for the other arguments

-

Return: Frame

-
- -Expand source code - -
@classmethod
-def image_frame(
-    cls,
-    image: Element | str,
-    text: str | None = None,
-    name: str | None = None,
-    draw_id: str | None = None,
-    style: str | None = None,
-    position: tuple | None = None,
-    size: tuple = ("1cm", "1cm"),
-    z_index: int = 0,
-    presentation_class: str | None = None,
-    anchor_type: str | None = None,
-    anchor_page: int | None = None,
-    layer: str | None = None,
-    presentation_style: str | None = None,
-    **kwargs: Any,
-) -> Element:
-    """Create a ready-to-use image, since image must be embedded in a
-    frame.
-
-    The optionnal text will appear above the image.
-
-    Arguments:
-
-        image -- DrawImage or str, DrawImage element or URL of the image
-
-        text -- str, text for the image
-
-        See Frame() initialization for the other arguments
-
-    Return: Frame
-    """
-    frame = cls(
-        name=name,
-        draw_id=draw_id,
-        style=style,
-        position=position,
-        size=size,
-        z_index=z_index,
-        presentation_class=presentation_class,
-        anchor_type=anchor_type,
-        anchor_page=anchor_page,
-        layer=layer,
-        presentation_style=presentation_style,
-        **kwargs,
-    )
-    image_element = frame.set_image(image)
-    if text:
-        image_element.text_content = text
-    return frame
-
-
-
-def text_frame(text_or_element: Iterable[Element] | Element | str, text_style: str | None = None, name: str | None = None, draw_id: str | None = None, style: str | None = None, position: tuple | None = None, size: tuple = ('1cm', '1cm'), z_index: int = 0, presentation_class: str | None = None, anchor_type: str | None = None, anchor_page: int | None = None, layer: str | None = None, presentation_style: str | None = None, **kwargs: Any) ‑> Element -
-
-

Create a ready-to-use text box, since text box must be embedded in -a frame.

-

The optionnal text will appear above the image.

-

Arguments

-

text_or_element – str or Element, or list of them, text content -of the text box.

-

text_style – str, name of the style for the text

-

See Frame() initialization for the other arguments

-

Return: Frame

-
- -Expand source code - -
@classmethod
-def text_frame(
-    cls,
-    text_or_element: Iterable[Element] | Element | str,
-    text_style: str | None = None,
-    name: str | None = None,
-    draw_id: str | None = None,
-    style: str | None = None,
-    position: tuple | None = None,
-    size: tuple = ("1cm", "1cm"),
-    z_index: int = 0,
-    presentation_class: str | None = None,
-    anchor_type: str | None = None,
-    anchor_page: int | None = None,
-    layer: str | None = None,
-    presentation_style: str | None = None,
-    **kwargs: Any,
-) -> Element:
-    """Create a ready-to-use text box, since text box must be embedded in
-    a frame.
-
-    The optionnal text will appear above the image.
-
-    Arguments:
-
-        text_or_element -- str or Element, or list of them, text content
-                           of the text box.
-
-        text_style -- str, name of the style for the text
-
-        See Frame() initialization for the other arguments
-
-    Return: Frame
-    """
-    frame = cls(
-        name=name,
-        draw_id=draw_id,
-        style=style,
-        position=position,
-        size=size,
-        z_index=z_index,
-        presentation_class=presentation_class,
-        anchor_type=anchor_type,
-        anchor_page=anchor_page,
-        layer=layer,
-        presentation_style=presentation_style,
-        **kwargs,
-    )
-    frame.set_text_box(text_or_element, text_style)
-    return frame
-
-
-
-

Instance variables

-
-
var draw_id : str | bool | None
-
-

Get/set the attribute draw:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var height : str | bool | None
-
-

Get/set the attribute svg:height

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var layer : str | bool | None
-
-

Get/set the attribute draw:layer

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute draw:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var pos_x : str | bool | None
-
-

Get/set the attribute svg:x

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var pos_y : str | bool | None
-
-

Get/set the attribute svg:y

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var presentation_class : str | bool | None
-
-

Get/set the attribute presentation:class

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var presentation_style : str | bool | None
-
-

Get/set the attribute presentation:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute draw:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var width : str | bool | None
-
-

Get/set the attribute svg:width

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def get_text_box(self) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_text_box(self) -> Element | None:
-    return self.get_element("draw:text-box")
-
-
-
-def set_image(self, url_or_element: Element | str) ‑> Element -
-
-
-
- -Expand source code - -
def set_image(self, url_or_element: Element | str) -> Element:
-    image = self.get_image()
-    if image is None:
-        if isinstance(url_or_element, Element):
-            image = url_or_element
-            self.append(image)
-        else:
-            image = DrawImage(url_or_element)
-            self.append(image)
-    else:
-        if isinstance(url_or_element, Element):
-            image.delete()
-            image = url_or_element
-            self.append(image)
-        else:
-            image.set_url(url_or_element)  # type: ignore
-    return image
-
-
-
-def set_text_box(self, text_or_element: Iterable[Element | str] | Element | str, text_style: str | None = None) ‑> Element -
-
-
-
- -Expand source code - -
def set_text_box(
-    self,
-    text_or_element: Iterable[Element | str] | Element | str,
-    text_style: str | None = None,
-) -> Element:
-    text_box = self.get_text_box()
-    if text_box is None:
-        text_box = Element.from_tag("draw:text-box")
-        self.append(text_box)
-    else:
-        text_box.clear()
-    if isinstance(text_or_element, (Element, str)):
-        text_or_element_list: Iterable[Element | str] = [text_or_element]
-    else:
-        text_or_element_list = text_or_element
-    for item in text_or_element_list:
-        if isinstance(item, str):
-            text_box.append(Paragraph(item, style=text_style))
-        else:
-            text_box.append(item)
-    return text_box
-
-
-
-

Inherited members

- -
-
-class PosMix -
-
-

Position relative to anchor point.

-

Setting the position may require a specific style for actual display on -some graphical rendering softwares.

-

Position is a (left, top) tuple with items including the unit, -e.g. ('10cm', '15cm').

-
- -Expand source code - -
class PosMix:
-    """Position relative to anchor point.
-
-    Setting the position may require a specific style for actual display on
-    some graphical rendering softwares.
-
-    Position is a (left, top) tuple with items including the unit,
-    e.g. ('10cm', '15cm').
-    """
-
-    @property
-    def position(self) -> tuple:
-        "getter/setter"
-        get_attr = self.get_attribute  # type: ignore
-        return get_attr("svg:x"), get_attr("svg:y")
-
-    @position.setter
-    def position(self, position: tuple | list) -> None:
-        self.pos_x = position[0]
-        self.pos_y = position[1]
-
-

Subclasses

- -

Instance variables

-
-
var position : tuple
-
-

getter/setter

-
- -Expand source code - -
@property
-def position(self) -> tuple:
-    "getter/setter"
-    get_attr = self.get_attribute  # type: ignore
-    return get_attr("svg:x"), get_attr("svg:y")
-
-
-
-
-
-class SizeMix -
-
-

Size of the frame.

-

Size is a (width, height) tuple with items including the unit, -e.g. ('10cm', '15cm').

-
- -Expand source code - -
class SizeMix:
-    """Size of the frame.
-
-    Size is a (width, height) tuple with items including the unit,
-    e.g. ('10cm', '15cm').
-    """
-
-    @property
-    def size(self) -> tuple:
-        "getter/setter"
-        return (self.width, self.height)
-
-    @size.setter
-    def size(self, size: tuple | list) -> None:
-        self.width = size[0]
-        self.height = size[1]
-
-

Subclasses

- -

Instance variables

-
-
var size : tuple
-
-

getter/setter

-
- -Expand source code - -
@property
-def size(self) -> tuple:
-    "getter/setter"
-    return (self.width, self.height)
-
-
-
-
-
-class ZMix -
-
-

z-index position

-

z-index is an integer

-
- -Expand source code - -
class ZMix:
-    """z-index position
-
-    z-index is an integer
-    """
-
-    @property
-    def z_index(self) -> int | None:
-        "getter/setter"
-        z_index = self.get_attribute("draw:z-index")  # type: ignore
-        if z_index is None:
-            return None
-        return int(z_index)
-
-    @z_index.setter
-    def z_index(self, z_index: int) -> None:
-        self.set_attribute("draw:z-index", z_index)  # type: ignore
-
-

Subclasses

- -

Instance variables

-
-
var z_index : int | None
-
-

getter/setter

-
- -Expand source code - -
@property
-def z_index(self) -> int | None:
-    "getter/setter"
-    z_index = self.get_attribute("draw:z-index")  # type: ignore
-    if z_index is None:
-        return None
-    return int(z_index)
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/header.html b/doc/header.html deleted file mode 100644 index 185256f..0000000 --- a/doc/header.html +++ /dev/null @@ -1,536 +0,0 @@ - - - - - - -odfdo.header API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.header

-
-
-

Header class for "text:h".

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-"""Header class for "text:h".
-"""
-from __future__ import annotations
-
-from re import sub
-from typing import Any
-
-from .element import PropDef, register_element_class
-from .paragraph import Paragraph
-
-
-class Header(Paragraph):
-    """Specialised paragraph for headings "text:h"."""
-
-    _tag = "text:h"
-    _properties = (
-        PropDef("level", "text:outline-level"),
-        PropDef("restart_numbering", "text:restart-numbering"),
-        PropDef("start_value", "text:start-value"),
-        PropDef("suppress_numbering", "text:suppress-numbering"),
-    )
-
-    def __init__(
-        self,
-        level: int = 1,
-        text: str | None = None,
-        restart_numbering: bool = False,
-        start_value: int | None = None,
-        suppress_numbering: bool = False,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a header element of the given style and level, containing the
-        optional given text.
-
-        Level count begins at 1.
-
-        Arguments:
-
-            level -- int
-
-            text -- str
-
-            restart_numbering -- bool
-
-            start_value -- int
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.level = int(level)
-            if text:
-                self.text = text
-            if restart_numbering:
-                self.restart_numbering = True
-            if start_value is not None:
-                self.start_value = start_value
-            if suppress_numbering:
-                self.suppress_numbering = True
-            if style:
-                self.style = style
-
-    def get_formatted_text(
-        self,
-        context: dict | None = None,
-        simple: bool = False,
-    ) -> str:
-        if not context:
-            context = {
-                "document": None,
-                "footnotes": [],
-                "endnotes": [],
-                "annotations": [],
-                "rst_mode": False,
-                "img_counter": 0,
-                "images": [],
-                "no_img_level": 0,
-            }
-        context["no_img_level"] += 1
-        title = super().get_formatted_text(context)
-        context["no_img_level"] -= 1
-        title = title.strip()
-        title = sub(r"\s+", " ", title)
-
-        # No rst_mode ?
-        if not context["rst_mode"]:
-            return title
-        # If here in rst_mode!
-
-        # Get the level, max 5!
-        LEVEL_STYLES = "#=-~`+^°'."
-        level = int(self.level)
-        if level > len(LEVEL_STYLES):
-            raise ValueError("Too many levels of heading")
-
-        # And return the result
-        result = ["\n", title, "\n", LEVEL_STYLES[level - 1] * len(title), "\n"]
-        return "".join(result)
-
-
-Header._define_attribut_property()
-
-register_element_class(Header)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class Header -(level: int = 1, text: str | None = None, restart_numbering: bool = False, start_value: int | None = None, suppress_numbering: bool = False, style: str | None = None, **kwargs: Any) -
-
-

Specialised paragraph for headings "text:h".

-

Create a header element of the given style and level, containing the -optional given text.

-

Level count begins at 1.

-

Arguments

-

level – int

-

text – str

-

restart_numbering – bool

-

start_value – int

-

style – str

-
- -Expand source code - -
class Header(Paragraph):
-    """Specialised paragraph for headings "text:h"."""
-
-    _tag = "text:h"
-    _properties = (
-        PropDef("level", "text:outline-level"),
-        PropDef("restart_numbering", "text:restart-numbering"),
-        PropDef("start_value", "text:start-value"),
-        PropDef("suppress_numbering", "text:suppress-numbering"),
-    )
-
-    def __init__(
-        self,
-        level: int = 1,
-        text: str | None = None,
-        restart_numbering: bool = False,
-        start_value: int | None = None,
-        suppress_numbering: bool = False,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a header element of the given style and level, containing the
-        optional given text.
-
-        Level count begins at 1.
-
-        Arguments:
-
-            level -- int
-
-            text -- str
-
-            restart_numbering -- bool
-
-            start_value -- int
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.level = int(level)
-            if text:
-                self.text = text
-            if restart_numbering:
-                self.restart_numbering = True
-            if start_value is not None:
-                self.start_value = start_value
-            if suppress_numbering:
-                self.suppress_numbering = True
-            if style:
-                self.style = style
-
-    def get_formatted_text(
-        self,
-        context: dict | None = None,
-        simple: bool = False,
-    ) -> str:
-        if not context:
-            context = {
-                "document": None,
-                "footnotes": [],
-                "endnotes": [],
-                "annotations": [],
-                "rst_mode": False,
-                "img_counter": 0,
-                "images": [],
-                "no_img_level": 0,
-            }
-        context["no_img_level"] += 1
-        title = super().get_formatted_text(context)
-        context["no_img_level"] -= 1
-        title = title.strip()
-        title = sub(r"\s+", " ", title)
-
-        # No rst_mode ?
-        if not context["rst_mode"]:
-            return title
-        # If here in rst_mode!
-
-        # Get the level, max 5!
-        LEVEL_STYLES = "#=-~`+^°'."
-        level = int(self.level)
-        if level > len(LEVEL_STYLES):
-            raise ValueError("Too many levels of heading")
-
-        # And return the result
-        result = ["\n", title, "\n", LEVEL_STYLES[level - 1] * len(title), "\n"]
-        return "".join(result)
-
-

Ancestors

- -

Instance variables

-
-
var level : str | bool | None
-
-

Get/set the attribute text:outline-level

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var restart_numbering : str | bool | None
-
-

Get/set the attribute text:restart-numbering

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var start_value : str | bool | None
-
-

Get/set the attribute text:start-value

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var suppress_numbering : str | bool | None
-
-

Get/set the attribute text:suppress-numbering

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/header_rows.html b/doc/header_rows.html deleted file mode 100644 index be7e370..0000000 --- a/doc/header_rows.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - -odfdo.header_rows API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.header_rows

-
-
-

Table class for HeaderRows.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2012 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Table class for HeaderRows.
-"""
-from __future__ import annotations
-
-from .element import Element, register_element_class
-
-
-class HeaderRows(Element):
-    _tag = "table:table-header-rows"
-    _caching = True
-
-
-register_element_class(HeaderRows)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class HeaderRows -(**kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class HeaderRows(Element):
-    _tag = "table:table-header-rows"
-    _caching = True
-
-

Ancestors

- -

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/image.html b/doc/image.html deleted file mode 100644 index ec72eae..0000000 --- a/doc/image.html +++ /dev/null @@ -1,805 +0,0 @@ - - - - - - -odfdo.image API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.image

-
-
-

DrawImage class for "draw:image".

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-"""DrawImage class for "draw:image".
-"""
-from __future__ import annotations
-
-from typing import Any
-
-from .element import Element, PropDef, register_element_class
-
-
-class DrawImage(Element):
-    """The "draw:image" element represents an image. An image can be
-    either:
-    - A link to an external resource or
-    - Embedded in the document (Not implemented in this version)
-
-    Warning: image elements must be stored in a frame "draw:frame",
-    see Frame().
-    """
-
-    _tag = "draw:image"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("url", "xlink:href"),
-        PropDef("type", "xlink:type"),
-        PropDef("show", "xlink:show"),
-        PropDef("actuate", "xlink:actuate"),
-        PropDef("filter_name", "draw:filter-name"),
-    )
-
-    def __init__(
-        self,
-        url: str = "",
-        xlink_type: str = "simple",
-        show: str = "embed",
-        actuate: str = "onLoad",
-        filter_name: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Initialisation of an DrawImage.
-
-        Arguments:
-
-            url -- str
-
-            type -- str
-
-            show -- str
-
-            actuate -- str
-
-            filter_name -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.url = url
-            self.type = xlink_type
-            self.show = show
-            self.actuate = actuate
-            self.filter_name = filter_name
-
-
-DrawImage._define_attribut_property()
-
-
-class DrawFillImage(DrawImage):
-    _tag = "draw:fill-image"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("display_name", "draw:display-name"),
-        PropDef("name", "draw:name"),
-        PropDef("height", "svg:height"),
-        PropDef("width", "svg:width"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        display_name: str | None = None,
-        height: str | None = None,
-        width: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """The "draw:fill-image" element specifies a link to a bitmap
-        resource. Fill image are not available as automatic styles.
-        The "draw:fill-image" element is usable within the following element:
-        "office:styles"
-
-        Arguments:
-
-            name -- str
-
-            display_name -- str
-
-            height -- str
-
-            width -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-            self.display_name = display_name
-            self.height = height
-            self.width = width
-
-
-DrawFillImage._define_attribut_property()
-
-register_element_class(DrawImage)
-register_element_class(DrawFillImage)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class DrawFillImage -(name: str | None = None, display_name: str | None = None, height: str | None = None, width: str | None = None, **kwargs: Any) -
-
-

The "draw:image" element represents an image. An image can be -either: -- A link to an external resource or -- Embedded in the document (Not implemented in this version)

-

Warning: image elements must be stored in a frame "draw:frame", -see Frame().

-

The "draw:fill-image" element specifies a link to a bitmap -resource. Fill image are not available as automatic styles. -The "draw:fill-image" element is usable within the following element: -"office:styles"

-

Arguments

-

name – str

-

display_name – str

-

height – str

-

width – str

-
- -Expand source code - -
class DrawFillImage(DrawImage):
-    _tag = "draw:fill-image"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("display_name", "draw:display-name"),
-        PropDef("name", "draw:name"),
-        PropDef("height", "svg:height"),
-        PropDef("width", "svg:width"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        display_name: str | None = None,
-        height: str | None = None,
-        width: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """The "draw:fill-image" element specifies a link to a bitmap
-        resource. Fill image are not available as automatic styles.
-        The "draw:fill-image" element is usable within the following element:
-        "office:styles"
-
-        Arguments:
-
-            name -- str
-
-            display_name -- str
-
-            height -- str
-
-            width -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-            self.display_name = display_name
-            self.height = height
-            self.width = width
-
-

Ancestors

- -

Instance variables

-
-
var display_name : str | bool | None
-
-

Get/set the attribute draw:display-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var height : str | bool | None
-
-

Get/set the attribute svg:height

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute draw:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var width : str | bool | None
-
-

Get/set the attribute svg:width

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class DrawImage -(url: str = '', xlink_type: str = 'simple', show: str = 'embed', actuate: str = 'onLoad', filter_name: str | None = None, **kwargs: Any) -
-
-

The "draw:image" element represents an image. An image can be -either: -- A link to an external resource or -- Embedded in the document (Not implemented in this version)

-

Warning: image elements must be stored in a frame "draw:frame", -see Frame().

-

Initialisation of an DrawImage.

-

Arguments

-

url – str

-

type – str

-

show – str

-

actuate – str

-

filter_name – str

-
- -Expand source code - -
class DrawImage(Element):
-    """The "draw:image" element represents an image. An image can be
-    either:
-    - A link to an external resource or
-    - Embedded in the document (Not implemented in this version)
-
-    Warning: image elements must be stored in a frame "draw:frame",
-    see Frame().
-    """
-
-    _tag = "draw:image"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("url", "xlink:href"),
-        PropDef("type", "xlink:type"),
-        PropDef("show", "xlink:show"),
-        PropDef("actuate", "xlink:actuate"),
-        PropDef("filter_name", "draw:filter-name"),
-    )
-
-    def __init__(
-        self,
-        url: str = "",
-        xlink_type: str = "simple",
-        show: str = "embed",
-        actuate: str = "onLoad",
-        filter_name: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Initialisation of an DrawImage.
-
-        Arguments:
-
-            url -- str
-
-            type -- str
-
-            show -- str
-
-            actuate -- str
-
-            filter_name -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.url = url
-            self.type = xlink_type
-            self.show = show
-            self.actuate = actuate
-            self.filter_name = filter_name
-
-

Ancestors

- -

Subclasses

- -

Instance variables

-
-
var actuate : str | bool | None
-
-

Get/set the attribute xlink:actuate

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var filter_name : str | bool | None
-
-

Get/set the attribute draw:filter-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var show : str | bool | None
-
-

Get/set the attribute xlink:show

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var type : str | bool | None
-
-

Get/set the attribute xlink:type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var url : str | bool | None
-
-

Get/set the attribute xlink:href

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/index.html b/doc/index.html index 30f96cf..5b64e26 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,46560 +1,7 @@ - + - - - -odfdo API documentation - - - - - - - - - + + - -
-
-
-

Package odfdo

-
-
-

Python library for OpenDocument Format (ODF)

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-"""Python library for OpenDocument Format (ODF)"""
-
-__all__ = [
-    "AnimPar",
-    "AnimSeq",
-    "AnimTransFilter",
-    "Annotation",
-    "AnnotationEnd",
-    "BackgroundImage",
-    "Bookmark",
-    "BookmarkEnd",
-    "BookmarkStart",
-    "Cell",
-    "ChangeInfo",
-    "Column",
-    "ConnectorShape",
-    "Container",
-    "Content",
-    "Content",
-    "Document",
-    "DrawFillImage",
-    "DrawGroup",
-    "DrawImage",
-    "DrawPage",
-    "Element",
-    "ElementTyped",
-    "EllipseShape",
-    "FIRST_CHILD",
-    "Frame",
-    "Header",
-    "HeaderRows",
-    "IndexTitle",
-    "IndexTitleTemplate",
-    "LAST_CHILD",
-    "LineBreak",
-    "LineShape",
-    "Link",
-    "List",
-    "ListItem",
-    "Manifest",
-    "Meta",
-    "NEXT_SIBLING",
-    "NamedRange",
-    "Note",
-    "PREV_SIBLING",
-    "Paragraph",
-    "PageBreak",
-    "RectangleShape",
-    "Reference",
-    "ReferenceMark",
-    "ReferenceMarkEnd",
-    "ReferenceMarkStart",
-    "Row",
-    "RowGroup",
-    "Section",
-    "Spacer",
-    "Span",
-    "Style",
-    "Styles",
-    "TOC",
-    "Tab",
-    "TabStopStyle",
-    "Table",
-    "Text",
-    "TextChange",
-    "TextChangeEnd",
-    "TextChangeStart",
-    "TextChangedRegion",
-    "TextDeletion",
-    "TextFormatChange",
-    "TextInsertion",
-    "TocEntryTemplate",
-    "TrackedChanges",
-    "UserDefined",
-    "UserFieldDecl",
-    "UserFieldDecls",
-    "UserFieldGet",
-    "UserFieldInput",
-    "VarChapter",
-    "VarCreationDate",
-    "VarCreationTime",
-    "VarDate",
-    "VarDecl",
-    "VarDecls",
-    "VarDescription",
-    "VarFileName",
-    "VarGet",
-    "VarInitialCreator",
-    "VarKeywords",
-    "VarPageCount",
-    "VarPageNumber",
-    "VarSet",
-    "VarSubject",
-    "VarTime",
-    "VarTitle",
-    "XmlPart",
-    "__version__",
-    "create_table_cell_style",
-    "default_boolean_style",
-    "default_currency_style",
-    "default_date_style",
-    "default_frame_position_style",
-    "default_number_style",
-    "default_percentage_style",
-    "default_time_style",
-    "default_toc_level_style",
-    "hex2rgb",
-    "make_table_cell_border_string",
-    "rgb2hex",
-]
-
-
-from .bookmark import Bookmark, BookmarkEnd, BookmarkStart
-from .cell import Cell
-from .container import Container
-from .content import Content
-from .document import Document
-from .draw_page import DrawPage
-from .element import FIRST_CHILD, LAST_CHILD, NEXT_SIBLING, PREV_SIBLING, Element, Text
-from .element_typed import ElementTyped
-from .frame import Frame, default_frame_position_style
-from .header import Header
-from .header_rows import HeaderRows
-from .image import DrawFillImage, DrawImage
-from .link import Link
-from .list import List, ListItem
-from .manifest import Manifest
-from .meta import Meta
-from .note import Annotation, AnnotationEnd, Note
-from .paragraph import LineBreak, PageBreak, Paragraph, Spacer, Span, Tab
-from .reference import Reference, ReferenceMark, ReferenceMarkEnd, ReferenceMarkStart
-from .section import Section
-from .shapes import ConnectorShape, DrawGroup, EllipseShape, LineShape, RectangleShape
-from .smil import AnimPar, AnimSeq, AnimTransFilter
-from .style import (
-    BackgroundImage,
-    Style,
-    create_table_cell_style,
-    default_boolean_style,
-    default_currency_style,
-    default_date_style,
-    default_number_style,
-    default_percentage_style,
-    default_time_style,
-    hex2rgb,
-    make_table_cell_border_string,
-    rgb2hex,
-)
-from .styles import Styles
-from .table import Column, NamedRange, Row, RowGroup, Table
-from .toc import (
-    TOC,
-    IndexTitle,
-    IndexTitleTemplate,
-    TabStopStyle,
-    TocEntryTemplate,
-    default_toc_level_style,
-)
-from .tracked_changes import (
-    ChangeInfo,
-    TextChange,
-    TextChangedRegion,
-    TextChangeEnd,
-    TextChangeStart,
-    TextDeletion,
-    TextFormatChange,
-    TextInsertion,
-    TrackedChanges,
-)
-from .variable import (
-    UserDefined,
-    UserFieldDecl,
-    UserFieldDecls,
-    UserFieldGet,
-    UserFieldInput,
-    VarChapter,
-    VarCreationDate,
-    VarCreationTime,
-    VarDate,
-    VarDecl,
-    VarDecls,
-    VarDescription,
-    VarFileName,
-    VarGet,
-    VarInitialCreator,
-    VarKeywords,
-    VarPageCount,
-    VarPageNumber,
-    VarSet,
-    VarSubject,
-    VarTime,
-    VarTitle,
-)
-from .version import __version__
-from .xmlpart import XmlPart
-
-
-
-

Sub-modules

-
-
odfdo.bookmark
-
-

Bookmark class for "text:bookmark".

-
-
odfdo.cell
-
-

Table class for "table:table" and HeaderRows, Cell, Row, Column, -NamedRange related classes.

-
-
odfdo.const
-
-

Constants, XML tags and ODF headers.

-
-
odfdo.container
-
-

Container class, ODF file management.

-
-
odfdo.content
-
-

Content class for content.xml part.

-
-
odfdo.datatype
-
-

Data types (Boolean, Date, DateTime, Duration, Unit).

-
-
odfdo.document
-
-

Document class, root of the ODF document.

-
-
odfdo.draw_page
-
-

DrawPage class for "draw:page".

-
-
odfdo.element
-
-

Element, super class of all ODF classes.

-
-
odfdo.element_typed
-
-

ElmentTyped subclass of Element.

-
-
odfdo.frame
-
-

Frame class for "draw:frame".

-
-
odfdo.header
-
-

Header class for "text:h".

-
-
odfdo.header_rows
-
-

Table class for HeaderRows.

-
-
odfdo.image
-
-

DrawImage class for "draw:image".

-
-
odfdo.link
-
-

Link class for "text:a".

-
-
odfdo.list
-
-

List class for "text:list".

-
-
odfdo.manifest
-
-

Manifest class for manifest.xml part.

-
-
odfdo.meta
-
-

Meta class for meta.xml part.

-
-
odfdo.note
-
-

Note class for "text:note" and Annotation class for "office:annotation".

-
-
odfdo.paragraph
-
-

Paragraph class for "text:p", Span class for "text:span".

-
-
odfdo.paragraph_base
-
-

Base class ParagraphBase and Spacer "text:s", Tab "text:tab", LineBreak -"text:line-break".

-
-
odfdo.reference
-
-

Reference related classes for "text:reference-…" tags.

-
-
odfdo.row
-
-

Table class for "table:table" and HeaderRows, Cell, Row, Column, -NamedRange related classes.

-
-
odfdo.scripts
-
-
-
-
odfdo.scriptutils
-
-

Utilities shared by the scripts.

-
-
odfdo.section
-
-

Section class for "text:section".

-
-
odfdo.shapes
-
-

Drawing classes ShapeBase, LineShape, RectangleShape, EllipseShape, -ConnectorShape and DrawGroup.

-
-
odfdo.smil
-
-

Classes for ODF implementation of SMIL (Synchronized Multimedia -Integration Language).

-
-
odfdo.style
-
-

Style class for various style tags and BackgroundImage class.

-
-
odfdo.styles
-
-

Styles class for styles.xml part.

-
-
odfdo.table
-
-

Table class for "table:table" and HeaderRows, Cell, Row, Column, -NamedRange related classes.

-
-
odfdo.templates
-
-
-
-
odfdo.toc
-
-

TOC class for "text:table-of-content" and IndexTitle, TabStopStyle, -IndexTitleTemplate, TocEntryTemplate related classes.

-
-
odfdo.tracked_changes
-
-

TrackedChanges class for "text:tracked-changes" and related classes -(ChangeInfo, TextInsertion, TextChange…).

-
-
odfdo.utils
-
-
-
-
odfdo.variable
-
-

User fields and variable fields classes.

-
-
odfdo.version
-
-

Version number of the package.

-
-
odfdo.xmlpart
-
-

XmlPart base class for XML parts.

-
-
-
-
-
-
-

Functions

-
-
-def PageBreak() ‑> Paragraph -
-
-

Return an empty paragraph with a manual page break.

-

Using this function requires to register the page break style with: -document.add_page_break_style()

-
- -Expand source code - -
def PageBreak() -> Paragraph:
-    """Return an empty paragraph with a manual page break.
-
-    Using this function requires to register the page break style with:
-        document.add_page_break_style()
-    """
-    return Paragraph("", style="odfdopagebreak")
-
-
-
-def create_table_cell_style(border: str | None = None, border_top: str | None = None, border_bottom: str | None = None, border_left: str | None = None, border_right: str | None = None, padding: str | None = None, padding_top: str | None = None, padding_bottom: str | None = None, padding_left: str | None = None, padding_right: str | None = None, background_color: str | tuple | None = None, shadow: str | None = None, color: str | tuple | None = None) ‑> Style -
-
-

Return a cell style.

-

The borders arguments must be some style attribute strings or None, see the -method 'make_table_cell_border_string' to generate them. -If the 'border' argument as the value 'default', the default style -"0.06pt solid #000000" is used for the 4 borders. -If any value is used for border, it is used for the 4 borders, else any of -the 4 borders can be specified by it's own string. If all the border, -border_top, border_bottom, … arguments are None, an empty border is used -(ODF value is fo:border="none").

-

Padding arguments are string specifying a length (e.g. "0.5mm")". If -'padding' is provided, it is used for the 4 sides, else any of -the 4 sides padding can be specified by it's own string. Default padding is -no padding.

-

Arguments

-

border – str, style string for borders on four sides

-

border_top – str, style string for top if no 'border' argument

-

border_bottom – str, style string for bottom if no 'border' argument

-

border_left – str, style string for left if no 'border' argument

-

border_right – str, style string for right if no 'border' argument

-

padding – str, style string for padding on four sides

-

padding_top – str, style string for top if no 'padding' argument

-

padding_bottom – str, style string for bottom if no 'padding' argument

-

padding_left – str, style string for left if no 'padding' argument

-

padding_right – str, style string for right if no 'padding' argument

-

background_color – str or rgb 3-tuple, str is 'black', 'grey', … or '#012345'

-

shadow – str, e.g. "#808080 0.176cm 0.176cm"

-

color – str or rgb 3-tuple, str is 'black', 'grey', … or '#012345'

-

Return : Style

-
- -Expand source code - -
def create_table_cell_style(
-    border: str | None = None,
-    border_top: str | None = None,
-    border_bottom: str | None = None,
-    border_left: str | None = None,
-    border_right: str | None = None,
-    padding: str | None = None,
-    padding_top: str | None = None,
-    padding_bottom: str | None = None,
-    padding_left: str | None = None,
-    padding_right: str | None = None,
-    background_color: str | tuple | None = None,
-    shadow: str | None = None,
-    color: str | tuple | None = None,
-) -> Style:
-    """Return a cell style.
-
-    The borders arguments must be some style attribute strings or None, see the
-    method 'make_table_cell_border_string' to generate them.
-    If the 'border' argument as the value 'default', the default style
-    "0.06pt solid #000000" is used for the 4 borders.
-    If any value is used for border, it is used for the 4 borders, else any of
-    the 4 borders can be specified by it's own string. If all the border,
-    border_top, border_bottom, ... arguments are None, an empty border is used
-    (ODF value is fo:border="none").
-
-    Padding arguments are string specifying a length (e.g. "0.5mm")". If
-    'padding' is provided, it is used for the 4 sides, else any of
-    the 4 sides padding can be specified by it's own string. Default padding is
-    no padding.
-
-    Arguments:
-
-        border -- str, style string for borders on four sides
-
-        border_top -- str, style string for top if no 'border' argument
-
-        border_bottom -- str, style string for bottom if no 'border' argument
-
-        border_left -- str, style string for left if no 'border' argument
-
-        border_right -- str, style string for right if no 'border' argument
-
-        padding -- str, style string for padding on four sides
-
-        padding_top -- str, style string for top if no 'padding' argument
-
-        padding_bottom -- str, style string for bottom if no 'padding' argument
-
-        padding_left -- str, style string for left if no 'padding' argument
-
-        padding_right -- str, style string for right if no 'padding' argument
-
-        background_color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
-
-        shadow -- str, e.g. "#808080 0.176cm 0.176cm"
-
-        color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
-
-    Return : Style
-    """
-    if border == "default":
-        border = make_table_cell_border_string()  # default border
-    if border is not None:
-        # use the border value for 4 sides.
-        border_bottom = border_top = border_left = border_right = None
-    if (
-        border is None
-        and border_bottom is None
-        and border_top is None
-        and border_left is None
-        and border_right is None
-    ):
-        border = "none"
-    if padding is not None:
-        # use the padding value for 4 sides.
-        padding_bottom = padding_top = padding_left = padding_right = None
-    if color:
-        color_string = _make_color_string(color)
-    if background_color:
-        bgcolor_string = _make_color_string(background_color)
-    else:
-        bgcolor_string = None
-    cell_style = Style(
-        "table-cell",
-        area="table-cell",
-        border=border,
-        border_top=border_top,
-        border_bottom=border_bottom,
-        border_left=border_left,
-        border_right=border_right,
-        padding=padding,
-        padding_top=padding_top,
-        padding_bottom=padding_bottom,
-        padding_left=padding_left,
-        padding_right=padding_right,
-        background_color=bgcolor_string,
-        shadow=shadow,
-    )
-    if color:
-        cell_style.set_properties(area="text", color=color_string)
-    return cell_style
-
-
-
-def default_boolean_style() ‑> Element -
-
-
-
- -Expand source code - -
def default_boolean_style() -> Element:
-    return Element.from_tag(
-        """<number:boolean-style style:name="lpod-default-boolean-style">
-           <number:boolean/>
-           </number:boolean-style>"""
-    )
-
-
-
-def default_currency_style() ‑> Element -
-
-
-
- -Expand source code - -
def default_currency_style() -> Element:
-    return Element.from_tag(
-        """<number:currency-style style:name="lpod-default-currency-style">
-            <number:text>-</number:text>
-            <number:number number:decimal-places="2"
-             number:min-integer-digits="1"
-             number:grouping="true"/>
-            <number:text> </number:text>
-            <number:currency-symbol
-             number:language="fr"
-             number:country="FR">€</number:currency-symbol>
-           </number:currency-style>"""
-    )
-
-
-
-def default_date_style() ‑> Element -
-
-
-
- -Expand source code - -
def default_date_style() -> Element:
-    return Element.from_tag(
-        """
-           <number:date-style style:name="lpod-default-date-style">
-           <number:year number:style="long"/>
-           <number:text>-</number:text>
-           <number:month number:style="long"/>
-           <number:text>-</number:text>
-           <number:day number:style="long"/>
-           </number:date-style>"""
-    )
-
-
-
-def default_frame_position_style(name: str = 'FramePosition', horizontal_pos: str = 'from-left', vertical_pos: str = 'from-top', horizontal_rel: str = 'paragraph', vertical_rel: str = 'paragraph') ‑> Style -
-
-

Helper style for positioning frames in desktop applications that need -it.

-

Default arguments should be enough.

-

Use the returned Style as the frame style or build a new graphic style -with this style as the parent.

-
- -Expand source code - -
def default_frame_position_style(
-    name: str = "FramePosition",
-    horizontal_pos: str = "from-left",
-    vertical_pos: str = "from-top",
-    horizontal_rel: str = "paragraph",
-    vertical_rel: str = "paragraph",
-) -> Style:
-    """Helper style for positioning frames in desktop applications that need
-    it.
-
-    Default arguments should be enough.
-
-    Use the returned Style as the frame style or build a new graphic style
-    with this style as the parent.
-    """
-    return Style(
-        family="graphic",
-        name=name,
-        horizontal_pos=horizontal_pos,
-        horizontal_rel=horizontal_rel,
-        vertical_pos=vertical_pos,
-        vertical_rel=vertical_rel,
-    )
-
-
-
-def default_number_style() ‑> Element -
-
-
-
- -Expand source code - -
def default_number_style() -> Element:
-    return Element.from_tag(
-        """<number:number-style style:name="lpod-default-number-style">
-           <number:number number:decimal-places="2"
-            number:min-integer-digits="1"/>
-           </number:number-style>"""
-    )
-
-
-
-def default_percentage_style() ‑> Element -
-
-
-
- -Expand source code - -
def default_percentage_style() -> Element:
-    return Element.from_tag(
-        """<number:percentage-style
-            style:name="lpod-default-percentage-style">
-           <number:number number:decimal-places="2"
-            number:min-integer-digits="1"/>
-           <number:text>%</number:text>
-           </number:percentage-style>"""
-    )
-
-
-
-def default_time_style() ‑> Element -
-
-
-
- -Expand source code - -
def default_time_style() -> Element:
-    return Element.from_tag(
-        """<number:time-style style:name="lpod-default-time-style">
-           <number:hours number:style="long"/>
-           <number:text>:</number:text>
-           <number:minutes number:style="long"/>
-           <number:text>:</number:text>
-           <number:seconds number:style="long"/>
-           </number:time-style>"""
-    )
-
-
-
-def default_toc_level_style(level: int) ‑> Style -
-
-

Generate an automatic default style for the given TOC level.

-
- -Expand source code - -
def default_toc_level_style(level: int) -> Style:
-    """Generate an automatic default style for the given TOC level."""
-    tab_stop = TabStopStyle(style_type="right", leader_style="dotted", leader_text=".")
-    position = 17.5 - (0.5 * level)
-    tab_stop.style_position = f"{position}cm"
-    tab_stops = Element.from_tag("style:tab-stops")
-    tab_stops.append(tab_stop)
-    properties = Element.from_tag("style:paragraph-properties")
-    properties.append(tab_stops)
-    toc_style_level = Style(
-        family="paragraph",
-        name=_toc_entry_style_name(level),
-        parent=f"Contents_20_{level}",
-    )
-    toc_style_level.append(properties)
-    return toc_style_level
-
-
-
-def hex2rgb(color: str) ‑> tuple[int, int, int] -
-
-

Turns a "#RRGGBB" hexadecimal color representation into a (R, G, B) -tuple.

-

Arguments

-

color – str

-

Return: tuple

-
- -Expand source code - -
def hex2rgb(color: str) -> tuple[int, int, int]:
-    """Turns a "#RRGGBB" hexadecimal color representation into a (R, G, B)
-    tuple.
-    Arguments:
-
-        color -- str
-
-    Return: tuple
-    """
-    code = color[1:]
-    if not (len(color) == 7 and color[0] == "#" and code.isalnum()):
-        raise ValueError('"%s" is not a valid color' % color)
-    red = int(code[:2], 16)
-    green = int(code[2:4], 16)
-    blue = int(code[4:6], 16)
-    return (red, green, blue)
-
-
-
-def make_table_cell_border_string(thick: str | float | int | None = None, line: str | None = None, color: str | tuple | None = None) ‑> str -
-
-

Returns a string for style:table-cell-properties fo:border, -with default : "0.06pt solid #000000"

-
thick -- str or float or int
-line -- str
-color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
-
-

Returns : str

-
- -Expand source code - -
def make_table_cell_border_string(
-    thick: str | float | int | None = None,
-    line: str | None = None,
-    color: str | tuple | None = None,
-) -> str:
-    """Returns a string for style:table-cell-properties fo:border,
-    with default : "0.06pt solid #000000"
-
-        thick -- str or float or int
-        line -- str
-        color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
-
-    Returns : str
-    """
-    thick_string = _make_thick_string(thick)
-    line_string = _make_line_string(line)
-    color_string = _make_color_string(color)
-    return " ".join((thick_string, line_string, color_string))
-
-
-
-def rgb2hex(color: str | tuple[int, int, int]) ‑> str -
-
-

Turns a color name or a (R, G, B) color tuple into a "#RRGGBB" -hexadecimal representation.

-

Arguments

-

color – str or tuple

-

Return: str

-

Examples::

-
>>> rgb2hex('yellow')
-'#FFFF00'
->>> rgb2hex((238, 130, 238))
-'#EE82EE'
-
-
- -Expand source code - -
def rgb2hex(color: str | tuple[int, int, int]) -> str:
-    """Turns a color name or a (R, G, B) color tuple into a "#RRGGBB"
-    hexadecimal representation.
-    Arguments:
-
-        color -- str or tuple
-
-    Return: str
-
-    Examples::
-
-        >>> rgb2hex('yellow')
-        '#FFFF00'
-        >>> rgb2hex((238, 130, 238))
-        '#EE82EE'
-    """
-    if isinstance(color, str):
-        try:
-            code = CSS3_COLORMAP[color.lower()]
-        except KeyError as e:
-            raise KeyError(f'Color "{color}" is unknown') from e
-    elif isinstance(color, tuple):
-        if len(color) != 3:
-            raise ValueError("Color must be a 3-tuple")
-        code = color
-    else:
-        raise TypeError("Invalid color")
-    for channel in code:
-        if channel < 0 or channel > 255:
-            raise ValueError("Color code must be between 0 and 255")
-    return f"#{code[0]:02X}{code[1]:02X}{code[2]:02X}"
-
-
-
-
-
-

Classes

-
-
-class AnimPar -(presentation_node_type: str | None = None, smil_begin: str | None = None, **kwargs: Any) -
-
-

A container for SMIL Presentation Animations.

-

Arguments

-

presentation_node_type – default, on-click, with-previous, -after-previous, timing-root, main-sequence -and interactive-sequence

-

smil_begin – indefinite, 10s, [id].click, [id].begin

-
- -Expand source code - -
class AnimPar(Element):
-    """A container for SMIL Presentation Animations.
-
-    Arguments:
-
-        presentation_node_type -- default, on-click, with-previous,
-                                  after-previous, timing-root, main-sequence
-                                  and interactive-sequence
-
-        smil_begin -- indefinite, 10s, [id].click, [id].begin
-    """
-
-    _tag = "anim:par"
-    _properties = (
-        PropDef("presentation_node_type", "presentation:node-type"),
-        PropDef("smil_begin", "smil:begin"),
-    )
-
-    def __init__(
-        self,
-        presentation_node_type: str | None = None,
-        smil_begin: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if presentation_node_type:
-                self.presentation_node_type = presentation_node_type
-            if smil_begin:
-                self.smil_begin = smil_begin
-
-

Ancestors

- -

Instance variables

-
-
var presentation_node_type : str | bool | None
-
-

Get/set the attribute presentation:node-type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var smil_begin : str | bool | None
-
-

Get/set the attribute smil:begin

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class AnimSeq -(presentation_node_type: str | None = None, **kwargs: Any) -
-
-

TA container for SMIL Presentation Animations. Animations -inside this block are executed after the slide has executed its initial -transition.

-

Arguments

-

presentation_node_type – default, on-click, with-previous, -after-previous, timing-root, main-sequence -and interactive-sequence

-
- -Expand source code - -
class AnimSeq(Element):
-    """TA container for SMIL Presentation Animations. Animations
-    inside this block are executed after the slide has executed its initial
-    transition.
-
-    Arguments:
-
-        presentation_node_type -- default, on-click, with-previous,
-                                  after-previous, timing-root, main-sequence
-                                  and interactive-sequence
-    """
-
-    _tag = "anim:seq"
-    _properties = (PropDef("presentation_node_type", "presentation:node-type"),)
-
-    def __init__(
-        self,
-        presentation_node_type: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init and presentation_node_type:
-            self.presentation_node_type = presentation_node_type
-
-

Ancestors

- -

Instance variables

-
-
var presentation_node_type : str | bool | None
-
-

Get/set the attribute presentation:node-type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class AnimTransFilter -(smil_dur: str | None = None, smil_type: str | None = None, smil_subtype: str | None = None, smil_direction: str | None = None, smil_fadeColor: str | None = None, smil_mode: str | None = None, **kwargs: Any) -
-
-

Class to make a beautiful transition between two frames.

-

Arguments

-

smil_dur – XXX complete me

-

smil_type and smil_subtype – see http://www.w3.org/TR/SMIL20/ -smil-transitions.html#TransitionEffects-Appendix -to get a list of all types/subtypes

-

smil_direction – forward, reverse

-

smil_fadeColor – forward, reverse

-

smil_mode – in, out

-
- -Expand source code - -
class AnimTransFilter(Element):
-    """
-    Class to make a beautiful transition between two frames.
-
-    Arguments:
-      smil_dur -- XXX complete me
-
-      smil_type and smil_subtype -- see http://www.w3.org/TR/SMIL20/
-                    smil-transitions.html#TransitionEffects-Appendix
-                                    to get a list of all types/subtypes
-
-      smil_direction -- forward, reverse
-
-      smil_fadeColor -- forward, reverse
-
-      smil_mode -- in, out
-    """
-
-    _tag = "anim:transitionFilter"
-    _properties = (
-        PropDef("smil_dur", "smil:dur"),
-        PropDef("smil_type", "smil:type"),
-        PropDef("smil_subtype", "smil:subtype"),
-        PropDef("smil_direction", "smil:direction"),
-        PropDef("smil_fadeColor", "smil:fadeColor"),
-        PropDef("smil_mode", "smil:mode"),
-    )
-
-    def __init__(
-        self,
-        smil_dur: str | None = None,
-        smil_type: str | None = None,
-        smil_subtype: str | None = None,
-        smil_direction: str | None = None,
-        smil_fadeColor: str | None = None,
-        smil_mode: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if smil_dur:
-                self.smil_dur = smil_dur
-            if smil_type:
-                self.smil_type = smil_type
-            if smil_subtype:
-                self.smil_subtype = smil_subtype
-            if smil_direction:
-                self.smil_direction = smil_direction
-            if smil_fadeColor:
-                self.smil_fadeColor = smil_fadeColor
-            if smil_mode:
-                self.smil_mode = smil_mode
-
-

Ancestors

- -

Instance variables

-
-
var smil_direction : str | bool | None
-
-

Get/set the attribute smil:direction

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var smil_dur : str | bool | None
-
-

Get/set the attribute smil:dur

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var smil_fadeColor : str | bool | None
-
-

Get/set the attribute smil:fadeColor

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var smil_mode : str | bool | None
-
-

Get/set the attribute smil:mode

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var smil_subtype : str | bool | None
-
-

Get/set the attribute smil:subtype

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var smil_type : str | bool | None
-
-

Get/set the attribute smil:type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class Annotation -(text_or_element: Element | str | None = None, creator: str | None = None, date: datetime | None = None, name: str | None = None, parent: Element | None = None, **kwargs: Any) -
-
-

Annotation element credited to the given creator with the -given text, optionally dated (current date by default). -If name not provided and some parent is provided, the name is -autogenerated.

-

Arguments

-

text – str or odf_element

-

creator – str

-

date – datetime

-

name – str

-

parent – Element

-
- -Expand source code - -
class Annotation(Element):
-    """Annotation element credited to the given creator with the
-    given text, optionally dated (current date by default).
-    If name not provided and some parent is provided, the name is
-    autogenerated.
-
-    Arguments:
-
-        text -- str or odf_element
-
-        creator -- str
-
-        date -- datetime
-
-        name -- str
-
-        parent -- Element
-    """
-
-    _tag = "office:annotation"
-    _properties = (
-        PropDef("name", "office:name"),
-        PropDef("note_id", "text:id"),
-    )
-
-    def __init__(
-        self,
-        text_or_element: Element | str | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-        name: str | None = None,
-        parent: Element | None = None,
-        **kwargs: Any,
-    ) -> None:
-        # fixme : use offset
-        # TODO allow paragraph and text styles
-        super().__init__(**kwargs)
-
-        if self._do_init:
-            self.note_body = text_or_element  # type:ignore
-            if creator:
-                self.dc_creator = creator
-            if date is None:
-                date = datetime.now()
-            self.dc_date = date
-            if not name:
-                name = get_unique_office_name(parent)
-                self.name = name
-
-    @property
-    def note_body(self) -> str:
-        return self.text_content
-
-    @note_body.setter
-    def note_body(self, text_or_element: Element | str | None) -> None:
-        if text_or_element is None:
-            self.text_content = ""
-        elif isinstance(text_or_element, str):
-            self.text_content = text_or_element
-        elif isinstance(text_or_element, Element):
-            self.clear()
-            self.append(text_or_element)
-        else:
-            raise TypeError(f'Unexpected type for body: "{type(text_or_element)}"')
-
-    @property
-    def start(self) -> Element:
-        """Return self."""
-        return self
-
-    @property
-    def end(self) -> Element | None:
-        """Return the corresponding annotation-end tag or None."""
-        name = self.name
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can't find end tag: no parent available")
-        body = self.document_body
-        if not body:
-            body = parent
-        return body.get_annotation_end(name=name)
-
-    def get_annotated(
-        self,
-        as_text: bool = False,
-        no_header: bool = True,
-        clean: bool = True,
-    ) -> Element | list | str | None:
-        """Returns the annotated content from an annotation.
-
-        If no content exists (single position annotation or annotation-end not
-        found), returns [] (or u'' if text flag is True).
-        If as_text is True: returns the text content.
-        If clean is True: suppress unwanted tags (deletions marks, ...)
-        If no_header is True: existing text:h are changed in text:p
-        By default: returns a list of odf_element, cleaned and without headers.
-
-        Arguments:
-
-            as_text -- boolean
-
-            clean -- boolean
-
-            no_header -- boolean
-
-        Return: list or Element or text or None
-        """
-        end = self.end
-        if end is None:
-            if as_text:
-                return ""
-            return None
-        body = self.document_body
-        if not body:
-            body = self.root
-        return body.get_between(
-            self, end, as_text=as_text, no_header=no_header, clean=clean
-        )
-
-    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-        """Delete the given element from the XML tree. If no element is given,
-        "self" is deleted. The XML library may allow to continue to use an
-        element now "orphan" as long as you have a reference to it.
-
-        For Annotation : delete the annotation-end tag if exists.
-
-        Arguments:
-
-            child -- Element or None
-        """
-        if child is not None:  # act like normal delete
-            super().delete(child)
-            return
-        end = self.end
-        if end:
-            end.delete()
-        # act like normal delete
-        super().delete()
-
-    def check_validity(self) -> None:
-        if not self.note_body:
-            raise ValueError("Annotation must have a body")
-        if not self.dc_creator:
-            raise ValueError("Annotation must have a creator")
-        if not self.dc_date:
-            self.dc_date = datetime.now()
-
-

Ancestors

- -

Instance variables

-
-
var endElement | None
-
-

Return the corresponding annotation-end tag or None.

-
- -Expand source code - -
@property
-def end(self) -> Element | None:
-    """Return the corresponding annotation-end tag or None."""
-    name = self.name
-    parent = self.parent
-    if parent is None:
-        raise ValueError("Can't find end tag: no parent available")
-    body = self.document_body
-    if not body:
-        body = parent
-    return body.get_annotation_end(name=name)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute office:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var note_body : str
-
-
-
- -Expand source code - -
@property
-def note_body(self) -> str:
-    return self.text_content
-
-
-
var note_id : str | bool | None
-
-

Get/set the attribute text:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var startElement
-
-

Return self.

-
- -Expand source code - -
@property
-def start(self) -> Element:
-    """Return self."""
-    return self
-
-
-
-

Methods

-
-
-def check_validity(self) ‑> None -
-
-
-
- -Expand source code - -
def check_validity(self) -> None:
-    if not self.note_body:
-        raise ValueError("Annotation must have a body")
-    if not self.dc_creator:
-        raise ValueError("Annotation must have a creator")
-    if not self.dc_date:
-        self.dc_date = datetime.now()
-
-
-
-def delete(self, child: Element | None = None, keep_tail: bool = True) ‑> None -
-
-

Delete the given element from the XML tree. If no element is given, -"self" is deleted. The XML library may allow to continue to use an -element now "orphan" as long as you have a reference to it.

-

For Annotation : delete the annotation-end tag if exists.

-

Arguments

-

child – Element or None

-
- -Expand source code - -
def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-    """Delete the given element from the XML tree. If no element is given,
-    "self" is deleted. The XML library may allow to continue to use an
-    element now "orphan" as long as you have a reference to it.
-
-    For Annotation : delete the annotation-end tag if exists.
-
-    Arguments:
-
-        child -- Element or None
-    """
-    if child is not None:  # act like normal delete
-        super().delete(child)
-        return
-    end = self.end
-    if end:
-        end.delete()
-    # act like normal delete
-    super().delete()
-
-
-
-def get_annotated(self, as_text: bool = False, no_header: bool = True, clean: bool = True) ‑> Element | odfdo.list | str | None -
-
-

Returns the annotated content from an annotation.

-

If no content exists (single position annotation or annotation-end not -found), returns [] (or u'' if text flag is True). -If as_text is True: returns the text content. -If clean is True: suppress unwanted tags (deletions marks, …) -If no_header is True: existing text:h are changed in text:p -By default: returns a list of odf_element, cleaned and without headers.

-

Arguments

-

as_text – boolean

-

clean – boolean

-

no_header – boolean

-

Return: list or Element or text or None

-
- -Expand source code - -
def get_annotated(
-    self,
-    as_text: bool = False,
-    no_header: bool = True,
-    clean: bool = True,
-) -> Element | list | str | None:
-    """Returns the annotated content from an annotation.
-
-    If no content exists (single position annotation or annotation-end not
-    found), returns [] (or u'' if text flag is True).
-    If as_text is True: returns the text content.
-    If clean is True: suppress unwanted tags (deletions marks, ...)
-    If no_header is True: existing text:h are changed in text:p
-    By default: returns a list of odf_element, cleaned and without headers.
-
-    Arguments:
-
-        as_text -- boolean
-
-        clean -- boolean
-
-        no_header -- boolean
-
-    Return: list or Element or text or None
-    """
-    end = self.end
-    if end is None:
-        if as_text:
-            return ""
-        return None
-    body = self.document_body
-    if not body:
-        body = self.root
-    return body.get_between(
-        self, end, as_text=as_text, no_header=no_header, clean=clean
-    )
-
-
-
-

Inherited members

- -
-
-class AnnotationEnd -(annotation: Element | None = None, name: str | None = None, **kwargs: Any) -
-
-

AnnotationEnd: the "office:annotation-end" element may be used to -define the end of a text range of document content that spans element -boundaries. In that case, an "office:annotation" element shall precede -the "office:annotation-end" element. Both elements shall have the same -value for their office:name attribute. The "office:annotation-end" element -shall be preceded by an "office:annotation" element that has the same -value for its office:name attribute as the "office:annotation-end" -element. An "office:annotation-end" element without a preceding -"office:annotation" element that has the same name assigned is ignored.

-

Initialize an AnnotationEnd element. Either annotation or name must be -provided to have proper reference for the annotation-end.

-

Arguments

-

annotation – odf_annotation element

-

name – str

-
- -Expand source code - -
class AnnotationEnd(Element):
-    """AnnotationEnd: the "office:annotation-end" element may be used to
-    define the end of a text range of document content that spans element
-    boundaries. In that case, an "office:annotation" element shall precede
-    the "office:annotation-end" element. Both elements shall have the same
-    value for their office:name attribute. The "office:annotation-end" element
-    shall be preceded by an "office:annotation" element that has the same
-    value for its office:name attribute as the "office:annotation-end"
-    element. An "office:annotation-end" element without a preceding
-    "office:annotation" element that has the same name assigned is ignored.
-    """
-
-    _tag = "office:annotation-end"
-    _properties = (PropDef("name", "office:name"),)
-
-    def __init__(
-        self,
-        annotation: Element | None = None,
-        name: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Initialize an AnnotationEnd element. Either annotation or name must be
-        provided to have proper reference for the annotation-end.
-
-        Arguments:
-
-            annotation -- odf_annotation element
-
-            name -- str
-        """
-        # fixme : use offset
-        # TODO allow paragraph and text styles
-        super().__init__(**kwargs)
-        if self._do_init:
-            if annotation:
-                name = annotation.name  # type: ignore
-            if not name:
-                raise ValueError("Annotation-end must have a name")
-            self.name = name
-
-    @property
-    def start(self) -> Element | None:
-        """Return the corresponding annotation starting tag or None."""
-        name = self.name
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can't find start tag: no parent available")
-        body = self.document_body
-        if not body:
-            body = parent
-        return body.get_annotation(name=name)
-
-    @property
-    def end(self) -> Element:
-        """Return self."""
-        return self
-
-

Ancestors

- -

Instance variables

-
-
var endElement
-
-

Return self.

-
- -Expand source code - -
@property
-def end(self) -> Element:
-    """Return self."""
-    return self
-
-
-
var name : str | bool | None
-
-

Get/set the attribute office:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var startElement | None
-
-

Return the corresponding annotation starting tag or None.

-
- -Expand source code - -
@property
-def start(self) -> Element | None:
-    """Return the corresponding annotation starting tag or None."""
-    name = self.name
-    parent = self.parent
-    if parent is None:
-        raise ValueError("Can't find start tag: no parent available")
-    body = self.document_body
-    if not body:
-        body = parent
-    return body.get_annotation(name=name)
-
-
-
-

Inherited members

- -
-
-class BackgroundImage -(name: str | None = None, display_name: str | None = None, position: str | None = None, repeat: str | None = None, opacity: str | None = None, filter: str | None = None, **kwargs: Any) -
-
-

Style class for all these tags:

-

'style:style' -'number:date-style', -'number:number-style', -'number:percentage-style', -'number:time-style' -'style:font-face', -'style:master-page', -'style:page-layout', -'style:presentation-page-layout', -'text:list-style', -'text:outline-style', -'style:tab-stops', -…

-

Create a style of the given family. The name is not mandatory at this -point but will become required when inserting in a document as a common -style.

-

The display name is the name the user sees in an office application.

-

The parent_style is the name of the style this style will inherit from.

-

To set properties, pass them as keyword arguments. The area properties -apply to is optional and defaults to the family.

-

Arguments

-

family – 'paragraph', 'text', 'section', 'table', 'table-column', -'table-row', 'table-cell', 'table-page', 'chart', -'drawing-page', 'graphic', 'presentation', -'control', 'ruby', 'list', 'number', 'page-layout' -'font-face', or 'master-page'

-

name – str

-

display_name – str

-

parent_style – str

-

area – str

-

'text' Properties:

-
italic -- bool
-
-bold -- bool
-
-

'paragraph' Properties:

-
master_page -- str
-
-

'master-page' Properties:

-
page_layout -- str
-
-next_style -- str
-
-

'table-cell' Properties:

-
border, border_top, border_right, border_bottom, border_left -- str,
-e.g. "0.002cm solid #000000" or 'none'
-
-padding, padding_top, padding_right, padding_bottom, padding_left -- str,
-e.g. "0.002cm" or 'none'
-
-shadow -- str, e.g. "#808080 0.176cm 0.176cm"
-
-

'table-row' Properties:

-
height -- str, e.g. '5cm'
-
-use_optimal_height -- bool
-
-

'table-column' Properties:

-
width -- str, e.g. '5cm'
-
-break_before -- 'page', 'column' or 'auto'
-
-break_after -- 'page', 'column' or 'auto'
-
-
- -Expand source code - -
class BackgroundImage(Style, DrawImage):
-    _tag = "style:background-image"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("name", "style:name"),
-        PropDef("display_name", "style:display-name"),
-        PropDef("svg_font_family", "svg:font-family"),
-        PropDef("font_family_generic", "style:font-family-generic"),
-        PropDef("font_pitch", "style:font-pitch"),
-        PropDef("position", "style:position", "background-image"),
-        PropDef("repeat", "style:repeat", "background-image"),
-        PropDef("opacity", "draw:opacity", "background-image"),
-        PropDef("filter", "style:filter-name", "background-image"),
-        PropDef("text_style", "text:style-name"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        display_name: str | None = None,
-        position: str | None = None,
-        repeat: str | None = None,
-        opacity: str | None = None,
-        filter: str | None = None,  # noqa: A002
-        # Every other property
-        **kwargs: Any,
-    ):
-        kwargs["family"] = "background-image"
-        super().__init__(**kwargs)
-        if self._do_init:
-            kwargs.pop("tag", None)
-            kwargs.pop("tag_or_elem", None)
-            self.family = "background-image"
-            if name:
-                self.name = name
-            if display_name:
-                self.display_name = display_name
-            if position:
-                self.position = position
-            if repeat:
-                self.position = repeat
-            if opacity:
-                self.position = opacity
-            if filter:
-                self.position = filter
-            # Every other properties
-            for prop in BackgroundImage._properties:
-                if prop.name in kwargs:
-                    self.set_style_attribute(prop.attr, kwargs[prop.name])
-
-

Ancestors

- -

Instance variables

-
-
var filter : str | bool | None
-
-

Get/set the attribute style:filter-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var opacity : str | bool | None
-
-

Get/set the attribute draw:opacity

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var position : str | bool | None
-
-

Get/set the attribute style:position

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var repeat : str | bool | None
-
-

Get/set the attribute style:repeat

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class Bookmark -(name: str = '', **kwargs: Any) -
-
-

Bookmark class for ODF "text:bookmark"

-

Arguments

-

name – str

-
- -Expand source code - -
class Bookmark(Element):
-    """
-    Bookmark class for ODF "text:bookmark"
-
-    Arguments:
-
-        name -- str
-    """
-
-    _tag = "text:bookmark"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class BookmarkEnd -(name: str = '', **kwargs: Any) -
-
-

BookmarkEnd class for ODF "text:bookmark-end"

-

Arguments

-

name – str

-
- -Expand source code - -
class BookmarkEnd(Element):
-    """
-    BookmarkEnd class for ODF "text:bookmark-end"
-
-    Arguments:
-
-        name -- str
-    """
-
-    _tag = "text:bookmark-end"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class BookmarkStart -(name: str = '', **kwargs: Any) -
-
-

BookmarkStart class for ODF "text:bookmark-start"

-

Arguments

-

name – str

-
- -Expand source code - -
class BookmarkStart(Element):
-    """
-    BookmarkStart class for ODF "text:bookmark-start"
-
-    Arguments:
-
-        name -- str
-    """
-
-    _tag = "text:bookmark-start"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class Cell -(value: Any = None, text: str | None = None, cell_type: str | None = None, currency: str | None = None, formula: str | None = None, repeated: int | None = None, style: str | None = None, **kwargs: Any) -
-
-

"table:table-cell" table cell element.

-

Create a cell element containing the given value. The textual -representation is automatically formatted but can be provided. Cell -type can be deduced as well, unless the number is a percentage or -currency. If cell type is "currency", the currency must be given. -The cell can be repeated on the given number of columns.

-

Arguments

-

value – bool, int, float, Decimal, date, datetime, str, -timedelta

-

text – str

-

cell_type – 'boolean', 'currency', 'date', 'float', 'percentage', -'string' or 'time'

-

currency – three-letter str

-

repeated – int

-

style – str

-
- -Expand source code - -
class Cell(ElementTyped):
-    """ "table:table-cell" table cell element."""
-
-    _tag = "table:table-cell"
-    _caching = True
-
-    def __init__(
-        self,
-        value: Any = None,
-        text: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        formula: str | None = None,
-        repeated: int | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a cell element containing the given value. The textual
-        representation is automatically formatted but can be provided. Cell
-        type can be deduced as well, unless the number is a percentage or
-        currency. If cell type is "currency", the currency must be given.
-        The cell can be repeated on the given number of columns.
-
-        Arguments:
-
-            value -- bool, int, float, Decimal, date, datetime, str,
-                     timedelta
-
-            text -- str
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                         'string' or 'time'
-
-            currency -- three-letter str
-
-            repeated -- int
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        self.x = None
-        self.y = None
-        if self._do_init:
-            self.set_value(
-                value,
-                text=text,
-                cell_type=cell_type,
-                currency=currency,
-                formula=formula,
-            )
-            if repeated and repeated > 1:
-                self.repeated = repeated
-            if style is not None:
-                self.style = style
-
-    @property
-    def clone(self) -> Cell:
-        clone = Element.clone.fget(self)  # type: ignore
-        clone.y = self.y
-        clone.x = self.x
-        if hasattr(self, "_tmap"):
-            if hasattr(self, "_rmap"):
-                clone._rmap = self._rmap[:]
-            clone._tmap = self._tmap[:]
-            clone._cmap = self._cmap[:]
-        return clone
-
-    @property
-    def value(
-        self,
-    ) -> str | bool | int | float | Decimal | date | datetime | timedelta | None:
-        """Set / get the value of the cell. The type is read from the
-        'office:value-type' attribute of the cell. When setting the value,
-        the type of the value will determine the new value_type of the cell.
-
-        Warning: use this method for boolean, float or string only.
-        """
-        value_type = self.get_attribute_string("office:value-type")
-        if value_type == "boolean":
-            return self.get_attribute("office:boolean-value")
-        if value_type in {"float", "percentage", "currency"}:
-            value_decimal = Decimal(str(self.get_attribute_string("office:value")))
-            # Return 3 instead of 3.0 if possible
-            if int(value_decimal) == value_decimal:
-                return int(value_decimal)
-            return value_decimal
-        if value_type == "date":
-            value_str = str(self.get_attribute_string("office:date-value"))
-            if "T" in value_str:
-                return DateTime.decode(value_str)
-            return Date.decode(value_str)
-        if value_type == "time":
-            return Duration.decode(str(self.get_attribute_string("office:time-value")))
-        if value_type == "string":
-            value = self.get_attribute_string("office:string-value")
-            if value is not None:
-                return value
-            value_list = []
-            for para in self.get_elements("text:p"):
-                value_list.append(para.text_recursive)
-            return "\n".join(value_list)
-        return None
-
-    @value.setter
-    def value(self, value: str | bytes | bool | int | float | Decimal | None) -> None:
-        self.clear()
-        if value is None:
-            return
-        if isinstance(value, (str, bytes)):
-            if isinstance(value, bytes):
-                value = bytes_to_str(value)
-            self.set_attribute("office:value-type", "string")
-            self.set_attribute("office:string-value", value)
-            self.text = value
-            return
-        if value is True or value is False:
-            self.set_attribute("office:value-type", "boolean")
-            value_bool = Boolean.encode(value)
-            self.set_attribute("office:boolean-value", value_bool)
-            self.text = value_bool
-            return
-        if isinstance(value, (int, float, Decimal)):
-            self.set_attribute("office:value-type", "float")
-            value_str = str(value)
-            self.set_attribute("office:value", value_str)
-            self.text = value_str
-            return
-        raise TypeError(f"Unknown value type, try with set_value() : {value!r}")
-
-    @property
-    def float(self) -> float:
-        """Set / get the value of the cell as a float (or 0.0)."""
-        for tag in ("office:value", "office:string-value", "office:boolean-value"):
-            read_attr = self.get_attribute(tag)
-            if isinstance(read_attr, str):
-                with contextlib.suppress(ValueError, TypeError):
-                    return float(read_attr)
-        return 0.0
-
-    @float.setter
-    def float(self, value: str | float | int | Decimal) -> None:
-        try:
-            value_float = float(value)
-        except (ValueError, TypeError):
-            value_float = 0.0
-        value_str = str(value_float)
-        self.clear()
-        self.set_attribute("office:value", value_str)
-        self.set_attribute("office:value-type", "float")
-        self.text = value_str
-
-    @property
-    def string(self) -> str:
-        """Set / get the value of the cell as a string (or '')."""
-        value = self.get_attribute_string("office:string-value")
-        if isinstance(value, str):
-            return value
-        return ""
-
-    @string.setter
-    def string(
-        self,
-        value: str | bytes | int | float | Decimal | bool | None,  # type: ignore
-    ) -> None:
-        self.clear()
-        if value is None:
-            value_str = ""
-        else:
-            value_str = str(value)
-        self.set_attribute("office:value-type", "string")
-        self.set_attribute("office:string-value", value_str)
-        self.text = value_str
-
-    def set_value(
-        self,
-        value: (
-            str  # type: ignore
-            | bytes
-            | float
-            | int
-            | Decimal
-            | bool
-            | datetime
-            | date
-            | timedelta
-            | None
-        ),
-        text: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        formula: str | None = None,
-    ) -> None:
-        """Set the cell state from the Python value type.
-
-        Text is how the cell is displayed. Cell type is guessed,
-        unless provided.
-
-        For monetary values, provide the name of the currency.
-
-        Arguments:
-
-            value -- Python type
-
-            text -- str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                        'currency' or 'percentage'
-
-            currency -- str
-        """
-        self.clear()
-        text = self.set_value_and_type(
-            value=value,
-            text=text,
-            value_type=cell_type,
-            currency=currency,
-        )
-        if text is not None:
-            self.text_content = text
-        if formula is not None:
-            self.formula = formula
-
-    @property
-    def type(self) -> str | None:
-        """Get / set the type of the cell: boolean, float, date, string
-        or time.
-
-        Return: str | None
-        """
-        return self.get_attribute_string("office:value-type")
-
-    @type.setter
-    def type(self, cell_type: str) -> None:
-        self.set_attribute("office:value-type", cell_type)
-
-    @property
-    def currency(self) -> str | None:
-        """Get / set the currency used for monetary values.
-
-        Return: str | None
-        """
-        return self.get_attribute_string("office:currency")
-
-    @currency.setter
-    def currency(self, currency: str) -> None:
-        self.set_attribute("office:currency", currency)
-
-    def _set_repeated(self, repeated: int | None) -> None:
-        """Internal only. Set the numnber of times the cell is repeated, or
-        None to delete. Without changing cache.
-        """
-        if repeated is None or repeated < 2:
-            with contextlib.suppress(KeyError):
-                self.del_attribute("table:number-columns-repeated")
-            return
-        self.set_attribute("table:number-columns-repeated", str(repeated))
-
-    @property
-    def repeated(self) -> int | None:
-        """Get / set the number of times the cell is repeated.
-
-        Always None when using the table API.
-
-        Return: int or None
-        """
-        repeated = self.get_attribute("table:number-columns-repeated")
-        if repeated is None:
-            return None
-        return int(repeated)
-
-    @repeated.setter
-    def repeated(self, repeated: int | None) -> None:
-        self._set_repeated(repeated)
-        # update cache
-        child: Element = self
-        while True:
-            # look for Row, parent may be group of rows
-            upper = child.parent
-            if not upper:
-                # lonely cell
-                return
-            # parent may be group of rows, not table
-            if isinstance(upper, Element) and upper._tag == "table:table-row":
-                break
-            child = upper
-        # fixme : need to optimize this
-        if isinstance(upper, Element) and upper._tag == "table:table-row":
-            upper._compute_row_cache()
-
-    @property
-    def style(self) -> str | None:
-        """Get / set the style of the cell itself.
-
-        Return: str | None
-        """
-        return self.get_attribute_string("table:style-name")
-
-    @style.setter
-    def style(self, style: str | Element) -> None:
-        self.set_style_attribute("table:style-name", style)
-
-    @property
-    def formula(self) -> str | None:
-        """Get / set the formula of the cell, or None if undefined.
-
-        The formula is not interpreted in any way.
-
-        Return: str | None
-        """
-        return self.get_attribute_string("table:formula")
-
-    @formula.setter
-    def formula(self, formula: str | None) -> None:
-        self.set_attribute("table:formula", formula)
-
-    def is_empty(self, aggressive: bool = False) -> bool:
-        if self.value is not None or self.children:
-            return False
-        if not aggressive and self.style is not None:
-            return False
-        return True
-
-    def _is_spanned(self) -> bool:
-        if self.tag == "table:covered-table-cell":
-            return True
-        if self.get_attribute("table:number-columns-spanned") is not None:
-            return True
-        if self.get_attribute("table:number-rows-spanned") is not None:
-            return True
-        return False
-
-

Ancestors

- -

Instance variables

-
-
var cloneCell
-
-
-
- -Expand source code - -
@property
-def clone(self) -> Cell:
-    clone = Element.clone.fget(self)  # type: ignore
-    clone.y = self.y
-    clone.x = self.x
-    if hasattr(self, "_tmap"):
-        if hasattr(self, "_rmap"):
-            clone._rmap = self._rmap[:]
-        clone._tmap = self._tmap[:]
-        clone._cmap = self._cmap[:]
-    return clone
-
-
-
var currency : str | None
-
-

Get / set the currency used for monetary values.

-

Return: str | None

-
- -Expand source code - -
@property
-def currency(self) -> str | None:
-    """Get / set the currency used for monetary values.
-
-    Return: str | None
-    """
-    return self.get_attribute_string("office:currency")
-
-
-
var float : float
-
-

Set / get the value of the cell as a float (or 0.0).

-
- -Expand source code - -
@property
-def float(self) -> float:
-    """Set / get the value of the cell as a float (or 0.0)."""
-    for tag in ("office:value", "office:string-value", "office:boolean-value"):
-        read_attr = self.get_attribute(tag)
-        if isinstance(read_attr, str):
-            with contextlib.suppress(ValueError, TypeError):
-                return float(read_attr)
-    return 0.0
-
-
-
var formula : str | None
-
-

Get / set the formula of the cell, or None if undefined.

-

The formula is not interpreted in any way.

-

Return: str | None

-
- -Expand source code - -
@property
-def formula(self) -> str | None:
-    """Get / set the formula of the cell, or None if undefined.
-
-    The formula is not interpreted in any way.
-
-    Return: str | None
-    """
-    return self.get_attribute_string("table:formula")
-
-
-
var repeated : int | None
-
-

Get / set the number of times the cell is repeated.

-

Always None when using the table API.

-

Return: int or None

-
- -Expand source code - -
@property
-def repeated(self) -> int | None:
-    """Get / set the number of times the cell is repeated.
-
-    Always None when using the table API.
-
-    Return: int or None
-    """
-    repeated = self.get_attribute("table:number-columns-repeated")
-    if repeated is None:
-        return None
-    return int(repeated)
-
-
-
var string : str
-
-

Set / get the value of the cell as a string (or '').

-
- -Expand source code - -
@property
-def string(self) -> str:
-    """Set / get the value of the cell as a string (or '')."""
-    value = self.get_attribute_string("office:string-value")
-    if isinstance(value, str):
-        return value
-    return ""
-
-
-
var style : str | None
-
-

Get / set the style of the cell itself.

-

Return: str | None

-
- -Expand source code - -
@property
-def style(self) -> str | None:
-    """Get / set the style of the cell itself.
-
-    Return: str | None
-    """
-    return self.get_attribute_string("table:style-name")
-
-
-
var type : str | None
-
-

Get / set the type of the cell: boolean, float, date, string -or time.

-

Return: str | None

-
- -Expand source code - -
@property
-def type(self) -> str | None:
-    """Get / set the type of the cell: boolean, float, date, string
-    or time.
-
-    Return: str | None
-    """
-    return self.get_attribute_string("office:value-type")
-
-
-
var value : str | bool | int | float | decimal.Decimal | datetime.date | datetime.datetime | datetime.timedelta | None
-
-

Set / get the value of the cell. The type is read from the -'office:value-type' attribute of the cell. When setting the value, -the type of the value will determine the new value_type of the cell.

-

Warning: use this method for boolean, float or string only.

-
- -Expand source code - -
@property
-def value(
-    self,
-) -> str | bool | int | float | Decimal | date | datetime | timedelta | None:
-    """Set / get the value of the cell. The type is read from the
-    'office:value-type' attribute of the cell. When setting the value,
-    the type of the value will determine the new value_type of the cell.
-
-    Warning: use this method for boolean, float or string only.
-    """
-    value_type = self.get_attribute_string("office:value-type")
-    if value_type == "boolean":
-        return self.get_attribute("office:boolean-value")
-    if value_type in {"float", "percentage", "currency"}:
-        value_decimal = Decimal(str(self.get_attribute_string("office:value")))
-        # Return 3 instead of 3.0 if possible
-        if int(value_decimal) == value_decimal:
-            return int(value_decimal)
-        return value_decimal
-    if value_type == "date":
-        value_str = str(self.get_attribute_string("office:date-value"))
-        if "T" in value_str:
-            return DateTime.decode(value_str)
-        return Date.decode(value_str)
-    if value_type == "time":
-        return Duration.decode(str(self.get_attribute_string("office:time-value")))
-    if value_type == "string":
-        value = self.get_attribute_string("office:string-value")
-        if value is not None:
-            return value
-        value_list = []
-        for para in self.get_elements("text:p"):
-            value_list.append(para.text_recursive)
-        return "\n".join(value_list)
-    return None
-
-
-
-

Methods

-
-
-def set_value(self, value: str | bytes | float | int | Decimal | bool | datetime | date | timedelta | None, text: str | None = None, cell_type: str | None = None, currency: str | None = None, formula: str | None = None) ‑> None -
-
-

Set the cell state from the Python value type.

-

Text is how the cell is displayed. Cell type is guessed, -unless provided.

-

For monetary values, provide the name of the currency.

-

Arguments

-

value – Python type

-

text – str

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency' or 'percentage'

-

currency – str

-
- -Expand source code - -
def set_value(
-    self,
-    value: (
-        str  # type: ignore
-        | bytes
-        | float
-        | int
-        | Decimal
-        | bool
-        | datetime
-        | date
-        | timedelta
-        | None
-    ),
-    text: str | None = None,
-    cell_type: str | None = None,
-    currency: str | None = None,
-    formula: str | None = None,
-) -> None:
-    """Set the cell state from the Python value type.
-
-    Text is how the cell is displayed. Cell type is guessed,
-    unless provided.
-
-    For monetary values, provide the name of the currency.
-
-    Arguments:
-
-        value -- Python type
-
-        text -- str
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                    'currency' or 'percentage'
-
-        currency -- str
-    """
-    self.clear()
-    text = self.set_value_and_type(
-        value=value,
-        text=text,
-        value_type=cell_type,
-        currency=currency,
-    )
-    if text is not None:
-        self.text_content = text
-    if formula is not None:
-        self.formula = formula
-
-
-
-

Inherited members

- -
-
-class ChangeInfo -(creator: str | None = None, date: datetime | None = None, **kwargs: Any) -
-
-

The "office:change-info" element represents who made a change and when. -It may also contain a comment (one or more Paragrah "text:p" elements) -on the change.

-

The comments available in the ChangeInfo are available through: -- get_paragraphs and get_paragraph methods for actual Paragraph. -- get_comments for a plain text version

-

Arguments:

-
 creator -- str (or None)
-
- date -- datetime (or None)
-
-
- -Expand source code - -
class ChangeInfo(Element):
-    """The "office:change-info" element represents who made a change and when.
-    It may also contain a comment (one or more Paragrah "text:p" elements)
-    on the change.
-
-    The comments available in the ChangeInfo are available through:
-      - get_paragraphs and get_paragraph methods for actual Paragraph.
-      - get_comments for a plain text version
-
-      Arguments:
-
-         creator -- str (or None)
-
-         date -- datetime (or None)
-    """
-
-    _tag = "office:change-info"
-
-    def __init__(
-        self,
-        creator: str | None = None,
-        date: datetime | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.set_dc_creator(creator)
-            self.set_dc_date(date)
-
-    def set_dc_creator(self, creator: str | None = None) -> None:
-        """Set the creator of the change. Default for creator is 'Unknown'.
-
-        Arguments:
-
-            creator -- str (or None)
-        """
-        element = self.get_element("dc:creator")
-        if element is None:
-            element = Element.from_tag("dc:creator")
-            self.insert(element, xmlposition=FIRST_CHILD)
-        if not creator:
-            creator = "Unknown"
-        element.text = creator
-
-    def set_dc_date(self, date: datetime | None = None) -> None:
-        """Set the date of the change. If date is None, use current time.
-
-        Arguments:
-
-            date -- datetime (or None)
-        """
-        if date is None:
-            date = datetime.now()
-        dcdate = DateTime.encode(date)
-        element = self.get_element("dc:date")
-        if element is None:
-            element = Element.from_tag("dc:date")
-            self.insert(element, xmlposition=LAST_CHILD)
-        element.text = dcdate
-
-    def get_comments(self, joined: bool = True) -> str | list[str]:
-        """Get text content of the comments. If joined is True (default), the
-        text of different paragraphs is concatenated, else a list of strings,
-        one per paragraph, is returned.
-
-        Arguments:
-
-            joined -- boolean (default is True)
-
-        Return: str or list of str.
-        """
-        content = self.get_paragraphs()
-        if content is None:
-            content = []
-        text = [para.get_formatted_text(simple=True) for para in content]  # type: ignore
-        if joined:
-            return "\n".join(text)
-        return text
-
-    def set_comments(self, text: str = "", replace: bool = True) -> None:
-        """Set the text content of the comments. If replace is True (default),
-        the new text replace old comments, else it is added at the end.
-
-        Arguments:
-
-            text -- str
-
-            replace -- boolean
-        """
-        if replace:
-            for para in self.get_paragraphs():
-                self.delete(para)
-        para = Paragraph()
-        para.append_plain_text(text)
-        self.insert(para, xmlposition=LAST_CHILD)
-
-

Ancestors

- -

Methods

-
-
-def get_comments(self, joined: bool = True) ‑> str | odfdo.list[str] -
-
-

Get text content of the comments. If joined is True (default), the -text of different paragraphs is concatenated, else a list of strings, -one per paragraph, is returned.

-

Arguments

-

joined – boolean (default is True)

-

Return: str or list of str.

-
- -Expand source code - -
def get_comments(self, joined: bool = True) -> str | list[str]:
-    """Get text content of the comments. If joined is True (default), the
-    text of different paragraphs is concatenated, else a list of strings,
-    one per paragraph, is returned.
-
-    Arguments:
-
-        joined -- boolean (default is True)
-
-    Return: str or list of str.
-    """
-    content = self.get_paragraphs()
-    if content is None:
-        content = []
-    text = [para.get_formatted_text(simple=True) for para in content]  # type: ignore
-    if joined:
-        return "\n".join(text)
-    return text
-
-
-
-def set_comments(self, text: str = '', replace: bool = True) ‑> None -
-
-

Set the text content of the comments. If replace is True (default), -the new text replace old comments, else it is added at the end.

-

Arguments

-

text – str

-

replace – boolean

-
- -Expand source code - -
def set_comments(self, text: str = "", replace: bool = True) -> None:
-    """Set the text content of the comments. If replace is True (default),
-    the new text replace old comments, else it is added at the end.
-
-    Arguments:
-
-        text -- str
-
-        replace -- boolean
-    """
-    if replace:
-        for para in self.get_paragraphs():
-            self.delete(para)
-    para = Paragraph()
-    para.append_plain_text(text)
-    self.insert(para, xmlposition=LAST_CHILD)
-
-
-
-def set_dc_creator(self, creator: str | None = None) ‑> None -
-
-

Set the creator of the change. Default for creator is 'Unknown'.

-

Arguments

-

creator – str (or None)

-
- -Expand source code - -
def set_dc_creator(self, creator: str | None = None) -> None:
-    """Set the creator of the change. Default for creator is 'Unknown'.
-
-    Arguments:
-
-        creator -- str (or None)
-    """
-    element = self.get_element("dc:creator")
-    if element is None:
-        element = Element.from_tag("dc:creator")
-        self.insert(element, xmlposition=FIRST_CHILD)
-    if not creator:
-        creator = "Unknown"
-    element.text = creator
-
-
-
-def set_dc_date(self, date: datetime | None = None) ‑> None -
-
-

Set the date of the change. If date is None, use current time.

-

Arguments

-

date – datetime (or None)

-
- -Expand source code - -
def set_dc_date(self, date: datetime | None = None) -> None:
-    """Set the date of the change. If date is None, use current time.
-
-    Arguments:
-
-        date -- datetime (or None)
-    """
-    if date is None:
-        date = datetime.now()
-    dcdate = DateTime.encode(date)
-    element = self.get_element("dc:date")
-    if element is None:
-        element = Element.from_tag("dc:date")
-        self.insert(element, xmlposition=LAST_CHILD)
-    element.text = dcdate
-
-
-
-

Inherited members

- -
-
-class Column -(default_cell_style: str | None = None, repeated: int | None = None, style: str | None = None, **kwargs: Any) -
-
-

ODF table column "table:table-column"

-

Create a column group element of the optionally given style. Cell -style can be set for the whole column. If the properties apply to -several columns, give the number of repeated columns.

-

Columns don't contain cells, just style information.

-

You don't generally have to create columns by hand, use the Table API.

-

Arguments

-

default_cell_style – str

-

repeated – int

-

style – str

-
- -Expand source code - -
class Column(Element):
-    """ODF table column "table:table-column" """
-
-    _tag = "table:table-column"
-    _caching = True
-
-    def __init__(
-        self,
-        default_cell_style: str | None = None,
-        repeated: int | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a column group element of the optionally given style. Cell
-        style can be set for the whole column. If the properties apply to
-        several columns, give the number of repeated columns.
-
-        Columns don't contain cells, just style information.
-
-        You don't generally have to create columns by hand, use the Table API.
-
-        Arguments:
-
-            default_cell_style -- str
-
-            repeated -- int
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        self.x = None
-        if self._do_init:
-            if default_cell_style:
-                self.set_default_cell_style(default_cell_style)
-            if repeated and repeated > 1:
-                self.repeated = repeated
-            if style:
-                self.style = style
-
-    @property
-    def clone(self) -> Column:
-        clone = Element.clone.fget(self)  # type: ignore
-        clone.x = self.x
-        if hasattr(self, "_tmap"):
-            if hasattr(self, "_rmap"):
-                clone._rmap = self._rmap[:]
-            clone._tmap = self._tmap[:]
-            clone._cmap = self._cmap[:]
-        return clone
-
-    def get_default_cell_style(self) -> str | None:
-        return self.get_attribute_string("table:default-cell-style-name")
-
-    def set_default_cell_style(self, style: Element | str) -> None:
-        self.set_style_attribute("table:default-cell-style-name", style)
-
-    def _set_repeated(self, repeated: int | None) -> None:
-        """Internal only. Set the number of times the column is repeated, or
-        None to delete it. Without changing cache.
-
-        Arguments:
-
-            repeated -- int or None
-        """
-        if repeated is None or repeated < 2:
-            with contextlib.suppress(KeyError):
-                self.del_attribute("table:number-columns-repeated")
-            return
-        self.set_attribute("table:number-columns-repeated", str(repeated))
-
-    @property
-    def repeated(self) -> int | None:
-        """Get /set the number of times the column is repeated.
-
-        Always None when using the table API.
-
-        Return: int or None
-        """
-        repeated = self.get_attribute("table:number-columns-repeated")
-        if repeated is None:
-            return None
-        return int(repeated)
-
-    @repeated.setter
-    def repeated(self, repeated: int | None) -> None:
-        self._set_repeated(repeated)
-        # update cache
-        current: Element = self
-        while True:
-            # look for Table, parent may be group of rows
-            upper = current.parent
-            if not upper:
-                # lonely column
-                return
-            # parent may be group of rows, not table
-            if isinstance(upper, Table):
-                break
-            current = upper
-        # fixme : need to optimize this
-        if isinstance(upper, Table):
-            upper._compute_table_cache()
-            if hasattr(self, "_cmap"):
-                del self._cmap[:]
-                self._cmap.extend(upper._cmap)
-            else:
-                self._cmap = upper._cmap
-
-    @property
-    def style(self) -> str | None:
-        """Get /set the style of the column itself.
-
-        Return: str
-        """
-        return self.get_attribute_string("table:style-name")
-
-    @style.setter
-    def style(self, style: str | Element) -> None:
-        self.set_style_attribute("table:style-name", style)
-
-

Ancestors

- -

Instance variables

-
-
var cloneColumn
-
-
-
- -Expand source code - -
@property
-def clone(self) -> Column:
-    clone = Element.clone.fget(self)  # type: ignore
-    clone.x = self.x
-    if hasattr(self, "_tmap"):
-        if hasattr(self, "_rmap"):
-            clone._rmap = self._rmap[:]
-        clone._tmap = self._tmap[:]
-        clone._cmap = self._cmap[:]
-    return clone
-
-
-
var repeated : int | None
-
-

Get /set the number of times the column is repeated.

-

Always None when using the table API.

-

Return: int or None

-
- -Expand source code - -
@property
-def repeated(self) -> int | None:
-    """Get /set the number of times the column is repeated.
-
-    Always None when using the table API.
-
-    Return: int or None
-    """
-    repeated = self.get_attribute("table:number-columns-repeated")
-    if repeated is None:
-        return None
-    return int(repeated)
-
-
-
var style : str | None
-
-

Get /set the style of the column itself.

-

Return: str

-
- -Expand source code - -
@property
-def style(self) -> str | None:
-    """Get /set the style of the column itself.
-
-    Return: str
-    """
-    return self.get_attribute_string("table:style-name")
-
-
-
-

Methods

-
-
-def get_default_cell_style(self) ‑> str | None -
-
-
-
- -Expand source code - -
def get_default_cell_style(self) -> str | None:
-    return self.get_attribute_string("table:default-cell-style-name")
-
-
-
-def set_default_cell_style(self, style: Element | str) ‑> None -
-
-
-
- -Expand source code - -
def set_default_cell_style(self, style: Element | str) -> None:
-    self.set_style_attribute("table:default-cell-style-name", style)
-
-
-
-

Inherited members

- -
-
-class ConnectorShape -(style: str | None = None, text_style: str | None = None, draw_id: str | None = None, layer: str | None = None, connected_shapes: tuple | None = None, glue_points: tuple | None = None, p1: tuple | None = None, p2: tuple | None = None, **kwargs: Any) -
-
-

Create a Connector shape.

-

Arguments

-

style – str

-

text_style – str

-

draw_id – str

-

layer – str

-

connected_shapes – (shape, shape)

-

glue_points – (point, point)

-

p1 – (str, str)

-

p2 – (str, str)

-
- -Expand source code - -
class ConnectorShape(ShapeBase):
-    """Create a Connector shape.
-
-    Arguments:
-
-        style -- str
-
-        text_style -- str
-
-        draw_id -- str
-
-        layer -- str
-
-        connected_shapes -- (shape, shape)
-
-        glue_points -- (point, point)
-
-        p1 -- (str, str)
-
-        p2 -- (str, str)
-    """
-
-    _tag = "draw:connector"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("start_shape", "draw:start-shape"),
-        PropDef("end_shape", "draw:end-shape"),
-        PropDef("start_glue_point", "draw:start-glue-point"),
-        PropDef("end_glue_point", "draw:end-glue-point"),
-        PropDef("x1", "svg:x1"),
-        PropDef("y1", "svg:y1"),
-        PropDef("x2", "svg:x2"),
-        PropDef("y2", "svg:y2"),
-    )
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        connected_shapes: tuple | None = None,
-        glue_points: tuple | None = None,
-        p1: tuple | None = None,
-        p2: tuple | None = None,
-        **kwargs: Any,
-    ) -> None:
-        kwargs.update(
-            {
-                "style": style,
-                "text_style": text_style,
-                "draw_id": draw_id,
-                "layer": layer,
-            }
-        )
-        super().__init__(**kwargs)
-        if self._do_init:
-            if connected_shapes:
-                self.start_shape = connected_shapes[0].draw_id
-                self.end_shape = connected_shapes[1].draw_id
-            if glue_points:
-                self.start_glue_point = glue_points[0]
-                self.end_glue_point = glue_points[1]
-            if p1:
-                self.x1 = p1[0]
-                self.y1 = p1[1]
-            if p2:
-                self.x2 = p2[0]
-                self.y2 = p2[1]
-
-

Ancestors

- -

Instance variables

-
-
var end_glue_point : str | bool | None
-
-

Get/set the attribute draw:end-glue-point

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var end_shape : str | bool | None
-
-

Get/set the attribute draw:end-shape

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var start_glue_point : str | bool | None
-
-

Get/set the attribute draw:start-glue-point

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var start_shape : str | bool | None
-
-

Get/set the attribute draw:start-shape

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var x1 : str | bool | None
-
-

Get/set the attribute svg:x1

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var x2 : str | bool | None
-
-

Get/set the attribute svg:x2

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var y1 : str | bool | None
-
-

Get/set the attribute svg:y1

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var y2 : str | bool | None
-
-

Get/set the attribute svg:y2

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class Container -(path: Path | str | io.BytesIO | None = None) -
-
-

Representation of the ODF file.

-
- -Expand source code - -
class Container:
-    """Representation of the ODF file."""
-
-    def __init__(self, path: Path | str | io.BytesIO | None = None) -> None:
-        self.__parts: dict[str, bytes | None] = {}
-        self.__parts_ts: dict[str, int] = {}
-        self.__path_like: Path | str | io.BytesIO | None = None
-        self.__packaging: str = "zip"
-        self.path: Path | None = None  # or Path
-        if path:
-            self.open(path)
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} type={self.mimetype} path={self.path}>"
-
-    def open(self, path_or_file: Path | str | io.BytesIO) -> None:
-        """Load the content of an ODF file."""
-        self.__path_like = path_or_file
-        if isinstance(path_or_file, (str, Path)):
-            self.path = Path(path_or_file)
-            if not self.path.exists():
-                raise FileNotFoundError(str(self.path))
-        if (self.path or isinstance(path_or_file, io.BytesIO)) and is_zipfile(
-            path_or_file
-        ):
-            self.__packaging = "zip"
-            return self._read_zip()
-        if self.path:
-            is_folder = False
-            with contextlib.suppress(OSError):
-                is_folder = self.path.is_dir()
-            if is_folder:
-                self.__packaging = "folder"
-                return self._read_folder()
-        raise TypeError(f"Document format not managed by odfdo: {type(path_or_file)}.")
-
-    def _read_zip(self) -> None:
-        if isinstance(self.__path_like, io.BytesIO):
-            self.__path_like.seek(0)
-        with ZipFile(self.__path_like) as zf:  # type: ignore
-            mimetype = bytes_to_str(zf.read("mimetype"))
-            if mimetype not in ODF_MIMETYPES:
-                raise ValueError(f"Document of unknown type {mimetype}")
-            self.__parts["mimetype"] = str_to_bytes(mimetype)
-        if self.path is None:
-            if isinstance(self.__path_like, io.BytesIO):
-                self.__path_like.seek(0)
-            # read the full file at once and forget file
-            with ZipFile(self.__path_like) as zf:  # type: ignore
-                for name in zf.namelist():
-                    upath = normalize_path(name)
-                    self.__parts[upath] = zf.read(name)
-            self.__path_like = None
-
-    def _read_folder(self) -> None:
-        try:
-            mimetype, timestamp = self._get_folder_part("mimetype")
-        except OSError:
-            printwarn("Corrupted or not an OpenDocument folder (missing mimetype)")
-            mimetype = b""
-            timestamp = int(time.time())
-        if bytes_to_str(mimetype) not in ODF_MIMETYPES:
-            message = f"Document of unknown type {mimetype!r}, try with ODF Text."
-            printwarn(message)
-            self.__parts["mimetype"] = str_to_bytes(ODF_EXTENSIONS["odt"])
-            self.__parts_ts["mimetype"] = timestamp
-
-    def _parse_folder(self, folder: str) -> list[str]:
-        parts = []
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        root = self.path / folder
-        for path in root.iterdir():
-            if path.name.startswith("."):  # no hidden files
-                continue
-            relative_path = path.relative_to(self.path)
-            if path.is_file():
-                parts.append(relative_path.as_posix())
-            if path.is_dir():
-                sub_parts = self._parse_folder(str(relative_path))
-                if sub_parts:
-                    parts.extend(sub_parts)
-                else:
-                    # store leaf directories
-                    parts.append(relative_path.as_posix() + "/")
-        return parts
-
-    def _get_folder_parts(self) -> list[str]:
-        """Get the list of members in the ODF folder."""
-        return self._parse_folder("")
-
-    def _get_folder_part(self, name: str) -> tuple[bytes, int]:
-        """Get bytes of a part from the ODF folder, with timestamp."""
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        path = self.path / name
-        timestamp = int(path.stat().st_mtime)
-        if path.is_dir():
-            return (b"", timestamp)
-        return (path.read_bytes(), timestamp)
-
-    def _get_folder_part_timestamp(self, name: str) -> int:
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        path = self.path / name
-        try:
-            timestamp = int(path.stat().st_mtime)
-        except OSError:
-            timestamp = -1
-        return timestamp
-
-    def _get_zip_part(self, name: str) -> bytes | None:
-        """Get bytes of a part from the Zip ODF file. No cache."""
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        try:
-            with ZipFile(self.path) as zf:
-                upath = normalize_path(name)
-                self.__parts[upath] = zf.read(name)
-                return self.__parts[upath]
-        except BadZipfile:
-            return None
-
-    def _get_all_zip_part(self) -> None:
-        """Read all parts. No cache."""
-        if self.path is None:
-            raise ValueError("Document path is not defined")
-        try:
-            with ZipFile(self.path) as zf:
-                for name in zf.namelist():
-                    upath = normalize_path(name)
-                    self.__parts[upath] = zf.read(name)
-        except BadZipfile:
-            pass
-
-    def _save_zip(self, target: str | Path | io.BytesIO) -> None:
-        """Save a Zip ODF from the available parts."""
-        parts = self.__parts
-        with ZipFile(target, "w", compression=ZIP_DEFLATED) as filezip:
-            # Parts to save, except manifest at the end
-            part_names = list(parts.keys())
-            try:
-                part_names.remove(ODF_MANIFEST)
-            except ValueError:
-                printwarn(f"Missing '{ODF_MANIFEST}'")
-            # "Pretty-save" parts in some order
-            # mimetype requires to be first and uncompressed
-            mimetype = parts.get("mimetype")
-            if mimetype is None:
-                raise ValueError("Mimetype is not defined")
-            try:
-                filezip.writestr("mimetype", mimetype, ZIP_STORED)
-                part_names.remove("mimetype")
-            except (ValueError, KeyError):
-                printwarn("Missing 'mimetype'")
-            # XML parts
-            for path in ODF_CONTENT, ODF_META, ODF_SETTINGS, ODF_STYLES:
-                if path not in parts:
-                    printwarn(f"Missing '{path}'")
-                    continue
-                part = parts[path]
-                if part is None:
-                    continue
-                filezip.writestr(path, part)
-                part_names.remove(path)
-            # Everything else
-            for path in part_names:
-                data = parts[path]
-                if data is None:
-                    # Deleted
-                    continue
-                filezip.writestr(path, data)
-            # Manifest
-            with contextlib.suppress(KeyError):
-                part = parts[ODF_MANIFEST]
-                if part is not None:
-                    filezip.writestr(ODF_MANIFEST, part)
-
-    def _save_folder(self, folder: Path | str) -> None:
-        """Save a folder ODF from the available parts."""
-
-        def dump(part_path: str, content: bytes) -> None:
-            if part_path.endswith("/"):  # folder
-                is_folder = True
-                pure_path = PurePath(folder, part_path[:-1])
-            else:
-                is_folder = False
-                pure_path = PurePath(folder, part_path)
-            path = Path(pure_path)
-            if is_folder:
-                path.mkdir(parents=True, exist_ok=True)
-            else:
-                path.parent.mkdir(parents=True, exist_ok=True)
-                path.write_bytes(content)
-                path.chmod(0o666)
-
-        for part_path, data in self.__parts.items():
-            if data is None:
-                # Deleted
-                continue
-            dump(part_path, data)
-
-    # Public API
-
-    def get_parts(self) -> list[str]:
-        """Get the list of members."""
-        if not self.path:
-            # maybe a file like zip archive
-            return list(self.__parts.keys())
-        if self.__packaging == "zip":
-            parts = []
-            with ZipFile(self.path) as zf:
-                for name in zf.namelist():
-                    upath = normalize_path(name)
-                    parts.append(upath)
-            return parts
-        elif self.__packaging == "folder":
-            return self._get_folder_parts()
-        else:
-            raise ValueError("Unable to provide parts of the document")
-
-    def get_part(self, path: str) -> str | bytes | None:
-        """Get the bytes of a part of the ODF."""
-        path = str(path)
-        if path in self.__parts:
-            part = self.__parts[path]
-            if part is None:
-                raise ValueError(f'Part "{path}" is deleted')
-            if self.__packaging == "folder":
-                cache_ts = self.__parts_ts.get(path, -1)
-                current_ts = self._get_folder_part_timestamp(path)
-                if current_ts != cache_ts:
-                    part, timestamp = self._get_folder_part(path)
-                    self.__parts[path] = part
-                    self.__parts_ts[path] = timestamp
-            return part
-        if self.__packaging == "zip":
-            return self._get_zip_part(path)
-        if self.__packaging == "folder":
-            part, timestamp = self._get_folder_part(path)
-            self.__parts[path] = part
-            self.__parts_ts[path] = timestamp
-            return part
-        return None
-
-    @property
-    def mimetype(self) -> str:
-        """Return str value of mimetype of the document."""
-        with contextlib.suppress(Exception):
-            b_mimetype = self.get_part("mimetype")
-            if isinstance(b_mimetype, bytes):
-                return bytes_to_str(b_mimetype)
-        return ""
-
-    @mimetype.setter
-    def mimetype(self, mimetype: str | bytes) -> None:
-        """Set mimetype value of the document."""
-        if isinstance(mimetype, str):
-            self.__parts["mimetype"] = str_to_bytes(mimetype)
-        elif isinstance(mimetype, bytes):
-            self.__parts["mimetype"] = mimetype
-        else:
-            raise TypeError(f'Wrong mimetype "{mimetype!r}"')
-
-    def set_part(self, path: str, data: bytes) -> None:
-        """Replace or add a new part."""
-        self.__parts[path] = data
-
-    def del_part(self, path: str) -> None:
-        """Mark a part for deletion."""
-        self.__parts[path] = None
-
-    @property
-    def clone(self) -> Container:
-        """Make a copy of this container with no path."""
-        if self.path and self.__packaging == "zip":
-            self._get_all_zip_part()
-        clone = deepcopy(self)
-        clone.path = None
-        return clone
-
-    @staticmethod
-    def _do_backup(target: str | Path) -> None:
-        path = Path(target)
-        if not path.exists():
-            return
-        back_file = Path(path.stem + ".backup" + path.suffix)
-        if back_file.is_dir():
-            try:
-                shutil.rmtree(back_file)
-            except OSError as e:
-                printwarn(str(e))
-        try:
-            shutil.move(target, back_file)
-        except OSError as e:
-            printwarn(str(e))
-
-    def _save_packaging(self, packaging: str | None) -> str:
-        if not packaging:
-            packaging = self.__packaging if self.__packaging else "zip"
-        packaging = packaging.strip().lower()
-        # if packaging not in ('zip', 'flat', 'folder'):
-        if packaging not in ("zip", "folder"):
-            raise ValueError(f'Packaging of type "{packaging}" is not supported')
-        return packaging
-
-    def _save_target(self, target: str | Path | io.BytesIO | None) -> str | io.BytesIO:
-        if target is None:
-            target = self.path
-        if isinstance(target, Path):
-            target = str(target)
-        if isinstance(target, str):
-            while target.endswith(os.sep):
-                target = target[:-1]
-            while target.endswith(".folder"):
-                target = target.split(".folder", 1)[0]
-        return target  # type: ignore
-
-    def _save_as_zip(self, target: str | Path | io.BytesIO, backup: bool) -> None:
-        if isinstance(target, (str, Path)) and backup:
-            self._do_backup(target)
-        self._save_zip(target)
-
-    def _save_as_folder(self, target: str | Path, backup: bool) -> None:
-        if not isinstance(target, (str, Path)):
-            raise TypeError(
-                f"Saving in folder format requires a folder name, not '{target!r}'"
-            )
-        if not str(target).endswith(".folder"):
-            target = str(target) + ".folder"
-        if backup:
-            self._do_backup(target)
-        else:
-            path = Path(target)
-            if path.exists():
-                try:
-                    shutil.rmtree(path)
-                except OSError as e:
-                    printwarn(str(e))
-        self._save_folder(target)
-
-    def save(
-        self,
-        target: str | Path | io.BytesIO | None,
-        packaging: str | None = None,
-        backup: bool = False,
-    ) -> None:
-        """Save the container to the given target, a path or a file-like
-        object.
-
-        Package the output document in the same format than current document,
-        unless "packaging" is different.
-
-        Arguments:
-
-            target -- str or file-like or Path
-
-            packaging -- 'zip', or for debugging purpose 'folder'
-
-            backup -- boolean
-        """
-        parts = self.__parts
-        packaging = self._save_packaging(packaging)
-        # Load parts else they will be considered deleted
-        for path in self.get_parts():
-            if path not in parts:
-                self.get_part(path)
-        target = self._save_target(target)
-        if packaging == "folder":
-            if isinstance(target, io.BytesIO):
-                raise TypeError(
-                    "Impossible to save on io.BytesIO with 'folder' packaging"
-                )
-            self._save_as_folder(target, backup)
-        else:
-            # default:
-            self._save_as_zip(target, backup)
-
-

Instance variables

-
-
var cloneContainer
-
-

Make a copy of this container with no path.

-
- -Expand source code - -
@property
-def clone(self) -> Container:
-    """Make a copy of this container with no path."""
-    if self.path and self.__packaging == "zip":
-        self._get_all_zip_part()
-    clone = deepcopy(self)
-    clone.path = None
-    return clone
-
-
-
var mimetype : str
-
-

Return str value of mimetype of the document.

-
- -Expand source code - -
@property
-def mimetype(self) -> str:
-    """Return str value of mimetype of the document."""
-    with contextlib.suppress(Exception):
-        b_mimetype = self.get_part("mimetype")
-        if isinstance(b_mimetype, bytes):
-            return bytes_to_str(b_mimetype)
-    return ""
-
-
-
-

Methods

-
-
-def del_part(self, path: str) ‑> None -
-
-

Mark a part for deletion.

-
- -Expand source code - -
def del_part(self, path: str) -> None:
-    """Mark a part for deletion."""
-    self.__parts[path] = None
-
-
-
-def get_part(self, path: str) ‑> str | bytes | None -
-
-

Get the bytes of a part of the ODF.

-
- -Expand source code - -
def get_part(self, path: str) -> str | bytes | None:
-    """Get the bytes of a part of the ODF."""
-    path = str(path)
-    if path in self.__parts:
-        part = self.__parts[path]
-        if part is None:
-            raise ValueError(f'Part "{path}" is deleted')
-        if self.__packaging == "folder":
-            cache_ts = self.__parts_ts.get(path, -1)
-            current_ts = self._get_folder_part_timestamp(path)
-            if current_ts != cache_ts:
-                part, timestamp = self._get_folder_part(path)
-                self.__parts[path] = part
-                self.__parts_ts[path] = timestamp
-        return part
-    if self.__packaging == "zip":
-        return self._get_zip_part(path)
-    if self.__packaging == "folder":
-        part, timestamp = self._get_folder_part(path)
-        self.__parts[path] = part
-        self.__parts_ts[path] = timestamp
-        return part
-    return None
-
-
-
-def get_parts(self) ‑> odfdo.list[str] -
-
-

Get the list of members.

-
- -Expand source code - -
def get_parts(self) -> list[str]:
-    """Get the list of members."""
-    if not self.path:
-        # maybe a file like zip archive
-        return list(self.__parts.keys())
-    if self.__packaging == "zip":
-        parts = []
-        with ZipFile(self.path) as zf:
-            for name in zf.namelist():
-                upath = normalize_path(name)
-                parts.append(upath)
-        return parts
-    elif self.__packaging == "folder":
-        return self._get_folder_parts()
-    else:
-        raise ValueError("Unable to provide parts of the document")
-
-
-
-def open(self, path_or_file: Path | str | io.BytesIO) ‑> None -
-
-

Load the content of an ODF file.

-
- -Expand source code - -
def open(self, path_or_file: Path | str | io.BytesIO) -> None:
-    """Load the content of an ODF file."""
-    self.__path_like = path_or_file
-    if isinstance(path_or_file, (str, Path)):
-        self.path = Path(path_or_file)
-        if not self.path.exists():
-            raise FileNotFoundError(str(self.path))
-    if (self.path or isinstance(path_or_file, io.BytesIO)) and is_zipfile(
-        path_or_file
-    ):
-        self.__packaging = "zip"
-        return self._read_zip()
-    if self.path:
-        is_folder = False
-        with contextlib.suppress(OSError):
-            is_folder = self.path.is_dir()
-        if is_folder:
-            self.__packaging = "folder"
-            return self._read_folder()
-    raise TypeError(f"Document format not managed by odfdo: {type(path_or_file)}.")
-
-
-
-def save(self, target: str | Path | io.BytesIO | None, packaging: str | None = None, backup: bool = False) ‑> None -
-
-

Save the container to the given target, a path or a file-like -object.

-

Package the output document in the same format than current document, -unless "packaging" is different.

-

Arguments

-

target – str or file-like or Path

-

packaging – 'zip', or for debugging purpose 'folder'

-

backup – boolean

-
- -Expand source code - -
def save(
-    self,
-    target: str | Path | io.BytesIO | None,
-    packaging: str | None = None,
-    backup: bool = False,
-) -> None:
-    """Save the container to the given target, a path or a file-like
-    object.
-
-    Package the output document in the same format than current document,
-    unless "packaging" is different.
-
-    Arguments:
-
-        target -- str or file-like or Path
-
-        packaging -- 'zip', or for debugging purpose 'folder'
-
-        backup -- boolean
-    """
-    parts = self.__parts
-    packaging = self._save_packaging(packaging)
-    # Load parts else they will be considered deleted
-    for path in self.get_parts():
-        if path not in parts:
-            self.get_part(path)
-    target = self._save_target(target)
-    if packaging == "folder":
-        if isinstance(target, io.BytesIO):
-            raise TypeError(
-                "Impossible to save on io.BytesIO with 'folder' packaging"
-            )
-        self._save_as_folder(target, backup)
-    else:
-        # default:
-        self._save_as_zip(target, backup)
-
-
-
-def set_part(self, path: str, data: bytes) ‑> None -
-
-

Replace or add a new part.

-
- -Expand source code - -
def set_part(self, path: str, data: bytes) -> None:
-    """Replace or add a new part."""
-    self.__parts[path] = data
-
-
-
-
-
-class Content -(part_name: str, container: Container) -
-
-

Representation of an XML part.

-

Abstraction of the XML library behind.

-
- -Expand source code - -
class Content(XmlPart):
-    @property
-    def body(self) -> Element:
-        body = self.root.document_body
-        if not isinstance(body, Element):
-            raise ValueError("No body found in document")  # noqa:TRY004
-        return body
-
-    # The following two seem useless but they match styles API
-
-    def _get_style_contexts(self, family: str | None) -> tuple:
-        if family == "font-face":
-            return (self.get_element("//office:font-face-decls"),)
-        return (
-            self.get_element("//office:font-face-decls"),
-            self.get_element("//office:automatic-styles"),
-        )
-
-    def __str__(self) -> str:
-        return str(self.body)
-
-    # Public API
-
-    def get_styles(self, family: str | None = None) -> list[Style]:
-        """Return the list of styles in the Content part, optionally limited
-        to the given family.
-
-        Arguments:
-
-            family -- str or None
-
-        Return: list of Style
-        """
-        result: list[Style] = []
-        for context in self._get_style_contexts(family):
-            if context is None:
-                continue
-            result.extend(context.get_styles(family=family))
-        return result
-
-    def get_style(
-        self,
-        family: str,
-        name_or_element: str | Element | None = None,
-        display_name: str | None = None,
-    ) -> Style | None:
-        """Return the style uniquely identified by the name/family pair. If
-        the argument is already a style object, it will return it.
-
-        If the name is None, the default style is fetched.
-
-        If the name is not the internal name but the name you gave in the
-        desktop application, use display_name instead.
-
-        Arguments:
-
-            family -- 'paragraph', 'text', 'graphic', 'table', 'list',
-                      'number'
-
-            name_or_element -- str or Style
-
-            display_name -- str
-
-        Return: Style or None if not found
-        """
-        for context in self._get_style_contexts(family):
-            if context is None:
-                continue
-            style = context.get_style(
-                family,
-                name_or_element=name_or_element,
-                display_name=display_name,
-            )
-            if style is not None:
-                return style
-        return None
-
-

Ancestors

- -

Instance variables

-
-
var bodyElement
-
-
-
- -Expand source code - -
@property
-def body(self) -> Element:
-    body = self.root.document_body
-    if not isinstance(body, Element):
-        raise ValueError("No body found in document")  # noqa:TRY004
-    return body
-
-
-
-

Methods

-
-
-def get_style(self, family: str, name_or_element: str | Element | None = None, display_name: str | None = None) ‑> Style | None -
-
-

Return the style uniquely identified by the name/family pair. If -the argument is already a style object, it will return it.

-

If the name is None, the default style is fetched.

-

If the name is not the internal name but the name you gave in the -desktop application, use display_name instead.

-

Arguments

-

family – 'paragraph', 'text', 'graphic', 'table', 'list', -'number'

-

name_or_element – str or Style

-

display_name – str

-

Return: Style or None if not found

-
- -Expand source code - -
def get_style(
-    self,
-    family: str,
-    name_or_element: str | Element | None = None,
-    display_name: str | None = None,
-) -> Style | None:
-    """Return the style uniquely identified by the name/family pair. If
-    the argument is already a style object, it will return it.
-
-    If the name is None, the default style is fetched.
-
-    If the name is not the internal name but the name you gave in the
-    desktop application, use display_name instead.
-
-    Arguments:
-
-        family -- 'paragraph', 'text', 'graphic', 'table', 'list',
-                  'number'
-
-        name_or_element -- str or Style
-
-        display_name -- str
-
-    Return: Style or None if not found
-    """
-    for context in self._get_style_contexts(family):
-        if context is None:
-            continue
-        style = context.get_style(
-            family,
-            name_or_element=name_or_element,
-            display_name=display_name,
-        )
-        if style is not None:
-            return style
-    return None
-
-
-
-def get_styles(self, family: str | None = None) ‑> odfdo.list[Style] -
-
-

Return the list of styles in the Content part, optionally limited -to the given family.

-

Arguments

-

family – str or None

-

Return: list of Style

-
- -Expand source code - -
def get_styles(self, family: str | None = None) -> list[Style]:
-    """Return the list of styles in the Content part, optionally limited
-    to the given family.
-
-    Arguments:
-
-        family -- str or None
-
-    Return: list of Style
-    """
-    result: list[Style] = []
-    for context in self._get_style_contexts(family):
-        if context is None:
-            continue
-        result.extend(context.get_styles(family=family))
-    return result
-
-
-
-

Inherited members

- -
-
-class Document -(target: str | bytes | Path | Container | io.BytesIO | None = 'text') -
-
-

Abstraction of the ODF document.

-

To create a new Document, several possibilities:

-
- Document() or Document("text") -> an "empty" document of type text
-- Document("spreadsheet") -> an "empty" document of type spreadsheet
-- Document("presentation") -> an "empty" document of type presentation
-- Document("drawing") -> an "empty" document of type drawing
-
-Meaning of “empty”: these documents are copies of the default
-templates documents provided with this library, which, as templates,
-are not really empty. It may be useful to clear the newly created
-document: document.body.clear(), or adjust meta informations like
-description or default language: document.meta.set_language('fr-FR')
-
-

If the argument is not a known template type, or is a Path, -Document(file) will load the content of the ODF file.

-

To explicitly create a document from a custom template, use the -Document.new(path) method whose argument is the path to the template file.

-
- -Expand source code - -
class Document:
-    """Abstraction of the ODF document.
-
-    To create a new Document, several possibilities:
-
-        - Document() or Document("text") -> an "empty" document of type text
-        - Document("spreadsheet") -> an "empty" document of type spreadsheet
-        - Document("presentation") -> an "empty" document of type presentation
-        - Document("drawing") -> an "empty" document of type drawing
-
-        Meaning of “empty”: these documents are copies of the default
-        templates documents provided with this library, which, as templates,
-        are not really empty. It may be useful to clear the newly created
-        document: document.body.clear(), or adjust meta informations like
-        description or default language: document.meta.set_language('fr-FR')
-
-    If the argument is not a known template type, or is a Path,
-    Document(file) will load the content of the ODF file.
-
-    To explicitly create a document from a custom template, use the
-    Document.new(path) method whose argument is the path to the template file.
-    """
-
-    def __init__(
-        self,
-        target: str | bytes | Path | Container | io.BytesIO | None = "text",
-    ) -> None:
-        # Cache of XML parts
-        self.__xmlparts: dict[str, XmlPart] = {}
-        # Cache of the body
-        self.__body: Element | None = None
-        self.container: Container | None = None
-        if isinstance(target, bytes):
-            # eager conversion
-            target = bytes_to_str(target)
-        if target is None:
-            # empty document, you probably don't wnat this.
-            self.container = Container()
-            return
-        if isinstance(target, Path):
-            # let's assume we open a container on existing file
-            self.container = Container(target)
-            return
-        if isinstance(target, Container):
-            # special internal case, use an existing container
-            self.container = target
-            return
-        if isinstance(target, str):
-            if target in ODF_TEMPLATES:
-                # assuming a new document from templates
-                self.container = container_from_template(target)
-                return
-            # let's assume we open a container on existing file
-            self.container = Container(target)
-            return
-        if isinstance(target, io.BytesIO):
-            self.container = Container(target)
-            return
-        raise TypeError(f"Unknown Document source type: '{target!r}'")
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} type={self.get_type()} path={self.path}>"
-
-    def __str__(self) -> str:
-        try:
-            return str(self.get_formatted_text())
-        except NotImplementedError:
-            return self.body.text_recursive
-
-    @classmethod
-    def new(cls, template: str | Path | io.BytesIO = "text") -> Document:
-        """Create a Document from a template.
-
-        The template argument is expected to be the path to a ODF template.
-
-        Arguments:
-
-            template -- str or Path or file-like (io.BytesIO)
-
-        Return : ODF document -- Document
-        """
-        container = container_from_template(template)
-        return cls(container)
-
-    # Public API
-
-    @property
-    def path(self) -> Path | None:
-        """Shortcut to Document.Container.path."""
-        if not self.container:
-            return None
-        return self.container.path
-
-    @path.setter
-    def path(self, path_or_str: str | Path) -> None:
-        """Shortcut to Document.Container.path
-
-        Only accepting str or Path."""
-        if not self.container:
-            return
-        self.container.path = Path(path_or_str)
-
-    def get_parts(self) -> list[str]:
-        """Return available part names with path inside the archive, e.g.
-        ['content.xml', ..., 'Pictures/100000000000032000000258912EB1C3.jpg']
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        return self.container.get_parts()
-
-    def get_part(self, path: str) -> XmlPart | str | bytes | None:
-        """Return the bytes of the given part. The path is relative to the
-        archive, e.g. "Pictures/1003200258912EB1C3.jpg".
-
-        'content', 'meta', 'settings', 'styles' and 'manifest' are shortcuts
-        to the real path, e.g. content.xml, and return a dedicated object with
-        its own API.
-
-        path formated as URI, so always use '/' separator
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        # "./ObjectReplacements/Object 1"
-        path = path.lstrip("./")
-        path = _get_part_path(path)
-        cls = _get_part_class(path)
-        # Raw bytes
-        if cls is None:
-            return self.container.get_part(path)
-        # XML part
-        part = self.__xmlparts.get(path)
-        if part is None:
-            self.__xmlparts[path] = part = cls(path, self.container)
-        return part
-
-    def set_part(self, path: str, data: bytes) -> None:
-        """Set the bytes of the given part. The path is relative to the
-        archive, e.g. "Pictures/1003200258912EB1C3.jpg".
-
-        path formated as URI, so always use '/' separator
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        # "./ObjectReplacements/Object 1"
-        path = path.lstrip("./")
-        path = _get_part_path(path)
-        cls = _get_part_class(path)
-        # XML part overwritten
-        if cls is not None:
-            with suppress(KeyError):
-                self.__xmlparts[path]
-        self.container.set_part(path, data)
-
-    def del_part(self, path: str) -> None:
-        """Mark a part for deletion. The path is relative to the archive,
-        e.g. "Pictures/1003200258912EB1C3.jpg"
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        path = _get_part_path(path)
-        cls = _get_part_class(path)
-        if path == ODF_MANIFEST or cls is not None:
-            raise ValueError(f"part '{path}' is mandatory")
-        self.container.del_part(path)
-
-    @property
-    def mimetype(self) -> str:
-        if not self.container:
-            raise ValueError("Empty Container")
-        return self.container.mimetype
-
-    @mimetype.setter
-    def mimetype(self, mimetype: str) -> None:
-        if not self.container:
-            raise ValueError("Empty Container")
-        self.container.mimetype = mimetype
-
-    def get_type(self) -> str:
-        """Get the ODF type (also called class) of this document.
-
-        Return: 'chart', 'database', 'formula', 'graphics',
-            'graphics-template', 'image', 'presentation',
-            'presentation-template', 'spreadsheet', 'spreadsheet-template',
-            'text', 'text-master', 'text-template' or 'text-web'
-        """
-        # The mimetype must be with the form:
-        # application/vnd.oasis.opendocument.text
-
-        # Isolate and return the last part
-        return self.mimetype.rsplit(".", 1)[-1]
-
-    @property
-    def body(self) -> Element:
-        """Return the body element of the content part, where actual content
-        is stored.
-        """
-        if self.__body is None:
-            self.__body = self.content.body
-        return self.__body
-
-    @property
-    def meta(self) -> Meta:
-        """Return the meta part (meta.xml) of the document, where meta data
-        are stored."""
-        metadata = self.get_part(ODF_META)
-        if metadata is None or not isinstance(metadata, Meta):
-            raise ValueError("Empty Meta")
-        return metadata
-
-    @property
-    def manifest(self) -> Manifest:
-        """Return the manifest part (manifest.xml) of the document."""
-        manifest = self.get_part(ODF_MANIFEST)
-        if manifest is None or not isinstance(manifest, Manifest):
-            raise ValueError("Empty Manifest")
-        return manifest
-
-    def _get_formatted_text_footnotes(
-        self,
-        result: list[str],
-        context: dict,
-        rst_mode: bool,
-    ) -> None:
-        # Separate text from notes
-        if rst_mode:
-            result.append("\n")
-        else:
-            result.append("----\n")
-        for citation, body in context["footnotes"]:
-            if rst_mode:
-                result.append(f".. [#] {body}\n")
-            else:
-                result.append(f"[{citation}] {body}\n")
-        # Append a \n after the notes
-        result.append("\n")
-        # Reset for the next paragraph
-        context["footnotes"] = []
-
-    def _get_formatted_text_annotations(
-        self,
-        result: list[str],
-        context: dict,
-        rst_mode: bool,
-    ) -> None:
-        # Insert the annotations
-        # With a separation
-        if rst_mode:
-            result.append("\n")
-        else:
-            result.append("----\n")
-        for annotation in context["annotations"]:
-            if rst_mode:
-                result.append(f".. [#] {annotation}\n")
-            else:
-                result.append(f"[*] {annotation}\n")
-        context["annotations"] = []
-
-    def _get_formatted_text_images(
-        self,
-        result: list[str],
-        context: dict,
-        rst_mode: bool,
-    ) -> None:
-        # Insert the images ref, only in rst mode
-        result.append("\n")
-        for ref, filename, (width, height) in context["images"]:
-            result.append(f".. {ref} image:: {filename}\n")
-            if width is not None:
-                result.append(f"   :width: {width}\n")
-            if height is not None:
-                result.append(f"   :height: {height}\n")
-        context["images"] = []
-
-    def _get_formatted_text_endnotes(
-        self,
-        result: list[str],
-        context: dict,
-        rst_mode: bool,
-    ) -> None:
-        # Append the end notes
-        if rst_mode:
-            result.append("\n\n")
-        else:
-            result.append("\n========\n")
-        for citation, body in context["endnotes"]:
-            if rst_mode:
-                result.append(f".. [*] {body}\n")
-            else:
-                result.append(f"({citation}) {body}\n")
-
-    def get_formatted_text(self, rst_mode: bool = False) -> str:
-        """Return content as text, with some formatting."""
-        # For the moment, only "type='text'"
-        doc_type = self.get_type()
-        if doc_type == "spreadsheet":
-            return self._tables_csv()
-        if doc_type in {
-            "text",
-            "text-template",
-            "presentation",
-            "presentation-template",
-        }:
-            return self._formatted_text(rst_mode)
-        raise NotImplementedError(f"Type of document '{doc_type}' not supported yet")
-
-    def _tables_csv(self) -> str:
-        return "\n\n".join(str(table) for table in self.body.get_tables())
-
-    def _formatted_text(self, rst_mode: bool) -> str:
-        # Initialize an empty context
-        context = {
-            "document": self,
-            "footnotes": [],
-            "endnotes": [],
-            "annotations": [],
-            "rst_mode": rst_mode,
-            "img_counter": 0,
-            "images": [],
-            "no_img_level": 0,
-        }
-        body = self.body
-        # Get the text
-        result = []
-        for child in body.children:
-            # self._get_formatted_text_child(result, element, context, rst_mode)
-            # if child.tag == "table:table":
-            #     result.append(child.get_formatted_text(context))
-            #     return
-            result.append(child.get_formatted_text(context))
-            if context["footnotes"]:
-                self._get_formatted_text_footnotes(result, context, rst_mode)
-            if context["annotations"]:
-                self._get_formatted_text_annotations(result, context, rst_mode)
-            # Insert the images ref, only in rst mode
-            if context["images"]:
-                self._get_formatted_text_images(result, context, rst_mode)
-        if context["endnotes"]:
-            self._get_formatted_text_endnotes(result, context, rst_mode)
-        return "".join(result)
-
-    def get_formated_meta(self) -> str:
-        """Return meta informations as text, with some formatting."""
-        result: list[str] = []
-
-        # Simple values
-        def print_info(name: str, value: Any) -> None:
-            if value:
-                result.append(f"{name}: {value}")
-
-        meta = self.meta
-        print_info("Title", meta.get_title())
-        print_info("Subject", meta.get_subject())
-        print_info("Language", meta.get_language())
-        print_info("Modification date", meta.get_modification_date())
-        print_info("Creation date", meta.get_creation_date())
-        print_info("Initial creator", meta.get_initial_creator())
-        print_info("Keyword", meta.get_keywords())
-        print_info("Editing duration", meta.get_editing_duration())
-        print_info("Editing cycles", meta.get_editing_cycles())
-        print_info("Generator", meta.get_generator())
-
-        # Statistic
-        result.append("Statistic:")
-        statistic = meta.get_statistic()
-        if statistic:
-            for name, data in statistic.items():
-                result.append(f"  - {name[5:].replace('-', ' ').capitalize()}: {data}")
-
-        # User defined metadata
-        result.append("User defined metadata:")
-        user_metadata = meta.get_user_defined_metadata()
-        for name, data2 in user_metadata.items():
-            result.append(f"  - {name}: {data2}")
-
-        # And the description
-        print_info("Description", meta.get_description())
-
-        return "\n".join(result) + "\n"
-
-    def add_file(self, path_or_file: str | Path) -> str:
-        """Insert a file from a path or a file-like object in the container.
-
-        Return the full path to reference in the content.
-
-        Arguments:
-
-            path_or_file -- str or Path or file-like
-
-        Return: str (URI)
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        name = ""
-        # Folder for added files (FIXME hard-coded and copied)
-        manifest = self.manifest
-        medias = manifest.get_paths()
-        # uuid = str(uuid4())
-
-        if isinstance(path_or_file, (str, Path)):
-            path = Path(path_or_file)
-            extension = path.suffix.lower()
-            name = f"{path.stem}{extension}"
-            if posixpath.join("Pictures", name) in medias:
-                name = f"{path.stem}_{uuid4()}{extension}"
-        else:
-            path = None
-            name = getattr(path_or_file, "name", None)
-            if not name:
-                name = str(uuid4())
-        media_type, _encoding = guess_type(name)
-        if not media_type:
-            media_type = "application/octet-stream"
-        if manifest.get_media_type("Pictures/") is None:
-            manifest.add_full_path("Pictures/")
-        full_path = posixpath.join("Pictures", name)
-        if path is None:
-            self.container.set_part(full_path, path_or_file.read())
-        else:
-            self.container.set_part(full_path, path.read_bytes())
-        manifest.add_full_path(full_path, media_type)
-        return full_path
-
-    @property
-    def clone(self) -> Document:
-        """Return an exact copy of the document.
-
-        Return: Document
-        """
-        clone = object.__new__(self.__class__)
-        for name in self.__dict__:
-            if name == "_Document__body":
-                setattr(clone, name, None)
-            elif name == "_Document__xmlparts":
-                setattr(clone, name, {})
-            elif name == "container":
-                if not self.container:
-                    raise ValueError("Empty Container")
-                setattr(clone, name, self.container.clone)
-            else:
-                value = deepcopy(getattr(self, name))
-                setattr(clone, name, value)
-        return clone
-
-    def save(
-        self,
-        target: str | Path | io.BytesIO | None = None,
-        packaging: str = "zip",
-        pretty: bool = False,
-        backup: bool = False,
-    ) -> None:
-        """Save the document, at the same place it was opened or at the given
-        target path. Target can also be a file-like object. It can be saved
-        as a Zip file (default) or as files in a folder (for debugging
-        purpose). XML parts can be pretty printed.
-
-        Arguments:
-
-            target -- str or file-like object
-
-            packaging -- 'zip' or 'folder'
-
-            pretty -- bool
-
-            backup -- bool
-        """
-        if not self.container:
-            raise ValueError("Empty Container")
-        # Some advertising
-        self.meta.set_generator_default()
-        # Synchronize data with container
-        container = self.container
-        for path, part in self.__xmlparts.items():
-            if part is not None:
-                container.set_part(path, part.serialize(pretty))
-        # Save the container
-        container.save(target, packaging=packaging, backup=backup)
-
-    @property
-    def content(self) -> Content:
-        content: Content | None = self.get_part(ODF_CONTENT)  # type:ignore
-        if content is None:
-            raise ValueError("Empty Content")
-        return content
-
-    @property
-    def styles(self) -> Styles:
-        styles: Styles | None = self.get_part(ODF_STYLES)  # type:ignore
-        if styles is None:
-            raise ValueError("Empty Styles")
-        return styles
-
-    # Styles over several parts
-
-    def get_styles(
-        self,
-        family: str | bytes = "",
-        automatic: bool = False,
-    ) -> list[Style | Element]:
-        # compatibility with old versions:
-
-        if isinstance(family, bytes):
-            family = bytes_to_str(family)
-        return self.content.get_styles(family=family) + self.styles.get_styles(
-            family=family, automatic=automatic
-        )
-
-    def get_style(
-        self,
-        family: str,
-        name_or_element: str | Style | None = None,
-        display_name: str | None = None,
-    ) -> Style | None:
-        """Return the style uniquely identified by the name/family pair. If
-        the argument is already a style object, it will return it.
-
-        If the name is None, the default style is fetched.
-
-        If the name is not the internal name but the name you gave in a
-        desktop application, use display_name instead.
-
-        Arguments:
-
-            family -- 'paragraph', 'text',  'graphic', 'table', 'list',
-                      'number', 'page-layout', 'master-page'
-
-            name -- str or Element or None
-
-            display_name -- str
-
-        Return: Style or None if not found.
-        """
-        # 1. content.xml
-        element = self.content.get_style(
-            family, name_or_element=name_or_element, display_name=display_name
-        )
-        if element is not None:
-            return element
-        # 2. styles.xml
-        return self.styles.get_style(
-            family,
-            name_or_element=name_or_element,
-            display_name=display_name,
-        )
-
-    @staticmethod
-    def _pseudo_style_attribute(style_element: Style | Element, attribute: str) -> Any:
-        if hasattr(style_element, attribute):
-            return getattr(style_element, attribute)
-        return ""
-
-    def _set_automatic_name(self, style: Style, family: str) -> None:
-        """Generate a name for the new automatic style."""
-        if not hasattr(style, "name"):
-            # do nothing
-            return
-        styles = self.get_styles(family=family, automatic=True)
-        max_index = 0
-        for existing_style in styles:
-            if not hasattr(existing_style, "name"):
-                continue
-            if not existing_style.name.startswith(AUTOMATIC_PREFIX):
-                continue
-            try:
-                index = int(existing_style.name[len(AUTOMATIC_PREFIX) :])
-            except ValueError:
-                continue
-            max_index = max(max_index, index)
-
-        style.name = f"{AUTOMATIC_PREFIX}{max_index+1}"
-
-    def _insert_style_get_common_styles(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.styles.get_element("office:styles")
-        existing = self.styles.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_automatic_styles(
-        self,
-        style: Style,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.content.get_element("office:automatic-styles")
-        # A name ?
-        if name:
-            if hasattr(style, "name"):
-                style.name = name
-            existing = self.content.get_style(family, name)
-        else:
-            self._set_automatic_name(style, family)
-            existing = None
-        return existing, style_container
-
-    def _insert_style_get_default_styles(
-        self,
-        style: Style,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.styles.get_element("office:styles")
-        style.tag = "style:default-style"
-        if name:
-            style.del_attribute("style:name")
-        existing = self.styles.get_style(family)
-        return existing, style_container
-
-    def _insert_style_get_master_page(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.styles.get_element("office:master-styles")
-        existing = self.styles.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_font_face_default(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.styles.get_element("office:font-face-decls")
-        existing = self.styles.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_font_face(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        style_container = self.content.get_element("office:font-face-decls")
-        existing = self.content.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_page_layout(
-        self,
-        family: str,
-        name: str,
-    ) -> tuple[Any, Any]:
-        # force to automatic
-        style_container = self.styles.get_element("office:automatic-styles")
-        existing = self.styles.get_style(family, name)
-        return existing, style_container
-
-    def _insert_style_get_draw_fill_image(
-        self,
-        name: str,
-    ) -> tuple[Any, Any]:
-        # special case for 'draw:fill-image' pseudo style
-        # not family and style_element.__class__.__name__ == "DrawFillImage"
-        style_container = self.styles.get_element("office:styles")
-        existing = self.styles.get_style("", name)
-        return existing, style_container
-
-    def _insert_style_standard(
-        self,
-        style: Style,
-        name: str,
-        family: str,
-        automatic: bool,
-        default: bool,
-    ) -> tuple[Any, Any]:
-        # Common style
-        if name and automatic is False and default is False:
-            return self._insert_style_get_common_styles(family, name)
-        # Automatic style
-        elif automatic is True and default is False:
-            return self._insert_style_get_automatic_styles(style, family, name)
-        # Default style
-        elif automatic is False and default is True:
-            return self._insert_style_get_default_styles(style, family, name)
-        else:
-            raise AttributeError("Invalid combination of arguments")
-
-    def insert_style(  # noqa: C901
-        self,
-        style: Style | str,
-        name: str = "",
-        automatic: bool = False,
-        default: bool = False,
-    ) -> Any:
-        """Insert the given style object in the document, as required by the
-        style family and type.
-
-        The style is expected to be a common style with a name. In case it
-        was created with no name, the given can be set on the fly.
-
-        If automatic is True, the style will be inserted as an automatic
-        style.
-
-        If default is True, the style will be inserted as a default style and
-        would replace any existing default style of the same family. Any name
-        or display name would be ignored.
-
-        Automatic and default arguments are mutually exclusive.
-
-        All styles can't be used as default styles. Default styles are
-        allowed for the following families: paragraph, text, section, table,
-        table-column, table-row, table-cell, table-page, chart, drawing-page,
-        graphic, presentation, control and ruby.
-
-        Arguments:
-
-            style -- Style or str
-
-            name -- str
-
-            automatic -- bool
-
-            default -- bool
-
-        Return : style name -- str
-        """
-
-        # if style is a str, assume it is the Style definition
-        if isinstance(style, str):
-            style_element: Style = Element.from_tag(style)  # type: ignore
-        else:
-            style_element = style
-        if not isinstance(style_element, Element):
-            raise TypeError(f"Unknown Style type: '{style!r}'")
-
-        # Get family and name
-        family = self._pseudo_style_attribute(style_element, "family")
-        if not name:
-            name = self._pseudo_style_attribute(style_element, "name")
-
-        # Master page style
-        if family == "master-page":
-            existing, style_container = self._insert_style_get_master_page(family, name)
-        # Font face declarations
-        elif family == "font-face":
-            if default:
-                existing, style_container = self._insert_style_get_font_face_default(
-                    family, name
-                )
-            else:
-                existing, style_container = self._insert_style_get_font_face(
-                    family, name
-                )
-        # page layout style
-        elif family == "page-layout":
-            existing, style_container = self._insert_style_get_page_layout(family, name)
-        # Common style
-        elif family in FAMILY_ODF_STD or family in {"number"}:
-            existing, style_container = self._insert_style_standard(
-                style_element, name, family, automatic, default
-            )
-        elif not family and style_element.__class__.__name__ == "DrawFillImage":
-            # special case for 'draw:fill-image' pseudo style
-            existing, style_container = self._insert_style_get_draw_fill_image(name)
-        # Invalid style
-        else:
-            raise ValueError(
-                "Invalid style: "
-                f"{style_element}, tag:{style_element.tag}, family:{family}"
-            )
-
-        # Insert it!
-        if existing is not None:
-            style_container.delete(existing)
-        style_container.append(style_element)
-        return self._pseudo_style_attribute(style_element, "name")
-
-    def get_styled_elements(self, name: str = "") -> list[Element]:
-        """Brute-force to find paragraphs, tables, etc. using the given style
-        name (or all by default).
-
-        Arguments:
-
-            name -- str
-
-        Return: list
-        """
-        # Header, footer, etc. have styles too
-        return self.content.root.get_styled_elements(
-            name
-        ) + self.styles.root.get_styled_elements(name)
-
-    def show_styles(
-        self,
-        automatic: bool = True,
-        common: bool = True,
-        properties: bool = False,
-    ) -> str:
-        infos = []
-        for style in self.get_styles():
-            try:
-                name = style.name  # type: ignore
-            except AttributeError:
-                print("--------------")
-                print(style.__class__)
-                print(style.serialize())
-                raise
-            if style.__class__.__name__ == "DrawFillImage":
-                family = ""
-            else:
-                family = str(style.family)  # type: ignore
-            parent = style.parent
-            is_auto = parent and parent.tag == "office:automatic-styles"
-            if is_auto and automatic is False or not is_auto and common is False:
-                continue
-            is_used = bool(self.get_styled_elements(name))
-            infos.append(
-                {
-                    "type": "auto  " if is_auto else "common",
-                    "used": "y" if is_used else "n",
-                    "family": family,
-                    "parent": self._pseudo_style_attribute(style, "parent_style") or "",
-                    "name": name or "",
-                    "display_name": self._pseudo_style_attribute(style, "display_name")
-                    or "",
-                    "properties": style.get_properties() if properties else None,  # type: ignore
-                }
-            )
-        if not infos:
-            return ""
-        # Sort by family and name
-        infos.sort(key=itemgetter("family", "name"))
-        # Show common and used first
-        infos.sort(key=itemgetter("type", "used"), reverse=True)
-        max_family = str(max([len(x["family"]) for x in infos]))  # type: ignore
-        max_parent = str(max([len(x["parent"]) for x in infos]))  # type: ignore
-        formater = (
-            "%(type)s used:%(used)s family:%(family)-0"
-            + max_family
-            + "s parent:%(parent)-0"
-            + max_parent
-            + "s name:%(name)s"
-        )
-        output = []
-        for info in infos:
-            line = formater % info
-            if info["display_name"]:
-                line += " display_name:" + info["display_name"]  # type: ignore
-            output.append(line)
-            if info["properties"]:
-                for name, value in info["properties"].items():  # type: ignore
-                    output.append(f"   - {name}: {value}")
-        output.append("")
-        return "\n".join(output)
-
-    def delete_styles(self) -> int:
-        """Remove all style information from content and all styles.
-
-        Return: number of deleted styles
-        """
-        # First remove references to styles
-        for element in self.get_styled_elements():
-            for attribute in (
-                "text:style-name",
-                "draw:style-name",
-                "draw:text-style-name",
-                "table:style-name",
-                "style:page-layout-name",
-            ):
-                try:
-                    element.del_attribute(attribute)
-                except KeyError:
-                    continue
-        # Then remove supposedly orphaned styles
-        deleted = 0
-        for style in self.get_styles():
-            if style.name is None:  # type: ignore
-                # Don't delete default styles
-                continue
-            # elif type(style) is odf_master_page:
-            #    # Don't suppress header and footer, just styling was removed
-            #    continue
-            style.delete()
-            deleted += 1
-        return deleted
-
-    def merge_styles_from(self, document: Document) -> None:
-        """Copy all the styles of a document into ourself.
-
-        Styles with the same type and name will be replaced, so only unique
-        styles will be preserved.
-        """
-        manifest = self.manifest
-        document_manifest = document.manifest
-        for style in document.get_styles():
-            tagname = style.tag
-            family = self._pseudo_style_attribute(style, "family")
-            stylename = style.name  # type: ignore
-            container = style.parent
-            container_name = container.tag  # type: ignore
-            partname = container.parent.tag  # type: ignore
-            # The destination part
-            if partname == "office:document-styles":
-                part: Content | Styles = self.styles
-            elif partname == "office:document-content":
-                part = self.content
-            else:
-                raise NotImplementedError(partname)
-            # Implemented containers
-            if container_name not in {
-                "office:styles",
-                "office:automatic-styles",
-                "office:master-styles",
-                "office:font-face-decls",
-            }:
-                raise NotImplementedError(container_name)
-            dest = part.get_element(f"//{container_name}")
-            # Implemented style types
-            # if tagname not in registered_styles:
-            #    raise NotImplementedError(tagname)
-            duplicate = part.get_style(family, stylename)
-            if duplicate is not None:
-                duplicate.delete()
-            dest.append(style)
-            # Copy images from the header/footer
-            if tagname == "style:master-page":
-                query = "descendant::draw:image"
-                for image in style.get_elements(query):
-                    url = image.url  # type: ignore
-                    part_url = document.get_part(url)
-                    # Manually add the part to keep the name
-                    self.set_part(url, part_url)  # type: ignore
-                    media_type = document_manifest.get_media_type(url)
-                    manifest.add_full_path(url, media_type)  # type: ignore
-            # Copy images from the fill-image
-            elif tagname == "draw:fill-image":
-                url = style.url  # type: ignore
-                part_url = document.get_part(url)
-                self.set_part(url, part_url)  # type: ignore
-                media_type = document_manifest.get_media_type(url)
-                manifest.add_full_path(url, media_type)  # type: ignore
-
-    def add_page_break_style(self) -> None:
-        """Ensure that the document contains the style required for a manual page break.
-
-        Then a manual page break can be added to the document with:
-            from paragraph import PageBreak
-            ...
-            document.body.append(PageBreak())
-
-        Note: this style uses the property 'fo:break-after', another
-        possibility could be the property 'fo:break-before'
-        """
-        if existing := self.get_style(  # noqa: SIM102
-            family="paragraph",
-            name_or_element="odfdopagebreak",
-        ):
-            if properties := existing.get_properties():  # noqa: SIM102
-                if properties["fo:break-after"] == "page":
-                    return
-        style = (
-            '<style:style style:family="paragraph" style:parent-style-name="Standard" '
-            'style:name="odfdopagebreak">'
-            '<style:paragraph-properties fo:break-after="page"/></style:style>'
-        )
-        self.insert_style(style, automatic=False)
-
-

Static methods

-
-
-def new(template: str | Path | io.BytesIO = 'text') ‑> Document -
-
-

Create a Document from a template.

-

The template argument is expected to be the path to a ODF template.

-

Arguments

-

template – str or Path or file-like (io.BytesIO)

-

Return : ODF document – Document

-
- -Expand source code - -
@classmethod
-def new(cls, template: str | Path | io.BytesIO = "text") -> Document:
-    """Create a Document from a template.
-
-    The template argument is expected to be the path to a ODF template.
-
-    Arguments:
-
-        template -- str or Path or file-like (io.BytesIO)
-
-    Return : ODF document -- Document
-    """
-    container = container_from_template(template)
-    return cls(container)
-
-
-
-

Instance variables

-
-
var bodyElement
-
-

Return the body element of the content part, where actual content -is stored.

-
- -Expand source code - -
@property
-def body(self) -> Element:
-    """Return the body element of the content part, where actual content
-    is stored.
-    """
-    if self.__body is None:
-        self.__body = self.content.body
-    return self.__body
-
-
-
var cloneDocument
-
-

Return an exact copy of the document.

-

Return: Document

-
- -Expand source code - -
@property
-def clone(self) -> Document:
-    """Return an exact copy of the document.
-
-    Return: Document
-    """
-    clone = object.__new__(self.__class__)
-    for name in self.__dict__:
-        if name == "_Document__body":
-            setattr(clone, name, None)
-        elif name == "_Document__xmlparts":
-            setattr(clone, name, {})
-        elif name == "container":
-            if not self.container:
-                raise ValueError("Empty Container")
-            setattr(clone, name, self.container.clone)
-        else:
-            value = deepcopy(getattr(self, name))
-            setattr(clone, name, value)
-    return clone
-
-
-
var contentContent
-
-
-
- -Expand source code - -
@property
-def content(self) -> Content:
-    content: Content | None = self.get_part(ODF_CONTENT)  # type:ignore
-    if content is None:
-        raise ValueError("Empty Content")
-    return content
-
-
-
var manifestManifest
-
-

Return the manifest part (manifest.xml) of the document.

-
- -Expand source code - -
@property
-def manifest(self) -> Manifest:
-    """Return the manifest part (manifest.xml) of the document."""
-    manifest = self.get_part(ODF_MANIFEST)
-    if manifest is None or not isinstance(manifest, Manifest):
-        raise ValueError("Empty Manifest")
-    return manifest
-
-
-
var metaMeta
-
-

Return the meta part (meta.xml) of the document, where meta data -are stored.

-
- -Expand source code - -
@property
-def meta(self) -> Meta:
-    """Return the meta part (meta.xml) of the document, where meta data
-    are stored."""
-    metadata = self.get_part(ODF_META)
-    if metadata is None or not isinstance(metadata, Meta):
-        raise ValueError("Empty Meta")
-    return metadata
-
-
-
var mimetype : str
-
-
-
- -Expand source code - -
@property
-def mimetype(self) -> str:
-    if not self.container:
-        raise ValueError("Empty Container")
-    return self.container.mimetype
-
-
-
var path : pathlib.Path | None
-
-

Shortcut to Document.Container.path.

-
- -Expand source code - -
@property
-def path(self) -> Path | None:
-    """Shortcut to Document.Container.path."""
-    if not self.container:
-        return None
-    return self.container.path
-
-
-
var stylesStyles
-
-
-
- -Expand source code - -
@property
-def styles(self) -> Styles:
-    styles: Styles | None = self.get_part(ODF_STYLES)  # type:ignore
-    if styles is None:
-        raise ValueError("Empty Styles")
-    return styles
-
-
-
-

Methods

-
-
-def add_file(self, path_or_file: str | Path) ‑> str -
-
-

Insert a file from a path or a file-like object in the container.

-

Return the full path to reference in the content.

-

Arguments

-

path_or_file – str or Path or file-like

-

Return: str (URI)

-
- -Expand source code - -
def add_file(self, path_or_file: str | Path) -> str:
-    """Insert a file from a path or a file-like object in the container.
-
-    Return the full path to reference in the content.
-
-    Arguments:
-
-        path_or_file -- str or Path or file-like
-
-    Return: str (URI)
-    """
-    if not self.container:
-        raise ValueError("Empty Container")
-    name = ""
-    # Folder for added files (FIXME hard-coded and copied)
-    manifest = self.manifest
-    medias = manifest.get_paths()
-    # uuid = str(uuid4())
-
-    if isinstance(path_or_file, (str, Path)):
-        path = Path(path_or_file)
-        extension = path.suffix.lower()
-        name = f"{path.stem}{extension}"
-        if posixpath.join("Pictures", name) in medias:
-            name = f"{path.stem}_{uuid4()}{extension}"
-    else:
-        path = None
-        name = getattr(path_or_file, "name", None)
-        if not name:
-            name = str(uuid4())
-    media_type, _encoding = guess_type(name)
-    if not media_type:
-        media_type = "application/octet-stream"
-    if manifest.get_media_type("Pictures/") is None:
-        manifest.add_full_path("Pictures/")
-    full_path = posixpath.join("Pictures", name)
-    if path is None:
-        self.container.set_part(full_path, path_or_file.read())
-    else:
-        self.container.set_part(full_path, path.read_bytes())
-    manifest.add_full_path(full_path, media_type)
-    return full_path
-
-
-
-def add_page_break_style(self) ‑> None -
-
-

Ensure that the document contains the style required for a manual page break.

-

Then a manual page break can be added to the document with: -from paragraph import PageBreak -… -document.body.append(PageBreak())

-

Note: this style uses the property 'fo:break-after', another -possibility could be the property 'fo:break-before'

-
- -Expand source code - -
def add_page_break_style(self) -> None:
-    """Ensure that the document contains the style required for a manual page break.
-
-    Then a manual page break can be added to the document with:
-        from paragraph import PageBreak
-        ...
-        document.body.append(PageBreak())
-
-    Note: this style uses the property 'fo:break-after', another
-    possibility could be the property 'fo:break-before'
-    """
-    if existing := self.get_style(  # noqa: SIM102
-        family="paragraph",
-        name_or_element="odfdopagebreak",
-    ):
-        if properties := existing.get_properties():  # noqa: SIM102
-            if properties["fo:break-after"] == "page":
-                return
-    style = (
-        '<style:style style:family="paragraph" style:parent-style-name="Standard" '
-        'style:name="odfdopagebreak">'
-        '<style:paragraph-properties fo:break-after="page"/></style:style>'
-    )
-    self.insert_style(style, automatic=False)
-
-
-
-def del_part(self, path: str) ‑> None -
-
-

Mark a part for deletion. The path is relative to the archive, -e.g. "Pictures/1003200258912EB1C3.jpg"

-
- -Expand source code - -
def del_part(self, path: str) -> None:
-    """Mark a part for deletion. The path is relative to the archive,
-    e.g. "Pictures/1003200258912EB1C3.jpg"
-    """
-    if not self.container:
-        raise ValueError("Empty Container")
-    path = _get_part_path(path)
-    cls = _get_part_class(path)
-    if path == ODF_MANIFEST or cls is not None:
-        raise ValueError(f"part '{path}' is mandatory")
-    self.container.del_part(path)
-
-
-
-def delete_styles(self) ‑> int -
-
-

Remove all style information from content and all styles.

-

Return: number of deleted styles

-
- -Expand source code - -
def delete_styles(self) -> int:
-    """Remove all style information from content and all styles.
-
-    Return: number of deleted styles
-    """
-    # First remove references to styles
-    for element in self.get_styled_elements():
-        for attribute in (
-            "text:style-name",
-            "draw:style-name",
-            "draw:text-style-name",
-            "table:style-name",
-            "style:page-layout-name",
-        ):
-            try:
-                element.del_attribute(attribute)
-            except KeyError:
-                continue
-    # Then remove supposedly orphaned styles
-    deleted = 0
-    for style in self.get_styles():
-        if style.name is None:  # type: ignore
-            # Don't delete default styles
-            continue
-        # elif type(style) is odf_master_page:
-        #    # Don't suppress header and footer, just styling was removed
-        #    continue
-        style.delete()
-        deleted += 1
-    return deleted
-
-
-
-def get_formated_meta(self) ‑> str -
-
-

Return meta informations as text, with some formatting.

-
- -Expand source code - -
def get_formated_meta(self) -> str:
-    """Return meta informations as text, with some formatting."""
-    result: list[str] = []
-
-    # Simple values
-    def print_info(name: str, value: Any) -> None:
-        if value:
-            result.append(f"{name}: {value}")
-
-    meta = self.meta
-    print_info("Title", meta.get_title())
-    print_info("Subject", meta.get_subject())
-    print_info("Language", meta.get_language())
-    print_info("Modification date", meta.get_modification_date())
-    print_info("Creation date", meta.get_creation_date())
-    print_info("Initial creator", meta.get_initial_creator())
-    print_info("Keyword", meta.get_keywords())
-    print_info("Editing duration", meta.get_editing_duration())
-    print_info("Editing cycles", meta.get_editing_cycles())
-    print_info("Generator", meta.get_generator())
-
-    # Statistic
-    result.append("Statistic:")
-    statistic = meta.get_statistic()
-    if statistic:
-        for name, data in statistic.items():
-            result.append(f"  - {name[5:].replace('-', ' ').capitalize()}: {data}")
-
-    # User defined metadata
-    result.append("User defined metadata:")
-    user_metadata = meta.get_user_defined_metadata()
-    for name, data2 in user_metadata.items():
-        result.append(f"  - {name}: {data2}")
-
-    # And the description
-    print_info("Description", meta.get_description())
-
-    return "\n".join(result) + "\n"
-
-
-
-def get_formatted_text(self, rst_mode: bool = False) ‑> str -
-
-

Return content as text, with some formatting.

-
- -Expand source code - -
def get_formatted_text(self, rst_mode: bool = False) -> str:
-    """Return content as text, with some formatting."""
-    # For the moment, only "type='text'"
-    doc_type = self.get_type()
-    if doc_type == "spreadsheet":
-        return self._tables_csv()
-    if doc_type in {
-        "text",
-        "text-template",
-        "presentation",
-        "presentation-template",
-    }:
-        return self._formatted_text(rst_mode)
-    raise NotImplementedError(f"Type of document '{doc_type}' not supported yet")
-
-
-
-def get_part(self, path: str) ‑> XmlPart | str | bytes | None -
-
-

Return the bytes of the given part. The path is relative to the -archive, e.g. "Pictures/1003200258912EB1C3.jpg".

-

'content', 'meta', 'settings', 'styles' and 'manifest' are shortcuts -to the real path, e.g. content.xml, and return a dedicated object with -its own API.

-

path formated as URI, so always use '/' separator

-
- -Expand source code - -
def get_part(self, path: str) -> XmlPart | str | bytes | None:
-    """Return the bytes of the given part. The path is relative to the
-    archive, e.g. "Pictures/1003200258912EB1C3.jpg".
-
-    'content', 'meta', 'settings', 'styles' and 'manifest' are shortcuts
-    to the real path, e.g. content.xml, and return a dedicated object with
-    its own API.
-
-    path formated as URI, so always use '/' separator
-    """
-    if not self.container:
-        raise ValueError("Empty Container")
-    # "./ObjectReplacements/Object 1"
-    path = path.lstrip("./")
-    path = _get_part_path(path)
-    cls = _get_part_class(path)
-    # Raw bytes
-    if cls is None:
-        return self.container.get_part(path)
-    # XML part
-    part = self.__xmlparts.get(path)
-    if part is None:
-        self.__xmlparts[path] = part = cls(path, self.container)
-    return part
-
-
-
-def get_parts(self) ‑> odfdo.list[str] -
-
-

Return available part names with path inside the archive, e.g. -['content.xml', …, 'Pictures/100000000000032000000258912EB1C3.jpg']

-
- -Expand source code - -
def get_parts(self) -> list[str]:
-    """Return available part names with path inside the archive, e.g.
-    ['content.xml', ..., 'Pictures/100000000000032000000258912EB1C3.jpg']
-    """
-    if not self.container:
-        raise ValueError("Empty Container")
-    return self.container.get_parts()
-
-
-
-def get_style(self, family: str, name_or_element: str | Style | None = None, display_name: str | None = None) ‑> Style | None -
-
-

Return the style uniquely identified by the name/family pair. If -the argument is already a style object, it will return it.

-

If the name is None, the default style is fetched.

-

If the name is not the internal name but the name you gave in a -desktop application, use display_name instead.

-

Arguments

-

family – 'paragraph', 'text', -'graphic', 'table', 'list', -'number', 'page-layout', 'master-page'

-

name – str or Element or None

-

display_name – str

-

Return: Style or None if not found.

-
- -Expand source code - -
def get_style(
-    self,
-    family: str,
-    name_or_element: str | Style | None = None,
-    display_name: str | None = None,
-) -> Style | None:
-    """Return the style uniquely identified by the name/family pair. If
-    the argument is already a style object, it will return it.
-
-    If the name is None, the default style is fetched.
-
-    If the name is not the internal name but the name you gave in a
-    desktop application, use display_name instead.
-
-    Arguments:
-
-        family -- 'paragraph', 'text',  'graphic', 'table', 'list',
-                  'number', 'page-layout', 'master-page'
-
-        name -- str or Element or None
-
-        display_name -- str
-
-    Return: Style or None if not found.
-    """
-    # 1. content.xml
-    element = self.content.get_style(
-        family, name_or_element=name_or_element, display_name=display_name
-    )
-    if element is not None:
-        return element
-    # 2. styles.xml
-    return self.styles.get_style(
-        family,
-        name_or_element=name_or_element,
-        display_name=display_name,
-    )
-
-
-
-def get_styled_elements(self, name: str = '') ‑> odfdo.list[Element] -
-
-

Brute-force to find paragraphs, tables, etc. using the given style -name (or all by default).

-

Arguments

-

name – str

-

Return: list

-
- -Expand source code - -
def get_styled_elements(self, name: str = "") -> list[Element]:
-    """Brute-force to find paragraphs, tables, etc. using the given style
-    name (or all by default).
-
-    Arguments:
-
-        name -- str
-
-    Return: list
-    """
-    # Header, footer, etc. have styles too
-    return self.content.root.get_styled_elements(
-        name
-    ) + self.styles.root.get_styled_elements(name)
-
-
-
-def get_styles(self, family: str | bytes = '', automatic: bool = False) ‑> odfdo.list[Style | Element] -
-
-
-
- -Expand source code - -
def get_styles(
-    self,
-    family: str | bytes = "",
-    automatic: bool = False,
-) -> list[Style | Element]:
-    # compatibility with old versions:
-
-    if isinstance(family, bytes):
-        family = bytes_to_str(family)
-    return self.content.get_styles(family=family) + self.styles.get_styles(
-        family=family, automatic=automatic
-    )
-
-
-
-def get_type(self) ‑> str -
-
-

Get the ODF type (also called class) of this document.

-

Return: 'chart', 'database', 'formula', 'graphics', -'graphics-template', 'image', 'presentation', -'presentation-template', 'spreadsheet', 'spreadsheet-template', -'text', 'text-master', 'text-template' or 'text-web'

-
- -Expand source code - -
def get_type(self) -> str:
-    """Get the ODF type (also called class) of this document.
-
-    Return: 'chart', 'database', 'formula', 'graphics',
-        'graphics-template', 'image', 'presentation',
-        'presentation-template', 'spreadsheet', 'spreadsheet-template',
-        'text', 'text-master', 'text-template' or 'text-web'
-    """
-    # The mimetype must be with the form:
-    # application/vnd.oasis.opendocument.text
-
-    # Isolate and return the last part
-    return self.mimetype.rsplit(".", 1)[-1]
-
-
-
-def insert_style(self, style: Style | str, name: str = '', automatic: bool = False, default: bool = False) ‑> Any -
-
-

Insert the given style object in the document, as required by the -style family and type.

-

The style is expected to be a common style with a name. In case it -was created with no name, the given can be set on the fly.

-

If automatic is True, the style will be inserted as an automatic -style.

-

If default is True, the style will be inserted as a default style and -would replace any existing default style of the same family. Any name -or display name would be ignored.

-

Automatic and default arguments are mutually exclusive.

-

All styles can't be used as default styles. Default styles are -allowed for the following families: paragraph, text, section, table, -table-column, table-row, table-cell, table-page, chart, drawing-page, -graphic, presentation, control and ruby.

-

Arguments

-

style – Style or str

-

name – str

-

automatic – bool

-

default – bool

-

Return : style name – str

-
- -Expand source code - -
def insert_style(  # noqa: C901
-    self,
-    style: Style | str,
-    name: str = "",
-    automatic: bool = False,
-    default: bool = False,
-) -> Any:
-    """Insert the given style object in the document, as required by the
-    style family and type.
-
-    The style is expected to be a common style with a name. In case it
-    was created with no name, the given can be set on the fly.
-
-    If automatic is True, the style will be inserted as an automatic
-    style.
-
-    If default is True, the style will be inserted as a default style and
-    would replace any existing default style of the same family. Any name
-    or display name would be ignored.
-
-    Automatic and default arguments are mutually exclusive.
-
-    All styles can't be used as default styles. Default styles are
-    allowed for the following families: paragraph, text, section, table,
-    table-column, table-row, table-cell, table-page, chart, drawing-page,
-    graphic, presentation, control and ruby.
-
-    Arguments:
-
-        style -- Style or str
-
-        name -- str
-
-        automatic -- bool
-
-        default -- bool
-
-    Return : style name -- str
-    """
-
-    # if style is a str, assume it is the Style definition
-    if isinstance(style, str):
-        style_element: Style = Element.from_tag(style)  # type: ignore
-    else:
-        style_element = style
-    if not isinstance(style_element, Element):
-        raise TypeError(f"Unknown Style type: '{style!r}'")
-
-    # Get family and name
-    family = self._pseudo_style_attribute(style_element, "family")
-    if not name:
-        name = self._pseudo_style_attribute(style_element, "name")
-
-    # Master page style
-    if family == "master-page":
-        existing, style_container = self._insert_style_get_master_page(family, name)
-    # Font face declarations
-    elif family == "font-face":
-        if default:
-            existing, style_container = self._insert_style_get_font_face_default(
-                family, name
-            )
-        else:
-            existing, style_container = self._insert_style_get_font_face(
-                family, name
-            )
-    # page layout style
-    elif family == "page-layout":
-        existing, style_container = self._insert_style_get_page_layout(family, name)
-    # Common style
-    elif family in FAMILY_ODF_STD or family in {"number"}:
-        existing, style_container = self._insert_style_standard(
-            style_element, name, family, automatic, default
-        )
-    elif not family and style_element.__class__.__name__ == "DrawFillImage":
-        # special case for 'draw:fill-image' pseudo style
-        existing, style_container = self._insert_style_get_draw_fill_image(name)
-    # Invalid style
-    else:
-        raise ValueError(
-            "Invalid style: "
-            f"{style_element}, tag:{style_element.tag}, family:{family}"
-        )
-
-    # Insert it!
-    if existing is not None:
-        style_container.delete(existing)
-    style_container.append(style_element)
-    return self._pseudo_style_attribute(style_element, "name")
-
-
-
-def merge_styles_from(self, document: Document) ‑> None -
-
-

Copy all the styles of a document into ourself.

-

Styles with the same type and name will be replaced, so only unique -styles will be preserved.

-
- -Expand source code - -
def merge_styles_from(self, document: Document) -> None:
-    """Copy all the styles of a document into ourself.
-
-    Styles with the same type and name will be replaced, so only unique
-    styles will be preserved.
-    """
-    manifest = self.manifest
-    document_manifest = document.manifest
-    for style in document.get_styles():
-        tagname = style.tag
-        family = self._pseudo_style_attribute(style, "family")
-        stylename = style.name  # type: ignore
-        container = style.parent
-        container_name = container.tag  # type: ignore
-        partname = container.parent.tag  # type: ignore
-        # The destination part
-        if partname == "office:document-styles":
-            part: Content | Styles = self.styles
-        elif partname == "office:document-content":
-            part = self.content
-        else:
-            raise NotImplementedError(partname)
-        # Implemented containers
-        if container_name not in {
-            "office:styles",
-            "office:automatic-styles",
-            "office:master-styles",
-            "office:font-face-decls",
-        }:
-            raise NotImplementedError(container_name)
-        dest = part.get_element(f"//{container_name}")
-        # Implemented style types
-        # if tagname not in registered_styles:
-        #    raise NotImplementedError(tagname)
-        duplicate = part.get_style(family, stylename)
-        if duplicate is not None:
-            duplicate.delete()
-        dest.append(style)
-        # Copy images from the header/footer
-        if tagname == "style:master-page":
-            query = "descendant::draw:image"
-            for image in style.get_elements(query):
-                url = image.url  # type: ignore
-                part_url = document.get_part(url)
-                # Manually add the part to keep the name
-                self.set_part(url, part_url)  # type: ignore
-                media_type = document_manifest.get_media_type(url)
-                manifest.add_full_path(url, media_type)  # type: ignore
-        # Copy images from the fill-image
-        elif tagname == "draw:fill-image":
-            url = style.url  # type: ignore
-            part_url = document.get_part(url)
-            self.set_part(url, part_url)  # type: ignore
-            media_type = document_manifest.get_media_type(url)
-            manifest.add_full_path(url, media_type)  # type: ignore
-
-
-
-def save(self, target: str | Path | io.BytesIO | None = None, packaging: str = 'zip', pretty: bool = False, backup: bool = False) ‑> None -
-
-

Save the document, at the same place it was opened or at the given -target path. Target can also be a file-like object. It can be saved -as a Zip file (default) or as files in a folder (for debugging -purpose). XML parts can be pretty printed.

-

Arguments

-

target – str or file-like object

-

packaging – 'zip' or 'folder'

-

pretty – bool

-

backup – bool

-
- -Expand source code - -
def save(
-    self,
-    target: str | Path | io.BytesIO | None = None,
-    packaging: str = "zip",
-    pretty: bool = False,
-    backup: bool = False,
-) -> None:
-    """Save the document, at the same place it was opened or at the given
-    target path. Target can also be a file-like object. It can be saved
-    as a Zip file (default) or as files in a folder (for debugging
-    purpose). XML parts can be pretty printed.
-
-    Arguments:
-
-        target -- str or file-like object
-
-        packaging -- 'zip' or 'folder'
-
-        pretty -- bool
-
-        backup -- bool
-    """
-    if not self.container:
-        raise ValueError("Empty Container")
-    # Some advertising
-    self.meta.set_generator_default()
-    # Synchronize data with container
-    container = self.container
-    for path, part in self.__xmlparts.items():
-        if part is not None:
-            container.set_part(path, part.serialize(pretty))
-    # Save the container
-    container.save(target, packaging=packaging, backup=backup)
-
-
-
-def set_part(self, path: str, data: bytes) ‑> None -
-
-

Set the bytes of the given part. The path is relative to the -archive, e.g. "Pictures/1003200258912EB1C3.jpg".

-

path formated as URI, so always use '/' separator

-
- -Expand source code - -
def set_part(self, path: str, data: bytes) -> None:
-    """Set the bytes of the given part. The path is relative to the
-    archive, e.g. "Pictures/1003200258912EB1C3.jpg".
-
-    path formated as URI, so always use '/' separator
-    """
-    if not self.container:
-        raise ValueError("Empty Container")
-    # "./ObjectReplacements/Object 1"
-    path = path.lstrip("./")
-    path = _get_part_path(path)
-    cls = _get_part_class(path)
-    # XML part overwritten
-    if cls is not None:
-        with suppress(KeyError):
-            self.__xmlparts[path]
-    self.container.set_part(path, data)
-
-
-
-def show_styles(self, automatic: bool = True, common: bool = True, properties: bool = False) ‑> str -
-
-
-
- -Expand source code - -
def show_styles(
-    self,
-    automatic: bool = True,
-    common: bool = True,
-    properties: bool = False,
-) -> str:
-    infos = []
-    for style in self.get_styles():
-        try:
-            name = style.name  # type: ignore
-        except AttributeError:
-            print("--------------")
-            print(style.__class__)
-            print(style.serialize())
-            raise
-        if style.__class__.__name__ == "DrawFillImage":
-            family = ""
-        else:
-            family = str(style.family)  # type: ignore
-        parent = style.parent
-        is_auto = parent and parent.tag == "office:automatic-styles"
-        if is_auto and automatic is False or not is_auto and common is False:
-            continue
-        is_used = bool(self.get_styled_elements(name))
-        infos.append(
-            {
-                "type": "auto  " if is_auto else "common",
-                "used": "y" if is_used else "n",
-                "family": family,
-                "parent": self._pseudo_style_attribute(style, "parent_style") or "",
-                "name": name or "",
-                "display_name": self._pseudo_style_attribute(style, "display_name")
-                or "",
-                "properties": style.get_properties() if properties else None,  # type: ignore
-            }
-        )
-    if not infos:
-        return ""
-    # Sort by family and name
-    infos.sort(key=itemgetter("family", "name"))
-    # Show common and used first
-    infos.sort(key=itemgetter("type", "used"), reverse=True)
-    max_family = str(max([len(x["family"]) for x in infos]))  # type: ignore
-    max_parent = str(max([len(x["parent"]) for x in infos]))  # type: ignore
-    formater = (
-        "%(type)s used:%(used)s family:%(family)-0"
-        + max_family
-        + "s parent:%(parent)-0"
-        + max_parent
-        + "s name:%(name)s"
-    )
-    output = []
-    for info in infos:
-        line = formater % info
-        if info["display_name"]:
-            line += " display_name:" + info["display_name"]  # type: ignore
-        output.append(line)
-        if info["properties"]:
-            for name, value in info["properties"].items():  # type: ignore
-                output.append(f"   - {name}: {value}")
-    output.append("")
-    return "\n".join(output)
-
-
-
-
-
-class DrawFillImage -(name: str | None = None, display_name: str | None = None, height: str | None = None, width: str | None = None, **kwargs: Any) -
-
-

The "draw:image" element represents an image. An image can be -either: -- A link to an external resource or -- Embedded in the document (Not implemented in this version)

-

Warning: image elements must be stored in a frame "draw:frame", -see Frame().

-

The "draw:fill-image" element specifies a link to a bitmap -resource. Fill image are not available as automatic styles. -The "draw:fill-image" element is usable within the following element: -"office:styles"

-

Arguments

-

name – str

-

display_name – str

-

height – str

-

width – str

-
- -Expand source code - -
class DrawFillImage(DrawImage):
-    _tag = "draw:fill-image"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("display_name", "draw:display-name"),
-        PropDef("name", "draw:name"),
-        PropDef("height", "svg:height"),
-        PropDef("width", "svg:width"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        display_name: str | None = None,
-        height: str | None = None,
-        width: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """The "draw:fill-image" element specifies a link to a bitmap
-        resource. Fill image are not available as automatic styles.
-        The "draw:fill-image" element is usable within the following element:
-        "office:styles"
-
-        Arguments:
-
-            name -- str
-
-            display_name -- str
-
-            height -- str
-
-            width -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-            self.display_name = display_name
-            self.height = height
-            self.width = width
-
-

Ancestors

- -

Instance variables

-
-
var display_name : str | bool | None
-
-

Get/set the attribute draw:display-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var height : str | bool | None
-
-

Get/set the attribute svg:height

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute draw:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var width : str | bool | None
-
-

Get/set the attribute svg:width

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class DrawGroup -(name: str | None = None, draw_id: str | None = None, style: str | None = None, position: tuple | None = None, z_index: int = 0, anchor_type: str | None = None, anchor_page: int | None = None, presentation_style: str | None = None, **kwargs: Any) -
-
-

The DrawGroup "draw:g" element represents a group of drawing shapes.

-

Warning: implementation is currently minimal.

-

Drawing shapes contained by a "draw:g" element that is itself -contained by a "draw:a" element, act as hyperlinks using the -xlink:href attribute of the containing "draw:a" element. If the -included drawing shapes are themselves contained within "draw:a" -elements, then the xlink:href attributes of those "draw:a" elements -act as the hyperlink information for the shapes they contain.

-

The "draw:g" element has the following attributes: draw:caption-id, -draw:class-names, draw:id, draw:name, draw:style-name, draw:z-index, -presentation:class-names, presentation:style-name, svg:y, -table:end-cell-address, table:end-x, table:end-y, -table:table-background, text:anchor-page-number, text:anchor-type, -and xml:id.

-

The "draw:g" element has the following child elements: "dr3d:scene", -"draw:a", "draw:caption", "draw:circle", "draw:connector", -"draw:control", "draw:custom-shape", "draw:ellipse", "draw:frame", -"draw:g", "draw:glue-point", "draw:line", "draw:measure", -"draw:page-thumbnail", "draw:path", "draw:polygon", "draw:polyline", -"draw:rect", "draw:regular-polygon", "office:event-listeners", -"svg:desc" and "svg:title".

-
- -Expand source code - -
class DrawGroup(Element, AnchorMix, ZMix, PosMix):
-    """The DrawGroup "draw:g" element represents a group of drawing shapes.
-
-    Warning: implementation is currently minimal.
-
-    Drawing shapes contained by a "draw:g" element that is itself
-    contained by a "draw:a" element, act as hyperlinks using the
-    xlink:href attribute of the containing "draw:a" element. If the
-    included drawing shapes are themselves contained within "draw:a"
-    elements, then the xlink:href attributes of those "draw:a" elements
-    act as the hyperlink information for the shapes they contain.
-
-    The "draw:g" element has the following attributes: draw:caption-id,
-    draw:class-names, draw:id, draw:name, draw:style-name, draw:z-index,
-    presentation:class-names, presentation:style-name, svg:y,
-    table:end-cell-address, table:end-x, table:end-y,
-    table:table-background, text:anchor-page-number, text:anchor-type,
-    and xml:id.
-
-    The "draw:g" element has the following child elements: "dr3d:scene",
-    "draw:a", "draw:caption", "draw:circle", "draw:connector",
-    "draw:control", "draw:custom-shape", "draw:ellipse", "draw:frame",
-    "draw:g", "draw:glue-point", "draw:line", "draw:measure",
-    "draw:page-thumbnail", "draw:path", "draw:polygon", "draw:polyline",
-    "draw:rect", "draw:regular-polygon", "office:event-listeners",
-    "svg:desc" and "svg:title".
-    """
-
-    _tag = "draw:g"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("draw_id", "draw:id"),
-        PropDef("caption_id", "draw:caption-id"),
-        PropDef("draw_class_names", "draw:class-names"),
-        PropDef("name", "draw:name"),
-        PropDef("style", "draw:style-name"),
-        # ('z_index', 'draw:z-index'),
-        PropDef("presentation_class_names", "presentation:class-names"),
-        PropDef("presentation_style", "presentation:style-name"),
-        PropDef("table_end_cell", "table:end-cell-address"),
-        PropDef("table_end_x", "table:end-x"),
-        PropDef("table_end_y", "table:end-y"),
-        PropDef("table_background", "table:table-background"),
-        # ('anchor_page', 'text:anchor-page-number'),
-        # ('anchor_type', 'text:anchor-type'),
-        PropDef("xml_id", "xml:id"),
-        PropDef("pos_x", "svg:x"),
-        PropDef("pos_y", "svg:y"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        draw_id: str | None = None,
-        style: str | None = None,
-        position: tuple | None = None,
-        z_index: int = 0,
-        anchor_type: str | None = None,
-        anchor_page: int | None = None,
-        presentation_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if z_index is not None:
-                self.z_index = z_index
-            if name:
-                self.name = name
-            if draw_id is not None:
-                self.draw_id = draw_id
-            if style is not None:
-                self.style = style
-            if position is not None:
-                self.position = position
-            if anchor_type:
-                self.anchor_type = anchor_type
-            if anchor_page is not None:
-                self.anchor_page = anchor_page
-            if presentation_style is not None:
-                self.presentation_style = presentation_style
-
-

Ancestors

- -

Instance variables

-
-
var caption_id : str | bool | None
-
-

Get/set the attribute draw:caption-id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var draw_class_names : str | bool | None
-
-

Get/set the attribute draw:class-names

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var draw_id : str | bool | None
-
-

Get/set the attribute draw:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute draw:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var pos_x : str | bool | None
-
-

Get/set the attribute svg:x

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var pos_y : str | bool | None
-
-

Get/set the attribute svg:y

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var presentation_class_names : str | bool | None
-
-

Get/set the attribute presentation:class-names

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var presentation_style : str | bool | None
-
-

Get/set the attribute presentation:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute draw:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var table_background : str | bool | None
-
-

Get/set the attribute table:table-background

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var table_end_cell : str | bool | None
-
-

Get/set the attribute table:end-cell-address

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var table_end_x : str | bool | None
-
-

Get/set the attribute table:end-x

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var table_end_y : str | bool | None
-
-

Get/set the attribute table:end-y

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var xml_id : str | bool | None
-
-

Get/set the attribute xml:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class DrawImage -(url: str = '', xlink_type: str = 'simple', show: str = 'embed', actuate: str = 'onLoad', filter_name: str | None = None, **kwargs: Any) -
-
-

The "draw:image" element represents an image. An image can be -either: -- A link to an external resource or -- Embedded in the document (Not implemented in this version)

-

Warning: image elements must be stored in a frame "draw:frame", -see Frame().

-

Initialisation of an DrawImage.

-

Arguments

-

url – str

-

type – str

-

show – str

-

actuate – str

-

filter_name – str

-
- -Expand source code - -
class DrawImage(Element):
-    """The "draw:image" element represents an image. An image can be
-    either:
-    - A link to an external resource or
-    - Embedded in the document (Not implemented in this version)
-
-    Warning: image elements must be stored in a frame "draw:frame",
-    see Frame().
-    """
-
-    _tag = "draw:image"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("url", "xlink:href"),
-        PropDef("type", "xlink:type"),
-        PropDef("show", "xlink:show"),
-        PropDef("actuate", "xlink:actuate"),
-        PropDef("filter_name", "draw:filter-name"),
-    )
-
-    def __init__(
-        self,
-        url: str = "",
-        xlink_type: str = "simple",
-        show: str = "embed",
-        actuate: str = "onLoad",
-        filter_name: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Initialisation of an DrawImage.
-
-        Arguments:
-
-            url -- str
-
-            type -- str
-
-            show -- str
-
-            actuate -- str
-
-            filter_name -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.url = url
-            self.type = xlink_type
-            self.show = show
-            self.actuate = actuate
-            self.filter_name = filter_name
-
-

Ancestors

- -

Subclasses

- -

Instance variables

-
-
var actuate : str | bool | None
-
-

Get/set the attribute xlink:actuate

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var filter_name : str | bool | None
-
-

Get/set the attribute draw:filter-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var show : str | bool | None
-
-

Get/set the attribute xlink:show

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var type : str | bool | None
-
-

Get/set the attribute xlink:type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var url : str | bool | None
-
-

Get/set the attribute xlink:href

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class DrawPage -(draw_id: str | None = None, name: str | None = None, master_page: str | None = None, presentation_page_layout: str | None = None, style: str | None = None, **kwargs: Any) -
-
-

ODF draw page "draw:page", for pages of presentation and drawings.

-

Arguments

-

draw_id – str

-

name – str

-

master_page – str

-

presentation_page_layout – str

-

style – str

-
- -Expand source code - -
class DrawPage(Element):
-    """ODF draw page "draw:page", for pages of presentation and drawings."""
-
-    _tag = "draw:page"
-    _properties = (
-        PropDef("name", "draw:name"),
-        PropDef("draw_id", "draw:id"),
-        PropDef("master_page", "draw:master-page-name"),
-        PropDef(
-            "presentation_page_layout", "presentation:presentation-page-layout-name"
-        ),
-        PropDef("style", "draw:style-name"),
-    )
-
-    def __init__(
-        self,
-        draw_id: str | None = None,
-        name: str | None = None,
-        master_page: str | None = None,
-        presentation_page_layout: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """
-        Arguments:
-
-            draw_id -- str
-
-            name -- str
-
-            master_page -- str
-
-            presentation_page_layout -- str
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if draw_id:
-                self.draw_id = draw_id
-            if name:
-                self.name = name
-            if master_page:
-                self.master_page = master_page
-            if presentation_page_layout:
-                self.presentation_page_layout = presentation_page_layout
-            if style:
-                self.style = style
-
-    def set_transition(
-        self,
-        smil_type: str,
-        subtype: str | None = None,
-        dur: str = "2s",
-    ) -> None:
-        # Create the new animation
-        anim_page = AnimPar(presentation_node_type="timing-root")
-        anim_begin = AnimPar(smil_begin=f"{self.draw_id}.begin")
-        transition = AnimTransFilter(
-            smil_dur=dur, smil_type=smil_type, smil_subtype=subtype
-        )
-        anim_page.append(anim_begin)
-        anim_begin.append(transition)
-
-        # Replace when already a transition:
-        #   anim:seq => After the frame's transition
-        #   cf page 349 of OpenDocument-v1.0-os.pdf
-        #   Conclusion: We must delete the first child 'anim:par'
-        existing = self.get_element("anim:par")
-        if existing:
-            self.delete(existing)
-        self.append(anim_page)
-
-    def get_shapes(self) -> list[Element]:
-        query = "(descendant::" + "|descendant::".join(registered_shapes) + ")"
-        return self.get_elements(query)
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        result: list[str] = []
-        for child in self.children:
-            if child.tag == "presentation:notes":
-                # No need for an advanced odf_notes.get_formatted_text()
-                # because the text seems to be only contained in paragraphs
-                # and frames, that we already handle
-                for sub_child in child.children:
-                    result.append(sub_child.get_formatted_text(context))
-                result.append("\n")
-            result.append(child.get_formatted_text(context))
-        result.append("\n")
-        return "".join(result)
-
-

Ancestors

- -

Instance variables

-
-
var draw_id : str | bool | None
-
-

Get/set the attribute draw:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var master_page : str | bool | None
-
-

Get/set the attribute draw:master-page-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute draw:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var presentation_page_layout : str | bool | None
-
-

Get/set the attribute presentation:presentation-page-layout-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute draw:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def get_shapes(self) ‑> odfdo.list[Element] -
-
-
-
- -Expand source code - -
def get_shapes(self) -> list[Element]:
-    query = "(descendant::" + "|descendant::".join(registered_shapes) + ")"
-    return self.get_elements(query)
-
-
-
-def set_transition(self, smil_type: str, subtype: str | None = None, dur: str = '2s') ‑> None -
-
-
-
- -Expand source code - -
def set_transition(
-    self,
-    smil_type: str,
-    subtype: str | None = None,
-    dur: str = "2s",
-) -> None:
-    # Create the new animation
-    anim_page = AnimPar(presentation_node_type="timing-root")
-    anim_begin = AnimPar(smil_begin=f"{self.draw_id}.begin")
-    transition = AnimTransFilter(
-        smil_dur=dur, smil_type=smil_type, smil_subtype=subtype
-    )
-    anim_page.append(anim_begin)
-    anim_begin.append(transition)
-
-    # Replace when already a transition:
-    #   anim:seq => After the frame's transition
-    #   cf page 349 of OpenDocument-v1.0-os.pdf
-    #   Conclusion: We must delete the first child 'anim:par'
-    existing = self.get_element("anim:par")
-    if existing:
-        self.delete(existing)
-    self.append(anim_page)
-
-
-
-

Inherited members

- -
-
-class Element -(**kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class Element(CachedElement):
-    """Super class of all ODF classes.
-
-    Representation of an XML element. Abstraction of the XML library behind.
-    """
-
-    _tag: str = ""
-    _caching: bool = False
-    _properties: tuple[PropDef, ...] = ()
-
-    def __init__(self, **kwargs: Any) -> None:
-        tag_or_elem = kwargs.pop("tag_or_elem", None)
-        if tag_or_elem is None:
-            # Instance for newly created object: create new lxml element and
-            # continue by subclass __init__
-            # If the tag key word exists, make a custom element
-            self._do_init = True
-            tag = kwargs.pop("tag", self._tag)
-            self.__element = self.make_etree_element(tag)
-        else:
-            # called with an existing lxml element, sould be a result of
-            # from_tag() casting, do not execute the subclass __init__
-            if not isinstance(tag_or_elem, _Element):
-                raise TypeError(f'"{type(tag_or_elem)}" is not an element node')
-            self._do_init = False
-            self.__element = tag_or_elem
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} tag={self.tag}>"
-
-    def __str__(self) -> str:
-        return self.text_recursive
-
-    @classmethod
-    def from_tag(cls, tag_or_elem: str | _Element) -> Element:
-        """Element class and subclass factory.
-
-        Turn an lxml Element or ODF string tag into an ODF XML Element
-        of the relevant class.
-
-        Arguments:
-
-            tag_or_elem -- ODF str tag or lxml.Element
-
-        Return: Element (or subclass) instance
-        """
-        if isinstance(tag_or_elem, str):
-            # assume the argument is a prefix:name tag
-            elem = cls.make_etree_element(tag_or_elem)
-        else:
-            elem = tag_or_elem
-        klass = _class_registry.get(elem.tag, cls)
-        return klass(tag_or_elem=elem)
-
-    @classmethod
-    def from_tag_for_clone(
-        cls: type,
-        tree_element: _Element,
-        cache: tuple | None,
-    ) -> Element:
-        tag = to_str(tree_element.tag)
-        klass = _class_registry.get(tag, cls)
-        element = klass(tag_or_elem=tree_element)
-        if cache and element._caching:
-            element._tmap = cache[0]
-            element._cmap = cache[1]
-            if len(cache) == 3:
-                element._rmap = cache[2]
-        return element
-
-    @staticmethod
-    def make_etree_element(tag: str) -> _Element:
-        if not isinstance(tag, str):
-            raise TypeError(f"Tag is not str: {tag!r}")
-        tag = tag.strip()
-        if not tag:
-            raise ValueError("Tag is empty")
-        if "<" not in tag:
-            # Qualified name
-            # XXX don't build the element from scratch or lxml will pollute with
-            # repeated namespace declarations
-            tag = f"<{tag}/>"
-        # XML fragment
-        root = fromstring(NAMESPACES_XML % str_to_bytes(tag))
-        return root[0]
-
-    @staticmethod
-    def _generic_attrib_getter(attr_name: str, family: str | None = None) -> Callable:
-        name = _get_lxml_tag(attr_name)
-
-        def getter(self: Element) -> str | bool | None:
-            try:
-                if family and self.family != family:  # type: ignore
-                    return None
-            except AttributeError:
-                return None
-            value = self.__element.get(name)
-            if value is None:
-                return None
-            elif value in ("true", "false"):
-                return Boolean.decode(value)
-            return str(value)
-
-        return getter
-
-    @staticmethod
-    def _generic_attrib_setter(attr_name: str, family: str | None = None) -> Callable:
-        name = _get_lxml_tag(attr_name)
-
-        def setter(self: Element, value: Any) -> None:
-            try:
-                if family and self.family != family:  # type: ignore
-                    return None
-            except AttributeError:
-                return None
-            if value is None:
-                with contextlib.suppress(KeyError):
-                    del self.__element.attrib[name]
-                return
-            if isinstance(value, bool):
-                value = Boolean.encode(value)
-            self.__element.set(name, str(value))
-
-        return setter
-
-    @classmethod
-    def _define_attribut_property(cls: type[Element]) -> None:
-        for prop in cls._properties:
-            setattr(
-                cls,
-                prop.name,
-                property(
-                    cls._generic_attrib_getter(prop.attr, prop.family or None),
-                    cls._generic_attrib_setter(prop.attr, prop.family or None),
-                    None,
-                    f"Get/set the attribute {prop.attr}",
-                ),
-            )
-
-    @staticmethod
-    def _make_before_regex(
-        before: str | None,
-        after: str | None,
-    ) -> re.Pattern:
-        # 1) before xor after is not None
-        if before is not None:
-            return re.compile(before)
-        else:
-            if after is None:
-                raise ValueError("Both 'before' and 'after' are None")
-            return re.compile(after)
-
-    @staticmethod
-    def _search_negative_position(
-        xpath_result: list,
-        regex: re.Pattern,
-    ) -> tuple[str, re.Match]:
-        # Found the last text that matches the regex
-        text = None
-        for a_text in xpath_result:
-            if regex.search(str(a_text)) is not None:
-                text = a_text
-        if text is None:
-            raise ValueError(f"Text not found: '{xpath_result}'")
-        if not isinstance(text, str):
-            raise TypeError(f"Text not found or text not of type str: '{text}'")
-        return text, list(regex.finditer(text))[-1]
-
-    @staticmethod
-    def _search_positive_position(
-        xpath_result: list,
-        regex: re.Pattern,
-        position: int,
-    ) -> tuple[str, re.Match]:
-        # Found the last text that matches the regex
-        count = 0
-        for text in xpath_result:
-            found_nb = len(regex.findall(str(text)))
-            if found_nb + count >= position + 1:
-                break
-            count += found_nb
-        else:
-            raise ValueError(f"Text not found: '{xpath_result}'")
-        if not isinstance(text, str):
-            raise TypeError(f"Text not found or text not of type str: '{text}'")
-        return text, list(regex.finditer(text))[position - count]
-
-    def _insert_before_after(
-        self,
-        current: _Element,
-        element: _Element,
-        before: str | None,
-        after: str | None,
-        position: int,
-        xpath_text: XPath,
-    ) -> tuple[int, str]:
-        regex = self._make_before_regex(before, after)
-        xpath_result = xpath_text(current)
-        if not isinstance(xpath_result, list):
-            raise TypeError("Bad XPath result")
-        # position = -1
-        if position < 0:
-            text, sre = self._search_negative_position(xpath_result, regex)
-        # position >= 0
-        else:
-            text, sre = self._search_positive_position(xpath_result, regex, position)
-        # Compute pos
-        if before is None:
-            pos = sre.end()
-        else:
-            pos = sre.start()
-        return pos, text
-
-    def _insert_find_text(
-        self,
-        current: _Element,
-        element: _Element,
-        before: str | None,
-        after: str | None,
-        position: int,
-        xpath_text: XPath,
-    ) -> tuple[int, str]:
-        # Find the text
-        xpath_result = xpath_text(current)
-        if not isinstance(xpath_result, list):
-            raise TypeError("Bad XPath result")
-        count = 0
-        for text in xpath_result:
-            if not isinstance(text, str):
-                continue
-            found_nb = len(text)
-            if found_nb + count >= position:
-                break
-            count += found_nb
-        else:
-            raise ValueError("Text not found")
-        # We insert before the character
-        pos = position - count
-        return pos, text
-
-    def _insert(
-        self,
-        element: Element,
-        before: str | None = None,
-        after: str | None = None,
-        position: int = 0,
-        main_text: bool = False,
-    ) -> None:
-        """Insert an element before or after the characters in the text which
-        match the regex before/after.
-
-        When the regex matches more of one part of the text, position can be
-        set to choice which part must be used. If before and after are None,
-        we use only position that is the number of characters. If position is
-        positive and before=after=None, we insert before the position
-        character. But if position=-1, we insert after the last character.
-
-
-        Arguments:
-
-        element -- Element
-
-        before -- str regex
-
-        after -- str regex
-
-        position -- int
-        """
-        # not implemented: if main_text is True, filter out the annotations texts in computation.
-        current = self.__element
-        xelement = element.__element
-
-        if main_text:
-            xpath_text = _xpath_text_main_descendant
-        else:
-            xpath_text = _xpath_text_descendant
-
-        # 1) before xor after is not None
-        if (before is not None) ^ (after is not None):
-            pos, text = self._insert_before_after(
-                current,
-                xelement,
-                before,
-                after,
-                position,
-                xpath_text,
-            )
-        # 2) before=after=None => only with position
-        elif before is None and after is None:
-            # Hack if position is negative => quickly
-            if position < 0:
-                current.append(xelement)
-                return
-            pos, text = self._insert_find_text(
-                current,
-                xelement,
-                before,
-                after,
-                position,
-                xpath_text,
-            )
-        else:
-            raise ValueError("bad combination of arguments")
-
-        # Compute new texts
-        text_before = text[:pos] if text[:pos] else None
-        text_after = text[pos:] if text[pos:] else None
-
-        # Insert!
-        parent = text.getparent()  # type: ignore
-        if text.is_text:  # type: ignore
-            parent.text = text_before
-            element.tail = text_after
-            parent.insert(0, xelement)
-        else:
-            parent.addnext(xelement)
-            parent.tail = text_before
-            element.tail = text_after
-
-    def _insert_between(  # noqa: C901
-        self,
-        element: Element,
-        from_: str,
-        to: str,
-    ) -> None:
-        """Insert the given empty element to wrap the text beginning with
-        "from_" and ending with "to".
-
-        Example 1: '<p>toto tata titi</p>
-
-        We want to insert a link around "tata".
-
-        Result 1: '<p>toto <a>tata</a> titi</p>
-
-        Example 2: '<p><span>toto</span> tata titi</p>
-
-        We want to insert a link around "tata".
-
-        Result 2: '<p><span>toto</span> <a>tata</a> titi</p>
-
-        Example 3: '<p>toto <span> tata </span> titi</p>'
-
-        We want to insert a link from "tata" to "titi" included.
-
-        Result 3: '<p>toto <span> </span>'
-                  '<a><span>tata </span> titi</a></p>'
-
-        Example 4: '<p>toto <span>tata titi</span> tutu</p>'
-
-        We want to insert a link from "titi" to "tutu"
-
-        Result 4: '<p>toto <span>tata </span><a><span>titi</span></a>'
-                  '<a> tutu</a></p>'
-
-        Example 5: '<p>toto <span>tata titi</span> '
-                   '<span>tutu tyty</span></p>'
-
-        We want to insert a link from "titi" to "tutu"
-
-        Result 5: '<p>toto <span>tata </span><a><span>titi</span><a> '
-                  '<a> <span>tutu</span></a><span> tyty</span></p>'
-        """
-        current = self.__element
-        wrapper = element.__element
-
-        xpath_result = _xpath_text_descendant(current)
-        if not isinstance(xpath_result, list):
-            raise TypeError("Bad XPath result")
-
-        for text in xpath_result:
-            if not isinstance(text, str):
-                raise TypeError("Text not found or text not of type str")
-            if from_ not in text:
-                continue
-            from_index = text.index(from_)
-            text_before = text[:from_index]
-            text_after = text[from_index:]
-            from_container = text.getparent()  # type: ignore
-            if not isinstance(from_container, _Element):
-                raise TypeError("Bad XPath result")
-            # Include from_index to match a single word
-            to_index = text.find(to, from_index)
-            if to_index >= 0:
-                # Simple case: "from" and "to" in the same element
-                to_end = to_index + len(to)
-                if text.is_text:  # type: ignore
-                    from_container.text = text_before
-                    wrapper.text = text[to_index:to_end]
-                    wrapper.tail = text[to_end:]
-                    from_container.insert(0, wrapper)
-                else:
-                    from_container.tail = text_before
-                    wrapper.text = text[to_index:to_end]
-                    wrapper.tail = text[to_end:]
-                    parent = from_container.getparent()
-                    index = parent.index(from_container)  # type: ignore
-                    parent.insert(index + 1, wrapper)  # type: ignore
-                return
-            else:
-                # Exit to the second part where we search for the end text
-                break
-        else:
-            raise ValueError("Start text not found")
-
-        # The container is split in two
-        container2 = deepcopy(from_container)
-        if text.is_text:  # type: ignore
-            from_container.text = text_before
-            from_container.tail = None
-            container2.text = text_after
-            from_container.tail = None
-        else:
-            from_container.tail = text_before
-            container2.tail = text_after
-        # Stack the copy into the surrounding element
-        wrapper.append(container2)
-        parent = from_container.getparent()
-        index = parent.index(from_container)  # type: ignore
-        parent.insert(index + 1, wrapper)  # type: ignore
-
-        xpath_result = _xpath_text_descendant(wrapper)
-        if not isinstance(xpath_result, list):
-            raise TypeError("Bad XPath result")
-
-        for text in xpath_result:
-            if not isinstance(text, str):
-                raise TypeError("Text not found or text not of type str")
-            if to not in text:
-                continue
-            to_end = text.index(to) + len(to)
-            text_before = text[:to_end]
-            text_after = text[to_end:]
-            container_to = text.getparent()  # type: ignore
-            if not isinstance(container_to, _Element):
-                raise TypeError("Bad XPath result")
-            if text.is_text:  # type: ignore
-                container_to.text = text_before
-                container_to.tail = text_after
-            else:
-                container_to.tail = text_before
-                next_one = container_to.getnext()
-                if next_one is None:
-                    next_one = container_to.getparent()
-                next_one.tail = text_after  # type: ignore
-            return
-        raise ValueError("End text not found")
-
-    @property
-    def tag(self) -> str:
-        """Get/set the underlying xml tag with the given qualified name.
-
-        Warning: direct change of tag does not change the element class.
-
-        Arguments:
-
-            qname -- str (e.g. "text:span")
-        """
-        return _get_prefixed_name(self.__element.tag)
-
-    @tag.setter
-    def tag(self, qname: str) -> None:
-        self.__element.tag = _get_lxml_tag(qname)
-
-    def elements_repeated_sequence(
-        self,
-        xpath_instance: XPath,
-        name: str,
-    ) -> list[tuple[int, int]]:
-        """Utility method for table module."""
-        lxml_tag = _get_lxml_tag_or_name(name)
-        element = self.__element
-        sub_elements = xpath_instance(element)
-        if not isinstance(sub_elements, list):
-            raise TypeError("Bad XPath result.")
-        result: list[tuple[int, int]] = []
-        idx = -1
-        for sub_element in sub_elements:
-            if not isinstance(sub_element, _Element):
-                continue
-            idx += 1
-            value = sub_element.get(lxml_tag)
-            if value is None:
-                result.append((idx, 1))
-                continue
-            try:
-                int_value = int(value)
-            except ValueError:
-                int_value = 1
-            result.append((idx, max(int_value, 1)))
-        return result
-
-    def get_elements(self, xpath_query: XPath | str) -> list[Element]:
-        cache: tuple | None = None
-        element = self.__element
-        if isinstance(xpath_query, str):
-            new_xpath_query = xpath_compile(xpath_query)
-            result = new_xpath_query(element)
-        else:
-            result = xpath_query(element)
-        if not isinstance(result, list):
-            raise TypeError("Bad XPath result")
-
-        if hasattr(self, "_tmap"):
-            if hasattr(self, "_rmap"):
-                cache = (self._tmap, self._cmap, self._rmap)
-            else:
-                cache = (self._tmap, self._cmap)
-        return [
-            Element.from_tag_for_clone(e, cache)
-            for e in result
-            if isinstance(e, _Element)
-        ]
-
-    # fixme : need original get_element as wrapper of get_elements
-
-    def get_element(self, xpath_query: XPath | str) -> Element | None:
-        element = self.__element
-        result = element.xpath(f"({xpath_query})[1]", namespaces=ODF_NAMESPACES)
-        if result:
-            return Element.from_tag(result[0])  # type:ignore
-        return None
-
-    def _get_element_idx(self, xpath_query: XPath | str, idx: int) -> Element | None:
-        element = self.__element
-        result = element.xpath(f"({xpath_query})[{idx + 1}]", namespaces=ODF_NAMESPACES)
-        if result:
-            return Element.from_tag(result[0])  # type:ignore
-        return None
-
-    def _get_element_idx2(self, xpath_instance: XPath, idx: int) -> Element | None:
-        element = self.__element
-        result = xpath_instance(element, idx=idx + 1)
-        if result:
-            return Element.from_tag(result[0])  # type:ignore
-        return None
-
-    @property
-    def attributes(self) -> dict[str, str]:
-        return {
-            _get_prefixed_name(str(key)): str(value)
-            for key, value in self.__element.attrib.items()
-        }
-
-    def get_attribute(self, name: str) -> str | bool | None:
-        """Return the attribute value as type str | bool | None."""
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        value = element.get(lxml_tag)
-        if value is None:
-            return None
-        elif value in ("true", "false"):
-            return Boolean.decode(value)
-        return str(value)
-
-    def get_attribute_integer(self, name: str) -> int | None:
-        """Return either the attribute as type int, or None."""
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        value = element.get(lxml_tag)
-        if value is None:
-            return None
-        try:
-            return int(value)
-        except ValueError:
-            return None
-
-    def get_attribute_string(self, name: str) -> str | None:
-        """Return either the attribute as type str, or None."""
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        value = element.get(lxml_tag)
-        if value is None:
-            return None
-        return str(value)
-
-    def set_attribute(self, name: str, value: bool | str | None) -> None:
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        if isinstance(value, bool):
-            value = Boolean.encode(value)
-        elif value is None:
-            with contextlib.suppress(KeyError):
-                del element.attrib[lxml_tag]
-            return
-        element.set(lxml_tag, str(value))
-
-    def set_style_attribute(self, name: str, value: Element | str) -> None:
-        """Shortcut to accept a style object as a value."""
-        if isinstance(value, Element):
-            value = str(value.name)  # type:ignore
-        return self.set_attribute(name, value)
-
-    def del_attribute(self, name: str) -> None:
-        element = self.__element
-        lxml_tag = _get_lxml_tag_or_name(name)
-        del element.attrib[lxml_tag]
-
-    @property
-    def text(self) -> str:
-        """Get / set the text content of the element."""
-        return self.__element.text or ""
-
-    @text.setter
-    def text(self, text: str | None) -> None:
-        if text is None:
-            text = ""
-        try:
-            self.__element.text = text
-        except TypeError as e:
-            raise TypeError(f'Str type expected: "{type(text)}"') from e
-
-    @property
-    def text_recursive(self) -> str:
-        return "".join(str(x) for x in self.__element.itertext())
-
-    @property
-    def tail(self) -> str | None:
-        """Get / set the text immediately following the element."""
-        return self.__element.tail
-
-    @tail.setter
-    def tail(self, text: str | None) -> None:
-        self.__element.tail = text or ""
-
-    def search(self, pattern: str) -> int | None:
-        """Return the first position of the pattern in the text content of
-        the element, or None if not found.
-
-        Python regular expression syntax applies.
-
-        Arguments:
-
-            pattern -- str
-
-        Return: int or None
-        """
-        match = re.search(pattern, self.text_recursive)
-        if match is None:
-            return None
-        return match.start()
-
-    def match(self, pattern: str) -> bool:
-        """return True if the pattern is found one or more times anywhere in
-        the text content of the element.
-
-        Python regular expression syntax applies.
-
-        Arguments:
-
-            pattern -- str
-
-        Return: bool
-        """
-        return self.search(pattern) is not None
-
-    def replace(self, pattern: str, new: str | None = None) -> int:
-        """Replace the pattern with the given text, or delete if text is an
-        empty string, and return the number of replacements. By default, only
-        return the number of occurences that would be replaced.
-
-        It cannot replace patterns found across several element, like a word
-        split into two consecutive spans.
-
-        Python regular expression syntax applies.
-
-        Arguments:
-
-            pattern -- str
-
-            new -- str
-
-        Return: int
-        """
-        if not isinstance(pattern, str):
-            # Fail properly if the pattern is an non-ascii bytestring
-            pattern = str(pattern)
-        cpattern = re.compile(pattern)
-        count = 0
-        for text in self.xpath("descendant::text()"):
-            if new is None:
-                count += len(cpattern.findall(str(text)))
-            else:
-                new_text, number = cpattern.subn(new, str(text))
-                container = text.parent
-                if text.is_text():  # type: ignore
-                    container.text = new_text  # type: ignore
-                else:
-                    container.tail = new_text  # type: ignore
-                count += number
-        return count
-
-    @property
-    def root(self) -> Element:
-        element = self.__element
-        tree = element.getroottree()
-        root = tree.getroot()
-        return Element.from_tag(root)
-
-    @property
-    def parent(self) -> Element | None:
-        element = self.__element
-        parent = element.getparent()
-        if parent is None:
-            # Already at root
-            return None
-        return Element.from_tag(parent)
-
-    @property
-    def is_bound(self) -> bool:
-        return self.parent is not None
-
-    # def get_next_sibling(self):
-    #     element = self.__element
-    #     next_one = element.getnext()
-    #     if next_one is None:
-    #         return None
-    #     return Element.from_tag(next_one)
-    #
-    # def get_prev_sibling(self):
-    #     element = self.__element
-    #     prev = element.getprevious()
-    #     if prev is None:
-    #         return None
-    #     return Element.from_tag(prev)
-
-    @property
-    def children(self) -> list[Element]:
-        element = self.__element
-        return [
-            Element.from_tag(e)
-            for e in element.iterchildren()
-            if isinstance(e, _Element)
-        ]
-
-    def index(self, child: Element) -> int:
-        """Return the position of the child in this element.
-
-        Inspired by lxml
-        """
-        return self.__element.index(child.__element)
-
-    @property
-    def text_content(self) -> str:
-        """Get / set the text of the embedded paragraph, including embeded
-        annotations, cells...
-
-        Set create a paragraph if missing
-        """
-        return "\n".join(
-            child.text_recursive for child in self.get_elements("descendant::text:p")
-        )
-
-    @text_content.setter
-    def text_content(self, text: str | None) -> None:
-        paragraphs = self.get_elements("text:p")
-        if not paragraphs:
-            # E.g., text:p in draw:text-box in draw:frame
-            paragraphs = self.get_elements("*/text:p")
-        if paragraphs:
-            paragraph = paragraphs.pop(0)
-            for obsolete in paragraphs:
-                obsolete.delete()
-        else:
-            paragraph = Element.from_tag("text:p")
-            self.insert(paragraph, FIRST_CHILD)
-        # As "text_content" returned all text nodes, "text_content"
-        # will overwrite all text nodes and children that may contain them
-        element = paragraph.__element
-        # Clear but the attributes
-        del element[:]
-        element.text = text
-
-    def _erase_text_content(self) -> None:
-        paragraphs = self.get_elements("text:p")
-        if not paragraphs:
-            # E.g., text:p in draw:text-box in draw:frame
-            paragraphs = self.get_elements("*/text:p")
-        if paragraphs:
-            paragraphs.pop(0)
-            for obsolete in paragraphs:
-                obsolete.delete()
-
-    def is_empty(self) -> bool:
-        """Check if the element is empty : no text, no children, no tail.
-
-        Return: Boolean
-        """
-        element = self.__element
-        if element.tail is not None:
-            return False
-        if element.text is not None:
-            return False
-        if list(element.iterchildren()):
-            return False
-        return True
-
-    def _get_successor(self, target: Element) -> tuple[Element | None, Element | None]:
-        element = self.__element
-        next_one = element.getnext()
-        if next_one is not None:
-            return Element.from_tag(next_one), target
-        parent = self.parent
-        if parent is None:
-            return None, None
-        return parent._get_successor(target.parent)  # type:ignore
-
-    def _get_between_base(  # noqa:C901
-        self,
-        tag1: Element,
-        tag2: Element,
-    ) -> list[Element]:
-        def find_any_id(elem: Element) -> tuple[str, str, str]:
-            elem_tag = elem.tag
-            for attribute in (
-                "text:id",
-                "text:change-id",
-                "text:name",
-                "office:name",
-                "text:ref-name",
-                "xml:id",
-            ):
-                idx = elem.get_attribute(attribute)
-                if idx is not None:
-                    return elem_tag, attribute, str(idx)
-            raise ValueError(f"No Id found in {elem.serialize()}")
-
-        def common_ancestor(
-            tag1: str,
-            attr1: str,
-            val1: str,
-            tag2: str,
-            attr2: str,
-            val2: str,
-        ) -> Element | None:
-            root = self.root
-            request1 = f'descendant::{tag1}[@{attr1}="{val1}"]'
-            request2 = f'descendant::{tag2}[@{attr2}="{val2}"]'
-            ancestor = root.xpath(request1)[0]
-            if ancestor is None:
-                return None
-            while True:
-                # print "up",
-                new_ancestor = ancestor.parent
-                if new_ancestor is None:
-                    return None
-                has_tag2 = new_ancestor.xpath(request2)
-                ancestor = new_ancestor
-                if not has_tag2:
-                    continue
-                # print 'found'
-                break
-            # print up.serialize()
-            return ancestor
-
-        elem1_tag, elem1_attr, elem1_val = find_any_id(tag1)
-        elem2_tag, elem2_attr, elem2_val = find_any_id(tag2)
-        ancestor_result = common_ancestor(
-            elem1_tag,
-            elem1_attr,
-            elem1_val,
-            elem2_tag,
-            elem2_attr,
-            elem2_val,
-        )
-        if ancestor_result is None:
-            raise RuntimeError(f"No common ancestor for {elem1_tag} {elem2_tag}")
-        ancestor = ancestor_result.clone
-        path1 = f'{elem1_tag}[@{elem1_attr}="{elem1_val}"]'
-        path2 = f'{elem2_tag}[@{elem2_attr}="{elem2_val}"]'
-        result = ancestor.clone
-        for child in result.children:
-            result.delete(child)
-        result.text = ""
-        result.tail = ""
-        target = result
-        current = ancestor.children[0]
-
-        state = 0
-        while True:
-            if current is None:
-                raise RuntimeError(f"No current ancestor for {elem1_tag} {elem2_tag}")
-            # print 'current', state, current.serialize()
-            if state == 0:  # before tag 1
-                if current.xpath(f"descendant-or-self::{path1}"):
-                    if current.xpath(f"self::{path1}"):
-                        tail = current.tail
-                        if tail:
-                            # got a tail => the parent should be either t:p or t:h
-                            target.text = tail  # type: ignore
-                        current, target = current._get_successor(target)  # type: ignore
-                        state = 1
-                        continue
-                    # got T1 in chidren, need further analysis
-                    new_target = current.clone
-                    for child in new_target.children:
-                        new_target.delete(child)
-                    new_target.text = ""
-                    new_target.tail = ""
-                    target.append(new_target)  # type: ignore
-                    target = new_target
-                    current = current.children[0]
-                    continue
-                else:
-                    # before tag1 : forget element, go to next one
-                    current, target = current._get_successor(target)  # type: ignore
-                    continue
-            elif state == 1:  # collect elements
-                further = False
-                if current.xpath(f"descendant-or-self::{path2}"):
-                    if current.xpath(f"self::{path2}"):
-                        # end of trip
-                        break
-                    # got T2 in chidren, need further analysis
-                    further = True
-                # further analysis needed :
-                if further:
-                    new_target = current.clone
-                    for child in new_target.children:
-                        new_target.delete(child)
-                    new_target.text = ""
-                    new_target.tail = ""
-                    target.append(new_target)  # type: ignore
-                    target = new_target
-                    current = current.children[0]
-                    continue
-                # collect
-                target.append(current.clone)  # type: ignore
-                current, target = current._get_successor(target)  # type: ignore
-                continue
-        # Now resu should be the "parent" of inserted parts
-        # - a text:h or text:p sigle item (simple case)
-        # - a upper element, with some text:p, text:h in it => need to be
-        #   stripped to have a list of text:p, text:h
-        if result.tag in {"text:p", "text:h"}:
-            inner = [result]
-        else:
-            inner = result.children
-        return inner
-
-    def get_between(
-        self,
-        tag1: Element,
-        tag2: Element,
-        as_text: bool = False,
-        clean: bool = True,
-        no_header: bool = True,
-    ) -> list | Element | str:
-        """Returns elements between tag1 and tag2, tag1 and tag2 shall
-        be unique and having an id attribute.
-        (WARN: buggy if tag1/tag2 defines a malformed odf xml.)
-        If as_text is True: returns the text content.
-        If clean is True: suppress unwanted tags (deletions marks, ...)
-        If no_header is True: existing text:h are changed in text:p
-        By default: returns a list of Element, cleaned and without headers.
-
-        Implementation and standard retrictions:
-        Only text:h and text:p sould be 'cut' by an insert tag, so inner parts
-        of insert tags are:
-
-            - any text:h, text:p or sub tag of these
-
-            - some text, part of a parent text:h or text:p
-
-        Arguments:
-
-            tag1 -- Element
-
-            tag2 -- Element
-
-            as_text -- boolean
-
-            clean -- boolean
-
-            no_header -- boolean
-
-        Return: list of odf_paragraph or odf_header
-        """
-        inner = self._get_between_base(tag1, tag2)
-
-        if clean:
-            clean_tags = (
-                "text:change",
-                "text:change-start",
-                "text:change-end",
-                "text:reference-mark",
-                "text:reference-mark-start",
-                "text:reference-mark-end",
-            )
-            request_self = " | ".join(["self::%s" % c for c in clean_tags])
-            inner = [e for e in inner if not e.xpath(request_self)]
-            request = " | ".join([f"descendant::{tag}" for tag in clean_tags])
-            for element in inner:
-                to_del = element.xpath(request)
-                for elem in to_del:
-                    if isinstance(elem, Element):
-                        element.delete(elem)
-        if no_header:  # crude replace t:h by t:p
-            new_inner = []
-            for element in inner:
-                if element.tag == "text:h":
-                    children = element.children
-                    text = element.__element.text
-                    para = Element.from_tag("text:p")
-                    para.text = text or ""
-                    for c in children:
-                        para.append(c)
-                    new_inner.append(para)
-                else:
-                    new_inner.append(element)
-            inner = new_inner
-        if as_text:
-            return "\n".join([e.get_formatted_text() for e in inner])
-        else:
-            return inner
-
-    def insert(
-        self,
-        element: Element,
-        xmlposition: int | None = None,
-        position: int | None = None,
-        start: bool = False,
-    ) -> None:
-        """Insert an element relatively to ourself.
-
-        Insert either using DOM vocabulary or by numeric position.
-        If text start is True, insert the element before any existing text.
-
-        Position start at 0.
-
-        Arguments:
-
-            element -- Element
-
-            xmlposition -- FIRST_CHILD, LAST_CHILD, NEXT_SIBLING
-                           or PREV_SIBLING
-
-            start -- Boolean
-
-            position -- int
-        """
-        # child_tag = element.tag
-        current = self.__element
-        _element = element.__element
-        if start:
-            text = current.text
-            if text is not None:
-                current.text = None
-                tail = _element.tail
-                if tail is None:
-                    tail = text
-                else:
-                    tail = tail + text
-                _element.tail = tail
-            position = 0
-        if position is not None:
-            current.insert(position, _element)
-        elif xmlposition is FIRST_CHILD:
-            current.insert(0, _element)
-        elif xmlposition is LAST_CHILD:
-            current.append(_element)
-        elif xmlposition is NEXT_SIBLING:
-            parent = current.getparent()
-            index = parent.index(current)  # type: ignore
-            parent.insert(index + 1, _element)  # type: ignore
-        elif xmlposition is PREV_SIBLING:
-            parent = current.getparent()
-            index = parent.index(current)  # type: ignore
-            parent.insert(index, _element)  # type: ignore
-        else:
-            raise ValueError("(xml)position must be defined")
-
-    def extend(self, odf_elements: Iterable[Element]) -> None:
-        """Fast append elements at the end of ourself using extend."""
-        if odf_elements:
-            current = self.__element
-            elements = [element.__element for element in odf_elements]
-            current.extend(elements)
-
-    def append(self, str_or_element: str | Element) -> None:
-        """Insert element or text in the last position."""
-        current = self.__element
-        if isinstance(str_or_element, str):
-            # Has children ?
-            children = list(current.iterchildren())
-            if children:
-                # Append to tail of the last child
-                last_child = children[-1]
-                text = last_child.tail
-                text = text if text is not None else ""
-                text += str_or_element
-                last_child.tail = text
-            else:
-                # Append to text of the element
-                text = current.text
-                text = text if text is not None else ""
-                text += str_or_element
-                current.text = text
-        elif isinstance(str_or_element, Element):
-            current.append(str_or_element.__element)
-        else:
-            raise TypeError(f'Element or string expected, not "{type(str_or_element)}"')
-
-    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-        """Delete the given element from the XML tree. If no element is given,
-        "self" is deleted. The XML library may allow to continue to use an
-        element now "orphan" as long as you have a reference to it.
-
-        if keep_tail is True (default), the tail text is not erased.
-
-        Arguments:
-
-            child -- Element
-
-            keep_tail -- boolean (default to True), True for most usages.
-        """
-        if child is None:
-            parent = self.parent
-            if parent is None:
-                raise ValueError(f"Can't delete the root element\n{self.serialize()}")
-            child = self
-        else:
-            parent = self
-        if keep_tail and child.__element.tail is not None:
-            current = child.__element
-            tail = str(current.tail)
-            current.tail = None
-            prev = current.getprevious()
-            if prev is not None:
-                if prev.tail is None:
-                    prev.tail = tail
-                else:
-                    prev.tail += tail
-            else:
-                if parent.__element.text is None:
-                    parent.__element.text = tail
-                else:
-                    parent.__element.text += tail
-        parent.__element.remove(child.__element)
-
-    def replace_element(self, old_element: Element, new_element: Element) -> None:
-        """Replaces in place a sub element with the element passed as second
-        argument.
-
-        Warning : no clone for old element.
-        """
-        current = self.__element
-        current.replace(old_element.__element, new_element.__element)
-
-    def strip_elements(
-        self,
-        sub_elements: Element | Iterable[Element],
-    ) -> Element | list:
-        """Remove the tags of provided elements, keeping inner childs and text.
-
-        Return : the striped element.
-
-        Warning : no clone in sub_elements list.
-
-        Arguments:
-
-            sub_elements -- Element or list of Element
-        """
-        if not sub_elements:
-            return self
-        if isinstance(sub_elements, Element):
-            sub_elements = (sub_elements,)
-        replacer = _get_lxml_tag("text:this-will-be-removed")
-        for element in sub_elements:
-            element.__element.tag = replacer
-        strip = ("text:this-will-be-removed",)
-        return self.strip_tags(strip=strip, default=None)
-
-    def strip_tags(
-        self,
-        strip: Iterable[str] | None = None,
-        protect: Iterable[str] | None = None,
-        default: str | None = "text:p",
-    ) -> Element | list:
-        """Remove the tags listed in strip, recursively, keeping inner childs
-        and text. Tags listed in protect stop the removal one level depth. If
-        the first level element is stripped, default is used to embed the
-        content in the default element. If default is None and first level is
-        striped, a list of text and children is returned. Return : the striped
-        element.
-
-        strip_tags should be used by on purpose methods (strip_span ...)
-        (Method name taken from lxml).
-
-        Arguments:
-
-            strip -- iterable list of str odf tags, or None
-
-            protect -- iterable list of str odf tags, or None
-
-            default -- str odf tag, or None
-
-        Return:
-
-            Element.
-        """
-        if not strip:
-            return self
-        if not protect:
-            protect = ()
-        protected = False
-        element, modified = Element._strip_tags(self, strip, protect, protected)
-        if modified and isinstance(element, list) and default:
-            new = Element.from_tag(default)
-            for content in element:
-                if isinstance(content, Element):
-                    new.append(content)
-                else:
-                    new.text = content
-            element = new
-        return element
-
-    @staticmethod
-    def _strip_tags(  # noqa:C901
-        element: Element,
-        strip: Iterable[str],
-        protect: Iterable[str],
-        protected: bool,
-    ) -> tuple[Element | list, bool]:
-        """Sub method for strip_tags()."""
-        element_clone = element.clone
-        modified = False
-        children = []
-        if protect and element.tag in protect:
-            protect_below = True
-        else:
-            protect_below = False
-        for child in element_clone.children:
-            striped_child, is_modified = Element._strip_tags(
-                child, strip, protect, protect_below
-            )
-            if is_modified:
-                modified = True
-            if isinstance(striped_child, list):
-                children.extend(striped_child)
-            else:
-                children.append(striped_child)
-
-        text = element_clone.text
-        tail = element_clone.tail
-        if not protected and strip and element.tag in strip:
-            element_result: list[Element | str] = []
-            if text is not None:
-                element_result.append(text)
-            for child in children:
-                element_result.append(child)
-            if tail is not None:
-                element_result.append(tail)
-            return (element_result, True)
-        else:
-            if not modified:
-                return (element, False)
-            element.clear()
-            try:
-                for key, value in element_clone.attributes.items():
-                    element.set_attribute(key, value)
-            except ValueError:
-                sys.stderr.write(f"strip_tags(): bad attribute in {element_clone}\n")
-            if text is not None:
-                element.append(text)
-            for child in children:
-                element.append(child)
-            if tail is not None:
-                element.tail = tail
-            return (element, True)
-
-    def xpath(self, xpath_query: str) -> list[Element | Text]:
-        """Apply XPath query to the element and its subtree. Return list of
-        Element or Text instances translated from the nodes found.
-        """
-        element = self.__element
-        xpath_instance = xpath_compile(xpath_query)
-        elements = xpath_instance(element)
-        result: list[Element | Text] = []
-        if hasattr(elements, "__iter__"):
-            for obj in elements:  # type: ignore
-                if isinstance(obj, (_ElementStringResult, _ElementUnicodeResult)):
-                    result.append(Text(obj))
-                elif isinstance(obj, _Element):
-                    result.append(Element.from_tag(obj))
-                # else:
-                #     result.append(obj)
-        return result
-
-    def clear(self) -> None:
-        """Remove text, children and attributes from the element."""
-        self.__element.clear()
-        if hasattr(self, "_tmap"):
-            self._tmap: list[int] = []
-        if hasattr(self, "_cmap"):
-            self._cmap: list[int] = []
-        if hasattr(self, "_rmap"):
-            self._rmap: list[int] = []
-        if hasattr(self, "_indexes"):
-            remember = False
-            if "_rmap" in self._indexes:
-                remember = True
-            self._indexes: dict[str, dict] = {}
-            self._indexes["_cmap"] = {}
-            self._indexes["_tmap"] = {}
-            if remember:
-                self._indexes["_rmap"] = {}
-
-    @property
-    def clone(self) -> Element:
-        clone = deepcopy(self.__element)
-        root = lxml_Element("ROOT", nsmap=ODF_NAMESPACES)
-        root.append(clone)
-        return self.from_tag(clone)
-
-        # slow data = tostring(self.__element, encoding='unicode')
-        # return self.from_tag(data)
-
-    @staticmethod
-    def _strip_namespaces(data: str) -> str:
-        """Remove xmlns:* fields from serialized XML."""
-        return re.sub(r' xmlns:\w*="[\w:\-\/\.#]*"', "", data)
-
-    def serialize(self, pretty: bool = False, with_ns: bool = False) -> str:
-        """Return text serialization of XML element."""
-        # This copy bypasses serialization side-effects in lxml
-        native = deepcopy(self.__element)
-        data = tostring(
-            native, with_tail=False, pretty_print=pretty, encoding="unicode"
-        )
-        if with_ns:
-            return data
-        # Remove namespaces
-        return self._strip_namespaces(data)
-
-    # Element helpers usable from any context
-
-    @property
-    def document_body(self) -> Element | None:
-        """Return the document body : 'office:body'"""
-        return self.get_element("//office:body/*[1]")
-
-    @document_body.setter
-    def document_body(self, new_body: Element) -> None:
-        """Change in place the full document body content."""
-        body = self.document_body
-        if body is None:
-            raise ValueError("//office:body not found in document")
-        tail = body.tail
-        body.clear()
-        for item in new_body.children:
-            body.append(item)
-        if tail:
-            body.tail = tail
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        """This function should return a beautiful version of the text."""
-        return ""
-
-    def get_styled_elements(self, name: str = "") -> list[Element]:
-        """Brute-force to find paragraphs, tables, etc. using the given style
-        name (or all by default).
-
-        Arguments:
-
-            name -- str
-
-        Return: list
-        """
-        # FIXME incomplete (and possibly inaccurate)
-        return (
-            self._filtered_elements("descendant::*", text_style=name)
-            + self._filtered_elements("descendant::*", draw_style=name)
-            + self._filtered_elements("descendant::*", draw_text_style=name)
-            + self._filtered_elements("descendant::*", table_style=name)
-            + self._filtered_elements("descendant::*", page_layout=name)
-            + self._filtered_elements("descendant::*", master_page=name)
-            + self._filtered_elements("descendant::*", parent_style=name)
-        )
-
-    # Common attributes
-
-    def _get_inner_text(self, tag: str) -> str | None:
-        element = self.get_element(tag)
-        if element is None:
-            return None
-        return element.text
-
-    def _set_inner_text(self, tag: str, text: str) -> None:
-        element = self.get_element(tag)
-        if element is None:
-            element = Element.from_tag(tag)
-            self.append(element)
-        element.text = text
-
-    # Dublin core
-
-    @property
-    def dc_creator(self) -> str | None:
-        """Get dc:creator value.
-
-        Return: str (or None if inexistant)
-        """
-        return self._get_inner_text("dc:creator")
-
-    @dc_creator.setter
-    def dc_creator(self, creator: str) -> None:
-        """Set dc:creator value.
-
-        Arguments:
-
-            creator -- str
-        """
-        self._set_inner_text("dc:creator", creator)
-
-    @property
-    def dc_date(self) -> datetime | None:
-        """Get the dc:date value.
-
-        Return: datetime (or None if inexistant)
-        """
-        date = self._get_inner_text("dc:date")
-        if date is None:
-            return None
-        return DateTime.decode(date)
-
-    @dc_date.setter
-    def dc_date(self, date: datetime) -> None:
-        """Set the dc:date value.
-
-        Arguments:
-
-            darz -- datetime
-        """
-        self._set_inner_text("dc:date", DateTime.encode(date))
-
-    # SVG
-
-    @property
-    def svg_title(self) -> str | None:
-        return self._get_inner_text("svg:title")
-
-    @svg_title.setter
-    def svg_title(self, title: str) -> None:
-        self._set_inner_text("svg:title", title)
-
-    @property
-    def svg_description(self) -> str | None:
-        return self._get_inner_text("svg:desc")
-
-    @svg_description.setter
-    def svg_description(self, description: str) -> None:
-        self._set_inner_text("svg:desc", description)
-
-    # Sections
-
-    def get_sections(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the sections that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Element
-        """
-        return self._filtered_elements(
-            "text:section", text_style=style, content=content
-        )
-
-    def get_section(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the section that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:section", position, content=content
-        )
-
-    # Paragraphs
-
-    def get_paragraphs(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the paragraphs that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Paragraph
-        """
-        return self._filtered_elements(
-            "descendant::text:p", text_style=style, content=content
-        )
-
-    def get_paragraph(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the paragraph that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Paragraph or None if not found
-        """
-        return self._filtered_element("descendant::text:p", position, content=content)
-
-    # Span
-
-    def get_spans(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the spans that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Span
-        """
-        return self._filtered_elements(
-            "descendant::text:span", text_style=style, content=content
-        )
-
-    def get_span(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the span that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Span or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:span", position, content=content
-        )
-
-    # Headers
-
-    def get_headers(
-        self,
-        style: str | None = None,
-        outline_level: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the Headers that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Header
-        """
-        return self._filtered_elements(
-            "descendant::text:h",
-            text_style=style,
-            outline_level=outline_level,
-            content=content,
-        )
-
-    def get_header(
-        self,
-        position: int = 0,
-        outline_level: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the Header that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Header or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:h",
-            position,
-            outline_level=outline_level,
-            content=content,
-        )
-
-    # Lists
-
-    def get_lists(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the lists that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of List
-        """
-        return self._filtered_elements(
-            "descendant::text:list", text_style=style, content=content
-        )
-
-    def get_list(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the list that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: List or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:list", position, content=content
-        )
-
-    # Frames
-
-    def get_frames(
-        self,
-        presentation_class: str | None = None,
-        style: str | None = None,
-        title: str | None = None,
-        description: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the frames that match the criteria.
-
-        Arguments:
-
-            presentation_class -- str
-
-            style -- str
-
-            title -- str regex
-
-            description -- str regex
-
-            content -- str regex
-
-        Return: list of Frame
-        """
-        return self._filtered_elements(
-            "descendant::draw:frame",
-            presentation_class=presentation_class,
-            draw_style=style,
-            svg_title=title,
-            svg_desc=description,
-            content=content,
-        )
-
-    def get_frame(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        presentation_class: str | None = None,
-        title: str | None = None,
-        description: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the section that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            presentation_class -- str
-
-            title -- str regex
-
-            description -- str regex
-
-            content -- str regex
-
-        Return: Frame or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:frame",
-            position,
-            draw_name=name,
-            presentation_class=presentation_class,
-            svg_title=title,
-            svg_desc=description,
-            content=content,
-        )
-
-    # Images
-
-    def get_images(
-        self,
-        style: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the images matching the criteria.
-
-        Arguments:
-
-            style -- str
-
-            url -- str regex
-
-            content -- str regex
-
-        Return: list of Element
-        """
-        return self._filtered_elements(
-            "descendant::draw:image", text_style=style, url=url, content=content
-        )
-
-    def get_image(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the image matching the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            url -- str regex
-
-            content -- str regex
-
-        Return: Element or None if not found
-        """
-        # The frame is holding the name
-        if name is not None:
-            frame = self._filtered_element(
-                "descendant::draw:frame", position, draw_name=name
-            )
-            if frame is None:
-                return None
-            # The name is supposedly unique
-            return frame.get_element("draw:image")
-        return self._filtered_element(
-            "descendant::draw:image", position, url=url, content=content
-        )
-
-    # Tables
-
-    def get_tables(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the tables that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Table
-        """
-        return self._filtered_elements(
-            "descendant::table:table", table_style=style, content=content
-        )
-
-    def get_table(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the table that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            content -- str regex
-
-        Return: Table or None if not found
-        """
-        if name is None and content is None:
-            result = self._filtered_element("descendant::table:table", position)
-        else:
-            result = self._filtered_element(
-                "descendant::table:table",
-                position,
-                table_name=name,
-                content=content,
-            )
-        return result
-
-    # Named Range
-
-    def get_named_ranges(self) -> list[Element]:
-        """Return all the tables named ranges.
-
-        Return: list of odf_named_range
-        """
-        named_ranges = self.get_elements(
-            "descendant::table:named-expressions/table:named-range"
-        )
-        return named_ranges
-
-    def get_named_range(self, name: str) -> Element | None:
-        """Return the named range of specified name, or None if not found.
-
-        Arguments:
-
-            name -- str
-
-        Return: NamedRange
-        """
-        named_range = self.get_elements(
-            f'descendant::table:named-expressions/table:named-range[@table:name="{name}"][1]'
-        )
-        if named_range:
-            return named_range[0]
-        else:
-            return None
-
-    def append_named_range(self, named_range: Element) -> None:
-        """Append the named range to the spreadsheet, replacing existing named
-        range of same name if any.
-
-        Arguments:
-
-            named_range --  NamedRange
-        """
-        if self.tag != "office:spreadsheet":
-            raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
-        named_expressions = self.get_element("table:named-expressions")
-        if not named_expressions:
-            named_expressions = Element.from_tag("table:named-expressions")
-            self.append(named_expressions)
-        # exists ?
-        current = named_expressions.get_element(
-            f'table:named-range[@table:name="{named_range.name}"][1]'  # type:ignore
-        )
-        if current:
-            named_expressions.delete(current)
-        named_expressions.append(named_range)
-
-    def delete_named_range(self, name: str) -> None:
-        """Delete the Named Range of specified name from the spreadsheet.
-
-        Arguments:
-
-            name -- str
-        """
-        if self.tag != "office:spreadsheet":
-            raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
-        named_range = self.get_named_range(name)
-        if not named_range:
-            return
-        named_range.delete()
-        named_expressions = self.get_element("table:named-expressions")
-        if not named_expressions:
-            return
-        element = named_expressions.__element
-        children = list(element.iterchildren())
-        if not children:
-            self.delete(named_expressions)
-
-    # Notes
-
-    def get_notes(
-        self,
-        note_class: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the notes that match the criteria.
-
-        Arguments:
-
-            note_class -- 'footnote' or 'endnote'
-
-            content -- str regex
-
-        Return: list of Note
-        """
-        return self._filtered_elements(
-            "descendant::text:note", note_class=note_class, content=content
-        )
-
-    def get_note(
-        self,
-        position: int = 0,
-        note_id: str | None = None,
-        note_class: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the note that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            note_id -- str
-
-            note_class -- 'footnote' or 'endnote'
-
-            content -- str regex
-
-        Return: Note or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:note",
-            position,
-            text_id=note_id,
-            note_class=note_class,
-            content=content,
-        )
-
-    # Annotations
-
-    def get_annotations(
-        self,
-        creator: str | None = None,
-        start_date: datetime | None = None,
-        end_date: datetime | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the annotations that match the criteria.
-
-        Arguments:
-
-            creator -- str
-
-            start_date -- datetime instance
-
-            end_date --  datetime instance
-
-            content -- str regex
-
-        Return: list of Annotation
-        """
-        annotations = []
-        for annotation in self._filtered_elements(
-            "descendant::office:annotation", content=content
-        ):
-            if creator is not None and creator != annotation.dc_creator:
-                continue
-            date = annotation.dc_date
-            if date is None:
-                continue
-            if start_date is not None and date < start_date:
-                continue
-            if end_date is not None and date >= end_date:
-                continue
-            annotations.append(annotation)
-        return annotations
-
-    def get_annotation(
-        self,
-        position: int = 0,
-        creator: str | None = None,
-        start_date: datetime | None = None,
-        end_date: datetime | None = None,
-        content: str | None = None,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the annotation that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            creator -- str
-
-            start_date -- datetime instance
-
-            end_date -- datetime instance
-
-            content -- str regex
-
-            name -- str
-
-        Return: Annotation or None if not found
-        """
-        if name is not None:
-            return self._filtered_element(
-                "descendant::office:annotation", 0, office_name=name
-            )
-        annotations = self.get_annotations(
-            creator=creator, start_date=start_date, end_date=end_date, content=content
-        )
-        if not annotations:
-            return None
-        try:
-            return annotations[position]
-        except IndexError:
-            return None
-
-    def get_annotation_ends(self) -> list[Element]:
-        """Return all the annotation ends.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::office:annotation-end")
-
-    def get_annotation_end(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the annotation end that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::office:annotation-end", position, office_name=name
-        )
-
-    # office:names
-
-    def get_office_names(self) -> list[str]:
-        """Return all the used office:name tags values of the element.
-
-        Return: list of unique str
-        """
-        name_xpath_query = xpath_compile("//@office:name")
-        response = name_xpath_query(self.__element)
-        if not isinstance(response, list):
-            return []
-        return list({str(name) for name in response if name})
-
-    # Variables
-
-    def get_variable_decls(self) -> Element:
-        """Return the container for variable declarations. Created if not
-        found.
-
-        Return: Element
-        """
-        variable_decls = self.get_element("//text:variable-decls")
-        if variable_decls is None:
-            body = self.document_body
-            if not body:
-                raise ValueError("Empty document.body")
-            body.insert(Element.from_tag("text:variable-decls"), FIRST_CHILD)
-            variable_decls = body.get_element("//text:variable-decls")
-
-        return variable_decls  # type:ignore
-
-    def get_variable_decl_list(self) -> list[Element]:
-        """Return all the variable declarations.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:variable-decl")
-
-    def get_variable_decl(self, name: str, position: int = 0) -> Element | None:
-        """return the variable declaration for the given name.
-
-        Arguments:
-
-            name -- str
-
-            position -- int
-
-        return: Element or none if not found
-        """
-        return self._filtered_element(
-            "descendant::text:variable-decl", position, text_name=name
-        )
-
-    def get_variable_sets(self, name: str | None = None) -> list[Element]:
-        """Return all the variable sets that match the criteria.
-
-        Arguments:
-
-            name -- str
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:variable-set", text_name=name)
-
-    def get_variable_set(self, name: str, position: int = -1) -> Element | None:
-        """Return the variable set for the given name (last one by default).
-
-        Arguments:
-
-            name -- str
-
-            position -- int
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:variable-set", position, text_name=name
-        )
-
-    def get_variable_set_value(
-        self,
-        name: str,
-        value_type: str | None = None,
-    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-        """Return the last value of the given variable name.
-
-        Arguments:
-
-            name -- str
-
-            value_type -- 'boolean', 'currency', 'date', 'float',
-                          'percentage', 'string', 'time' or automatic
-
-        Return: most appropriate Python type
-        """
-        variable_set = self.get_variable_set(name)
-        if not variable_set:
-            return None
-        return variable_set.get_value(value_type)  # type: ignore
-
-    # User fields
-
-    def get_user_field_decls(self) -> Element | None:
-        """Return the container for user field declarations. Created if not
-        found.
-
-        Return: Element
-        """
-        user_field_decls = self.get_element("//text:user-field-decls")
-        if user_field_decls is None:
-            body = self.document_body
-            if not body:
-                raise ValueError("Empty document.body")
-            body.insert(Element.from_tag("text:user-field-decls"), FIRST_CHILD)
-            user_field_decls = body.get_element("//text:user-field-decls")
-
-        return user_field_decls
-
-    def get_user_field_decl_list(self) -> list[Element]:
-        """Return all the user field declarations.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:user-field-decl")
-
-    def get_user_field_decl(self, name: str, position: int = 0) -> Element | None:
-        """return the user field declaration for the given name.
-
-        return: Element or none if not found
-        """
-        return self._filtered_element(
-            "descendant::text:user-field-decl", position, text_name=name
-        )
-
-    def get_user_field_value(
-        self, name: str, value_type: str | None = None
-    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-        """Return the value of the given user field name.
-
-        Arguments:
-
-            name -- str
-
-            value_type -- 'boolean', 'currency', 'date', 'float',
-                          'percentage', 'string', 'time' or automatic
-
-        Return: most appropriate Python type
-        """
-        user_field_decl = self.get_user_field_decl(name)
-        if user_field_decl is None:
-            return None
-        return user_field_decl.get_value(value_type)  # type: ignore
-
-    # User defined fields
-    # They are fields who should contain a copy of a user defined medtadata
-
-    def get_user_defined_list(self) -> list[Element]:
-        """Return all the user defined field declarations.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:user-defined")
-
-    def get_user_defined(self, name: str, position: int = 0) -> Element | None:
-        """return the user defined declaration for the given name.
-
-        return: Element or none if not found
-        """
-        return self._filtered_element(
-            "descendant::text:user-defined", position, text_name=name
-        )
-
-    def get_user_defined_value(
-        self, name: str, value_type: str | None = None
-    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-        """Return the value of the given user defined field name.
-
-        Arguments:
-
-            name -- str
-
-            value_type -- 'boolean', 'date', 'float',
-                          'string', 'time' or automatic
-
-        Return: most appropriate Python type
-        """
-        user_defined = self.get_user_defined(name)
-        if user_defined is None:
-            return None
-        return user_defined.get_value(value_type)  # type: ignore
-
-    # Draw Pages
-
-    def get_draw_pages(
-        self,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw pages that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of DrawPage
-        """
-        return self._filtered_elements(
-            "descendant::draw:page", draw_style=style, content=content
-        )
-
-    def get_draw_page(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw page that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            content -- str regex
-
-        Return: DrawPage or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:page", position, draw_name=name, content=content
-        )
-
-    # Links
-
-    def get_links(
-        self,
-        name: str | None = None,
-        title: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the links that match the criteria.
-
-        Arguments:
-
-            name -- str
-
-            title -- str
-
-            url -- str regex
-
-            content -- str regex
-
-        Return: list of Element
-        """
-        return self._filtered_elements(
-            "descendant::text:a",
-            office_name=name,
-            office_title=title,
-            url=url,
-            content=content,
-        )
-
-    def get_link(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        title: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the link that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-            title -- str
-
-            url -- str regex
-
-            content -- str regex
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:a",
-            position,
-            office_name=name,
-            office_title=title,
-            url=url,
-            content=content,
-        )
-
-    # Bookmarks
-
-    def get_bookmarks(self) -> list[Element]:
-        """Return all the bookmarks.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:bookmark")
-
-    def get_bookmark(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the bookmark that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Bookmark or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:bookmark", position, text_name=name
-        )
-
-    def get_bookmark_starts(self) -> list[Element]:
-        """Return all the bookmark starts.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:bookmark-start")
-
-    def get_bookmark_start(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the bookmark start that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:bookmark-start", position, text_name=name
-        )
-
-    def get_bookmark_ends(self) -> list[Element]:
-        """Return all the bookmark ends.
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:bookmark-end")
-
-    def get_bookmark_end(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the bookmark end that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:bookmark-end", position, text_name=name
-        )
-
-    # Reference marks
-
-    def get_reference_marks_single(self) -> list[Element]:
-        """Return all the reference marks. Search only the tags
-        text:reference-mark.
-        Consider using : get_reference_marks()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:reference-mark")
-
-    def get_reference_mark_single(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the reference mark that matches the criteria. Search only the
-        tags text:reference-mark.
-        Consider using : get_reference_mark()
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:reference-mark", position, text_name=name
-        )
-
-    def get_reference_mark_starts(self) -> list[Element]:
-        """Return all the reference mark starts. Search only the tags
-        text:reference-mark-start.
-        Consider using : get_reference_marks()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:reference-mark-start")
-
-    def get_reference_mark_start(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the reference mark start that matches the criteria. Search
-        only the tags text:reference-mark-start.
-        Consider using : get_reference_mark()
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:reference-mark-start", position, text_name=name
-        )
-
-    def get_reference_mark_ends(self) -> list[Element]:
-        """Return all the reference mark ends. Search only the tags
-        text:reference-mark-end.
-        Consider using : get_reference_marks()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:reference-mark-end")
-
-    def get_reference_mark_end(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the reference mark end that matches the criteria. Search only
-        the tags text:reference-mark-end.
-        Consider using : get_reference_marks()
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:reference-mark-end", position, text_name=name
-        )
-
-    def get_reference_marks(self) -> list[Element]:
-        """Return all the reference marks, either single position reference
-        (text:reference-mark) or start of range reference
-        (text:reference-mark-start).
-
-        Return: list of Element
-        """
-        return self._filtered_elements(
-            "descendant::text:reference-mark-start | descendant::text:reference-mark"
-        )
-
-    def get_reference_mark(
-        self,
-        position: int = 0,
-        name: str | None = None,
-    ) -> Element | None:
-        """Return the reference mark that match the criteria. Either single
-        position reference mark (text:reference-mark) or start of range
-        reference (text:reference-mark-start).
-
-        Arguments:
-
-            position -- int
-
-            name -- str
-
-        Return: Element or None if not found
-        """
-        if name:
-            request = (
-                f"descendant::text:reference-mark-start"
-                f'[@text:name="{name}"] '
-                f"| descendant::text:reference-mark"
-                f'[@text:name="{name}"]'
-            )
-            return self._filtered_element(request, position=0)
-        request = (
-            "descendant::text:reference-mark-start | descendant::text:reference-mark"
-        )
-        return self._filtered_element(request, position)
-
-    def get_references(self, name: str | None = None) -> list[Element]:
-        """Return all the references (text:reference-ref). If name is
-        provided, returns the references of that name.
-
-        Return: list of Element
-
-        Arguments:
-
-            name -- str or None
-        """
-        if name is None:
-            return self._filtered_elements("descendant::text:reference-ref")
-        request = f'descendant::text:reference-ref[@text:ref-name="{name}"]'
-        return self._filtered_elements(request)
-
-    # Shapes elements
-
-    # Groups
-
-    def get_draw_groups(
-        self,
-        title: str | None = None,
-        description: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        return self._filtered_elements(
-            "descendant::draw:g",
-            svg_title=title,
-            svg_desc=description,
-            content=content,
-        )
-
-    def get_draw_group(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        title: str | None = None,
-        description: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        return self._filtered_element(
-            "descendant::draw:g",
-            position,
-            draw_name=name,
-            svg_title=title,
-            svg_desc=description,
-            content=content,
-        )
-
-    # Lines
-
-    def get_draw_lines(
-        self,
-        draw_style: str | None = None,
-        draw_text_style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw lines that match the criteria.
-
-        Arguments:
-
-            draw_style -- str
-
-            draw_text_style -- str
-
-            content -- str regex
-
-        Return: list of odf_shape
-        """
-        return self._filtered_elements(
-            "descendant::draw:line",
-            draw_style=draw_style,
-            draw_text_style=draw_text_style,
-            content=content,
-        )
-
-    def get_draw_line(
-        self,
-        position: int = 0,
-        id: str | None = None,  # noqa:A002
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw line that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            id -- str
-
-            content -- str regex
-
-        Return: odf_shape or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:line", position, draw_id=id, content=content
-        )
-
-    # Rectangles
-
-    def get_draw_rectangles(
-        self,
-        draw_style: str | None = None,
-        draw_text_style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw rectangles that match the criteria.
-
-        Arguments:
-
-            draw_style -- str
-
-            draw_text_style -- str
-
-            content -- str regex
-
-        Return: list of odf_shape
-        """
-        return self._filtered_elements(
-            "descendant::draw:rect",
-            draw_style=draw_style,
-            draw_text_style=draw_text_style,
-            content=content,
-        )
-
-    def get_draw_rectangle(
-        self,
-        position: int = 0,
-        id: str | None = None,  # noqa:A002
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw rectangle that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            id -- str
-
-            content -- str regex
-
-        Return: odf_shape or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:rect", position, draw_id=id, content=content
-        )
-
-    # Ellipse
-
-    def get_draw_ellipses(
-        self,
-        draw_style: str | None = None,
-        draw_text_style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw ellipses that match the criteria.
-
-        Arguments:
-
-            draw_style -- str
-
-            draw_text_style -- str
-
-            content -- str regex
-
-        Return: list of odf_shape
-        """
-        return self._filtered_elements(
-            "descendant::draw:ellipse",
-            draw_style=draw_style,
-            draw_text_style=draw_text_style,
-            content=content,
-        )
-
-    def get_draw_ellipse(
-        self,
-        position: int = 0,
-        id: str | None = None,  # noqa:A002
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw ellipse that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            id -- str
-
-            content -- str regex
-
-        Return: odf_shape or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:ellipse", position, draw_id=id, content=content
-        )
-
-    # Connectors
-
-    def get_draw_connectors(
-        self,
-        draw_style: str | None = None,
-        draw_text_style: str | None = None,
-        content: str | None = None,
-    ) -> list[Element]:
-        """Return all the draw connectors that match the criteria.
-
-        Arguments:
-
-            draw_style -- str
-
-            draw_text_style -- str
-
-            content -- str regex
-
-        Return: list of odf_shape
-        """
-        return self._filtered_elements(
-            "descendant::draw:connector",
-            draw_style=draw_style,
-            draw_text_style=draw_text_style,
-            content=content,
-        )
-
-    def get_draw_connector(
-        self,
-        position: int = 0,
-        id: str | None = None,  # noqa:A002
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the draw connector that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            id -- str
-
-            content -- str regex
-
-        Return: odf_shape or None if not found
-        """
-        return self._filtered_element(
-            "descendant::draw:connector", position, draw_id=id, content=content
-        )
-
-    def get_orphan_draw_connectors(self) -> list[Element]:
-        """Return a list of connectors which don't have any shape connected
-        to them.
-        """
-        connectors = []
-        for connector in self.get_draw_connectors():
-            start_shape = connector.get_attribute("draw:start-shape")
-            end_shape = connector.get_attribute("draw:end-shape")
-            if start_shape is None and end_shape is None:
-                connectors.append(connector)
-        return connectors
-
-    # Tracked changes and text change
-
-    def get_tracked_changes(self) -> Element | None:
-        """Return the tracked-changes part in the text body."""
-        return self.get_element("//text:tracked-changes")
-
-    def get_changes_ids(self) -> list[Element | Text]:
-        """Return a list of ids that refers to a change region in the tracked
-        changes list.
-        """
-        # Insertion changes
-        xpath_query = "descendant::text:change-start/@text:change-id"
-        # Deletion changes
-        xpath_query += " | descendant::text:change/@text:change-id"
-        return self.xpath(xpath_query)
-
-    def get_text_change_deletions(self) -> list[Element]:
-        """Return all the text changes of deletion kind: the tags text:change.
-        Consider using : get_text_changes()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:text:change")
-
-    def get_text_change_deletion(
-        self,
-        position: int = 0,
-        idx: str | None = None,
-    ) -> Element | None:
-        """Return the text change of deletion kind that matches the criteria.
-        Search only for the tags text:change.
-        Consider using : get_text_change()
-
-        Arguments:
-
-            position -- int
-
-            idx -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:change", position, change_id=idx
-        )
-
-    def get_text_change_starts(self) -> list[Element]:
-        """Return all the text change-start. Search only for the tags
-        text:change-start.
-        Consider using : get_text_changes()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:change-start")
-
-    def get_text_change_start(
-        self,
-        position: int = 0,
-        idx: str | None = None,
-    ) -> Element | None:
-        """Return the text change-start that matches the criteria. Search
-        only the tags text:change-start.
-        Consider using : get_text_change()
-
-        Arguments:
-
-            position -- int
-
-            idx -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:change-start", position, change_id=idx
-        )
-
-    def get_text_change_ends(self) -> list[Element]:
-        """Return all the text change-end. Search only the tags
-        text:change-end.
-        Consider using : get_text_changes()
-
-        Return: list of Element
-        """
-        return self._filtered_elements("descendant::text:change-end")
-
-    def get_text_change_end(
-        self,
-        position: int = 0,
-        idx: str | None = None,
-    ) -> Element | None:
-        """Return the text change-end that matches the criteria. Search only
-        the tags text:change-end.
-        Consider using : get_text_change()
-
-        Arguments:
-
-            position -- int
-
-            idx -- str
-
-        Return: Element or None if not found
-        """
-        return self._filtered_element(
-            "descendant::text:change-end", position, change_id=idx
-        )
-
-    def get_text_changes(self) -> list[Element]:
-        """Return all the text changes, either single deletion
-        (text:change) or start of range of changes (text:change-start).
-
-        Return: list of Element
-        """
-        request = "descendant::text:change-start | descendant::text:change"
-        return self._filtered_elements(request)
-
-    def get_text_change(
-        self,
-        position: int = 0,
-        idx: str | None = None,
-    ) -> Element | None:
-        """Return the text change that matches the criteria. Either single
-        deletion (text:change) or start of range of changes (text:change-start).
-        position : index of the element to retrieve if several matches, default
-        is 0.
-        idx : change-id of the element.
-
-        Arguments:
-
-            position -- int
-
-            idx -- str
-
-        Return: Element or None if not found
-        """
-        if idx:
-            request = (
-                f'descendant::text:change-start[@text:change-id="{idx}"] '
-                f'| descendant::text:change[@text:change-id="{idx}"]'
-            )
-            return self._filtered_element(request, 0)
-        request = "descendant::text:change-start | descendant::text:change"
-        return self._filtered_element(request, position)
-
-    # Table Of Content
-
-    def get_tocs(self) -> list[Element]:
-        """Return all the tables of contents.
-
-        Return: list of odf_toc
-        """
-        return self._filtered_elements("text:table-of-content")
-
-    def get_toc(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the table of contents that matches the criteria.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: odf_toc or None if not found
-        """
-        return self._filtered_element(
-            "text:table-of-content", position, content=content
-        )
-
-    # Styles
-
-    @staticmethod
-    def _get_style_tagname(family: str | None, is_default: bool = False) -> str:
-        """Widely match possible tag names given the family (or not)."""
-        if not family:
-            tagname = "(style:default-style|*[@style:name]|draw:fill-image|draw:marker)"
-        elif is_default:
-            # Default style
-            tagname = "style:default-style"
-        else:
-            tagname = _family_style_tagname(family)
-            # if famattr:
-            #    # Include family default style
-            #    tagname = '(%s|style:default-style)' % tagname
-            if family in FAMILY_ODF_STD:
-                # Include family default style
-                tagname = f"({tagname}|style:default-style)"
-        return tagname
-
-    def get_styles(self, family: str | None = None) -> list[Element]:
-        # Both common and default styles
-        tagname = self._get_style_tagname(family)
-        return self._filtered_elements(tagname, family=family)
-
-    def get_style(
-        self,
-        family: str,
-        name_or_element: str | Element | None = None,
-        display_name: str | None = None,
-    ) -> Element | None:
-        """Return the style uniquely identified by the family/name pair. If
-        the argument is already a style object, it will return it.
-
-        If the name is not the internal name but the name you gave in the
-        desktop application, use display_name instead.
-
-        Arguments:
-
-            family -- 'paragraph', 'text', 'graphic', 'table', 'list',
-                      'number'
-
-            name_or_element -- str or Style
-
-            display_name -- str
-
-        Return: odf_style or None if not found
-        """
-        if isinstance(name_or_element, Element):
-            name = self.get_attribute("style:name")
-            if name is not None:
-                return name_or_element
-            else:
-                raise ValueError(f"Not a odf_style ? {name_or_element!r}")
-        style_name = name_or_element
-        is_default = not (style_name or display_name)
-        tagname = self._get_style_tagname(family, is_default=is_default)
-        # famattr became None if no "style:family" attribute
-        if family:
-            return self._filtered_element(
-                tagname,
-                0,
-                style_name=style_name,
-                display_name=display_name,
-                family=family,
-            )
-        else:
-            return self._filtered_element(
-                tagname,
-                0,
-                draw_name=style_name or display_name,
-                family=family,
-            )
-
-    def _filtered_element(
-        self,
-        query_string: str,
-        position: int,
-        **kwargs: Any,
-    ) -> Element | None:
-        results = self._filtered_elements(query_string, **kwargs)
-        try:
-            return results[position]
-        except IndexError:
-            return None
-
-    def _filtered_elements(
-        self,
-        query_string: str,
-        content: str | None = None,
-        url: str | None = None,
-        svg_title: str | None = None,
-        svg_desc: str | None = None,
-        dc_creator: str | None = None,
-        dc_date: datetime | None = None,
-        **kwargs: Any,
-    ) -> list[Element]:
-        query = make_xpath_query(query_string, **kwargs)
-        elements = self.get_elements(query)
-        # Filter the elements with the regex (TODO use XPath)
-        if content is not None:
-            elements = [element for element in elements if element.match(content)]
-        if url is not None:
-            filtered = []
-            for element in elements:
-                url_attr = element.get_attribute("xlink:href")
-                if isinstance(url_attr, str) and search(url, url_attr) is not None:
-                    filtered.append(element)
-            elements = filtered
-        if dc_date is None:
-            dt_dc_date = None
-        else:
-            dt_dc_date = DateTime.encode(dc_date)
-        for variable, childname in [
-            (svg_title, "svg:title"),
-            (svg_desc, "svg:desc"),
-            (dc_creator, "descendant::dc:creator"),
-            (dt_dc_date, "descendant::dc:date"),
-        ]:
-            if not variable:
-                continue
-            filtered = []
-            for element in elements:
-                child = element.get_element(childname)
-                if child and child.match(variable):
-                    filtered.append(element)
-            elements = filtered
-        return elements
-
-

Ancestors

- -

Subclasses

- -

Static methods

-
-
-def from_tag(tag_or_elem: str | _Element) ‑> Element -
-
-

Element class and subclass factory.

-

Turn an lxml Element or ODF string tag into an ODF XML Element -of the relevant class.

-

Arguments

-

tag_or_elem – ODF str tag or lxml.Element

-

Return: Element (or subclass) instance

-
- -Expand source code - -
@classmethod
-def from_tag(cls, tag_or_elem: str | _Element) -> Element:
-    """Element class and subclass factory.
-
-    Turn an lxml Element or ODF string tag into an ODF XML Element
-    of the relevant class.
-
-    Arguments:
-
-        tag_or_elem -- ODF str tag or lxml.Element
-
-    Return: Element (or subclass) instance
-    """
-    if isinstance(tag_or_elem, str):
-        # assume the argument is a prefix:name tag
-        elem = cls.make_etree_element(tag_or_elem)
-    else:
-        elem = tag_or_elem
-    klass = _class_registry.get(elem.tag, cls)
-    return klass(tag_or_elem=elem)
-
-
-
-def from_tag_for_clone(tree_element: _Element, cache: tuple | None) ‑> Element -
-
-
-
- -Expand source code - -
@classmethod
-def from_tag_for_clone(
-    cls: type,
-    tree_element: _Element,
-    cache: tuple | None,
-) -> Element:
-    tag = to_str(tree_element.tag)
-    klass = _class_registry.get(tag, cls)
-    element = klass(tag_or_elem=tree_element)
-    if cache and element._caching:
-        element._tmap = cache[0]
-        element._cmap = cache[1]
-        if len(cache) == 3:
-            element._rmap = cache[2]
-    return element
-
-
-
-def make_etree_element(tag: str) ‑> lxml.etree._Element -
-
-
-
- -Expand source code - -
@staticmethod
-def make_etree_element(tag: str) -> _Element:
-    if not isinstance(tag, str):
-        raise TypeError(f"Tag is not str: {tag!r}")
-    tag = tag.strip()
-    if not tag:
-        raise ValueError("Tag is empty")
-    if "<" not in tag:
-        # Qualified name
-        # XXX don't build the element from scratch or lxml will pollute with
-        # repeated namespace declarations
-        tag = f"<{tag}/>"
-    # XML fragment
-    root = fromstring(NAMESPACES_XML % str_to_bytes(tag))
-    return root[0]
-
-
-
-

Instance variables

-
-
var attributes : dict[str, str]
-
-
-
- -Expand source code - -
@property
-def attributes(self) -> dict[str, str]:
-    return {
-        _get_prefixed_name(str(key)): str(value)
-        for key, value in self.__element.attrib.items()
-    }
-
-
-
var childrenodfdo.list[Element]
-
-
-
- -Expand source code - -
@property
-def children(self) -> list[Element]:
-    element = self.__element
-    return [
-        Element.from_tag(e)
-        for e in element.iterchildren()
-        if isinstance(e, _Element)
-    ]
-
-
-
var cloneElement
-
-
-
- -Expand source code - -
@property
-def clone(self) -> Element:
-    clone = deepcopy(self.__element)
-    root = lxml_Element("ROOT", nsmap=ODF_NAMESPACES)
-    root.append(clone)
-    return self.from_tag(clone)
-
-    # slow data = tostring(self.__element, encoding='unicode')
-    # return self.from_tag(data)
-
-
-
var dc_creator : str | None
-
-

Get dc:creator value.

-

Return: str (or None if inexistant)

-
- -Expand source code - -
@property
-def dc_creator(self) -> str | None:
-    """Get dc:creator value.
-
-    Return: str (or None if inexistant)
-    """
-    return self._get_inner_text("dc:creator")
-
-
-
var dc_date : datetime.datetime | None
-
-

Get the dc:date value.

-

Return: datetime (or None if inexistant)

-
- -Expand source code - -
@property
-def dc_date(self) -> datetime | None:
-    """Get the dc:date value.
-
-    Return: datetime (or None if inexistant)
-    """
-    date = self._get_inner_text("dc:date")
-    if date is None:
-        return None
-    return DateTime.decode(date)
-
-
-
var document_bodyElement | None
-
-

Return the document body : 'office:body'

-
- -Expand source code - -
@property
-def document_body(self) -> Element | None:
-    """Return the document body : 'office:body'"""
-    return self.get_element("//office:body/*[1]")
-
-
-
var is_bound : bool
-
-
-
- -Expand source code - -
@property
-def is_bound(self) -> bool:
-    return self.parent is not None
-
-
-
var parentElement | None
-
-
-
- -Expand source code - -
@property
-def parent(self) -> Element | None:
-    element = self.__element
-    parent = element.getparent()
-    if parent is None:
-        # Already at root
-        return None
-    return Element.from_tag(parent)
-
-
-
var rootElement
-
-
-
- -Expand source code - -
@property
-def root(self) -> Element:
-    element = self.__element
-    tree = element.getroottree()
-    root = tree.getroot()
-    return Element.from_tag(root)
-
-
-
var svg_description : str | None
-
-
-
- -Expand source code - -
@property
-def svg_description(self) -> str | None:
-    return self._get_inner_text("svg:desc")
-
-
-
var svg_title : str | None
-
-
-
- -Expand source code - -
@property
-def svg_title(self) -> str | None:
-    return self._get_inner_text("svg:title")
-
-
-
var tag : str
-
-

Get/set the underlying xml tag with the given qualified name.

-

Warning: direct change of tag does not change the element class.

-

Arguments

-

qname – str (e.g. "text:span")

-
- -Expand source code - -
@property
-def tag(self) -> str:
-    """Get/set the underlying xml tag with the given qualified name.
-
-    Warning: direct change of tag does not change the element class.
-
-    Arguments:
-
-        qname -- str (e.g. "text:span")
-    """
-    return _get_prefixed_name(self.__element.tag)
-
-
-
var tail : str | None
-
-

Get / set the text immediately following the element.

-
- -Expand source code - -
@property
-def tail(self) -> str | None:
-    """Get / set the text immediately following the element."""
-    return self.__element.tail
-
-
-
var text : str
-
-

Get / set the text content of the element.

-
- -Expand source code - -
@property
-def text(self) -> str:
-    """Get / set the text content of the element."""
-    return self.__element.text or ""
-
-
-
var text_content : str
-
-

Get / set the text of the embedded paragraph, including embeded -annotations, cells…

-

Set create a paragraph if missing

-
- -Expand source code - -
@property
-def text_content(self) -> str:
-    """Get / set the text of the embedded paragraph, including embeded
-    annotations, cells...
-
-    Set create a paragraph if missing
-    """
-    return "\n".join(
-        child.text_recursive for child in self.get_elements("descendant::text:p")
-    )
-
-
-
var text_recursive : str
-
-
-
- -Expand source code - -
@property
-def text_recursive(self) -> str:
-    return "".join(str(x) for x in self.__element.itertext())
-
-
-
-

Methods

-
-
-def append(self, str_or_element: str | Element) ‑> None -
-
-

Insert element or text in the last position.

-
- -Expand source code - -
def append(self, str_or_element: str | Element) -> None:
-    """Insert element or text in the last position."""
-    current = self.__element
-    if isinstance(str_or_element, str):
-        # Has children ?
-        children = list(current.iterchildren())
-        if children:
-            # Append to tail of the last child
-            last_child = children[-1]
-            text = last_child.tail
-            text = text if text is not None else ""
-            text += str_or_element
-            last_child.tail = text
-        else:
-            # Append to text of the element
-            text = current.text
-            text = text if text is not None else ""
-            text += str_or_element
-            current.text = text
-    elif isinstance(str_or_element, Element):
-        current.append(str_or_element.__element)
-    else:
-        raise TypeError(f'Element or string expected, not "{type(str_or_element)}"')
-
-
-
-def append_named_range(self, named_range: Element) ‑> None -
-
-

Append the named range to the spreadsheet, replacing existing named -range of same name if any.

-

Arguments

-

named_range – -NamedRange

-
- -Expand source code - -
def append_named_range(self, named_range: Element) -> None:
-    """Append the named range to the spreadsheet, replacing existing named
-    range of same name if any.
-
-    Arguments:
-
-        named_range --  NamedRange
-    """
-    if self.tag != "office:spreadsheet":
-        raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
-    named_expressions = self.get_element("table:named-expressions")
-    if not named_expressions:
-        named_expressions = Element.from_tag("table:named-expressions")
-        self.append(named_expressions)
-    # exists ?
-    current = named_expressions.get_element(
-        f'table:named-range[@table:name="{named_range.name}"][1]'  # type:ignore
-    )
-    if current:
-        named_expressions.delete(current)
-    named_expressions.append(named_range)
-
-
-
-def clear(self) ‑> None -
-
-

Remove text, children and attributes from the element.

-
- -Expand source code - -
def clear(self) -> None:
-    """Remove text, children and attributes from the element."""
-    self.__element.clear()
-    if hasattr(self, "_tmap"):
-        self._tmap: list[int] = []
-    if hasattr(self, "_cmap"):
-        self._cmap: list[int] = []
-    if hasattr(self, "_rmap"):
-        self._rmap: list[int] = []
-    if hasattr(self, "_indexes"):
-        remember = False
-        if "_rmap" in self._indexes:
-            remember = True
-        self._indexes: dict[str, dict] = {}
-        self._indexes["_cmap"] = {}
-        self._indexes["_tmap"] = {}
-        if remember:
-            self._indexes["_rmap"] = {}
-
-
-
-def del_attribute(self, name: str) ‑> None -
-
-
-
- -Expand source code - -
def del_attribute(self, name: str) -> None:
-    element = self.__element
-    lxml_tag = _get_lxml_tag_or_name(name)
-    del element.attrib[lxml_tag]
-
-
-
-def delete(self, child: Element | None = None, keep_tail: bool = True) ‑> None -
-
-

Delete the given element from the XML tree. If no element is given, -"self" is deleted. The XML library may allow to continue to use an -element now "orphan" as long as you have a reference to it.

-

if keep_tail is True (default), the tail text is not erased.

-

Arguments

-

child – Element

-

keep_tail – boolean (default to True), True for most usages.

-
- -Expand source code - -
def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-    """Delete the given element from the XML tree. If no element is given,
-    "self" is deleted. The XML library may allow to continue to use an
-    element now "orphan" as long as you have a reference to it.
-
-    if keep_tail is True (default), the tail text is not erased.
-
-    Arguments:
-
-        child -- Element
-
-        keep_tail -- boolean (default to True), True for most usages.
-    """
-    if child is None:
-        parent = self.parent
-        if parent is None:
-            raise ValueError(f"Can't delete the root element\n{self.serialize()}")
-        child = self
-    else:
-        parent = self
-    if keep_tail and child.__element.tail is not None:
-        current = child.__element
-        tail = str(current.tail)
-        current.tail = None
-        prev = current.getprevious()
-        if prev is not None:
-            if prev.tail is None:
-                prev.tail = tail
-            else:
-                prev.tail += tail
-        else:
-            if parent.__element.text is None:
-                parent.__element.text = tail
-            else:
-                parent.__element.text += tail
-    parent.__element.remove(child.__element)
-
-
-
-def delete_named_range(self, name: str) ‑> None -
-
-

Delete the Named Range of specified name from the spreadsheet.

-

Arguments

-

name – str

-
- -Expand source code - -
def delete_named_range(self, name: str) -> None:
-    """Delete the Named Range of specified name from the spreadsheet.
-
-    Arguments:
-
-        name -- str
-    """
-    if self.tag != "office:spreadsheet":
-        raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
-    named_range = self.get_named_range(name)
-    if not named_range:
-        return
-    named_range.delete()
-    named_expressions = self.get_element("table:named-expressions")
-    if not named_expressions:
-        return
-    element = named_expressions.__element
-    children = list(element.iterchildren())
-    if not children:
-        self.delete(named_expressions)
-
-
-
-def elements_repeated_sequence(self, xpath_instance: XPath, name: str) ‑> odfdo.list[tuple[int, int]] -
-
-

Utility method for table module.

-
- -Expand source code - -
def elements_repeated_sequence(
-    self,
-    xpath_instance: XPath,
-    name: str,
-) -> list[tuple[int, int]]:
-    """Utility method for table module."""
-    lxml_tag = _get_lxml_tag_or_name(name)
-    element = self.__element
-    sub_elements = xpath_instance(element)
-    if not isinstance(sub_elements, list):
-        raise TypeError("Bad XPath result.")
-    result: list[tuple[int, int]] = []
-    idx = -1
-    for sub_element in sub_elements:
-        if not isinstance(sub_element, _Element):
-            continue
-        idx += 1
-        value = sub_element.get(lxml_tag)
-        if value is None:
-            result.append((idx, 1))
-            continue
-        try:
-            int_value = int(value)
-        except ValueError:
-            int_value = 1
-        result.append((idx, max(int_value, 1)))
-    return result
-
-
-
-def extend(self, odf_elements: Iterable[Element]) ‑> None -
-
-

Fast append elements at the end of ourself using extend.

-
- -Expand source code - -
def extend(self, odf_elements: Iterable[Element]) -> None:
-    """Fast append elements at the end of ourself using extend."""
-    if odf_elements:
-        current = self.__element
-        elements = [element.__element for element in odf_elements]
-        current.extend(elements)
-
-
-
-def get_annotation(self, position: int = 0, creator: str | None = None, start_date: datetime | None = None, end_date: datetime | None = None, content: str | None = None, name: str | None = None) ‑> Element | None -
-
-

Return the annotation that matches the criteria.

-

Arguments

-

position – int

-

creator – str

-

start_date – datetime instance

-

end_date – datetime instance

-

content – str regex

-

name – str

-

Return: Annotation or None if not found

-
- -Expand source code - -
def get_annotation(
-    self,
-    position: int = 0,
-    creator: str | None = None,
-    start_date: datetime | None = None,
-    end_date: datetime | None = None,
-    content: str | None = None,
-    name: str | None = None,
-) -> Element | None:
-    """Return the annotation that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        creator -- str
-
-        start_date -- datetime instance
-
-        end_date -- datetime instance
-
-        content -- str regex
-
-        name -- str
-
-    Return: Annotation or None if not found
-    """
-    if name is not None:
-        return self._filtered_element(
-            "descendant::office:annotation", 0, office_name=name
-        )
-    annotations = self.get_annotations(
-        creator=creator, start_date=start_date, end_date=end_date, content=content
-    )
-    if not annotations:
-        return None
-    try:
-        return annotations[position]
-    except IndexError:
-        return None
-
-
-
-def get_annotation_end(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the annotation end that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_annotation_end(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the annotation end that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::office:annotation-end", position, office_name=name
-    )
-
-
-
-def get_annotation_ends(self) ‑> odfdo.list[Element] -
-
-

Return all the annotation ends.

-

Return: list of Element

-
- -Expand source code - -
def get_annotation_ends(self) -> list[Element]:
-    """Return all the annotation ends.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::office:annotation-end")
-
-
-
-def get_annotations(self, creator: str | None = None, start_date: datetime | None = None, end_date: datetime | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the annotations that match the criteria.

-

Arguments

-

creator – str

-

start_date – datetime instance

-

end_date – -datetime instance

-

content – str regex

-

Return: list of Annotation

-
- -Expand source code - -
def get_annotations(
-    self,
-    creator: str | None = None,
-    start_date: datetime | None = None,
-    end_date: datetime | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the annotations that match the criteria.
-
-    Arguments:
-
-        creator -- str
-
-        start_date -- datetime instance
-
-        end_date --  datetime instance
-
-        content -- str regex
-
-    Return: list of Annotation
-    """
-    annotations = []
-    for annotation in self._filtered_elements(
-        "descendant::office:annotation", content=content
-    ):
-        if creator is not None and creator != annotation.dc_creator:
-            continue
-        date = annotation.dc_date
-        if date is None:
-            continue
-        if start_date is not None and date < start_date:
-            continue
-        if end_date is not None and date >= end_date:
-            continue
-        annotations.append(annotation)
-    return annotations
-
-
-
-def get_attribute(self, name: str) ‑> str | bool | None -
-
-

Return the attribute value as type str | bool | None.

-
- -Expand source code - -
def get_attribute(self, name: str) -> str | bool | None:
-    """Return the attribute value as type str | bool | None."""
-    element = self.__element
-    lxml_tag = _get_lxml_tag_or_name(name)
-    value = element.get(lxml_tag)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-def get_attribute_integer(self, name: str) ‑> int | None -
-
-

Return either the attribute as type int, or None.

-
- -Expand source code - -
def get_attribute_integer(self, name: str) -> int | None:
-    """Return either the attribute as type int, or None."""
-    element = self.__element
-    lxml_tag = _get_lxml_tag_or_name(name)
-    value = element.get(lxml_tag)
-    if value is None:
-        return None
-    try:
-        return int(value)
-    except ValueError:
-        return None
-
-
-
-def get_attribute_string(self, name: str) ‑> str | None -
-
-

Return either the attribute as type str, or None.

-
- -Expand source code - -
def get_attribute_string(self, name: str) -> str | None:
-    """Return either the attribute as type str, or None."""
-    element = self.__element
-    lxml_tag = _get_lxml_tag_or_name(name)
-    value = element.get(lxml_tag)
-    if value is None:
-        return None
-    return str(value)
-
-
-
-def get_between(self, tag1: Element, tag2: Element, as_text: bool = False, clean: bool = True, no_header: bool = True) ‑> odfdo.list | Element | str -
-
-

Returns elements between tag1 and tag2, tag1 and tag2 shall -be unique and having an id attribute. -(WARN: buggy if tag1/tag2 defines a malformed odf xml.) -If as_text is True: returns the text content. -If clean is True: suppress unwanted tags (deletions marks, …) -If no_header is True: existing text:h are changed in text:p -By default: returns a list of Element, cleaned and without headers.

-

Implementation and standard retrictions: -Only text:h and text:p sould be 'cut' by an insert tag, so inner parts -of insert tags are:

-
- any text:h, text:p or sub tag of these
-
-- some text, part of a parent text:h or text:p
-
-

Arguments

-

tag1 – Element

-

tag2 – Element

-

as_text – boolean

-

clean – boolean

-

no_header – boolean

-

Return: list of odf_paragraph or odf_header

-
- -Expand source code - -
def get_between(
-    self,
-    tag1: Element,
-    tag2: Element,
-    as_text: bool = False,
-    clean: bool = True,
-    no_header: bool = True,
-) -> list | Element | str:
-    """Returns elements between tag1 and tag2, tag1 and tag2 shall
-    be unique and having an id attribute.
-    (WARN: buggy if tag1/tag2 defines a malformed odf xml.)
-    If as_text is True: returns the text content.
-    If clean is True: suppress unwanted tags (deletions marks, ...)
-    If no_header is True: existing text:h are changed in text:p
-    By default: returns a list of Element, cleaned and without headers.
-
-    Implementation and standard retrictions:
-    Only text:h and text:p sould be 'cut' by an insert tag, so inner parts
-    of insert tags are:
-
-        - any text:h, text:p or sub tag of these
-
-        - some text, part of a parent text:h or text:p
-
-    Arguments:
-
-        tag1 -- Element
-
-        tag2 -- Element
-
-        as_text -- boolean
-
-        clean -- boolean
-
-        no_header -- boolean
-
-    Return: list of odf_paragraph or odf_header
-    """
-    inner = self._get_between_base(tag1, tag2)
-
-    if clean:
-        clean_tags = (
-            "text:change",
-            "text:change-start",
-            "text:change-end",
-            "text:reference-mark",
-            "text:reference-mark-start",
-            "text:reference-mark-end",
-        )
-        request_self = " | ".join(["self::%s" % c for c in clean_tags])
-        inner = [e for e in inner if not e.xpath(request_self)]
-        request = " | ".join([f"descendant::{tag}" for tag in clean_tags])
-        for element in inner:
-            to_del = element.xpath(request)
-            for elem in to_del:
-                if isinstance(elem, Element):
-                    element.delete(elem)
-    if no_header:  # crude replace t:h by t:p
-        new_inner = []
-        for element in inner:
-            if element.tag == "text:h":
-                children = element.children
-                text = element.__element.text
-                para = Element.from_tag("text:p")
-                para.text = text or ""
-                for c in children:
-                    para.append(c)
-                new_inner.append(para)
-            else:
-                new_inner.append(element)
-        inner = new_inner
-    if as_text:
-        return "\n".join([e.get_formatted_text() for e in inner])
-    else:
-        return inner
-
-
-
-def get_bookmark(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the bookmark that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

Return: Bookmark or None if not found

-
- -Expand source code - -
def get_bookmark(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the bookmark that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Bookmark or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:bookmark", position, text_name=name
-    )
-
-
-
-def get_bookmark_end(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the bookmark end that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_bookmark_end(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the bookmark end that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:bookmark-end", position, text_name=name
-    )
-
-
-
-def get_bookmark_ends(self) ‑> odfdo.list[Element] -
-
-

Return all the bookmark ends.

-

Return: list of Element

-
- -Expand source code - -
def get_bookmark_ends(self) -> list[Element]:
-    """Return all the bookmark ends.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:bookmark-end")
-
-
-
-def get_bookmark_start(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the bookmark start that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_bookmark_start(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the bookmark start that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:bookmark-start", position, text_name=name
-    )
-
-
-
-def get_bookmark_starts(self) ‑> odfdo.list[Element] -
-
-

Return all the bookmark starts.

-

Return: list of Element

-
- -Expand source code - -
def get_bookmark_starts(self) -> list[Element]:
-    """Return all the bookmark starts.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:bookmark-start")
-
-
-
-def get_bookmarks(self) ‑> odfdo.list[Element] -
-
-

Return all the bookmarks.

-

Return: list of Element

-
- -Expand source code - -
def get_bookmarks(self) -> list[Element]:
-    """Return all the bookmarks.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:bookmark")
-
-
-
-def get_changes_ids(self) ‑> odfdo.list[Element | Text] -
-
-

Return a list of ids that refers to a change region in the tracked -changes list.

-
- -Expand source code - -
def get_changes_ids(self) -> list[Element | Text]:
-    """Return a list of ids that refers to a change region in the tracked
-    changes list.
-    """
-    # Insertion changes
-    xpath_query = "descendant::text:change-start/@text:change-id"
-    # Deletion changes
-    xpath_query += " | descendant::text:change/@text:change-id"
-    return self.xpath(xpath_query)
-
-
-
-def get_draw_connector(self, position: int = 0, id: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the draw connector that matches the criteria.

-

Arguments

-

position – int

-

id – str

-

content – str regex

-

Return: odf_shape or None if not found

-
- -Expand source code - -
def get_draw_connector(
-    self,
-    position: int = 0,
-    id: str | None = None,  # noqa:A002
-    content: str | None = None,
-) -> Element | None:
-    """Return the draw connector that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        id -- str
-
-        content -- str regex
-
-    Return: odf_shape or None if not found
-    """
-    return self._filtered_element(
-        "descendant::draw:connector", position, draw_id=id, content=content
-    )
-
-
-
-def get_draw_connectors(self, draw_style: str | None = None, draw_text_style: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the draw connectors that match the criteria.

-

Arguments

-

draw_style – str

-

draw_text_style – str

-

content – str regex

-

Return: list of odf_shape

-
- -Expand source code - -
def get_draw_connectors(
-    self,
-    draw_style: str | None = None,
-    draw_text_style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the draw connectors that match the criteria.
-
-    Arguments:
-
-        draw_style -- str
-
-        draw_text_style -- str
-
-        content -- str regex
-
-    Return: list of odf_shape
-    """
-    return self._filtered_elements(
-        "descendant::draw:connector",
-        draw_style=draw_style,
-        draw_text_style=draw_text_style,
-        content=content,
-    )
-
-
-
-def get_draw_ellipse(self, position: int = 0, id: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the draw ellipse that matches the criteria.

-

Arguments

-

position – int

-

id – str

-

content – str regex

-

Return: odf_shape or None if not found

-
- -Expand source code - -
def get_draw_ellipse(
-    self,
-    position: int = 0,
-    id: str | None = None,  # noqa:A002
-    content: str | None = None,
-) -> Element | None:
-    """Return the draw ellipse that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        id -- str
-
-        content -- str regex
-
-    Return: odf_shape or None if not found
-    """
-    return self._filtered_element(
-        "descendant::draw:ellipse", position, draw_id=id, content=content
-    )
-
-
-
-def get_draw_ellipses(self, draw_style: str | None = None, draw_text_style: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the draw ellipses that match the criteria.

-

Arguments

-

draw_style – str

-

draw_text_style – str

-

content – str regex

-

Return: list of odf_shape

-
- -Expand source code - -
def get_draw_ellipses(
-    self,
-    draw_style: str | None = None,
-    draw_text_style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the draw ellipses that match the criteria.
-
-    Arguments:
-
-        draw_style -- str
-
-        draw_text_style -- str
-
-        content -- str regex
-
-    Return: list of odf_shape
-    """
-    return self._filtered_elements(
-        "descendant::draw:ellipse",
-        draw_style=draw_style,
-        draw_text_style=draw_text_style,
-        content=content,
-    )
-
-
-
-def get_draw_group(self, position: int = 0, name: str | None = None, title: str | None = None, description: str | None = None, content: str | None = None) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_draw_group(
-    self,
-    position: int = 0,
-    name: str | None = None,
-    title: str | None = None,
-    description: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    return self._filtered_element(
-        "descendant::draw:g",
-        position,
-        draw_name=name,
-        svg_title=title,
-        svg_desc=description,
-        content=content,
-    )
-
-
-
-def get_draw_groups(self, title: str | None = None, description: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-
-
- -Expand source code - -
def get_draw_groups(
-    self,
-    title: str | None = None,
-    description: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    return self._filtered_elements(
-        "descendant::draw:g",
-        svg_title=title,
-        svg_desc=description,
-        content=content,
-    )
-
-
-
-def get_draw_line(self, position: int = 0, id: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the draw line that matches the criteria.

-

Arguments

-

position – int

-

id – str

-

content – str regex

-

Return: odf_shape or None if not found

-
- -Expand source code - -
def get_draw_line(
-    self,
-    position: int = 0,
-    id: str | None = None,  # noqa:A002
-    content: str | None = None,
-) -> Element | None:
-    """Return the draw line that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        id -- str
-
-        content -- str regex
-
-    Return: odf_shape or None if not found
-    """
-    return self._filtered_element(
-        "descendant::draw:line", position, draw_id=id, content=content
-    )
-
-
-
-def get_draw_lines(self, draw_style: str | None = None, draw_text_style: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the draw lines that match the criteria.

-

Arguments

-

draw_style – str

-

draw_text_style – str

-

content – str regex

-

Return: list of odf_shape

-
- -Expand source code - -
def get_draw_lines(
-    self,
-    draw_style: str | None = None,
-    draw_text_style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the draw lines that match the criteria.
-
-    Arguments:
-
-        draw_style -- str
-
-        draw_text_style -- str
-
-        content -- str regex
-
-    Return: list of odf_shape
-    """
-    return self._filtered_elements(
-        "descendant::draw:line",
-        draw_style=draw_style,
-        draw_text_style=draw_text_style,
-        content=content,
-    )
-
-
-
-def get_draw_page(self, position: int = 0, name: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the draw page that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

content – str regex

-

Return: DrawPage or None if not found

-
- -Expand source code - -
def get_draw_page(
-    self,
-    position: int = 0,
-    name: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the draw page that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-        content -- str regex
-
-    Return: DrawPage or None if not found
-    """
-    return self._filtered_element(
-        "descendant::draw:page", position, draw_name=name, content=content
-    )
-
-
-
-def get_draw_pages(self, style: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the draw pages that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of DrawPage

-
- -Expand source code - -
def get_draw_pages(
-    self,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the draw pages that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of DrawPage
-    """
-    return self._filtered_elements(
-        "descendant::draw:page", draw_style=style, content=content
-    )
-
-
-
-def get_draw_rectangle(self, position: int = 0, id: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the draw rectangle that matches the criteria.

-

Arguments

-

position – int

-

id – str

-

content – str regex

-

Return: odf_shape or None if not found

-
- -Expand source code - -
def get_draw_rectangle(
-    self,
-    position: int = 0,
-    id: str | None = None,  # noqa:A002
-    content: str | None = None,
-) -> Element | None:
-    """Return the draw rectangle that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        id -- str
-
-        content -- str regex
-
-    Return: odf_shape or None if not found
-    """
-    return self._filtered_element(
-        "descendant::draw:rect", position, draw_id=id, content=content
-    )
-
-
-
-def get_draw_rectangles(self, draw_style: str | None = None, draw_text_style: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the draw rectangles that match the criteria.

-

Arguments

-

draw_style – str

-

draw_text_style – str

-

content – str regex

-

Return: list of odf_shape

-
- -Expand source code - -
def get_draw_rectangles(
-    self,
-    draw_style: str | None = None,
-    draw_text_style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the draw rectangles that match the criteria.
-
-    Arguments:
-
-        draw_style -- str
-
-        draw_text_style -- str
-
-        content -- str regex
-
-    Return: list of odf_shape
-    """
-    return self._filtered_elements(
-        "descendant::draw:rect",
-        draw_style=draw_style,
-        draw_text_style=draw_text_style,
-        content=content,
-    )
-
-
-
-def get_element(self, xpath_query: XPath | str) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_element(self, xpath_query: XPath | str) -> Element | None:
-    element = self.__element
-    result = element.xpath(f"({xpath_query})[1]", namespaces=ODF_NAMESPACES)
-    if result:
-        return Element.from_tag(result[0])  # type:ignore
-    return None
-
-
-
-def get_elements(self, xpath_query: XPath | str) ‑> odfdo.list[Element] -
-
-
-
- -Expand source code - -
def get_elements(self, xpath_query: XPath | str) -> list[Element]:
-    cache: tuple | None = None
-    element = self.__element
-    if isinstance(xpath_query, str):
-        new_xpath_query = xpath_compile(xpath_query)
-        result = new_xpath_query(element)
-    else:
-        result = xpath_query(element)
-    if not isinstance(result, list):
-        raise TypeError("Bad XPath result")
-
-    if hasattr(self, "_tmap"):
-        if hasattr(self, "_rmap"):
-            cache = (self._tmap, self._cmap, self._rmap)
-        else:
-            cache = (self._tmap, self._cmap)
-    return [
-        Element.from_tag_for_clone(e, cache)
-        for e in result
-        if isinstance(e, _Element)
-    ]
-
-
-
-def get_formatted_text(self, context: dict | None = None) ‑> str -
-
-

This function should return a beautiful version of the text.

-
- -Expand source code - -
def get_formatted_text(self, context: dict | None = None) -> str:
-    """This function should return a beautiful version of the text."""
-    return ""
-
-
-
-def get_frame(self, position: int = 0, name: str | None = None, presentation_class: str | None = None, title: str | None = None, description: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the section that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

presentation_class – str

-

title – str regex

-

description – str regex

-

content – str regex

-

Return: Frame or None if not found

-
- -Expand source code - -
def get_frame(
-    self,
-    position: int = 0,
-    name: str | None = None,
-    presentation_class: str | None = None,
-    title: str | None = None,
-    description: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the section that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-        presentation_class -- str
-
-        title -- str regex
-
-        description -- str regex
-
-        content -- str regex
-
-    Return: Frame or None if not found
-    """
-    return self._filtered_element(
-        "descendant::draw:frame",
-        position,
-        draw_name=name,
-        presentation_class=presentation_class,
-        svg_title=title,
-        svg_desc=description,
-        content=content,
-    )
-
-
-
-def get_frames(self, presentation_class: str | None = None, style: str | None = None, title: str | None = None, description: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the frames that match the criteria.

-

Arguments

-

presentation_class – str

-

style – str

-

title – str regex

-

description – str regex

-

content – str regex

-

Return: list of Frame

-
- -Expand source code - -
def get_frames(
-    self,
-    presentation_class: str | None = None,
-    style: str | None = None,
-    title: str | None = None,
-    description: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the frames that match the criteria.
-
-    Arguments:
-
-        presentation_class -- str
-
-        style -- str
-
-        title -- str regex
-
-        description -- str regex
-
-        content -- str regex
-
-    Return: list of Frame
-    """
-    return self._filtered_elements(
-        "descendant::draw:frame",
-        presentation_class=presentation_class,
-        draw_style=style,
-        svg_title=title,
-        svg_desc=description,
-        content=content,
-    )
-
-
-
-def get_header(self, position: int = 0, outline_level: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the Header that matches the criteria.

-

Arguments

-

position – int

-

content – str regex

-

Return: Header or None if not found

-
- -Expand source code - -
def get_header(
-    self,
-    position: int = 0,
-    outline_level: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the Header that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: Header or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:h",
-        position,
-        outline_level=outline_level,
-        content=content,
-    )
-
-
-
-def get_headers(self, style: str | None = None, outline_level: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the Headers that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of Header

-
- -Expand source code - -
def get_headers(
-    self,
-    style: str | None = None,
-    outline_level: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the Headers that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of Header
-    """
-    return self._filtered_elements(
-        "descendant::text:h",
-        text_style=style,
-        outline_level=outline_level,
-        content=content,
-    )
-
-
-
-def get_image(self, position: int = 0, name: str | None = None, url: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the image matching the criteria.

-

Arguments

-

position – int

-

name – str

-

url – str regex

-

content – str regex

-

Return: Element or None if not found

-
- -Expand source code - -
def get_image(
-    self,
-    position: int = 0,
-    name: str | None = None,
-    url: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the image matching the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-        url -- str regex
-
-        content -- str regex
-
-    Return: Element or None if not found
-    """
-    # The frame is holding the name
-    if name is not None:
-        frame = self._filtered_element(
-            "descendant::draw:frame", position, draw_name=name
-        )
-        if frame is None:
-            return None
-        # The name is supposedly unique
-        return frame.get_element("draw:image")
-    return self._filtered_element(
-        "descendant::draw:image", position, url=url, content=content
-    )
-
-
-
-def get_images(self, style: str | None = None, url: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the images matching the criteria.

-

Arguments

-

style – str

-

url – str regex

-

content – str regex

-

Return: list of Element

-
- -Expand source code - -
def get_images(
-    self,
-    style: str | None = None,
-    url: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the images matching the criteria.
-
-    Arguments:
-
-        style -- str
-
-        url -- str regex
-
-        content -- str regex
-
-    Return: list of Element
-    """
-    return self._filtered_elements(
-        "descendant::draw:image", text_style=style, url=url, content=content
-    )
-
-
- -
-

Return the link that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

title – str

-

url – str regex

-

content – str regex

-

Return: Element or None if not found

-
- -Expand source code - -
def get_link(
-    self,
-    position: int = 0,
-    name: str | None = None,
-    title: str | None = None,
-    url: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the link that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-        title -- str
-
-        url -- str regex
-
-        content -- str regex
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:a",
-        position,
-        office_name=name,
-        office_title=title,
-        url=url,
-        content=content,
-    )
-
-
- -
-

Return all the links that match the criteria.

-

Arguments

-

name – str

-

title – str

-

url – str regex

-

content – str regex

-

Return: list of Element

-
- -Expand source code - -
def get_links(
-    self,
-    name: str | None = None,
-    title: str | None = None,
-    url: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the links that match the criteria.
-
-    Arguments:
-
-        name -- str
-
-        title -- str
-
-        url -- str regex
-
-        content -- str regex
-
-    Return: list of Element
-    """
-    return self._filtered_elements(
-        "descendant::text:a",
-        office_name=name,
-        office_title=title,
-        url=url,
-        content=content,
-    )
-
-
-
-def get_list(self, position: int = 0, content: str | None = None) ‑> Element | None -
-
-

Return the list that matches the criteria.

-

Arguments

-

position – int

-

content – str regex

-

Return: List or None if not found

-
- -Expand source code - -
def get_list(
-    self,
-    position: int = 0,
-    content: str | None = None,
-) -> Element | None:
-    """Return the list that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: List or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:list", position, content=content
-    )
-
-
-
-def get_lists(self, style: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the lists that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of List

-
- -Expand source code - -
def get_lists(
-    self,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the lists that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of List
-    """
-    return self._filtered_elements(
-        "descendant::text:list", text_style=style, content=content
-    )
-
-
-
-def get_named_range(self, name: str) ‑> Element | None -
-
-

Return the named range of specified name, or None if not found.

-

Arguments

-

name – str

-

Return: NamedRange

-
- -Expand source code - -
def get_named_range(self, name: str) -> Element | None:
-    """Return the named range of specified name, or None if not found.
-
-    Arguments:
-
-        name -- str
-
-    Return: NamedRange
-    """
-    named_range = self.get_elements(
-        f'descendant::table:named-expressions/table:named-range[@table:name="{name}"][1]'
-    )
-    if named_range:
-        return named_range[0]
-    else:
-        return None
-
-
-
-def get_named_ranges(self) ‑> odfdo.list[Element] -
-
-

Return all the tables named ranges.

-

Return: list of odf_named_range

-
- -Expand source code - -
def get_named_ranges(self) -> list[Element]:
-    """Return all the tables named ranges.
-
-    Return: list of odf_named_range
-    """
-    named_ranges = self.get_elements(
-        "descendant::table:named-expressions/table:named-range"
-    )
-    return named_ranges
-
-
-
-def get_note(self, position: int = 0, note_id: str | None = None, note_class: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the note that matches the criteria.

-

Arguments

-

position – int

-

note_id – str

-

note_class – 'footnote' or 'endnote'

-

content – str regex

-

Return: Note or None if not found

-
- -Expand source code - -
def get_note(
-    self,
-    position: int = 0,
-    note_id: str | None = None,
-    note_class: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the note that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        note_id -- str
-
-        note_class -- 'footnote' or 'endnote'
-
-        content -- str regex
-
-    Return: Note or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:note",
-        position,
-        text_id=note_id,
-        note_class=note_class,
-        content=content,
-    )
-
-
-
-def get_notes(self, note_class: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the notes that match the criteria.

-

Arguments

-

note_class – 'footnote' or 'endnote'

-

content – str regex

-

Return: list of Note

-
- -Expand source code - -
def get_notes(
-    self,
-    note_class: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the notes that match the criteria.
-
-    Arguments:
-
-        note_class -- 'footnote' or 'endnote'
-
-        content -- str regex
-
-    Return: list of Note
-    """
-    return self._filtered_elements(
-        "descendant::text:note", note_class=note_class, content=content
-    )
-
-
-
-def get_office_names(self) ‑> odfdo.list[str] -
-
-

Return all the used office:name tags values of the element.

-

Return: list of unique str

-
- -Expand source code - -
def get_office_names(self) -> list[str]:
-    """Return all the used office:name tags values of the element.
-
-    Return: list of unique str
-    """
-    name_xpath_query = xpath_compile("//@office:name")
-    response = name_xpath_query(self.__element)
-    if not isinstance(response, list):
-        return []
-    return list({str(name) for name in response if name})
-
-
-
-def get_orphan_draw_connectors(self) ‑> odfdo.list[Element] -
-
-

Return a list of connectors which don't have any shape connected -to them.

-
- -Expand source code - -
def get_orphan_draw_connectors(self) -> list[Element]:
-    """Return a list of connectors which don't have any shape connected
-    to them.
-    """
-    connectors = []
-    for connector in self.get_draw_connectors():
-        start_shape = connector.get_attribute("draw:start-shape")
-        end_shape = connector.get_attribute("draw:end-shape")
-        if start_shape is None and end_shape is None:
-            connectors.append(connector)
-    return connectors
-
-
-
-def get_paragraph(self, position: int = 0, content: str | None = None) ‑> Element | None -
-
-

Return the paragraph that matches the criteria.

-

Arguments

-

position – int

-

content – str regex

-

Return: Paragraph or None if not found

-
- -Expand source code - -
def get_paragraph(
-    self,
-    position: int = 0,
-    content: str | None = None,
-) -> Element | None:
-    """Return the paragraph that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: Paragraph or None if not found
-    """
-    return self._filtered_element("descendant::text:p", position, content=content)
-
-
-
-def get_paragraphs(self, style: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the paragraphs that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of Paragraph

-
- -Expand source code - -
def get_paragraphs(
-    self,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the paragraphs that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of Paragraph
-    """
-    return self._filtered_elements(
-        "descendant::text:p", text_style=style, content=content
-    )
-
-
-
-def get_reference_mark(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the reference mark that match the criteria. Either single -position reference mark (text:reference-mark) or start of range -reference (text:reference-mark-start).

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_reference_mark(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the reference mark that match the criteria. Either single
-    position reference mark (text:reference-mark) or start of range
-    reference (text:reference-mark-start).
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    if name:
-        request = (
-            f"descendant::text:reference-mark-start"
-            f'[@text:name="{name}"] '
-            f"| descendant::text:reference-mark"
-            f'[@text:name="{name}"]'
-        )
-        return self._filtered_element(request, position=0)
-    request = (
-        "descendant::text:reference-mark-start | descendant::text:reference-mark"
-    )
-    return self._filtered_element(request, position)
-
-
-
-def get_reference_mark_end(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the reference mark end that matches the criteria. Search only -the tags text:reference-mark-end. -Consider using : get_reference_marks()

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_reference_mark_end(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the reference mark end that matches the criteria. Search only
-    the tags text:reference-mark-end.
-    Consider using : get_reference_marks()
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:reference-mark-end", position, text_name=name
-    )
-
-
-
-def get_reference_mark_ends(self) ‑> odfdo.list[Element] -
-
-

Return all the reference mark ends. Search only the tags -text:reference-mark-end. -Consider using : get_reference_marks()

-

Return: list of Element

-
- -Expand source code - -
def get_reference_mark_ends(self) -> list[Element]:
-    """Return all the reference mark ends. Search only the tags
-    text:reference-mark-end.
-    Consider using : get_reference_marks()
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:reference-mark-end")
-
-
-
-def get_reference_mark_single(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the reference mark that matches the criteria. Search only the -tags text:reference-mark. -Consider using : get_reference_mark()

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_reference_mark_single(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the reference mark that matches the criteria. Search only the
-    tags text:reference-mark.
-    Consider using : get_reference_mark()
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:reference-mark", position, text_name=name
-    )
-
-
-
-def get_reference_mark_start(self, position: int = 0, name: str | None = None) ‑> Element | None -
-
-

Return the reference mark start that matches the criteria. Search -only the tags text:reference-mark-start. -Consider using : get_reference_mark()

-

Arguments

-

position – int

-

name – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_reference_mark_start(
-    self,
-    position: int = 0,
-    name: str | None = None,
-) -> Element | None:
-    """Return the reference mark start that matches the criteria. Search
-    only the tags text:reference-mark-start.
-    Consider using : get_reference_mark()
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:reference-mark-start", position, text_name=name
-    )
-
-
-
-def get_reference_mark_starts(self) ‑> odfdo.list[Element] -
-
-

Return all the reference mark starts. Search only the tags -text:reference-mark-start. -Consider using : get_reference_marks()

-

Return: list of Element

-
- -Expand source code - -
def get_reference_mark_starts(self) -> list[Element]:
-    """Return all the reference mark starts. Search only the tags
-    text:reference-mark-start.
-    Consider using : get_reference_marks()
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:reference-mark-start")
-
-
-
-def get_reference_marks(self) ‑> odfdo.list[Element] -
-
-

Return all the reference marks, either single position reference -(text:reference-mark) or start of range reference -(text:reference-mark-start).

-

Return: list of Element

-
- -Expand source code - -
def get_reference_marks(self) -> list[Element]:
-    """Return all the reference marks, either single position reference
-    (text:reference-mark) or start of range reference
-    (text:reference-mark-start).
-
-    Return: list of Element
-    """
-    return self._filtered_elements(
-        "descendant::text:reference-mark-start | descendant::text:reference-mark"
-    )
-
-
-
-def get_reference_marks_single(self) ‑> odfdo.list[Element] -
-
-

Return all the reference marks. Search only the tags -text:reference-mark. -Consider using : get_reference_marks()

-

Return: list of Element

-
- -Expand source code - -
def get_reference_marks_single(self) -> list[Element]:
-    """Return all the reference marks. Search only the tags
-    text:reference-mark.
-    Consider using : get_reference_marks()
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:reference-mark")
-
-
-
-def get_references(self, name: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the references (text:reference-ref). If name is -provided, returns the references of that name.

-

Return: list of Element

-

Arguments

-

name – str or None

-
- -Expand source code - -
def get_references(self, name: str | None = None) -> list[Element]:
-    """Return all the references (text:reference-ref). If name is
-    provided, returns the references of that name.
-
-    Return: list of Element
-
-    Arguments:
-
-        name -- str or None
-    """
-    if name is None:
-        return self._filtered_elements("descendant::text:reference-ref")
-    request = f'descendant::text:reference-ref[@text:ref-name="{name}"]'
-    return self._filtered_elements(request)
-
-
-
-def get_section(self, position: int = 0, content: str | None = None) ‑> Element | None -
-
-

Return the section that matches the criteria.

-

Arguments

-

position – int

-

content – str regex

-

Return: Element or None if not found

-
- -Expand source code - -
def get_section(
-    self,
-    position: int = 0,
-    content: str | None = None,
-) -> Element | None:
-    """Return the section that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:section", position, content=content
-    )
-
-
-
-def get_sections(self, style: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the sections that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of Element

-
- -Expand source code - -
def get_sections(
-    self,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the sections that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of Element
-    """
-    return self._filtered_elements(
-        "text:section", text_style=style, content=content
-    )
-
-
-
-def get_span(self, position: int = 0, content: str | None = None) ‑> Element | None -
-
-

Return the span that matches the criteria.

-

Arguments

-

position – int

-

content – str regex

-

Return: Span or None if not found

-
- -Expand source code - -
def get_span(
-    self,
-    position: int = 0,
-    content: str | None = None,
-) -> Element | None:
-    """Return the span that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: Span or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:span", position, content=content
-    )
-
-
-
-def get_spans(self, style: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the spans that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of Span

-
- -Expand source code - -
def get_spans(
-    self,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the spans that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of Span
-    """
-    return self._filtered_elements(
-        "descendant::text:span", text_style=style, content=content
-    )
-
-
-
-def get_style(self, family: str, name_or_element: str | Element | None = None, display_name: str | None = None) ‑> Element | None -
-
-

Return the style uniquely identified by the family/name pair. If -the argument is already a style object, it will return it.

-

If the name is not the internal name but the name you gave in the -desktop application, use display_name instead.

-

Arguments

-

family – 'paragraph', 'text', 'graphic', 'table', 'list', -'number'

-

name_or_element – str or Style

-

display_name – str

-

Return: odf_style or None if not found

-
- -Expand source code - -
def get_style(
-    self,
-    family: str,
-    name_or_element: str | Element | None = None,
-    display_name: str | None = None,
-) -> Element | None:
-    """Return the style uniquely identified by the family/name pair. If
-    the argument is already a style object, it will return it.
-
-    If the name is not the internal name but the name you gave in the
-    desktop application, use display_name instead.
-
-    Arguments:
-
-        family -- 'paragraph', 'text', 'graphic', 'table', 'list',
-                  'number'
-
-        name_or_element -- str or Style
-
-        display_name -- str
-
-    Return: odf_style or None if not found
-    """
-    if isinstance(name_or_element, Element):
-        name = self.get_attribute("style:name")
-        if name is not None:
-            return name_or_element
-        else:
-            raise ValueError(f"Not a odf_style ? {name_or_element!r}")
-    style_name = name_or_element
-    is_default = not (style_name or display_name)
-    tagname = self._get_style_tagname(family, is_default=is_default)
-    # famattr became None if no "style:family" attribute
-    if family:
-        return self._filtered_element(
-            tagname,
-            0,
-            style_name=style_name,
-            display_name=display_name,
-            family=family,
-        )
-    else:
-        return self._filtered_element(
-            tagname,
-            0,
-            draw_name=style_name or display_name,
-            family=family,
-        )
-
-
-
-def get_styled_elements(self, name: str = '') ‑> odfdo.list[Element] -
-
-

Brute-force to find paragraphs, tables, etc. using the given style -name (or all by default).

-

Arguments

-

name – str

-

Return: list

-
- -Expand source code - -
def get_styled_elements(self, name: str = "") -> list[Element]:
-    """Brute-force to find paragraphs, tables, etc. using the given style
-    name (or all by default).
-
-    Arguments:
-
-        name -- str
-
-    Return: list
-    """
-    # FIXME incomplete (and possibly inaccurate)
-    return (
-        self._filtered_elements("descendant::*", text_style=name)
-        + self._filtered_elements("descendant::*", draw_style=name)
-        + self._filtered_elements("descendant::*", draw_text_style=name)
-        + self._filtered_elements("descendant::*", table_style=name)
-        + self._filtered_elements("descendant::*", page_layout=name)
-        + self._filtered_elements("descendant::*", master_page=name)
-        + self._filtered_elements("descendant::*", parent_style=name)
-    )
-
-
-
-def get_styles(self, family: str | None = None) ‑> odfdo.list[Element] -
-
-
-
- -Expand source code - -
def get_styles(self, family: str | None = None) -> list[Element]:
-    # Both common and default styles
-    tagname = self._get_style_tagname(family)
-    return self._filtered_elements(tagname, family=family)
-
-
-
-def get_table(self, position: int = 0, name: str | None = None, content: str | None = None) ‑> Element | None -
-
-

Return the table that matches the criteria.

-

Arguments

-

position – int

-

name – str

-

content – str regex

-

Return: Table or None if not found

-
- -Expand source code - -
def get_table(
-    self,
-    position: int = 0,
-    name: str | None = None,
-    content: str | None = None,
-) -> Element | None:
-    """Return the table that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        name -- str
-
-        content -- str regex
-
-    Return: Table or None if not found
-    """
-    if name is None and content is None:
-        result = self._filtered_element("descendant::table:table", position)
-    else:
-        result = self._filtered_element(
-            "descendant::table:table",
-            position,
-            table_name=name,
-            content=content,
-        )
-    return result
-
-
-
-def get_tables(self, style: str | None = None, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the tables that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of Table

-
- -Expand source code - -
def get_tables(
-    self,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Element]:
-    """Return all the tables that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of Table
-    """
-    return self._filtered_elements(
-        "descendant::table:table", table_style=style, content=content
-    )
-
-
-
-def get_text_change(self, position: int = 0, idx: str | None = None) ‑> Element | None -
-
-

Return the text change that matches the criteria. Either single -deletion (text:change) or start of range of changes (text:change-start). -position : index of the element to retrieve if several matches, default -is 0. -idx : change-id of the element.

-

Arguments

-

position – int

-

idx – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_text_change(
-    self,
-    position: int = 0,
-    idx: str | None = None,
-) -> Element | None:
-    """Return the text change that matches the criteria. Either single
-    deletion (text:change) or start of range of changes (text:change-start).
-    position : index of the element to retrieve if several matches, default
-    is 0.
-    idx : change-id of the element.
-
-    Arguments:
-
-        position -- int
-
-        idx -- str
-
-    Return: Element or None if not found
-    """
-    if idx:
-        request = (
-            f'descendant::text:change-start[@text:change-id="{idx}"] '
-            f'| descendant::text:change[@text:change-id="{idx}"]'
-        )
-        return self._filtered_element(request, 0)
-    request = "descendant::text:change-start | descendant::text:change"
-    return self._filtered_element(request, position)
-
-
-
-def get_text_change_deletion(self, position: int = 0, idx: str | None = None) ‑> Element | None -
-
-

Return the text change of deletion kind that matches the criteria. -Search only for the tags text:change. -Consider using : get_text_change()

-

Arguments

-

position – int

-

idx – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_text_change_deletion(
-    self,
-    position: int = 0,
-    idx: str | None = None,
-) -> Element | None:
-    """Return the text change of deletion kind that matches the criteria.
-    Search only for the tags text:change.
-    Consider using : get_text_change()
-
-    Arguments:
-
-        position -- int
-
-        idx -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:change", position, change_id=idx
-    )
-
-
-
-def get_text_change_deletions(self) ‑> odfdo.list[Element] -
-
-

Return all the text changes of deletion kind: the tags text:change. -Consider using : get_text_changes()

-

Return: list of Element

-
- -Expand source code - -
def get_text_change_deletions(self) -> list[Element]:
-    """Return all the text changes of deletion kind: the tags text:change.
-    Consider using : get_text_changes()
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:text:change")
-
-
-
-def get_text_change_end(self, position: int = 0, idx: str | None = None) ‑> Element | None -
-
-

Return the text change-end that matches the criteria. Search only -the tags text:change-end. -Consider using : get_text_change()

-

Arguments

-

position – int

-

idx – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_text_change_end(
-    self,
-    position: int = 0,
-    idx: str | None = None,
-) -> Element | None:
-    """Return the text change-end that matches the criteria. Search only
-    the tags text:change-end.
-    Consider using : get_text_change()
-
-    Arguments:
-
-        position -- int
-
-        idx -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:change-end", position, change_id=idx
-    )
-
-
-
-def get_text_change_ends(self) ‑> odfdo.list[Element] -
-
-

Return all the text change-end. Search only the tags -text:change-end. -Consider using : get_text_changes()

-

Return: list of Element

-
- -Expand source code - -
def get_text_change_ends(self) -> list[Element]:
-    """Return all the text change-end. Search only the tags
-    text:change-end.
-    Consider using : get_text_changes()
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:change-end")
-
-
-
-def get_text_change_start(self, position: int = 0, idx: str | None = None) ‑> Element | None -
-
-

Return the text change-start that matches the criteria. Search -only the tags text:change-start. -Consider using : get_text_change()

-

Arguments

-

position – int

-

idx – str

-

Return: Element or None if not found

-
- -Expand source code - -
def get_text_change_start(
-    self,
-    position: int = 0,
-    idx: str | None = None,
-) -> Element | None:
-    """Return the text change-start that matches the criteria. Search
-    only the tags text:change-start.
-    Consider using : get_text_change()
-
-    Arguments:
-
-        position -- int
-
-        idx -- str
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:change-start", position, change_id=idx
-    )
-
-
-
-def get_text_change_starts(self) ‑> odfdo.list[Element] -
-
-

Return all the text change-start. Search only for the tags -text:change-start. -Consider using : get_text_changes()

-

Return: list of Element

-
- -Expand source code - -
def get_text_change_starts(self) -> list[Element]:
-    """Return all the text change-start. Search only for the tags
-    text:change-start.
-    Consider using : get_text_changes()
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:change-start")
-
-
-
-def get_text_changes(self) ‑> odfdo.list[Element] -
-
-

Return all the text changes, either single deletion -(text:change) or start of range of changes (text:change-start).

-

Return: list of Element

-
- -Expand source code - -
def get_text_changes(self) -> list[Element]:
-    """Return all the text changes, either single deletion
-    (text:change) or start of range of changes (text:change-start).
-
-    Return: list of Element
-    """
-    request = "descendant::text:change-start | descendant::text:change"
-    return self._filtered_elements(request)
-
-
-
-def get_toc(self, position: int = 0, content: str | None = None) ‑> Element | None -
-
-

Return the table of contents that matches the criteria.

-

Arguments

-

position – int

-

content – str regex

-

Return: odf_toc or None if not found

-
- -Expand source code - -
def get_toc(
-    self,
-    position: int = 0,
-    content: str | None = None,
-) -> Element | None:
-    """Return the table of contents that matches the criteria.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: odf_toc or None if not found
-    """
-    return self._filtered_element(
-        "text:table-of-content", position, content=content
-    )
-
-
-
-def get_tocs(self) ‑> odfdo.list[Element] -
-
-

Return all the tables of contents.

-

Return: list of odf_toc

-
- -Expand source code - -
def get_tocs(self) -> list[Element]:
-    """Return all the tables of contents.
-
-    Return: list of odf_toc
-    """
-    return self._filtered_elements("text:table-of-content")
-
-
-
-def get_tracked_changes(self) ‑> Element | None -
-
-

Return the tracked-changes part in the text body.

-
- -Expand source code - -
def get_tracked_changes(self) -> Element | None:
-    """Return the tracked-changes part in the text body."""
-    return self.get_element("//text:tracked-changes")
-
-
-
-def get_user_defined(self, name: str, position: int = 0) ‑> Element | None -
-
-

return the user defined declaration for the given name.

-

return: Element or none if not found

-
- -Expand source code - -
def get_user_defined(self, name: str, position: int = 0) -> Element | None:
-    """return the user defined declaration for the given name.
-
-    return: Element or none if not found
-    """
-    return self._filtered_element(
-        "descendant::text:user-defined", position, text_name=name
-    )
-
-
-
-def get_user_defined_list(self) ‑> odfdo.list[Element] -
-
-

Return all the user defined field declarations.

-

Return: list of Element

-
- -Expand source code - -
def get_user_defined_list(self) -> list[Element]:
-    """Return all the user defined field declarations.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:user-defined")
-
-
-
-def get_user_defined_value(self, name: str, value_type: str | None = None) ‑> bool | str | int | float | decimal.Decimal | datetime.datetime | datetime.timedelta | None -
-
-

Return the value of the given user defined field name.

-

Arguments

-

name – str

-

value_type – 'boolean', 'date', 'float', -'string', 'time' or automatic

-

Return: most appropriate Python type

-
- -Expand source code - -
def get_user_defined_value(
-    self, name: str, value_type: str | None = None
-) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-    """Return the value of the given user defined field name.
-
-    Arguments:
-
-        name -- str
-
-        value_type -- 'boolean', 'date', 'float',
-                      'string', 'time' or automatic
-
-    Return: most appropriate Python type
-    """
-    user_defined = self.get_user_defined(name)
-    if user_defined is None:
-        return None
-    return user_defined.get_value(value_type)  # type: ignore
-
-
-
-def get_user_field_decl(self, name: str, position: int = 0) ‑> Element | None -
-
-

return the user field declaration for the given name.

-

return: Element or none if not found

-
- -Expand source code - -
def get_user_field_decl(self, name: str, position: int = 0) -> Element | None:
-    """return the user field declaration for the given name.
-
-    return: Element or none if not found
-    """
-    return self._filtered_element(
-        "descendant::text:user-field-decl", position, text_name=name
-    )
-
-
-
-def get_user_field_decl_list(self) ‑> odfdo.list[Element] -
-
-

Return all the user field declarations.

-

Return: list of Element

-
- -Expand source code - -
def get_user_field_decl_list(self) -> list[Element]:
-    """Return all the user field declarations.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:user-field-decl")
-
-
-
-def get_user_field_decls(self) ‑> Element | None -
-
-

Return the container for user field declarations. Created if not -found.

-

Return: Element

-
- -Expand source code - -
def get_user_field_decls(self) -> Element | None:
-    """Return the container for user field declarations. Created if not
-    found.
-
-    Return: Element
-    """
-    user_field_decls = self.get_element("//text:user-field-decls")
-    if user_field_decls is None:
-        body = self.document_body
-        if not body:
-            raise ValueError("Empty document.body")
-        body.insert(Element.from_tag("text:user-field-decls"), FIRST_CHILD)
-        user_field_decls = body.get_element("//text:user-field-decls")
-
-    return user_field_decls
-
-
-
-def get_user_field_value(self, name: str, value_type: str | None = None) ‑> bool | str | int | float | decimal.Decimal | datetime.datetime | datetime.timedelta | None -
-
-

Return the value of the given user field name.

-

Arguments

-

name – str

-

value_type – 'boolean', 'currency', 'date', 'float', -'percentage', 'string', 'time' or automatic

-

Return: most appropriate Python type

-
- -Expand source code - -
def get_user_field_value(
-    self, name: str, value_type: str | None = None
-) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-    """Return the value of the given user field name.
-
-    Arguments:
-
-        name -- str
-
-        value_type -- 'boolean', 'currency', 'date', 'float',
-                      'percentage', 'string', 'time' or automatic
-
-    Return: most appropriate Python type
-    """
-    user_field_decl = self.get_user_field_decl(name)
-    if user_field_decl is None:
-        return None
-    return user_field_decl.get_value(value_type)  # type: ignore
-
-
-
-def get_variable_decl(self, name: str, position: int = 0) ‑> Element | None -
-
-

return the variable declaration for the given name.

-

Arguments

-

name – str

-

position – int

-

return: Element or none if not found

-
- -Expand source code - -
def get_variable_decl(self, name: str, position: int = 0) -> Element | None:
-    """return the variable declaration for the given name.
-
-    Arguments:
-
-        name -- str
-
-        position -- int
-
-    return: Element or none if not found
-    """
-    return self._filtered_element(
-        "descendant::text:variable-decl", position, text_name=name
-    )
-
-
-
-def get_variable_decl_list(self) ‑> odfdo.list[Element] -
-
-

Return all the variable declarations.

-

Return: list of Element

-
- -Expand source code - -
def get_variable_decl_list(self) -> list[Element]:
-    """Return all the variable declarations.
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:variable-decl")
-
-
-
-def get_variable_decls(self) ‑> Element -
-
-

Return the container for variable declarations. Created if not -found.

-

Return: Element

-
- -Expand source code - -
def get_variable_decls(self) -> Element:
-    """Return the container for variable declarations. Created if not
-    found.
-
-    Return: Element
-    """
-    variable_decls = self.get_element("//text:variable-decls")
-    if variable_decls is None:
-        body = self.document_body
-        if not body:
-            raise ValueError("Empty document.body")
-        body.insert(Element.from_tag("text:variable-decls"), FIRST_CHILD)
-        variable_decls = body.get_element("//text:variable-decls")
-
-    return variable_decls  # type:ignore
-
-
-
-def get_variable_set(self, name: str, position: int = -1) ‑> Element | None -
-
-

Return the variable set for the given name (last one by default).

-

Arguments

-

name – str

-

position – int

-

Return: Element or None if not found

-
- -Expand source code - -
def get_variable_set(self, name: str, position: int = -1) -> Element | None:
-    """Return the variable set for the given name (last one by default).
-
-    Arguments:
-
-        name -- str
-
-        position -- int
-
-    Return: Element or None if not found
-    """
-    return self._filtered_element(
-        "descendant::text:variable-set", position, text_name=name
-    )
-
-
-
-def get_variable_set_value(self, name: str, value_type: str | None = None) ‑> bool | str | int | float | decimal.Decimal | datetime.datetime | datetime.timedelta | None -
-
-

Return the last value of the given variable name.

-

Arguments

-

name – str

-

value_type – 'boolean', 'currency', 'date', 'float', -'percentage', 'string', 'time' or automatic

-

Return: most appropriate Python type

-
- -Expand source code - -
def get_variable_set_value(
-    self,
-    name: str,
-    value_type: str | None = None,
-) -> bool | str | int | float | Decimal | datetime | timedelta | None:
-    """Return the last value of the given variable name.
-
-    Arguments:
-
-        name -- str
-
-        value_type -- 'boolean', 'currency', 'date', 'float',
-                      'percentage', 'string', 'time' or automatic
-
-    Return: most appropriate Python type
-    """
-    variable_set = self.get_variable_set(name)
-    if not variable_set:
-        return None
-    return variable_set.get_value(value_type)  # type: ignore
-
-
-
-def get_variable_sets(self, name: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the variable sets that match the criteria.

-

Arguments

-

name – str

-

Return: list of Element

-
- -Expand source code - -
def get_variable_sets(self, name: str | None = None) -> list[Element]:
-    """Return all the variable sets that match the criteria.
-
-    Arguments:
-
-        name -- str
-
-    Return: list of Element
-    """
-    return self._filtered_elements("descendant::text:variable-set", text_name=name)
-
-
-
-def index(self, child: Element) ‑> int -
-
-

Return the position of the child in this element.

-

Inspired by lxml

-
- -Expand source code - -
def index(self, child: Element) -> int:
-    """Return the position of the child in this element.
-
-    Inspired by lxml
-    """
-    return self.__element.index(child.__element)
-
-
-
-def insert(self, element: Element, xmlposition: int | None = None, position: int | None = None, start: bool = False) ‑> None -
-
-

Insert an element relatively to ourself.

-

Insert either using DOM vocabulary or by numeric position. -If text start is True, insert the element before any existing text.

-

Position start at 0.

-

Arguments

-

element – Element

-

xmlposition – FIRST_CHILD, LAST_CHILD, NEXT_SIBLING -or PREV_SIBLING

-

start – Boolean

-

position – int

-
- -Expand source code - -
def insert(
-    self,
-    element: Element,
-    xmlposition: int | None = None,
-    position: int | None = None,
-    start: bool = False,
-) -> None:
-    """Insert an element relatively to ourself.
-
-    Insert either using DOM vocabulary or by numeric position.
-    If text start is True, insert the element before any existing text.
-
-    Position start at 0.
-
-    Arguments:
-
-        element -- Element
-
-        xmlposition -- FIRST_CHILD, LAST_CHILD, NEXT_SIBLING
-                       or PREV_SIBLING
-
-        start -- Boolean
-
-        position -- int
-    """
-    # child_tag = element.tag
-    current = self.__element
-    _element = element.__element
-    if start:
-        text = current.text
-        if text is not None:
-            current.text = None
-            tail = _element.tail
-            if tail is None:
-                tail = text
-            else:
-                tail = tail + text
-            _element.tail = tail
-        position = 0
-    if position is not None:
-        current.insert(position, _element)
-    elif xmlposition is FIRST_CHILD:
-        current.insert(0, _element)
-    elif xmlposition is LAST_CHILD:
-        current.append(_element)
-    elif xmlposition is NEXT_SIBLING:
-        parent = current.getparent()
-        index = parent.index(current)  # type: ignore
-        parent.insert(index + 1, _element)  # type: ignore
-    elif xmlposition is PREV_SIBLING:
-        parent = current.getparent()
-        index = parent.index(current)  # type: ignore
-        parent.insert(index, _element)  # type: ignore
-    else:
-        raise ValueError("(xml)position must be defined")
-
-
-
-def is_empty(self) ‑> bool -
-
-

Check if the element is empty : no text, no children, no tail.

-

Return: Boolean

-
- -Expand source code - -
def is_empty(self) -> bool:
-    """Check if the element is empty : no text, no children, no tail.
-
-    Return: Boolean
-    """
-    element = self.__element
-    if element.tail is not None:
-        return False
-    if element.text is not None:
-        return False
-    if list(element.iterchildren()):
-        return False
-    return True
-
-
-
-def match(self, pattern: str) ‑> bool -
-
-

return True if the pattern is found one or more times anywhere in -the text content of the element.

-

Python regular expression syntax applies.

-

Arguments

-

pattern – str

-

Return: bool

-
- -Expand source code - -
def match(self, pattern: str) -> bool:
-    """return True if the pattern is found one or more times anywhere in
-    the text content of the element.
-
-    Python regular expression syntax applies.
-
-    Arguments:
-
-        pattern -- str
-
-    Return: bool
-    """
-    return self.search(pattern) is not None
-
-
-
-def replace(self, pattern: str, new: str | None = None) ‑> int -
-
-

Replace the pattern with the given text, or delete if text is an -empty string, and return the number of replacements. By default, only -return the number of occurences that would be replaced.

-

It cannot replace patterns found across several element, like a word -split into two consecutive spans.

-

Python regular expression syntax applies.

-

Arguments

-

pattern – str

-

new – str

-

Return: int

-
- -Expand source code - -
def replace(self, pattern: str, new: str | None = None) -> int:
-    """Replace the pattern with the given text, or delete if text is an
-    empty string, and return the number of replacements. By default, only
-    return the number of occurences that would be replaced.
-
-    It cannot replace patterns found across several element, like a word
-    split into two consecutive spans.
-
-    Python regular expression syntax applies.
-
-    Arguments:
-
-        pattern -- str
-
-        new -- str
-
-    Return: int
-    """
-    if not isinstance(pattern, str):
-        # Fail properly if the pattern is an non-ascii bytestring
-        pattern = str(pattern)
-    cpattern = re.compile(pattern)
-    count = 0
-    for text in self.xpath("descendant::text()"):
-        if new is None:
-            count += len(cpattern.findall(str(text)))
-        else:
-            new_text, number = cpattern.subn(new, str(text))
-            container = text.parent
-            if text.is_text():  # type: ignore
-                container.text = new_text  # type: ignore
-            else:
-                container.tail = new_text  # type: ignore
-            count += number
-    return count
-
-
-
-def replace_element(self, old_element: Element, new_element: Element) ‑> None -
-
-

Replaces in place a sub element with the element passed as second -argument.

-

Warning : no clone for old element.

-
- -Expand source code - -
def replace_element(self, old_element: Element, new_element: Element) -> None:
-    """Replaces in place a sub element with the element passed as second
-    argument.
-
-    Warning : no clone for old element.
-    """
-    current = self.__element
-    current.replace(old_element.__element, new_element.__element)
-
-
-
-def search(self, pattern: str) ‑> int | None -
-
-

Return the first position of the pattern in the text content of -the element, or None if not found.

-

Python regular expression syntax applies.

-

Arguments

-

pattern – str

-

Return: int or None

-
- -Expand source code - -
def search(self, pattern: str) -> int | None:
-    """Return the first position of the pattern in the text content of
-    the element, or None if not found.
-
-    Python regular expression syntax applies.
-
-    Arguments:
-
-        pattern -- str
-
-    Return: int or None
-    """
-    match = re.search(pattern, self.text_recursive)
-    if match is None:
-        return None
-    return match.start()
-
-
-
-def serialize(self, pretty: bool = False, with_ns: bool = False) ‑> str -
-
-

Return text serialization of XML element.

-
- -Expand source code - -
def serialize(self, pretty: bool = False, with_ns: bool = False) -> str:
-    """Return text serialization of XML element."""
-    # This copy bypasses serialization side-effects in lxml
-    native = deepcopy(self.__element)
-    data = tostring(
-        native, with_tail=False, pretty_print=pretty, encoding="unicode"
-    )
-    if with_ns:
-        return data
-    # Remove namespaces
-    return self._strip_namespaces(data)
-
-
-
-def set_attribute(self, name: str, value: bool | str | None) ‑> None -
-
-
-
- -Expand source code - -
def set_attribute(self, name: str, value: bool | str | None) -> None:
-    element = self.__element
-    lxml_tag = _get_lxml_tag_or_name(name)
-    if isinstance(value, bool):
-        value = Boolean.encode(value)
-    elif value is None:
-        with contextlib.suppress(KeyError):
-            del element.attrib[lxml_tag]
-        return
-    element.set(lxml_tag, str(value))
-
-
-
-def set_style_attribute(self, name: str, value: Element | str) ‑> None -
-
-

Shortcut to accept a style object as a value.

-
- -Expand source code - -
def set_style_attribute(self, name: str, value: Element | str) -> None:
-    """Shortcut to accept a style object as a value."""
-    if isinstance(value, Element):
-        value = str(value.name)  # type:ignore
-    return self.set_attribute(name, value)
-
-
-
-def strip_elements(self, sub_elements: Element | Iterable[Element]) ‑> Element | odfdo.list -
-
-

Remove the tags of provided elements, keeping inner childs and text.

-

Return : the striped element.

-

Warning : no clone in sub_elements list.

-

Arguments

-

sub_elements – Element or list of Element

-
- -Expand source code - -
def strip_elements(
-    self,
-    sub_elements: Element | Iterable[Element],
-) -> Element | list:
-    """Remove the tags of provided elements, keeping inner childs and text.
-
-    Return : the striped element.
-
-    Warning : no clone in sub_elements list.
-
-    Arguments:
-
-        sub_elements -- Element or list of Element
-    """
-    if not sub_elements:
-        return self
-    if isinstance(sub_elements, Element):
-        sub_elements = (sub_elements,)
-    replacer = _get_lxml_tag("text:this-will-be-removed")
-    for element in sub_elements:
-        element.__element.tag = replacer
-    strip = ("text:this-will-be-removed",)
-    return self.strip_tags(strip=strip, default=None)
-
-
-
-def strip_tags(self, strip: Iterable[str] | None = None, protect: Iterable[str] | None = None, default: str | None = 'text:p') ‑> Element | odfdo.list -
-
-

Remove the tags listed in strip, recursively, keeping inner childs -and text. Tags listed in protect stop the removal one level depth. If -the first level element is stripped, default is used to embed the -content in the default element. If default is None and first level is -striped, a list of text and children is returned. Return : the striped -element.

-

strip_tags should be used by on purpose methods (strip_span …) -(Method name taken from lxml).

-

Arguments

-

strip – iterable list of str odf tags, or None

-

protect – iterable list of str odf tags, or None

-

default – str odf tag, or None

-

Return

-

Element.

-
- -Expand source code - -
def strip_tags(
-    self,
-    strip: Iterable[str] | None = None,
-    protect: Iterable[str] | None = None,
-    default: str | None = "text:p",
-) -> Element | list:
-    """Remove the tags listed in strip, recursively, keeping inner childs
-    and text. Tags listed in protect stop the removal one level depth. If
-    the first level element is stripped, default is used to embed the
-    content in the default element. If default is None and first level is
-    striped, a list of text and children is returned. Return : the striped
-    element.
-
-    strip_tags should be used by on purpose methods (strip_span ...)
-    (Method name taken from lxml).
-
-    Arguments:
-
-        strip -- iterable list of str odf tags, or None
-
-        protect -- iterable list of str odf tags, or None
-
-        default -- str odf tag, or None
-
-    Return:
-
-        Element.
-    """
-    if not strip:
-        return self
-    if not protect:
-        protect = ()
-    protected = False
-    element, modified = Element._strip_tags(self, strip, protect, protected)
-    if modified and isinstance(element, list) and default:
-        new = Element.from_tag(default)
-        for content in element:
-            if isinstance(content, Element):
-                new.append(content)
-            else:
-                new.text = content
-        element = new
-    return element
-
-
-
-def xpath(self, xpath_query: str) ‑> odfdo.list[Element | Text] -
-
-

Apply XPath query to the element and its subtree. Return list of -Element or Text instances translated from the nodes found.

-
- -Expand source code - -
def xpath(self, xpath_query: str) -> list[Element | Text]:
-    """Apply XPath query to the element and its subtree. Return list of
-    Element or Text instances translated from the nodes found.
-    """
-    element = self.__element
-    xpath_instance = xpath_compile(xpath_query)
-    elements = xpath_instance(element)
-    result: list[Element | Text] = []
-    if hasattr(elements, "__iter__"):
-        for obj in elements:  # type: ignore
-            if isinstance(obj, (_ElementStringResult, _ElementUnicodeResult)):
-                result.append(Text(obj))
-            elif isinstance(obj, _Element):
-                result.append(Element.from_tag(obj))
-            # else:
-            #     result.append(obj)
-    return result
-
-
-
-
-
-class ElementTyped -(**kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class ElementTyped(Element):
-    def set_value_and_type(  # noqa: C901
-        self,
-        value: Any,
-        value_type: str | None = None,
-        text: str | None = None,
-        currency: str | None = None,
-    ) -> str | None:
-        # Remove possible previous value and type
-        for name in (
-            "office:value-type",
-            "office:boolean-value",
-            "office:value",
-            "office:date-value",
-            "office:string-value",
-            "office:time-value",
-            "table:formula",
-            "office:currency",
-            "calcext:value-type",
-            "loext:value-type",
-        ):
-            with contextlib.suppress(KeyError):
-                self.del_attribute(name)
-        if isinstance(value, bytes):
-            value = bytes_to_str(value)
-        if isinstance(value_type, bytes):
-            value_type = bytes_to_str(value_type)
-        if isinstance(text, bytes):
-            text = bytes_to_str(text)
-        if isinstance(currency, bytes):
-            currency = bytes_to_str(currency)
-        if value is None:
-            self._erase_text_content()
-            return text
-        if isinstance(value, bool):
-            if value_type is None:
-                value_type = "boolean"
-            if text is None:
-                text = "true" if value else "false"
-            value = Boolean.encode(value)
-        elif isinstance(value, (int, float, Decimal)):
-            if value_type == "percentage":
-                text = "%d %%" % int(value * 100)
-            if value_type is None:
-                value_type = "float"
-            if text is None:
-                text = str(value)
-            value = str(value)
-        elif isinstance(value, datetime):
-            if value_type is None:
-                value_type = "date"
-            if text is None:
-                text = str(DateTime.encode(value))
-            value = DateTime.encode(value)
-        elif isinstance(value, date):
-            if value_type is None:
-                value_type = "date"
-            if text is None:
-                text = str(Date.encode(value))
-            value = Date.encode(value)
-        elif isinstance(value, str):
-            if value_type is None:
-                value_type = "string"
-            if text is None:
-                text = value
-        elif isinstance(value, timedelta):
-            if value_type is None:
-                value_type = "time"
-            if text is None:
-                text = str(Duration.encode(value))
-            value = Duration.encode(value)
-        elif value is not None:
-            raise TypeError(f"Type unknown: '{value!r}'")
-
-        if value_type is not None:
-            self.set_attribute("office:value-type", value_type)
-            self.set_attribute("calcext:value-type", value_type)
-        if value_type == "boolean":
-            self.set_attribute("office:boolean-value", value)
-        elif value_type == "currency":
-            self.set_attribute("office:value", value)
-            self.set_attribute("office:currency", currency)
-        elif value_type == "date":
-            self.set_attribute("office:date-value", value)
-        elif value_type in ("float", "percentage"):
-            self.set_attribute("office:value", value)
-            self.set_attribute("calcext:value", value)
-        elif value_type == "string":
-            self.set_attribute("office:string-value", value)
-        elif value_type == "time":
-            self.set_attribute("office:time-value", value)
-
-        return text
-
-    def _get_typed_value(  # noqa: C901
-        self,
-        value_type: str | None = None,
-        try_get_text: bool = True,
-    ) -> tuple[Any, str | None]:
-        """Return Python typed value.
-
-        Only for "with office:value-type" elements, not for meta fields."""
-        value: Decimal | str | bool | None = None
-        if value_type is None:
-            read_value_type = self.get_attribute("office:value-type")
-            if isinstance(read_value_type, bool):
-                raise TypeError(
-                    f'Wrong type for "office:value-type": {type(read_value_type)}'
-                )
-            value_type = read_value_type
-        # value_type = to_str(value_type)
-        if value_type == "boolean":
-            value = self.get_attribute("office:boolean-value")
-            return (value, value_type)
-        if value_type in {"float", "percentage", "currency"}:
-            read_number = self.get_attribute("office:value")
-            if not isinstance(read_number, (Decimal, str)):
-                raise TypeError(f'Wrong type for "office:value": {type(read_number)}')
-            value = Decimal(read_number)
-            # Return 3 instead of 3.0 if possible
-            if int(value) == value:
-                return (int(value), value_type)
-            return (value, value_type)
-        if value_type == "date":
-            read_attribute = self.get_attribute("office:date-value")
-            if not isinstance(read_attribute, str):
-                raise TypeError(
-                    f'Wrong type for "office:date-value": {type(read_attribute)}'
-                )
-            if "T" in read_attribute:
-                return (DateTime.decode(read_attribute), value_type)
-            return (Date.decode(read_attribute), value_type)
-        if value_type == "string":
-            value = self.get_attribute("office:string-value")
-            if value is not None:
-                return (str(value), value_type)
-            if try_get_text:
-                list_value = [
-                    para.text_recursive for para in self.get_elements("text:p")
-                ]
-                if list_value:
-                    return ("\n".join(list_value), value_type)
-            return (None, value_type)
-        if value_type == "time":
-            read_value = self.get_attribute("office:time-value")
-            if not isinstance(read_value, str):
-                raise TypeError(
-                    f'Wrong type for "office:time-value": {type(read_value)}'
-                )
-            time_value = Duration.decode(read_value)
-            return (time_value, value_type)
-        if value_type is None:
-            return (None, None)
-        raise ValueError(f'Unexpected value type: "{value_type}"')
-
-    def get_value(
-        self,
-        value_type: str | None = None,
-        try_get_text: bool = True,
-        get_type: bool = False,
-    ) -> Any | tuple[Any, str]:
-        """Return Python typed value.
-
-        Only for "with office:value-type" elements, not for meta fields."""
-        if get_type:
-            return self._get_typed_value(
-                value_type=value_type,
-                try_get_text=try_get_text,
-            )
-        return self._get_typed_value(
-            value_type=value_type,
-            try_get_text=try_get_text,
-        )[0]
-
-

Ancestors

- -

Subclasses

- -

Methods

-
-
-def get_value(self, value_type: str | None = None, try_get_text: bool = True, get_type: bool = False) ‑> typing.Any | tuple[typing.Any, str] -
-
-

Return Python typed value.

-

Only for "with office:value-type" elements, not for meta fields.

-
- -Expand source code - -
def get_value(
-    self,
-    value_type: str | None = None,
-    try_get_text: bool = True,
-    get_type: bool = False,
-) -> Any | tuple[Any, str]:
-    """Return Python typed value.
-
-    Only for "with office:value-type" elements, not for meta fields."""
-    if get_type:
-        return self._get_typed_value(
-            value_type=value_type,
-            try_get_text=try_get_text,
-        )
-    return self._get_typed_value(
-        value_type=value_type,
-        try_get_text=try_get_text,
-    )[0]
-
-
-
-def set_value_and_type(self, value: Any, value_type: str | None = None, text: str | None = None, currency: str | None = None) ‑> str | None -
-
-
-
- -Expand source code - -
def set_value_and_type(  # noqa: C901
-    self,
-    value: Any,
-    value_type: str | None = None,
-    text: str | None = None,
-    currency: str | None = None,
-) -> str | None:
-    # Remove possible previous value and type
-    for name in (
-        "office:value-type",
-        "office:boolean-value",
-        "office:value",
-        "office:date-value",
-        "office:string-value",
-        "office:time-value",
-        "table:formula",
-        "office:currency",
-        "calcext:value-type",
-        "loext:value-type",
-    ):
-        with contextlib.suppress(KeyError):
-            self.del_attribute(name)
-    if isinstance(value, bytes):
-        value = bytes_to_str(value)
-    if isinstance(value_type, bytes):
-        value_type = bytes_to_str(value_type)
-    if isinstance(text, bytes):
-        text = bytes_to_str(text)
-    if isinstance(currency, bytes):
-        currency = bytes_to_str(currency)
-    if value is None:
-        self._erase_text_content()
-        return text
-    if isinstance(value, bool):
-        if value_type is None:
-            value_type = "boolean"
-        if text is None:
-            text = "true" if value else "false"
-        value = Boolean.encode(value)
-    elif isinstance(value, (int, float, Decimal)):
-        if value_type == "percentage":
-            text = "%d %%" % int(value * 100)
-        if value_type is None:
-            value_type = "float"
-        if text is None:
-            text = str(value)
-        value = str(value)
-    elif isinstance(value, datetime):
-        if value_type is None:
-            value_type = "date"
-        if text is None:
-            text = str(DateTime.encode(value))
-        value = DateTime.encode(value)
-    elif isinstance(value, date):
-        if value_type is None:
-            value_type = "date"
-        if text is None:
-            text = str(Date.encode(value))
-        value = Date.encode(value)
-    elif isinstance(value, str):
-        if value_type is None:
-            value_type = "string"
-        if text is None:
-            text = value
-    elif isinstance(value, timedelta):
-        if value_type is None:
-            value_type = "time"
-        if text is None:
-            text = str(Duration.encode(value))
-        value = Duration.encode(value)
-    elif value is not None:
-        raise TypeError(f"Type unknown: '{value!r}'")
-
-    if value_type is not None:
-        self.set_attribute("office:value-type", value_type)
-        self.set_attribute("calcext:value-type", value_type)
-    if value_type == "boolean":
-        self.set_attribute("office:boolean-value", value)
-    elif value_type == "currency":
-        self.set_attribute("office:value", value)
-        self.set_attribute("office:currency", currency)
-    elif value_type == "date":
-        self.set_attribute("office:date-value", value)
-    elif value_type in ("float", "percentage"):
-        self.set_attribute("office:value", value)
-        self.set_attribute("calcext:value", value)
-    elif value_type == "string":
-        self.set_attribute("office:string-value", value)
-    elif value_type == "time":
-        self.set_attribute("office:time-value", value)
-
-    return text
-
-
-
-

Inherited members

- -
-
-class EllipseShape -(style: str | None = None, text_style: str | None = None, draw_id: str | None = None, layer: str | None = None, position: tuple | None = None, size: tuple | None = None, **kwargs: Any) -
-
-

Create a ellipse shape.

-

Arguments

-

style – str

-

text_style – str

-

draw_id – str

-

layer – str

-

position – (str, str)

-

size – (str, str)

-
- -Expand source code - -
class EllipseShape(ShapeBase):
-    """Create a ellipse shape.
-
-    Arguments:
-
-        style -- str
-
-        text_style -- str
-
-        draw_id -- str
-
-        layer -- str
-
-        position -- (str, str)
-
-        size -- (str, str)
-
-    """
-
-    _tag = "draw:ellipse"
-    _properties: tuple[PropDef, ...] = ()
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        position: tuple | None = None,
-        size: tuple | None = None,
-        **kwargs: Any,
-    ) -> None:
-        kwargs.update(
-            {
-                "style": style,
-                "text_style": text_style,
-                "draw_id": draw_id,
-                "layer": layer,
-                "size": size,
-                "position": position,
-            }
-        )
-        super().__init__(**kwargs)
-
-

Ancestors

- -

Inherited members

- -
-
-class Frame -(name: str | None = None, draw_id: str | None = None, style: str | None = None, position: tuple | None = None, size: tuple = ('1cm', '1cm'), z_index: int = 0, presentation_class: str | None = None, anchor_type: str | None = None, anchor_page: int | None = None, layer: str | None = None, presentation_style: str | None = None, **kwargs: Any) -
-
-

ODF Frame "draw:frame"

-

Frames are not useful by themselves. You should consider calling -Frame.image_frame() or Frame.text_frame directly.

-

Create a frame element of the given size. Position is relative to the -context the frame is inserted in. If positioned by page, give the page -number and the x, y position.

-

Size is a (width, height) tuple and position is a (left, top) tuple; items -are strings including the unit, e.g. ('10cm', '15cm').

-

Frames are not useful by themselves. You should consider calling: -Frame.image_frame() -or -Frame.text_frame()

-

Arguments

-

name – str

-

draw_id – str

-

style – str

-

position – (str, str)

-

size – (str, str)

-

z_index – int (default 0)

-

presentation_class – str

-

anchor_type – 'page', 'frame', 'paragraph', 'char' or 'as-char'

-

anchor_page – int, page number is anchor_type is 'page'

-

layer – str

-

presentation_style – str

-
- -Expand source code - -
class Frame(Element, AnchorMix, PosMix, ZMix, SizeMix):
-    """ODF Frame "draw:frame"
-
-    Frames are not useful by themselves. You should consider calling
-    Frame.image_frame() or Frame.text_frame directly.
-    """
-
-    _tag = "draw:frame"
-    _properties = (
-        PropDef("name", "draw:name"),
-        PropDef("draw_id", "draw:id"),
-        PropDef("width", "svg:width"),
-        PropDef("height", "svg:height"),
-        PropDef("style", "draw:style-name"),
-        PropDef("pos_x", "svg:x"),
-        PropDef("pos_y", "svg:y"),
-        PropDef("presentation_class", "presentation:class"),
-        PropDef("layer", "draw:layer"),
-        PropDef("presentation_style", "presentation:style-name"),
-    )
-
-    def __init__(  # noqa:  C901
-        self,
-        name: str | None = None,
-        draw_id: str | None = None,
-        style: str | None = None,
-        position: tuple | None = None,
-        size: tuple = ("1cm", "1cm"),
-        z_index: int = 0,
-        presentation_class: str | None = None,
-        anchor_type: str | None = None,
-        anchor_page: int | None = None,
-        layer: str | None = None,
-        presentation_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a frame element of the given size. Position is relative to the
-        context the frame is inserted in. If positioned by page, give the page
-        number and the x, y position.
-
-        Size is a (width, height) tuple and position is a (left, top) tuple; items
-        are strings including the unit, e.g. ('10cm', '15cm').
-
-        Frames are not useful by themselves. You should consider calling:
-            Frame.image_frame()
-        or
-            Frame.text_frame()
-
-
-        Arguments:
-
-            name -- str
-
-            draw_id -- str
-
-            style -- str
-
-            position -- (str, str)
-
-            size -- (str, str)
-
-            z_index -- int (default 0)
-
-            presentation_class -- str
-
-            anchor_type -- 'page', 'frame', 'paragraph', 'char' or 'as-char'
-
-            anchor_page -- int, page number is anchor_type is 'page'
-
-            layer -- str
-
-            presentation_style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.size = size
-            self.z_index = z_index
-            if name:
-                self.name = name
-            if draw_id is not None:
-                self.draw_id = draw_id
-            if style is not None:
-                self.style = style
-            if position is not None:
-                self.position = position
-            if presentation_class is not None:
-                self.presentation_class = presentation_class
-            if anchor_type:
-                self.anchor_type = anchor_type
-            if position and not anchor_type:
-                self.anchor_type = "paragraph"
-            if anchor_page is not None:
-                self.anchor_page = anchor_page
-            if layer is not None:
-                self.layer = layer
-            if presentation_style is not None:
-                self.presentation_style = presentation_style
-
-    @classmethod
-    def image_frame(
-        cls,
-        image: Element | str,
-        text: str | None = None,
-        name: str | None = None,
-        draw_id: str | None = None,
-        style: str | None = None,
-        position: tuple | None = None,
-        size: tuple = ("1cm", "1cm"),
-        z_index: int = 0,
-        presentation_class: str | None = None,
-        anchor_type: str | None = None,
-        anchor_page: int | None = None,
-        layer: str | None = None,
-        presentation_style: str | None = None,
-        **kwargs: Any,
-    ) -> Element:
-        """Create a ready-to-use image, since image must be embedded in a
-        frame.
-
-        The optionnal text will appear above the image.
-
-        Arguments:
-
-            image -- DrawImage or str, DrawImage element or URL of the image
-
-            text -- str, text for the image
-
-            See Frame() initialization for the other arguments
-
-        Return: Frame
-        """
-        frame = cls(
-            name=name,
-            draw_id=draw_id,
-            style=style,
-            position=position,
-            size=size,
-            z_index=z_index,
-            presentation_class=presentation_class,
-            anchor_type=anchor_type,
-            anchor_page=anchor_page,
-            layer=layer,
-            presentation_style=presentation_style,
-            **kwargs,
-        )
-        image_element = frame.set_image(image)
-        if text:
-            image_element.text_content = text
-        return frame
-
-    @classmethod
-    def text_frame(
-        cls,
-        text_or_element: Iterable[Element] | Element | str,
-        text_style: str | None = None,
-        name: str | None = None,
-        draw_id: str | None = None,
-        style: str | None = None,
-        position: tuple | None = None,
-        size: tuple = ("1cm", "1cm"),
-        z_index: int = 0,
-        presentation_class: str | None = None,
-        anchor_type: str | None = None,
-        anchor_page: int | None = None,
-        layer: str | None = None,
-        presentation_style: str | None = None,
-        **kwargs: Any,
-    ) -> Element:
-        """Create a ready-to-use text box, since text box must be embedded in
-        a frame.
-
-        The optionnal text will appear above the image.
-
-        Arguments:
-
-            text_or_element -- str or Element, or list of them, text content
-                               of the text box.
-
-            text_style -- str, name of the style for the text
-
-            See Frame() initialization for the other arguments
-
-        Return: Frame
-        """
-        frame = cls(
-            name=name,
-            draw_id=draw_id,
-            style=style,
-            position=position,
-            size=size,
-            z_index=z_index,
-            presentation_class=presentation_class,
-            anchor_type=anchor_type,
-            anchor_page=anchor_page,
-            layer=layer,
-            presentation_style=presentation_style,
-            **kwargs,
-        )
-        frame.set_text_box(text_or_element, text_style)
-        return frame
-
-    @property
-    def text_content(self) -> str:
-        text_box = self.get_element("draw:text-box")
-        if text_box is None:
-            return ""
-        return text_box.text_content
-
-    @text_content.setter
-    def text_content(self, text_or_element: Element | str) -> None:
-        text_box = self.get_element("draw:text-box")
-        if text_box is None:
-            text_box = Element.from_tag("draw:text-box")
-            self.append(text_box)
-        if isinstance(text_or_element, Element):
-            text_box.clear()
-            text_box.append(text_or_element)
-        else:
-            text_box.text_content = text_or_element
-
-    def get_image(
-        self,
-        position: int = 0,
-        name: str | None = None,
-        url: str | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        return self.get_element("draw:image")
-
-    def set_image(self, url_or_element: Element | str) -> Element:
-        image = self.get_image()
-        if image is None:
-            if isinstance(url_or_element, Element):
-                image = url_or_element
-                self.append(image)
-            else:
-                image = DrawImage(url_or_element)
-                self.append(image)
-        else:
-            if isinstance(url_or_element, Element):
-                image.delete()
-                image = url_or_element
-                self.append(image)
-            else:
-                image.set_url(url_or_element)  # type: ignore
-        return image
-
-    def get_text_box(self) -> Element | None:
-        return self.get_element("draw:text-box")
-
-    def set_text_box(
-        self,
-        text_or_element: Iterable[Element | str] | Element | str,
-        text_style: str | None = None,
-    ) -> Element:
-        text_box = self.get_text_box()
-        if text_box is None:
-            text_box = Element.from_tag("draw:text-box")
-            self.append(text_box)
-        else:
-            text_box.clear()
-        if isinstance(text_or_element, (Element, str)):
-            text_or_element_list: Iterable[Element | str] = [text_or_element]
-        else:
-            text_or_element_list = text_or_element
-        for item in text_or_element_list:
-            if isinstance(item, str):
-                text_box.append(Paragraph(item, style=text_style))
-            else:
-                text_box.append(item)
-        return text_box
-
-    @staticmethod
-    def _get_formatted_text_subresult(context: dict, element: Element) -> str:
-        str_list = ["  "]
-        for child in element.children:
-            str_list.append(child.get_formatted_text(context))
-        subresult = "".join(str_list)
-        subresult = subresult.replace("\n", "\n  ")
-        return subresult.rstrip(" ")
-
-    def get_formatted_text(  # noqa:  C901
-        self,
-        context: dict | None = None,
-    ) -> str:
-        if not context:
-            context = {}
-        result = []
-        for element in self.children:
-            tag = element.tag
-            if tag == "draw:image":
-                if context["rst_mode"]:
-                    filename = element.get_attribute("xlink:href")
-
-                    # Compute width and height
-                    width, height = self.size
-                    if width is not None:
-                        width = Unit(width)
-                        width = width.convert("px", DPI)
-                    if height is not None:
-                        height = Unit(height)
-                        height = height.convert("px", DPI)
-
-                    # Insert or not ?
-                    if context["no_img_level"]:
-                        context["img_counter"] += 1
-                        ref = f"|img{context['img_counter']}|"
-                        result.append(ref)
-                        context["images"].append((ref, filename, (width, height)))
-                    else:
-                        result.append(f"\n.. image:: {filename}\n")
-                        if width is not None:
-                            result.append(f"   :width: {width}\n")
-                        if height is not None:
-                            result.append(f"   :height: {height}\n")
-                else:
-                    result.append(f"[Image {element.get_attribute('xlink:href')}]\n")
-            elif tag == "draw:text-box":
-                result.append(self._get_formatted_text_subresult(context, element))
-            else:
-                result.append(element.get_formatted_text(context))
-        result.append("\n")
-        return "".join(result)
-
-

Ancestors

- -

Static methods

-
-
-def image_frame(image: Element | str, text: str | None = None, name: str | None = None, draw_id: str | None = None, style: str | None = None, position: tuple | None = None, size: tuple = ('1cm', '1cm'), z_index: int = 0, presentation_class: str | None = None, anchor_type: str | None = None, anchor_page: int | None = None, layer: str | None = None, presentation_style: str | None = None, **kwargs: Any) ‑> Element -
-
-

Create a ready-to-use image, since image must be embedded in a -frame.

-

The optionnal text will appear above the image.

-

Arguments

-

image – DrawImage or str, DrawImage element or URL of the image

-

text – str, text for the image

-

See Frame() initialization for the other arguments

-

Return: Frame

-
- -Expand source code - -
@classmethod
-def image_frame(
-    cls,
-    image: Element | str,
-    text: str | None = None,
-    name: str | None = None,
-    draw_id: str | None = None,
-    style: str | None = None,
-    position: tuple | None = None,
-    size: tuple = ("1cm", "1cm"),
-    z_index: int = 0,
-    presentation_class: str | None = None,
-    anchor_type: str | None = None,
-    anchor_page: int | None = None,
-    layer: str | None = None,
-    presentation_style: str | None = None,
-    **kwargs: Any,
-) -> Element:
-    """Create a ready-to-use image, since image must be embedded in a
-    frame.
-
-    The optionnal text will appear above the image.
-
-    Arguments:
-
-        image -- DrawImage or str, DrawImage element or URL of the image
-
-        text -- str, text for the image
-
-        See Frame() initialization for the other arguments
-
-    Return: Frame
-    """
-    frame = cls(
-        name=name,
-        draw_id=draw_id,
-        style=style,
-        position=position,
-        size=size,
-        z_index=z_index,
-        presentation_class=presentation_class,
-        anchor_type=anchor_type,
-        anchor_page=anchor_page,
-        layer=layer,
-        presentation_style=presentation_style,
-        **kwargs,
-    )
-    image_element = frame.set_image(image)
-    if text:
-        image_element.text_content = text
-    return frame
-
-
-
-def text_frame(text_or_element: Iterable[Element] | Element | str, text_style: str | None = None, name: str | None = None, draw_id: str | None = None, style: str | None = None, position: tuple | None = None, size: tuple = ('1cm', '1cm'), z_index: int = 0, presentation_class: str | None = None, anchor_type: str | None = None, anchor_page: int | None = None, layer: str | None = None, presentation_style: str | None = None, **kwargs: Any) ‑> Element -
-
-

Create a ready-to-use text box, since text box must be embedded in -a frame.

-

The optionnal text will appear above the image.

-

Arguments

-

text_or_element – str or Element, or list of them, text content -of the text box.

-

text_style – str, name of the style for the text

-

See Frame() initialization for the other arguments

-

Return: Frame

-
- -Expand source code - -
@classmethod
-def text_frame(
-    cls,
-    text_or_element: Iterable[Element] | Element | str,
-    text_style: str | None = None,
-    name: str | None = None,
-    draw_id: str | None = None,
-    style: str | None = None,
-    position: tuple | None = None,
-    size: tuple = ("1cm", "1cm"),
-    z_index: int = 0,
-    presentation_class: str | None = None,
-    anchor_type: str | None = None,
-    anchor_page: int | None = None,
-    layer: str | None = None,
-    presentation_style: str | None = None,
-    **kwargs: Any,
-) -> Element:
-    """Create a ready-to-use text box, since text box must be embedded in
-    a frame.
-
-    The optionnal text will appear above the image.
-
-    Arguments:
-
-        text_or_element -- str or Element, or list of them, text content
-                           of the text box.
-
-        text_style -- str, name of the style for the text
-
-        See Frame() initialization for the other arguments
-
-    Return: Frame
-    """
-    frame = cls(
-        name=name,
-        draw_id=draw_id,
-        style=style,
-        position=position,
-        size=size,
-        z_index=z_index,
-        presentation_class=presentation_class,
-        anchor_type=anchor_type,
-        anchor_page=anchor_page,
-        layer=layer,
-        presentation_style=presentation_style,
-        **kwargs,
-    )
-    frame.set_text_box(text_or_element, text_style)
-    return frame
-
-
-
-

Instance variables

-
-
var draw_id : str | bool | None
-
-

Get/set the attribute draw:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var height : str | bool | None
-
-

Get/set the attribute svg:height

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var layer : str | bool | None
-
-

Get/set the attribute draw:layer

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute draw:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var pos_x : str | bool | None
-
-

Get/set the attribute svg:x

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var pos_y : str | bool | None
-
-

Get/set the attribute svg:y

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var presentation_class : str | bool | None
-
-

Get/set the attribute presentation:class

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var presentation_style : str | bool | None
-
-

Get/set the attribute presentation:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute draw:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var width : str | bool | None
-
-

Get/set the attribute svg:width

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def get_text_box(self) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_text_box(self) -> Element | None:
-    return self.get_element("draw:text-box")
-
-
-
-def set_image(self, url_or_element: Element | str) ‑> Element -
-
-
-
- -Expand source code - -
def set_image(self, url_or_element: Element | str) -> Element:
-    image = self.get_image()
-    if image is None:
-        if isinstance(url_or_element, Element):
-            image = url_or_element
-            self.append(image)
-        else:
-            image = DrawImage(url_or_element)
-            self.append(image)
-    else:
-        if isinstance(url_or_element, Element):
-            image.delete()
-            image = url_or_element
-            self.append(image)
-        else:
-            image.set_url(url_or_element)  # type: ignore
-    return image
-
-
-
-def set_text_box(self, text_or_element: Iterable[Element | str] | Element | str, text_style: str | None = None) ‑> Element -
-
-
-
- -Expand source code - -
def set_text_box(
-    self,
-    text_or_element: Iterable[Element | str] | Element | str,
-    text_style: str | None = None,
-) -> Element:
-    text_box = self.get_text_box()
-    if text_box is None:
-        text_box = Element.from_tag("draw:text-box")
-        self.append(text_box)
-    else:
-        text_box.clear()
-    if isinstance(text_or_element, (Element, str)):
-        text_or_element_list: Iterable[Element | str] = [text_or_element]
-    else:
-        text_or_element_list = text_or_element
-    for item in text_or_element_list:
-        if isinstance(item, str):
-            text_box.append(Paragraph(item, style=text_style))
-        else:
-            text_box.append(item)
-    return text_box
-
-
-
-

Inherited members

- -
-
-class Header -(level: int = 1, text: str | None = None, restart_numbering: bool = False, start_value: int | None = None, suppress_numbering: bool = False, style: str | None = None, **kwargs: Any) -
-
-

Specialised paragraph for headings "text:h".

-

Create a header element of the given style and level, containing the -optional given text.

-

Level count begins at 1.

-

Arguments

-

level – int

-

text – str

-

restart_numbering – bool

-

start_value – int

-

style – str

-
- -Expand source code - -
class Header(Paragraph):
-    """Specialised paragraph for headings "text:h"."""
-
-    _tag = "text:h"
-    _properties = (
-        PropDef("level", "text:outline-level"),
-        PropDef("restart_numbering", "text:restart-numbering"),
-        PropDef("start_value", "text:start-value"),
-        PropDef("suppress_numbering", "text:suppress-numbering"),
-    )
-
-    def __init__(
-        self,
-        level: int = 1,
-        text: str | None = None,
-        restart_numbering: bool = False,
-        start_value: int | None = None,
-        suppress_numbering: bool = False,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a header element of the given style and level, containing the
-        optional given text.
-
-        Level count begins at 1.
-
-        Arguments:
-
-            level -- int
-
-            text -- str
-
-            restart_numbering -- bool
-
-            start_value -- int
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.level = int(level)
-            if text:
-                self.text = text
-            if restart_numbering:
-                self.restart_numbering = True
-            if start_value is not None:
-                self.start_value = start_value
-            if suppress_numbering:
-                self.suppress_numbering = True
-            if style:
-                self.style = style
-
-    def get_formatted_text(
-        self,
-        context: dict | None = None,
-        simple: bool = False,
-    ) -> str:
-        if not context:
-            context = {
-                "document": None,
-                "footnotes": [],
-                "endnotes": [],
-                "annotations": [],
-                "rst_mode": False,
-                "img_counter": 0,
-                "images": [],
-                "no_img_level": 0,
-            }
-        context["no_img_level"] += 1
-        title = super().get_formatted_text(context)
-        context["no_img_level"] -= 1
-        title = title.strip()
-        title = sub(r"\s+", " ", title)
-
-        # No rst_mode ?
-        if not context["rst_mode"]:
-            return title
-        # If here in rst_mode!
-
-        # Get the level, max 5!
-        LEVEL_STYLES = "#=-~`+^°'."
-        level = int(self.level)
-        if level > len(LEVEL_STYLES):
-            raise ValueError("Too many levels of heading")
-
-        # And return the result
-        result = ["\n", title, "\n", LEVEL_STYLES[level - 1] * len(title), "\n"]
-        return "".join(result)
-
-

Ancestors

- -

Instance variables

-
-
var level : str | bool | None
-
-

Get/set the attribute text:outline-level

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var restart_numbering : str | bool | None
-
-

Get/set the attribute text:restart-numbering

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var start_value : str | bool | None
-
-

Get/set the attribute text:start-value

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var suppress_numbering : str | bool | None
-
-

Get/set the attribute text:suppress-numbering

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class HeaderRows -(**kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class HeaderRows(Element):
-    _tag = "table:table-header-rows"
-    _caching = True
-
-

Ancestors

- -

Inherited members

- -
-
-class IndexTitle -(name: str | None = None, style: str | None = None, title_text: str | None = None, title_text_style: str | None = None, xml_id: str | None = None, **kwargs: Any) -
-
-

The "text:index-title" element contains the title of an index.

-

The element has the following attributes: -text:name, text:protected, text:protection-key, -text:protection-key-digest-algorithm, text:style-name, xml:id.

-

The actual title is stored in a child element

-
- -Expand source code - -
class IndexTitle(Element):
-    """The "text:index-title" element contains the title of an index.
-
-    The element has the following attributes:
-    text:name, text:protected, text:protection-key,
-    text:protection-key-digest-algorithm, text:style-name, xml:id.
-
-    The actual title is stored in a child element
-    """
-
-    _tag = "text:index-title"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "text:style-name"),
-        PropDef("xml_id", "xml:id"),
-        PropDef("protected", "text:protected"),
-        PropDef("protection_key", "text:protection-key"),
-        PropDef(
-            "protection_key_digest_algorithm", "text:protection-key-digest-algorithm"
-        ),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        style: str | None = None,
-        title_text: str | None = None,
-        title_text_style: str | None = None,
-        xml_id: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if style:
-                self.style = style
-            if xml_id:
-                self.xml_id = xml_id
-            if title_text:
-                self.set_title_text(title_text, title_text_style)
-
-    def set_title_text(
-        self,
-        title_text: str,
-        title_text_style: str | None = None,
-    ) -> None:
-        title = Paragraph(title_text, style=title_text_style)
-        self.append(title)
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var protected : str | bool | None
-
-

Get/set the attribute text:protected

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var protection_key : str | bool | None
-
-

Get/set the attribute text:protection-key

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var protection_key_digest_algorithm : str | bool | None
-
-

Get/set the attribute text:protection-key-digest-algorithm

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var xml_id : str | bool | None
-
-

Get/set the attribute xml:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def set_title_text(self, title_text: str, title_text_style: str | None = None) ‑> None -
-
-
-
- -Expand source code - -
def set_title_text(
-    self,
-    title_text: str,
-    title_text_style: str | None = None,
-) -> None:
-    title = Paragraph(title_text, style=title_text_style)
-    self.append(title)
-
-
-
-

Inherited members

- -
-
-class IndexTitleTemplate -(style: str | None = None, **kwargs: Any) -
-
-

ODF "text:index-title-template"

-

Arguments

-

style – str

-
- -Expand source code - -
class IndexTitleTemplate(Element):
-    """ODF "text:index-title-template"
-
-    Arguments:
-
-        style -- str
-    """
-
-    _tag = "text:index-title-template"
-    _properties = (PropDef("style", "text:style-name"),)
-
-    def __init__(self, style: str | None = None, **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init and style:
-            self.style = style
-
-

Ancestors

- -

Instance variables

-
-
var style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class LineBreak -(**kwargs: Any) -
-
-

This element represents a line break "text:line-break"

-
- -Expand source code - -
class LineBreak(Element):
-    """This element represents a line break "text:line-break" """
-
-    _tag = "text:line-break"
-
-    def __init__(self, **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-
-

Ancestors

- -

Inherited members

- -
-
-class LineShape -(style: str | None = None, text_style: str | None = None, draw_id: str | None = None, layer: str | None = None, p1: tuple | None = None, p2: tuple | None = None, **kwargs: Any) -
-
-

Create a line shape.

-

Arguments

-

style – str

-

text_style – str

-

draw_id – str

-

layer – str

-

p1 – (str, str)

-

p2 – (str, str)

-
- -Expand source code - -
class LineShape(ShapeBase):
-    """Create a line shape.
-
-    Arguments:
-
-        style -- str
-
-        text_style -- str
-
-        draw_id -- str
-
-        layer -- str
-
-        p1 -- (str, str)
-
-        p2 -- (str, str)
-    """
-
-    _tag = "draw:line"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("x1", "svg:x1"),
-        PropDef("y1", "svg:y1"),
-        PropDef("x2", "svg:x2"),
-        PropDef("y2", "svg:y2"),
-    )
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        p1: tuple | None = None,
-        p2: tuple | None = None,
-        **kwargs: Any,
-    ) -> None:
-        kwargs.update(
-            {
-                "style": style,
-                "text_style": text_style,
-                "draw_id": draw_id,
-                "layer": layer,
-            }
-        )
-        super().__init__(**kwargs)
-        if self._do_init:
-            if p1:
-                self.x1 = p1[0]
-                self.y1 = p1[1]
-            if p2:
-                self.x2 = p2[0]
-                self.y2 = p2[1]
-
-

Ancestors

- -

Instance variables

-
-
var x1 : str | bool | None
-
-

Get/set the attribute svg:x1

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var x2 : str | bool | None
-
-

Get/set the attribute svg:x2

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var y1 : str | bool | None
-
-

Get/set the attribute svg:y1

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var y2 : str | bool | None
-
-

Get/set the attribute svg:y2

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
- -
-

Link class, "text:a" ODF element.

-

Arguments

-

url – str

-

name – str

-

title – str

-

text – str

-

target_frame – '_self', '_blank', '_parent', '_top'

-

style – str

-

visited_style – str

-
- -Expand source code - -
class Link(ParagraphBase):
-    """Link class, "text:a" ODF element."""
-
-    _tag = "text:a"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("url", "xlink:href"),
-        PropDef("name", "office:name"),
-        PropDef("title", "office:title"),
-        PropDef("target_frame", "office:target-frame-name"),
-        PropDef("show", "xlink:show"),
-        PropDef("visited_style", "text:visited-style-name"),
-        PropDef("style", "text:style-name"),
-    )
-
-    def __init__(
-        self,
-        url: str | None = "",
-        name: str | None = None,
-        title: str | None = None,
-        text: str | None = None,
-        target_frame: str | None = None,
-        style: str | None = None,
-        visited_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """
-        Arguments:
-
-            url -- str
-
-            name -- str
-
-            title -- str
-
-            text -- str
-
-            target_frame -- '_self', '_blank', '_parent', '_top'
-
-            style -- str
-
-            visited_style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.url = url
-            if name is not None:
-                self.name = name
-            if title is not None:
-                self.title = title
-            if text is not None:
-                self.text = text
-            if target_frame is not None:
-                self.target_frame = target_frame
-                # show can be: 'new' or 'replace'"
-                if target_frame == "_blank":
-                    self.show = "new"
-                else:
-                    self.show = "replace"
-            if style is not None:
-                self.style = style
-            if visited_style is not None:
-                self.visited_style = visited_style
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} tag={self.tag} link={self.url}>"
-
-    def __str__(self) -> str:
-        if self.name:
-            return f"[{self.name}]({self.url})"
-        return f"({self.url})"
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute office:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var show : str | bool | None
-
-

Get/set the attribute xlink:show

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var target_frame : str | bool | None
-
-

Get/set the attribute office:target-frame-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var title : str | bool | None
-
-

Get/set the attribute office:title

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var url : str | bool | None
-
-

Get/set the attribute xlink:href

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var visited_style : str | bool | None
-
-

Get/set the attribute text:visited-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class List -(list_content: str | Element | Iterable[str | Element] | None = None, style: str | None = None, **kwargs: Any) -
-
-

ODF List "text:list".

-

Create a list element, optionaly loading the list by a list of -item (str or elements).

-

The list_content argument is just a shortcut for the most common case. -To create more complex lists, first create an empty list, and fill it -afterwards.

-

Arguments

-

list_content – str or Element, or a list of str or Element

-

style – str

-
- -Expand source code - -
class List(Element):
-    """ODF List "text:list"."""
-
-    _tag = "text:list"
-    _properties = (PropDef("style", "text:style-name"),)
-
-    def __init__(
-        self,
-        list_content: str | Element | Iterable[str | Element] | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a list element, optionaly loading the list by a list of
-        item (str or elements).
-
-        The list_content argument is just a shortcut for the most common case.
-        To create more complex lists, first create an empty list, and fill it
-        afterwards.
-
-        Arguments:
-
-            list_content -- str or Element, or a list of str or Element
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if list_content:
-                if isinstance(list_content, (Element, str)):
-                    self.append(ListItem(list_content))
-                elif hasattr(list_content, "__iter__"):
-                    for item in list_content:
-                        self.append(ListItem(item))
-            if style is not None:
-                self.style = style
-
-    def get_items(self, content: str | None = None) -> list[Element]:
-        """Return all the list items that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Element
-        """
-        return self._filtered_elements("text:list-item", content=content)
-
-    def get_item(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the list item that matches the criteria. In nested lists,
-        return the list item that really contains that content.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Element or None if not found
-        """
-        # Custom implementation because of nested lists
-        if content:
-            # Don't search recursively but on the very own paragraph(s) of
-            # each list item
-            for paragraph in self.get_elements("descendant::text:p"):
-                if paragraph.match(content):
-                    return paragraph.get_element("parent::text:list-item")
-            return None
-        return self._filtered_element("text:list-item", position)
-
-    def set_list_header(
-        self,
-        text_or_element: str | Element | Iterable[str | Element],
-    ) -> None:
-        if isinstance(text_or_element, (str, Element)):
-            actual_list: list[str | Element] | tuple = [text_or_element]
-        elif isinstance(text_or_element, (list, tuple)):
-            actual_list = text_or_element
-        else:
-            raise TypeError
-        # Remove existing header
-        for element in self.get_elements("text:p"):
-            self.delete(element)
-        for paragraph in reversed(actual_list):
-            if isinstance(paragraph, str):
-                paragraph = Paragraph(paragraph)
-            self.insert(paragraph, FIRST_CHILD)
-
-    def insert_item(
-        self,
-        item: ListItem | str | Element | None,
-        position: int | None = None,
-        before: Element | None = None,
-        after: Element | None = None,
-    ) -> None:
-        if not isinstance(item, ListItem):
-            item = ListItem(item)
-        if before is not None:
-            before.insert(item, xmlposition=PREV_SIBLING)
-        elif after is not None:
-            after.insert(item, xmlposition=NEXT_SIBLING)
-        elif position is not None:
-            self.insert(item, position=position)
-        else:
-            raise ValueError("Position must be defined")
-
-    def append_item(
-        self,
-        item: ListItem | str | Element | None,
-    ) -> None:
-        if not isinstance(item, ListItem):
-            item = ListItem(item)
-        self.append(item)
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        if context is None:
-            context = {}
-        rst_mode = context["rst_mode"]
-        result = []
-        if rst_mode:
-            result.append("\n")
-        for list_item in self.get_elements("text:list-item"):
-            textbuf = []
-            for child in list_item.children:
-                text = child.get_formatted_text(context)
-                tag = child.tag
-                if tag == "text:h":
-                    # A title in a list is a bug
-                    return text
-                if tag == "text:list" and not text.lstrip().startswith("-"):
-                    # If the list didn't indent, don't either
-                    # (inner title)
-                    return text
-                textbuf.append(text)
-            text_sum = "".join(textbuf)
-            text_sum = text_sum.strip("\n")
-            # Indent the text
-            text_sum = text_sum.replace("\n", "\n  ")
-            text_sum = f"- {text_sum}\n"
-            result.append(text_sum)
-        if rst_mode:
-            result.append("\n")
-        return "".join(result)
-
-

Ancestors

- -

Instance variables

-
-
var style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def append_item(self, item: ListItem | str | Element | None) ‑> None -
-
-
-
- -Expand source code - -
def append_item(
-    self,
-    item: ListItem | str | Element | None,
-) -> None:
-    if not isinstance(item, ListItem):
-        item = ListItem(item)
-    self.append(item)
-
-
-
-def get_item(self, position: int = 0, content: str | None = None) ‑> Element | None -
-
-

Return the list item that matches the criteria. In nested lists, -return the list item that really contains that content.

-

Arguments

-

position – int

-

content – str regex

-

Return: Element or None if not found

-
- -Expand source code - -
def get_item(
-    self,
-    position: int = 0,
-    content: str | None = None,
-) -> Element | None:
-    """Return the list item that matches the criteria. In nested lists,
-    return the list item that really contains that content.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: Element or None if not found
-    """
-    # Custom implementation because of nested lists
-    if content:
-        # Don't search recursively but on the very own paragraph(s) of
-        # each list item
-        for paragraph in self.get_elements("descendant::text:p"):
-            if paragraph.match(content):
-                return paragraph.get_element("parent::text:list-item")
-        return None
-    return self._filtered_element("text:list-item", position)
-
-
-
-def get_items(self, content: str | None = None) ‑> odfdo.list[Element] -
-
-

Return all the list items that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of Element

-
- -Expand source code - -
def get_items(self, content: str | None = None) -> list[Element]:
-    """Return all the list items that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of Element
-    """
-    return self._filtered_elements("text:list-item", content=content)
-
-
-
-def insert_item(self, item: ListItem | str | Element | None, position: int | None = None, before: Element | None = None, after: Element | None = None) ‑> None -
-
-
-
- -Expand source code - -
def insert_item(
-    self,
-    item: ListItem | str | Element | None,
-    position: int | None = None,
-    before: Element | None = None,
-    after: Element | None = None,
-) -> None:
-    if not isinstance(item, ListItem):
-        item = ListItem(item)
-    if before is not None:
-        before.insert(item, xmlposition=PREV_SIBLING)
-    elif after is not None:
-        after.insert(item, xmlposition=NEXT_SIBLING)
-    elif position is not None:
-        self.insert(item, position=position)
-    else:
-        raise ValueError("Position must be defined")
-
-
-
-def set_list_header(self, text_or_element: str | Element | Iterable[str | Element]) ‑> None -
-
-
-
- -Expand source code - -
def set_list_header(
-    self,
-    text_or_element: str | Element | Iterable[str | Element],
-) -> None:
-    if isinstance(text_or_element, (str, Element)):
-        actual_list: list[str | Element] | tuple = [text_or_element]
-    elif isinstance(text_or_element, (list, tuple)):
-        actual_list = text_or_element
-    else:
-        raise TypeError
-    # Remove existing header
-    for element in self.get_elements("text:p"):
-        self.delete(element)
-    for paragraph in reversed(actual_list):
-        if isinstance(paragraph, str):
-            paragraph = Paragraph(paragraph)
-        self.insert(paragraph, FIRST_CHILD)
-
-
-
-

Inherited members

- -
-
-class ListItem -(text_or_element: str | Element | None = None, **kwargs: Any) -
-
-

ODF element "text:list-item", item of a List.

-

Create a list item element, optionaly passing at creation time a -string or Element as content.

-

Arguments

-

text_or_element – str or ODF Element

-
- -Expand source code - -
class ListItem(Element):
-    """ODF element "text:list-item", item of a List."""
-
-    _tag = "text:list-item"
-
-    def __init__(
-        self,
-        text_or_element: str | Element | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a list item element, optionaly passing at creation time a
-        string or Element as content.
-
-        Arguments:
-
-            text_or_element -- str or ODF Element
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if isinstance(text_or_element, str):
-                self.text_content = text_or_element
-            elif isinstance(text_or_element, Element):
-                self.append(text_or_element)
-            elif text_or_element is not None:
-                raise TypeError("Expected str or Element")
-
-

Ancestors

- -

Inherited members

- -
-
-class Manifest -(part_name: str, container: Container) -
-
-

Representation of an XML part.

-

Abstraction of the XML library behind.

-
- -Expand source code - -
class Manifest(XmlPart):
-    def get_paths(self) -> list[Element | Text]:
-        """Return the list of full paths in the manifest.
-
-        Return: list of str
-        """
-        xpath_query = "//manifest:file-entry/attribute::manifest:full-path"
-        return self.xpath(xpath_query)
-
-    def _file_entry(self, full_path: str) -> Element:
-        xpath_query = (
-            f'//manifest:file-entry[attribute::manifest:full-path="{full_path}"]'
-        )
-        result = self.xpath(xpath_query)
-        if not result:
-            raise KeyError(f"Path not found: '{full_path}'")
-        return result[0]  # type: ignore
-
-    def get_path_medias(self) -> list[tuple]:
-        """Return the list of (full_path, media_type) pairs in the manifest.
-
-        Return: list of str tuples
-        """
-        xpath_query = "//manifest:file-entry"
-        result = []
-        for file_entry in self.xpath(xpath_query):
-            if not isinstance(file_entry, Element):
-                continue
-            result.append(
-                (
-                    file_entry.get_attribute_string("manifest:full-path"),
-                    file_entry.get_attribute_string("manifest:media-type"),
-                )
-            )
-        return result
-
-    def get_media_type(self, full_path: str) -> str | None:
-        """Get the media type of an existing path.
-
-        Return: str
-        """
-        xpath_query = (
-            f'//manifest:file-entry[attribute::manifest:full-path="{full_path}"]'
-            "/attribute::manifest:media-type"
-        )
-        result = self.xpath(xpath_query)
-        if not result:
-            return None
-        return str(result[0])
-
-    def set_media_type(self, full_path: str, media_type: str) -> None:
-        """Set the media type of an existing path.
-
-        Arguments:
-
-            full_path -- str
-
-            media_type -- str
-        """
-        file_entry = self._file_entry(full_path)
-        file_entry.set_attribute("manifest:media-type", media_type)
-
-    @staticmethod
-    def make_file_entry(full_path: str, media_type: str) -> Element:
-        tag = (
-            f"<manifest:file-entry "
-            f'manifest:media-type="{media_type}" '
-            f'manifest:full-path="{full_path}"/>'
-        )
-        return Element.from_tag(tag)
-
-    def add_full_path(self, full_path: str, media_type: str = "") -> None:
-        # Existing?
-        existing = self.get_media_type(full_path)
-        if existing is not None:
-            self.set_media_type(full_path, media_type)
-        root = self.root
-        root.append(self.make_file_entry(full_path, media_type))
-
-    def del_full_path(self, full_path: str) -> None:
-        file_entry = self._file_entry(full_path)
-        self.root.delete(file_entry)
-
-

Ancestors

- -

Static methods

-
-
-def make_file_entry(full_path: str, media_type: str) ‑> Element -
-
-
-
- -Expand source code - -
@staticmethod
-def make_file_entry(full_path: str, media_type: str) -> Element:
-    tag = (
-        f"<manifest:file-entry "
-        f'manifest:media-type="{media_type}" '
-        f'manifest:full-path="{full_path}"/>'
-    )
-    return Element.from_tag(tag)
-
-
-
-

Methods

-
-
-def add_full_path(self, full_path: str, media_type: str = '') ‑> None -
-
-
-
- -Expand source code - -
def add_full_path(self, full_path: str, media_type: str = "") -> None:
-    # Existing?
-    existing = self.get_media_type(full_path)
-    if existing is not None:
-        self.set_media_type(full_path, media_type)
-    root = self.root
-    root.append(self.make_file_entry(full_path, media_type))
-
-
-
-def del_full_path(self, full_path: str) ‑> None -
-
-
-
- -Expand source code - -
def del_full_path(self, full_path: str) -> None:
-    file_entry = self._file_entry(full_path)
-    self.root.delete(file_entry)
-
-
-
-def get_media_type(self, full_path: str) ‑> str | None -
-
-

Get the media type of an existing path.

-

Return: str

-
- -Expand source code - -
def get_media_type(self, full_path: str) -> str | None:
-    """Get the media type of an existing path.
-
-    Return: str
-    """
-    xpath_query = (
-        f'//manifest:file-entry[attribute::manifest:full-path="{full_path}"]'
-        "/attribute::manifest:media-type"
-    )
-    result = self.xpath(xpath_query)
-    if not result:
-        return None
-    return str(result[0])
-
-
-
-def get_path_medias(self) ‑> odfdo.list[tuple] -
-
-

Return the list of (full_path, media_type) pairs in the manifest.

-

Return: list of str tuples

-
- -Expand source code - -
def get_path_medias(self) -> list[tuple]:
-    """Return the list of (full_path, media_type) pairs in the manifest.
-
-    Return: list of str tuples
-    """
-    xpath_query = "//manifest:file-entry"
-    result = []
-    for file_entry in self.xpath(xpath_query):
-        if not isinstance(file_entry, Element):
-            continue
-        result.append(
-            (
-                file_entry.get_attribute_string("manifest:full-path"),
-                file_entry.get_attribute_string("manifest:media-type"),
-            )
-        )
-    return result
-
-
-
-def get_paths(self) ‑> odfdo.list[Element | Text] -
-
-

Return the list of full paths in the manifest.

-

Return: list of str

-
- -Expand source code - -
def get_paths(self) -> list[Element | Text]:
-    """Return the list of full paths in the manifest.
-
-    Return: list of str
-    """
-    xpath_query = "//manifest:file-entry/attribute::manifest:full-path"
-    return self.xpath(xpath_query)
-
-
-
-def set_media_type(self, full_path: str, media_type: str) ‑> None -
-
-

Set the media type of an existing path.

-

Arguments

-

full_path – str

-

media_type – str

-
- -Expand source code - -
def set_media_type(self, full_path: str, media_type: str) -> None:
-    """Set the media type of an existing path.
-
-    Arguments:
-
-        full_path -- str
-
-        media_type -- str
-    """
-    file_entry = self._file_entry(full_path)
-    file_entry.set_attribute("manifest:media-type", media_type)
-
-
-
-

Inherited members

- -
-
-class Meta -(part_name: str, container: Container) -
-
-

Representation of an XML part.

-

Abstraction of the XML library behind.

-
- -Expand source code - -
class Meta(XmlPart):
-    _generator_modified = False
-
-    def get_meta_body(self) -> Element:
-        return self.get_element("//office:meta")
-
-    def get_title(self) -> str | None:
-        """Get the title of the document.
-
-        This is not the first heading but the title metadata.
-
-        Return: str (or None if inexistant)
-        """
-        element = self.get_element("//dc:title")
-        if element is None:
-            return None
-        return element.text
-
-    def set_title(self, title: str) -> None:
-        """Set the title of the document.
-
-        This is not the first heading but the title metadata.
-
-        Arguments:
-
-            title -- str
-        """
-        element = self.get_element("//dc:title")
-        if element is None:
-            element = Element.from_tag("dc:title")
-            self.get_meta_body().append(element)
-        element.text = title
-
-    def get_description(self) -> str | None:
-        """Get the description of the document. Also known as comments.
-
-        Return: str (or None if inexistant)
-        """
-        element = self.get_element("//dc:description")
-        if element is None:
-            return None
-        return element.text
-
-    # As named in OOo
-    get_comments = get_description
-
-    def set_description(self, description: str) -> None:
-        """Set the description of the document. Also known as comments.
-
-        Arguments:
-
-            description -- str
-        """
-        element = self.get_element("//dc:description")
-        if element is None:
-            element = Element.from_tag("dc:description")
-            self.get_meta_body().append(element)
-        element.text = description
-
-    set_comments = set_description
-
-    def get_subject(self) -> str | None:
-        """Get the subject of the document.
-
-        Return: str (or None if inexistant)
-        """
-        element = self.get_element("//dc:subject")
-        if element is None:
-            return None
-        return element.text
-
-    def set_subject(self, subject: str) -> None:
-        """Set the subject of the document.
-
-        Arguments:
-
-            subject -- str
-        """
-        element = self.get_element("//dc:subject")
-        if element is None:
-            element = Element.from_tag("dc:subject")
-            self.get_meta_body().append(element)
-        element.text = subject
-
-    def get_language(self) -> str | None:
-        """Get the language code of the document.
-
-        Return: str (or None if inexistant)
-
-        Example::
-
-            >>> document.meta.get_language()
-            fr-FR
-        """
-        element = self.get_element("//dc:language")
-        if element is None:
-            return None
-        return element.text
-
-    def set_language(self, language: str) -> None:
-        """Set the language code of the document.
-
-        Arguments:
-
-            language -- str
-
-        Example::
-
-            >>> document.meta.set_language('fr-FR')
-        """
-        language = str(language)
-        if not self._is_RFC3066(language):
-            raise TypeError(
-                'Language must be "xx" lang or "xx-YY" lang-COUNTRY code (RFC3066)'
-            )
-        element = self.get_element("//dc:language")
-        if element is None:
-            element = Element.from_tag("dc:language")
-            self.get_meta_body().append(element)
-        element.text = language
-
-    @staticmethod
-    def _is_RFC3066(lang: str) -> bool:
-        def test_part1(part1: str) -> bool:
-            if not 2 <= len(part1) <= 3:
-                return False
-            return all(x in ascii_letters for x in part1)
-
-        def test_part2(part2: str) -> bool:
-            return all(x in ascii_letters or x in digits for x in part2)
-
-        if not lang or not isinstance(lang, str):
-            return False
-        if "-" not in lang:
-            return test_part1(lang)
-        parts = lang.split("-")
-        if len(parts) > 3:
-            return False
-        if not test_part1(parts[0]):
-            return False
-        return all(test_part2(p) for p in parts[1:])
-
-    def get_modification_date(self) -> datetime | None:
-        """Get the last modified date of the document.
-
-        Return: datetime (or None if inexistant)
-        """
-        element = self.get_element("//dc:date")
-        if element is None:
-            return None
-        modification_date = element.text
-        return DateTime.decode(modification_date)
-
-    def set_modification_date(self, date: datetime) -> None:
-        """Set the last modified date of the document.
-
-        Arguments:
-
-            date -- datetime
-        """
-        element = self.get_element("//dc:date")
-        if element is None:
-            element = Element.from_tag("dc:date")
-            self.get_meta_body().append(element)
-        element.text = DateTime.encode(date)
-
-    def get_creation_date(self) -> datetime | None:
-        """Get the creation date of the document.
-
-        Return: datetime (or None if inexistant)
-        """
-        element = self.get_element("//meta:creation-date")
-        if element is None:
-            return None
-        creation_date = element.text
-        return DateTime.decode(creation_date)
-
-    def set_creation_date(self, date: datetime) -> None:
-        """Set the creation date of the document.
-
-        Arguments:
-
-            date -- datetime
-        """
-        element = self.get_element("//meta:creation-date")
-        if element is None:
-            element = Element.from_tag("meta:creation-date")
-            self.get_meta_body().append(element)
-        element.text = DateTime.encode(date)
-
-    def get_initial_creator(self) -> str | None:
-        """Get the first creator of the document.
-
-        Return: str (or None if inexistant)
-
-        Example::
-
-            >>> document.meta.get_initial_creator()
-            Unknown
-        """
-        element = self.get_element("//meta:initial-creator")
-        if element is None:
-            return None
-        return element.text
-
-    def set_initial_creator(self, creator: str) -> None:
-        """Set the first creator of the document.
-
-        Arguments:
-
-            creator -- str
-
-        Example::
-
-            >>> document.meta.set_initial_creator(u"Plato")
-        """
-        element = self.get_element("//meta:initial-creator")
-        if element is None:
-            element = Element.from_tag("meta:initial-creator")
-            self.get_meta_body().append(element)
-        element.text = creator
-
-    def get_creator(self) -> str | None:
-        """Get the creator of the document.
-
-        Return: str (or None if inexistant)
-
-        Example::
-
-            >>> document.meta.get_creator()
-            Unknown
-        """
-        element = self.get_element("//dc:creator")
-        if element is None:
-            return None
-        return element.text
-
-    def set_creator(self, creator: str) -> None:
-        """Set the creator of the document.
-
-        Arguments:
-
-            creator -- str
-
-        Example::
-
-            >>> document.meta.set_creator(u"Plato")
-        """
-        element = self.get_element("//dc:creator")
-        if element is None:
-            element = Element.from_tag("dc:creator")
-            self.get_meta_body().append(element)
-        element.text = creator
-
-    def get_keywords(self) -> str | None:
-        """Get the keywords of the document. Return the field as-is, without
-        any assumption on the keyword separator.
-
-        Return: str (or None if inexistant)
-        """
-        element = self.get_element("//meta:keyword")
-        if element is None:
-            return None
-        return element.text
-
-    def set_keywords(self, keywords: str) -> None:
-        """Set the keywords of the document. Although the name is plural, a
-        str string is required, so join your list first.
-
-        Arguments:
-
-            keywords -- str
-        """
-        element = self.get_element("//meta:keyword")
-        if element is None:
-            element = Element.from_tag("meta:keyword")
-            self.get_meta_body().append(element)
-        element.text = keywords
-
-    def get_editing_duration(self) -> timedelta | None:
-        """Get the time the document was edited, as reported by the
-        generator.
-
-        Return: timedelta (or None if inexistant)
-        """
-        element = self.get_element("//meta:editing-duration")
-        if element is None:
-            return None
-        duration = element.text
-        return Duration.decode(duration)
-
-    def set_editing_duration(self, duration: timedelta) -> None:
-        """Set the time the document was edited.
-
-        Arguments:
-
-            duration -- timedelta
-        """
-        if not isinstance(duration, timedelta):
-            raise TypeError("duration must be a timedelta")
-        element = self.get_element("//meta:editing-duration")
-        if element is None:
-            element = Element.from_tag("meta:editing-duration")
-            self.get_meta_body().append(element)
-        element.text = Duration.encode(duration)
-
-    def get_editing_cycles(self) -> int | None:
-        """Get the number of times the document was edited, as reported by
-        the generator.
-
-        Return: int (or None if inexistant)
-        """
-        element = self.get_element("//meta:editing-cycles")
-        if element is None:
-            return None
-        cycles = element.text
-        return int(cycles)
-
-    def set_editing_cycles(self, cycles: int) -> None:
-        """Set the number of times the document was edited.
-
-        Arguments:
-
-            cycles -- int
-        """
-        if not isinstance(cycles, int):
-            raise TypeError("cycles must be an int")
-        if cycles < 1:
-            raise ValueError("cycles must be a positive int")
-        element = self.get_element("//meta:editing-cycles")
-        if element is None:
-            element = Element.from_tag("meta:editing-cycles")
-            self.get_meta_body().append(element)
-        element.text = str(cycles)
-
-    def get_generator(self) -> str | None:
-        """Get the signature of the software that generated this document.
-
-        Return: str (or None if inexistant)
-
-        Example::
-
-            >>> document.meta.get_generator()
-            KOffice/2.0.0
-        """
-        element = self.get_element("//meta:generator")
-        if element is None:
-            return None
-        return element.text
-
-    def set_generator(self, generator: str) -> None:
-        """Set the signature of the software that generated this document.
-
-        Arguments:
-
-            generator -- str
-
-        Example::
-
-            >>> document.meta.set_generator(u"lpOD Project")
-        """
-        element = self.get_element("//meta:generator")
-        if element is None:
-            element = Element.from_tag("meta:generator")
-            self.get_meta_body().append(element)
-        element.text = generator
-        self._generator_modified = True
-
-    def set_generator_default(self) -> None:
-        """Set the signature of the software that generated this document
-        to ourself.
-
-        Example::
-
-            >>> document.meta.set_generator_default()
-        """
-        if not self._generator_modified:
-            self.set_generator(f"odfdo {__version__}")
-
-    def get_statistic(self) -> dict[str, int] | None:
-        """Get the statistic from the software that generated this document.
-
-        Return: dict (or None if inexistant)
-
-        Example::
-
-            >>> document.get_statistic():
-            {'meta:table-count': 1,
-             'meta:image-count': 2,
-             'meta:object-count': 3,
-             'meta:page-count': 4,
-             'meta:paragraph-count': 5,
-             'meta:word-count': 6,
-             'meta:character-count': 7}
-        """
-        element = self.get_element("//meta:document-statistic")
-        if element is None:
-            return None
-        statistic = {}
-        for key, value in element.attributes.items():
-            statistic[to_str(key)] = int(value)
-        return statistic
-
-    def set_statistic(self, statistic: dict[str, int]) -> None:
-        """Set the statistic for the documents: number of words, paragraphs,
-        etc.
-
-        Arguments:
-
-            statistic -- dict
-
-        Example::
-
-            >>> statistic = {'meta:table-count': 1,
-                             'meta:image-count': 2,
-                             'meta:object-count': 3,
-                             'meta:page-count': 4,
-                             'meta:paragraph-count': 5,
-                             'meta:word-count': 6,
-                             'meta:character-count': 7}
-            >>> document.meta.set_statistic(statistic)
-        """
-        if not isinstance(statistic, dict):
-            raise TypeError("Statistic must be a dict")
-        element = self.get_element("//meta:document-statistic")
-        for key, value in statistic.items():
-            try:
-                ivalue = int(value)
-            except ValueError as e:
-                raise TypeError("Statistic value must be a int") from e
-            element.set_attribute(to_str(key), str(ivalue))
-
-    def get_user_defined_metadata(self) -> dict[str, Any]:
-        """Return a dict of str/value mapping.
-
-        Value types can be: Decimal, date, time, boolean or str.
-        """
-        result: dict[str, Any] = {}
-        for item in self.get_elements("//meta:user-defined"):
-            if not isinstance(item, Element):
-                continue
-            # Read the values
-            name = item.get_attribute_string("meta:name")
-            if name is None:
-                continue
-            value = self._get_meta_value(item)
-            result[name] = value
-        return result
-
-    def get_user_defined_metadata_of_name(self, keyname: str) -> dict[str, Any] | None:
-        """Return the content of the user defined metadata of that name.
-        Return None if no name matchs or a dic of fields.
-
-        Arguments:
-
-            name -- string, name (meta:name content)
-        """
-        result = {}
-        found = False
-        for item in self.get_elements("//meta:user-defined"):
-            if not isinstance(item, Element):
-                continue
-            # Read the values
-            name = item.get_attribute("meta:name")
-            if name == keyname:
-                found = True
-                break
-        if not found:
-            return None
-        result["name"] = name
-        value, value_type, text = self._get_meta_value(item, full=True)  # type: ignore
-        result["value"] = value
-        result["value_type"] = value_type
-        result["text"] = text
-        return result
-
-    def set_user_defined_metadata(self, name: str, value: Any) -> None:
-        if isinstance(value, bool):
-            value_type = "boolean"
-            value = "true" if value else "false"
-        elif isinstance(value, (int, float, Decimal)):
-            value_type = "float"
-            value = str(value)
-        elif isinstance(value, dtdate):
-            value_type = "date"
-            value = str(Date.encode(value))
-        elif isinstance(value, datetime):
-            value_type = "date"
-            value = str(DateTime.encode(value))
-        elif isinstance(value, str):
-            value_type = "string"
-        elif isinstance(value, timedelta):
-            value_type = "time"
-            value = str(Duration.encode(value))
-        else:
-            raise TypeError('unexpected type "%s" for value' % type(value))
-        # Already the same element ?
-        for metadata in self.get_elements("//meta:user-defined"):
-            if not isinstance(metadata, Element):
-                continue
-            if metadata.get_attribute("meta:name") == name:
-                break
-        else:
-            metadata = Element.from_tag("meta:user-defined")
-            metadata.set_attribute("meta:name", name)
-            self.get_meta_body().append(metadata)
-        metadata.set_attribute("meta:value-type", value_type)
-        metadata.text = value
-
-    def _get_meta_value(
-        self, element: Element, full: bool = False
-    ) -> Any | tuple[Any, str, str]:
-        """get_value() deicated to the meta data part, for one meta element."""
-        if full:
-            return self._get_meta_value_full(element)
-        else:
-            return self._get_meta_value_full(element)[0]
-
-    @staticmethod
-    def _get_meta_value_full(element: Element) -> tuple[Any, str, str]:
-        """get_value deicated to the meta data part, for one meta element."""
-        # name = element.get_attribute('meta:name')
-        value_type = element.get_attribute_string("meta:value-type")
-        if value_type is None:
-            value_type = "string"
-        text = element.text
-        # Interpretation
-        if value_type == "boolean":
-            return (Boolean.decode(text), value_type, text)
-        if value_type in ("float", "percentage", "currency"):
-            return (Decimal(text), value_type, text)
-        if value_type == "date":
-            if "T" in text:
-                return (DateTime.decode(text), value_type, text)
-            else:
-                return (Date.decode(text), value_type, text)
-        if value_type == "string":
-            return (text, value_type, text)
-        if value_type == "time":
-            return (Duration.decode(text), value_type, text)
-        raise TypeError(f"Unknown value type: '{value_type!r}'")
-
-

Ancestors

- -

Methods

-
-
-def get_comments(self) ‑> str | None -
-
-

Get the description of the document. Also known as comments.

-

Return: str (or None if inexistant)

-
- -Expand source code - -
def get_description(self) -> str | None:
-    """Get the description of the document. Also known as comments.
-
-    Return: str (or None if inexistant)
-    """
-    element = self.get_element("//dc:description")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_creation_date(self) ‑> datetime.datetime | None -
-
-

Get the creation date of the document.

-

Return: datetime (or None if inexistant)

-
- -Expand source code - -
def get_creation_date(self) -> datetime | None:
-    """Get the creation date of the document.
-
-    Return: datetime (or None if inexistant)
-    """
-    element = self.get_element("//meta:creation-date")
-    if element is None:
-        return None
-    creation_date = element.text
-    return DateTime.decode(creation_date)
-
-
-
-def get_creator(self) ‑> str | None -
-
-

Get the creator of the document.

-

Return: str (or None if inexistant)

-

Example::

-
>>> document.meta.get_creator()
-Unknown
-
-
- -Expand source code - -
def get_creator(self) -> str | None:
-    """Get the creator of the document.
-
-    Return: str (or None if inexistant)
-
-    Example::
-
-        >>> document.meta.get_creator()
-        Unknown
-    """
-    element = self.get_element("//dc:creator")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_description(self) ‑> str | None -
-
-

Get the description of the document. Also known as comments.

-

Return: str (or None if inexistant)

-
- -Expand source code - -
def get_description(self) -> str | None:
-    """Get the description of the document. Also known as comments.
-
-    Return: str (or None if inexistant)
-    """
-    element = self.get_element("//dc:description")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_editing_cycles(self) ‑> int | None -
-
-

Get the number of times the document was edited, as reported by -the generator.

-

Return: int (or None if inexistant)

-
- -Expand source code - -
def get_editing_cycles(self) -> int | None:
-    """Get the number of times the document was edited, as reported by
-    the generator.
-
-    Return: int (or None if inexistant)
-    """
-    element = self.get_element("//meta:editing-cycles")
-    if element is None:
-        return None
-    cycles = element.text
-    return int(cycles)
-
-
-
-def get_editing_duration(self) ‑> datetime.timedelta | None -
-
-

Get the time the document was edited, as reported by the -generator.

-

Return: timedelta (or None if inexistant)

-
- -Expand source code - -
def get_editing_duration(self) -> timedelta | None:
-    """Get the time the document was edited, as reported by the
-    generator.
-
-    Return: timedelta (or None if inexistant)
-    """
-    element = self.get_element("//meta:editing-duration")
-    if element is None:
-        return None
-    duration = element.text
-    return Duration.decode(duration)
-
-
-
-def get_generator(self) ‑> str | None -
-
-

Get the signature of the software that generated this document.

-

Return: str (or None if inexistant)

-

Example::

-
>>> document.meta.get_generator()
-KOffice/2.0.0
-
-
- -Expand source code - -
def get_generator(self) -> str | None:
-    """Get the signature of the software that generated this document.
-
-    Return: str (or None if inexistant)
-
-    Example::
-
-        >>> document.meta.get_generator()
-        KOffice/2.0.0
-    """
-    element = self.get_element("//meta:generator")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_initial_creator(self) ‑> str | None -
-
-

Get the first creator of the document.

-

Return: str (or None if inexistant)

-

Example::

-
>>> document.meta.get_initial_creator()
-Unknown
-
-
- -Expand source code - -
def get_initial_creator(self) -> str | None:
-    """Get the first creator of the document.
-
-    Return: str (or None if inexistant)
-
-    Example::
-
-        >>> document.meta.get_initial_creator()
-        Unknown
-    """
-    element = self.get_element("//meta:initial-creator")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_keywords(self) ‑> str | None -
-
-

Get the keywords of the document. Return the field as-is, without -any assumption on the keyword separator.

-

Return: str (or None if inexistant)

-
- -Expand source code - -
def get_keywords(self) -> str | None:
-    """Get the keywords of the document. Return the field as-is, without
-    any assumption on the keyword separator.
-
-    Return: str (or None if inexistant)
-    """
-    element = self.get_element("//meta:keyword")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_language(self) ‑> str | None -
-
-

Get the language code of the document.

-

Return: str (or None if inexistant)

-

Example::

-
>>> document.meta.get_language()
-fr-FR
-
-
- -Expand source code - -
def get_language(self) -> str | None:
-    """Get the language code of the document.
-
-    Return: str (or None if inexistant)
-
-    Example::
-
-        >>> document.meta.get_language()
-        fr-FR
-    """
-    element = self.get_element("//dc:language")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_meta_body(self) ‑> Element -
-
-
-
- -Expand source code - -
def get_meta_body(self) -> Element:
-    return self.get_element("//office:meta")
-
-
-
-def get_modification_date(self) ‑> datetime.datetime | None -
-
-

Get the last modified date of the document.

-

Return: datetime (or None if inexistant)

-
- -Expand source code - -
def get_modification_date(self) -> datetime | None:
-    """Get the last modified date of the document.
-
-    Return: datetime (or None if inexistant)
-    """
-    element = self.get_element("//dc:date")
-    if element is None:
-        return None
-    modification_date = element.text
-    return DateTime.decode(modification_date)
-
-
-
-def get_statistic(self) ‑> dict[str, int] | None -
-
-

Get the statistic from the software that generated this document.

-

Return: dict (or None if inexistant)

-

Example::

-
>>> document.get_statistic():
-{'meta:table-count': 1,
- 'meta:image-count': 2,
- 'meta:object-count': 3,
- 'meta:page-count': 4,
- 'meta:paragraph-count': 5,
- 'meta:word-count': 6,
- 'meta:character-count': 7}
-
-
- -Expand source code - -
def get_statistic(self) -> dict[str, int] | None:
-    """Get the statistic from the software that generated this document.
-
-    Return: dict (or None if inexistant)
-
-    Example::
-
-        >>> document.get_statistic():
-        {'meta:table-count': 1,
-         'meta:image-count': 2,
-         'meta:object-count': 3,
-         'meta:page-count': 4,
-         'meta:paragraph-count': 5,
-         'meta:word-count': 6,
-         'meta:character-count': 7}
-    """
-    element = self.get_element("//meta:document-statistic")
-    if element is None:
-        return None
-    statistic = {}
-    for key, value in element.attributes.items():
-        statistic[to_str(key)] = int(value)
-    return statistic
-
-
-
-def get_subject(self) ‑> str | None -
-
-

Get the subject of the document.

-

Return: str (or None if inexistant)

-
- -Expand source code - -
def get_subject(self) -> str | None:
-    """Get the subject of the document.
-
-    Return: str (or None if inexistant)
-    """
-    element = self.get_element("//dc:subject")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_title(self) ‑> str | None -
-
-

Get the title of the document.

-

This is not the first heading but the title metadata.

-

Return: str (or None if inexistant)

-
- -Expand source code - -
def get_title(self) -> str | None:
-    """Get the title of the document.
-
-    This is not the first heading but the title metadata.
-
-    Return: str (or None if inexistant)
-    """
-    element = self.get_element("//dc:title")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_user_defined_metadata(self) ‑> dict[str, typing.Any] -
-
-

Return a dict of str/value mapping.

-

Value types can be: Decimal, date, time, boolean or str.

-
- -Expand source code - -
def get_user_defined_metadata(self) -> dict[str, Any]:
-    """Return a dict of str/value mapping.
-
-    Value types can be: Decimal, date, time, boolean or str.
-    """
-    result: dict[str, Any] = {}
-    for item in self.get_elements("//meta:user-defined"):
-        if not isinstance(item, Element):
-            continue
-        # Read the values
-        name = item.get_attribute_string("meta:name")
-        if name is None:
-            continue
-        value = self._get_meta_value(item)
-        result[name] = value
-    return result
-
-
-
-def get_user_defined_metadata_of_name(self, keyname: str) ‑> dict[str, typing.Any] | None -
-
-

Return the content of the user defined metadata of that name. -Return None if no name matchs or a dic of fields.

-

Arguments

-

name – string, name (meta:name content)

-
- -Expand source code - -
def get_user_defined_metadata_of_name(self, keyname: str) -> dict[str, Any] | None:
-    """Return the content of the user defined metadata of that name.
-    Return None if no name matchs or a dic of fields.
-
-    Arguments:
-
-        name -- string, name (meta:name content)
-    """
-    result = {}
-    found = False
-    for item in self.get_elements("//meta:user-defined"):
-        if not isinstance(item, Element):
-            continue
-        # Read the values
-        name = item.get_attribute("meta:name")
-        if name == keyname:
-            found = True
-            break
-    if not found:
-        return None
-    result["name"] = name
-    value, value_type, text = self._get_meta_value(item, full=True)  # type: ignore
-    result["value"] = value
-    result["value_type"] = value_type
-    result["text"] = text
-    return result
-
-
-
-def set_comments(self, description: str) ‑> None -
-
-

Set the description of the document. Also known as comments.

-

Arguments

-

description – str

-
- -Expand source code - -
def set_description(self, description: str) -> None:
-    """Set the description of the document. Also known as comments.
-
-    Arguments:
-
-        description -- str
-    """
-    element = self.get_element("//dc:description")
-    if element is None:
-        element = Element.from_tag("dc:description")
-        self.get_meta_body().append(element)
-    element.text = description
-
-
-
-def set_creation_date(self, date: datetime) ‑> None -
-
-

Set the creation date of the document.

-

Arguments

-

date – datetime

-
- -Expand source code - -
def set_creation_date(self, date: datetime) -> None:
-    """Set the creation date of the document.
-
-    Arguments:
-
-        date -- datetime
-    """
-    element = self.get_element("//meta:creation-date")
-    if element is None:
-        element = Element.from_tag("meta:creation-date")
-        self.get_meta_body().append(element)
-    element.text = DateTime.encode(date)
-
-
-
-def set_creator(self, creator: str) ‑> None -
-
-

Set the creator of the document.

-

Arguments

-

creator – str

-

Example::

-
>>> document.meta.set_creator(u"Plato")
-
-
- -Expand source code - -
def set_creator(self, creator: str) -> None:
-    """Set the creator of the document.
-
-    Arguments:
-
-        creator -- str
-
-    Example::
-
-        >>> document.meta.set_creator(u"Plato")
-    """
-    element = self.get_element("//dc:creator")
-    if element is None:
-        element = Element.from_tag("dc:creator")
-        self.get_meta_body().append(element)
-    element.text = creator
-
-
-
-def set_description(self, description: str) ‑> None -
-
-

Set the description of the document. Also known as comments.

-

Arguments

-

description – str

-
- -Expand source code - -
def set_description(self, description: str) -> None:
-    """Set the description of the document. Also known as comments.
-
-    Arguments:
-
-        description -- str
-    """
-    element = self.get_element("//dc:description")
-    if element is None:
-        element = Element.from_tag("dc:description")
-        self.get_meta_body().append(element)
-    element.text = description
-
-
-
-def set_editing_cycles(self, cycles: int) ‑> None -
-
-

Set the number of times the document was edited.

-

Arguments

-

cycles – int

-
- -Expand source code - -
def set_editing_cycles(self, cycles: int) -> None:
-    """Set the number of times the document was edited.
-
-    Arguments:
-
-        cycles -- int
-    """
-    if not isinstance(cycles, int):
-        raise TypeError("cycles must be an int")
-    if cycles < 1:
-        raise ValueError("cycles must be a positive int")
-    element = self.get_element("//meta:editing-cycles")
-    if element is None:
-        element = Element.from_tag("meta:editing-cycles")
-        self.get_meta_body().append(element)
-    element.text = str(cycles)
-
-
-
-def set_editing_duration(self, duration: timedelta) ‑> None -
-
-

Set the time the document was edited.

-

Arguments

-

duration – timedelta

-
- -Expand source code - -
def set_editing_duration(self, duration: timedelta) -> None:
-    """Set the time the document was edited.
-
-    Arguments:
-
-        duration -- timedelta
-    """
-    if not isinstance(duration, timedelta):
-        raise TypeError("duration must be a timedelta")
-    element = self.get_element("//meta:editing-duration")
-    if element is None:
-        element = Element.from_tag("meta:editing-duration")
-        self.get_meta_body().append(element)
-    element.text = Duration.encode(duration)
-
-
-
-def set_generator(self, generator: str) ‑> None -
-
-

Set the signature of the software that generated this document.

-

Arguments

-

generator – str

-

Example::

-
>>> document.meta.set_generator(u"lpOD Project")
-
-
- -Expand source code - -
def set_generator(self, generator: str) -> None:
-    """Set the signature of the software that generated this document.
-
-    Arguments:
-
-        generator -- str
-
-    Example::
-
-        >>> document.meta.set_generator(u"lpOD Project")
-    """
-    element = self.get_element("//meta:generator")
-    if element is None:
-        element = Element.from_tag("meta:generator")
-        self.get_meta_body().append(element)
-    element.text = generator
-    self._generator_modified = True
-
-
-
-def set_generator_default(self) ‑> None -
-
-

Set the signature of the software that generated this document -to ourself.

-

Example::

-
>>> document.meta.set_generator_default()
-
-
- -Expand source code - -
def set_generator_default(self) -> None:
-    """Set the signature of the software that generated this document
-    to ourself.
-
-    Example::
-
-        >>> document.meta.set_generator_default()
-    """
-    if not self._generator_modified:
-        self.set_generator(f"odfdo {__version__}")
-
-
-
-def set_initial_creator(self, creator: str) ‑> None -
-
-

Set the first creator of the document.

-

Arguments

-

creator – str

-

Example::

-
>>> document.meta.set_initial_creator(u"Plato")
-
-
- -Expand source code - -
def set_initial_creator(self, creator: str) -> None:
-    """Set the first creator of the document.
-
-    Arguments:
-
-        creator -- str
-
-    Example::
-
-        >>> document.meta.set_initial_creator(u"Plato")
-    """
-    element = self.get_element("//meta:initial-creator")
-    if element is None:
-        element = Element.from_tag("meta:initial-creator")
-        self.get_meta_body().append(element)
-    element.text = creator
-
-
-
-def set_keywords(self, keywords: str) ‑> None -
-
-

Set the keywords of the document. Although the name is plural, a -str string is required, so join your list first.

-

Arguments

-

keywords – str

-
- -Expand source code - -
def set_keywords(self, keywords: str) -> None:
-    """Set the keywords of the document. Although the name is plural, a
-    str string is required, so join your list first.
-
-    Arguments:
-
-        keywords -- str
-    """
-    element = self.get_element("//meta:keyword")
-    if element is None:
-        element = Element.from_tag("meta:keyword")
-        self.get_meta_body().append(element)
-    element.text = keywords
-
-
-
-def set_language(self, language: str) ‑> None -
-
-

Set the language code of the document.

-

Arguments

-

language – str

-

Example::

-
>>> document.meta.set_language('fr-FR')
-
-
- -Expand source code - -
def set_language(self, language: str) -> None:
-    """Set the language code of the document.
-
-    Arguments:
-
-        language -- str
-
-    Example::
-
-        >>> document.meta.set_language('fr-FR')
-    """
-    language = str(language)
-    if not self._is_RFC3066(language):
-        raise TypeError(
-            'Language must be "xx" lang or "xx-YY" lang-COUNTRY code (RFC3066)'
-        )
-    element = self.get_element("//dc:language")
-    if element is None:
-        element = Element.from_tag("dc:language")
-        self.get_meta_body().append(element)
-    element.text = language
-
-
-
-def set_modification_date(self, date: datetime) ‑> None -
-
-

Set the last modified date of the document.

-

Arguments

-

date – datetime

-
- -Expand source code - -
def set_modification_date(self, date: datetime) -> None:
-    """Set the last modified date of the document.
-
-    Arguments:
-
-        date -- datetime
-    """
-    element = self.get_element("//dc:date")
-    if element is None:
-        element = Element.from_tag("dc:date")
-        self.get_meta_body().append(element)
-    element.text = DateTime.encode(date)
-
-
-
-def set_statistic(self, statistic: dict[str, int]) ‑> None -
-
-

Set the statistic for the documents: number of words, paragraphs, -etc.

-

Arguments

-

statistic – dict

-

Example::

-
>>> statistic = {'meta:table-count': 1,
-                 'meta:image-count': 2,
-                 'meta:object-count': 3,
-                 'meta:page-count': 4,
-                 'meta:paragraph-count': 5,
-                 'meta:word-count': 6,
-                 'meta:character-count': 7}
->>> document.meta.set_statistic(statistic)
-
-
- -Expand source code - -
def set_statistic(self, statistic: dict[str, int]) -> None:
-    """Set the statistic for the documents: number of words, paragraphs,
-    etc.
-
-    Arguments:
-
-        statistic -- dict
-
-    Example::
-
-        >>> statistic = {'meta:table-count': 1,
-                         'meta:image-count': 2,
-                         'meta:object-count': 3,
-                         'meta:page-count': 4,
-                         'meta:paragraph-count': 5,
-                         'meta:word-count': 6,
-                         'meta:character-count': 7}
-        >>> document.meta.set_statistic(statistic)
-    """
-    if not isinstance(statistic, dict):
-        raise TypeError("Statistic must be a dict")
-    element = self.get_element("//meta:document-statistic")
-    for key, value in statistic.items():
-        try:
-            ivalue = int(value)
-        except ValueError as e:
-            raise TypeError("Statistic value must be a int") from e
-        element.set_attribute(to_str(key), str(ivalue))
-
-
-
-def set_subject(self, subject: str) ‑> None -
-
-

Set the subject of the document.

-

Arguments

-

subject – str

-
- -Expand source code - -
def set_subject(self, subject: str) -> None:
-    """Set the subject of the document.
-
-    Arguments:
-
-        subject -- str
-    """
-    element = self.get_element("//dc:subject")
-    if element is None:
-        element = Element.from_tag("dc:subject")
-        self.get_meta_body().append(element)
-    element.text = subject
-
-
-
-def set_title(self, title: str) ‑> None -
-
-

Set the title of the document.

-

This is not the first heading but the title metadata.

-

Arguments

-

title – str

-
- -Expand source code - -
def set_title(self, title: str) -> None:
-    """Set the title of the document.
-
-    This is not the first heading but the title metadata.
-
-    Arguments:
-
-        title -- str
-    """
-    element = self.get_element("//dc:title")
-    if element is None:
-        element = Element.from_tag("dc:title")
-        self.get_meta_body().append(element)
-    element.text = title
-
-
-
-def set_user_defined_metadata(self, name: str, value: Any) ‑> None -
-
-
-
- -Expand source code - -
def set_user_defined_metadata(self, name: str, value: Any) -> None:
-    if isinstance(value, bool):
-        value_type = "boolean"
-        value = "true" if value else "false"
-    elif isinstance(value, (int, float, Decimal)):
-        value_type = "float"
-        value = str(value)
-    elif isinstance(value, dtdate):
-        value_type = "date"
-        value = str(Date.encode(value))
-    elif isinstance(value, datetime):
-        value_type = "date"
-        value = str(DateTime.encode(value))
-    elif isinstance(value, str):
-        value_type = "string"
-    elif isinstance(value, timedelta):
-        value_type = "time"
-        value = str(Duration.encode(value))
-    else:
-        raise TypeError('unexpected type "%s" for value' % type(value))
-    # Already the same element ?
-    for metadata in self.get_elements("//meta:user-defined"):
-        if not isinstance(metadata, Element):
-            continue
-        if metadata.get_attribute("meta:name") == name:
-            break
-    else:
-        metadata = Element.from_tag("meta:user-defined")
-        metadata.set_attribute("meta:name", name)
-        self.get_meta_body().append(metadata)
-    metadata.set_attribute("meta:value-type", value_type)
-    metadata.text = value
-
-
-
-

Inherited members

- -
-
-class NamedRange -(name: str | None = None, crange: str | tuple | odfdo.list | None = None, table_name: str | None = None, usage: str | None = None, **kwargs: Any) -
-
-

ODF Named Range "table:named-range". Identifies inside the spreadsheet -a range of cells of a table by a name and the name of the table.

-

Name Ranges have the following attributes:

-
name -- name of the named range
-
-table_name -- name of the table
-
-start -- first cell of the named range, tuple (x, y)
-
-end -- last cell of the named range, tuple (x, y)
-
-crange -- range of the named range, tuple (x, y, z, t)
-
-usage -- None or str, usage of the named range.
-
-

Create a Named Range element. 'name' must contains only letters, digits -and '_', and must not be like a coordinate as 'A1'. 'table_name' must be -a correct table name (no "'" or "/" in it).

-

Arguments

-

name – str, name of the named range

-

crange – str or tuple of int, cell or area coordinate

-

table_name – str, name of the table

-

usage – None or 'print-range', 'filter', 'repeat-column', 'repeat-row'

-
- -Expand source code - -
class NamedRange(Element):
-    """ODF Named Range "table:named-range". Identifies inside the spreadsheet
-    a range of cells of a table by a name and the name of the table.
-
-    Name Ranges have the following attributes:
-
-        name -- name of the named range
-
-        table_name -- name of the table
-
-        start -- first cell of the named range, tuple (x, y)
-
-        end -- last cell of the named range, tuple (x, y)
-
-        crange -- range of the named range, tuple (x, y, z, t)
-
-        usage -- None or str, usage of the named range.
-    """
-
-    _tag = "table:named-range"
-
-    def __init__(
-        self,
-        name: str | None = None,
-        crange: str | tuple | list | None = None,
-        table_name: str | None = None,
-        usage: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a Named Range element. 'name' must contains only letters, digits
-           and '_', and must not be like a coordinate as 'A1'. 'table_name' must be
-           a correct table name (no "'" or "/" in it).
-
-        Arguments:
-
-             name -- str, name of the named range
-
-             crange -- str or tuple of int, cell or area coordinate
-
-             table_name -- str, name of the table
-
-             usage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
-        """
-        super().__init__(**kwargs)
-        self.usage = None
-        if self._do_init:
-            self.name = name or ""
-            self.table_name = _table_name_check(table_name)
-            self.set_range(crange or "")
-            self.set_usage(usage)
-        cell_range_address = self.get_attribute_string("table:cell-range-address") or ""
-        if not cell_range_address:
-            self.table_name = ""
-            self.start = None
-            self.end = None
-            self.crange = None
-            self.usage = None
-            return
-        self.usage = self.get_attribute("table:range-usable-as")
-        name_range = cell_range_address.replace("$", "")
-        name, crange = name_range.split(".", 1)
-        if name.startswith("'") and name.endswith("'"):
-            name = name[1:-1]
-        self.table_name = name
-        crange = crange.replace(".", "")
-        self._set_range(crange)
-
-    def set_usage(self, usage: str | None = None) -> None:
-        """Set the usage of the Named Range. Usage can be None (default) or one
-        of :
-            'print-range'
-            'filter'
-            'repeat-column'
-            'repeat-row'
-
-        Arguments:
-
-            usage -- None or str
-        """
-        if usage is not None:
-            usage = usage.strip().lower()
-            if usage not in ("print-range", "filter", "repeat-column", "repeat-row"):
-                usage = None
-        if usage is None:
-            with contextlib.suppress(KeyError):
-                self.del_attribute("table:range-usable-as")
-            self.usage = None
-        else:
-            self.set_attribute("table:range-usable-as", usage)
-            self.usage = usage
-
-    @property
-    def name(self) -> str | None:
-        """Get / set the name of the table."""
-        return self.get_attribute_string("table:name")
-
-    @name.setter
-    def name(self, name: str) -> None:
-        """Set the name of the Named Range. The name is mandatory, if a Named
-        Range of the same name exists, it will be replaced. Name must contains
-        only alphanumerics characters and '_', and can not be of a cell
-        coordinates form like 'AB12'.
-
-        Arguments:
-
-            name -- str
-        """
-        name = name.strip()
-        if not name:
-            raise ValueError("Name required.")
-        for x in name:
-            if x in forbidden_in_named_range():
-                raise ValueError(f"Character forbidden '{x}' ")
-        step = ""
-        for x in name:
-            if x in string.ascii_letters and step in ("", "A"):
-                step = "A"
-                continue
-            elif step in ("A", "A1") and x in string.digits:
-                step = "A1"
-                continue
-            else:
-                step = ""
-                break
-        if step == "A1":
-            raise ValueError("Name of the type 'ABC123' is not allowed.")
-        with contextlib.suppress(Exception):
-            # we are not on an inserted in a document.
-            body = self.document_body
-            named_range = body.get_named_range(name)  # type: ignore
-            if named_range:
-                named_range.delete()
-        self.set_attribute("table:name", name)
-
-    def set_table_name(self, name: str) -> None:
-        """Set the name of the table of the Named Range. The name is mandatory.
-
-        Arguments:
-
-            name -- str
-        """
-        self.table_name = _table_name_check(name)
-        self._update_attributes()
-
-    def _set_range(self, coord: tuple | list | str) -> None:
-        digits = convert_coordinates(coord)
-        if len(digits) == 4:
-            x, y, z, t = digits
-        else:
-            x, y = digits
-            z, t = digits
-        self.start = x, y  # type: ignore
-        self.end = z, t  # type: ignore
-        self.crange = x, y, z, t  # type: ignore
-
-    def set_range(self, crange: str | tuple | list) -> None:
-        """Set the range of the named range. Range can be either one cell
-        (like 'A1') or an area ('A1:B2'). It can be provided as an alpha numeric
-        value like "A1:B2' or a tuple like (0, 0, 1, 1) or (0, 0).
-
-        Arguments:
-
-            crange -- str or tuple of int, cell or area coordinate
-        """
-        self._set_range(crange)
-        self._update_attributes()
-
-    def _update_attributes(self) -> None:
-        self.set_attribute("table:base-cell-address", self._make_base_cell_address())
-        self.set_attribute("table:cell-range-address", self._make_cell_range_address())
-
-    def _make_base_cell_address(self) -> str:
-        # assuming we got table_name and range
-        if " " in self.table_name:
-            name = f"'{self.table_name}'"
-        else:
-            name = self.table_name
-        return f"${name}.${digit_to_alpha(self.start[0])}${self.start[1] + 1}"  # type: ignore
-
-    def _make_cell_range_address(self) -> str:
-        # assuming we got table_name and range
-        if " " in self.table_name:
-            name = f"'{self.table_name}'"
-        else:
-            name = self.table_name
-        if self.start == self.end:
-            return self._make_base_cell_address()
-        return (
-            f"${name}.${digit_to_alpha(self.start[0])}${self.start[1] + 1}:"  # type: ignore
-            f".${digit_to_alpha(self.end[0])}${self.end[1] + 1}"  # type: ignore
-        )
-
-    def get_values(
-        self,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-        flat: bool = False,
-    ) -> list:
-        """Shortcut to retrieve the values of the cells of the named range. See
-        table.get_values() for the arguments description and return format.
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        table = body.get_table(name=self.table_name)
-        if table is None:
-            raise ValueError
-        return table.get_values(self.crange, cell_type, complete, get_type, flat)  # type: ignore
-
-    def get_value(self, get_type: bool = False) -> Any:
-        """Shortcut to retrieve the value of the first cell of the named range.
-        See table.get_value() for the arguments description and return format.
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        table = body.get_table(name=self.table_name)
-        if table is None:
-            raise ValueError
-        return table.get_value(self.start, get_type)  # type: ignore
-
-    def set_values(
-        self,
-        values: list,
-        style: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-    ) -> None:
-        """Shortcut to set the values of the cells of the named range.
-        See table.set_values() for the arguments description.
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        table = body.get_table(name=self.table_name)
-        if table is None:
-            raise ValueError
-        table.set_values(  # type: ignore
-            values,
-            coord=self.crange,
-            style=style,
-            cell_type=cell_type,
-            currency=currency,
-        )
-
-    def set_value(
-        self,
-        value: Any,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        style: str | None = None,
-    ) -> None:
-        """Shortcut to set the value of the first cell of the named range.
-        See table.set_value() for the arguments description.
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        table = body.get_table(name=self.table_name)
-        if table is None:
-            raise ValueError
-        table.set_value(  # type: ignore
-            coord=self.start,
-            value=value,
-            cell_type=cell_type,
-            currency=currency,
-            style=style,
-        )
-
-

Ancestors

- -

Instance variables

-
-
var name : str | None
-
-

Get / set the name of the table.

-
- -Expand source code - -
@property
-def name(self) -> str | None:
-    """Get / set the name of the table."""
-    return self.get_attribute_string("table:name")
-
-
-
-

Methods

-
-
-def get_value(self, get_type: bool = False) ‑> Any -
-
-

Shortcut to retrieve the value of the first cell of the named range. -See table.get_value() for the arguments description and return format.

-
- -Expand source code - -
def get_value(self, get_type: bool = False) -> Any:
-    """Shortcut to retrieve the value of the first cell of the named range.
-    See table.get_value() for the arguments description and return format.
-    """
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document.")
-    table = body.get_table(name=self.table_name)
-    if table is None:
-        raise ValueError
-    return table.get_value(self.start, get_type)  # type: ignore
-
-
-
-def get_values(self, cell_type: str | None = None, complete: bool = True, get_type: bool = False, flat: bool = False) ‑> odfdo.list -
-
-

Shortcut to retrieve the values of the cells of the named range. See -table.get_values() for the arguments description and return format.

-
- -Expand source code - -
def get_values(
-    self,
-    cell_type: str | None = None,
-    complete: bool = True,
-    get_type: bool = False,
-    flat: bool = False,
-) -> list:
-    """Shortcut to retrieve the values of the cells of the named range. See
-    table.get_values() for the arguments description and return format.
-    """
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document.")
-    table = body.get_table(name=self.table_name)
-    if table is None:
-        raise ValueError
-    return table.get_values(self.crange, cell_type, complete, get_type, flat)  # type: ignore
-
-
-
-def set_range(self, crange: str | tuple | odfdo.list) ‑> None -
-
-

Set the range of the named range. Range can be either one cell -(like 'A1') or an area ('A1:B2'). It can be provided as an alpha numeric -value like "A1:B2' or a tuple like (0, 0, 1, 1) or (0, 0).

-

Arguments

-

crange – str or tuple of int, cell or area coordinate

-
- -Expand source code - -
def set_range(self, crange: str | tuple | list) -> None:
-    """Set the range of the named range. Range can be either one cell
-    (like 'A1') or an area ('A1:B2'). It can be provided as an alpha numeric
-    value like "A1:B2' or a tuple like (0, 0, 1, 1) or (0, 0).
-
-    Arguments:
-
-        crange -- str or tuple of int, cell or area coordinate
-    """
-    self._set_range(crange)
-    self._update_attributes()
-
-
-
-def set_table_name(self, name: str) ‑> None -
-
-

Set the name of the table of the Named Range. The name is mandatory.

-

Arguments

-

name – str

-
- -Expand source code - -
def set_table_name(self, name: str) -> None:
-    """Set the name of the table of the Named Range. The name is mandatory.
-
-    Arguments:
-
-        name -- str
-    """
-    self.table_name = _table_name_check(name)
-    self._update_attributes()
-
-
-
-def set_usage(self, usage: str | None = None) ‑> None -
-
-

Set the usage of the Named Range. Usage can be None (default) or one -of : -'print-range' -'filter' -'repeat-column' -'repeat-row'

-

Arguments

-

usage – None or str

-
- -Expand source code - -
def set_usage(self, usage: str | None = None) -> None:
-    """Set the usage of the Named Range. Usage can be None (default) or one
-    of :
-        'print-range'
-        'filter'
-        'repeat-column'
-        'repeat-row'
-
-    Arguments:
-
-        usage -- None or str
-    """
-    if usage is not None:
-        usage = usage.strip().lower()
-        if usage not in ("print-range", "filter", "repeat-column", "repeat-row"):
-            usage = None
-    if usage is None:
-        with contextlib.suppress(KeyError):
-            self.del_attribute("table:range-usable-as")
-        self.usage = None
-    else:
-        self.set_attribute("table:range-usable-as", usage)
-        self.usage = usage
-
-
-
-def set_value(self, value: Any, cell_type: str | None = None, currency: str | None = None, style: str | None = None) ‑> None -
-
-

Shortcut to set the value of the first cell of the named range. -See table.set_value() for the arguments description.

-
- -Expand source code - -
def set_value(
-    self,
-    value: Any,
-    cell_type: str | None = None,
-    currency: str | None = None,
-    style: str | None = None,
-) -> None:
-    """Shortcut to set the value of the first cell of the named range.
-    See table.set_value() for the arguments description.
-    """
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document.")
-    table = body.get_table(name=self.table_name)
-    if table is None:
-        raise ValueError
-    table.set_value(  # type: ignore
-        coord=self.start,
-        value=value,
-        cell_type=cell_type,
-        currency=currency,
-        style=style,
-    )
-
-
-
-def set_values(self, values: odfdo.list, style: str | None = None, cell_type: str | None = None, currency: str | None = None) ‑> None -
-
-

Shortcut to set the values of the cells of the named range. -See table.set_values() for the arguments description.

-
- -Expand source code - -
def set_values(
-    self,
-    values: list,
-    style: str | None = None,
-    cell_type: str | None = None,
-    currency: str | None = None,
-) -> None:
-    """Shortcut to set the values of the cells of the named range.
-    See table.set_values() for the arguments description.
-    """
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document.")
-    table = body.get_table(name=self.table_name)
-    if table is None:
-        raise ValueError
-    table.set_values(  # type: ignore
-        values,
-        coord=self.crange,
-        style=style,
-        cell_type=cell_type,
-        currency=currency,
-    )
-
-
-
-

Inherited members

- -
-
-class Note -(note_class: str = 'footnote', note_id: str | None = None, citation: str | None = None, body: str | None = None, **kwargs: Any) -
-
-

Either a footnote or a endnote element with the given text, -optionally referencing it using the given note_id.

-

Arguments

-

note_class – 'footnote' or 'endnote'

-

note_id – str

-

citation – str

-

body – str or Element

-
- -Expand source code - -
class Note(Element):
-    """Either a footnote or a endnote element with the given text,
-    optionally referencing it using the given note_id.
-
-    Arguments:
-
-        note_class -- 'footnote' or 'endnote'
-
-        note_id -- str
-
-        citation -- str
-
-        body -- str or Element
-    """
-
-    _tag = "text:note"
-    _properties = (
-        PropDef("note_class", "text:note-class"),
-        PropDef("note_id", "text:id"),
-    )
-
-    def __init__(
-        self,
-        note_class: str = "footnote",
-        note_id: str | None = None,
-        citation: str | None = None,
-        body: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.insert(Element.from_tag("text:note-body"), position=0)
-            self.insert(Element.from_tag("text:note-citation"), position=0)
-            self.note_class = note_class
-            if note_id is not None:
-                self.note_id = note_id
-            if citation is not None:
-                self.citation = citation
-            if body is not None:
-                self.note_body = body
-
-    @property
-    def citation(self) -> str:
-        note_citation = self.get_element("text:note-citation")
-        if note_citation:
-            return note_citation.text
-        return ""
-
-    @citation.setter
-    def citation(self, text: str | None) -> None:
-        note_citation = self.get_element("text:note-citation")
-        if note_citation:
-            note_citation.text = text  # type:ignore
-
-    @property
-    def note_body(self) -> str:
-        note_body = self.get_element("text:note-body")
-        if note_body:
-            return note_body.text_content
-        return ""
-
-    @note_body.setter
-    def note_body(self, text_or_element: Element | str | None) -> None:
-        note_body = self.get_element("text:note-body")
-        if not note_body:
-            return None
-        if text_or_element is None:
-            note_body.text_content = ""
-        elif isinstance(text_or_element, str):
-            note_body.text_content = text_or_element
-        elif isinstance(text_or_element, Element):
-            note_body.clear()
-            note_body.append(text_or_element)
-        else:
-            raise TypeError(f'Unexpected type for body: "{type(text_or_element)}"')
-
-    def check_validity(self) -> None:
-        if not self.note_class:
-            raise ValueError('Note class must be "footnote" or "endnote"')
-        if not self.note_id:
-            raise ValueError("Note must have an id")
-        if not self.citation:
-            raise ValueError("Note must have a citation")
-        if not self.note_body:
-            pass
-
-

Ancestors

- -

Instance variables

-
-
var citation : str
-
-
-
- -Expand source code - -
@property
-def citation(self) -> str:
-    note_citation = self.get_element("text:note-citation")
-    if note_citation:
-        return note_citation.text
-    return ""
-
-
-
var note_body : str
-
-
-
- -Expand source code - -
@property
-def note_body(self) -> str:
-    note_body = self.get_element("text:note-body")
-    if note_body:
-        return note_body.text_content
-    return ""
-
-
-
var note_class : str | bool | None
-
-

Get/set the attribute text:note-class

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var note_id : str | bool | None
-
-

Get/set the attribute text:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def check_validity(self) ‑> None -
-
-
-
- -Expand source code - -
def check_validity(self) -> None:
-    if not self.note_class:
-        raise ValueError('Note class must be "footnote" or "endnote"')
-    if not self.note_id:
-        raise ValueError("Note must have an id")
-    if not self.citation:
-        raise ValueError("Note must have a citation")
-    if not self.note_body:
-        pass
-
-
-
-

Inherited members

- -
-
-class Paragraph -(text_or_element: str | Element | None = None, style: str | None = None, **kwargs: Any) -
-
-

Specialised element for paragraphs "text:p". The "text:p" element -represents a paragraph, which is the basic unit of text in an OpenDocument -file.

-

Create a paragraph element of the given style containing the optional -given text.

-

Arguments

-

text – str or Element

-

style – str

-
- -Expand source code - -
class Paragraph(ParagraphBase):
-    """Specialised element for paragraphs "text:p". The "text:p" element
-    represents a paragraph, which is the basic unit of text in an OpenDocument
-    file.
-    """
-
-    _tag = "text:p"
-
-    def __init__(
-        self,
-        text_or_element: str | Element | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ):
-        """Create a paragraph element of the given style containing the optional
-        given text.
-
-        Arguments:
-
-            text -- str or Element
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if isinstance(text_or_element, Element):
-                self.append(text_or_element)
-            else:
-                self.text = text_or_element  # type:ignore
-            if style is not None:
-                self.style = style
-
-    def insert_note(
-        self,
-        note_element: Note | None = None,
-        after: str | Element | None = None,
-        note_class: str = "footnote",
-        note_id: str | None = None,
-        citation: str | None = None,
-        body: str | None = None,
-    ) -> None:
-        if note_element is None:
-            note_element = Note(
-                note_class=note_class, note_id=note_id, citation=citation, body=body
-            )
-        else:
-            # XXX clone or modify the argument?
-            if note_class:
-                note_element.note_class = note_class
-            if note_id:
-                note_element.note_id = note_id
-            if citation:
-                note_element.citation = citation
-            if body:
-                note_element.note_body = body
-        note_element.check_validity()
-        if isinstance(after, str):
-            self._insert(note_element, after=after, main_text=True)
-        elif isinstance(after, Element):
-            after.insert(note_element, FIRST_CHILD)
-        else:
-            self.insert(note_element, FIRST_CHILD)
-
-    def insert_annotation(  # noqa: C901
-        self,
-        annotation_element: Annotation | None = None,
-        before: str | None = None,
-        after: str | Element | None = None,
-        position: int | tuple = 0,
-        content: str | Element | None = None,
-        body: str | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-    ) -> Annotation:
-        """Insert an annotation, at the position defined by the regex (before,
-        after, content) or by positionnal argument (position). If content is
-        provided, the annotation covers the full content regex. Else, the
-        annotation is positionned either 'before' or 'after' provided regex.
-
-        If content is an odf element (ie: paragraph, span, ...), the full inner
-        content is covered by the annotation (of the position just after if
-        content is a single empty tag).
-
-        If content/before or after exists (regex) and return a group of matching
-        positions, the position value is the index of matching place to use.
-
-        annotation_element can contain a previously created annotation, else
-        the annotation is created from the body, creator and optional date
-        (current date by default).
-
-        Arguments:
-
-            annotation_element -- Annotation or None
-
-            before -- str regular expression or None
-
-            after -- str regular expression or Element or None
-
-            content -- str regular expression or None, or Element
-
-            position -- int or tuple of int
-
-            body -- str or Element
-
-            creator -- str
-
-            date -- datetime
-        """
-
-        if annotation_element is None:
-            annotation_element = Annotation(
-                text_or_element=body, creator=creator, date=date, parent=self
-            )
-        else:
-            # XXX clone or modify the argument?
-            if body:
-                annotation_element.note_body = body
-            if creator:
-                annotation_element.dc_creator = creator
-            if date:
-                annotation_element.dc_date = date
-        annotation_element.check_validity()
-
-        # special case: content is an odf element (ie: a paragraph)
-        if isinstance(content, Element):
-            if content.is_empty():
-                content.insert(annotation_element, xmlposition=NEXT_SIBLING)
-                return annotation_element
-            content.insert(annotation_element, start=True)
-            annotation_end = AnnotationEnd(annotation_element)
-            content.append(annotation_end)
-            return annotation_element
-
-        # special case
-        if isinstance(after, Element):
-            after.insert(annotation_element, FIRST_CHILD)
-            return annotation_element
-
-        # With "content" => automatically insert a "start" and an "end"
-        # bookmark
-        if (
-            before is None
-            and after is None
-            and content is not None
-            and isinstance(position, int)
-        ):
-            # Start tag
-            self._insert(
-                annotation_element, before=content, position=position, main_text=True
-            )
-            # End tag
-            annotation_end = AnnotationEnd(annotation_element)
-            self._insert(
-                annotation_end, after=content, position=position, main_text=True
-            )
-            return annotation_element
-
-        # With "(int, int)" =>  automatically insert a "start" and an "end"
-        # bookmark
-        if (
-            before is None
-            and after is None
-            and content is None
-            and isinstance(position, tuple)
-        ):
-            # Start
-            self._insert(annotation_element, position=position[0], main_text=True)
-            # End
-            annotation_end = AnnotationEnd(annotation_element)
-            self._insert(annotation_end, position=position[1], main_text=True)
-            return annotation_element
-
-        # Without "content" nor "position"
-        if content is not None or not isinstance(position, int):
-            raise ValueError("Bad arguments")
-
-        # Insert
-        self._insert(
-            annotation_element,
-            before=before,
-            after=after,
-            position=position,
-            main_text=True,
-        )
-        return annotation_element
-
-    def insert_annotation_end(
-        self,
-        annotation_element: Annotation,
-        before: str | None = None,
-        after: str | None = None,
-        position: int = 0,
-    ) -> AnnotationEnd:
-        """Insert an annotation end tag for an existing annotation. If some end
-        tag already exists, replace it. Annotation end tag is set at the
-        position defined by the regex (before or after).
-
-        If content/before or after (regex) returns a group of matching
-        positions, the position value is the index of matching place to use.
-
-        Arguments:
-
-            annotation_element -- Annotation (mandatory)
-
-            before -- str regular expression or None
-
-            after -- str regular expression or None
-
-            position -- int
-        """
-
-        if annotation_element is None:
-            raise ValueError
-        if not isinstance(annotation_element, Annotation):
-            raise TypeError("Not a <office:annotation> Annotation")
-
-        # remove existing end tag
-        name = annotation_element.name
-        existing_end_tag = self.get_annotation_end(name=name)
-        if existing_end_tag:
-            existing_end_tag.delete()
-
-        # create the end tag
-        end_tag = AnnotationEnd(annotation_element)
-
-        # Insert
-        self._insert(
-            end_tag, before=before, after=after, position=position, main_text=True
-        )
-        return end_tag
-
-    def set_reference_mark(
-        self,
-        name: str,
-        before: str | None = None,
-        after: str | None = None,
-        position: int = 0,
-        content: str | Element | None = None,
-    ) -> Element:
-        """Insert a reference mark, at the position defined by the regex
-        (before, after, content) or by positionnal argument (position). If
-        content is provided, the annotation covers the full range content regex
-        (instances of ReferenceMarkStart and ReferenceMarkEnd are
-        created). Else, an instance of ReferenceMark is positionned either
-        'before' or 'after' provided regex.
-
-        If content is an ODF Element (ie: Paragraph, Span, ...), the full inner
-        content is referenced (of the position just after if content is a single
-        empty tag).
-
-        If content/before or after exists (regex) and return a group of matching
-        positions, the position value is the index of matching place to use.
-
-        Name is mandatory and shall be unique in the document for the preference
-        mark range.
-
-        Arguments:
-
-            name -- str
-
-            before -- str regular expression or None
-
-            after -- str regular expression or None,
-
-            content -- str regular expression or None, or Element
-
-            position -- int or tuple of int
-
-        Return: the created ReferenceMark or ReferenceMarkStart
-        """
-        # special case: content is an odf element (ie: a paragraph)
-        if isinstance(content, Element):
-            if content.is_empty():
-                reference = ReferenceMark(name)
-                content.insert(reference, xmlposition=NEXT_SIBLING)
-                return reference
-            reference_start = ReferenceMarkStart(name)
-            content.insert(reference_start, start=True)
-            reference_end = ReferenceMarkEnd(name)
-            content.append(reference_end)
-            return reference_start
-
-        # With "content" => automatically insert a "start" and an "end"
-        # reference
-        if (
-            before is None
-            and after is None
-            and content is not None
-            and isinstance(position, int)
-        ):
-            # Start tag
-            reference_start = ReferenceMarkStart(name)
-            self._insert(
-                reference_start, before=content, position=position, main_text=True
-            )
-            # End tag
-            reference_end = ReferenceMarkEnd(name)
-            self._insert(
-                reference_end, after=content, position=position, main_text=True
-            )
-            return reference_start
-
-        # With "(int, int)" =>  automatically insert a "start" and an "end"
-        if (
-            before is None
-            and after is None
-            and content is None
-            and isinstance(position, tuple)
-        ):
-            # Start
-            reference_start = ReferenceMarkStart(name)
-            self._insert(reference_start, position=position[0], main_text=True)
-            # End
-            reference_end = ReferenceMarkEnd(name)
-            self._insert(reference_end, position=position[1], main_text=True)
-            return reference_start
-
-        # Without "content" nor "position"
-        if content is not None or not isinstance(position, int):
-            raise ValueError("bad arguments")
-
-        # Insert a positional reference mark
-        reference = ReferenceMark(name)
-        self._insert(
-            reference,
-            before=before,
-            after=after,
-            position=position,
-            main_text=True,
-        )
-        return reference
-
-    def set_reference_mark_end(
-        self,
-        reference_mark: Element,
-        before: str | None = None,
-        after: str | None = None,
-        position: int = 0,
-    ) -> ReferenceMarkEnd:
-        """Insert/move a ReferenceMarkEnd for an existing reference mark. If
-        some end tag already exists, replace it. Reference tag is set at the
-        position defined by the regex (before or after).
-
-        If content/before or after (regex) returns a group of matching
-        positions, the position value is the index of matching place to use.
-
-        Arguments:
-
-            reference_mark -- ReferenceMark or ReferenceMarkStart (mandatory)
-
-            before -- str regular expression or None
-
-            after -- str regular expression or None
-
-            position -- int
-        """
-        if not isinstance(reference_mark, (ReferenceMark, ReferenceMarkStart)):
-            raise TypeError("Not a ReferenceMark or ReferenceMarkStart")
-        name = reference_mark.name
-        if isinstance(reference_mark, ReferenceMark):
-            # change it to a range reference:
-            reference_mark.tag = ReferenceMarkStart._tag
-
-        existing_end_tag = self.get_reference_mark_end(name=name)
-        if existing_end_tag:
-            existing_end_tag.delete()
-
-        # create the end tag
-        end_tag = ReferenceMarkEnd(name)
-
-        # Insert
-        self._insert(
-            end_tag, before=before, after=after, position=position, main_text=True
-        )
-        return end_tag
-
-    def insert_variable(self, variable_element: Element, after: str | None) -> None:
-        self._insert(variable_element, after=after, main_text=True)
-
-    @_by_regex_offset
-    def set_span(
-        self,
-        match: str,
-        tail: str,
-        style: str,
-        regex: str | None = None,
-        offset: int | None = None,
-        length: int = 0,
-    ) -> Span:
-        """
-        set_span(style, regex=None, offset=None, length=0)
-        Apply the given style to text content matching the regex OR the
-        positional arguments offset and length.
-
-        (match, tail: provided by regex decorator)
-
-        Arguments:
-
-            style -- str
-
-            regex -- str regular expression
-
-            offset -- int
-
-            length -- int
-        """
-        span = Span(match, style=style)
-        span.tail = tail
-        return span
-
-    def remove_spans(self, keep_heading: bool = True) -> Element | list:
-        """Send back a copy of the element, without span styles.
-        If keep_heading is True (default), the first level heading style is left
-        unchanged.
-        """
-        strip = (Span._tag,)
-        if keep_heading:
-            protect = ("text:h",)
-        else:
-            protect = None
-        return self.strip_tags(strip=strip, protect=protect)
-
-    def remove_span(self, spans: Element | list[Element]) -> Element | list:
-        """Send back a copy of the element, the spans (not a clone) removed.
-
-        Arguments:
-
-            spans -- Element or list of Element
-        """
-        return self.strip_elements(spans)
-
-    @_by_regex_offset
-    def set_link(
-        self,
-        match: str,
-        tail: str,
-        url: str,
-        regex: str | None = None,
-        offset: int | None = None,
-        length: int = 0,
-    ) -> Element:
-        """
-        set_link(url, regex=None, offset=None, length=0)
-        Make a link to the provided url from text content matching the regex
-        OR the positional arguments offset and length.
-
-        (match, tail: provided by regex decorator)
-
-        Arguments:
-
-            url -- str
-
-            regex -- str regular expression
-
-            offset -- int
-
-            length -- int
-        """
-        link = Link(url, text=match)
-        link.tail = tail
-        return link
-
-    def remove_links(self) -> Element | list:
-        """Send back a copy of the element, without links tags."""
-        strip = (Link._tag,)
-        return self.strip_tags(strip=strip)
-
-    def remove_link(self, links: Link | list[Link]) -> Element | list:
-        """Send back a copy of the element (not a clone), with the sub links
-           removed.
-
-        Arguments:
-
-            links -- Link or list of Link
-        """
-        return self.strip_elements(links)
-
-    def insert_reference(
-        self,
-        name: str,
-        ref_format: str = "",
-        before: str | None = None,
-        after: str | Element | None = None,
-        position: int = 0,
-        display: str | None = None,
-    ) -> None:
-        """Create and insert a reference to a content marked by a reference
-        mark. The Reference element ("text:reference-ref") represents a
-        field that references a "text:reference-mark-start" or
-        "text:reference-mark" element. Its "text:reference-format" attribute
-        specifies what is displayed from the referenced element. Default is
-        'page'. Actual content is not automatically updated except for the 'text'
-        format.
-
-        name is mandatory and should represent an existing reference mark of the
-        document.
-
-        ref_format is the argument for format reference (default is 'page').
-
-        The reference is inserted the position defined by the regex (before /
-        after), or by positionnal argument (position). If 'display' is provided,
-        it will be used as the text value for the reference.
-
-        If after is an ODF Element, the reference is inserted as first child of
-        this element.
-
-        Arguments:
-
-            name -- str
-
-            ref_format -- one of : 'chapter', 'direction', 'page', 'text',
-                                    'caption', 'category-and-value', 'value',
-                                    'number', 'number-all-superior',
-                                    'number-no-superior'
-
-            before -- str regular expression or None
-
-            after -- str regular expression or odf element or None
-
-            position -- int
-
-            display -- str or None
-        """
-        reference = Reference(name, ref_format)
-        if display is None and ref_format == "text":
-            # get reference content
-            body = self.document_body
-            if not body:
-                body = self.root
-            mark = body.get_reference_mark(name=name)
-            if mark:
-                display = mark.referenced_text  # type: ignore
-        if not display:
-            display = " "
-        reference.text = display
-        if isinstance(after, Element):
-            after.insert(reference, FIRST_CHILD)
-        else:
-            self._insert(
-                reference, before=before, after=after, position=position, main_text=True
-            )
-
-    def set_bookmark(
-        self,
-        name: str,
-        before: str | None = None,
-        after: str | None = None,
-        position: int | tuple = 0,
-        role: str | None = None,
-        content: str | None = None,
-    ) -> Element | tuple[Element, Element]:
-        """Insert a bookmark before or after the characters in the text which
-        match the regex before/after. When the regex matches more of one part
-        of the text, position can be set to choose which part must be used.
-        If before and after are None, we use only position that is the number
-        of characters.
-
-        So, by default, this function inserts a bookmark before the first
-        character of the content. Role can be None, "start" or "end", we
-        insert respectively a position bookmark a bookmark-start or a
-        bookmark-end.
-
-        If content is not None these 2 calls are equivalent:
-
-          paragraph.set_bookmark("bookmark", content="xyz")
-
-        and:
-
-          paragraph.set_bookmark("bookmark", before="xyz", role="start")
-          paragraph.set_bookmark("bookmark", after="xyz", role="end")
-
-
-        If position is a 2-tuple, these 2 calls are equivalent:
-
-          paragraph.set_bookmark("bookmark", position=(10, 20))
-
-        and:
-
-          paragraph.set_bookmark("bookmark", position=10, role="start")
-          paragraph.set_bookmark("bookmark", position=20, role="end")
-
-
-        Arguments:
-
-            name -- str
-
-            before -- str regex
-
-            after -- str regex
-
-            position -- int or (int, int)
-
-            role -- None, "start" or "end"
-
-            content -- str regex
-        """
-        # With "content" => automatically insert a "start" and an "end"
-        # bookmark
-        if (
-            before is None
-            and after is None
-            and role is None
-            and content is not None
-            and isinstance(position, int)
-        ):
-            # Start
-            start = BookmarkStart(name)
-            self._insert(start, before=content, position=position, main_text=True)
-            # End
-            end = BookmarkEnd(name)
-            self._insert(end, after=content, position=position, main_text=True)
-            return start, end
-
-        # With "(int, int)" =>  automatically insert a "start" and an "end"
-        # bookmark
-        if (
-            before is None
-            and after is None
-            and role is None
-            and content is None
-            and isinstance(position, tuple)
-        ):
-            # Start
-            start = BookmarkStart(name)
-            self._insert(start, position=position[0], main_text=True)
-            # End
-            end = BookmarkEnd(name)
-            self._insert(end, position=position[1], main_text=True)
-            return start, end
-
-        # Without "content" nor "position"
-        if content is not None or not isinstance(position, int):
-            raise ValueError("bad arguments")
-
-        # Role
-        if role is None:
-            bookmark: Element = Bookmark(name)
-        elif role == "start":
-            bookmark = BookmarkStart(name)
-        elif role == "end":
-            bookmark = BookmarkEnd(name)
-        else:
-            raise ValueError("bad arguments")
-
-        # Insert
-        self._insert(
-            bookmark, before=before, after=after, position=position, main_text=True
-        )
-
-        return bookmark
-
-

Ancestors

- -

Subclasses

- -

Methods

-
-
-def insert_annotation(self, annotation_element: Annotation | None = None, before: str | None = None, after: str | Element | None = None, position: int | tuple = 0, content: str | Element | None = None, body: str | None = None, creator: str | None = None, date: datetime | None = None) ‑> Annotation -
-
-

Insert an annotation, at the position defined by the regex (before, -after, content) or by positionnal argument (position). If content is -provided, the annotation covers the full content regex. Else, the -annotation is positionned either 'before' or 'after' provided regex.

-

If content is an odf element (ie: paragraph, span, …), the full inner -content is covered by the annotation (of the position just after if -content is a single empty tag).

-

If content/before or after exists (regex) and return a group of matching -positions, the position value is the index of matching place to use.

-

annotation_element can contain a previously created annotation, else -the annotation is created from the body, creator and optional date -(current date by default).

-

Arguments

-

annotation_element – Annotation or None

-

before – str regular expression or None

-

after – str regular expression or Element or None

-

content – str regular expression or None, or Element

-

position – int or tuple of int

-

body – str or Element

-

creator – str

-

date – datetime

-
- -Expand source code - -
def insert_annotation(  # noqa: C901
-    self,
-    annotation_element: Annotation | None = None,
-    before: str | None = None,
-    after: str | Element | None = None,
-    position: int | tuple = 0,
-    content: str | Element | None = None,
-    body: str | None = None,
-    creator: str | None = None,
-    date: datetime | None = None,
-) -> Annotation:
-    """Insert an annotation, at the position defined by the regex (before,
-    after, content) or by positionnal argument (position). If content is
-    provided, the annotation covers the full content regex. Else, the
-    annotation is positionned either 'before' or 'after' provided regex.
-
-    If content is an odf element (ie: paragraph, span, ...), the full inner
-    content is covered by the annotation (of the position just after if
-    content is a single empty tag).
-
-    If content/before or after exists (regex) and return a group of matching
-    positions, the position value is the index of matching place to use.
-
-    annotation_element can contain a previously created annotation, else
-    the annotation is created from the body, creator and optional date
-    (current date by default).
-
-    Arguments:
-
-        annotation_element -- Annotation or None
-
-        before -- str regular expression or None
-
-        after -- str regular expression or Element or None
-
-        content -- str regular expression or None, or Element
-
-        position -- int or tuple of int
-
-        body -- str or Element
-
-        creator -- str
-
-        date -- datetime
-    """
-
-    if annotation_element is None:
-        annotation_element = Annotation(
-            text_or_element=body, creator=creator, date=date, parent=self
-        )
-    else:
-        # XXX clone or modify the argument?
-        if body:
-            annotation_element.note_body = body
-        if creator:
-            annotation_element.dc_creator = creator
-        if date:
-            annotation_element.dc_date = date
-    annotation_element.check_validity()
-
-    # special case: content is an odf element (ie: a paragraph)
-    if isinstance(content, Element):
-        if content.is_empty():
-            content.insert(annotation_element, xmlposition=NEXT_SIBLING)
-            return annotation_element
-        content.insert(annotation_element, start=True)
-        annotation_end = AnnotationEnd(annotation_element)
-        content.append(annotation_end)
-        return annotation_element
-
-    # special case
-    if isinstance(after, Element):
-        after.insert(annotation_element, FIRST_CHILD)
-        return annotation_element
-
-    # With "content" => automatically insert a "start" and an "end"
-    # bookmark
-    if (
-        before is None
-        and after is None
-        and content is not None
-        and isinstance(position, int)
-    ):
-        # Start tag
-        self._insert(
-            annotation_element, before=content, position=position, main_text=True
-        )
-        # End tag
-        annotation_end = AnnotationEnd(annotation_element)
-        self._insert(
-            annotation_end, after=content, position=position, main_text=True
-        )
-        return annotation_element
-
-    # With "(int, int)" =>  automatically insert a "start" and an "end"
-    # bookmark
-    if (
-        before is None
-        and after is None
-        and content is None
-        and isinstance(position, tuple)
-    ):
-        # Start
-        self._insert(annotation_element, position=position[0], main_text=True)
-        # End
-        annotation_end = AnnotationEnd(annotation_element)
-        self._insert(annotation_end, position=position[1], main_text=True)
-        return annotation_element
-
-    # Without "content" nor "position"
-    if content is not None or not isinstance(position, int):
-        raise ValueError("Bad arguments")
-
-    # Insert
-    self._insert(
-        annotation_element,
-        before=before,
-        after=after,
-        position=position,
-        main_text=True,
-    )
-    return annotation_element
-
-
-
-def insert_annotation_end(self, annotation_element: Annotation, before: str | None = None, after: str | None = None, position: int = 0) ‑> AnnotationEnd -
-
-

Insert an annotation end tag for an existing annotation. If some end -tag already exists, replace it. Annotation end tag is set at the -position defined by the regex (before or after).

-

If content/before or after (regex) returns a group of matching -positions, the position value is the index of matching place to use.

-

Arguments

-

annotation_element – Annotation (mandatory)

-

before – str regular expression or None

-

after – str regular expression or None

-

position – int

-
- -Expand source code - -
def insert_annotation_end(
-    self,
-    annotation_element: Annotation,
-    before: str | None = None,
-    after: str | None = None,
-    position: int = 0,
-) -> AnnotationEnd:
-    """Insert an annotation end tag for an existing annotation. If some end
-    tag already exists, replace it. Annotation end tag is set at the
-    position defined by the regex (before or after).
-
-    If content/before or after (regex) returns a group of matching
-    positions, the position value is the index of matching place to use.
-
-    Arguments:
-
-        annotation_element -- Annotation (mandatory)
-
-        before -- str regular expression or None
-
-        after -- str regular expression or None
-
-        position -- int
-    """
-
-    if annotation_element is None:
-        raise ValueError
-    if not isinstance(annotation_element, Annotation):
-        raise TypeError("Not a <office:annotation> Annotation")
-
-    # remove existing end tag
-    name = annotation_element.name
-    existing_end_tag = self.get_annotation_end(name=name)
-    if existing_end_tag:
-        existing_end_tag.delete()
-
-    # create the end tag
-    end_tag = AnnotationEnd(annotation_element)
-
-    # Insert
-    self._insert(
-        end_tag, before=before, after=after, position=position, main_text=True
-    )
-    return end_tag
-
-
-
-def insert_note(self, note_element: Note | None = None, after: str | Element | None = None, note_class: str = 'footnote', note_id: str | None = None, citation: str | None = None, body: str | None = None) ‑> None -
-
-
-
- -Expand source code - -
def insert_note(
-    self,
-    note_element: Note | None = None,
-    after: str | Element | None = None,
-    note_class: str = "footnote",
-    note_id: str | None = None,
-    citation: str | None = None,
-    body: str | None = None,
-) -> None:
-    if note_element is None:
-        note_element = Note(
-            note_class=note_class, note_id=note_id, citation=citation, body=body
-        )
-    else:
-        # XXX clone or modify the argument?
-        if note_class:
-            note_element.note_class = note_class
-        if note_id:
-            note_element.note_id = note_id
-        if citation:
-            note_element.citation = citation
-        if body:
-            note_element.note_body = body
-    note_element.check_validity()
-    if isinstance(after, str):
-        self._insert(note_element, after=after, main_text=True)
-    elif isinstance(after, Element):
-        after.insert(note_element, FIRST_CHILD)
-    else:
-        self.insert(note_element, FIRST_CHILD)
-
-
-
-def insert_reference(self, name: str, ref_format: str = '', before: str | None = None, after: str | Element | None = None, position: int = 0, display: str | None = None) ‑> None -
-
-

Create and insert a reference to a content marked by a reference -mark. The Reference element ("text:reference-ref") represents a -field that references a "text:reference-mark-start" or -"text:reference-mark" element. Its "text:reference-format" attribute -specifies what is displayed from the referenced element. Default is -'page'. Actual content is not automatically updated except for the 'text' -format.

-

name is mandatory and should represent an existing reference mark of the -document.

-

ref_format is the argument for format reference (default is 'page').

-

The reference is inserted the position defined by the regex (before / -after), or by positionnal argument (position). If 'display' is provided, -it will be used as the text value for the reference.

-

If after is an ODF Element, the reference is inserted as first child of -this element.

-

Arguments

-

name – str

-

ref_format – one of : 'chapter', 'direction', 'page', 'text', -'caption', 'category-and-value', 'value', -'number', 'number-all-superior', -'number-no-superior'

-

before – str regular expression or None

-

after – str regular expression or odf element or None

-

position – int

-

display – str or None

-
- -Expand source code - -
def insert_reference(
-    self,
-    name: str,
-    ref_format: str = "",
-    before: str | None = None,
-    after: str | Element | None = None,
-    position: int = 0,
-    display: str | None = None,
-) -> None:
-    """Create and insert a reference to a content marked by a reference
-    mark. The Reference element ("text:reference-ref") represents a
-    field that references a "text:reference-mark-start" or
-    "text:reference-mark" element. Its "text:reference-format" attribute
-    specifies what is displayed from the referenced element. Default is
-    'page'. Actual content is not automatically updated except for the 'text'
-    format.
-
-    name is mandatory and should represent an existing reference mark of the
-    document.
-
-    ref_format is the argument for format reference (default is 'page').
-
-    The reference is inserted the position defined by the regex (before /
-    after), or by positionnal argument (position). If 'display' is provided,
-    it will be used as the text value for the reference.
-
-    If after is an ODF Element, the reference is inserted as first child of
-    this element.
-
-    Arguments:
-
-        name -- str
-
-        ref_format -- one of : 'chapter', 'direction', 'page', 'text',
-                                'caption', 'category-and-value', 'value',
-                                'number', 'number-all-superior',
-                                'number-no-superior'
-
-        before -- str regular expression or None
-
-        after -- str regular expression or odf element or None
-
-        position -- int
-
-        display -- str or None
-    """
-    reference = Reference(name, ref_format)
-    if display is None and ref_format == "text":
-        # get reference content
-        body = self.document_body
-        if not body:
-            body = self.root
-        mark = body.get_reference_mark(name=name)
-        if mark:
-            display = mark.referenced_text  # type: ignore
-    if not display:
-        display = " "
-    reference.text = display
-    if isinstance(after, Element):
-        after.insert(reference, FIRST_CHILD)
-    else:
-        self._insert(
-            reference, before=before, after=after, position=position, main_text=True
-        )
-
-
-
-def insert_variable(self, variable_element: Element, after: str | None) ‑> None -
-
-
-
- -Expand source code - -
def insert_variable(self, variable_element: Element, after: str | None) -> None:
-    self._insert(variable_element, after=after, main_text=True)
-
-
- -
-

Send back a copy of the element (not a clone), with the sub links -removed.

-

Arguments

-

links – Link or list of Link

-
- -Expand source code - -
def remove_link(self, links: Link | list[Link]) -> Element | list:
-    """Send back a copy of the element (not a clone), with the sub links
-       removed.
-
-    Arguments:
-
-        links -- Link or list of Link
-    """
-    return self.strip_elements(links)
-
-
- -
-

Send back a copy of the element, without links tags.

-
- -Expand source code - -
def remove_links(self) -> Element | list:
-    """Send back a copy of the element, without links tags."""
-    strip = (Link._tag,)
-    return self.strip_tags(strip=strip)
-
-
-
-def remove_span(self, spans: Element | odfdo.list[Element]) ‑> Element | odfdo.list -
-
-

Send back a copy of the element, the spans (not a clone) removed.

-

Arguments

-

spans – Element or list of Element

-
- -Expand source code - -
def remove_span(self, spans: Element | list[Element]) -> Element | list:
-    """Send back a copy of the element, the spans (not a clone) removed.
-
-    Arguments:
-
-        spans -- Element or list of Element
-    """
-    return self.strip_elements(spans)
-
-
-
-def remove_spans(self, keep_heading: bool = True) ‑> Element | odfdo.list -
-
-

Send back a copy of the element, without span styles. -If keep_heading is True (default), the first level heading style is left -unchanged.

-
- -Expand source code - -
def remove_spans(self, keep_heading: bool = True) -> Element | list:
-    """Send back a copy of the element, without span styles.
-    If keep_heading is True (default), the first level heading style is left
-    unchanged.
-    """
-    strip = (Span._tag,)
-    if keep_heading:
-        protect = ("text:h",)
-    else:
-        protect = None
-    return self.strip_tags(strip=strip, protect=protect)
-
-
-
-def set_bookmark(self, name: str, before: str | None = None, after: str | None = None, position: int | tuple = 0, role: str | None = None, content: str | None = None) ‑> Element | tuple[ElementElement] -
-
-

Insert a bookmark before or after the characters in the text which -match the regex before/after. When the regex matches more of one part -of the text, position can be set to choose which part must be used. -If before and after are None, we use only position that is the number -of characters.

-

So, by default, this function inserts a bookmark before the first -character of the content. Role can be None, "start" or "end", we -insert respectively a position bookmark a bookmark-start or a -bookmark-end.

-

If content is not None these 2 calls are equivalent:

-

paragraph.set_bookmark("bookmark", content="xyz")

-

and:

-

paragraph.set_bookmark("bookmark", before="xyz", role="start") -paragraph.set_bookmark("bookmark", after="xyz", role="end")

-

If position is a 2-tuple, these 2 calls are equivalent:

-

paragraph.set_bookmark("bookmark", position=(10, 20))

-

and:

-

paragraph.set_bookmark("bookmark", position=10, role="start") -paragraph.set_bookmark("bookmark", position=20, role="end")

-

Arguments

-

name – str

-

before – str regex

-

after – str regex

-

position – int or (int, int)

-

role – None, "start" or "end"

-

content – str regex

-
- -Expand source code - -
def set_bookmark(
-    self,
-    name: str,
-    before: str | None = None,
-    after: str | None = None,
-    position: int | tuple = 0,
-    role: str | None = None,
-    content: str | None = None,
-) -> Element | tuple[Element, Element]:
-    """Insert a bookmark before or after the characters in the text which
-    match the regex before/after. When the regex matches more of one part
-    of the text, position can be set to choose which part must be used.
-    If before and after are None, we use only position that is the number
-    of characters.
-
-    So, by default, this function inserts a bookmark before the first
-    character of the content. Role can be None, "start" or "end", we
-    insert respectively a position bookmark a bookmark-start or a
-    bookmark-end.
-
-    If content is not None these 2 calls are equivalent:
-
-      paragraph.set_bookmark("bookmark", content="xyz")
-
-    and:
-
-      paragraph.set_bookmark("bookmark", before="xyz", role="start")
-      paragraph.set_bookmark("bookmark", after="xyz", role="end")
-
-
-    If position is a 2-tuple, these 2 calls are equivalent:
-
-      paragraph.set_bookmark("bookmark", position=(10, 20))
-
-    and:
-
-      paragraph.set_bookmark("bookmark", position=10, role="start")
-      paragraph.set_bookmark("bookmark", position=20, role="end")
-
-
-    Arguments:
-
-        name -- str
-
-        before -- str regex
-
-        after -- str regex
-
-        position -- int or (int, int)
-
-        role -- None, "start" or "end"
-
-        content -- str regex
-    """
-    # With "content" => automatically insert a "start" and an "end"
-    # bookmark
-    if (
-        before is None
-        and after is None
-        and role is None
-        and content is not None
-        and isinstance(position, int)
-    ):
-        # Start
-        start = BookmarkStart(name)
-        self._insert(start, before=content, position=position, main_text=True)
-        # End
-        end = BookmarkEnd(name)
-        self._insert(end, after=content, position=position, main_text=True)
-        return start, end
-
-    # With "(int, int)" =>  automatically insert a "start" and an "end"
-    # bookmark
-    if (
-        before is None
-        and after is None
-        and role is None
-        and content is None
-        and isinstance(position, tuple)
-    ):
-        # Start
-        start = BookmarkStart(name)
-        self._insert(start, position=position[0], main_text=True)
-        # End
-        end = BookmarkEnd(name)
-        self._insert(end, position=position[1], main_text=True)
-        return start, end
-
-    # Without "content" nor "position"
-    if content is not None or not isinstance(position, int):
-        raise ValueError("bad arguments")
-
-    # Role
-    if role is None:
-        bookmark: Element = Bookmark(name)
-    elif role == "start":
-        bookmark = BookmarkStart(name)
-    elif role == "end":
-        bookmark = BookmarkEnd(name)
-    else:
-        raise ValueError("bad arguments")
-
-    # Insert
-    self._insert(
-        bookmark, before=before, after=after, position=position, main_text=True
-    )
-
-    return bookmark
-
-
- -
-

set_link(url, regex=None, offset=None, length=0) -Make a link to the provided url from text content matching the regex -OR the positional arguments offset and length.

-

(match, tail: provided by regex decorator)

-

Arguments

-

url – str

-

regex – str regular expression

-

offset – int

-

length – int

-
- -Expand source code - -
@_by_regex_offset
-def set_link(
-    self,
-    match: str,
-    tail: str,
-    url: str,
-    regex: str | None = None,
-    offset: int | None = None,
-    length: int = 0,
-) -> Element:
-    """
-    set_link(url, regex=None, offset=None, length=0)
-    Make a link to the provided url from text content matching the regex
-    OR the positional arguments offset and length.
-
-    (match, tail: provided by regex decorator)
-
-    Arguments:
-
-        url -- str
-
-        regex -- str regular expression
-
-        offset -- int
-
-        length -- int
-    """
-    link = Link(url, text=match)
-    link.tail = tail
-    return link
-
-
-
-def set_reference_mark(self, name: str, before: str | None = None, after: str | None = None, position: int = 0, content: str | Element | None = None) ‑> Element -
-
-

Insert a reference mark, at the position defined by the regex -(before, after, content) or by positionnal argument (position). If -content is provided, the annotation covers the full range content regex -(instances of ReferenceMarkStart and ReferenceMarkEnd are -created). Else, an instance of ReferenceMark is positionned either -'before' or 'after' provided regex.

-

If content is an ODF Element (ie: Paragraph, Span, …), the full inner -content is referenced (of the position just after if content is a single -empty tag).

-

If content/before or after exists (regex) and return a group of matching -positions, the position value is the index of matching place to use.

-

Name is mandatory and shall be unique in the document for the preference -mark range.

-

Arguments

-

name – str

-

before – str regular expression or None

-

after – str regular expression or None,

-

content – str regular expression or None, or Element

-

position – int or tuple of int

-

Return: the created ReferenceMark or ReferenceMarkStart

-
- -Expand source code - -
def set_reference_mark(
-    self,
-    name: str,
-    before: str | None = None,
-    after: str | None = None,
-    position: int = 0,
-    content: str | Element | None = None,
-) -> Element:
-    """Insert a reference mark, at the position defined by the regex
-    (before, after, content) or by positionnal argument (position). If
-    content is provided, the annotation covers the full range content regex
-    (instances of ReferenceMarkStart and ReferenceMarkEnd are
-    created). Else, an instance of ReferenceMark is positionned either
-    'before' or 'after' provided regex.
-
-    If content is an ODF Element (ie: Paragraph, Span, ...), the full inner
-    content is referenced (of the position just after if content is a single
-    empty tag).
-
-    If content/before or after exists (regex) and return a group of matching
-    positions, the position value is the index of matching place to use.
-
-    Name is mandatory and shall be unique in the document for the preference
-    mark range.
-
-    Arguments:
-
-        name -- str
-
-        before -- str regular expression or None
-
-        after -- str regular expression or None,
-
-        content -- str regular expression or None, or Element
-
-        position -- int or tuple of int
-
-    Return: the created ReferenceMark or ReferenceMarkStart
-    """
-    # special case: content is an odf element (ie: a paragraph)
-    if isinstance(content, Element):
-        if content.is_empty():
-            reference = ReferenceMark(name)
-            content.insert(reference, xmlposition=NEXT_SIBLING)
-            return reference
-        reference_start = ReferenceMarkStart(name)
-        content.insert(reference_start, start=True)
-        reference_end = ReferenceMarkEnd(name)
-        content.append(reference_end)
-        return reference_start
-
-    # With "content" => automatically insert a "start" and an "end"
-    # reference
-    if (
-        before is None
-        and after is None
-        and content is not None
-        and isinstance(position, int)
-    ):
-        # Start tag
-        reference_start = ReferenceMarkStart(name)
-        self._insert(
-            reference_start, before=content, position=position, main_text=True
-        )
-        # End tag
-        reference_end = ReferenceMarkEnd(name)
-        self._insert(
-            reference_end, after=content, position=position, main_text=True
-        )
-        return reference_start
-
-    # With "(int, int)" =>  automatically insert a "start" and an "end"
-    if (
-        before is None
-        and after is None
-        and content is None
-        and isinstance(position, tuple)
-    ):
-        # Start
-        reference_start = ReferenceMarkStart(name)
-        self._insert(reference_start, position=position[0], main_text=True)
-        # End
-        reference_end = ReferenceMarkEnd(name)
-        self._insert(reference_end, position=position[1], main_text=True)
-        return reference_start
-
-    # Without "content" nor "position"
-    if content is not None or not isinstance(position, int):
-        raise ValueError("bad arguments")
-
-    # Insert a positional reference mark
-    reference = ReferenceMark(name)
-    self._insert(
-        reference,
-        before=before,
-        after=after,
-        position=position,
-        main_text=True,
-    )
-    return reference
-
-
-
-def set_reference_mark_end(self, reference_mark: Element, before: str | None = None, after: str | None = None, position: int = 0) ‑> ReferenceMarkEnd -
-
-

Insert/move a ReferenceMarkEnd for an existing reference mark. If -some end tag already exists, replace it. Reference tag is set at the -position defined by the regex (before or after).

-

If content/before or after (regex) returns a group of matching -positions, the position value is the index of matching place to use.

-

Arguments

-

reference_mark – ReferenceMark or ReferenceMarkStart (mandatory)

-

before – str regular expression or None

-

after – str regular expression or None

-

position – int

-
- -Expand source code - -
def set_reference_mark_end(
-    self,
-    reference_mark: Element,
-    before: str | None = None,
-    after: str | None = None,
-    position: int = 0,
-) -> ReferenceMarkEnd:
-    """Insert/move a ReferenceMarkEnd for an existing reference mark. If
-    some end tag already exists, replace it. Reference tag is set at the
-    position defined by the regex (before or after).
-
-    If content/before or after (regex) returns a group of matching
-    positions, the position value is the index of matching place to use.
-
-    Arguments:
-
-        reference_mark -- ReferenceMark or ReferenceMarkStart (mandatory)
-
-        before -- str regular expression or None
-
-        after -- str regular expression or None
-
-        position -- int
-    """
-    if not isinstance(reference_mark, (ReferenceMark, ReferenceMarkStart)):
-        raise TypeError("Not a ReferenceMark or ReferenceMarkStart")
-    name = reference_mark.name
-    if isinstance(reference_mark, ReferenceMark):
-        # change it to a range reference:
-        reference_mark.tag = ReferenceMarkStart._tag
-
-    existing_end_tag = self.get_reference_mark_end(name=name)
-    if existing_end_tag:
-        existing_end_tag.delete()
-
-    # create the end tag
-    end_tag = ReferenceMarkEnd(name)
-
-    # Insert
-    self._insert(
-        end_tag, before=before, after=after, position=position, main_text=True
-    )
-    return end_tag
-
-
-
-def set_span(self, match: str, tail: str, style: str, regex: str | None = None, offset: int | None = None, length: int = 0) ‑> Span -
-
-

set_span(style, regex=None, offset=None, length=0) -Apply the given style to text content matching the regex OR the -positional arguments offset and length.

-

(match, tail: provided by regex decorator)

-

Arguments

-

style – str

-

regex – str regular expression

-

offset – int

-

length – int

-
- -Expand source code - -
@_by_regex_offset
-def set_span(
-    self,
-    match: str,
-    tail: str,
-    style: str,
-    regex: str | None = None,
-    offset: int | None = None,
-    length: int = 0,
-) -> Span:
-    """
-    set_span(style, regex=None, offset=None, length=0)
-    Apply the given style to text content matching the regex OR the
-    positional arguments offset and length.
-
-    (match, tail: provided by regex decorator)
-
-    Arguments:
-
-        style -- str
-
-        regex -- str regular expression
-
-        offset -- int
-
-        length -- int
-    """
-    span = Span(match, style=style)
-    span.tail = tail
-    return span
-
-
-
-

Inherited members

- -
-
-class RectangleShape -(style: str | None = None, text_style: str | None = None, draw_id: str | None = None, layer: str | None = None, position: tuple | None = None, size: tuple | None = None, **kwargs: Any) -
-
-

Create a rectangle shape.

-

Arguments

-

style – str

-

text_style – str

-

draw_id – str

-

layer – str

-

position – (str, str)

-

size – (str, str)

-
- -Expand source code - -
class RectangleShape(ShapeBase):
-    """Create a rectangle shape.
-
-    Arguments:
-
-        style -- str
-
-        text_style -- str
-
-        draw_id -- str
-
-        layer -- str
-
-        position -- (str, str)
-
-        size -- (str, str)
-
-    """
-
-    _tag = "draw:rect"
-    _properties: tuple[PropDef, ...] = ()
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        position: tuple | None = None,
-        size: tuple | None = None,
-        **kwargs: Any,
-    ) -> None:
-        kwargs.update(
-            {
-                "style": style,
-                "text_style": text_style,
-                "draw_id": draw_id,
-                "layer": layer,
-                "size": size,
-                "position": position,
-            }
-        )
-        super().__init__(**kwargs)
-
-

Ancestors

- -

Inherited members

- -
-
-class Reference -(name: str = '', ref_format: str = '', **kwargs: Any) -
-
-

A reference to a content marked by a reference mark. -The odf_reference element ("text:reference-ref") represents a field that -references a "text:reference-mark-start" or "text:reference-mark" element. -Its text:reference-format attribute specifies what is displayed from the -referenced element. Default is 'page' -Actual content is not updated except for the 'text' format by the -update() method.

-

Creation of references can be tricky, consider using this method: -odfdo.paragraph.insert_reference()

-

Values for text:reference-format : -The defined values for the text:reference-format attribute supported by -all reference fields are: -- 'chapter': displays the number of the chapter in which the -referenced item appears. -- 'direction': displays whether the referenced item is above or -below the reference field. -- 'page': displays the number of the page on which the referenced -item appears. -- 'text': displays the text of the referenced item. -Additional defined values for the text:reference-format attribute -supported by references to sequence fields are: -- 'caption': displays the caption in which the sequence is used. -- 'category-and-value': displays the name and value of the sequence. -- 'value': displays the value of the sequence.

-
References to bookmarks and other references support additional values,
-which display the list label of the referenced item. If the referenced
-item is contained in a list or a numbered paragraph, the list label is
-the formatted number of the paragraph which contains the referenced
-item. If the referenced item is not contained in a list or numbered
-paragraph, the list label is empty, and the referenced field therefore
-displays nothing. If the referenced bookmark or reference contains more
-than one paragraph, the list label of the paragraph at which the
-bookmark or reference starts is taken.
-
-Additional defined values for the text:reference-format attribute
-supported by all references to bookmark's or other reference fields
-are:
-  - 'number': displays the list label of the referenced item. [...]
-  - 'number-all-superior': displays the list label of the referenced
-    item and adds the contents of all list labels of superior levels
-    in front of it. [...]
-  - 'number-no-superior': displays the contents of the list label of
-    the referenced item.
-
-

Create a reference to a content marked by a reference mark. An -actual reference mark with the provided name should exist.

-

Consider using: odfdo.paragraph.insert_reference()

-

The text:ref-name attribute identifies a "text:reference-mark" or -"text:referencemark-start" element by the value of that element's -text:name attribute. -If ref_format is 'text', the current text content of the reference_mark -is retrieved.

-

Arguments

-

name – str : name of the reference mark

-

ref_format – str : format of the field. Default is 'page', allowed -values are 'chapter', 'direction', 'page', 'text', -'caption', 'category-and-value', 'value', 'number', -'number-all-superior', 'number-no-superior'.

-
- -Expand source code - -
class Reference(Element):
-    """A reference to a content marked by a reference mark.
-    The odf_reference element ("text:reference-ref") represents a field that
-    references a "text:reference-mark-start" or "text:reference-mark" element.
-    Its text:reference-format attribute specifies what is displayed from the
-    referenced element. Default is 'page'
-    Actual content is not updated except for the 'text' format by the
-    update() method.
-
-
-    Creation of references can be tricky, consider using this method:
-        odfdo.paragraph.insert_reference()
-
-    Values for text:reference-format :
-        The defined values for the text:reference-format attribute supported by
-        all reference fields are:
-          - 'chapter': displays the number of the chapter in which the
-            referenced item appears.
-          - 'direction': displays whether the referenced item is above or
-            below the reference field.
-          - 'page': displays the number of the page on which the referenced
-            item appears.
-          - 'text': displays the text of the referenced item.
-        Additional defined values for the text:reference-format attribute
-        supported by references to sequence fields are:
-          - 'caption': displays the caption in which the sequence is used.
-          - 'category-and-value': displays the name and value of the sequence.
-          - 'value': displays the value of the sequence.
-
-        References to bookmarks and other references support additional values,
-        which display the list label of the referenced item. If the referenced
-        item is contained in a list or a numbered paragraph, the list label is
-        the formatted number of the paragraph which contains the referenced
-        item. If the referenced item is not contained in a list or numbered
-        paragraph, the list label is empty, and the referenced field therefore
-        displays nothing. If the referenced bookmark or reference contains more
-        than one paragraph, the list label of the paragraph at which the
-        bookmark or reference starts is taken.
-
-        Additional defined values for the text:reference-format attribute
-        supported by all references to bookmark's or other reference fields
-        are:
-          - 'number': displays the list label of the referenced item. [...]
-          - 'number-all-superior': displays the list label of the referenced
-            item and adds the contents of all list labels of superior levels
-            in front of it. [...]
-          - 'number-no-superior': displays the contents of the list label of
-            the referenced item.
-    """
-
-    _tag = "text:reference-ref"
-    _properties = (PropDef("name", "text:ref-name"),)
-    format_allowed = (
-        "chapter",
-        "direction",
-        "page",
-        "text",
-        "caption",
-        "category-and-value",
-        "value",
-        "number",
-        "number-all-superior",
-        "number-no-superior",
-    )
-
-    def __init__(self, name: str = "", ref_format: str = "", **kwargs: Any) -> None:
-        """Create a reference to a content marked by a reference mark. An
-        actual reference mark with the provided name should exist.
-
-        Consider using: odfdo.paragraph.insert_reference()
-
-        The text:ref-name attribute identifies a "text:reference-mark" or
-        "text:referencemark-start" element by the value of that element's
-        text:name attribute.
-        If ref_format is 'text', the current text content of the reference_mark
-        is retrieved.
-
-        Arguments:
-
-            name -- str : name of the reference mark
-
-            ref_format -- str : format of the field. Default is 'page', allowed
-                            values are 'chapter', 'direction', 'page', 'text',
-                            'caption', 'category-and-value', 'value', 'number',
-                            'number-all-superior', 'number-no-superior'.
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-            self.ref_format = ref_format
-
-    @property
-    def ref_format(self) -> str | None:
-        reference = self.get_attribute("text:reference-format")
-        if isinstance(reference, str):
-            return reference
-        return None
-
-    @ref_format.setter
-    def ref_format(self, ref_format: str) -> None:
-        """Set the text:reference-format attribute.
-
-        Arguments:
-
-            ref_format -- str
-        """
-        if not ref_format or ref_format not in self.format_allowed:
-            ref_format = "page"
-        self.set_attribute("text:reference-format", ref_format)
-
-    def update(self) -> None:
-        """Update the content of the reference text field. Currently only
-        'text' format is implemented. Other values, for example the 'page' text
-        field, may need to be refreshed through a visual ODF parser.
-        """
-        ref_format = self.ref_format
-        if ref_format != "text":
-            # only 'text' is implemented
-            return None
-        body = self.document_body
-        if not body:
-            body = self.root
-        name = self.name
-        reference = body.get_reference_mark(name=name)
-        if not reference:
-            return None
-        # we know it is a ReferenceMarkStart:
-        self.text = reference.referenced_text()  # type: ignore
-
-

Ancestors

- -

Class variables

-
-
var format_allowed
-
-
-
-
-

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:ref-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var ref_format : str | None
-
-
-
- -Expand source code - -
@property
-def ref_format(self) -> str | None:
-    reference = self.get_attribute("text:reference-format")
-    if isinstance(reference, str):
-        return reference
-    return None
-
-
-
-

Methods

-
-
-def update(self) ‑> None -
-
-

Update the content of the reference text field. Currently only -'text' format is implemented. Other values, for example the 'page' text -field, may need to be refreshed through a visual ODF parser.

-
- -Expand source code - -
def update(self) -> None:
-    """Update the content of the reference text field. Currently only
-    'text' format is implemented. Other values, for example the 'page' text
-    field, may need to be refreshed through a visual ODF parser.
-    """
-    ref_format = self.ref_format
-    if ref_format != "text":
-        # only 'text' is implemented
-        return None
-    body = self.document_body
-    if not body:
-        body = self.root
-    name = self.name
-    reference = body.get_reference_mark(name=name)
-    if not reference:
-        return None
-    # we know it is a ReferenceMarkStart:
-    self.text = reference.referenced_text()  # type: ignore
-
-
-
-

Inherited members

- -
-
-class ReferenceMark -(name: str = '', **kwargs: Any) -
-
-

A point reference. -A point reference marks a position in text and is represented by a single -"text:reference-mark" element.

-

A point reference. A point reference marks a position in text and is -represented by a single "text:reference-mark" element. -Consider using the wrapper: odfdo.paragraph.set_reference_mark()

-

Arguments

-

name – str

-
- -Expand source code - -
class ReferenceMark(Element):
-    """A point reference.
-    A point reference marks a position in text and is represented by a single
-    "text:reference-mark" element.
-    """
-
-    _tag = "text:reference-mark"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        """A point reference. A point reference marks a position in text and is
-        represented by a single "text:reference-mark" element.
-        Consider using the wrapper: odfdo.paragraph.set_reference_mark()
-
-        Arguments:
-
-            name -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class ReferenceMarkEnd -(name: str = '', **kwargs: Any) -
-
-

The "text:reference-mark-end" element represents the end of a range -reference.

-

The "text:reference-mark-end" element represent the end of a range -reference. -Consider using the wrappers: odfdo.paragraph.set_reference_mark() and -odfdo.paragraph.set_reference_mark_end()

-

Arguments

-

name – str

-
- -Expand source code - -
class ReferenceMarkEnd(Element):
-    """The "text:reference-mark-end" element represents the end of a range
-    reference.
-    """
-
-    _tag = "text:reference-mark-end"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        """The "text:reference-mark-end" element represent the end of a range
-        reference.
-        Consider using the wrappers: odfdo.paragraph.set_reference_mark() and
-        odfdo.paragraph.set_reference_mark_end()
-
-        Arguments:
-
-            name -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-    def referenced_text(self) -> str:
-        """Return the text between reference-mark-start and reference-mark-end."""
-        name = self.name
-        request = (
-            f"//text()"
-            f"[preceding::text:reference-mark-start[@text:name='{name}'] "
-            f"and following::text:reference-mark-end[@text:name='{name}']]"
-        )
-        result = " ".join(str(x) for x in self.xpath(request))
-        return result
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def referenced_text(self) ‑> str -
-
-

Return the text between reference-mark-start and reference-mark-end.

-
- -Expand source code - -
def referenced_text(self) -> str:
-    """Return the text between reference-mark-start and reference-mark-end."""
-    name = self.name
-    request = (
-        f"//text()"
-        f"[preceding::text:reference-mark-start[@text:name='{name}'] "
-        f"and following::text:reference-mark-end[@text:name='{name}']]"
-    )
-    result = " ".join(str(x) for x in self.xpath(request))
-    return result
-
-
-
-

Inherited members

- -
-
-class ReferenceMarkStart -(name: str = '', **kwargs: Any) -
-
-

The "text:reference-mark-start" element represents the start of a -range reference.

-

The "text:reference-mark-start" element represent the start of a range -reference. -Consider using the wrapper: odfdo.paragraph.set_reference_mark()

-

Arguments

-

name – str

-
- -Expand source code - -
class ReferenceMarkStart(Element):
-    """The "text:reference-mark-start" element represents the start of a
-    range reference.
-    """
-
-    _tag = "text:reference-mark-start"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        """The "text:reference-mark-start" element represent the start of a range
-        reference.
-        Consider using the wrapper: odfdo.paragraph.set_reference_mark()
-
-        Arguments:
-
-            name -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-    def referenced_text(self) -> str:
-        """Return the text between reference-mark-start and reference-mark-end."""
-        name = self.name
-        request = (
-            f"//text()"
-            f"[preceding::text:reference-mark-start[@text:name='{name}'] "
-            f"and following::text:reference-mark-end[@text:name='{name}']]"
-        )
-        result = " ".join(str(x) for x in self.xpath(request))
-        return result
-
-    def get_referenced(
-        self,
-        no_header: bool = False,
-        clean: bool = True,
-        as_xml: bool = False,
-        as_list: bool = False,
-    ) -> Element | list | str | None:
-        """Return the document content between the start and end tags of the
-        reference. The content returned by this method can spread over several
-        headers and paragraphs.
-        By default, the content is returned as an "office:text" odf element.
-
-
-        Arguments:
-
-            no_header -- boolean (default to False), translate existing headers
-                         tags "text:h" into paragraphs "text:p".
-
-            clean -- boolean (default to True), suppress unwanted tags. Striped
-                     tags are : 'text:change', 'text:change-start',
-                     'text:change-end', 'text:reference-mark',
-                     'text:reference-mark-start', 'text:reference-mark-end'.
-
-            as_xml -- boolean (default to False), format the returned content as
-                      a XML string (serialization).
-
-            as_list -- boolean (default to False), do not embed the returned
-                       content in a "office:text'" element, instead simply
-                       return a raw list of odf elements.
-        """
-        name = self.name
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Reference need some upper document part")
-        body = self.document_body
-        if not body:
-            body = parent
-        end = body.get_reference_mark_end(name=name)
-        if end is None:
-            raise ValueError("No reference-end found")
-        start = self
-        return _get_referenced(body, start, end, no_header, clean, as_xml, as_list)
-
-    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-        """Delete the given element from the XML tree. If no element is given,
-        "self" is deleted. The XML library may allow to continue to use an
-        element now "orphan" as long as you have a reference to it.
-
-        For odf_reference_mark_start : delete the reference-end tag if exists.
-
-        Arguments:
-
-            child -- Element
-
-            keep_tail -- boolean (default to True), True for most usages.
-        """
-        if child is not None:  # act like normal delete
-            return super().delete(child, keep_tail)
-        name = self.name
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can't delete the root element")
-        body = self.document_body
-        if not body:
-            body = parent
-        end = body.get_reference_mark_end(name=name)
-        if end:
-            end.delete()
-        # act like normal delete
-        return super().delete()
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def delete(self, child: Element | None = None, keep_tail: bool = True) ‑> None -
-
-

Delete the given element from the XML tree. If no element is given, -"self" is deleted. The XML library may allow to continue to use an -element now "orphan" as long as you have a reference to it.

-

For odf_reference_mark_start : delete the reference-end tag if exists.

-

Arguments

-

child – Element

-

keep_tail – boolean (default to True), True for most usages.

-
- -Expand source code - -
def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-    """Delete the given element from the XML tree. If no element is given,
-    "self" is deleted. The XML library may allow to continue to use an
-    element now "orphan" as long as you have a reference to it.
-
-    For odf_reference_mark_start : delete the reference-end tag if exists.
-
-    Arguments:
-
-        child -- Element
-
-        keep_tail -- boolean (default to True), True for most usages.
-    """
-    if child is not None:  # act like normal delete
-        return super().delete(child, keep_tail)
-    name = self.name
-    parent = self.parent
-    if parent is None:
-        raise ValueError("Can't delete the root element")
-    body = self.document_body
-    if not body:
-        body = parent
-    end = body.get_reference_mark_end(name=name)
-    if end:
-        end.delete()
-    # act like normal delete
-    return super().delete()
-
-
-
-def get_referenced(self, no_header: bool = False, clean: bool = True, as_xml: bool = False, as_list: bool = False) ‑> Element | odfdo.list | str | None -
-
-

Return the document content between the start and end tags of the -reference. The content returned by this method can spread over several -headers and paragraphs. -By default, the content is returned as an "office:text" odf element.

-

Arguments

-

no_header – boolean (default to False), translate existing headers -tags "text:h" into paragraphs "text:p".

-

clean – boolean (default to True), suppress unwanted tags. Striped -tags are : 'text:change', 'text:change-start', -'text:change-end', 'text:reference-mark', -'text:reference-mark-start', 'text:reference-mark-end'.

-

as_xml – boolean (default to False), format the returned content as -a XML string (serialization).

-

as_list – boolean (default to False), do not embed the returned -content in a "office:text'" element, instead simply -return a raw list of odf elements.

-
- -Expand source code - -
def get_referenced(
-    self,
-    no_header: bool = False,
-    clean: bool = True,
-    as_xml: bool = False,
-    as_list: bool = False,
-) -> Element | list | str | None:
-    """Return the document content between the start and end tags of the
-    reference. The content returned by this method can spread over several
-    headers and paragraphs.
-    By default, the content is returned as an "office:text" odf element.
-
-
-    Arguments:
-
-        no_header -- boolean (default to False), translate existing headers
-                     tags "text:h" into paragraphs "text:p".
-
-        clean -- boolean (default to True), suppress unwanted tags. Striped
-                 tags are : 'text:change', 'text:change-start',
-                 'text:change-end', 'text:reference-mark',
-                 'text:reference-mark-start', 'text:reference-mark-end'.
-
-        as_xml -- boolean (default to False), format the returned content as
-                  a XML string (serialization).
-
-        as_list -- boolean (default to False), do not embed the returned
-                   content in a "office:text'" element, instead simply
-                   return a raw list of odf elements.
-    """
-    name = self.name
-    parent = self.parent
-    if parent is None:
-        raise ValueError("Reference need some upper document part")
-    body = self.document_body
-    if not body:
-        body = parent
-    end = body.get_reference_mark_end(name=name)
-    if end is None:
-        raise ValueError("No reference-end found")
-    start = self
-    return _get_referenced(body, start, end, no_header, clean, as_xml, as_list)
-
-
-
-def referenced_text(self) ‑> str -
-
-

Return the text between reference-mark-start and reference-mark-end.

-
- -Expand source code - -
def referenced_text(self) -> str:
-    """Return the text between reference-mark-start and reference-mark-end."""
-    name = self.name
-    request = (
-        f"//text()"
-        f"[preceding::text:reference-mark-start[@text:name='{name}'] "
-        f"and following::text:reference-mark-end[@text:name='{name}']]"
-    )
-    result = " ".join(str(x) for x in self.xpath(request))
-    return result
-
-
-
-

Inherited members

- -
-
-class Row -(width: int | None = None, repeated: int | None = None, style: str | None = None, **kwargs: Any) -
-
-

ODF table row "table:table-row"

-

create a Row, optionally filled with "width" number of cells.

-

Rows contain cells, their number determine the number of columns.

-

You don't generally have to create rows by hand, use the Table API.

-

Arguments

-

width – int

-

repeated – int

-

style – str

-
- -Expand source code - -
class Row(Element):
-    """ODF table row "table:table-row" """
-
-    _tag = "table:table-row"
-    _caching = True
-    _append = Element.append
-
-    def __init__(
-        self,
-        width: int | None = None,
-        repeated: int | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """create a Row, optionally filled with "width" number of cells.
-
-        Rows contain cells, their number determine the number of columns.
-
-        You don't generally have to create rows by hand, use the Table API.
-
-        Arguments:
-
-            width -- int
-
-            repeated -- int
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        self.y = None
-        if not hasattr(self, "_indexes"):
-            self._indexes = {}
-            self._indexes["_rmap"] = {}
-        if not hasattr(self, "_rmap"):
-            self._compute_row_cache()
-            if not hasattr(self, "_tmap"):
-                self._tmap = []
-                self._cmap = []
-        if self._do_init:
-            if width is not None:
-                for _i in range(width):
-                    self.append(Cell())  # type:ignore
-            if repeated:
-                self.repeated = repeated
-            if style is not None:
-                self.style = style
-            self._compute_row_cache()
-
-    def _get_cells(self) -> list[Element]:
-        return self.get_elements(_xpath_cell)
-
-    def _translate_row_coordinates(
-        self,
-        coord: tuple | list | str,
-    ) -> tuple[int | None, int | None]:
-        xyzt = convert_coordinates(coord)
-        if len(xyzt) == 2:
-            x, z = xyzt
-        else:
-            x, _, z, __ = xyzt
-        if x and x < 0:
-            x = increment(x, self.width)
-        if z and z < 0:
-            z = increment(z, self.width)
-        return (x, z)
-
-    def _compute_row_cache(self) -> None:
-        idx_repeated_seq = self.elements_repeated_sequence(
-            _xpath_cell, "table:number-columns-repeated"
-        )
-        self._rmap = make_cache_map(idx_repeated_seq)
-
-    # Public API
-
-    @property
-    def clone(self) -> Row:
-        clone = Element.clone.fget(self)  # type: ignore
-        clone.y = self.y
-        if hasattr(self, "_tmap"):
-            if hasattr(self, "_rmap"):
-                clone._rmap = self._rmap[:]
-            clone._tmap = self._tmap[:]
-            clone._cmap = self._cmap[:]
-        return clone
-
-    def _set_repeated(self, repeated: int | None) -> None:
-        """Internal only. Set the numnber of times the row is repeated, or
-        None to delete it. Without changing cache.
-
-        Arguments:
-
-            repeated -- int
-        """
-        if repeated is None or repeated < 2:
-            with contextlib.suppress(KeyError):
-                self.del_attribute("table:number-rows-repeated")
-            return
-        self.set_attribute("table:number-rows-repeated", str(repeated))
-
-    @property
-    def repeated(self) -> int | None:
-        """Get / set the number of times the row is repeated.
-
-        Always None when using the table API.
-
-        Return: int or None
-        """
-        repeated = self.get_attribute("table:number-rows-repeated")
-        if repeated is None:
-            return None
-        return int(repeated)
-
-    @repeated.setter
-    def repeated(self, repeated: int | None) -> None:
-        self._set_repeated(repeated)
-        # update cache
-        current: Element = self
-        while True:
-            # look for Table, parent may be group of rows
-            upper = current.parent
-            if not upper:
-                # lonely row
-                return
-            # parent may be group of rows, not table
-            if isinstance(upper, Element) and upper._tag == "table:table":
-                break
-            current = upper
-        # fixme : need to optimize this
-        if isinstance(upper, Element) and upper._tag == "table:table":
-            upper._compute_table_cache()
-            if hasattr(self, "_tmap"):
-                del self._tmap[:]
-                self._tmap.extend(upper._tmap)
-            else:
-                self._tmap = upper._tmap
-
-    @property
-    def style(self) -> str | None:
-        """Get /set the style of the row itself.
-
-        Return: str
-        """
-        return self.get_attribute("table:style-name")  # type: ignore
-
-    @style.setter
-    def style(self, style: str | Element) -> None:
-        self.set_style_attribute("table:style-name", style)
-
-    @property
-    def width(self) -> int:
-        """Get the number of expected cells in the row, i.e. addition
-        repetitions.
-
-        Return: int
-        """
-        try:
-            value = self._rmap[-1] + 1
-        except Exception:
-            value = 0
-        return value
-
-    def _translate_x_from_any(self, x: str | int) -> int:
-        return translate_from_any(x, self.width, 0)
-
-    def traverse(  # noqa: C901
-        self,
-        start: int | None = None,
-        end: int | None = None,
-    ) -> Iterator[Cell]:
-        """Yield as many cell elements as expected cells in the row, i.e.
-        expand repetitions by returning the same cell as many times as
-        necessary.
-
-            Arguments:
-
-                start -- int
-
-                end -- int
-
-        Copies are returned, use set_cell() to push them back.
-        """
-        idx = -1
-        before = -1
-        x = 0
-        cell: Cell
-        if start is None and end is None:
-            for juska in self._rmap:
-                idx += 1
-                if idx in self._indexes["_rmap"]:
-                    cell = self._indexes["_rmap"][idx]
-                else:
-                    cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
-                    if not isinstance(cell, Cell):
-                        raise TypeError(f"Not a cell: {cell!r}")
-                    self._indexes["_rmap"][idx] = cell
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    # Return a copy without the now obsolete repetition
-                    if cell is None:
-                        cell = Cell()
-                    else:
-                        cell = cell.clone
-                        if repeated > 1:
-                            cell.repeated = None
-                    cell.y = self.y
-                    cell.x = x
-                    x += 1
-                    yield cell
-        else:
-            if start is None:
-                start = 0
-            start = max(0, start)
-            if end is None:
-                try:
-                    end = self._rmap[-1]
-                except Exception:
-                    end = -1
-            start_map = find_odf_idx(self._rmap, start)
-            if start_map is None:
-                return
-            if start_map > 0:
-                before = self._rmap[start_map - 1]
-            idx = start_map - 1
-            before = start - 1
-            x = start
-            for juska in self._rmap[start_map:]:
-                idx += 1
-                if idx in self._indexes["_rmap"]:
-                    cell = self._indexes["_rmap"][idx]
-                else:
-                    cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
-                    if not isinstance(cell, Cell):
-                        raise TypeError(f"Not a cell: {cell!r}")
-                    self._indexes["_rmap"][idx] = cell
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    if x <= end:
-                        if cell is None:
-                            cell = Cell()
-                        else:
-                            cell = cell.clone
-                            if repeated > 1 or (x == start and start > 0):
-                                cell.repeated = None
-                        cell.y = self.y
-                        cell.x = x
-                        x += 1
-                        yield cell
-
-    def get_cells(
-        self,
-        coord: str | tuple | None = None,
-        style: str | None = None,
-        content: str | None = None,
-        cell_type: str | None = None,
-    ) -> list[Cell]:
-        """Get the list of cells matching the criteria.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-
-        Filter by coordinates will retrieve the amount of cells defined by
-        'coord', minus the other filters.
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            content -- str regex
-
-            style -- str
-
-        Return: list of Cell
-        """
-        # fixme : not clones ?
-        if coord:
-            x, z = self._translate_row_coordinates(coord)
-        else:
-            x = None
-            z = None
-        if cell_type:
-            cell_type = cell_type.lower().strip()
-        cells: list[Cell] = []
-        for cell in self.traverse(start=x, end=z):
-            # Filter the cells by cell_type
-            if cell_type:
-                ctype = cell.type
-                if not ctype or not (ctype == cell_type or cell_type == "all"):
-                    continue
-            # Filter the cells with the regex
-            if content and not cell.match(content):
-                continue
-            # Filter the cells with the style
-            if style and style != cell.style:
-                continue
-            cells.append(cell)
-        return cells
-
-    def _get_cell2(self, x: int, clone: bool = True) -> Cell | None:
-        if x >= self.width:
-            return Cell()
-        if clone:
-            return self._get_cell2_base(x).clone  # type: ignore
-        else:
-            return self._get_cell2_base(x)
-
-    def _get_cell2_base(self, x: int) -> Cell | None:
-        idx = find_odf_idx(self._rmap, x)
-        cell: Cell
-        if idx is not None:
-            if idx in self._indexes["_rmap"]:
-                cell = self._indexes["_rmap"][idx]
-            else:
-                cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
-                self._indexes["_rmap"][idx] = cell
-            return cell
-        return None
-
-    def get_cell(self, x: int, clone: bool = True) -> Cell | None:
-        """Get the cell at position "x" starting from 0. Alphabetical
-        positions like "D" are accepted.
-
-        A  copy is returned, use set_cell() to push it back.
-
-        Arguments:
-
-            x -- int or str
-
-        Return: Cell | None
-        """
-        x = self._translate_x_from_any(x)
-        cell = self._get_cell2(x, clone=clone)
-        if not cell:
-            return None
-        cell.y = self.y
-        cell.x = x
-        return cell
-
-    def get_value(
-        self,
-        x: int | str,
-        get_type: bool = False,
-    ) -> Any | tuple[Any, str]:
-        """Shortcut to get the value of the cell at position "x".
-        If get_type is True, returns the tuples (value, ODF type).
-
-        If the cell is empty, returns None or (None, None)
-
-        See get_cell() and Cell.get_value().
-        """
-        if get_type:
-            x = self._translate_x_from_any(x)
-            cell = self._get_cell2_base(x)
-            if cell is None:
-                return (None, None)
-            return cell.get_value(get_type=get_type)
-        x = self._translate_x_from_any(x)
-        cell = self._get_cell2_base(x)
-        if cell is None:
-            return None
-        return cell.get_value()
-
-    def set_cell(
-        self,
-        x: int | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Push the cell back in the row at position "x" starting from 0.
-        Alphabetical positions like "D" are accepted.
-
-        Arguments:
-
-            x -- int or str
-
-        returns the cell with x and y updated
-        """
-        cell_back: Cell
-        if cell is None:
-            cell = Cell()
-            repeated = 1
-            clone = False
-        else:
-            repeated = cell.repeated or 1
-        x = self._translate_x_from_any(x)
-        # Outside the defined row
-        diff = x - self.width
-        if diff == 0:
-            cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
-        elif diff > 0:
-            self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
-            cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
-        else:
-            # Inside the defined row
-            set_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap", clone=clone)
-            cell.x = x
-            cell.y = self.y
-            cell_back = cell
-        return cell_back
-
-    def set_value(
-        self,
-        x: int | str,
-        value: Any,
-        style: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-    ) -> None:
-        """Shortcut to set the value of the cell at position "x".
-
-        Arguments:
-
-            x -- int or str
-
-            value -- Python type
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                     'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-
-        See get_cell() and Cell.get_value().
-        """
-        self.set_cell(
-            x,
-            Cell(value, style=style, cell_type=cell_type, currency=currency),
-            clone=False,
-        )
-
-    def insert_cell(
-        self,
-        x: int | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Insert the given cell at position "x" starting from 0. If no cell
-        is given, an empty one is created.
-
-        Alphabetical positions like "D" are accepted.
-
-        Do not use when working on a table, use Table.insert_cell().
-
-        Arguments:
-
-            x -- int or str
-
-            cell -- Cell
-
-        returns the cell with x and y updated
-        """
-        cell_back: Cell
-        if cell is None:
-            cell = Cell()
-        x = self._translate_x_from_any(x)
-        # Outside the defined row
-        diff = x - self.width
-        if diff < 0:
-            insert_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap")
-            cell.x = x
-            cell.y = self.y
-            cell_back = cell
-        elif diff == 0:
-            cell_back = self.append_cell(cell, clone=clone)
-        else:
-            self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
-            cell_back = self.append_cell(cell, clone=clone)
-        return cell_back
-
-    def extend_cells(self, cells: Iterable[Cell] | None = None) -> None:
-        if cells is None:
-            cells = []
-        self.extend(cells)
-        self._compute_row_cache()
-
-    def append_cell(
-        self,
-        cell: Cell | None = None,
-        clone: bool = True,
-        _repeated: int | None = None,
-    ) -> Cell:
-        """Append the given cell at the end of the row. Repeated cells are
-        accepted. If no cell is given, an empty one is created.
-
-        Do not use when working on a table, use Table.append_cell().
-
-        Arguments:
-
-            cell -- Cell
-
-            _repeated -- (optional), repeated value of the row
-
-        returns the cell with x and y updated
-        """
-        if cell is None:
-            cell = Cell()
-            clone = False
-        if clone:
-            cell = cell.clone
-        self._append(cell)
-        if _repeated is None:
-            _repeated = cell.repeated or 1
-        self._rmap = insert_map_once(self._rmap, len(self._rmap), _repeated)
-        cell.x = self.width - 1
-        cell.y = self.y
-        return cell
-
-    # fix for unit test and typos
-    append = append_cell  # type: ignore
-
-    def delete_cell(self, x: int | str) -> None:
-        """Delete the cell at the given position "x" starting from 0.
-        Alphabetical positions like "D" are accepted.
-
-        Cells on the right will be shifted to the left. In a table, other
-        rows remain unaffected.
-
-        Arguments:
-
-            x -- int or str
-        """
-        x = self._translate_x_from_any(x)
-        if x >= self.width:
-            return
-        delete_item_in_vault(x, self, _xpath_cell_idx, "_rmap")
-
-    def get_values(
-        self,
-        coord: str | tuple | None = None,
-        cell_type: str | None = None,
-        complete: bool = False,
-        get_type: bool = False,
-    ) -> list[Any | tuple[Any, Any]]:
-        """Shortcut to get the cell values in this row.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-        If cell_type is used and complete is True, missing values are
-        replaced by None.
-        If cell_type is None, complete is always True : with no cell type
-        queried, get_values() returns None for each empty cell, the length
-        of the list is equal to the length of the row (depending on
-        coordinates use).
-
-        If get_type is True, returns a tuple (value, ODF type of value), or
-        (None, None) for empty cells if complete is True.
-
-        Filter by coordinates will retrieve the amount of cells defined by
-        coordinates with None for empty cells, except when using cell_type.
-
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates in row
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: list of Python types, or list of tuples.
-        """
-        if coord:
-            x, z = self._translate_row_coordinates(coord)
-        else:
-            x = None
-            z = None
-        if cell_type:
-            cell_type = cell_type.lower().strip()
-            values: list[Any | tuple[Any, Any]] = []
-            for cell in self.traverse(start=x, end=z):
-                # Filter the cells by cell_type
-                ctype = cell.type
-                if not ctype or not (ctype == cell_type or cell_type == "all"):
-                    if complete:
-                        if get_type:
-                            values.append((None, None))
-                        else:
-                            values.append(None)
-                    continue
-                values.append(cell.get_value(get_type=get_type))
-            return values
-        else:
-            return [
-                cell.get_value(get_type=get_type)
-                for cell in self.traverse(start=x, end=z)
-            ]
-
-    def set_cells(
-        self,
-        cells: list[Cell] | tuple[Cell] | None = None,
-        start: int | str = 0,
-        clone: bool = True,
-    ) -> None:
-        """Set the cells in the row, from the 'start' column.
-        This method does not clear the row, use row.clear() before to start
-        with an empty row.
-
-        Arguments:
-
-            cells -- list of cells
-
-            start -- int or str
-        """
-        if cells is None:
-            cells = []
-        if start is None:
-            start = 0
-        else:
-            start = self._translate_x_from_any(start)
-        if start == 0 and clone is False and (len(cells) >= self.width):
-            self.clear()
-            self.extend_cells(cells)
-        else:
-            x = start
-            for cell in cells:
-                self.set_cell(x, cell, clone=clone)
-                if cell:
-                    x += cell.repeated or 1
-                else:
-                    x += 1
-
-    def set_values(
-        self,
-        values: list[Any],
-        start: int | str = 0,
-        style: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-    ) -> None:
-        """Shortcut to set the value of cells in the row, from the 'start'
-        column vith values.
-        This method does not clear the row, use row.clear() before to start
-        with an empty row.
-
-        Arguments:
-
-            values -- list of Python types
-
-            start -- int or str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency' or 'percentage'
-
-            currency -- three-letter str
-
-            style -- cell style
-        """
-        # fixme : if values n, n+ are same, use repeat
-        if start is None:
-            start = 0
-        else:
-            start = self._translate_x_from_any(start)
-        if start == 0 and (len(values) >= self.width):
-            self.clear()
-            cells = [
-                Cell(value, style=style, cell_type=cell_type, currency=currency)
-                for value in values
-            ]
-            self.extend_cells(cells)
-        else:
-            x = start
-            for value in values:
-                self.set_cell(
-                    x,
-                    Cell(value, style=style, cell_type=cell_type, currency=currency),
-                    clone=False,
-                )
-                x += 1
-
-    def rstrip(self, aggressive: bool = False) -> None:
-        """Remove *in-place* empty cells at the right of the row. An empty
-        cell has no value but can have style. If "aggressive" is True, style
-        is ignored.
-
-        Arguments:
-
-            aggressive -- bool
-        """
-        for cell in reversed(self._get_cells()):
-            if not cell.is_empty(aggressive=aggressive):  # type: ignore
-                break
-            self.delete(cell)
-        self._compute_row_cache()
-        self._indexes["_rmap"] = {}
-
-    def is_empty(self, aggressive: bool = False) -> bool:
-        """Return whether every cell in the row has no value or the value
-        evaluates to False (empty string), and no style.
-
-        If aggressive is True, empty cells with style are considered empty.
-
-        Arguments:
-
-            aggressive -- bool
-
-        Return: bool
-        """
-        return all(cell.is_empty(aggressive=aggressive) for cell in self._get_cells())  # type: ignore
-
-

Ancestors

- -

Instance variables

-
-
var cloneRow
-
-
-
- -Expand source code - -
@property
-def clone(self) -> Row:
-    clone = Element.clone.fget(self)  # type: ignore
-    clone.y = self.y
-    if hasattr(self, "_tmap"):
-        if hasattr(self, "_rmap"):
-            clone._rmap = self._rmap[:]
-        clone._tmap = self._tmap[:]
-        clone._cmap = self._cmap[:]
-    return clone
-
-
-
var repeated : int | None
-
-

Get / set the number of times the row is repeated.

-

Always None when using the table API.

-

Return: int or None

-
- -Expand source code - -
@property
-def repeated(self) -> int | None:
-    """Get / set the number of times the row is repeated.
-
-    Always None when using the table API.
-
-    Return: int or None
-    """
-    repeated = self.get_attribute("table:number-rows-repeated")
-    if repeated is None:
-        return None
-    return int(repeated)
-
-
-
var style : str | None
-
-

Get /set the style of the row itself.

-

Return: str

-
- -Expand source code - -
@property
-def style(self) -> str | None:
-    """Get /set the style of the row itself.
-
-    Return: str
-    """
-    return self.get_attribute("table:style-name")  # type: ignore
-
-
-
var width : int
-
-

Get the number of expected cells in the row, i.e. addition -repetitions.

-

Return: int

-
- -Expand source code - -
@property
-def width(self) -> int:
-    """Get the number of expected cells in the row, i.e. addition
-    repetitions.
-
-    Return: int
-    """
-    try:
-        value = self._rmap[-1] + 1
-    except Exception:
-        value = 0
-    return value
-
-
-
-

Methods

-
-
-def append(self, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Append the given cell at the end of the row. Repeated cells are -accepted. If no cell is given, an empty one is created.

-

Do not use when working on a table, use Table.append_cell().

-

Arguments

-

cell – Cell

-

_repeated – (optional), repeated value of the row

-

returns the cell with x and y updated

-
- -Expand source code - -
def append_cell(
-    self,
-    cell: Cell | None = None,
-    clone: bool = True,
-    _repeated: int | None = None,
-) -> Cell:
-    """Append the given cell at the end of the row. Repeated cells are
-    accepted. If no cell is given, an empty one is created.
-
-    Do not use when working on a table, use Table.append_cell().
-
-    Arguments:
-
-        cell -- Cell
-
-        _repeated -- (optional), repeated value of the row
-
-    returns the cell with x and y updated
-    """
-    if cell is None:
-        cell = Cell()
-        clone = False
-    if clone:
-        cell = cell.clone
-    self._append(cell)
-    if _repeated is None:
-        _repeated = cell.repeated or 1
-    self._rmap = insert_map_once(self._rmap, len(self._rmap), _repeated)
-    cell.x = self.width - 1
-    cell.y = self.y
-    return cell
-
-
-
-def append_cell(self, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Append the given cell at the end of the row. Repeated cells are -accepted. If no cell is given, an empty one is created.

-

Do not use when working on a table, use Table.append_cell().

-

Arguments

-

cell – Cell

-

_repeated – (optional), repeated value of the row

-

returns the cell with x and y updated

-
- -Expand source code - -
def append_cell(
-    self,
-    cell: Cell | None = None,
-    clone: bool = True,
-    _repeated: int | None = None,
-) -> Cell:
-    """Append the given cell at the end of the row. Repeated cells are
-    accepted. If no cell is given, an empty one is created.
-
-    Do not use when working on a table, use Table.append_cell().
-
-    Arguments:
-
-        cell -- Cell
-
-        _repeated -- (optional), repeated value of the row
-
-    returns the cell with x and y updated
-    """
-    if cell is None:
-        cell = Cell()
-        clone = False
-    if clone:
-        cell = cell.clone
-    self._append(cell)
-    if _repeated is None:
-        _repeated = cell.repeated or 1
-    self._rmap = insert_map_once(self._rmap, len(self._rmap), _repeated)
-    cell.x = self.width - 1
-    cell.y = self.y
-    return cell
-
-
-
-def delete_cell(self, x: int | str) ‑> None -
-
-

Delete the cell at the given position "x" starting from 0. -Alphabetical positions like "D" are accepted.

-

Cells on the right will be shifted to the left. In a table, other -rows remain unaffected.

-

Arguments

-

x – int or str

-
- -Expand source code - -
def delete_cell(self, x: int | str) -> None:
-    """Delete the cell at the given position "x" starting from 0.
-    Alphabetical positions like "D" are accepted.
-
-    Cells on the right will be shifted to the left. In a table, other
-    rows remain unaffected.
-
-    Arguments:
-
-        x -- int or str
-    """
-    x = self._translate_x_from_any(x)
-    if x >= self.width:
-        return
-    delete_item_in_vault(x, self, _xpath_cell_idx, "_rmap")
-
-
-
-def extend_cells(self, cells: Iterable[Cell] | None = None) ‑> None -
-
-
-
- -Expand source code - -
def extend_cells(self, cells: Iterable[Cell] | None = None) -> None:
-    if cells is None:
-        cells = []
-    self.extend(cells)
-    self._compute_row_cache()
-
-
-
-def get_cell(self, x: int, clone: bool = True) ‑> Cell | None -
-
-

Get the cell at position "x" starting from 0. Alphabetical -positions like "D" are accepted.

-

A -copy is returned, use set_cell() to push it back.

-

Arguments

-

x – int or str

-

Return: Cell | None

-
- -Expand source code - -
def get_cell(self, x: int, clone: bool = True) -> Cell | None:
-    """Get the cell at position "x" starting from 0. Alphabetical
-    positions like "D" are accepted.
-
-    A  copy is returned, use set_cell() to push it back.
-
-    Arguments:
-
-        x -- int or str
-
-    Return: Cell | None
-    """
-    x = self._translate_x_from_any(x)
-    cell = self._get_cell2(x, clone=clone)
-    if not cell:
-        return None
-    cell.y = self.y
-    cell.x = x
-    return cell
-
-
-
-def get_cells(self, coord: str | tuple | None = None, style: str | None = None, content: str | None = None, cell_type: str | None = None) ‑> odfdo.list[Cell] -
-
-

Get the list of cells matching the criteria.

-

Filter by cell_type, with cell_type 'all' will retrieve cells of any -type, aka non empty cells.

-

Filter by coordinates will retrieve the amount of cells defined by -'coord', minus the other filters.

-

Arguments

-

coord – str or tuple of int : coordinates

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

content – str regex

-

style – str

-

Return: list of Cell

-
- -Expand source code - -
def get_cells(
-    self,
-    coord: str | tuple | None = None,
-    style: str | None = None,
-    content: str | None = None,
-    cell_type: str | None = None,
-) -> list[Cell]:
-    """Get the list of cells matching the criteria.
-
-    Filter by cell_type, with cell_type 'all' will retrieve cells of any
-    type, aka non empty cells.
-
-    Filter by coordinates will retrieve the amount of cells defined by
-    'coord', minus the other filters.
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        content -- str regex
-
-        style -- str
-
-    Return: list of Cell
-    """
-    # fixme : not clones ?
-    if coord:
-        x, z = self._translate_row_coordinates(coord)
-    else:
-        x = None
-        z = None
-    if cell_type:
-        cell_type = cell_type.lower().strip()
-    cells: list[Cell] = []
-    for cell in self.traverse(start=x, end=z):
-        # Filter the cells by cell_type
-        if cell_type:
-            ctype = cell.type
-            if not ctype or not (ctype == cell_type or cell_type == "all"):
-                continue
-        # Filter the cells with the regex
-        if content and not cell.match(content):
-            continue
-        # Filter the cells with the style
-        if style and style != cell.style:
-            continue
-        cells.append(cell)
-    return cells
-
-
-
-def get_value(self, x: int | str, get_type: bool = False) ‑> typing.Any | tuple[typing.Any, str] -
-
-

Shortcut to get the value of the cell at position "x". -If get_type is True, returns the tuples (value, ODF type).

-

If the cell is empty, returns None or (None, None)

-

See get_cell() and Cell.get_value().

-
- -Expand source code - -
def get_value(
-    self,
-    x: int | str,
-    get_type: bool = False,
-) -> Any | tuple[Any, str]:
-    """Shortcut to get the value of the cell at position "x".
-    If get_type is True, returns the tuples (value, ODF type).
-
-    If the cell is empty, returns None or (None, None)
-
-    See get_cell() and Cell.get_value().
-    """
-    if get_type:
-        x = self._translate_x_from_any(x)
-        cell = self._get_cell2_base(x)
-        if cell is None:
-            return (None, None)
-        return cell.get_value(get_type=get_type)
-    x = self._translate_x_from_any(x)
-    cell = self._get_cell2_base(x)
-    if cell is None:
-        return None
-    return cell.get_value()
-
-
-
-def get_values(self, coord: str | tuple | None = None, cell_type: str | None = None, complete: bool = False, get_type: bool = False) ‑> odfdo.list[typing.Any | tuple[typing.Any, typing.Any]] -
-
-

Shortcut to get the cell values in this row.

-

Filter by cell_type, with cell_type 'all' will retrieve cells of any -type, aka non empty cells. -If cell_type is used and complete is True, missing values are -replaced by None. -If cell_type is None, complete is always True : with no cell type -queried, get_values() returns None for each empty cell, the length -of the list is equal to the length of the row (depending on -coordinates use).

-

If get_type is True, returns a tuple (value, ODF type of value), or -(None, None) for empty cells if complete is True.

-

Filter by coordinates will retrieve the amount of cells defined by -coordinates with None for empty cells, except when using cell_type.

-

Arguments

-

coord – str or tuple of int : coordinates in row

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

complete – boolean

-

get_type – boolean

-

Return: list of Python types, or list of tuples.

-
- -Expand source code - -
def get_values(
-    self,
-    coord: str | tuple | None = None,
-    cell_type: str | None = None,
-    complete: bool = False,
-    get_type: bool = False,
-) -> list[Any | tuple[Any, Any]]:
-    """Shortcut to get the cell values in this row.
-
-    Filter by cell_type, with cell_type 'all' will retrieve cells of any
-    type, aka non empty cells.
-    If cell_type is used and complete is True, missing values are
-    replaced by None.
-    If cell_type is None, complete is always True : with no cell type
-    queried, get_values() returns None for each empty cell, the length
-    of the list is equal to the length of the row (depending on
-    coordinates use).
-
-    If get_type is True, returns a tuple (value, ODF type of value), or
-    (None, None) for empty cells if complete is True.
-
-    Filter by coordinates will retrieve the amount of cells defined by
-    coordinates with None for empty cells, except when using cell_type.
-
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates in row
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        complete -- boolean
-
-        get_type -- boolean
-
-    Return: list of Python types, or list of tuples.
-    """
-    if coord:
-        x, z = self._translate_row_coordinates(coord)
-    else:
-        x = None
-        z = None
-    if cell_type:
-        cell_type = cell_type.lower().strip()
-        values: list[Any | tuple[Any, Any]] = []
-        for cell in self.traverse(start=x, end=z):
-            # Filter the cells by cell_type
-            ctype = cell.type
-            if not ctype or not (ctype == cell_type or cell_type == "all"):
-                if complete:
-                    if get_type:
-                        values.append((None, None))
-                    else:
-                        values.append(None)
-                continue
-            values.append(cell.get_value(get_type=get_type))
-        return values
-    else:
-        return [
-            cell.get_value(get_type=get_type)
-            for cell in self.traverse(start=x, end=z)
-        ]
-
-
-
-def insert_cell(self, x: int | str, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Insert the given cell at position "x" starting from 0. If no cell -is given, an empty one is created.

-

Alphabetical positions like "D" are accepted.

-

Do not use when working on a table, use Table.insert_cell().

-

Arguments

-

x – int or str

-

cell – Cell

-

returns the cell with x and y updated

-
- -Expand source code - -
def insert_cell(
-    self,
-    x: int | str,
-    cell: Cell | None = None,
-    clone: bool = True,
-) -> Cell:
-    """Insert the given cell at position "x" starting from 0. If no cell
-    is given, an empty one is created.
-
-    Alphabetical positions like "D" are accepted.
-
-    Do not use when working on a table, use Table.insert_cell().
-
-    Arguments:
-
-        x -- int or str
-
-        cell -- Cell
-
-    returns the cell with x and y updated
-    """
-    cell_back: Cell
-    if cell is None:
-        cell = Cell()
-    x = self._translate_x_from_any(x)
-    # Outside the defined row
-    diff = x - self.width
-    if diff < 0:
-        insert_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap")
-        cell.x = x
-        cell.y = self.y
-        cell_back = cell
-    elif diff == 0:
-        cell_back = self.append_cell(cell, clone=clone)
-    else:
-        self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
-        cell_back = self.append_cell(cell, clone=clone)
-    return cell_back
-
-
-
-def is_empty(self, aggressive: bool = False) ‑> bool -
-
-

Return whether every cell in the row has no value or the value -evaluates to False (empty string), and no style.

-

If aggressive is True, empty cells with style are considered empty.

-

Arguments

-

aggressive – bool

-

Return: bool

-
- -Expand source code - -
def is_empty(self, aggressive: bool = False) -> bool:
-    """Return whether every cell in the row has no value or the value
-    evaluates to False (empty string), and no style.
-
-    If aggressive is True, empty cells with style are considered empty.
-
-    Arguments:
-
-        aggressive -- bool
-
-    Return: bool
-    """
-    return all(cell.is_empty(aggressive=aggressive) for cell in self._get_cells())  # type: ignore
-
-
-
-def rstrip(self, aggressive: bool = False) ‑> None -
-
-

Remove in-place empty cells at the right of the row. An empty -cell has no value but can have style. If "aggressive" is True, style -is ignored.

-

Arguments

-

aggressive – bool

-
- -Expand source code - -
def rstrip(self, aggressive: bool = False) -> None:
-    """Remove *in-place* empty cells at the right of the row. An empty
-    cell has no value but can have style. If "aggressive" is True, style
-    is ignored.
-
-    Arguments:
-
-        aggressive -- bool
-    """
-    for cell in reversed(self._get_cells()):
-        if not cell.is_empty(aggressive=aggressive):  # type: ignore
-            break
-        self.delete(cell)
-    self._compute_row_cache()
-    self._indexes["_rmap"] = {}
-
-
-
-def set_cell(self, x: int | str, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Push the cell back in the row at position "x" starting from 0. -Alphabetical positions like "D" are accepted.

-

Arguments

-

x – int or str

-

returns the cell with x and y updated

-
- -Expand source code - -
def set_cell(
-    self,
-    x: int | str,
-    cell: Cell | None = None,
-    clone: bool = True,
-) -> Cell:
-    """Push the cell back in the row at position "x" starting from 0.
-    Alphabetical positions like "D" are accepted.
-
-    Arguments:
-
-        x -- int or str
-
-    returns the cell with x and y updated
-    """
-    cell_back: Cell
-    if cell is None:
-        cell = Cell()
-        repeated = 1
-        clone = False
-    else:
-        repeated = cell.repeated or 1
-    x = self._translate_x_from_any(x)
-    # Outside the defined row
-    diff = x - self.width
-    if diff == 0:
-        cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
-    elif diff > 0:
-        self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
-        cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
-    else:
-        # Inside the defined row
-        set_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap", clone=clone)
-        cell.x = x
-        cell.y = self.y
-        cell_back = cell
-    return cell_back
-
-
-
-def set_cells(self, cells: odfdo.list[Cell] | tuple[Cell] | None = None, start: int | str = 0, clone: bool = True) ‑> None -
-
-

Set the cells in the row, from the 'start' column. -This method does not clear the row, use row.clear() before to start -with an empty row.

-

Arguments

-

cells – list of cells

-

start – int or str

-
- -Expand source code - -
def set_cells(
-    self,
-    cells: list[Cell] | tuple[Cell] | None = None,
-    start: int | str = 0,
-    clone: bool = True,
-) -> None:
-    """Set the cells in the row, from the 'start' column.
-    This method does not clear the row, use row.clear() before to start
-    with an empty row.
-
-    Arguments:
-
-        cells -- list of cells
-
-        start -- int or str
-    """
-    if cells is None:
-        cells = []
-    if start is None:
-        start = 0
-    else:
-        start = self._translate_x_from_any(start)
-    if start == 0 and clone is False and (len(cells) >= self.width):
-        self.clear()
-        self.extend_cells(cells)
-    else:
-        x = start
-        for cell in cells:
-            self.set_cell(x, cell, clone=clone)
-            if cell:
-                x += cell.repeated or 1
-            else:
-                x += 1
-
-
-
-def set_value(self, x: int | str, value: Any, style: str | None = None, cell_type: str | None = None, currency: str | None = None) ‑> None -
-
-

Shortcut to set the value of the cell at position "x".

-

Arguments

-

x – int or str

-

value – Python type

-

cell_type – 'boolean', 'currency', 'date', 'float', 'percentage', -'string' or 'time'

-

currency – three-letter str

-

style – str

-

See get_cell() and Cell.get_value().

-
- -Expand source code - -
def set_value(
-    self,
-    x: int | str,
-    value: Any,
-    style: str | None = None,
-    cell_type: str | None = None,
-    currency: str | None = None,
-) -> None:
-    """Shortcut to set the value of the cell at position "x".
-
-    Arguments:
-
-        x -- int or str
-
-        value -- Python type
-
-        cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                 'string' or 'time'
-
-        currency -- three-letter str
-
-        style -- str
-
-    See get_cell() and Cell.get_value().
-    """
-    self.set_cell(
-        x,
-        Cell(value, style=style, cell_type=cell_type, currency=currency),
-        clone=False,
-    )
-
-
-
-def set_values(self, values: odfdo.list[Any], start: int | str = 0, style: str | None = None, cell_type: str | None = None, currency: str | None = None) ‑> None -
-
-

Shortcut to set the value of cells in the row, from the 'start' -column vith values. -This method does not clear the row, use row.clear() before to start -with an empty row.

-

Arguments

-

values – list of Python types

-

start – int or str

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency' or 'percentage'

-

currency – three-letter str

-

style – cell style

-
- -Expand source code - -
def set_values(
-    self,
-    values: list[Any],
-    start: int | str = 0,
-    style: str | None = None,
-    cell_type: str | None = None,
-    currency: str | None = None,
-) -> None:
-    """Shortcut to set the value of cells in the row, from the 'start'
-    column vith values.
-    This method does not clear the row, use row.clear() before to start
-    with an empty row.
-
-    Arguments:
-
-        values -- list of Python types
-
-        start -- int or str
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency' or 'percentage'
-
-        currency -- three-letter str
-
-        style -- cell style
-    """
-    # fixme : if values n, n+ are same, use repeat
-    if start is None:
-        start = 0
-    else:
-        start = self._translate_x_from_any(start)
-    if start == 0 and (len(values) >= self.width):
-        self.clear()
-        cells = [
-            Cell(value, style=style, cell_type=cell_type, currency=currency)
-            for value in values
-        ]
-        self.extend_cells(cells)
-    else:
-        x = start
-        for value in values:
-            self.set_cell(
-                x,
-                Cell(value, style=style, cell_type=cell_type, currency=currency),
-                clone=False,
-            )
-            x += 1
-
-
-
-def traverse(self, start: int | None = None, end: int | None = None) ‑> collections.abc.Iterator[Cell] -
-
-

Yield as many cell elements as expected cells in the row, i.e. -expand repetitions by returning the same cell as many times as -necessary.

-
Arguments:
-
-    start -- int
-
-    end -- int
-
-

Copies are returned, use set_cell() to push them back.

-
- -Expand source code - -
def traverse(  # noqa: C901
-    self,
-    start: int | None = None,
-    end: int | None = None,
-) -> Iterator[Cell]:
-    """Yield as many cell elements as expected cells in the row, i.e.
-    expand repetitions by returning the same cell as many times as
-    necessary.
-
-        Arguments:
-
-            start -- int
-
-            end -- int
-
-    Copies are returned, use set_cell() to push them back.
-    """
-    idx = -1
-    before = -1
-    x = 0
-    cell: Cell
-    if start is None and end is None:
-        for juska in self._rmap:
-            idx += 1
-            if idx in self._indexes["_rmap"]:
-                cell = self._indexes["_rmap"][idx]
-            else:
-                cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
-                if not isinstance(cell, Cell):
-                    raise TypeError(f"Not a cell: {cell!r}")
-                self._indexes["_rmap"][idx] = cell
-            repeated = juska - before
-            before = juska
-            for _i in range(repeated or 1):
-                # Return a copy without the now obsolete repetition
-                if cell is None:
-                    cell = Cell()
-                else:
-                    cell = cell.clone
-                    if repeated > 1:
-                        cell.repeated = None
-                cell.y = self.y
-                cell.x = x
-                x += 1
-                yield cell
-    else:
-        if start is None:
-            start = 0
-        start = max(0, start)
-        if end is None:
-            try:
-                end = self._rmap[-1]
-            except Exception:
-                end = -1
-        start_map = find_odf_idx(self._rmap, start)
-        if start_map is None:
-            return
-        if start_map > 0:
-            before = self._rmap[start_map - 1]
-        idx = start_map - 1
-        before = start - 1
-        x = start
-        for juska in self._rmap[start_map:]:
-            idx += 1
-            if idx in self._indexes["_rmap"]:
-                cell = self._indexes["_rmap"][idx]
-            else:
-                cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
-                if not isinstance(cell, Cell):
-                    raise TypeError(f"Not a cell: {cell!r}")
-                self._indexes["_rmap"][idx] = cell
-            repeated = juska - before
-            before = juska
-            for _i in range(repeated or 1):
-                if x <= end:
-                    if cell is None:
-                        cell = Cell()
-                    else:
-                        cell = cell.clone
-                        if repeated > 1 or (x == start and start > 0):
-                            cell.repeated = None
-                    cell.y = self.y
-                    cell.x = x
-                    x += 1
-                    yield cell
-
-
-
-

Inherited members

- -
-
-class RowGroup -(height: int | None = None, width: int | None = None, **kwargs: Any) -
-
-

"table:table-row-group" group rows with common properties.

-

Create a group of rows, optionnaly filled with "height" number of -rows, of "width" cells each.

-

Row group bear style information applied to a series of rows.

-

Arguments

-

height – int

-

width – int

-
- -Expand source code - -
class RowGroup(Element):
-    """ "table:table-row-group" group rows with common properties."""
-
-    # TODO
-    _tag = "table:table-row-group"
-    _caching = True
-
-    def __init__(
-        self,
-        height: int | None = None,
-        width: int | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a group of rows, optionnaly filled with "height" number of
-        rows, of "width" cells each.
-
-        Row group bear style information applied to a series of rows.
-
-        Arguments:
-
-            height -- int
-
-            width -- int
-        """
-        super().__init__(**kwargs)
-        if self._do_init and height is not None:
-            for _i in range(height):
-                row = Row(width=width)
-                self.append(row)
-
-

Ancestors

- -

Inherited members

- -
-
-class Section -(style: str | None = None, name: str | None = None, **kwargs: Any) -
-
-

ODF section "text:section"

-

Arguments

-

style – str

-

name – str

-
- -Expand source code - -
class Section(Element):
-    """ODF section "text:section"
-
-    Arguments:
-
-        style -- str
-
-        name -- str
-    """
-
-    _tag = "text:section"
-    _properties = (
-        PropDef("style", "text:style-name"),
-        PropDef("name", "text:name"),
-    )
-
-    def __init__(
-        self,
-        style: str | None = None,
-        name: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style:
-                self.style = style
-            if name:
-                self.name = name
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        result = [element.get_formatted_text(context) for element in self.children]
-        result.append("\n")
-        return "".join(result)
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class Spacer -(number: int = 1, **kwargs: Any) -
-
-

This element shall be used to represent the second and all following “ “ -(U+0020, SPACE) characters in a sequence of “ “ (U+0020, SPACE) characters. -Note: It is not an error if the character preceding the element is not a -white space character, but it is good practice to use this element only for -the second and all following SPACE characters in a sequence.

-

Arguments

-

number – int

-
- -Expand source code - -
class Spacer(Element):
-    """This element shall be used to represent the second and all following “ “
-    (U+0020, SPACE) characters in a sequence of “ “ (U+0020, SPACE) characters.
-    Note: It is not an error if the character preceding the element is not a
-    white space character, but it is good practice to use this element only for
-    the second and all following SPACE characters in a sequence.
-    """
-
-    _tag = "text:s"
-    _properties: tuple[PropDef, ...] = (PropDef("number", "text:c"),)
-
-    def __init__(self, number: int = 1, **kwargs: Any):
-        """
-        Arguments:
-
-            number -- int
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.number = str(number)
-
-

Ancestors

- -

Instance variables

-
-
var number : str | bool | None
-
-

Get/set the attribute text:c

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class Span -(text: str | None = None, style: str | None = None, **kwargs: Any) -
-
-

Create a span element "text:span" of the given style containing the optional -given text.

-

Arguments

-

text – str

-

style – str

-
- -Expand source code - -
class Span(Paragraph):
-    """Create a span element "text:span" of the given style containing the optional
-    given text.
-    """
-
-    _tag = "text:span"
-    _properties = (
-        PropDef("style", "text:style-name"),
-        PropDef("class_names", "text:class-names"),
-    )
-
-    def __init__(
-        self,
-        text: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """
-        Arguments:
-
-            text -- str
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if text:
-                self.text = text
-            if style:
-                self.style = style
-
-

Ancestors

- -

Instance variables

-
-
var class_names : str | bool | None
-
-

Get/set the attribute text:class-names

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class Style -(family: str | None = None, name: str | None = None, display_name: str | None = None, parent_style: str | None = None, area: str | None = None, color: str | tuple | None = None, background_color: str | tuple | None = None, italic: bool = False, bold: bool = False, master_page: str | None = None, page_layout: str | None = None, next_style: str | None = None, data_style: str | None = None, border: str | None = None, border_top: str | None = None, border_right: str | None = None, border_bottom: str | None = None, border_left: str | None = None, padding: str | None = None, padding_top: str | None = None, padding_bottom: str | None = None, padding_left: str | None = None, padding_right: str | None = None, shadow: str | None = None, height: str | None = None, use_optimal_height: bool = False, width: str | None = None, break_before: str | None = None, break_after: str | None = None, min_height: str | None = None, font_name: str | None = None, font_family: str | None = None, font_family_generic: str | None = None, font_pitch: str = 'variable', **kwargs: Any) -
-
-

Style class for all these tags:

-

'style:style' -'number:date-style', -'number:number-style', -'number:percentage-style', -'number:time-style' -'style:font-face', -'style:master-page', -'style:page-layout', -'style:presentation-page-layout', -'text:list-style', -'text:outline-style', -'style:tab-stops', -…

-

Create a style of the given family. The name is not mandatory at this -point but will become required when inserting in a document as a common -style.

-

The display name is the name the user sees in an office application.

-

The parent_style is the name of the style this style will inherit from.

-

To set properties, pass them as keyword arguments. The area properties -apply to is optional and defaults to the family.

-

Arguments

-

family – 'paragraph', 'text', 'section', 'table', 'table-column', -'table-row', 'table-cell', 'table-page', 'chart', -'drawing-page', 'graphic', 'presentation', -'control', 'ruby', 'list', 'number', 'page-layout' -'font-face', or 'master-page'

-

name – str

-

display_name – str

-

parent_style – str

-

area – str

-

'text' Properties:

-
italic -- bool
-
-bold -- bool
-
-

'paragraph' Properties:

-
master_page -- str
-
-

'master-page' Properties:

-
page_layout -- str
-
-next_style -- str
-
-

'table-cell' Properties:

-
border, border_top, border_right, border_bottom, border_left -- str,
-e.g. "0.002cm solid #000000" or 'none'
-
-padding, padding_top, padding_right, padding_bottom, padding_left -- str,
-e.g. "0.002cm" or 'none'
-
-shadow -- str, e.g. "#808080 0.176cm 0.176cm"
-
-

'table-row' Properties:

-
height -- str, e.g. '5cm'
-
-use_optimal_height -- bool
-
-

'table-column' Properties:

-
width -- str, e.g. '5cm'
-
-break_before -- 'page', 'column' or 'auto'
-
-break_after -- 'page', 'column' or 'auto'
-
-
- -Expand source code - -
class Style(Element):
-    """Style class for all these tags:
-
-    'style:style'
-    'number:date-style',
-    'number:number-style',
-    'number:percentage-style',
-    'number:time-style'
-    'style:font-face',
-    'style:master-page',
-    'style:page-layout',
-    'style:presentation-page-layout',
-    'text:list-style',
-    'text:outline-style',
-    'style:tab-stops',
-    ...
-    """
-
-    _properties: tuple[PropDef, ...] = (
-        PropDef("page_layout", "style:page-layout-name", "master-page"),
-        PropDef("next_style", "style:next-style-name", "master-page"),
-        PropDef("name", "style:name"),
-        PropDef("parent_style", "style:parent-style-name"),
-        PropDef("display_name", "style:display-name"),
-        PropDef("svg_font_family", "svg:font-family"),
-        PropDef("font_family_generic", "style:font-family-generic"),
-        PropDef("font_pitch", "style:font-pitch"),
-        PropDef("text_style", "text:style-name"),
-        PropDef("master_page", "style:master-page-name", "paragraph"),
-        PropDef("master_page", "style:master-page-name", "paragraph"),
-        PropDef("master_page", "style:master-page-name", "paragraph"),
-        # style:tab-stop
-        PropDef("style_type", "style:type"),
-        PropDef("leader_style", "style:leader-style"),
-        PropDef("leader_text", "style:leader-text"),
-        PropDef("style_position", "style:position"),
-        PropDef("leader_text", "style:position"),
-    )
-
-    def __init__(  # noqa: C901
-        self,
-        family: str | None = None,
-        name: str | None = None,
-        display_name: str | None = None,
-        parent_style: str | None = None,
-        # Where properties apply
-        area: str | None = None,
-        # For family 'text':
-        color: str | tuple | None = None,
-        background_color: str | tuple | None = None,
-        italic: bool = False,
-        bold: bool = False,
-        # For family 'paragraph'
-        master_page: str | None = None,
-        # For family 'master-page'
-        page_layout: str | None = None,
-        next_style: str | None = None,
-        # For family 'table-cell'
-        data_style: str | None = None,  # unused
-        border: str | None = None,
-        border_top: str | None = None,
-        border_right: str | None = None,
-        border_bottom: str | None = None,
-        border_left: str | None = None,
-        padding: str | None = None,
-        padding_top: str | None = None,
-        padding_bottom: str | None = None,
-        padding_left: str | None = None,
-        padding_right: str | None = None,
-        shadow: str | None = None,
-        # For family 'table-row'
-        height: str | None = None,
-        use_optimal_height: bool = False,
-        # For family 'table-column'
-        width: str | None = None,
-        break_before: str | None = None,
-        break_after: str | None = None,
-        # For family 'graphic'
-        min_height: str | None = None,
-        # For family 'font-face'
-        font_name: str | None = None,
-        font_family: str | None = None,
-        font_family_generic: str | None = None,
-        font_pitch: str = "variable",
-        # Every other property
-        **kwargs: Any,
-    ) -> None:
-        """Create a style of the given family. The name is not mandatory at this
-        point but will become required when inserting in a document as a common
-        style.
-
-        The display name is the name the user sees in an office application.
-
-        The parent_style is the name of the style this style will inherit from.
-
-        To set properties, pass them as keyword arguments. The area properties
-        apply to is optional and defaults to the family.
-
-        Arguments:
-
-            family -- 'paragraph', 'text', 'section', 'table', 'table-column',
-                      'table-row', 'table-cell', 'table-page', 'chart',
-                      'drawing-page', 'graphic', 'presentation',
-                      'control', 'ruby', 'list', 'number', 'page-layout'
-                      'font-face', or 'master-page'
-
-            name -- str
-
-            display_name -- str
-
-            parent_style -- str
-
-            area -- str
-
-        'text' Properties:
-
-            italic -- bool
-
-            bold -- bool
-
-        'paragraph' Properties:
-
-            master_page -- str
-
-        'master-page' Properties:
-
-            page_layout -- str
-
-            next_style -- str
-
-        'table-cell' Properties:
-
-            border, border_top, border_right, border_bottom, border_left -- str,
-            e.g. "0.002cm solid #000000" or 'none'
-
-            padding, padding_top, padding_right, padding_bottom, padding_left -- str,
-            e.g. "0.002cm" or 'none'
-
-            shadow -- str, e.g. "#808080 0.176cm 0.176cm"
-
-        'table-row' Properties:
-
-            height -- str, e.g. '5cm'
-
-            use_optimal_height -- bool
-
-        'table-column' Properties:
-
-            width -- str, e.g. '5cm'
-
-            break_before -- 'page', 'column' or 'auto'
-
-            break_after -- 'page', 'column' or 'auto'
-        """
-        self._family: str | None = None
-        tag_or_elem = kwargs.get("tag_or_elem", None)
-        if tag_or_elem is None:
-            family = to_str(family)
-            if family not in FAMILY_MAPPING:
-                raise ValueError("Unknown family value: %s" % family)
-            kwargs["tag"] = FAMILY_MAPPING[family]
-        super().__init__(**kwargs)
-        if self._do_init and family not in SUBCLASSED_STYLES:
-            kwargs.pop("tag", None)
-            kwargs.pop("tag_or_elem", None)
-            self.family = family  # relevant test made by property
-            # Common attributes
-            if name:
-                self.name = name
-            if display_name:
-                self.display_name = display_name
-            if parent_style:
-                self.parent_style = parent_style
-            # Paragraph
-            if family == "paragraph":
-                if master_page:
-                    self.master_page = master_page
-            # Master Page
-            elif family == "master-page":
-                if page_layout:
-                    self.page_layout = page_layout
-                if next_style:
-                    self.next_style = next_style
-            # Font face
-            elif family == "font-face":
-                if not font_name:
-                    raise ValueError("A font_name is required for 'font-face' style")
-                self.set_font(
-                    font_name,
-                    family=font_family,
-                    family_generic=font_family_generic,
-                    pitch=font_pitch,
-                )
-            # Properties
-            if area is None:
-                area = family
-            area = to_str(area)
-            # Text
-            if area == "text":
-                if color:
-                    kwargs["fo:color"] = color
-                if background_color:
-                    kwargs["fo:background-color"] = background_color
-                if italic:
-                    kwargs["fo:font-style"] = "italic"
-                    kwargs["style:font-style-asian"] = "italic"
-                    kwargs["style:font-style-complex"] = "italic"
-                if bold:
-                    kwargs["fo:font-weight"] = "bold"
-                    kwargs["style:font-weight-asian"] = "bold"
-                    kwargs["style:font-weight-complex"] = "bold"
-            # Table cell
-            elif area == "table-cell":
-                if border:
-                    kwargs["fo:border"] = border
-                elif border_top or border_right or border_bottom or border_left:
-                    kwargs["fo:border-top"] = border_top or "none"
-                    kwargs["fo:border-right"] = border_right or "none"
-                    kwargs["fo:border-bottom"] = border_bottom or "none"
-                    kwargs["fo:border-left"] = border_left or "none"
-                else:  # no border_top, ... neither border are defined
-                    pass  # left untouched
-                if padding:
-                    kwargs["fo:padding"] = padding
-                elif padding_top or padding_right or padding_bottom or padding_left:
-                    kwargs["fo:padding-top"] = padding_top or "none"
-                    kwargs["fo:padding-right"] = padding_right or "none"
-                    kwargs["fo:padding-bottom"] = padding_bottom or "none"
-                    kwargs["fo:padding-left"] = padding_left or "none"
-                else:  # no border_top, ... neither border are defined
-                    pass  # left untouched
-                if shadow:
-                    kwargs["style:shadow"] = shadow
-                if background_color:
-                    kwargs["fo:background-color"] = background_color
-            # Table row
-            elif area == "table-row":
-                if height:
-                    kwargs["style:row-height"] = height
-                if use_optimal_height:
-                    kwargs["style:use-optimal-row-height"] = Boolean.encode(
-                        use_optimal_height
-                    )
-                if background_color:
-                    kwargs["fo:background-color"] = background_color
-            # Table column
-            elif area == "table-column":
-                if width:
-                    kwargs["style:column-width"] = width
-                if break_before:
-                    kwargs["fo:break-before"] = break_before
-                if break_after:
-                    kwargs["fo:break-after"] = break_after
-            # Graphic
-            elif area == "graphic":
-                if min_height:
-                    kwargs["fo:min-height"] = min_height
-            # Every other properties
-            if kwargs:
-                self.set_properties(kwargs, area=area)
-
-    @property
-    def family(self) -> str | None:
-        if self._family is None:
-            self._family = FALSE_FAMILY_MAP_REVERSE.get(
-                self.tag, self.get_attribute_string("style:family")
-            )
-        return self._family
-
-    @family.setter
-    def family(self, family: str | None) -> None:
-        self._family = family
-        if family in FAMILY_ODF_STD and self.tag == "style:style":
-            self.set_attribute("style:family", family)
-
-    def get_properties(self, area: str | None = None) -> dict[str, str | dict] | None:
-        """Get the mapping of all properties of this style. By default the
-        properties of the same family, e.g. a paragraph style and its
-        paragraph properties. Specify the area to get the text properties of
-        a paragraph style for example.
-
-        Arguments:
-
-            area -- str
-
-        Return: dict
-        """
-        if area is None:
-            area = self.family
-        element = self.get_element(f"style:{area}-properties")
-        if element is None:
-            return None
-        properties: dict[str, str | dict] = element.attributes  # type: ignore
-        # Nested properties are nested dictionaries
-        for child in element.children:
-            properties[child.tag] = child.attributes
-        return properties
-
-    def set_properties(  # noqa: C901
-        self,
-        properties: dict[str, str | dict] | None = None,
-        style: Style | None = None,
-        area: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Set the properties of the "area" type of this style. Properties
-        are given either as a dict or as named arguments (or both). The area
-        is identical to the style family by default. If the properties
-        element is missing, it is created.
-
-        Instead of properties, you can pass a style with properties of the
-        same area. These will be copied.
-
-        Arguments:
-
-            properties -- dict
-
-            style -- Style
-
-            area -- 'paragraph', 'text'...
-        """
-        if properties is None:
-            properties = {}
-        if area is None:
-            if isinstance(self.family, bool):
-                area = None
-            else:
-                area = self.family
-        element = self.get_element(f"style:{area}-properties")
-        if element is None:
-            element = Element.from_tag(f"style:{area}-properties")
-            self.append(element)
-        if properties or kwargs:
-            properties = _expand_properties_dict(_merge_dicts(properties, kwargs))
-        elif style is not None:
-            properties = style.get_properties(area=area)
-            if properties is None:
-                return
-        if properties is None:
-            return
-        for key, value in properties.items():
-            if value is None:
-                element.del_attribute(key)
-            elif isinstance(value, (str, bool)):
-                element.set_attribute(key, value)
-            else:
-                pass
-
-    def del_properties(
-        self,
-        properties: list[str] | None = None,
-        area: str | None = None,
-    ) -> None:
-        """Delete the given properties, either by list argument or
-        positional argument (or both). Remove only from the given area,
-        identical to the style family by default.
-
-        Arguments:
-
-            properties -- list
-
-            area -- str
-        """
-        if properties is None:
-            properties = []
-        if area is None:
-            area = self.family
-        element = self.get_element(f"style:{area}-properties")
-        if element is None:
-            raise ValueError(
-                f"properties element is inexistent for: style:{area}-properties"
-            )
-        for key in _expand_properties_list(properties):
-            element.del_attribute(key)
-
-    def set_background(  # noqa: C901
-        self,
-        color: str | None = None,
-        url: str | None = None,
-        position: str | None = "center",
-        repeat: str | None = None,
-        opacity: str | None = None,
-        filter: str | None = None,  # noqa: A002
-    ) -> None:
-        """Set the background color of a text style, or the background color
-        or image of a paragraph style or page layout.
-
-        With no argument, remove any existing background.
-
-        The position is one or two of 'center', 'left', 'right', 'top' or
-        'bottom'.
-
-        The repeat is 'no-repeat', 'repeat' or 'stretch'.
-
-        The opacity is a percentage integer (not a string with the '%s' sign)
-
-        The filter is an application-specific filter name defined elsewhere.
-
-        Though this method is defined on the base style class, it will raise
-        an error if the style type is not compatible.
-
-        Arguments:
-
-            color -- '#rrggbb'
-
-            url -- str
-
-            position -- str
-
-            repeat -- str
-
-            opacity -- int
-
-            filter -- str
-        """
-        family = self.family
-        if family not in {
-            "text",
-            "paragraph",
-            "page-layout",
-            "section",
-            "table",
-            "table-row",
-            "table-cell",
-            "graphic",
-        }:
-            raise TypeError("No background support for this family")
-        if url is not None and family == "text":
-            raise TypeError("No background image for text styles")
-        properties = self.get_element(f"style:{family}-properties")
-        bg_image: BackgroundImage | None = None
-        if properties is not None:
-            bg_image = properties.get_element("style:background-image")  # type:ignore
-        # Erasing
-        if color is None and url is None:
-            if properties is None:
-                return
-            properties.del_attribute("fo:background-color")
-            if bg_image is not None:
-                properties.delete(bg_image)
-            return
-        # Add the properties if necessary
-        if properties is None:
-            properties = Element.from_tag(f"style:{family}-properties")
-            self.append(properties)
-        # Add the color...
-        if color:
-            properties.set_attribute("fo:background-color", color)
-            if bg_image is not None:
-                properties.delete(bg_image)
-        # ... or the background
-        elif url:
-            properties.set_attribute("fo:background-color", "transparent")
-            if bg_image is None:
-                bg_image = Element.from_tag("style:background-image")  # type:ignore
-                properties.append(bg_image)  # type:ignore
-            bg_image.url = url  # type:ignore
-            if position:
-                bg_image.position = position  # type:ignore
-            if repeat:
-                bg_image.repeat = repeat  # type:ignore
-            if opacity:
-                bg_image.opacity = opacity  # type:ignore
-            if filter:
-                bg_image.filter = filter  # type:ignore
-
-    # list-style only:
-
-    def get_level_style(self, level: int) -> Style | None:
-        if self.family != "list":
-            return None
-        level_styles = (
-            "(text:list-level-style-number"
-            "|text:list-level-style-bullet"
-            "|text:list-level-style-image)"
-        )
-        return self._filtered_element(level_styles, 0, level=level)  # type: ignore
-
-    def set_level_style(  # noqa: C901
-        self,
-        level: int,
-        num_format: str | None = None,
-        bullet_char: str | None = None,
-        url: str | None = None,
-        display_levels: int | None = None,
-        prefix: str | None = None,
-        suffix: str | None = None,
-        start_value: int | None = None,
-        style: str | None = None,
-        clone: Style | None = None,
-    ) -> Style | None:
-        """
-        Arguments:
-
-            level -- int
-
-            num_format (for number) -- int
-
-            bullet_char (for bullet) -- str
-
-            url (for image) -- str
-
-            display_levels -- int
-
-            prefix -- str
-
-            suffix -- str
-
-            start_value -- int
-
-            style -- str
-
-            clone -- List Style
-
-        Return:
-            level_style created
-        """
-        if self.family != "list":
-            return None
-        # Expected name
-        if num_format is not None:
-            level_style_name = "text:list-level-style-number"
-        elif bullet_char is not None:
-            level_style_name = "text:list-level-style-bullet"
-        elif url is not None:
-            level_style_name = "text:list-level-style-image"
-        elif clone is not None:
-            level_style_name = clone.tag
-        else:
-            raise ValueError("unknown level style type")
-        was_created = False
-        # Cloning or reusing an existing element
-        level_style: Style | None = None
-        if clone is not None:
-            level_style = clone.clone  # type: ignore
-            was_created = True
-        else:
-            level_style = self.get_level_style(level)
-            if level_style is None:
-                level_style = Element.from_tag(level_style_name)  # type: ignore
-                was_created = True
-        if level_style is None:
-            return None
-        # Transmute if the type changed
-        if level_style.tag != level_style_name:
-            print("Warn: different style", level_style_name, level_style.tag)
-            level_style.tag = level_style_name
-        # Set the level
-        level_style.set_attribute("text:level", str(level))
-        # Set the main attribute
-        if num_format is not None:
-            level_style.set_attribute("fo:num-format", num_format)
-        elif bullet_char is not None:
-            level_style.set_attribute("text:bullet-char", bullet_char)
-        elif url is not None:
-            level_style.set_attribute("xlink:href", url)
-        # Set attributes
-        if prefix:
-            level_style.set_attribute("style:num-prefix", prefix)
-        if suffix:
-            level_style.set_attribute("style:num-suffix", suffix)
-        if display_levels:
-            level_style.set_attribute("text:display-levels", str(display_levels))
-        if start_value:
-            level_style.set_attribute("text:start-value", str(start_value))
-        if style:
-            level_style.text_style = style  # type: ignore
-        # Commit the creation
-        if was_created:
-            self.append(level_style)
-        return level_style
-
-    # page-layout only:
-
-    def get_header_style(self) -> Element | None:
-        if self.family != "page-layout":
-            return None
-        return self.get_element("style:header-style")
-
-    def set_header_style(self, new_style: Style) -> None:
-        if self.family != "page-layout":
-            return
-        header_style = self.get_header_style()
-        if header_style is not None:
-            self.delete(header_style)
-        self.append(new_style)
-
-    def get_footer_style(self) -> Style | None:
-        if self.family != "page-layout":
-            return None
-        return self.get_element("style:footer-style")  # type: ignore
-
-    def set_footer_style(self, new_style: Style) -> None:
-        if self.family != "page-layout":
-            return
-        footer_style = self.get_footer_style()
-        if footer_style is not None:
-            self.delete(footer_style)
-        self.append(new_style)
-
-    # master-page only:
-
-    def _set_header_or_footer(
-        self,
-        text_or_element: str | Element | list[Element | str],
-        name: str = "header",
-        style: str = "Header",
-    ) -> None:
-        if name == "header":
-            header_or_footer = self.get_page_header()
-        else:
-            header_or_footer = self.get_page_footer()
-        if header_or_footer is None:
-            header_or_footer = Element.from_tag("style:" + name)
-            self.append(header_or_footer)
-        else:
-            header_or_footer.clear()
-        if (
-            isinstance(text_or_element, Element)
-            and text_or_element.tag == f"style:{name}"
-        ):
-            # Already a header or footer?
-            self.delete(header_or_footer)
-            self.append(text_or_element)
-            return
-        if isinstance(text_or_element, (Element, str)):
-            elem_list: list[Element | str] = [text_or_element]
-        else:
-            elem_list = text_or_element
-        for item in elem_list:
-            if isinstance(item, str):
-                paragraph = Element.from_tag("text:p")
-                paragraph.style = style  # type: ignore
-                header_or_footer.append(paragraph)
-            elif isinstance(item, Element):
-                header_or_footer.append(item)
-
-    def get_page_header(self) -> Element | None:
-        """Get the element that contains the header contents.
-
-        If None, no header was set.
-        """
-        if self.family != "master-page":
-            return None
-        return self.get_element("style:header")
-
-    def set_page_header(
-        self,
-        text_or_element: str | Element | list[Element | str],
-    ) -> None:
-        """Create or replace the header by the given content. It can already
-        be a complete header.
-
-        If you only want to update the existing header, get it and use the
-        API.
-
-        Arguments:
-
-            text_or_element -- str or Element or a list of them
-        """
-        if self.family != "master-page":
-            return None
-        self._set_header_or_footer(text_or_element)
-
-    def get_page_footer(self) -> Element | None:
-        """Get the element that contains the footer contents.
-
-        If None, no footer was set.
-        """
-        if self.family != "master-page":
-            return None
-        return self.get_element("style:footer")
-
-    def set_page_footer(
-        self,
-        text_or_element: str | Element | list[Element | str],
-    ) -> None:
-        """Create or replace the footer by the given content. It can already
-        be a complete footer.
-
-        If you only want to update the existing footer, get it and use the
-        API.
-
-        Arguments:
-
-            text_or_element -- str or Element or a list of them
-        """
-        if self.family != "master-page":
-            return None
-        self._set_header_or_footer(text_or_element, name="footer", style="Footer")
-
-    # font-face only:
-
-    def set_font(
-        self,
-        name: str,
-        family: str | None = None,
-        family_generic: str | None = None,
-        pitch: str = "variable",
-    ) -> None:
-        if self.family != "font-face":
-            return
-        self.name = name
-        if family is None:
-            family = name
-        self.svg_font_family = f'"{family}"'
-        if family_generic is not None:
-            self.font_family_generic = family_generic
-        self.font_pitch = pitch
-
-

Ancestors

- -

Subclasses

- -

Instance variables

-
-
var display_name : str | bool | None
-
-

Get/set the attribute style:display-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var family : str | None
-
-
-
- -Expand source code - -
@property
-def family(self) -> str | None:
-    if self._family is None:
-        self._family = FALSE_FAMILY_MAP_REVERSE.get(
-            self.tag, self.get_attribute_string("style:family")
-        )
-    return self._family
-
-
-
var font_family_generic : str | bool | None
-
-

Get/set the attribute style:font-family-generic

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var font_pitch : str | bool | None
-
-

Get/set the attribute style:font-pitch

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_style : str | bool | None
-
-

Get/set the attribute style:leader-style

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_text : str | bool | None
-
-

Get/set the attribute style:position

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var master_page : str | bool | None
-
-

Get/set the attribute style:master-page-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute style:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var next_style : str | bool | None
-
-

Get/set the attribute style:next-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var page_layout : str | bool | None
-
-

Get/set the attribute style:page-layout-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var parent_style : str | bool | None
-
-

Get/set the attribute style:parent-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style_position : str | bool | None
-
-

Get/set the attribute style:position

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style_type : str | bool | None
-
-

Get/set the attribute style:type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var svg_font_family : str | bool | None
-
-

Get/set the attribute svg:font-family

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var text_style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def del_properties(self, properties: odfdo.list[str] | None = None, area: str | None = None) ‑> None -
-
-

Delete the given properties, either by list argument or -positional argument (or both). Remove only from the given area, -identical to the style family by default.

-

Arguments

-

properties – list

-

area – str

-
- -Expand source code - -
def del_properties(
-    self,
-    properties: list[str] | None = None,
-    area: str | None = None,
-) -> None:
-    """Delete the given properties, either by list argument or
-    positional argument (or both). Remove only from the given area,
-    identical to the style family by default.
-
-    Arguments:
-
-        properties -- list
-
-        area -- str
-    """
-    if properties is None:
-        properties = []
-    if area is None:
-        area = self.family
-    element = self.get_element(f"style:{area}-properties")
-    if element is None:
-        raise ValueError(
-            f"properties element is inexistent for: style:{area}-properties"
-        )
-    for key in _expand_properties_list(properties):
-        element.del_attribute(key)
-
-
- -
-
-
- -Expand source code - -
def get_footer_style(self) -> Style | None:
-    if self.family != "page-layout":
-        return None
-    return self.get_element("style:footer-style")  # type: ignore
-
-
-
-def get_header_style(self) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_header_style(self) -> Element | None:
-    if self.family != "page-layout":
-        return None
-    return self.get_element("style:header-style")
-
-
-
-def get_level_style(self, level: int) ‑> Style | None -
-
-
-
- -Expand source code - -
def get_level_style(self, level: int) -> Style | None:
-    if self.family != "list":
-        return None
-    level_styles = (
-        "(text:list-level-style-number"
-        "|text:list-level-style-bullet"
-        "|text:list-level-style-image)"
-    )
-    return self._filtered_element(level_styles, 0, level=level)  # type: ignore
-
-
- -
-

Get the element that contains the footer contents.

-

If None, no footer was set.

-
- -Expand source code - -
def get_page_footer(self) -> Element | None:
-    """Get the element that contains the footer contents.
-
-    If None, no footer was set.
-    """
-    if self.family != "master-page":
-        return None
-    return self.get_element("style:footer")
-
-
-
-def get_page_header(self) ‑> Element | None -
-
-

Get the element that contains the header contents.

-

If None, no header was set.

-
- -Expand source code - -
def get_page_header(self) -> Element | None:
-    """Get the element that contains the header contents.
-
-    If None, no header was set.
-    """
-    if self.family != "master-page":
-        return None
-    return self.get_element("style:header")
-
-
-
-def get_properties(self, area: str | None = None) ‑> dict[str, str | dict] | None -
-
-

Get the mapping of all properties of this style. By default the -properties of the same family, e.g. a paragraph style and its -paragraph properties. Specify the area to get the text properties of -a paragraph style for example.

-

Arguments

-

area – str

-

Return: dict

-
- -Expand source code - -
def get_properties(self, area: str | None = None) -> dict[str, str | dict] | None:
-    """Get the mapping of all properties of this style. By default the
-    properties of the same family, e.g. a paragraph style and its
-    paragraph properties. Specify the area to get the text properties of
-    a paragraph style for example.
-
-    Arguments:
-
-        area -- str
-
-    Return: dict
-    """
-    if area is None:
-        area = self.family
-    element = self.get_element(f"style:{area}-properties")
-    if element is None:
-        return None
-    properties: dict[str, str | dict] = element.attributes  # type: ignore
-    # Nested properties are nested dictionaries
-    for child in element.children:
-        properties[child.tag] = child.attributes
-    return properties
-
-
-
-def set_background(self, color: str | None = None, url: str | None = None, position: str | None = 'center', repeat: str | None = None, opacity: str | None = None, filter: str | None = None) ‑> None -
-
-

Set the background color of a text style, or the background color -or image of a paragraph style or page layout.

-

With no argument, remove any existing background.

-

The position is one or two of 'center', 'left', 'right', 'top' or -'bottom'.

-

The repeat is 'no-repeat', 'repeat' or 'stretch'.

-

The opacity is a percentage integer (not a string with the '%s' sign)

-

The filter is an application-specific filter name defined elsewhere.

-

Though this method is defined on the base style class, it will raise -an error if the style type is not compatible.

-

Arguments

-

color – '#rrggbb'

-

url – str

-

position – str

-

repeat – str

-

opacity – int

-

filter – str

-
- -Expand source code - -
def set_background(  # noqa: C901
-    self,
-    color: str | None = None,
-    url: str | None = None,
-    position: str | None = "center",
-    repeat: str | None = None,
-    opacity: str | None = None,
-    filter: str | None = None,  # noqa: A002
-) -> None:
-    """Set the background color of a text style, or the background color
-    or image of a paragraph style or page layout.
-
-    With no argument, remove any existing background.
-
-    The position is one or two of 'center', 'left', 'right', 'top' or
-    'bottom'.
-
-    The repeat is 'no-repeat', 'repeat' or 'stretch'.
-
-    The opacity is a percentage integer (not a string with the '%s' sign)
-
-    The filter is an application-specific filter name defined elsewhere.
-
-    Though this method is defined on the base style class, it will raise
-    an error if the style type is not compatible.
-
-    Arguments:
-
-        color -- '#rrggbb'
-
-        url -- str
-
-        position -- str
-
-        repeat -- str
-
-        opacity -- int
-
-        filter -- str
-    """
-    family = self.family
-    if family not in {
-        "text",
-        "paragraph",
-        "page-layout",
-        "section",
-        "table",
-        "table-row",
-        "table-cell",
-        "graphic",
-    }:
-        raise TypeError("No background support for this family")
-    if url is not None and family == "text":
-        raise TypeError("No background image for text styles")
-    properties = self.get_element(f"style:{family}-properties")
-    bg_image: BackgroundImage | None = None
-    if properties is not None:
-        bg_image = properties.get_element("style:background-image")  # type:ignore
-    # Erasing
-    if color is None and url is None:
-        if properties is None:
-            return
-        properties.del_attribute("fo:background-color")
-        if bg_image is not None:
-            properties.delete(bg_image)
-        return
-    # Add the properties if necessary
-    if properties is None:
-        properties = Element.from_tag(f"style:{family}-properties")
-        self.append(properties)
-    # Add the color...
-    if color:
-        properties.set_attribute("fo:background-color", color)
-        if bg_image is not None:
-            properties.delete(bg_image)
-    # ... or the background
-    elif url:
-        properties.set_attribute("fo:background-color", "transparent")
-        if bg_image is None:
-            bg_image = Element.from_tag("style:background-image")  # type:ignore
-            properties.append(bg_image)  # type:ignore
-        bg_image.url = url  # type:ignore
-        if position:
-            bg_image.position = position  # type:ignore
-        if repeat:
-            bg_image.repeat = repeat  # type:ignore
-        if opacity:
-            bg_image.opacity = opacity  # type:ignore
-        if filter:
-            bg_image.filter = filter  # type:ignore
-
-
-
-def set_font(self, name: str, family: str | None = None, family_generic: str | None = None, pitch: str = 'variable') ‑> None -
-
-
-
- -Expand source code - -
def set_font(
-    self,
-    name: str,
-    family: str | None = None,
-    family_generic: str | None = None,
-    pitch: str = "variable",
-) -> None:
-    if self.family != "font-face":
-        return
-    self.name = name
-    if family is None:
-        family = name
-    self.svg_font_family = f'"{family}"'
-    if family_generic is not None:
-        self.font_family_generic = family_generic
-    self.font_pitch = pitch
-
-
- -
-
-
- -Expand source code - -
def set_footer_style(self, new_style: Style) -> None:
-    if self.family != "page-layout":
-        return
-    footer_style = self.get_footer_style()
-    if footer_style is not None:
-        self.delete(footer_style)
-    self.append(new_style)
-
-
-
-def set_header_style(self, new_style: Style) ‑> None -
-
-
-
- -Expand source code - -
def set_header_style(self, new_style: Style) -> None:
-    if self.family != "page-layout":
-        return
-    header_style = self.get_header_style()
-    if header_style is not None:
-        self.delete(header_style)
-    self.append(new_style)
-
-
-
-def set_level_style(self, level: int, num_format: str | None = None, bullet_char: str | None = None, url: str | None = None, display_levels: int | None = None, prefix: str | None = None, suffix: str | None = None, start_value: int | None = None, style: str | None = None, clone: Style | None = None) ‑> Style | None -
-
-

Arguments

-

level – int

-

num_format (for number) – int

-

bullet_char (for bullet) – str

-

url (for image) – str

-

display_levels – int

-

prefix – str

-

suffix – str

-

start_value – int

-

style – str

-

clone – List Style

-

Return

-

level_style created

-
- -Expand source code - -
def set_level_style(  # noqa: C901
-    self,
-    level: int,
-    num_format: str | None = None,
-    bullet_char: str | None = None,
-    url: str | None = None,
-    display_levels: int | None = None,
-    prefix: str | None = None,
-    suffix: str | None = None,
-    start_value: int | None = None,
-    style: str | None = None,
-    clone: Style | None = None,
-) -> Style | None:
-    """
-    Arguments:
-
-        level -- int
-
-        num_format (for number) -- int
-
-        bullet_char (for bullet) -- str
-
-        url (for image) -- str
-
-        display_levels -- int
-
-        prefix -- str
-
-        suffix -- str
-
-        start_value -- int
-
-        style -- str
-
-        clone -- List Style
-
-    Return:
-        level_style created
-    """
-    if self.family != "list":
-        return None
-    # Expected name
-    if num_format is not None:
-        level_style_name = "text:list-level-style-number"
-    elif bullet_char is not None:
-        level_style_name = "text:list-level-style-bullet"
-    elif url is not None:
-        level_style_name = "text:list-level-style-image"
-    elif clone is not None:
-        level_style_name = clone.tag
-    else:
-        raise ValueError("unknown level style type")
-    was_created = False
-    # Cloning or reusing an existing element
-    level_style: Style | None = None
-    if clone is not None:
-        level_style = clone.clone  # type: ignore
-        was_created = True
-    else:
-        level_style = self.get_level_style(level)
-        if level_style is None:
-            level_style = Element.from_tag(level_style_name)  # type: ignore
-            was_created = True
-    if level_style is None:
-        return None
-    # Transmute if the type changed
-    if level_style.tag != level_style_name:
-        print("Warn: different style", level_style_name, level_style.tag)
-        level_style.tag = level_style_name
-    # Set the level
-    level_style.set_attribute("text:level", str(level))
-    # Set the main attribute
-    if num_format is not None:
-        level_style.set_attribute("fo:num-format", num_format)
-    elif bullet_char is not None:
-        level_style.set_attribute("text:bullet-char", bullet_char)
-    elif url is not None:
-        level_style.set_attribute("xlink:href", url)
-    # Set attributes
-    if prefix:
-        level_style.set_attribute("style:num-prefix", prefix)
-    if suffix:
-        level_style.set_attribute("style:num-suffix", suffix)
-    if display_levels:
-        level_style.set_attribute("text:display-levels", str(display_levels))
-    if start_value:
-        level_style.set_attribute("text:start-value", str(start_value))
-    if style:
-        level_style.text_style = style  # type: ignore
-    # Commit the creation
-    if was_created:
-        self.append(level_style)
-    return level_style
-
-
- -
-

Create or replace the footer by the given content. It can already -be a complete footer.

-

If you only want to update the existing footer, get it and use the -API.

-

Arguments

-

text_or_element – str or Element or a list of them

-
- -Expand source code - -
def set_page_footer(
-    self,
-    text_or_element: str | Element | list[Element | str],
-) -> None:
-    """Create or replace the footer by the given content. It can already
-    be a complete footer.
-
-    If you only want to update the existing footer, get it and use the
-    API.
-
-    Arguments:
-
-        text_or_element -- str or Element or a list of them
-    """
-    if self.family != "master-page":
-        return None
-    self._set_header_or_footer(text_or_element, name="footer", style="Footer")
-
-
-
-def set_page_header(self, text_or_element: str | Element | odfdo.list[Element | str]) ‑> None -
-
-

Create or replace the header by the given content. It can already -be a complete header.

-

If you only want to update the existing header, get it and use the -API.

-

Arguments

-

text_or_element – str or Element or a list of them

-
- -Expand source code - -
def set_page_header(
-    self,
-    text_or_element: str | Element | list[Element | str],
-) -> None:
-    """Create or replace the header by the given content. It can already
-    be a complete header.
-
-    If you only want to update the existing header, get it and use the
-    API.
-
-    Arguments:
-
-        text_or_element -- str or Element or a list of them
-    """
-    if self.family != "master-page":
-        return None
-    self._set_header_or_footer(text_or_element)
-
-
-
-def set_properties(self, properties: dict[str, str | dict] | None = None, style: Style | None = None, area: str | None = None, **kwargs: Any) ‑> None -
-
-

Set the properties of the "area" type of this style. Properties -are given either as a dict or as named arguments (or both). The area -is identical to the style family by default. If the properties -element is missing, it is created.

-

Instead of properties, you can pass a style with properties of the -same area. These will be copied.

-

Arguments

-

properties – dict

-

style – Style

-

area – 'paragraph', 'text'…

-
- -Expand source code - -
def set_properties(  # noqa: C901
-    self,
-    properties: dict[str, str | dict] | None = None,
-    style: Style | None = None,
-    area: str | None = None,
-    **kwargs: Any,
-) -> None:
-    """Set the properties of the "area" type of this style. Properties
-    are given either as a dict or as named arguments (or both). The area
-    is identical to the style family by default. If the properties
-    element is missing, it is created.
-
-    Instead of properties, you can pass a style with properties of the
-    same area. These will be copied.
-
-    Arguments:
-
-        properties -- dict
-
-        style -- Style
-
-        area -- 'paragraph', 'text'...
-    """
-    if properties is None:
-        properties = {}
-    if area is None:
-        if isinstance(self.family, bool):
-            area = None
-        else:
-            area = self.family
-    element = self.get_element(f"style:{area}-properties")
-    if element is None:
-        element = Element.from_tag(f"style:{area}-properties")
-        self.append(element)
-    if properties or kwargs:
-        properties = _expand_properties_dict(_merge_dicts(properties, kwargs))
-    elif style is not None:
-        properties = style.get_properties(area=area)
-        if properties is None:
-            return
-    if properties is None:
-        return
-    for key, value in properties.items():
-        if value is None:
-            element.del_attribute(key)
-        elif isinstance(value, (str, bool)):
-            element.set_attribute(key, value)
-        else:
-            pass
-
-
-
-

Inherited members

- -
-
-class Styles -(part_name: str, container: Container) -
-
-

Representation of an XML part.

-

Abstraction of the XML library behind.

-
- -Expand source code - -
class Styles(XmlPart):
-    def _get_style_contexts(
-        self, family: str, automatic: bool = False
-    ) -> list[Element]:
-        if automatic:
-            return [self.get_element("//office:automatic-styles")]
-        if not family:
-            # All possibilities
-            return [
-                self.get_element("//office:automatic-styles"),
-                self.get_element("//office:styles"),
-                self.get_element("//office:master-styles"),
-                self.get_element("//office:font-face-decls"),
-            ]
-        queries = CONTEXT_MAPPING.get(family)
-        if queries is None:
-            raise ValueError(f"unknown family: {family}")
-        # print('q:', queries)
-        return [self.get_element(query) for query in queries]
-
-    def get_styles(self, family: str = "", automatic: bool = False) -> list[Element]:
-        """Return the list of styles in the Content part, optionally limited
-        to the given family, optionaly limited to automatic styles.
-
-        Arguments:
-
-            family -- str
-
-            automatic -- bool
-
-        Return: list of Style
-        """
-        result = []
-        for context in self._get_style_contexts(family, automatic=automatic):
-            if context is None:
-                continue
-            # print('-ctx----', automatic)
-            # print(context.tag)
-            # print(context.__class__)
-            # print(context.serialize())
-            result.extend(context.get_styles(family=family))
-        return result
-
-    def get_style(
-        self,
-        family: str,
-        name_or_element: str | Style | None = None,
-        display_name: str | None = None,
-    ) -> Style | None:
-        """Return the style uniquely identified by the name/family pair. If
-        the argument is already a style object, it will return it.
-
-        If the name is None, the default style is fetched.
-
-        If the name is not the internal name but the name you gave in the
-        desktop application, use display_name instead.
-
-        Arguments:
-
-            family -- 'paragraph', 'text',  'graphic', 'table', 'list',
-                      'number', 'page-layout', 'master-page'
-
-            name_or_element -- str, odf_style or None
-
-            display_name -- str or None
-
-        Return: odf_style or None if not found
-        """
-        for context in self._get_style_contexts(family):
-            if context is None:
-                continue
-            style = context.get_style(
-                family,
-                name_or_element=name_or_element,
-                display_name=display_name,
-            )
-            if style is not None:
-                return style  # type: ignore
-        return None
-
-    def get_master_pages(self) -> list[Element]:
-        query = make_xpath_query("descendant::style:master-page")
-        return self.get_elements(query)  # type:ignore
-
-    def get_master_page(self, position: int = 0) -> Element | None:
-        results = self.get_master_pages()
-        try:
-            return results[position]
-        except IndexError:
-            return None
-
-

Ancestors

- -

Methods

-
-
-def get_master_page(self, position: int = 0) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_master_page(self, position: int = 0) -> Element | None:
-    results = self.get_master_pages()
-    try:
-        return results[position]
-    except IndexError:
-        return None
-
-
-
-def get_master_pages(self) ‑> odfdo.list[Element] -
-
-
-
- -Expand source code - -
def get_master_pages(self) -> list[Element]:
-    query = make_xpath_query("descendant::style:master-page")
-    return self.get_elements(query)  # type:ignore
-
-
-
-def get_style(self, family: str, name_or_element: str | Style | None = None, display_name: str | None = None) ‑> Style | None -
-
-

Return the style uniquely identified by the name/family pair. If -the argument is already a style object, it will return it.

-

If the name is None, the default style is fetched.

-

If the name is not the internal name but the name you gave in the -desktop application, use display_name instead.

-

Arguments

-

family – 'paragraph', 'text', -'graphic', 'table', 'list', -'number', 'page-layout', 'master-page'

-

name_or_element – str, odf_style or None

-

display_name – str or None

-

Return: odf_style or None if not found

-
- -Expand source code - -
def get_style(
-    self,
-    family: str,
-    name_or_element: str | Style | None = None,
-    display_name: str | None = None,
-) -> Style | None:
-    """Return the style uniquely identified by the name/family pair. If
-    the argument is already a style object, it will return it.
-
-    If the name is None, the default style is fetched.
-
-    If the name is not the internal name but the name you gave in the
-    desktop application, use display_name instead.
-
-    Arguments:
-
-        family -- 'paragraph', 'text',  'graphic', 'table', 'list',
-                  'number', 'page-layout', 'master-page'
-
-        name_or_element -- str, odf_style or None
-
-        display_name -- str or None
-
-    Return: odf_style or None if not found
-    """
-    for context in self._get_style_contexts(family):
-        if context is None:
-            continue
-        style = context.get_style(
-            family,
-            name_or_element=name_or_element,
-            display_name=display_name,
-        )
-        if style is not None:
-            return style  # type: ignore
-    return None
-
-
-
-def get_styles(self, family: str = '', automatic: bool = False) ‑> odfdo.list[Element] -
-
-

Return the list of styles in the Content part, optionally limited -to the given family, optionaly limited to automatic styles.

-

Arguments

-

family – str

-

automatic – bool

-

Return: list of Style

-
- -Expand source code - -
def get_styles(self, family: str = "", automatic: bool = False) -> list[Element]:
-    """Return the list of styles in the Content part, optionally limited
-    to the given family, optionaly limited to automatic styles.
-
-    Arguments:
-
-        family -- str
-
-        automatic -- bool
-
-    Return: list of Style
-    """
-    result = []
-    for context in self._get_style_contexts(family, automatic=automatic):
-        if context is None:
-            continue
-        # print('-ctx----', automatic)
-        # print(context.tag)
-        # print(context.__class__)
-        # print(context.serialize())
-        result.extend(context.get_styles(family=family))
-    return result
-
-
-
-

Inherited members

- -
-
-class TOC -(title: str = 'Table of Contents', name: str | None = None, protected: bool = True, outline_level: int = 0, style: str | None = None, title_style: str = 'Contents_20_Heading', entry_style: str = 'Contents_20_%d', **kwargs: Any) -
-
-

Table of content. -The "text:table-of-content" element represents a table of contents for a -document. The items that can be listed in a table of contents are: -- Headings (as defined by the outline structure of the document), up to -a selected level. -- Table of contents index marks. -- Paragraphs formatted with specified paragraph styles.

-

Implementation: -Default parameters are what most people use: protected from manual -modifications and not limited in title levels.

-

The name is mandatory and derived automatically from the title if not -given. Provide one in case of a conflict with other TOCs in the same -document.

-

The "text:table-of-content" element has the following attributes: -text:name, text:protected, text:protection-key, -text:protection-key-digest-algorithm, text:style-name and xml:id.

-

Arguments

-

title – str

-

name – str

-

protected – bool

-

outline_level – int

-

style – str

-

title_style – str

-

entry_style – str

-
- -Expand source code - -
class TOC(Element):
-    """Table of content.
-    The "text:table-of-content" element represents a table of contents for a
-    document. The items that can be listed in a table of contents are:
-      - Headings (as defined by the outline structure of the document), up to
-        a selected level.
-      - Table of contents index marks.
-      - Paragraphs formatted with specified paragraph styles.
-
-
-    Implementation:
-    Default parameters are what most people use: protected from manual
-    modifications and not limited in title levels.
-
-    The name is mandatory and derived automatically from the title if not
-    given. Provide one in case of a conflict with other TOCs in the same
-    document.
-
-    The "text:table-of-content" element has the following attributes:
-    text:name, text:protected, text:protection-key,
-    text:protection-key-digest-algorithm, text:style-name and xml:id.
-
-    Arguments:
-
-        title -- str
-
-        name -- str
-
-        protected -- bool
-
-        outline_level -- int
-
-        style -- str
-
-        title_style -- str
-
-        entry_style -- str
-    """
-
-    _tag = "text:table-of-content"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "text:style-name"),
-        PropDef("xml_id", "xml:id"),
-        PropDef("protected", "text:protected"),
-        PropDef("protection_key", "text:protection-key"),
-        PropDef(
-            "protection_key_digest_algorithm", "text:protection-key-digest-algorithm"
-        ),
-    )
-
-    def __init__(
-        self,
-        title: str = "Table of Contents",
-        name: str | None = None,
-        protected: bool = True,
-        outline_level: int = 0,
-        style: str | None = None,
-        title_style: str = "Contents_20_Heading",
-        entry_style: str = "Contents_20_%d",
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style:
-                self.style = style
-            if protected:
-                self.protected = protected
-            if name is None:
-                self.name = f"{title}1"
-            # Create the source template
-            toc_source = self.create_toc_source(
-                title, outline_level, title_style, entry_style
-            )
-            self.append(toc_source)
-            # Create the index body automatically with the index title
-            if title:
-                # This style is in the template document
-                self.set_toc_title(title, text_style=title_style)
-
-    @staticmethod
-    def create_toc_source(
-        title: str,
-        outline_level: int,
-        title_style: str,
-        entry_style: str,
-    ) -> Element:
-        toc_source = Element.from_tag("text:table-of-content-source")
-        toc_source.set_attribute("text:outline-level", str(outline_level))
-        if title:
-            title_template = IndexTitleTemplate()
-            if title_style:
-                # This style is in the template document
-                title_template.style = title_style
-            title_template.text = title
-            toc_source.append(title_template)
-        for level in range(1, 11):
-            template = TocEntryTemplate(outline_level=level)
-            if entry_style:
-                template.style = entry_style % level
-            toc_source.append(template)
-        return toc_source
-
-    def __str__(self) -> str:
-        return self.get_formatted_text()
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        index_body = self.get_element("text:index-body")
-
-        if index_body is None:
-            return ""
-        if context is None:
-            context = {}
-        if context.get("rst_mode"):
-            return "\n.. contents::\n\n"
-
-        result = []
-        for element in index_body.children:
-            if element.tag == "text:index-title":
-                for child_element in element.children:
-                    result.append(child_element.get_formatted_text(context).strip())
-            else:
-                result.append(element.get_formatted_text(context).strip())
-        return "\n".join(result)
-
-    @property
-    def outline_level(self) -> int | None:
-        source = self.get_element("text:table-of-content-source")
-        if source is None:
-            return None
-        return source.get_attribute_integer("text:outline-level")
-
-    @outline_level.setter
-    def outline_level(self, level: int) -> None:
-        source = self.get_element("text:table-of-content-source")
-        if source is None:
-            source = Element.from_tag("text:table-of-content-source")
-            self.insert(source, FIRST_CHILD)
-        source.set_attribute("text:outline-level", str(level))
-
-    @property
-    def body(self) -> Element | None:
-        return self.get_element("text:index-body")
-
-    @body.setter
-    def body(self, body: Element | None = None) -> Element | None:
-        old_body = self.body
-        if old_body is not None:
-            self.delete(old_body)
-        if body is None:
-            body = Element.from_tag("text:index-body")
-        self.append(body)
-        return body
-
-    def get_title(self) -> str:
-        index_body = self.body
-        if index_body is None:
-            return ""
-        index_title = index_body.get_element(IndexTitle._tag)
-        if index_title is None:
-            return ""
-        return index_title.text_content
-
-    def set_toc_title(
-        self,
-        title: str,
-        style: str | None = None,
-        text_style: str | None = None,
-    ) -> None:
-        index_body = self.body
-        if index_body is None:
-            self.body = None
-            index_body = self.body
-        index_title = index_body.get_element(IndexTitle._tag)  # type: ignore
-        if index_title is None:
-            name = f"{self.name}_Head"
-            index_title = IndexTitle(
-                name=name, style=style, title_text=title, text_style=text_style
-            )
-            index_body.append(index_title)  # type: ignore
-        else:
-            if style:
-                index_title.style = style  # type: ignore
-            paragraph = index_title.get_paragraph()
-            if paragraph is None:
-                paragraph = Paragraph()
-                index_title.append(paragraph)
-            if text_style:
-                paragraph.style = text_style  # type: ignore
-            paragraph.text = title
-
-    @staticmethod
-    def _header_numbering(level_indexes: dict[int, int], level: int) -> str:
-        """Return the header hierarchical number (like "1.2.3.")."""
-        numbers: list[int] = []
-        # before header level
-        for idx in range(1, level):
-            numbers.append(level_indexes.setdefault(idx, 1))
-        # header level
-        index = level_indexes.get(level, 0) + 1
-        level_indexes[level] = index
-        numbers.append(index)
-        # after header level
-        idx = level + 1
-        while idx in level_indexes:
-            del level_indexes[idx]
-            idx += 1
-        return ".".join(str(x) for x in numbers) + "."
-
-    def fill(  # noqa: C901
-        self,
-        document: Document | None = None,
-        use_default_styles: bool = True,
-    ) -> None:
-        """Fill the TOC with the titles found in the document. A TOC is not
-        contextual so it will catch all titles before and after its insertion.
-        If the TOC is not attached to a document, attach it beforehand or
-        provide one as argument.
-
-        For having a pretty TOC, let use_default_styles by default.
-
-        Arguments:
-
-            document -- Document
-
-            use_default_styles -- bool
-        """
-        # Find the body
-        if document is not None:
-            body: Element | None = document.body
-        else:
-            body = self.document_body
-        if body is None:
-            raise ValueError("The TOC must be related to a document somehow")
-
-        # Save the title
-        index_body = self.body
-        title = index_body.get_element("text:index-title")  # type: ignore
-
-        # Clean the old index-body
-        self.body = None
-        index_body = self.body
-
-        # Restore the title
-        if title and str(title):
-            index_body.insert(title, position=0)  # type: ignore
-
-        # Insert default TOC style
-        if use_default_styles:
-            automatic_styles = body.get_element("//office:automatic-styles")
-            if isinstance(automatic_styles, Element):
-                for level in range(1, 11):
-                    if (
-                        automatic_styles.get_style(
-                            "paragraph", _toc_entry_style_name(level)
-                        )
-                        is None
-                    ):
-                        level_style = default_toc_level_style(level)
-                        automatic_styles.append(level_style)
-
-        # Auto-fill the index
-        outline_level = self.outline_level or 10
-        level_indexes: dict[int, int] = {}
-        for header in body.get_headers():
-            level = header.get_attribute_integer("text:outline-level") or 0
-            if level is None or level > outline_level:
-                continue
-            number_str = self._header_numbering(level_indexes, level)
-            # Make the title with "1.2.3. Title" format
-            paragraph = Paragraph(f"{number_str} {header}")
-            if use_default_styles:
-                paragraph.style = _toc_entry_style_name(level)
-            index_body.append(paragraph)  # type: ignore
-
-

Ancestors

- -

Static methods

-
-
-def create_toc_source(title: str, outline_level: int, title_style: str, entry_style: str) ‑> Element -
-
-
-
- -Expand source code - -
@staticmethod
-def create_toc_source(
-    title: str,
-    outline_level: int,
-    title_style: str,
-    entry_style: str,
-) -> Element:
-    toc_source = Element.from_tag("text:table-of-content-source")
-    toc_source.set_attribute("text:outline-level", str(outline_level))
-    if title:
-        title_template = IndexTitleTemplate()
-        if title_style:
-            # This style is in the template document
-            title_template.style = title_style
-        title_template.text = title
-        toc_source.append(title_template)
-    for level in range(1, 11):
-        template = TocEntryTemplate(outline_level=level)
-        if entry_style:
-            template.style = entry_style % level
-        toc_source.append(template)
-    return toc_source
-
-
-
-

Instance variables

-
-
var bodyElement | None
-
-
-
- -Expand source code - -
@property
-def body(self) -> Element | None:
-    return self.get_element("text:index-body")
-
-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var outline_level : int | None
-
-
-
- -Expand source code - -
@property
-def outline_level(self) -> int | None:
-    source = self.get_element("text:table-of-content-source")
-    if source is None:
-        return None
-    return source.get_attribute_integer("text:outline-level")
-
-
-
var protected : str | bool | None
-
-

Get/set the attribute text:protected

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var protection_key : str | bool | None
-
-

Get/set the attribute text:protection-key

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var protection_key_digest_algorithm : str | bool | None
-
-

Get/set the attribute text:protection-key-digest-algorithm

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var xml_id : str | bool | None
-
-

Get/set the attribute xml:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def fill(self, document: Document | None = None, use_default_styles: bool = True) ‑> None -
-
-

Fill the TOC with the titles found in the document. A TOC is not -contextual so it will catch all titles before and after its insertion. -If the TOC is not attached to a document, attach it beforehand or -provide one as argument.

-

For having a pretty TOC, let use_default_styles by default.

-

Arguments

-

document – Document

-

use_default_styles – bool

-
- -Expand source code - -
def fill(  # noqa: C901
-    self,
-    document: Document | None = None,
-    use_default_styles: bool = True,
-) -> None:
-    """Fill the TOC with the titles found in the document. A TOC is not
-    contextual so it will catch all titles before and after its insertion.
-    If the TOC is not attached to a document, attach it beforehand or
-    provide one as argument.
-
-    For having a pretty TOC, let use_default_styles by default.
-
-    Arguments:
-
-        document -- Document
-
-        use_default_styles -- bool
-    """
-    # Find the body
-    if document is not None:
-        body: Element | None = document.body
-    else:
-        body = self.document_body
-    if body is None:
-        raise ValueError("The TOC must be related to a document somehow")
-
-    # Save the title
-    index_body = self.body
-    title = index_body.get_element("text:index-title")  # type: ignore
-
-    # Clean the old index-body
-    self.body = None
-    index_body = self.body
-
-    # Restore the title
-    if title and str(title):
-        index_body.insert(title, position=0)  # type: ignore
-
-    # Insert default TOC style
-    if use_default_styles:
-        automatic_styles = body.get_element("//office:automatic-styles")
-        if isinstance(automatic_styles, Element):
-            for level in range(1, 11):
-                if (
-                    automatic_styles.get_style(
-                        "paragraph", _toc_entry_style_name(level)
-                    )
-                    is None
-                ):
-                    level_style = default_toc_level_style(level)
-                    automatic_styles.append(level_style)
-
-    # Auto-fill the index
-    outline_level = self.outline_level or 10
-    level_indexes: dict[int, int] = {}
-    for header in body.get_headers():
-        level = header.get_attribute_integer("text:outline-level") or 0
-        if level is None or level > outline_level:
-            continue
-        number_str = self._header_numbering(level_indexes, level)
-        # Make the title with "1.2.3. Title" format
-        paragraph = Paragraph(f"{number_str} {header}")
-        if use_default_styles:
-            paragraph.style = _toc_entry_style_name(level)
-        index_body.append(paragraph)  # type: ignore
-
-
-
-def get_title(self) ‑> str -
-
-
-
- -Expand source code - -
def get_title(self) -> str:
-    index_body = self.body
-    if index_body is None:
-        return ""
-    index_title = index_body.get_element(IndexTitle._tag)
-    if index_title is None:
-        return ""
-    return index_title.text_content
-
-
-
-def set_toc_title(self, title: str, style: str | None = None, text_style: str | None = None) ‑> None -
-
-
-
- -Expand source code - -
def set_toc_title(
-    self,
-    title: str,
-    style: str | None = None,
-    text_style: str | None = None,
-) -> None:
-    index_body = self.body
-    if index_body is None:
-        self.body = None
-        index_body = self.body
-    index_title = index_body.get_element(IndexTitle._tag)  # type: ignore
-    if index_title is None:
-        name = f"{self.name}_Head"
-        index_title = IndexTitle(
-            name=name, style=style, title_text=title, text_style=text_style
-        )
-        index_body.append(index_title)  # type: ignore
-    else:
-        if style:
-            index_title.style = style  # type: ignore
-        paragraph = index_title.get_paragraph()
-        if paragraph is None:
-            paragraph = Paragraph()
-            index_title.append(paragraph)
-        if text_style:
-            paragraph.style = text_style  # type: ignore
-        paragraph.text = title
-
-
-
-

Inherited members

- -
-
-class Tab -(position: int | None = None, **kwargs: Any) -
-
-

This element represents the [UNICODE] tab character (HORIZONTAL -TABULATION, U+0009).

-

The position attribute contains the number of the tab-stop to which -a tab character refers. The position 0 marks the start margin of a -paragraph. Note: The position attribute is only a hint to help non-layout -oriented consumers to determine the tab/tab-stop association. Layout -oriented consumers should determine the tab positions based on the style -information

-

Arguments

-

position – int

-
- -Expand source code - -
class Tab(Element):
-    """This element represents the [UNICODE] tab character (HORIZONTAL
-    TABULATION, U+0009).
-
-    The position attribute contains the number of the tab-stop to which
-    a tab character refers. The position 0 marks the start margin of a
-    paragraph. Note: The position attribute is only a hint to help non-layout
-    oriented consumers to determine the tab/tab-stop association. Layout
-    oriented consumers should determine the tab positions based on the style
-    information
-    """
-
-    _tag = "text:tab"
-    _properties: tuple[PropDef, ...] = (PropDef("position", "text:tab-ref"),)
-
-    def __init__(self, position: int | None = None, **kwargs: Any) -> None:
-        """
-        Arguments:
-
-            position -- int
-        """
-        super().__init__(**kwargs)
-        if self._do_init and position is not None and position >= 0:
-            self.position = str(position)
-
-

Ancestors

- -

Instance variables

-
-
var position : str | bool | None
-
-

Get/set the attribute text:tab-ref

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class TabStopStyle -(style_char: str | None = None, leader_color: str | None = None, leader_style: str | None = None, leader_text: str | None = None, leader_text_style: str | None = None, leader_type: str | None = None, leader_width: str | None = None, style_position: str | None = None, style_type: str | None = None, **kwargs: Any) -
-
-

ODF "style:tab-stop" -Base style for a TOC entryBase style for a TOC entry

-
- -Expand source code - -
class TabStopStyle(Element):
-    """ODF "style:tab-stop"
-    Base style for a TOC entryBase style for a TOC entry
-    """
-
-    _tag = "style:tab-stop"
-    _properties = (
-        PropDef("style_char", "style:char"),
-        PropDef("leader_color", "style:leader-color"),
-        PropDef("leader_style", "style:leader-style"),
-        PropDef("leader_text", "style:leader-text"),
-        PropDef("leader_text_style", "style:leader-text-style"),
-        PropDef("leader_type", "style:leader-type"),
-        PropDef("leader_width", "style:leader-width"),
-        PropDef("style_position", "style:position"),
-        PropDef("style_type", "style:type"),
-    )
-
-    def __init__(  # noqa: C901
-        self,
-        style_char: str | None = None,
-        leader_color: str | None = None,
-        leader_style: str | None = None,
-        leader_text: str | None = None,
-        leader_text_style: str | None = None,
-        leader_type: str | None = None,
-        leader_width: str | None = None,
-        style_position: str | None = None,
-        style_type: str | None = None,
-        **kwargs: Any,
-    ):
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style_char:
-                self.style_char = style_char
-            if leader_color:
-                self.leader_color = leader_color
-            if leader_style:
-                self.leader_style = leader_style
-            if leader_text:
-                self.leader_text = leader_text
-            if leader_text_style:
-                self.leader_text_style = leader_text_style
-            if leader_type:
-                self.leader_type = leader_type
-            if leader_width:
-                self.leader_width = leader_width
-            if style_position:
-                self.style_position = style_position
-            if style_type:
-                self.style_type = style_type
-
-

Ancestors

- -

Instance variables

-
-
var leader_color : str | bool | None
-
-

Get/set the attribute style:leader-color

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_style : str | bool | None
-
-

Get/set the attribute style:leader-style

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_text : str | bool | None
-
-

Get/set the attribute style:leader-text

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_text_style : str | bool | None
-
-

Get/set the attribute style:leader-text-style

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_type : str | bool | None
-
-

Get/set the attribute style:leader-type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_width : str | bool | None
-
-

Get/set the attribute style:leader-width

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style_char : str | bool | None
-
-

Get/set the attribute style:char

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style_position : str | bool | None
-
-

Get/set the attribute style:position

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style_type : str | bool | None
-
-

Get/set the attribute style:type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class Table -(name: str | None = None, width: int | None = None, height: int | None = None, protected: bool = False, protection_key: str | None = None, display: bool = True, printable: bool = True, print_ranges: odfdo.list[str] | None = None, style: str | None = None, **kwargs: Any) -
-
-

ODF table "table:table"

-

Create a table element, optionally prefilled with "height" rows of -"width" cells each.

-

If the table is to be protected, a protection key must be provided, -i.e. a hash value of the password.

-

If the table must not be displayed, set "display" to False.

-

If the table must not be printed, set "printable" to False. The table -will not be printed when it is not displayed, whatever the value of -this argument.

-

Ranges of cells to print can be provided as a list of cell ranges, -e.g. ['E6:K12', 'P6:R12'] or directly as a raw string, e.g. -"E6:K12 P6:R12".

-

You can access and modify the XML tree manually, but you probably want -to use the API to access and alter cells. It will save you from -handling repetitions and the same number of cells for each row.

-

If you use both the table API and the XML API, you are on your own for -ensuiring model integrity.

-

Arguments

-

name – str

-

width – int

-

height – int

-

protected – bool

-

protection_key – str

-

display – bool

-

printable – bool

-

print_ranges – list

-

style – str

-
- -Expand source code - -
class Table(Element):
-    """ODF table "table:table" """
-
-    _tag = "table:table"
-    _caching = True
-    _append = Element.append
-
-    def __init__(
-        self,
-        name: str | None = None,
-        width: int | None = None,
-        height: int | None = None,
-        protected: bool = False,
-        protection_key: str | None = None,
-        display: bool = True,
-        printable: bool = True,
-        print_ranges: list[str] | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a table element, optionally prefilled with "height" rows of
-        "width" cells each.
-
-        If the table is to be protected, a protection key must be provided,
-        i.e. a hash value of the password.
-
-        If the table must not be displayed, set "display" to False.
-
-        If the table must not be printed, set "printable" to False. The table
-        will not be printed when it is not displayed, whatever the value of
-        this argument.
-
-        Ranges of cells to print can be provided as a list of cell ranges,
-        e.g. ['E6:K12', 'P6:R12'] or directly as a raw string, e.g.
-        "E6:K12 P6:R12".
-
-        You can access and modify the XML tree manually, but you probably want
-        to use the API to access and alter cells. It will save you from
-        handling repetitions and the same number of cells for each row.
-
-        If you use both the table API and the XML API, you are on your own for
-        ensuiring model integrity.
-
-        Arguments:
-
-            name -- str
-
-            width -- int
-
-            height -- int
-
-            protected -- bool
-
-            protection_key -- str
-
-            display -- bool
-
-            printable -- bool
-
-            print_ranges -- list
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        self._indexes = {}
-        self._indexes["_cmap"] = {}
-        self._indexes["_tmap"] = {}
-        if self._do_init:
-            self.name = name
-            if protected:
-                self.protected = protected
-                self.set_protection_key = protection_key
-            if not display:
-                self.displayed = display
-            if not printable:
-                self.printable = printable
-            if print_ranges:
-                self.print_ranges = print_ranges
-            if style:
-                self.style = style
-            # Prefill the table
-            if width is not None or height is not None:
-                width = width or 1
-                height = height or 1
-                # Column groups for style information
-                columns = Column(repeated=width)
-                self._append(columns)
-                for _i in range(height):
-                    row = Row(width)
-                    self._append(row)
-        self._compute_table_cache()
-
-    def __str__(self) -> str:
-        def write_content(csv_writer: object) -> None:
-            for values in self.iter_values():
-                line = []
-                for value in values:
-                    if value is None:
-                        value = ""
-                    if isinstance(value, str):
-                        value = value.strip()
-                    line.append(value)
-                csv_writer.writerow(line)  # type: ignore
-
-        out = StringIO(newline=os.linesep)
-        csv_writer = csv.writer(
-            out,
-            delimiter=" ",
-            doublequote=False,
-            escapechar="\\",
-            lineterminator=os.linesep,
-            quotechar='"',
-            quoting=csv.QUOTE_NONNUMERIC,
-        )
-        write_content(csv_writer)
-        return out.getvalue()
-
-    def _translate_y_from_any(self, y: str | int) -> int:
-        # "3" (couting from 1) -> 2 (couting from 0)
-        return translate_from_any(y, self.height, 1)
-
-    def _translate_table_coordinates_list(
-        self,
-        coord: tuple | list,
-    ) -> tuple[int | None, ...]:
-        height = self.height
-        width = self.width
-        # assuming we got int values
-        if len(coord) == 1:
-            # It is a row
-            y = coord[0]
-            if y and y < 0:
-                y = increment(y, height)
-            return (None, y, None, y)
-        if len(coord) == 2:
-            # It is a row range, not a cell, because context is table
-            y = coord[0]
-            if y and y < 0:
-                y = increment(y, height)
-            t = coord[1]
-            if t and t < 0:
-                t = increment(t, height)
-            return (None, y, None, t)
-        # should be 4 int
-        x, y, z, t = coord
-        if x and x < 0:
-            x = increment(x, width)
-        if y and y < 0:
-            y = increment(y, height)
-        if z and z < 0:
-            z = increment(z, width)
-        if t and t < 0:
-            t = increment(t, height)
-        return (x, y, z, t)
-
-    def _translate_table_coordinates_str(
-        self,
-        coord_str: str,
-    ) -> tuple[int | None, ...]:
-        height = self.height
-        width = self.width
-        coord = convert_coordinates(coord_str)
-        if len(coord) == 2:
-            x, y = coord
-            if x and x < 0:
-                x = increment(x, width)
-            if y and y < 0:
-                y = increment(y, height)
-            # extent to an area :
-            return (x, y, x, y)
-        x, y, z, t = coord
-        if x and x < 0:
-            x = increment(x, width)
-        if y and y < 0:
-            y = increment(y, height)
-        if z and z < 0:
-            z = increment(z, width)
-        if t and t < 0:
-            t = increment(t, height)
-        return (x, y, z, t)
-
-    def _translate_table_coordinates(
-        self,
-        coord: tuple | list | str,
-    ) -> tuple[int | None, ...]:
-        if isinstance(coord, str):
-            return self._translate_table_coordinates_str(coord)
-        return self._translate_table_coordinates_list(coord)
-
-    def _translate_column_coordinates_str(
-        self,
-        coord_str: str,
-    ) -> tuple[int | None, ...]:
-        width = self.width
-        height = self.height
-        coord = convert_coordinates(coord_str)
-        if len(coord) == 2:
-            x, y = coord
-            if x and x < 0:
-                x = increment(x, width)
-            if y and y < 0:
-                y = increment(y, height)
-            # extent to an area :
-            return (x, y, x, y)
-        x, y, z, t = coord
-        if x and x < 0:
-            x = increment(x, width)
-        if y and y < 0:
-            y = increment(y, height)
-        if z and z < 0:
-            z = increment(z, width)
-        if t and t < 0:
-            t = increment(t, height)
-        return (x, y, z, t)
-
-    def _translate_column_coordinates_list(
-        self,
-        coord: tuple | list,
-    ) -> tuple[int | None, ...]:
-        width = self.width
-        height = self.height
-        # assuming we got int values
-        if len(coord) == 1:
-            # It is a column
-            x = coord[0]
-            if x and x < 0:
-                x = increment(x, width)
-            return (x, None, x, None)
-        if len(coord) == 2:
-            # It is a column range, not a cell, because context is table
-            x = coord[0]
-            if x and x < 0:
-                x = increment(x, width)
-            z = coord[1]
-            if z and z < 0:
-                z = increment(z, width)
-            return (x, None, z, None)
-        # should be 4 int
-        x, y, z, t = coord
-        if x and x < 0:
-            x = increment(x, width)
-        if y and y < 0:
-            y = increment(y, height)
-        if z and z < 0:
-            z = increment(z, width)
-        if t and t < 0:
-            t = increment(t, height)
-        return (x, y, z, t)
-
-    def _translate_column_coordinates(
-        self,
-        coord: tuple | list | str,
-    ) -> tuple[int | None, ...]:
-        if isinstance(coord, str):
-            return self._translate_column_coordinates_str(coord)
-        return self._translate_column_coordinates_list(coord)
-
-    def _translate_cell_coordinates(
-        self,
-        coord: tuple | list | str,
-    ) -> tuple[int | None, int | None]:
-        # we want an x,y result
-        coord = convert_coordinates(coord)
-        if len(coord) == 2:
-            x, y = coord
-        # If we got an area, take the first cell
-        elif len(coord) == 4:
-            x, y, z, t = coord
-        else:
-            raise ValueError(str(coord))
-        if x and x < 0:
-            x = increment(x, self.width)
-        if y and y < 0:
-            y = increment(y, self.height)
-        return (x, y)
-
-    def _compute_table_cache(self) -> None:
-        idx_repeated_seq = self.elements_repeated_sequence(
-            _xpath_row, "table:number-rows-repeated"
-        )
-        self._tmap = make_cache_map(idx_repeated_seq)
-        idx_repeated_seq = self.elements_repeated_sequence(
-            _xpath_column, "table:number-columns-repeated"
-        )
-        self._cmap = make_cache_map(idx_repeated_seq)
-
-    def _update_width(self, row: Row) -> None:
-        """Synchronize the number of columns if the row is bigger.
-
-        Append, don't insert, not to disturb the current layout.
-        """
-        diff = row.width - self.width
-        if diff > 0:
-            self.append_column(Column(repeated=diff))
-
-    def _get_formatted_text_normal(self, context: dict | None) -> str:
-        result = []
-        for row in self.traverse():
-            for cell in row.traverse():
-                value = cell.get_value(try_get_text=False)
-                # None ?
-                if value is None:
-                    # Try with get_formatted_text on the elements
-                    value = []
-                    for element in cell.children:
-                        value.append(element.get_formatted_text(context))
-                    value = "".join(value)
-                else:
-                    value = str(value)
-                result.append(value)
-                result.append("\n")
-            result.append("\n")
-        return "".join(result)
-
-    def _get_formatted_text_rst(self, context: dict) -> str:  # noqa: C901
-        context["no_img_level"] += 1
-        # Strip the table => We must clone
-        table = self.clone
-        table.rstrip(aggressive=True)  # type: ignore
-
-        # Fill the rows
-        rows = []
-        cols_nb = 0
-        cols_size: dict[int, int] = {}
-        for odf_row in table.traverse():  # type: ignore
-            row = []
-            for i, cell in enumerate(odf_row.traverse()):
-                value = cell.get_value(try_get_text=False)
-                # None ?
-                if value is None:
-                    # Try with get_formatted_text on the elements
-                    value = []
-                    for element in cell.children:
-                        value.append(element.get_formatted_text(context))
-                    value = "".join(value)
-                else:
-                    value = str(value)
-                value = value.strip()
-                # Strip the empty columns
-                if value:
-                    cols_nb = max(cols_nb, i + 1)
-                # Compute the size of each columns (at least 2)
-                cols_size[i] = max(cols_size.get(i, 2), len(value))
-                # Append
-                row.append(value)
-            rows.append(row)
-
-        # Nothing ?
-        if cols_nb == 0:
-            return ""
-
-        # Prevent a crash with empty columns (by example with images)
-        for col, size in cols_size.items():
-            if size == 0:
-                cols_size[col] = 1
-
-        # Update cols_size
-        LINE_MAX = 100
-        COL_MIN = 16
-
-        free_size = LINE_MAX - (cols_nb - 1) * 3 - 4
-        real_size = sum([cols_size[i] for i in range(cols_nb)])
-        if real_size > free_size:
-            factor = float(free_size) / real_size
-
-            for i in range(cols_nb):
-                old_size = cols_size[i]
-
-                # The cell is already small
-                if old_size <= COL_MIN:
-                    continue
-
-                new_size = int(factor * old_size)
-
-                if new_size < COL_MIN:
-                    new_size = COL_MIN
-                cols_size[i] = new_size
-
-        # Convert !
-        result: list[str] = [""]
-        # Construct the first/last line
-        line: list[str] = []
-        for i in range(cols_nb):
-            line.append("=" * cols_size[i])
-            line.append(" ")
-        line_str = "".join(line)
-
-        # Add the lines
-        result.append(line_str)
-        for row in rows:
-            # Wrap the row
-            wrapped_row = []
-            for i, value in enumerate(row[:cols_nb]):
-                wrapped_value = []
-                for part in value.split("\n"):
-                    # Hack to handle correctly the lists or the directives
-                    subsequent_indent = ""
-                    part_lstripped = part.lstrip()
-                    if part_lstripped.startswith("-") or part_lstripped.startswith(
-                        ".."
-                    ):
-                        subsequent_indent = " " * (len(part) - len(part.lstrip()) + 2)
-                    wrapped_part = wrap(
-                        part, width=cols_size[i], subsequent_indent=subsequent_indent
-                    )
-                    if wrapped_part:
-                        wrapped_value.extend(wrapped_part)
-                    else:
-                        wrapped_value.append("")
-                wrapped_row.append(wrapped_value)
-
-            # Append!
-            for j in range(max([1] + [len(values) for values in wrapped_row])):
-                txt_row: list[str] = []
-                for i in range(cols_nb):
-                    values = wrapped_row[i] if i < len(wrapped_row) else []
-
-                    # An empty cell ?
-                    if len(values) - 1 < j or not values[j]:
-                        if i == 0 and j == 0:
-                            txt_row.append("..")
-                            txt_row.append(" " * (cols_size[i] - 1))
-                        else:
-                            txt_row.append(" " * (cols_size[i] + 1))
-                        continue
-
-                    # Not empty
-                    value = values[j]
-                    txt_row.append(value)
-                    txt_row.append(" " * (cols_size[i] - len(value) + 1))
-                result.append("".join(txt_row))
-
-        result.append(line_str)
-        result.append("")
-        result.append("")
-        result_str = "\n".join(result)
-
-        context["no_img_level"] -= 1
-        return result_str
-
-    def _translate_x_from_any(self, x: str | int) -> int:
-        return translate_from_any(x, self.width, 0)
-
-    #
-    # Public API
-    #
-
-    def append(self, something: Element | str) -> None:
-        """Dispatch .append() call to append_row() or append_column()."""
-        if isinstance(something, Row):
-            self.append_row(something)
-        elif isinstance(something, Column):
-            self.append_column(something)
-        else:
-            # probably still an error
-            self._append(something)
-
-    @property
-    def height(self) -> int:
-        """Get the current height of the table.
-
-        Return: int
-        """
-        try:
-            height = self._tmap[-1] + 1
-        except Exception:
-            height = 0
-        return height
-
-    @property
-    def width(self) -> int:
-        """Get the current width of the table, measured on columns.
-
-        Rows may have different widths, use the Table API to ensure width
-        consistency.
-
-        Return: int
-        """
-        # Columns are our reference for user expected width
-
-        try:
-            width = self._cmap[-1] + 1
-        except Exception:
-            width = 0
-
-        # columns = self._get_columns()
-        # repeated = self.xpath(
-        #        'table:table-column/@table:number-columns-repeated')
-        # unrepeated = len(columns) - len(repeated)
-        # ws = sum(int(r) for r in repeated) + unrepeated
-        # if w != ws:
-        #    print "WARNING   ws", ws, "w", w
-
-        return width
-
-    @property
-    def size(self) -> tuple[int, int]:
-        """Shortcut to get the current width and height of the table.
-
-        Return: (int, int)
-        """
-        return self.width, self.height
-
-    @property
-    def name(self) -> str | None:
-        """Get / set the name of the table."""
-        return self.get_attribute_string("table:name")
-
-    @name.setter
-    def name(self, name: str) -> None:
-        name = _table_name_check(name)
-        # first, update named ranges
-        # fixme : delete name ranges when deleting table, too.
-        for named_range in self.get_named_ranges(table_name=self.name):
-            named_range.set_table_name(name)
-        self.set_attribute("table:name", name)
-
-    @property
-    def protected(self) -> bool:
-        return bool(self.get_attribute("table:protected"))
-
-    @protected.setter
-    def protected(self, protect: bool) -> None:
-        self.set_attribute("table:protected", protect)
-
-    @property
-    def protection_key(self) -> str | None:
-        return self.get_attribute_string("table:protection-key")
-
-    @protection_key.setter
-    def protection_key(self, key: str) -> None:
-        self.set_attribute("table:protection-key", key)
-
-    @property
-    def displayed(self) -> bool:
-        return bool(self.get_attribute("table:display"))
-
-    @displayed.setter
-    def displayed(self, display: bool) -> None:
-        self.set_attribute("table:display", display)
-
-    @property
-    def printable(self) -> bool:
-        printable = self.get_attribute("table:print")
-        # Default value
-        if printable is None:
-            return True
-        return bool(printable)
-
-    @printable.setter
-    def printable(self, printable: bool) -> None:
-        self.set_attribute("table:print", printable)
-
-    @property
-    def print_ranges(self) -> list[str]:
-        ranges = self.get_attribute_string("table:print-ranges")
-        if isinstance(ranges, str):
-            return ranges.split()
-        return []
-
-    @print_ranges.setter
-    def print_ranges(self, ranges: list[str] | None) -> None:
-        if isinstance(ranges, (list, tuple)):
-            self.set_attribute("table:print-ranges", " ".join(ranges))
-        else:
-            self.set_attribute("table:print-ranges", ranges)
-
-    @property
-    def style(self) -> str | None:
-        """Get / set the style of the table
-
-        Return: str
-        """
-        return self.get_attribute_string("table:style-name")
-
-    @style.setter
-    def style(self, style: str | Element) -> None:
-        self.set_style_attribute("table:style-name", style)
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        if context and context["rst_mode"]:
-            return self._get_formatted_text_rst(context)
-        return self._get_formatted_text_normal(context)
-
-    def get_values(
-        self,
-        coord: tuple | list | str | None = None,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-        flat: bool = False,
-    ) -> list:
-        """Get a matrix of values of the table.
-
-        Filter by coordinates will parse the area defined by the coordinates.
-
-        If 'cell_type' is used and 'complete' is True (default), missing values
-        are replaced by None.
-        Filter by ' cell_type = "all" ' will retrieve cells of any
-        type, aka non empty cells.
-
-        If 'cell_type' is None, complete is always True : with no cell type
-        queried, get_values() returns None for each empty cell, the length
-        each lists is equal to the width of the table.
-
-        If get_type is True, returns tuples (value, ODF type of value), or
-        (None, None) for empty cells with complete True.
-
-        If flat is True, the methods return a single list of all the values.
-        By default, flat is False.
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of area
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: list of lists of Python types
-        """
-        if coord:
-            x, y, z, t = self._translate_table_coordinates(coord)
-        else:
-            x = y = z = t = None
-        data = []
-        for row in self.traverse(start=y, end=t):
-            if z is None:
-                width = self.width
-            else:
-                width = min(z + 1, self.width)
-            if x is not None:
-                width -= x
-            values = row.get_values(
-                (x, z),
-                cell_type=cell_type,
-                complete=complete,
-                get_type=get_type,
-            )
-            # complete row to match request width
-            if complete:
-                if get_type:
-                    values.extend([(None, None)] * (width - len(values)))
-                else:
-                    values.extend([None] * (width - len(values)))
-            if flat:
-                data.extend(values)
-            else:
-                data.append(values)
-        return data
-
-    def iter_values(
-        self,
-        coord: tuple | list | str | None = None,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-    ) -> Iterator[list]:
-        """Iterate through lines of Python values of the table.
-
-        Filter by coordinates will parse the area defined by the coordinates.
-
-        cell_type, complete, grt_type : see get_values()
-
-
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of area
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: iterator of lists
-        """
-        if coord:
-            x, y, z, t = self._translate_table_coordinates(coord)
-        else:
-            x = y = z = t = None
-        for row in self.traverse(start=y, end=t):
-            if z is None:
-                width = self.width
-            else:
-                width = min(z + 1, self.width)
-            if x is not None:
-                width -= x
-            values = row.get_values(
-                (x, z),
-                cell_type=cell_type,
-                complete=complete,
-                get_type=get_type,
-            )
-            # complete row to match column width
-            if complete:
-                if get_type:
-                    values.extend([(None, None)] * (width - len(values)))
-                else:
-                    values.extend([None] * (width - len(values)))
-            yield values
-
-    def set_values(
-        self,
-        values: list,
-        coord: tuple | list | str | None = None,
-        style: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-    ) -> None:
-        """Set the value of cells in the table, from the 'coord' position
-        with values.
-
-        'coord' is the coordinate of the upper left cell to be modified by
-        values. If 'coord' is None, default to the position (0,0) ("A1").
-        If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
-        area is used as coordinate.
-
-        The table is *not* cleared before the operation, to reset the table
-        before setting values, use table.clear().
-
-        A list of lists is expected, with as many lists as rows, and as many
-        items in each sublist as cells to be setted. None values in the list
-        will create empty cells with no cell type (but eventually a style).
-
-        Arguments:
-
-            coord -- tuple or str
-
-            values -- list of lists of python types
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                         'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-        """
-        if coord:
-            x, y = self._translate_cell_coordinates(coord)
-        else:
-            x = y = 0
-        if y is None:
-            y = 0
-        if x is None:
-            x = 0
-        y -= 1
-        for row_values in values:
-            y += 1
-            if not row_values:
-                continue
-            row = self.get_row(y, clone=True)
-            repeated = row.repeated or 1
-            if repeated >= 2:
-                row.repeated = None
-            row.set_values(
-                row_values,
-                start=x,
-                cell_type=cell_type,
-                currency=currency,
-                style=style,
-            )
-            self.set_row(y, row, clone=False)
-            self._update_width(row)
-
-    def rstrip(self, aggressive: bool = False) -> None:
-        """Remove *in-place* empty rows below and empty cells at the right of
-        the table. Cells are empty if they contain no value or it evaluates
-        to False, and no style.
-
-        If aggressive is True, empty cells with style are removed too.
-
-        Argument:
-
-            aggressive -- bool
-        """
-        # Step 1: remove empty rows below the table
-        for row in reversed(self._get_rows()):
-            if row.is_empty(aggressive=aggressive):
-                row.parent.delete(row)  # type: ignore
-            else:
-                break
-        # Step 2: rstrip remaining rows
-        max_width = 0
-        for row in self._get_rows():
-            row.rstrip(aggressive=aggressive)
-            # keep count of the biggest row
-            max_width = max(max_width, row.width)
-        # raz cache of rows
-        self._indexes["_tmap"] = {}
-        # Step 3: trim columns to match max_width
-        columns = self._get_columns()
-        repeated_cols = self.xpath("table:table-column/@table:number-columns-repeated")
-        if not isinstance(repeated_cols, list):
-            raise TypeError
-        unrepeated = len(columns) - len(repeated_cols)
-        column_width = sum(int(r) for r in repeated_cols) + unrepeated  # type: ignore
-        diff = column_width - max_width
-        if diff > 0:
-            for column in reversed(columns):
-                repeated = column.repeated or 1
-                repeated = repeated - diff
-                if repeated > 0:
-                    column.repeated = repeated
-                    break
-                else:
-                    column.parent.delete(column)
-                    diff = -repeated
-                    if diff == 0:
-                        break
-        # raz cache of columns
-        self._indexes["_cmap"] = {}
-        self._compute_table_cache()
-
-    def transpose(self, coord: tuple | list | str | None = None) -> None:  # noqa: C901
-        """Swap *in-place* rows and columns of the table.
-
-        If 'coord' is not None, apply transpose only to the area defined by the
-        coordinates. Beware, if area is not square, some cells mays be over
-        written during the process.
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of area
-
-            start -- int or str
-        """
-        data = []
-        if coord is None:
-            for row in self.traverse():
-                data.append(list(row.traverse()))
-            transposed_data = zip_longest(*data)
-            self.clear()
-            # new_rows = []
-            for row_cells in transposed_data:
-                if not isiterable(row_cells):
-                    row_cells = (row_cells,)
-                row = Row()
-                row.extend_cells(row_cells)
-                self.append_row(row, clone=False)
-            self._compute_table_cache()
-        else:
-            x, y, z, t = self._translate_table_coordinates(coord)
-            if x is None:
-                x = 0
-            else:
-                x = min(x, self.width - 1)
-            if z is None:
-                z = self.width - 1
-            else:
-                z = min(z, self.width - 1)
-            if y is None:
-                y = 0
-            else:
-                y = min(y, self.height - 1)
-            if t is None:
-                t = self.height - 1
-            else:
-                t = min(t, self.height - 1)
-            for row in self.traverse(start=y, end=t):
-                data.append(list(row.traverse(start=x, end=z)))
-            transposed_data = zip_longest(*data)
-            # clear locally
-            w = z - x + 1
-            h = t - y + 1
-            if w != h:
-                nones = [[None] * w for i in range(h)]
-                self.set_values(nones, coord=(x, y, z, t))
-            # put transposed
-            filtered_data: list[tuple[Cell]] = []
-            for row_cells in transposed_data:
-                if isinstance(row_cells, (list, tuple)):
-                    filtered_data.append(row_cells)
-                else:
-                    filtered_data.append((row_cells,))
-            self.set_cells(filtered_data, (x, y, x + h - 1, y + w - 1))
-            self._compute_table_cache()
-
-    def is_empty(self, aggressive: bool = False) -> bool:
-        """Return whether every cell in the table has no value or the value
-        evaluates to False (empty string), and no style.
-
-        If aggressive is True, empty cells with style are considered empty.
-
-        Arguments:
-
-            aggressive -- bool
-        """
-        return all(row.is_empty(aggressive=aggressive) for row in self._get_rows())
-
-    #
-    # Rows
-    #
-
-    def _get_rows(self) -> list[Row]:
-        return self.get_elements(_xpath_row)  # type: ignore
-
-    def traverse(  # noqa: C901
-        self,
-        start: int | None = None,
-        end: int | None = None,
-    ) -> Iterator[Row]:
-        """Yield as many row elements as expected rows in the table, i.e.
-        expand repetitions by returning the same row as many times as
-        necessary.
-
-            Arguments:
-
-                start -- int
-
-                end -- int
-
-        Copies are returned, use set_row() to push them back.
-        """
-        idx = -1
-        before = -1
-        y = 0
-        if start is None and end is None:
-            for juska in self._tmap:
-                idx += 1
-                if idx in self._indexes["_tmap"]:
-                    row = self._indexes["_tmap"][idx]
-                else:
-                    row = self._get_element_idx2(_xpath_row_idx, idx)
-                    self._indexes["_tmap"][idx] = row
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    # Return a copy without the now obsolete repetition
-                    row = row.clone
-                    row.y = y
-                    y += 1
-                    if repeated > 1:
-                        row.repeated = None
-                    yield row
-        else:
-            if start is None:
-                start = 0
-            start = max(0, start)
-            if end is None:
-                try:
-                    end = self._tmap[-1]
-                except Exception:
-                    end = -1
-            start_map = find_odf_idx(self._tmap, start)
-            if start_map is None:
-                return
-            if start_map > 0:
-                before = self._tmap[start_map - 1]
-            idx = start_map - 1
-            before = start - 1
-            y = start
-            for juska in self._tmap[start_map:]:
-                idx += 1
-                if idx in self._indexes["_tmap"]:
-                    row = self._indexes["_tmap"][idx]
-                else:
-                    row = self._get_element_idx2(_xpath_row_idx, idx)
-                    self._indexes["_tmap"][idx] = row
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    if y <= end:
-                        row = row.clone
-                        row.y = y
-                        y += 1
-                        if repeated > 1 or (y == start and start > 0):
-                            row.repeated = None
-                        yield row
-
-    def get_rows(
-        self,
-        coord: tuple | list | str | None = None,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Row]:
-        """Get the list of rows matching the criteria.
-
-        Filter by coordinates will parse the area defined by the coordinates.
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of rows
-
-            content -- str regex
-
-            style -- str
-
-        Return: list of rows
-        """
-        if coord:
-            _x, y, _z, t = self._translate_table_coordinates(coord)
-        else:
-            y = t = None
-        # fixme : not clones ?
-        if not content and not style:
-            return list(self.traverse(start=y, end=t))
-        rows = []
-        for row in self.traverse(start=y, end=t):
-            if content and not row.match(content):
-                continue
-            if style and style != row.style:
-                continue
-            rows.append(row)
-        return rows
-
-    def _get_row2(self, y: int, clone: bool = True, create: bool = True) -> Row:
-        if y >= self.height:
-            if create:
-                return Row()
-            raise ValueError("Row not found")
-        row = self._get_row2_base(y)
-        if row is None:
-            raise ValueError("Row not found")
-        if clone:
-            return row.clone
-        return row
-
-    def _get_row2_base(self, y: int) -> Row | None:
-        idx = find_odf_idx(self._tmap, y)
-        if idx is not None:
-            if idx in self._indexes["_tmap"]:
-                row = self._indexes["_tmap"][idx]
-            else:
-                row = self._get_element_idx2(_xpath_row_idx, idx)
-                self._indexes["_tmap"][idx] = row
-            return row
-        return None
-
-    def get_row(self, y: int | str, clone: bool = True, create: bool = True) -> Row:
-        """Get the row at the given "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        A copy is returned, use set_cell() to push it back.
-
-        Arguments:
-
-            y -- int or str
-
-        Return: Row
-        """
-        # fixme : keep repeat ? maybe an option to functions : "raw=False"
-        y = self._translate_y_from_any(y)
-        row = self._get_row2(y, clone=clone, create=create)
-        if row is None:
-            raise ValueError("Row not found")
-        row.y = y
-        return row
-
-    def set_row(self, y: int | str, row: Row | None = None, clone: bool = True) -> Row:
-        """Replace the row at the given position with the new one. Repetions of
-        the old row will be adjusted.
-
-        If row is None, a new empty row is created.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Arguments:
-
-            y -- int or str
-
-            row -- Row
-
-        returns the row, with updated row.y
-        """
-        if row is None:
-            row = Row()
-            repeated = 1
-            clone = False
-        else:
-            repeated = row.repeated or 1
-        y = self._translate_y_from_any(y)
-        row.y = y
-        # Outside the defined table ?
-        diff = y - self.height
-        if diff == 0:
-            row_back = self.append_row(row, _repeated=repeated, clone=clone)
-        elif diff > 0:
-            self.append_row(Row(repeated=diff), _repeated=diff, clone=clone)
-            row_back = self.append_row(row, _repeated=repeated, clone=clone)
-        else:
-            # Inside the defined table
-            row_back = set_item_in_vault(  # type: ignore
-                y, row, self, _xpath_row_idx, "_tmap", clone=clone
-            )
-        # print self.serialize(True)
-        # Update width if necessary
-        self._update_width(row_back)
-        return row_back
-
-    def insert_row(
-        self, y: str | int, row: Row | None = None, clone: bool = True
-    ) -> Row:
-        """Insert the row before the given "y" position. If no row is given,
-        an empty one is created.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        If row is None, a new empty row is created.
-
-        Arguments:
-
-            y -- int or str
-
-            row -- Row
-
-        returns the row, with updated row.y
-        """
-        if row is None:
-            row = Row()
-            clone = False
-        y = self._translate_y_from_any(y)
-        diff = y - self.height
-        if diff < 0:
-            row_back = insert_item_in_vault(y, row, self, _xpath_row_idx, "_tmap")
-        elif diff == 0:
-            row_back = self.append_row(row, clone=clone)
-        else:
-            self.append_row(Row(repeated=diff), _repeated=diff, clone=False)
-            row_back = self.append_row(row, clone=clone)
-        row_back.y = y  # type: ignore
-        # Update width if necessary
-        self._update_width(row_back)  # type: ignore
-        return row_back  # type: ignore
-
-    def extend_rows(self, rows: list[Row] | None = None) -> None:
-        """Append a list of rows at the end of the table.
-
-        Arguments:
-
-            rows -- list of Row
-        """
-        if rows is None:
-            rows = []
-        self.extend(rows)
-        self._compute_table_cache()
-        # Update width if necessary
-        width = self.width
-        for row in self.traverse():
-            if row.width > width:
-                width = row.width
-        diff = width - self.width
-        if diff > 0:
-            self.append_column(Column(repeated=diff))
-
-    def append_row(
-        self,
-        row: Row | None = None,
-        clone: bool = True,
-        _repeated: int | None = None,
-    ) -> Row:
-        """Append the row at the end of the table. If no row is given, an
-        empty one is created.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Note the columns are automatically created when the first row is
-        inserted in an empty table. So better insert a filled row.
-
-        Arguments:
-
-            row -- Row
-
-            _repeated -- (optional), repeated value of the row
-
-        returns the row, with updated row.y
-        """
-        if row is None:
-            row = Row()
-            _repeated = 1
-        elif clone:
-            row = row.clone
-        # Appending a repeated row accepted
-        # Do not insert next to the last row because it could be in a group
-        self._append(row)
-        if _repeated is None:
-            _repeated = row.repeated or 1
-        self._tmap = insert_map_once(self._tmap, len(self._tmap), _repeated)
-        row.y = self.height - 1
-        # Initialize columns
-        if not self._get_columns():
-            repeated = row.width
-            self.insert(Column(repeated=repeated), position=0)
-            self._compute_table_cache()
-        # Update width if necessary
-        self._update_width(row)
-        return row
-
-    def delete_row(self, y: int | str) -> None:
-        """Delete the row at the given "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Arguments:
-
-            y -- int or str
-        """
-        y = self._translate_y_from_any(y)
-        # Outside the defined table
-        if y >= self.height:
-            return
-        # Inside the defined table
-        delete_item_in_vault(y, self, _xpath_row_idx, "_tmap")
-
-    def get_row_values(
-        self,
-        y: int | str,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-    ) -> list:
-        """Shortcut to get the list of Python values for the cells of the row
-        at the given "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-        If cell_type and complete is True, replace missing values by None.
-
-        If get_type is True, returns a tuple (value, ODF type of value)
-
-        Arguments:
-
-            y -- int, str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: list of lists of Python types
-        """
-        values = self.get_row(y, clone=False).get_values(
-            cell_type=cell_type, complete=complete, get_type=get_type
-        )
-        # complete row to match column width
-        if complete:
-            if get_type:
-                values.extend([(None, None)] * (self.width - len(values)))
-            else:
-                values.extend([None] * (self.width - len(values)))
-        return values
-
-    def set_row_values(
-        self,
-        y: int | str,
-        values: list,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        style: str | None = None,
-    ) -> Row:
-        """Shortcut to set the values of *all* cells of the row at the given
-        "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Arguments:
-
-            y -- int or str
-
-            values -- list of Python types
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                         'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-
-        returns the row, with updated row.y
-        """
-        row = Row()  # needed if clones rows
-        row.set_values(values, style=style, cell_type=cell_type, currency=currency)
-        return self.set_row(y, row)  # needed if clones rows
-
-    def set_row_cells(self, y: int | str, cells: list | None = None) -> Row:
-        """Shortcut to set *all* the cells of the row at the given
-        "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Arguments:
-
-            y -- int or str
-
-            cells -- list of Python types
-
-            style -- str
-
-        returns the row, with updated row.y
-        """
-        if cells is None:
-            cells = []
-        row = Row()  # needed if clones rows
-        row.extend_cells(cells)
-        return self.set_row(y, row)  # needed if clones rows
-
-    def is_row_empty(self, y: int | str, aggressive: bool = False) -> bool:
-        """Return wether every cell in the row at the given "y" position has
-        no value or the value evaluates to False (empty string), and no style.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        If aggressive is True, empty cells with style are considered empty.
-
-        Arguments:
-
-            y -- int or str
-
-            aggressive -- bool
-        """
-        return self.get_row(y, clone=False).is_empty(aggressive=aggressive)
-
-    #
-    # Cells
-    #
-
-    def get_cells(
-        self,
-        coord: tuple | list | str | None = None,
-        cell_type: str | None = None,
-        style: str | None = None,
-        content: str | None = None,
-        flat: bool = False,
-    ) -> list:
-        """Get the cells matching the criteria. If 'coord' is None,
-        parse the whole table, else parse the area defined by 'coord'.
-
-        Filter by  cell_type = "all"  will retrieve cells of any
-        type, aka non empty cells.
-
-        If flat is True (default is False), the method return a single list
-        of all the values, else a list of lists of cells.
-
-        if cell_type, style and content are None, get_cells() will return
-        the exact number of cells of the area, including empty cells.
-
-        Arguments:
-
-            coordinates -- str or tuple of int : coordinates of area
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            content -- str regex
-
-            style -- str
-
-            flat -- boolean
-
-        Return: list of tuples
-        """
-        if coord:
-            x, y, z, t = self._translate_table_coordinates(coord)
-        else:
-            x = y = z = t = None
-        if flat:
-            cells: list[Cell] = []
-            for row in self.traverse(start=y, end=t):
-                row_cells = row.get_cells(
-                    coord=(x, z),
-                    cell_type=cell_type,
-                    style=style,
-                    content=content,
-                )
-                cells.extend(row_cells)
-            return cells
-        else:
-            lcells: list[list[Cell]] = []
-            for row in self.traverse(start=y, end=t):
-                row_cells = row.get_cells(
-                    coord=(x, z),
-                    cell_type=cell_type,
-                    style=style,
-                    content=content,
-                )
-                lcells.append(row_cells)
-            return lcells
-
-    def get_cell(
-        self,
-        coord: tuple | list | str,
-        clone: bool = True,
-        keep_repeated: bool = True,
-    ) -> Cell:
-        """Get the cell at the given coordinates.
-
-        They are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        A copy is returned, use ``set_cell`` to push it back.
-
-        Arguments:
-
-            coord -- (int, int) or str
-
-        Return: Cell
-        """
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        # Outside the defined table
-        if y >= self.height:
-            cell = Cell()
-        else:
-            # Inside the defined table
-            row = self._get_row2_base(y)
-            if row is None:
-                raise ValueError
-            read_cell = row.get_cell(x, clone=clone)
-            if read_cell is None:
-                raise ValueError
-            cell = read_cell
-            if not keep_repeated:
-                repeated = cell.repeated or 1
-                if repeated >= 2:
-                    cell.repeated = None
-        cell.x = x
-        cell.y = y
-        return cell
-
-    def get_value(
-        self,
-        coord: tuple | list | str,
-        get_type: bool = False,
-    ) -> Any:
-        """Shortcut to get the Python value of the cell at the given
-        coordinates.
-
-        If get_type is True, returns the tuples (value, ODF type)
-
-        coord is either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4". If an Area is given, the upper
-        left position is used as coord.
-
-        Arguments:
-
-            coord -- (int, int) or str : coordinate
-
-        Return: Python type
-        """
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        # Outside the defined table
-        if y >= self.height:
-            if get_type:
-                return (None, None)
-            return None
-        else:
-            # Inside the defined table
-            row = self._get_row2_base(y)
-            if row is None:
-                raise ValueError
-            cell = row._get_cell2_base(x)
-            if cell is None:
-                if get_type:
-                    return (None, None)
-                return None
-            return cell.get_value(get_type=get_type)
-
-    def set_cell(
-        self,
-        coord: tuple | list | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Replace a cell of the table at the given coordinates.
-
-        They are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        Arguments:
-
-            coord -- (int, int) or str : coordinate
-
-            cell -- Cell
-
-        return the cell, with x and y updated
-        """
-        if cell is None:
-            cell = Cell()
-            clone = False
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        cell.x = x
-        cell.y = y
-        if y >= self.height:
-            row = Row()
-            cell_back = row.set_cell(x, cell, clone=clone)
-            self.set_row(y, row, clone=False)
-        else:
-            row_read = self._get_row2_base(y)
-            if row_read is None:
-                raise ValueError
-            row = row_read
-            row.y = y
-            repeated = row.repeated or 1
-            if repeated > 1:
-                row = row.clone
-                row.repeated = None
-                cell_back = row.set_cell(x, cell, clone=clone)
-                self.set_row(y, row, clone=False)
-            else:
-                cell_back = row.set_cell(x, cell, clone=clone)
-                # Update width if necessary, since we don't use set_row
-                self._update_width(row)
-        return cell_back
-
-    def set_cells(
-        self,
-        cells: list[list[Cell]] | list[tuple[Cell]],
-        coord: tuple | list | str | None = None,
-        clone: bool = True,
-    ) -> None:
-        """Set the cells in the table, from the 'coord' position.
-
-        'coord' is the coordinate of the upper left cell to be modified by
-        values. If 'coord' is None, default to the position (0,0) ("A1").
-        If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
-        area is used as coordinate.
-
-        The table is *not* cleared before the operation, to reset the table
-        before setting cells, use table.clear().
-
-        A list of lists is expected, with as many lists as rows to be set, and
-        as many cell in each sublist as cells to be setted in the row.
-
-        Arguments:
-
-            cells -- list of list of cells
-
-            coord -- tuple or str
-
-            values -- list of lists of python types
-        """
-        if coord:
-            x, y = self._translate_cell_coordinates(coord)
-        else:
-            x = y = 0
-        if y is None:
-            y = 0
-        if x is None:
-            x = 0
-        y -= 1
-        for row_cells in cells:
-            y += 1
-            if not row_cells:
-                continue
-            row = self.get_row(y, clone=True)
-            repeated = row.repeated or 1
-            if repeated >= 2:
-                row.repeated = None
-            row.set_cells(row_cells, start=x, clone=clone)
-            self.set_row(y, row, clone=False)
-            self._update_width(row)
-
-    def set_value(
-        self,
-        coord: tuple | list | str,
-        value: Any,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        style: str | None = None,
-    ) -> None:
-        """Set the Python value of the cell at the given coordinates.
-
-        They are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        Arguments:
-
-            coord -- (int, int) or str
-
-            value -- Python type
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                     'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-
-        """
-        self.set_cell(
-            coord,
-            Cell(value, cell_type=cell_type, currency=currency, style=style),
-            clone=False,
-        )
-
-    def set_cell_image(
-        self,
-        coord: tuple | list | str,
-        image_frame: Frame,
-        doc_type: str | None = None,
-    ) -> None:
-        """Do all the magic to display an image in the cell at the given
-        coordinates.
-
-        They are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        The frame element must contain the expected image position and
-        dimensions.
-
-        DrawImage insertion depends on the document type, so the type must be
-        provided or the table element must be already attached to a document.
-
-        Arguments:
-
-            coord -- (int, int) or str
-
-            image_frame -- Frame including an image
-
-            doc_type -- 'spreadsheet' or 'text'
-        """
-        # Test document type
-        if doc_type is None:
-            body = self.document_body
-            if body is None:
-                raise ValueError("document type not found")
-            doc_type = {"office:spreadsheet": "spreadsheet", "office:text": "text"}.get(
-                body.tag
-            )
-            if doc_type is None:
-                raise ValueError("document type not supported for images")
-        # We need the end address of the image
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        cell = self.get_cell((x, y))
-        image_frame = image_frame.clone  # type: ignore
-        # Remove any previous paragraph, frame, etc.
-        for child in cell.children:
-            cell.delete(child)
-        # Now it all depends on the document type
-        if doc_type == "spreadsheet":
-            image_frame.anchor_type = "char"
-            # The frame needs end coordinates
-            width, height = image_frame.size
-            image_frame.set_attribute("table:end-x", width)
-            image_frame.set_attribute("table:end-y", height)
-            # FIXME what happens when the address changes?
-            address = f"{self.name}.{digit_to_alpha(x)}{y + 1}"
-            image_frame.set_attribute("table:end-cell-address", address)
-            # The frame is directly in the cell
-            cell.append(image_frame)
-        elif doc_type == "text":
-            # The frame must be in a paragraph
-            cell.set_value("")
-            paragraph = cell.get_element("text:p")
-            if paragraph is None:
-                raise ValueError
-            paragraph.append(image_frame)
-        self.set_cell(coord, cell)
-
-    def insert_cell(
-        self,
-        coord: tuple | list | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Insert the given cell at the given coordinates. If no cell is
-        given, an empty one is created.
-
-        Coordinates are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        Cells on the right are shifted. Other rows remain untouched.
-
-        Arguments:
-
-            coord -- (int, int) or str
-
-            cell -- Cell
-
-        returns the cell with x and y updated
-        """
-        if cell is None:
-            cell = Cell()
-            clone = False
-        if clone:
-            cell = cell.clone
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        row = self._get_row2(y, clone=True)
-        row.y = y
-        row.repeated = None
-        cell_back = row.insert_cell(x, cell, clone=False)
-        self.set_row(y, row, clone=False)
-        # Update width if necessary
-        self._update_width(row)
-        return cell_back
-
-    def append_cell(
-        self,
-        y: int | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Append the given cell at the "y" coordinate. Repeated cells are
-        accepted. If no cell is given, an empty one is created.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Other rows remain untouched.
-
-        Arguments:
-
-            y -- int or str
-
-            cell -- Cell
-
-        returns the cell with x and y updated
-        """
-        if cell is None:
-            cell = Cell()
-            clone = False
-        if clone:
-            cell = cell.clone
-        y = self._translate_y_from_any(y)
-        row = self._get_row2(y)
-        row.y = y
-        cell_back = row.append_cell(cell, clone=False)
-        self.set_row(y, row)
-        # Update width if necessary
-        self._update_width(row)
-        return cell_back
-
-    def delete_cell(self, coord: tuple | list | str) -> None:
-        """Delete the cell at the given coordinates, so that next cells are
-        shifted to the left.
-
-        Coordinates are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        Use set_value() for erasing value.
-
-        Arguments:
-
-            coord -- (int, int) or str
-        """
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        # Outside the defined table
-        if y >= self.height:
-            return
-        # Inside the defined table
-        row = self._get_row2_base(y)
-        if row is None:
-            raise ValueError
-        row.delete_cell(x)
-        # self.set_row(y, row)
-
-    # Columns
-
-    def _get_columns(self) -> list:
-        return self.get_elements(_xpath_column)
-
-    def traverse_columns(  # noqa: C901
-        self,
-        start: int | None = None,
-        end: int | None = None,
-    ) -> Iterator[Column]:
-        """Yield as many column elements as expected columns in the table,
-        i.e. expand repetitions by returning the same column as many times as
-        necessary.
-
-            Arguments:
-
-                start -- int
-
-                end -- int
-
-        Copies are returned, use set_column() to push them back.
-        """
-        idx = -1
-        before = -1
-        x = 0
-        if start is None and end is None:
-            for juska in self._cmap:
-                idx += 1
-                if idx in self._indexes["_cmap"]:
-                    column = self._indexes["_cmap"][idx]
-                else:
-                    column = self._get_element_idx2(_xpath_column_idx, idx)
-                    self._indexes["_cmap"][idx] = column
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    # Return a copy without the now obsolete repetition
-                    column = column.clone
-                    column.x = x
-                    x += 1
-                    if repeated > 1:
-                        column.repeated = None
-                    yield column
-        else:
-            if start is None:
-                start = 0
-            start = max(0, start)
-            if end is None:
-                try:
-                    end = self._cmap[-1]
-                except Exception:
-                    end = -1
-            start_map = find_odf_idx(self._cmap, start)
-            if start_map is None:
-                return
-            if start_map > 0:
-                before = self._cmap[start_map - 1]
-            idx = start_map - 1
-            before = start - 1
-            x = start
-            for juska in self._cmap[start_map:]:
-                idx += 1
-                if idx in self._indexes["_cmap"]:
-                    column = self._indexes["_cmap"][idx]
-                else:
-                    column = self._get_element_idx2(_xpath_column_idx, idx)
-                    self._indexes["_cmap"][idx] = column
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    if x <= end:
-                        column = column.clone
-                        column.x = x
-                        x += 1
-                        if repeated > 1 or (x == start and start > 0):
-                            column.repeated = None
-                        yield column
-
-    def get_columns(
-        self,
-        coord: tuple | list | str | None = None,
-        style: str | None = None,
-    ) -> list[Column]:
-        """Get the list of columns matching the criteria. Each result is a
-        tuple of (x, column).
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of columns
-
-            style -- str
-
-        Return: list of columns
-        """
-        if coord:
-            x, _y, _z, t = self._translate_column_coordinates(coord)
-        else:
-            x = t = None
-        if not style:
-            return list(self.traverse_columns(start=x, end=t))
-        columns = []
-        for column in self.traverse_columns(start=x, end=t):
-            if style != column.style:
-                continue
-            columns.append(column)
-        return columns
-
-    def _get_column2(self, x: int) -> Column | None:
-        # Outside the defined table
-        if x >= self.width:
-            return Column()
-        # Inside the defined table
-        odf_idx = find_odf_idx(self._cmap, x)
-        if odf_idx is not None:
-            column = self._get_element_idx2(_xpath_column_idx, odf_idx)
-            if column is None:
-                return None
-            # fixme : no clone here => change doc and unit tests
-            return column.clone  # type: ignore
-            # return row
-        return None
-
-    def get_column(self, x: int | str) -> Column:
-        """Get the column at the given "x" position.
-
-        ODF columns don't contain cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        A copy is returned, use set_column() to push it back.
-
-        Arguments:
-
-            x -- int or str
-
-        Return: Column
-        """
-        x = self._translate_x_from_any(x)
-        column = self._get_column2(x)
-        if column is None:
-            raise ValueError
-        column.x = x
-        return column
-
-    def set_column(
-        self,
-        x: int | str,
-        column: Column | None = None,
-    ) -> Column:
-        """Replace the column at the given "x" position.
-
-        ODF columns don't contain cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Arguments:
-
-            x -- int or str
-
-            column -- Column
-        """
-        x = self._translate_x_from_any(x)
-        if column is None:
-            column = Column()
-            repeated = 1
-        else:
-            repeated = column.repeated or 1
-        column.x = x
-        # Outside the defined table ?
-        diff = x - self.width
-        if diff == 0:
-            column_back = self.append_column(column, _repeated=repeated)
-        elif diff > 0:
-            self.append_column(Column(repeated=diff), _repeated=diff)
-            column_back = self.append_column(column, _repeated=repeated)
-        else:
-            # Inside the defined table
-            column_back = set_item_in_vault(  # type: ignore
-                x, column, self, _xpath_column_idx, "_cmap"
-            )
-        return column_back
-
-    def insert_column(
-        self,
-        x: int | str,
-        column: Column | None = None,
-    ) -> Column:
-        """Insert the column before the given "x" position. If no column is
-        given, an empty one is created.
-
-        ODF columns don't contain cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Arguments:
-
-            x -- int or str
-
-            column -- Column
-        """
-        if column is None:
-            column = Column()
-        x = self._translate_x_from_any(x)
-        diff = x - self.width
-        if diff < 0:
-            column_back = insert_item_in_vault(
-                x, column, self, _xpath_column_idx, "_cmap"
-            )
-        elif diff == 0:
-            column_back = self.append_column(column.clone)
-        else:
-            self.append_column(Column(repeated=diff), _repeated=diff)
-            column_back = self.append_column(column.clone)
-        column_back.x = x  # type: ignore
-        # Repetitions are accepted
-        repeated = column.repeated or 1
-        # Update width on every row
-        for row in self._get_rows():
-            if row.width > x:
-                row.insert_cell(x, Cell(repeated=repeated))
-            # Shorter rows don't need insert
-            # Longer rows shouldn't exist!
-        return column_back  # type: ignore
-
-    def append_column(
-        self,
-        column: Column | None = None,
-        _repeated: int | None = None,
-    ) -> Column:
-        """Append the column at the end of the table. If no column is given,
-        an empty one is created.
-
-        ODF columns don't contain cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Arguments:
-
-            column -- Column
-        """
-        if column is None:
-            column = Column()
-        else:
-            column = column.clone
-        if not self._cmap:
-            position = 0
-        else:
-            odf_idx = len(self._cmap) - 1
-            last_column = self._get_element_idx2(_xpath_column_idx, odf_idx)
-            if last_column is None:
-                raise ValueError
-            position = self.index(last_column) + 1
-        column.x = self.width
-        self.insert(column, position=position)
-        # Repetitions are accepted
-        if _repeated is None:
-            _repeated = column.repeated or 1
-        self._cmap = insert_map_once(self._cmap, len(self._cmap), _repeated)
-        # No need to update row widths
-        return column
-
-    def delete_column(self, x: int | str) -> None:
-        """Delete the column at the given position. ODF columns don't contain
-        cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Arguments:
-
-            x -- int or str
-        """
-        x = self._translate_x_from_any(x)
-        # Outside the defined table
-        if x >= self.width:
-            return
-        # Inside the defined table
-        delete_item_in_vault(x, self, _xpath_column_idx, "_cmap")
-        # Update width
-        width = self.width
-        for row in self._get_rows():
-            if row.width >= width:
-                row.delete_cell(x)
-
-    def get_column_cells(  # noqa: C901
-        self,
-        x: int | str,
-        style: str | None = None,
-        content: str | None = None,
-        cell_type: str | None = None,
-        complete: bool = False,
-    ) -> list[Cell | None]:
-        """Get the list of cells at the given position.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-
-        If complete is True, replace missing values by None.
-
-        Arguments:
-
-            x -- int or str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            content -- str regex
-
-            style -- str
-
-            complete -- boolean
-
-        Return: list of Cell
-        """
-        x = self._translate_x_from_any(x)
-        if cell_type:
-            cell_type = cell_type.lower().strip()
-        cells: list[Cell | None] = []
-        if not style and not content and not cell_type:
-            for row in self.traverse():
-                cells.append(row.get_cell(x, clone=True))
-            return cells
-        for row in self.traverse():
-            cell = row.get_cell(x, clone=True)
-            if cell is None:
-                raise ValueError
-            # Filter the cells by cell_type
-            if cell_type:
-                ctype = cell.type
-                if not ctype or not (ctype == cell_type or cell_type == "all"):
-                    if complete:
-                        cells.append(None)
-                    continue
-            # Filter the cells with the regex
-            if content and not cell.match(content):
-                if complete:
-                    cells.append(None)
-                continue
-            # Filter the cells with the style
-            if style and style != cell.style:
-                if complete:
-                    cells.append(None)
-                continue
-            cells.append(cell)
-        return cells
-
-    def get_column_values(
-        self,
-        x: int | str,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-    ) -> list[Any]:
-        """Shortcut to get the list of Python values for the cells at the
-        given position.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-        If cell_type and complete is True, replace missing values by None.
-
-        If get_type is True, returns a tuple (value, ODF type of value)
-
-        Arguments:
-
-            x -- int or str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: list of Python types
-        """
-        cells = self.get_column_cells(
-            x, style=None, content=None, cell_type=cell_type, complete=complete
-        )
-        values: list[Any] = []
-        for cell in cells:
-            if cell is None:
-                if complete:
-                    if get_type:
-                        values.append((None, None))
-                    else:
-                        values.append(None)
-                continue
-            if cell_type:
-                ctype = cell.type
-                if not ctype or not (ctype == cell_type or cell_type == "all"):
-                    if complete:
-                        if get_type:
-                            values.append((None, None))
-                        else:
-                            values.append(None)
-                    continue
-            values.append(cell.get_value(get_type=get_type))
-        return values
-
-    def set_column_cells(self, x: int | str, cells: list[Cell]) -> None:
-        """Shortcut to set the list of cells at the given position.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        The list must have the same length than the table height.
-
-        Arguments:
-
-            x -- int or str
-
-            cells -- list of Cell
-        """
-        height = self.height
-        if len(cells) != height:
-            raise ValueError(f"col mismatch: {height} cells expected")
-        cells_iterator = iter(cells)
-        for y, row in enumerate(self.traverse()):
-            row.set_cell(x, next(cells_iterator))
-            self.set_row(y, row)
-
-    def set_column_values(
-        self,
-        x: int | str,
-        values: list,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        style: str | None = None,
-    ) -> None:
-        """Shortcut to set the list of Python values of cells at the given
-        position.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        The list must have the same length than the table height.
-
-        Arguments:
-
-            x -- int or str
-
-            values -- list of Python types
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                         'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-        """
-        cells = [
-            Cell(value, cell_type=cell_type, currency=currency, style=style)
-            for value in values
-        ]
-        self.set_column_cells(x, cells)
-
-    def is_column_empty(self, x: int | str, aggressive: bool = False) -> bool:
-        """Return wether every cell in the column at "x" position has no value
-        or the value evaluates to False (empty string), and no style.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        If aggressive is True, empty cells with style are considered empty.
-
-        Return: bool
-        """
-        for cell in self.get_column_cells(x):
-            if cell is None:
-                continue
-            if not cell.is_empty(aggressive=aggressive):
-                return False
-        return True
-
-    # Named Range
-
-    def get_named_ranges(  # type: ignore
-        self,
-        table_name: str | list[str] | None = None,
-    ) -> list[NamedRange]:
-        """Returns the list of available Name Ranges of the spreadsheet. If
-        table_name is provided, limits the search to these tables.
-        Beware : named ranges are stored at the body level, thus do not call
-        this method on a cloned table.
-
-        Arguments:
-
-            table_names -- str or list of str, names of tables
-
-        Return : list of table_range
-        """
-        body = self.document_body
-        if not body:
-            return []
-        all_named_ranges = body.get_named_ranges()
-        if not table_name:
-            return all_named_ranges  # type:ignore
-        filter_ = []
-        if isinstance(table_name, str):
-            filter_.append(table_name)
-        elif isiterable(table_name):
-            filter_.extend(table_name)
-        else:
-            raise ValueError(
-                f"table_name must be string or Iterable, not {type(table_name)}"
-            )
-        return [
-            nr for nr in all_named_ranges if nr.table_name in filter_  # type:ignore
-        ]
-
-    def get_named_range(self, name: str) -> NamedRange:
-        """Returns the Name Ranges of the specified name. If
-        table_name is provided, limits the search to these tables.
-        Beware : named ranges are stored at the body level, thus do not call
-        this method on a cloned table.
-
-        Arguments:
-
-            name -- str, name of the named range object
-
-        Return : NamedRange
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document")
-        return body.get_named_range(name)  # type: ignore
-
-    def set_named_range(
-        self,
-        name: str,
-        crange: str | tuple | list,
-        table_name: str | None = None,
-        usage: str | None = None,
-    ) -> None:
-        """Create a Named Range element and insert it in the document.
-        Beware : named ranges are stored at the body level, thus do not call
-        this method on a cloned table.
-
-        Arguments:
-
-            name -- str, name of the named range
-
-            crange -- str or tuple of int, cell or area coordinate
-
-            table_name -- str, name of the table
-
-            uage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document")
-        if not name:
-            raise ValueError("Name required.")
-        if table_name is None:
-            table_name = self.name
-        named_range = NamedRange(name, crange, table_name, usage)
-        body.append_named_range(named_range)
-
-    def delete_named_range(self, name: str) -> None:
-        """Delete the Named Range of specified name from the spreadsheet.
-        Beware : named ranges are stored at the body level, thus do not call
-        this method on a cloned table.
-
-        Arguments:
-
-            name -- str
-        """
-        name = name.strip()
-        if not name:
-            raise ValueError("Name required.")
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        body.delete_named_range(name)
-
-    #
-    # Cell span
-    #
-
-    def set_span(  # noqa: C901
-        self,
-        area: str | tuple | list,
-        merge: bool = False,
-    ) -> bool:
-        """Create a Cell Span : span the first cell of the area on several
-        columns and/or rows.
-        If merge is True, replace text of the cell by the concatenation of
-        existing text in covered cells.
-        Beware : if merge is True, old text is changed, if merge is False
-        (the default), old text in coverd cells is still present but not
-        displayed by most GUI.
-
-        If the area defines only one cell, the set span will do nothing.
-        It is not allowed to apply set span to an area whose one cell already
-        belongs to previous cell span.
-
-        Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
-        be provided as an alpha numeric value like "A1:B2' or a tuple like
-        (0, 0, 1, 1) or (0, 0).
-
-        Arguments:
-
-            area -- str or tuple of int, cell or area coordinate
-
-            merge -- boolean
-        """
-        # get area
-        digits = convert_coordinates(area)
-        if len(digits) == 4:
-            x, y, z, t = digits
-        else:
-            x, y = digits
-            z, t = digits
-        start = x, y
-        end = z, t
-        if start == end:
-            # one cell : do nothing
-            return False
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        if z is None:
-            raise ValueError
-        if t is None:
-            raise ValueError
-        # check for previous span
-        good = True
-        # Check boundaries and empty cells : need to crate non existent cells
-        # so don't use get_cells directly, but get_cell
-        cells = []
-        for yy in range(y, t + 1):
-            row_cells = []
-            for xx in range(x, z + 1):
-                row_cells.append(
-                    self.get_cell((xx, yy), clone=True, keep_repeated=False)
-                )
-            cells.append(row_cells)
-        for row in cells:
-            for cell in row:
-                if cell._is_spanned():
-                    good = False
-                    break
-            if not good:
-                break
-        if not good:
-            return False
-        # Check boundaries
-        # if z >= self.width or t >= self.height:
-        #    self.set_cell(coord = end)
-        #    print area, z, t
-        #    cells = self.get_cells((x, y, z, t))
-        #    print cells
-        # do it:
-        if merge:
-            val_list = []
-            for row in cells:
-                for cell in row:
-                    if cell.is_empty(aggressive=True):
-                        continue
-                    val = cell.get_value()
-                    if val is not None:
-                        if isinstance(val, str):
-                            val.strip()
-                        if val != "":
-                            val_list.append(val)
-                        cell.clear()
-            if val_list:
-                if len(val_list) == 1:
-                    cells[0][0].set_value(val_list[0])
-                else:
-                    value = " ".join([str(v) for v in val_list if v])
-                    cells[0][0].set_value(value)
-        cols = z - x + 1
-        cells[0][0].set_attribute("table:number-columns-spanned", str(cols))
-        rows = t - y + 1
-        cells[0][0].set_attribute("table:number-rows-spanned", str(rows))
-        for cell in cells[0][1:]:
-            cell.tag = "table:covered-table-cell"
-        for row in cells[1:]:
-            for cell in row:
-                cell.tag = "table:covered-table-cell"
-        # replace cells in table
-        self.set_cells(cells, coord=start, clone=False)
-        return True
-
-    def del_span(self, area: str | tuple | list) -> bool:
-        """Delete a Cell Span. 'area' is the cell coordiante of the upper left
-        cell of the spanned area.
-
-        Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
-        be provided as an alpha numeric value like "A1:B2' or a tuple like
-        (0, 0, 1, 1) or (0, 0). If an area is provided, the upper left cell
-        is used.
-
-        Arguments:
-
-            area -- str or tuple of int, cell or area coordinate
-        """
-        # get area
-        digits = convert_coordinates(area)
-        if len(digits) == 4:
-            x, y, _z, _t = digits
-        else:
-            x, y = digits
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        start = x, y
-        # check for previous span
-        cell0 = self.get_cell(start)
-        nb_cols = cell0.get_attribute_integer("table:number-columns-spanned")
-        if nb_cols is None:
-            return False
-        nb_rows = cell0.get_attribute_integer("table:number-rows-spanned")
-        if nb_rows is None:
-            return False
-        z = x + nb_cols - 1
-        t = y + nb_rows - 1
-        cells = self.get_cells((x, y, z, t))
-        cells[0][0].del_attribute("table:number-columns-spanned")
-        cells[0][0].del_attribute("table:number-rows-spanned")
-        for cell in cells[0][1:]:
-            cell.tag = "table:table-cell"
-        for row in cells[1:]:
-            for cell in row:
-                cell.tag = "table:table-cell"
-        # replace cells in table
-        self.set_cells(cells, coord=start, clone=False)
-        return True
-
-    # Utilities
-
-    def to_csv(
-        self,
-        path_or_file: str | Path | None = None,
-        dialect: str = "excel",
-    ) -> Any:
-        """Write the table as CSV in the file.
-
-        If the file is a string, it is opened as a local path. Else an
-        opened file-like is expected.
-
-        Arguments:
-
-            path_or_file -- str or file-like
-
-            dialect -- str, python csv.dialect, can be 'excel', 'unix'...
-        """
-
-        def write_content(csv_writer: object) -> None:
-            for values in self.iter_values():
-                line = []
-                for value in values:
-                    if value is None:
-                        value = ""
-                    if isinstance(value, str):
-                        value = value.strip()
-                    line.append(value)
-                csv_writer.writerow(line)  # type: ignore
-
-        out = StringIO(newline="")
-        csv_writer = csv.writer(out, dialect=dialect)
-        write_content(csv_writer)
-        if path_or_file is None:
-            return out.getvalue()
-        path = Path(path_or_file)
-        path.write_text(out.getvalue())
-        return None
-
-

Ancestors

- -

Instance variables

-
-
var displayed : bool
-
-
-
- -Expand source code - -
@property
-def displayed(self) -> bool:
-    return bool(self.get_attribute("table:display"))
-
-
-
var height : int
-
-

Get the current height of the table.

-

Return: int

-
- -Expand source code - -
@property
-def height(self) -> int:
-    """Get the current height of the table.
-
-    Return: int
-    """
-    try:
-        height = self._tmap[-1] + 1
-    except Exception:
-        height = 0
-    return height
-
-
-
var name : str | None
-
-

Get / set the name of the table.

-
- -Expand source code - -
@property
-def name(self) -> str | None:
-    """Get / set the name of the table."""
-    return self.get_attribute_string("table:name")
-
-
-
var print_rangesodfdo.list[str]
-
-
-
- -Expand source code - -
@property
-def print_ranges(self) -> list[str]:
-    ranges = self.get_attribute_string("table:print-ranges")
-    if isinstance(ranges, str):
-        return ranges.split()
-    return []
-
-
-
var printable : bool
-
-
-
- -Expand source code - -
@property
-def printable(self) -> bool:
-    printable = self.get_attribute("table:print")
-    # Default value
-    if printable is None:
-        return True
-    return bool(printable)
-
-
-
var protected : bool
-
-
-
- -Expand source code - -
@property
-def protected(self) -> bool:
-    return bool(self.get_attribute("table:protected"))
-
-
-
var protection_key : str | None
-
-
-
- -Expand source code - -
@property
-def protection_key(self) -> str | None:
-    return self.get_attribute_string("table:protection-key")
-
-
-
var size : tuple[int, int]
-
-

Shortcut to get the current width and height of the table.

-

Return: (int, int)

-
- -Expand source code - -
@property
-def size(self) -> tuple[int, int]:
-    """Shortcut to get the current width and height of the table.
-
-    Return: (int, int)
-    """
-    return self.width, self.height
-
-
-
var style : str | None
-
-

Get / set the style of the table

-

Return: str

-
- -Expand source code - -
@property
-def style(self) -> str | None:
-    """Get / set the style of the table
-
-    Return: str
-    """
-    return self.get_attribute_string("table:style-name")
-
-
-
var width : int
-
-

Get the current width of the table, measured on columns.

-

Rows may have different widths, use the Table API to ensure width -consistency.

-

Return: int

-
- -Expand source code - -
@property
-def width(self) -> int:
-    """Get the current width of the table, measured on columns.
-
-    Rows may have different widths, use the Table API to ensure width
-    consistency.
-
-    Return: int
-    """
-    # Columns are our reference for user expected width
-
-    try:
-        width = self._cmap[-1] + 1
-    except Exception:
-        width = 0
-
-    # columns = self._get_columns()
-    # repeated = self.xpath(
-    #        'table:table-column/@table:number-columns-repeated')
-    # unrepeated = len(columns) - len(repeated)
-    # ws = sum(int(r) for r in repeated) + unrepeated
-    # if w != ws:
-    #    print "WARNING   ws", ws, "w", w
-
-    return width
-
-
-
-

Methods

-
-
-def append(self, something: Element | str) ‑> None -
-
-

Dispatch .append() call to append_row() or append_column().

-
- -Expand source code - -
def append(self, something: Element | str) -> None:
-    """Dispatch .append() call to append_row() or append_column()."""
-    if isinstance(something, Row):
-        self.append_row(something)
-    elif isinstance(something, Column):
-        self.append_column(something)
-    else:
-        # probably still an error
-        self._append(something)
-
-
-
-def append_cell(self, y: int | str, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Append the given cell at the "y" coordinate. Repeated cells are -accepted. If no cell is given, an empty one is created.

-

Position start at 0. So cell A4 is on row 3.

-

Other rows remain untouched.

-

Arguments

-

y – int or str

-

cell – Cell

-

returns the cell with x and y updated

-
- -Expand source code - -
def append_cell(
-    self,
-    y: int | str,
-    cell: Cell | None = None,
-    clone: bool = True,
-) -> Cell:
-    """Append the given cell at the "y" coordinate. Repeated cells are
-    accepted. If no cell is given, an empty one is created.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Other rows remain untouched.
-
-    Arguments:
-
-        y -- int or str
-
-        cell -- Cell
-
-    returns the cell with x and y updated
-    """
-    if cell is None:
-        cell = Cell()
-        clone = False
-    if clone:
-        cell = cell.clone
-    y = self._translate_y_from_any(y)
-    row = self._get_row2(y)
-    row.y = y
-    cell_back = row.append_cell(cell, clone=False)
-    self.set_row(y, row)
-    # Update width if necessary
-    self._update_width(row)
-    return cell_back
-
-
-
-def append_column(self, column: Column | None = None) ‑> Column -
-
-

Append the column at the end of the table. If no column is given, -an empty one is created.

-

ODF columns don't contain cells, only style information.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

Arguments

-

column – Column

-
- -Expand source code - -
def append_column(
-    self,
-    column: Column | None = None,
-    _repeated: int | None = None,
-) -> Column:
-    """Append the column at the end of the table. If no column is given,
-    an empty one is created.
-
-    ODF columns don't contain cells, only style information.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    Arguments:
-
-        column -- Column
-    """
-    if column is None:
-        column = Column()
-    else:
-        column = column.clone
-    if not self._cmap:
-        position = 0
-    else:
-        odf_idx = len(self._cmap) - 1
-        last_column = self._get_element_idx2(_xpath_column_idx, odf_idx)
-        if last_column is None:
-            raise ValueError
-        position = self.index(last_column) + 1
-    column.x = self.width
-    self.insert(column, position=position)
-    # Repetitions are accepted
-    if _repeated is None:
-        _repeated = column.repeated or 1
-    self._cmap = insert_map_once(self._cmap, len(self._cmap), _repeated)
-    # No need to update row widths
-    return column
-
-
-
-def append_row(self, row: Row | None = None, clone: bool = True) ‑> Row -
-
-

Append the row at the end of the table. If no row is given, an -empty one is created.

-

Position start at 0. So cell A4 is on row 3.

-

Note the columns are automatically created when the first row is -inserted in an empty table. So better insert a filled row.

-

Arguments

-

row – Row

-

_repeated – (optional), repeated value of the row

-

returns the row, with updated row.y

-
- -Expand source code - -
def append_row(
-    self,
-    row: Row | None = None,
-    clone: bool = True,
-    _repeated: int | None = None,
-) -> Row:
-    """Append the row at the end of the table. If no row is given, an
-    empty one is created.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Note the columns are automatically created when the first row is
-    inserted in an empty table. So better insert a filled row.
-
-    Arguments:
-
-        row -- Row
-
-        _repeated -- (optional), repeated value of the row
-
-    returns the row, with updated row.y
-    """
-    if row is None:
-        row = Row()
-        _repeated = 1
-    elif clone:
-        row = row.clone
-    # Appending a repeated row accepted
-    # Do not insert next to the last row because it could be in a group
-    self._append(row)
-    if _repeated is None:
-        _repeated = row.repeated or 1
-    self._tmap = insert_map_once(self._tmap, len(self._tmap), _repeated)
-    row.y = self.height - 1
-    # Initialize columns
-    if not self._get_columns():
-        repeated = row.width
-        self.insert(Column(repeated=repeated), position=0)
-        self._compute_table_cache()
-    # Update width if necessary
-    self._update_width(row)
-    return row
-
-
-
-def del_span(self, area: str | tuple | odfdo.list) ‑> bool -
-
-

Delete a Cell Span. 'area' is the cell coordiante of the upper left -cell of the spanned area.

-

Area can be either one cell (like 'A1') or an area ('A1:B2'). It can -be provided as an alpha numeric value like "A1:B2' or a tuple like -(0, 0, 1, 1) or (0, 0). If an area is provided, the upper left cell -is used.

-

Arguments

-

area – str or tuple of int, cell or area coordinate

-
- -Expand source code - -
def del_span(self, area: str | tuple | list) -> bool:
-    """Delete a Cell Span. 'area' is the cell coordiante of the upper left
-    cell of the spanned area.
-
-    Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
-    be provided as an alpha numeric value like "A1:B2' or a tuple like
-    (0, 0, 1, 1) or (0, 0). If an area is provided, the upper left cell
-    is used.
-
-    Arguments:
-
-        area -- str or tuple of int, cell or area coordinate
-    """
-    # get area
-    digits = convert_coordinates(area)
-    if len(digits) == 4:
-        x, y, _z, _t = digits
-    else:
-        x, y = digits
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    start = x, y
-    # check for previous span
-    cell0 = self.get_cell(start)
-    nb_cols = cell0.get_attribute_integer("table:number-columns-spanned")
-    if nb_cols is None:
-        return False
-    nb_rows = cell0.get_attribute_integer("table:number-rows-spanned")
-    if nb_rows is None:
-        return False
-    z = x + nb_cols - 1
-    t = y + nb_rows - 1
-    cells = self.get_cells((x, y, z, t))
-    cells[0][0].del_attribute("table:number-columns-spanned")
-    cells[0][0].del_attribute("table:number-rows-spanned")
-    for cell in cells[0][1:]:
-        cell.tag = "table:table-cell"
-    for row in cells[1:]:
-        for cell in row:
-            cell.tag = "table:table-cell"
-    # replace cells in table
-    self.set_cells(cells, coord=start, clone=False)
-    return True
-
-
-
-def delete_cell(self, coord: tuple | odfdo.list | str) ‑> None -
-
-

Delete the cell at the given coordinates, so that next cells are -shifted to the left.

-

Coordinates are either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4".

-

Use set_value() for erasing value.

-

Arguments

-

coord – (int, int) or str

-
- -Expand source code - -
def delete_cell(self, coord: tuple | list | str) -> None:
-    """Delete the cell at the given coordinates, so that next cells are
-    shifted to the left.
-
-    Coordinates are either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4".
-
-    Use set_value() for erasing value.
-
-    Arguments:
-
-        coord -- (int, int) or str
-    """
-    x, y = self._translate_cell_coordinates(coord)
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    # Outside the defined table
-    if y >= self.height:
-        return
-    # Inside the defined table
-    row = self._get_row2_base(y)
-    if row is None:
-        raise ValueError
-    row.delete_cell(x)
-    # self.set_row(y, row)
-
-
-
-def delete_column(self, x: int | str) ‑> None -
-
-

Delete the column at the given position. ODF columns don't contain -cells, only style information.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

Arguments

-

x – int or str

-
- -Expand source code - -
def delete_column(self, x: int | str) -> None:
-    """Delete the column at the given position. ODF columns don't contain
-    cells, only style information.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    Arguments:
-
-        x -- int or str
-    """
-    x = self._translate_x_from_any(x)
-    # Outside the defined table
-    if x >= self.width:
-        return
-    # Inside the defined table
-    delete_item_in_vault(x, self, _xpath_column_idx, "_cmap")
-    # Update width
-    width = self.width
-    for row in self._get_rows():
-        if row.width >= width:
-            row.delete_cell(x)
-
-
-
-def delete_named_range(self, name: str) ‑> None -
-
-

Delete the Named Range of specified name from the spreadsheet. -Beware : named ranges are stored at the body level, thus do not call -this method on a cloned table.

-

Arguments

-

name – str

-
- -Expand source code - -
def delete_named_range(self, name: str) -> None:
-    """Delete the Named Range of specified name from the spreadsheet.
-    Beware : named ranges are stored at the body level, thus do not call
-    this method on a cloned table.
-
-    Arguments:
-
-        name -- str
-    """
-    name = name.strip()
-    if not name:
-        raise ValueError("Name required.")
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document.")
-    body.delete_named_range(name)
-
-
-
-def delete_row(self, y: int | str) ‑> None -
-
-

Delete the row at the given "y" position.

-

Position start at 0. So cell A4 is on row 3.

-

Arguments

-

y – int or str

-
- -Expand source code - -
def delete_row(self, y: int | str) -> None:
-    """Delete the row at the given "y" position.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Arguments:
-
-        y -- int or str
-    """
-    y = self._translate_y_from_any(y)
-    # Outside the defined table
-    if y >= self.height:
-        return
-    # Inside the defined table
-    delete_item_in_vault(y, self, _xpath_row_idx, "_tmap")
-
-
-
-def extend_rows(self, rows: odfdo.list[Row] | None = None) ‑> None -
-
-

Append a list of rows at the end of the table.

-

Arguments

-

rows – list of Row

-
- -Expand source code - -
def extend_rows(self, rows: list[Row] | None = None) -> None:
-    """Append a list of rows at the end of the table.
-
-    Arguments:
-
-        rows -- list of Row
-    """
-    if rows is None:
-        rows = []
-    self.extend(rows)
-    self._compute_table_cache()
-    # Update width if necessary
-    width = self.width
-    for row in self.traverse():
-        if row.width > width:
-            width = row.width
-    diff = width - self.width
-    if diff > 0:
-        self.append_column(Column(repeated=diff))
-
-
-
-def get_cell(self, coord: tuple | odfdo.list | str, clone: bool = True, keep_repeated: bool = True) ‑> Cell -
-
-

Get the cell at the given coordinates.

-

They are either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4".

-

A copy is returned, use set_cell to push it back.

-

Arguments

-

coord – (int, int) or str

-

Return: Cell

-
- -Expand source code - -
def get_cell(
-    self,
-    coord: tuple | list | str,
-    clone: bool = True,
-    keep_repeated: bool = True,
-) -> Cell:
-    """Get the cell at the given coordinates.
-
-    They are either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4".
-
-    A copy is returned, use ``set_cell`` to push it back.
-
-    Arguments:
-
-        coord -- (int, int) or str
-
-    Return: Cell
-    """
-    x, y = self._translate_cell_coordinates(coord)
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    # Outside the defined table
-    if y >= self.height:
-        cell = Cell()
-    else:
-        # Inside the defined table
-        row = self._get_row2_base(y)
-        if row is None:
-            raise ValueError
-        read_cell = row.get_cell(x, clone=clone)
-        if read_cell is None:
-            raise ValueError
-        cell = read_cell
-        if not keep_repeated:
-            repeated = cell.repeated or 1
-            if repeated >= 2:
-                cell.repeated = None
-    cell.x = x
-    cell.y = y
-    return cell
-
-
-
-def get_cells(self, coord: tuple | odfdo.list | str | None = None, cell_type: str | None = None, style: str | None = None, content: str | None = None, flat: bool = False) ‑> odfdo.list -
-
-

Get the cells matching the criteria. If 'coord' is None, -parse the whole table, else parse the area defined by 'coord'.

-

Filter by -cell_type = "all" -will retrieve cells of any -type, aka non empty cells.

-

If flat is True (default is False), the method return a single list -of all the values, else a list of lists of cells.

-

if cell_type, style and content are None, get_cells() will return -the exact number of cells of the area, including empty cells.

-

Arguments

-

coordinates – str or tuple of int : coordinates of area

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

content – str regex

-

style – str

-

flat – boolean

-

Return: list of tuples

-
- -Expand source code - -
def get_cells(
-    self,
-    coord: tuple | list | str | None = None,
-    cell_type: str | None = None,
-    style: str | None = None,
-    content: str | None = None,
-    flat: bool = False,
-) -> list:
-    """Get the cells matching the criteria. If 'coord' is None,
-    parse the whole table, else parse the area defined by 'coord'.
-
-    Filter by  cell_type = "all"  will retrieve cells of any
-    type, aka non empty cells.
-
-    If flat is True (default is False), the method return a single list
-    of all the values, else a list of lists of cells.
-
-    if cell_type, style and content are None, get_cells() will return
-    the exact number of cells of the area, including empty cells.
-
-    Arguments:
-
-        coordinates -- str or tuple of int : coordinates of area
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        content -- str regex
-
-        style -- str
-
-        flat -- boolean
-
-    Return: list of tuples
-    """
-    if coord:
-        x, y, z, t = self._translate_table_coordinates(coord)
-    else:
-        x = y = z = t = None
-    if flat:
-        cells: list[Cell] = []
-        for row in self.traverse(start=y, end=t):
-            row_cells = row.get_cells(
-                coord=(x, z),
-                cell_type=cell_type,
-                style=style,
-                content=content,
-            )
-            cells.extend(row_cells)
-        return cells
-    else:
-        lcells: list[list[Cell]] = []
-        for row in self.traverse(start=y, end=t):
-            row_cells = row.get_cells(
-                coord=(x, z),
-                cell_type=cell_type,
-                style=style,
-                content=content,
-            )
-            lcells.append(row_cells)
-        return lcells
-
-
-
-def get_column(self, x: int | str) ‑> Column -
-
-

Get the column at the given "x" position.

-

ODF columns don't contain cells, only style information.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

A copy is returned, use set_column() to push it back.

-

Arguments

-

x – int or str

-

Return: Column

-
- -Expand source code - -
def get_column(self, x: int | str) -> Column:
-    """Get the column at the given "x" position.
-
-    ODF columns don't contain cells, only style information.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    A copy is returned, use set_column() to push it back.
-
-    Arguments:
-
-        x -- int or str
-
-    Return: Column
-    """
-    x = self._translate_x_from_any(x)
-    column = self._get_column2(x)
-    if column is None:
-        raise ValueError
-    column.x = x
-    return column
-
-
-
-def get_column_cells(self, x: int | str, style: str | None = None, content: str | None = None, cell_type: str | None = None, complete: bool = False) ‑> odfdo.list[Cell | None] -
-
-

Get the list of cells at the given position.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

Filter by cell_type, with cell_type 'all' will retrieve cells of any -type, aka non empty cells.

-

If complete is True, replace missing values by None.

-

Arguments

-

x – int or str

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

content – str regex

-

style – str

-

complete – boolean

-

Return: list of Cell

-
- -Expand source code - -
def get_column_cells(  # noqa: C901
-    self,
-    x: int | str,
-    style: str | None = None,
-    content: str | None = None,
-    cell_type: str | None = None,
-    complete: bool = False,
-) -> list[Cell | None]:
-    """Get the list of cells at the given position.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    Filter by cell_type, with cell_type 'all' will retrieve cells of any
-    type, aka non empty cells.
-
-    If complete is True, replace missing values by None.
-
-    Arguments:
-
-        x -- int or str
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        content -- str regex
-
-        style -- str
-
-        complete -- boolean
-
-    Return: list of Cell
-    """
-    x = self._translate_x_from_any(x)
-    if cell_type:
-        cell_type = cell_type.lower().strip()
-    cells: list[Cell | None] = []
-    if not style and not content and not cell_type:
-        for row in self.traverse():
-            cells.append(row.get_cell(x, clone=True))
-        return cells
-    for row in self.traverse():
-        cell = row.get_cell(x, clone=True)
-        if cell is None:
-            raise ValueError
-        # Filter the cells by cell_type
-        if cell_type:
-            ctype = cell.type
-            if not ctype or not (ctype == cell_type or cell_type == "all"):
-                if complete:
-                    cells.append(None)
-                continue
-        # Filter the cells with the regex
-        if content and not cell.match(content):
-            if complete:
-                cells.append(None)
-            continue
-        # Filter the cells with the style
-        if style and style != cell.style:
-            if complete:
-                cells.append(None)
-            continue
-        cells.append(cell)
-    return cells
-
-
-
-def get_column_values(self, x: int | str, cell_type: str | None = None, complete: bool = True, get_type: bool = False) ‑> odfdo.list[typing.Any] -
-
-

Shortcut to get the list of Python values for the cells at the -given position.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

Filter by cell_type, with cell_type 'all' will retrieve cells of any -type, aka non empty cells. -If cell_type and complete is True, replace missing values by None.

-

If get_type is True, returns a tuple (value, ODF type of value)

-

Arguments

-

x – int or str

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

complete – boolean

-

get_type – boolean

-

Return: list of Python types

-
- -Expand source code - -
def get_column_values(
-    self,
-    x: int | str,
-    cell_type: str | None = None,
-    complete: bool = True,
-    get_type: bool = False,
-) -> list[Any]:
-    """Shortcut to get the list of Python values for the cells at the
-    given position.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    Filter by cell_type, with cell_type 'all' will retrieve cells of any
-    type, aka non empty cells.
-    If cell_type and complete is True, replace missing values by None.
-
-    If get_type is True, returns a tuple (value, ODF type of value)
-
-    Arguments:
-
-        x -- int or str
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        complete -- boolean
-
-        get_type -- boolean
-
-    Return: list of Python types
-    """
-    cells = self.get_column_cells(
-        x, style=None, content=None, cell_type=cell_type, complete=complete
-    )
-    values: list[Any] = []
-    for cell in cells:
-        if cell is None:
-            if complete:
-                if get_type:
-                    values.append((None, None))
-                else:
-                    values.append(None)
-            continue
-        if cell_type:
-            ctype = cell.type
-            if not ctype or not (ctype == cell_type or cell_type == "all"):
-                if complete:
-                    if get_type:
-                        values.append((None, None))
-                    else:
-                        values.append(None)
-                continue
-        values.append(cell.get_value(get_type=get_type))
-    return values
-
-
-
-def get_columns(self, coord: tuple | odfdo.list | str | None = None, style: str | None = None) ‑> odfdo.list[Column] -
-
-

Get the list of columns matching the criteria. Each result is a -tuple of (x, column).

-

Arguments

-

coord – str or tuple of int : coordinates of columns

-

style – str

-

Return: list of columns

-
- -Expand source code - -
def get_columns(
-    self,
-    coord: tuple | list | str | None = None,
-    style: str | None = None,
-) -> list[Column]:
-    """Get the list of columns matching the criteria. Each result is a
-    tuple of (x, column).
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates of columns
-
-        style -- str
-
-    Return: list of columns
-    """
-    if coord:
-        x, _y, _z, t = self._translate_column_coordinates(coord)
-    else:
-        x = t = None
-    if not style:
-        return list(self.traverse_columns(start=x, end=t))
-    columns = []
-    for column in self.traverse_columns(start=x, end=t):
-        if style != column.style:
-            continue
-        columns.append(column)
-    return columns
-
-
-
-def get_named_range(self, name: str) ‑> NamedRange -
-
-

Returns the Name Ranges of the specified name. If -table_name is provided, limits the search to these tables. -Beware : named ranges are stored at the body level, thus do not call -this method on a cloned table.

-

Arguments

-

name – str, name of the named range object

-

Return : NamedRange

-
- -Expand source code - -
def get_named_range(self, name: str) -> NamedRange:
-    """Returns the Name Ranges of the specified name. If
-    table_name is provided, limits the search to these tables.
-    Beware : named ranges are stored at the body level, thus do not call
-    this method on a cloned table.
-
-    Arguments:
-
-        name -- str, name of the named range object
-
-    Return : NamedRange
-    """
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document")
-    return body.get_named_range(name)  # type: ignore
-
-
-
-def get_named_ranges(self, table_name: str | odfdo.list[str] | None = None) ‑> odfdo.list[NamedRange] -
-
-

Returns the list of available Name Ranges of the spreadsheet. If -table_name is provided, limits the search to these tables. -Beware : named ranges are stored at the body level, thus do not call -this method on a cloned table.

-

Arguments

-

table_names – str or list of str, names of tables

-

Return : list of table_range

-
- -Expand source code - -
def get_named_ranges(  # type: ignore
-    self,
-    table_name: str | list[str] | None = None,
-) -> list[NamedRange]:
-    """Returns the list of available Name Ranges of the spreadsheet. If
-    table_name is provided, limits the search to these tables.
-    Beware : named ranges are stored at the body level, thus do not call
-    this method on a cloned table.
-
-    Arguments:
-
-        table_names -- str or list of str, names of tables
-
-    Return : list of table_range
-    """
-    body = self.document_body
-    if not body:
-        return []
-    all_named_ranges = body.get_named_ranges()
-    if not table_name:
-        return all_named_ranges  # type:ignore
-    filter_ = []
-    if isinstance(table_name, str):
-        filter_.append(table_name)
-    elif isiterable(table_name):
-        filter_.extend(table_name)
-    else:
-        raise ValueError(
-            f"table_name must be string or Iterable, not {type(table_name)}"
-        )
-    return [
-        nr for nr in all_named_ranges if nr.table_name in filter_  # type:ignore
-    ]
-
-
-
-def get_row(self, y: int | str, clone: bool = True, create: bool = True) ‑> Row -
-
-

Get the row at the given "y" position.

-

Position start at 0. So cell A4 is on row 3.

-

A copy is returned, use set_cell() to push it back.

-

Arguments

-

y – int or str

-

Return: Row

-
- -Expand source code - -
def get_row(self, y: int | str, clone: bool = True, create: bool = True) -> Row:
-    """Get the row at the given "y" position.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    A copy is returned, use set_cell() to push it back.
-
-    Arguments:
-
-        y -- int or str
-
-    Return: Row
-    """
-    # fixme : keep repeat ? maybe an option to functions : "raw=False"
-    y = self._translate_y_from_any(y)
-    row = self._get_row2(y, clone=clone, create=create)
-    if row is None:
-        raise ValueError("Row not found")
-    row.y = y
-    return row
-
-
-
-def get_row_values(self, y: int | str, cell_type: str | None = None, complete: bool = True, get_type: bool = False) ‑> odfdo.list -
-
-

Shortcut to get the list of Python values for the cells of the row -at the given "y" position.

-

Position start at 0. So cell A4 is on row 3.

-

Filter by cell_type, with cell_type 'all' will retrieve cells of any -type, aka non empty cells. -If cell_type and complete is True, replace missing values by None.

-

If get_type is True, returns a tuple (value, ODF type of value)

-

Arguments

-

y – int, str

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

complete – boolean

-

get_type – boolean

-

Return: list of lists of Python types

-
- -Expand source code - -
def get_row_values(
-    self,
-    y: int | str,
-    cell_type: str | None = None,
-    complete: bool = True,
-    get_type: bool = False,
-) -> list:
-    """Shortcut to get the list of Python values for the cells of the row
-    at the given "y" position.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Filter by cell_type, with cell_type 'all' will retrieve cells of any
-    type, aka non empty cells.
-    If cell_type and complete is True, replace missing values by None.
-
-    If get_type is True, returns a tuple (value, ODF type of value)
-
-    Arguments:
-
-        y -- int, str
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        complete -- boolean
-
-        get_type -- boolean
-
-    Return: list of lists of Python types
-    """
-    values = self.get_row(y, clone=False).get_values(
-        cell_type=cell_type, complete=complete, get_type=get_type
-    )
-    # complete row to match column width
-    if complete:
-        if get_type:
-            values.extend([(None, None)] * (self.width - len(values)))
-        else:
-            values.extend([None] * (self.width - len(values)))
-    return values
-
-
-
-def get_rows(self, coord: tuple | odfdo.list | str | None = None, style: str | None = None, content: str | None = None) ‑> odfdo.list[Row] -
-
-

Get the list of rows matching the criteria.

-

Filter by coordinates will parse the area defined by the coordinates.

-

Arguments

-

coord – str or tuple of int : coordinates of rows

-

content – str regex

-

style – str

-

Return: list of rows

-
- -Expand source code - -
def get_rows(
-    self,
-    coord: tuple | list | str | None = None,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Row]:
-    """Get the list of rows matching the criteria.
-
-    Filter by coordinates will parse the area defined by the coordinates.
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates of rows
-
-        content -- str regex
-
-        style -- str
-
-    Return: list of rows
-    """
-    if coord:
-        _x, y, _z, t = self._translate_table_coordinates(coord)
-    else:
-        y = t = None
-    # fixme : not clones ?
-    if not content and not style:
-        return list(self.traverse(start=y, end=t))
-    rows = []
-    for row in self.traverse(start=y, end=t):
-        if content and not row.match(content):
-            continue
-        if style and style != row.style:
-            continue
-        rows.append(row)
-    return rows
-
-
-
-def get_value(self, coord: tuple | odfdo.list | str, get_type: bool = False) ‑> Any -
-
-

Shortcut to get the Python value of the cell at the given -coordinates.

-

If get_type is True, returns the tuples (value, ODF type)

-

coord is either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4". If an Area is given, the upper -left position is used as coord.

-

Arguments

-

coord – (int, int) or str : coordinate

-

Return: Python type

-
- -Expand source code - -
def get_value(
-    self,
-    coord: tuple | list | str,
-    get_type: bool = False,
-) -> Any:
-    """Shortcut to get the Python value of the cell at the given
-    coordinates.
-
-    If get_type is True, returns the tuples (value, ODF type)
-
-    coord is either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4". If an Area is given, the upper
-    left position is used as coord.
-
-    Arguments:
-
-        coord -- (int, int) or str : coordinate
-
-    Return: Python type
-    """
-    x, y = self._translate_cell_coordinates(coord)
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    # Outside the defined table
-    if y >= self.height:
-        if get_type:
-            return (None, None)
-        return None
-    else:
-        # Inside the defined table
-        row = self._get_row2_base(y)
-        if row is None:
-            raise ValueError
-        cell = row._get_cell2_base(x)
-        if cell is None:
-            if get_type:
-                return (None, None)
-            return None
-        return cell.get_value(get_type=get_type)
-
-
-
-def get_values(self, coord: tuple | odfdo.list | str | None = None, cell_type: str | None = None, complete: bool = True, get_type: bool = False, flat: bool = False) ‑> odfdo.list -
-
-

Get a matrix of values of the table.

-

Filter by coordinates will parse the area defined by the coordinates.

-

If 'cell_type' is used and 'complete' is True (default), missing values -are replaced by None. -Filter by ' cell_type = "all" ' will retrieve cells of any -type, aka non empty cells.

-

If 'cell_type' is None, complete is always True : with no cell type -queried, get_values() returns None for each empty cell, the length -each lists is equal to the width of the table.

-

If get_type is True, returns tuples (value, ODF type of value), or -(None, None) for empty cells with complete True.

-

If flat is True, the methods return a single list of all the values. -By default, flat is False.

-

Arguments

-

coord – str or tuple of int : coordinates of area

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

complete – boolean

-

get_type – boolean

-

Return: list of lists of Python types

-
- -Expand source code - -
def get_values(
-    self,
-    coord: tuple | list | str | None = None,
-    cell_type: str | None = None,
-    complete: bool = True,
-    get_type: bool = False,
-    flat: bool = False,
-) -> list:
-    """Get a matrix of values of the table.
-
-    Filter by coordinates will parse the area defined by the coordinates.
-
-    If 'cell_type' is used and 'complete' is True (default), missing values
-    are replaced by None.
-    Filter by ' cell_type = "all" ' will retrieve cells of any
-    type, aka non empty cells.
-
-    If 'cell_type' is None, complete is always True : with no cell type
-    queried, get_values() returns None for each empty cell, the length
-    each lists is equal to the width of the table.
-
-    If get_type is True, returns tuples (value, ODF type of value), or
-    (None, None) for empty cells with complete True.
-
-    If flat is True, the methods return a single list of all the values.
-    By default, flat is False.
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates of area
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        complete -- boolean
-
-        get_type -- boolean
-
-    Return: list of lists of Python types
-    """
-    if coord:
-        x, y, z, t = self._translate_table_coordinates(coord)
-    else:
-        x = y = z = t = None
-    data = []
-    for row in self.traverse(start=y, end=t):
-        if z is None:
-            width = self.width
-        else:
-            width = min(z + 1, self.width)
-        if x is not None:
-            width -= x
-        values = row.get_values(
-            (x, z),
-            cell_type=cell_type,
-            complete=complete,
-            get_type=get_type,
-        )
-        # complete row to match request width
-        if complete:
-            if get_type:
-                values.extend([(None, None)] * (width - len(values)))
-            else:
-                values.extend([None] * (width - len(values)))
-        if flat:
-            data.extend(values)
-        else:
-            data.append(values)
-    return data
-
-
-
-def insert_cell(self, coord: tuple | odfdo.list | str, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Insert the given cell at the given coordinates. If no cell is -given, an empty one is created.

-

Coordinates are either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4".

-

Cells on the right are shifted. Other rows remain untouched.

-

Arguments

-

coord – (int, int) or str

-

cell – Cell

-

returns the cell with x and y updated

-
- -Expand source code - -
def insert_cell(
-    self,
-    coord: tuple | list | str,
-    cell: Cell | None = None,
-    clone: bool = True,
-) -> Cell:
-    """Insert the given cell at the given coordinates. If no cell is
-    given, an empty one is created.
-
-    Coordinates are either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4".
-
-    Cells on the right are shifted. Other rows remain untouched.
-
-    Arguments:
-
-        coord -- (int, int) or str
-
-        cell -- Cell
-
-    returns the cell with x and y updated
-    """
-    if cell is None:
-        cell = Cell()
-        clone = False
-    if clone:
-        cell = cell.clone
-    x, y = self._translate_cell_coordinates(coord)
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    row = self._get_row2(y, clone=True)
-    row.y = y
-    row.repeated = None
-    cell_back = row.insert_cell(x, cell, clone=False)
-    self.set_row(y, row, clone=False)
-    # Update width if necessary
-    self._update_width(row)
-    return cell_back
-
-
-
-def insert_column(self, x: int | str, column: Column | None = None) ‑> Column -
-
-

Insert the column before the given "x" position. If no column is -given, an empty one is created.

-

ODF columns don't contain cells, only style information.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

Arguments

-

x – int or str

-

column – Column

-
- -Expand source code - -
def insert_column(
-    self,
-    x: int | str,
-    column: Column | None = None,
-) -> Column:
-    """Insert the column before the given "x" position. If no column is
-    given, an empty one is created.
-
-    ODF columns don't contain cells, only style information.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    Arguments:
-
-        x -- int or str
-
-        column -- Column
-    """
-    if column is None:
-        column = Column()
-    x = self._translate_x_from_any(x)
-    diff = x - self.width
-    if diff < 0:
-        column_back = insert_item_in_vault(
-            x, column, self, _xpath_column_idx, "_cmap"
-        )
-    elif diff == 0:
-        column_back = self.append_column(column.clone)
-    else:
-        self.append_column(Column(repeated=diff), _repeated=diff)
-        column_back = self.append_column(column.clone)
-    column_back.x = x  # type: ignore
-    # Repetitions are accepted
-    repeated = column.repeated or 1
-    # Update width on every row
-    for row in self._get_rows():
-        if row.width > x:
-            row.insert_cell(x, Cell(repeated=repeated))
-        # Shorter rows don't need insert
-        # Longer rows shouldn't exist!
-    return column_back  # type: ignore
-
-
-
-def insert_row(self, y: str | int, row: Row | None = None, clone: bool = True) ‑> Row -
-
-

Insert the row before the given "y" position. If no row is given, -an empty one is created.

-

Position start at 0. So cell A4 is on row 3.

-

If row is None, a new empty row is created.

-

Arguments

-

y – int or str

-

row – Row

-

returns the row, with updated row.y

-
- -Expand source code - -
def insert_row(
-    self, y: str | int, row: Row | None = None, clone: bool = True
-) -> Row:
-    """Insert the row before the given "y" position. If no row is given,
-    an empty one is created.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    If row is None, a new empty row is created.
-
-    Arguments:
-
-        y -- int or str
-
-        row -- Row
-
-    returns the row, with updated row.y
-    """
-    if row is None:
-        row = Row()
-        clone = False
-    y = self._translate_y_from_any(y)
-    diff = y - self.height
-    if diff < 0:
-        row_back = insert_item_in_vault(y, row, self, _xpath_row_idx, "_tmap")
-    elif diff == 0:
-        row_back = self.append_row(row, clone=clone)
-    else:
-        self.append_row(Row(repeated=diff), _repeated=diff, clone=False)
-        row_back = self.append_row(row, clone=clone)
-    row_back.y = y  # type: ignore
-    # Update width if necessary
-    self._update_width(row_back)  # type: ignore
-    return row_back  # type: ignore
-
-
-
-def is_column_empty(self, x: int | str, aggressive: bool = False) ‑> bool -
-
-

Return wether every cell in the column at "x" position has no value -or the value evaluates to False (empty string), and no style.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

If aggressive is True, empty cells with style are considered empty.

-

Return: bool

-
- -Expand source code - -
def is_column_empty(self, x: int | str, aggressive: bool = False) -> bool:
-    """Return wether every cell in the column at "x" position has no value
-    or the value evaluates to False (empty string), and no style.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    If aggressive is True, empty cells with style are considered empty.
-
-    Return: bool
-    """
-    for cell in self.get_column_cells(x):
-        if cell is None:
-            continue
-        if not cell.is_empty(aggressive=aggressive):
-            return False
-    return True
-
-
-
-def is_empty(self, aggressive: bool = False) ‑> bool -
-
-

Return whether every cell in the table has no value or the value -evaluates to False (empty string), and no style.

-

If aggressive is True, empty cells with style are considered empty.

-

Arguments

-

aggressive – bool

-
- -Expand source code - -
def is_empty(self, aggressive: bool = False) -> bool:
-    """Return whether every cell in the table has no value or the value
-    evaluates to False (empty string), and no style.
-
-    If aggressive is True, empty cells with style are considered empty.
-
-    Arguments:
-
-        aggressive -- bool
-    """
-    return all(row.is_empty(aggressive=aggressive) for row in self._get_rows())
-
-
-
-def is_row_empty(self, y: int | str, aggressive: bool = False) ‑> bool -
-
-

Return wether every cell in the row at the given "y" position has -no value or the value evaluates to False (empty string), and no style.

-

Position start at 0. So cell A4 is on row 3.

-

If aggressive is True, empty cells with style are considered empty.

-

Arguments

-

y – int or str

-

aggressive – bool

-
- -Expand source code - -
def is_row_empty(self, y: int | str, aggressive: bool = False) -> bool:
-    """Return wether every cell in the row at the given "y" position has
-    no value or the value evaluates to False (empty string), and no style.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    If aggressive is True, empty cells with style are considered empty.
-
-    Arguments:
-
-        y -- int or str
-
-        aggressive -- bool
-    """
-    return self.get_row(y, clone=False).is_empty(aggressive=aggressive)
-
-
-
-def iter_values(self, coord: tuple | odfdo.list | str | None = None, cell_type: str | None = None, complete: bool = True, get_type: bool = False) ‑> collections.abc.Iterator[odfdo.list] -
-
-

Iterate through lines of Python values of the table.

-

Filter by coordinates will parse the area defined by the coordinates.

-

cell_type, complete, grt_type : see get_values()

-

Arguments

-

coord – str or tuple of int : coordinates of area

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

complete – boolean

-

get_type – boolean

-

Return: iterator of lists

-
- -Expand source code - -
def iter_values(
-    self,
-    coord: tuple | list | str | None = None,
-    cell_type: str | None = None,
-    complete: bool = True,
-    get_type: bool = False,
-) -> Iterator[list]:
-    """Iterate through lines of Python values of the table.
-
-    Filter by coordinates will parse the area defined by the coordinates.
-
-    cell_type, complete, grt_type : see get_values()
-
-
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates of area
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        complete -- boolean
-
-        get_type -- boolean
-
-    Return: iterator of lists
-    """
-    if coord:
-        x, y, z, t = self._translate_table_coordinates(coord)
-    else:
-        x = y = z = t = None
-    for row in self.traverse(start=y, end=t):
-        if z is None:
-            width = self.width
-        else:
-            width = min(z + 1, self.width)
-        if x is not None:
-            width -= x
-        values = row.get_values(
-            (x, z),
-            cell_type=cell_type,
-            complete=complete,
-            get_type=get_type,
-        )
-        # complete row to match column width
-        if complete:
-            if get_type:
-                values.extend([(None, None)] * (width - len(values)))
-            else:
-                values.extend([None] * (width - len(values)))
-        yield values
-
-
-
-def rstrip(self, aggressive: bool = False) ‑> None -
-
-

Remove in-place empty rows below and empty cells at the right of -the table. Cells are empty if they contain no value or it evaluates -to False, and no style.

-

If aggressive is True, empty cells with style are removed too.

-

Argument

-

aggressive – bool

-
- -Expand source code - -
def rstrip(self, aggressive: bool = False) -> None:
-    """Remove *in-place* empty rows below and empty cells at the right of
-    the table. Cells are empty if they contain no value or it evaluates
-    to False, and no style.
-
-    If aggressive is True, empty cells with style are removed too.
-
-    Argument:
-
-        aggressive -- bool
-    """
-    # Step 1: remove empty rows below the table
-    for row in reversed(self._get_rows()):
-        if row.is_empty(aggressive=aggressive):
-            row.parent.delete(row)  # type: ignore
-        else:
-            break
-    # Step 2: rstrip remaining rows
-    max_width = 0
-    for row in self._get_rows():
-        row.rstrip(aggressive=aggressive)
-        # keep count of the biggest row
-        max_width = max(max_width, row.width)
-    # raz cache of rows
-    self._indexes["_tmap"] = {}
-    # Step 3: trim columns to match max_width
-    columns = self._get_columns()
-    repeated_cols = self.xpath("table:table-column/@table:number-columns-repeated")
-    if not isinstance(repeated_cols, list):
-        raise TypeError
-    unrepeated = len(columns) - len(repeated_cols)
-    column_width = sum(int(r) for r in repeated_cols) + unrepeated  # type: ignore
-    diff = column_width - max_width
-    if diff > 0:
-        for column in reversed(columns):
-            repeated = column.repeated or 1
-            repeated = repeated - diff
-            if repeated > 0:
-                column.repeated = repeated
-                break
-            else:
-                column.parent.delete(column)
-                diff = -repeated
-                if diff == 0:
-                    break
-    # raz cache of columns
-    self._indexes["_cmap"] = {}
-    self._compute_table_cache()
-
-
-
-def set_cell(self, coord: tuple | odfdo.list | str, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Replace a cell of the table at the given coordinates.

-

They are either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4".

-

Arguments

-

coord – (int, int) or str : coordinate

-

cell – Cell

-

return the cell, with x and y updated

-
- -Expand source code - -
def set_cell(
-    self,
-    coord: tuple | list | str,
-    cell: Cell | None = None,
-    clone: bool = True,
-) -> Cell:
-    """Replace a cell of the table at the given coordinates.
-
-    They are either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4".
-
-    Arguments:
-
-        coord -- (int, int) or str : coordinate
-
-        cell -- Cell
-
-    return the cell, with x and y updated
-    """
-    if cell is None:
-        cell = Cell()
-        clone = False
-    x, y = self._translate_cell_coordinates(coord)
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    cell.x = x
-    cell.y = y
-    if y >= self.height:
-        row = Row()
-        cell_back = row.set_cell(x, cell, clone=clone)
-        self.set_row(y, row, clone=False)
-    else:
-        row_read = self._get_row2_base(y)
-        if row_read is None:
-            raise ValueError
-        row = row_read
-        row.y = y
-        repeated = row.repeated or 1
-        if repeated > 1:
-            row = row.clone
-            row.repeated = None
-            cell_back = row.set_cell(x, cell, clone=clone)
-            self.set_row(y, row, clone=False)
-        else:
-            cell_back = row.set_cell(x, cell, clone=clone)
-            # Update width if necessary, since we don't use set_row
-            self._update_width(row)
-    return cell_back
-
-
-
-def set_cell_image(self, coord: tuple | odfdo.list | str, image_frame: Frame, doc_type: str | None = None) ‑> None -
-
-

Do all the magic to display an image in the cell at the given -coordinates.

-

They are either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4".

-

The frame element must contain the expected image position and -dimensions.

-

DrawImage insertion depends on the document type, so the type must be -provided or the table element must be already attached to a document.

-

Arguments

-

coord – (int, int) or str

-

image_frame – Frame including an image

-

doc_type – 'spreadsheet' or 'text'

-
- -Expand source code - -
def set_cell_image(
-    self,
-    coord: tuple | list | str,
-    image_frame: Frame,
-    doc_type: str | None = None,
-) -> None:
-    """Do all the magic to display an image in the cell at the given
-    coordinates.
-
-    They are either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4".
-
-    The frame element must contain the expected image position and
-    dimensions.
-
-    DrawImage insertion depends on the document type, so the type must be
-    provided or the table element must be already attached to a document.
-
-    Arguments:
-
-        coord -- (int, int) or str
-
-        image_frame -- Frame including an image
-
-        doc_type -- 'spreadsheet' or 'text'
-    """
-    # Test document type
-    if doc_type is None:
-        body = self.document_body
-        if body is None:
-            raise ValueError("document type not found")
-        doc_type = {"office:spreadsheet": "spreadsheet", "office:text": "text"}.get(
-            body.tag
-        )
-        if doc_type is None:
-            raise ValueError("document type not supported for images")
-    # We need the end address of the image
-    x, y = self._translate_cell_coordinates(coord)
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    cell = self.get_cell((x, y))
-    image_frame = image_frame.clone  # type: ignore
-    # Remove any previous paragraph, frame, etc.
-    for child in cell.children:
-        cell.delete(child)
-    # Now it all depends on the document type
-    if doc_type == "spreadsheet":
-        image_frame.anchor_type = "char"
-        # The frame needs end coordinates
-        width, height = image_frame.size
-        image_frame.set_attribute("table:end-x", width)
-        image_frame.set_attribute("table:end-y", height)
-        # FIXME what happens when the address changes?
-        address = f"{self.name}.{digit_to_alpha(x)}{y + 1}"
-        image_frame.set_attribute("table:end-cell-address", address)
-        # The frame is directly in the cell
-        cell.append(image_frame)
-    elif doc_type == "text":
-        # The frame must be in a paragraph
-        cell.set_value("")
-        paragraph = cell.get_element("text:p")
-        if paragraph is None:
-            raise ValueError
-        paragraph.append(image_frame)
-    self.set_cell(coord, cell)
-
-
-
-def set_cells(self, cells: odfdo.list[odfdo.list[Cell]] | odfdo.list[tuple[Cell]], coord: tuple | odfdo.list | str | None = None, clone: bool = True) ‑> None -
-
-

Set the cells in the table, from the 'coord' position.

-

'coord' is the coordinate of the upper left cell to be modified by -values. If 'coord' is None, default to the position (0,0) ("A1"). -If 'coord' is an area (e.g. "A2:B5"), the upper left position of this -area is used as coordinate.

-

The table is not cleared before the operation, to reset the table -before setting cells, use table.clear().

-

A list of lists is expected, with as many lists as rows to be set, and -as many cell in each sublist as cells to be setted in the row.

-

Arguments

-

cells – list of list of cells

-

coord – tuple or str

-

values – list of lists of python types

-
- -Expand source code - -
def set_cells(
-    self,
-    cells: list[list[Cell]] | list[tuple[Cell]],
-    coord: tuple | list | str | None = None,
-    clone: bool = True,
-) -> None:
-    """Set the cells in the table, from the 'coord' position.
-
-    'coord' is the coordinate of the upper left cell to be modified by
-    values. If 'coord' is None, default to the position (0,0) ("A1").
-    If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
-    area is used as coordinate.
-
-    The table is *not* cleared before the operation, to reset the table
-    before setting cells, use table.clear().
-
-    A list of lists is expected, with as many lists as rows to be set, and
-    as many cell in each sublist as cells to be setted in the row.
-
-    Arguments:
-
-        cells -- list of list of cells
-
-        coord -- tuple or str
-
-        values -- list of lists of python types
-    """
-    if coord:
-        x, y = self._translate_cell_coordinates(coord)
-    else:
-        x = y = 0
-    if y is None:
-        y = 0
-    if x is None:
-        x = 0
-    y -= 1
-    for row_cells in cells:
-        y += 1
-        if not row_cells:
-            continue
-        row = self.get_row(y, clone=True)
-        repeated = row.repeated or 1
-        if repeated >= 2:
-            row.repeated = None
-        row.set_cells(row_cells, start=x, clone=clone)
-        self.set_row(y, row, clone=False)
-        self._update_width(row)
-
-
-
-def set_column(self, x: int | str, column: Column | None = None) ‑> Column -
-
-

Replace the column at the given "x" position.

-

ODF columns don't contain cells, only style information.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

Arguments

-

x – int or str

-

column – Column

-
- -Expand source code - -
def set_column(
-    self,
-    x: int | str,
-    column: Column | None = None,
-) -> Column:
-    """Replace the column at the given "x" position.
-
-    ODF columns don't contain cells, only style information.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    Arguments:
-
-        x -- int or str
-
-        column -- Column
-    """
-    x = self._translate_x_from_any(x)
-    if column is None:
-        column = Column()
-        repeated = 1
-    else:
-        repeated = column.repeated or 1
-    column.x = x
-    # Outside the defined table ?
-    diff = x - self.width
-    if diff == 0:
-        column_back = self.append_column(column, _repeated=repeated)
-    elif diff > 0:
-        self.append_column(Column(repeated=diff), _repeated=diff)
-        column_back = self.append_column(column, _repeated=repeated)
-    else:
-        # Inside the defined table
-        column_back = set_item_in_vault(  # type: ignore
-            x, column, self, _xpath_column_idx, "_cmap"
-        )
-    return column_back
-
-
-
-def set_column_cells(self, x: int | str, cells: odfdo.list[Cell]) ‑> None -
-
-

Shortcut to set the list of cells at the given position.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

The list must have the same length than the table height.

-

Arguments

-

x – int or str

-

cells – list of Cell

-
- -Expand source code - -
def set_column_cells(self, x: int | str, cells: list[Cell]) -> None:
-    """Shortcut to set the list of cells at the given position.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    The list must have the same length than the table height.
-
-    Arguments:
-
-        x -- int or str
-
-        cells -- list of Cell
-    """
-    height = self.height
-    if len(cells) != height:
-        raise ValueError(f"col mismatch: {height} cells expected")
-    cells_iterator = iter(cells)
-    for y, row in enumerate(self.traverse()):
-        row.set_cell(x, next(cells_iterator))
-        self.set_row(y, row)
-
-
-
-def set_column_values(self, x: int | str, values: odfdo.list, cell_type: str | None = None, currency: str | None = None, style: str | None = None) ‑> None -
-
-

Shortcut to set the list of Python values of cells at the given -position.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

The list must have the same length than the table height.

-

Arguments

-

x – int or str

-

values – list of Python types

-

cell_type – 'boolean', 'currency', 'date', 'float', 'percentage', -'string' or 'time'

-

currency – three-letter str

-

style – str

-
- -Expand source code - -
def set_column_values(
-    self,
-    x: int | str,
-    values: list,
-    cell_type: str | None = None,
-    currency: str | None = None,
-    style: str | None = None,
-) -> None:
-    """Shortcut to set the list of Python values of cells at the given
-    position.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    The list must have the same length than the table height.
-
-    Arguments:
-
-        x -- int or str
-
-        values -- list of Python types
-
-        cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                     'string' or 'time'
-
-        currency -- three-letter str
-
-        style -- str
-    """
-    cells = [
-        Cell(value, cell_type=cell_type, currency=currency, style=style)
-        for value in values
-    ]
-    self.set_column_cells(x, cells)
-
-
-
-def set_named_range(self, name: str, crange: str | tuple | odfdo.list, table_name: str | None = None, usage: str | None = None) ‑> None -
-
-

Create a Named Range element and insert it in the document. -Beware : named ranges are stored at the body level, thus do not call -this method on a cloned table.

-

Arguments

-

name – str, name of the named range

-

crange – str or tuple of int, cell or area coordinate

-

table_name – str, name of the table

-

uage – None or 'print-range', 'filter', 'repeat-column', 'repeat-row'

-
- -Expand source code - -
def set_named_range(
-    self,
-    name: str,
-    crange: str | tuple | list,
-    table_name: str | None = None,
-    usage: str | None = None,
-) -> None:
-    """Create a Named Range element and insert it in the document.
-    Beware : named ranges are stored at the body level, thus do not call
-    this method on a cloned table.
-
-    Arguments:
-
-        name -- str, name of the named range
-
-        crange -- str or tuple of int, cell or area coordinate
-
-        table_name -- str, name of the table
-
-        uage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
-    """
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document")
-    if not name:
-        raise ValueError("Name required.")
-    if table_name is None:
-        table_name = self.name
-    named_range = NamedRange(name, crange, table_name, usage)
-    body.append_named_range(named_range)
-
-
-
-def set_row(self, y: int | str, row: Row | None = None, clone: bool = True) ‑> Row -
-
-

Replace the row at the given position with the new one. Repetions of -the old row will be adjusted.

-

If row is None, a new empty row is created.

-

Position start at 0. So cell A4 is on row 3.

-

Arguments

-

y – int or str

-

row – Row

-

returns the row, with updated row.y

-
- -Expand source code - -
def set_row(self, y: int | str, row: Row | None = None, clone: bool = True) -> Row:
-    """Replace the row at the given position with the new one. Repetions of
-    the old row will be adjusted.
-
-    If row is None, a new empty row is created.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Arguments:
-
-        y -- int or str
-
-        row -- Row
-
-    returns the row, with updated row.y
-    """
-    if row is None:
-        row = Row()
-        repeated = 1
-        clone = False
-    else:
-        repeated = row.repeated or 1
-    y = self._translate_y_from_any(y)
-    row.y = y
-    # Outside the defined table ?
-    diff = y - self.height
-    if diff == 0:
-        row_back = self.append_row(row, _repeated=repeated, clone=clone)
-    elif diff > 0:
-        self.append_row(Row(repeated=diff), _repeated=diff, clone=clone)
-        row_back = self.append_row(row, _repeated=repeated, clone=clone)
-    else:
-        # Inside the defined table
-        row_back = set_item_in_vault(  # type: ignore
-            y, row, self, _xpath_row_idx, "_tmap", clone=clone
-        )
-    # print self.serialize(True)
-    # Update width if necessary
-    self._update_width(row_back)
-    return row_back
-
-
-
-def set_row_cells(self, y: int | str, cells: odfdo.list | None = None) ‑> Row -
-
-

Shortcut to set all the cells of the row at the given -"y" position.

-

Position start at 0. So cell A4 is on row 3.

-

Arguments

-

y – int or str

-

cells – list of Python types

-

style – str

-

returns the row, with updated row.y

-
- -Expand source code - -
def set_row_cells(self, y: int | str, cells: list | None = None) -> Row:
-    """Shortcut to set *all* the cells of the row at the given
-    "y" position.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Arguments:
-
-        y -- int or str
-
-        cells -- list of Python types
-
-        style -- str
-
-    returns the row, with updated row.y
-    """
-    if cells is None:
-        cells = []
-    row = Row()  # needed if clones rows
-    row.extend_cells(cells)
-    return self.set_row(y, row)  # needed if clones rows
-
-
-
-def set_row_values(self, y: int | str, values: odfdo.list, cell_type: str | None = None, currency: str | None = None, style: str | None = None) ‑> Row -
-
-

Shortcut to set the values of all cells of the row at the given -"y" position.

-

Position start at 0. So cell A4 is on row 3.

-

Arguments

-

y – int or str

-

values – list of Python types

-

cell_type – 'boolean', 'currency', 'date', 'float', 'percentage', -'string' or 'time'

-

currency – three-letter str

-

style – str

-

returns the row, with updated row.y

-
- -Expand source code - -
def set_row_values(
-    self,
-    y: int | str,
-    values: list,
-    cell_type: str | None = None,
-    currency: str | None = None,
-    style: str | None = None,
-) -> Row:
-    """Shortcut to set the values of *all* cells of the row at the given
-    "y" position.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Arguments:
-
-        y -- int or str
-
-        values -- list of Python types
-
-        cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                     'string' or 'time'
-
-        currency -- three-letter str
-
-        style -- str
-
-    returns the row, with updated row.y
-    """
-    row = Row()  # needed if clones rows
-    row.set_values(values, style=style, cell_type=cell_type, currency=currency)
-    return self.set_row(y, row)  # needed if clones rows
-
-
-
-def set_span(self, area: str | tuple | odfdo.list, merge: bool = False) ‑> bool -
-
-

Create a Cell Span : span the first cell of the area on several -columns and/or rows. -If merge is True, replace text of the cell by the concatenation of -existing text in covered cells. -Beware : if merge is True, old text is changed, if merge is False -(the default), old text in coverd cells is still present but not -displayed by most GUI.

-

If the area defines only one cell, the set span will do nothing. -It is not allowed to apply set span to an area whose one cell already -belongs to previous cell span.

-

Area can be either one cell (like 'A1') or an area ('A1:B2'). It can -be provided as an alpha numeric value like "A1:B2' or a tuple like -(0, 0, 1, 1) or (0, 0).

-

Arguments

-

area – str or tuple of int, cell or area coordinate

-

merge – boolean

-
- -Expand source code - -
def set_span(  # noqa: C901
-    self,
-    area: str | tuple | list,
-    merge: bool = False,
-) -> bool:
-    """Create a Cell Span : span the first cell of the area on several
-    columns and/or rows.
-    If merge is True, replace text of the cell by the concatenation of
-    existing text in covered cells.
-    Beware : if merge is True, old text is changed, if merge is False
-    (the default), old text in coverd cells is still present but not
-    displayed by most GUI.
-
-    If the area defines only one cell, the set span will do nothing.
-    It is not allowed to apply set span to an area whose one cell already
-    belongs to previous cell span.
-
-    Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
-    be provided as an alpha numeric value like "A1:B2' or a tuple like
-    (0, 0, 1, 1) or (0, 0).
-
-    Arguments:
-
-        area -- str or tuple of int, cell or area coordinate
-
-        merge -- boolean
-    """
-    # get area
-    digits = convert_coordinates(area)
-    if len(digits) == 4:
-        x, y, z, t = digits
-    else:
-        x, y = digits
-        z, t = digits
-    start = x, y
-    end = z, t
-    if start == end:
-        # one cell : do nothing
-        return False
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    if z is None:
-        raise ValueError
-    if t is None:
-        raise ValueError
-    # check for previous span
-    good = True
-    # Check boundaries and empty cells : need to crate non existent cells
-    # so don't use get_cells directly, but get_cell
-    cells = []
-    for yy in range(y, t + 1):
-        row_cells = []
-        for xx in range(x, z + 1):
-            row_cells.append(
-                self.get_cell((xx, yy), clone=True, keep_repeated=False)
-            )
-        cells.append(row_cells)
-    for row in cells:
-        for cell in row:
-            if cell._is_spanned():
-                good = False
-                break
-        if not good:
-            break
-    if not good:
-        return False
-    # Check boundaries
-    # if z >= self.width or t >= self.height:
-    #    self.set_cell(coord = end)
-    #    print area, z, t
-    #    cells = self.get_cells((x, y, z, t))
-    #    print cells
-    # do it:
-    if merge:
-        val_list = []
-        for row in cells:
-            for cell in row:
-                if cell.is_empty(aggressive=True):
-                    continue
-                val = cell.get_value()
-                if val is not None:
-                    if isinstance(val, str):
-                        val.strip()
-                    if val != "":
-                        val_list.append(val)
-                    cell.clear()
-        if val_list:
-            if len(val_list) == 1:
-                cells[0][0].set_value(val_list[0])
-            else:
-                value = " ".join([str(v) for v in val_list if v])
-                cells[0][0].set_value(value)
-    cols = z - x + 1
-    cells[0][0].set_attribute("table:number-columns-spanned", str(cols))
-    rows = t - y + 1
-    cells[0][0].set_attribute("table:number-rows-spanned", str(rows))
-    for cell in cells[0][1:]:
-        cell.tag = "table:covered-table-cell"
-    for row in cells[1:]:
-        for cell in row:
-            cell.tag = "table:covered-table-cell"
-    # replace cells in table
-    self.set_cells(cells, coord=start, clone=False)
-    return True
-
-
-
-def set_value(self, coord: tuple | odfdo.list | str, value: Any, cell_type: str | None = None, currency: str | None = None, style: str | None = None) ‑> None -
-
-

Set the Python value of the cell at the given coordinates.

-

They are either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4".

-

Arguments

-

coord – (int, int) or str

-

value – Python type

-

cell_type – 'boolean', 'currency', 'date', 'float', 'percentage', -'string' or 'time'

-

currency – three-letter str

-

style – str

-
- -Expand source code - -
def set_value(
-    self,
-    coord: tuple | list | str,
-    value: Any,
-    cell_type: str | None = None,
-    currency: str | None = None,
-    style: str | None = None,
-) -> None:
-    """Set the Python value of the cell at the given coordinates.
-
-    They are either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4".
-
-    Arguments:
-
-        coord -- (int, int) or str
-
-        value -- Python type
-
-        cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                 'string' or 'time'
-
-        currency -- three-letter str
-
-        style -- str
-
-    """
-    self.set_cell(
-        coord,
-        Cell(value, cell_type=cell_type, currency=currency, style=style),
-        clone=False,
-    )
-
-
-
-def set_values(self, values: odfdo.list, coord: tuple | odfdo.list | str | None = None, style: str | None = None, cell_type: str | None = None, currency: str | None = None) ‑> None -
-
-

Set the value of cells in the table, from the 'coord' position -with values.

-

'coord' is the coordinate of the upper left cell to be modified by -values. If 'coord' is None, default to the position (0,0) ("A1"). -If 'coord' is an area (e.g. "A2:B5"), the upper left position of this -area is used as coordinate.

-

The table is not cleared before the operation, to reset the table -before setting values, use table.clear().

-

A list of lists is expected, with as many lists as rows, and as many -items in each sublist as cells to be setted. None values in the list -will create empty cells with no cell type (but eventually a style).

-

Arguments

-

coord – tuple or str

-

values – list of lists of python types

-

cell_type – 'boolean', 'currency', 'date', 'float', 'percentage', -'string' or 'time'

-

currency – three-letter str

-

style – str

-
- -Expand source code - -
def set_values(
-    self,
-    values: list,
-    coord: tuple | list | str | None = None,
-    style: str | None = None,
-    cell_type: str | None = None,
-    currency: str | None = None,
-) -> None:
-    """Set the value of cells in the table, from the 'coord' position
-    with values.
-
-    'coord' is the coordinate of the upper left cell to be modified by
-    values. If 'coord' is None, default to the position (0,0) ("A1").
-    If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
-    area is used as coordinate.
-
-    The table is *not* cleared before the operation, to reset the table
-    before setting values, use table.clear().
-
-    A list of lists is expected, with as many lists as rows, and as many
-    items in each sublist as cells to be setted. None values in the list
-    will create empty cells with no cell type (but eventually a style).
-
-    Arguments:
-
-        coord -- tuple or str
-
-        values -- list of lists of python types
-
-        cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                     'string' or 'time'
-
-        currency -- three-letter str
-
-        style -- str
-    """
-    if coord:
-        x, y = self._translate_cell_coordinates(coord)
-    else:
-        x = y = 0
-    if y is None:
-        y = 0
-    if x is None:
-        x = 0
-    y -= 1
-    for row_values in values:
-        y += 1
-        if not row_values:
-            continue
-        row = self.get_row(y, clone=True)
-        repeated = row.repeated or 1
-        if repeated >= 2:
-            row.repeated = None
-        row.set_values(
-            row_values,
-            start=x,
-            cell_type=cell_type,
-            currency=currency,
-            style=style,
-        )
-        self.set_row(y, row, clone=False)
-        self._update_width(row)
-
-
-
-def to_csv(self, path_or_file: str | Path | None = None, dialect: str = 'excel') ‑> Any -
-
-

Write the table as CSV in the file.

-

If the file is a string, it is opened as a local path. Else an -opened file-like is expected.

-

Arguments

-

path_or_file – str or file-like

-

dialect – str, python csv.dialect, can be 'excel', 'unix'…

-
- -Expand source code - -
def to_csv(
-    self,
-    path_or_file: str | Path | None = None,
-    dialect: str = "excel",
-) -> Any:
-    """Write the table as CSV in the file.
-
-    If the file is a string, it is opened as a local path. Else an
-    opened file-like is expected.
-
-    Arguments:
-
-        path_or_file -- str or file-like
-
-        dialect -- str, python csv.dialect, can be 'excel', 'unix'...
-    """
-
-    def write_content(csv_writer: object) -> None:
-        for values in self.iter_values():
-            line = []
-            for value in values:
-                if value is None:
-                    value = ""
-                if isinstance(value, str):
-                    value = value.strip()
-                line.append(value)
-            csv_writer.writerow(line)  # type: ignore
-
-    out = StringIO(newline="")
-    csv_writer = csv.writer(out, dialect=dialect)
-    write_content(csv_writer)
-    if path_or_file is None:
-        return out.getvalue()
-    path = Path(path_or_file)
-    path.write_text(out.getvalue())
-    return None
-
-
-
-def transpose(self, coord: tuple | odfdo.list | str | None = None) ‑> None -
-
-

Swap in-place rows and columns of the table.

-

If 'coord' is not None, apply transpose only to the area defined by the -coordinates. Beware, if area is not square, some cells mays be over -written during the process.

-

Arguments

-

coord – str or tuple of int : coordinates of area

-

start – int or str

-
- -Expand source code - -
def transpose(self, coord: tuple | list | str | None = None) -> None:  # noqa: C901
-    """Swap *in-place* rows and columns of the table.
-
-    If 'coord' is not None, apply transpose only to the area defined by the
-    coordinates. Beware, if area is not square, some cells mays be over
-    written during the process.
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates of area
-
-        start -- int or str
-    """
-    data = []
-    if coord is None:
-        for row in self.traverse():
-            data.append(list(row.traverse()))
-        transposed_data = zip_longest(*data)
-        self.clear()
-        # new_rows = []
-        for row_cells in transposed_data:
-            if not isiterable(row_cells):
-                row_cells = (row_cells,)
-            row = Row()
-            row.extend_cells(row_cells)
-            self.append_row(row, clone=False)
-        self._compute_table_cache()
-    else:
-        x, y, z, t = self._translate_table_coordinates(coord)
-        if x is None:
-            x = 0
-        else:
-            x = min(x, self.width - 1)
-        if z is None:
-            z = self.width - 1
-        else:
-            z = min(z, self.width - 1)
-        if y is None:
-            y = 0
-        else:
-            y = min(y, self.height - 1)
-        if t is None:
-            t = self.height - 1
-        else:
-            t = min(t, self.height - 1)
-        for row in self.traverse(start=y, end=t):
-            data.append(list(row.traverse(start=x, end=z)))
-        transposed_data = zip_longest(*data)
-        # clear locally
-        w = z - x + 1
-        h = t - y + 1
-        if w != h:
-            nones = [[None] * w for i in range(h)]
-            self.set_values(nones, coord=(x, y, z, t))
-        # put transposed
-        filtered_data: list[tuple[Cell]] = []
-        for row_cells in transposed_data:
-            if isinstance(row_cells, (list, tuple)):
-                filtered_data.append(row_cells)
-            else:
-                filtered_data.append((row_cells,))
-        self.set_cells(filtered_data, (x, y, x + h - 1, y + w - 1))
-        self._compute_table_cache()
-
-
-
-def traverse(self, start: int | None = None, end: int | None = None) ‑> collections.abc.Iterator[Row] -
-
-

Yield as many row elements as expected rows in the table, i.e. -expand repetitions by returning the same row as many times as -necessary.

-
Arguments:
-
-    start -- int
-
-    end -- int
-
-

Copies are returned, use set_row() to push them back.

-
- -Expand source code - -
def traverse(  # noqa: C901
-    self,
-    start: int | None = None,
-    end: int | None = None,
-) -> Iterator[Row]:
-    """Yield as many row elements as expected rows in the table, i.e.
-    expand repetitions by returning the same row as many times as
-    necessary.
-
-        Arguments:
-
-            start -- int
-
-            end -- int
-
-    Copies are returned, use set_row() to push them back.
-    """
-    idx = -1
-    before = -1
-    y = 0
-    if start is None and end is None:
-        for juska in self._tmap:
-            idx += 1
-            if idx in self._indexes["_tmap"]:
-                row = self._indexes["_tmap"][idx]
-            else:
-                row = self._get_element_idx2(_xpath_row_idx, idx)
-                self._indexes["_tmap"][idx] = row
-            repeated = juska - before
-            before = juska
-            for _i in range(repeated or 1):
-                # Return a copy without the now obsolete repetition
-                row = row.clone
-                row.y = y
-                y += 1
-                if repeated > 1:
-                    row.repeated = None
-                yield row
-    else:
-        if start is None:
-            start = 0
-        start = max(0, start)
-        if end is None:
-            try:
-                end = self._tmap[-1]
-            except Exception:
-                end = -1
-        start_map = find_odf_idx(self._tmap, start)
-        if start_map is None:
-            return
-        if start_map > 0:
-            before = self._tmap[start_map - 1]
-        idx = start_map - 1
-        before = start - 1
-        y = start
-        for juska in self._tmap[start_map:]:
-            idx += 1
-            if idx in self._indexes["_tmap"]:
-                row = self._indexes["_tmap"][idx]
-            else:
-                row = self._get_element_idx2(_xpath_row_idx, idx)
-                self._indexes["_tmap"][idx] = row
-            repeated = juska - before
-            before = juska
-            for _i in range(repeated or 1):
-                if y <= end:
-                    row = row.clone
-                    row.y = y
-                    y += 1
-                    if repeated > 1 or (y == start and start > 0):
-                        row.repeated = None
-                    yield row
-
-
-
-def traverse_columns(self, start: int | None = None, end: int | None = None) ‑> collections.abc.Iterator[Column] -
-
-

Yield as many column elements as expected columns in the table, -i.e. expand repetitions by returning the same column as many times as -necessary.

-
Arguments:
-
-    start -- int
-
-    end -- int
-
-

Copies are returned, use set_column() to push them back.

-
- -Expand source code - -
def traverse_columns(  # noqa: C901
-    self,
-    start: int | None = None,
-    end: int | None = None,
-) -> Iterator[Column]:
-    """Yield as many column elements as expected columns in the table,
-    i.e. expand repetitions by returning the same column as many times as
-    necessary.
-
-        Arguments:
-
-            start -- int
-
-            end -- int
-
-    Copies are returned, use set_column() to push them back.
-    """
-    idx = -1
-    before = -1
-    x = 0
-    if start is None and end is None:
-        for juska in self._cmap:
-            idx += 1
-            if idx in self._indexes["_cmap"]:
-                column = self._indexes["_cmap"][idx]
-            else:
-                column = self._get_element_idx2(_xpath_column_idx, idx)
-                self._indexes["_cmap"][idx] = column
-            repeated = juska - before
-            before = juska
-            for _i in range(repeated or 1):
-                # Return a copy without the now obsolete repetition
-                column = column.clone
-                column.x = x
-                x += 1
-                if repeated > 1:
-                    column.repeated = None
-                yield column
-    else:
-        if start is None:
-            start = 0
-        start = max(0, start)
-        if end is None:
-            try:
-                end = self._cmap[-1]
-            except Exception:
-                end = -1
-        start_map = find_odf_idx(self._cmap, start)
-        if start_map is None:
-            return
-        if start_map > 0:
-            before = self._cmap[start_map - 1]
-        idx = start_map - 1
-        before = start - 1
-        x = start
-        for juska in self._cmap[start_map:]:
-            idx += 1
-            if idx in self._indexes["_cmap"]:
-                column = self._indexes["_cmap"][idx]
-            else:
-                column = self._get_element_idx2(_xpath_column_idx, idx)
-                self._indexes["_cmap"][idx] = column
-            repeated = juska - before
-            before = juska
-            for _i in range(repeated or 1):
-                if x <= end:
-                    column = column.clone
-                    column.x = x
-                    x += 1
-                    if repeated > 1 or (x == start and start > 0):
-                        column.repeated = None
-                    yield column
-
-
-
-

Inherited members

- -
-
-class Text -(text_result: _ElementUnicodeResult | _ElementStringResult) -
-
-

Representation of an XML text node. Created to hide the specifics of -lxml in searching text nodes using XPath.

-

Constructed like any str object but only accepts lxml text objects.

-
- -Expand source code - -
class Text(str):
-    """Representation of an XML text node. Created to hide the specifics of
-    lxml in searching text nodes using XPath.
-
-    Constructed like any str object but only accepts lxml text objects.
-    """
-
-    # There's some black magic in inheriting from str
-    def __init__(
-        self,
-        text_result: _ElementUnicodeResult | _ElementStringResult,
-    ) -> None:
-        self.__parent = text_result.getparent()
-        self.__is_text = text_result.is_text
-        self.__is_tail = text_result.is_tail
-
-    @property
-    def parent(self) -> Element | None:
-        parent = self.__parent
-        # XXX happens just because of the unit test
-        if parent is None:
-            return None
-        return Element.from_tag(tag_or_elem=parent)
-
-    def is_text(self) -> bool:
-        return self.__is_text
-
-    def is_tail(self) -> bool:
-        return self.__is_tail
-
-

Ancestors

-
    -
  • builtins.str
  • -
-

Instance variables

-
-
var parentElement | None
-
-
-
- -Expand source code - -
@property
-def parent(self) -> Element | None:
-    parent = self.__parent
-    # XXX happens just because of the unit test
-    if parent is None:
-        return None
-    return Element.from_tag(tag_or_elem=parent)
-
-
-
-

Methods

-
-
-def is_tail(self) ‑> bool -
-
-
-
- -Expand source code - -
def is_tail(self) -> bool:
-    return self.__is_tail
-
-
-
-def is_text(self) ‑> bool -
-
-
-
- -Expand source code - -
def is_text(self) -> bool:
-    return self.__is_text
-
-
-
-
-
-class TextChange -(**kwargs: Any) -
-
-

The TextChange "text:change" element marks a position in an empty -region where text has been deleted.

-
- -Expand source code - -
class TextChange(Element):
-    """The TextChange "text:change" element marks a position in an empty
-    region where text has been deleted.
-    """
-
-    _tag = "text:change"
-
-    def get_id(self) -> str | None:
-        return self.get_attribute_string("text:change-id")
-
-    def set_id(self, idx: str) -> None:
-        self.set_attribute("text:change-id", idx)
-
-    def _get_tracked_changes(self) -> Element | None:
-        body = self.document_body
-        if not body:
-            raise ValueError
-        return body.get_tracked_changes()
-
-    def get_changed_region(
-        self,
-        tracked_changes: Element | None = None,
-    ) -> Element | None:
-        if not tracked_changes:
-            tracked_changes = self._get_tracked_changes()
-        idx = self.get_id()
-        return tracked_changes.get_changed_region(text_id=idx)  # type: ignore
-
-    def get_change_info(
-        self,
-        tracked_changes: Element | None = None,
-    ) -> Element | None:
-        changed_region = self.get_changed_region(tracked_changes=tracked_changes)
-        if not changed_region:
-            return None
-        return changed_region.get_change_info()  # type: ignore
-
-    def get_change_element(
-        self,
-        tracked_changes: Element | None = None,
-    ) -> Element | None:
-        changed_region = self.get_changed_region(tracked_changes=tracked_changes)
-        if not changed_region:
-            return None
-        return changed_region.get_change_element()  # type: ignore
-
-    def get_deleted(
-        self,
-        tracked_changes: Element | None = None,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> Element | None:
-        """Shortcut to get the deleted informations stored in the
-        TextDeletion stored in the tracked changes.
-
-        Return: Paragraph (or None)."
-        """
-        changed = self.get_change_element(tracked_changes=tracked_changes)
-        if not changed:
-            return None
-        return changed.get_deleted(  # type: ignore
-            as_text=as_text,
-            no_header=no_header,
-            clean=clean,
-        )
-
-    def get_inserted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> str | Element | list[Element] | None:
-        """Return None."""
-        return None
-
-    def get_start(self) -> TextChangeStart | None:
-        """Return None."""
-        return None
-
-    def get_end(self) -> TextChangeEnd | None:
-        """Return None."""
-        return None
-
-

Ancestors

- -

Subclasses

- -

Methods

-
-
-def get_change_element(self, tracked_changes: Element | None = None) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_change_element(
-    self,
-    tracked_changes: Element | None = None,
-) -> Element | None:
-    changed_region = self.get_changed_region(tracked_changes=tracked_changes)
-    if not changed_region:
-        return None
-    return changed_region.get_change_element()  # type: ignore
-
-
-
-def get_change_info(self, tracked_changes: Element | None = None) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_change_info(
-    self,
-    tracked_changes: Element | None = None,
-) -> Element | None:
-    changed_region = self.get_changed_region(tracked_changes=tracked_changes)
-    if not changed_region:
-        return None
-    return changed_region.get_change_info()  # type: ignore
-
-
-
-def get_changed_region(self, tracked_changes: Element | None = None) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_changed_region(
-    self,
-    tracked_changes: Element | None = None,
-) -> Element | None:
-    if not tracked_changes:
-        tracked_changes = self._get_tracked_changes()
-    idx = self.get_id()
-    return tracked_changes.get_changed_region(text_id=idx)  # type: ignore
-
-
-
-def get_deleted(self, tracked_changes: Element | None = None, as_text: bool = False, no_header: bool = False, clean: bool = True) ‑> Element | None -
-
-

Shortcut to get the deleted informations stored in the -TextDeletion stored in the tracked changes.

-

Return: Paragraph (or None)."

-
- -Expand source code - -
def get_deleted(
-    self,
-    tracked_changes: Element | None = None,
-    as_text: bool = False,
-    no_header: bool = False,
-    clean: bool = True,
-) -> Element | None:
-    """Shortcut to get the deleted informations stored in the
-    TextDeletion stored in the tracked changes.
-
-    Return: Paragraph (or None)."
-    """
-    changed = self.get_change_element(tracked_changes=tracked_changes)
-    if not changed:
-        return None
-    return changed.get_deleted(  # type: ignore
-        as_text=as_text,
-        no_header=no_header,
-        clean=clean,
-    )
-
-
-
-def get_end(self) ‑> TextChangeEnd | None -
-
-

Return None.

-
- -Expand source code - -
def get_end(self) -> TextChangeEnd | None:
-    """Return None."""
-    return None
-
-
-
-def get_id(self) ‑> str | None -
-
-
-
- -Expand source code - -
def get_id(self) -> str | None:
-    return self.get_attribute_string("text:change-id")
-
-
-
-def get_inserted(self, as_text: bool = False, no_header: bool = False, clean: bool = True) ‑> str | Element | odfdo.list[Element] | None -
-
-

Return None.

-
- -Expand source code - -
def get_inserted(
-    self,
-    as_text: bool = False,
-    no_header: bool = False,
-    clean: bool = True,
-) -> str | Element | list[Element] | None:
-    """Return None."""
-    return None
-
-
-
-def get_start(self) ‑> TextChangeStart | None -
-
-

Return None.

-
- -Expand source code - -
def get_start(self) -> TextChangeStart | None:
-    """Return None."""
-    return None
-
-
-
-def set_id(self, idx: str) ‑> None -
-
-
-
- -Expand source code - -
def set_id(self, idx: str) -> None:
-    self.set_attribute("text:change-id", idx)
-
-
-
-

Inherited members

- -
-
-class TextChangeEnd -(**kwargs: Any) -
-
-

The TextChangeEnd "text:change-end" element marks the end of a region -with content where text has been inserted or the format has been -changed.

-
- -Expand source code - -
class TextChangeEnd(TextChange):
-    """The TextChangeEnd "text:change-end" element marks the end of a region
-    with content where text has been inserted or the format has been
-    changed.
-    """
-
-    _tag = "text:change-end"
-
-    def get_start(self) -> TextChangeStart | None:
-        """Return the corresponding annotation starting tag or None."""
-        idx = self.get_id()
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can not find end tag: no parent available.")
-        body = self.document_body
-        if not body:
-            body = self.root
-        return body.get_text_change_start(idx=idx)  # type: ignore
-
-    def get_end(self) -> TextChangeEnd | None:
-        """Return self."""
-        return self
-
-    def get_deleted(self, *args: Any, **kwargs: Any) -> Element | None:
-        """Return None."""
-        return None
-
-    def get_inserted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> str | Element | list[Element] | None:
-        """Return the content between text:change-start and text:change-end.
-
-        If no content exists (deletion tag), returns None (or '' if text flag
-        is True).
-        If as_text is True: returns the text content.
-        If clean is True: suppress unwanted tags (deletions marks, ...)
-        If no_header is True: existing text:h are changed in text:p
-        By default: returns a list of Element, cleaned and with headers
-
-        Arguments:
-
-            as_text -- boolean
-
-            clean -- boolean
-
-            no_header -- boolean
-
-        Return: list or Element or text
-        """
-
-        # idx = self.get_id()
-        start = self.get_start()
-        end = self.get_end()
-        if end is None or start is None:
-            if as_text:
-                return ""
-            return None
-        body = self.document_body
-        if not body:
-            body = self.root
-        return body.get_between(
-            start, end, as_text=as_text, no_header=no_header, clean=clean
-        )
-
-

Ancestors

- -

Subclasses

- -

Methods

-
-
-def get_deleted(self, *args: Any, **kwargs: Any) ‑> Element | None -
-
-

Return None.

-
- -Expand source code - -
def get_deleted(self, *args: Any, **kwargs: Any) -> Element | None:
-    """Return None."""
-    return None
-
-
-
-def get_end(self) ‑> TextChangeEnd | None -
-
-

Return self.

-
- -Expand source code - -
def get_end(self) -> TextChangeEnd | None:
-    """Return self."""
-    return self
-
-
-
-def get_inserted(self, as_text: bool = False, no_header: bool = False, clean: bool = True) ‑> str | Element | odfdo.list[Element] | None -
-
-

Return the content between text:change-start and text:change-end.

-

If no content exists (deletion tag), returns None (or '' if text flag -is True). -If as_text is True: returns the text content. -If clean is True: suppress unwanted tags (deletions marks, …) -If no_header is True: existing text:h are changed in text:p -By default: returns a list of Element, cleaned and with headers

-

Arguments

-

as_text – boolean

-

clean – boolean

-

no_header – boolean

-

Return: list or Element or text

-
- -Expand source code - -
def get_inserted(
-    self,
-    as_text: bool = False,
-    no_header: bool = False,
-    clean: bool = True,
-) -> str | Element | list[Element] | None:
-    """Return the content between text:change-start and text:change-end.
-
-    If no content exists (deletion tag), returns None (or '' if text flag
-    is True).
-    If as_text is True: returns the text content.
-    If clean is True: suppress unwanted tags (deletions marks, ...)
-    If no_header is True: existing text:h are changed in text:p
-    By default: returns a list of Element, cleaned and with headers
-
-    Arguments:
-
-        as_text -- boolean
-
-        clean -- boolean
-
-        no_header -- boolean
-
-    Return: list or Element or text
-    """
-
-    # idx = self.get_id()
-    start = self.get_start()
-    end = self.get_end()
-    if end is None or start is None:
-        if as_text:
-            return ""
-        return None
-    body = self.document_body
-    if not body:
-        body = self.root
-    return body.get_between(
-        start, end, as_text=as_text, no_header=no_header, clean=clean
-    )
-
-
-
-def get_start(self) ‑> TextChangeStart | None -
-
-

Return the corresponding annotation starting tag or None.

-
- -Expand source code - -
def get_start(self) -> TextChangeStart | None:
-    """Return the corresponding annotation starting tag or None."""
-    idx = self.get_id()
-    parent = self.parent
-    if parent is None:
-        raise ValueError("Can not find end tag: no parent available.")
-    body = self.document_body
-    if not body:
-        body = self.root
-    return body.get_text_change_start(idx=idx)  # type: ignore
-
-
-
-

Inherited members

- -
-
-class TextChangeStart -(**kwargs: Any) -
-
-

The TextChangeStart "text:change-start" element marks the start of a -region with content where text has been inserted or the format has -been changed.

-
- -Expand source code - -
class TextChangeStart(TextChangeEnd):
-    """The TextChangeStart "text:change-start" element marks the start of a
-    region with content where text has been inserted or the format has
-    been changed.
-    """
-
-    _tag = "text:change-start"
-
-    def get_start(self) -> TextChangeStart:
-        """Return self."""
-        return self
-
-    def get_end(self) -> TextChangeEnd:
-        """Return the corresponding change-end tag or None."""
-        idx = self.get_id()
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can not find end tag: no parent available.")
-        body = self.document_body
-        if not body:
-            body = self.root
-        return body.get_text_change_end(idx=idx)  # type: ignore
-
-    def delete(
-        self,
-        child: Element | None = None,
-        keep_tail: bool = True,
-    ) -> None:
-        """Delete the given element from the XML tree. If no element is given,
-        "self" is deleted. The XML library may allow to continue to use an
-        element now "orphan" as long as you have a reference to it.
-
-        For TextChangeStart : delete also the end tag if exists.
-
-        Arguments:
-
-            child -- Element
-
-            keep_tail -- boolean (default to True), True for most usages.
-        """
-        if child is not None:  # act like normal delete
-            return super().delete(child, keep_tail)
-        idx = self.get_id()
-        parent = self.parent
-        if parent is None:
-            raise ValueError("cannot delete the root element")
-        body = self.document_body
-        if not body:
-            body = parent
-        end = body.get_text_change_end(idx=idx)
-        if end:
-            end.delete()
-        # act like normal delete
-        super().delete()
-
-

Ancestors

- -

Methods

-
-
-def delete(self, child: Element | None = None, keep_tail: bool = True) ‑> None -
-
-

Delete the given element from the XML tree. If no element is given, -"self" is deleted. The XML library may allow to continue to use an -element now "orphan" as long as you have a reference to it.

-

For TextChangeStart : delete also the end tag if exists.

-

Arguments

-

child – Element

-

keep_tail – boolean (default to True), True for most usages.

-
- -Expand source code - -
def delete(
-    self,
-    child: Element | None = None,
-    keep_tail: bool = True,
-) -> None:
-    """Delete the given element from the XML tree. If no element is given,
-    "self" is deleted. The XML library may allow to continue to use an
-    element now "orphan" as long as you have a reference to it.
-
-    For TextChangeStart : delete also the end tag if exists.
-
-    Arguments:
-
-        child -- Element
-
-        keep_tail -- boolean (default to True), True for most usages.
-    """
-    if child is not None:  # act like normal delete
-        return super().delete(child, keep_tail)
-    idx = self.get_id()
-    parent = self.parent
-    if parent is None:
-        raise ValueError("cannot delete the root element")
-    body = self.document_body
-    if not body:
-        body = parent
-    end = body.get_text_change_end(idx=idx)
-    if end:
-        end.delete()
-    # act like normal delete
-    super().delete()
-
-
-
-def get_end(self) ‑> TextChangeEnd -
-
-

Return the corresponding change-end tag or None.

-
- -Expand source code - -
def get_end(self) -> TextChangeEnd:
-    """Return the corresponding change-end tag or None."""
-    idx = self.get_id()
-    parent = self.parent
-    if parent is None:
-        raise ValueError("Can not find end tag: no parent available.")
-    body = self.document_body
-    if not body:
-        body = self.root
-    return body.get_text_change_end(idx=idx)  # type: ignore
-
-
-
-def get_start(self) ‑> TextChangeStart -
-
-

Return self.

-
- -Expand source code - -
def get_start(self) -> TextChangeStart:
-    """Return self."""
-    return self
-
-
-
-

Inherited members

- -
-
-class TextChangedRegion -(**kwargs: Any) -
-
-

Each TextChangedRegion "text:changed-region" element contains a single -element, one of TextInsertion, TextDeletion or TextFormatChange that -corresponds to a change being tracked within the scope of the -"text:tracked-changes" element that contains the "text:changed-region" -instance. -The xml:id attribute of the TextChangedRegion is referenced -from the "text:change", "text:change-start" and "text:change-end" -elements that identify where the change applies to markup in the scope of -the "text:tracked-changes" element.

-

Warning : for this implementation, text:change should be referenced only -once in the scope, which is different from ODF 1.2 requirement: -" A "text:changed-region" can be referenced by more than one -change, but the corresponding referencing change mark elements -shall be of the same change type - insertion, format change or -deletion. "

-
- -Expand source code - -
class TextChangedRegion(Element):
-    """Each TextChangedRegion "text:changed-region" element contains a single
-    element, one of TextInsertion, TextDeletion or TextFormatChange that
-    corresponds to a change being tracked within the scope of the
-    "text:tracked-changes" element that contains the "text:changed-region"
-    instance.
-    The xml:id attribute of the TextChangedRegion is referenced
-    from the "text:change", "text:change-start" and "text:change-end"
-    elements that identify where the change applies to markup in the scope of
-    the "text:tracked-changes" element.
-
-    Warning : for this implementation, text:change should be referenced only
-              once in the scope, which is different from ODF 1.2 requirement:
-             " A "text:changed-region" can be referenced by more than one
-             change, but the corresponding referencing change mark elements
-             shall be of the same change type - insertion, format change or
-             deletion. "
-    """
-
-    _tag = "text:changed-region"
-
-    def get_change_info(self) -> Element | None:
-        """Shortcut to get the ChangeInfo element of the change
-        element child.
-
-        Return: ChangeInfo element.
-        """
-        return self.get_element("descendant::office:change-info")
-
-    def set_change_info(
-        self,
-        change_info: Element | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-        comments: Element | list[Element] | None = None,
-    ) -> None:
-        """Shortcut to set the ChangeInfo element of the sub change element.
-        See TextInsertion.set_change_info() for details.
-
-        Arguments:
-
-             change_info -- ChangeInfo element (or None)
-
-             cretor -- str (or None)
-
-             date -- datetime (or None)
-
-             comments -- Paragraph or list of Paragraph elements (or None)
-        """
-        child = self.get_change_element()
-        if not child:
-            raise ValueError
-        child.set_change_info(  # type: ignore
-            change_info=change_info, creator=creator, date=date, comments=comments
-        )
-
-    def get_change_element(self) -> Element | None:
-        """Get the change element child. It can be either: TextInsertion,
-        TextDeletion, or TextFormatChange as an Element object.
-
-        Return: Element.
-        """
-        request = (
-            "descendant::text:insertion "
-            "| descendant::text:deletion"
-            "| descendant::text:format-change"
-        )
-        return self._filtered_element(request, 0)
-
-    def _get_text_id(self) -> str | None:
-        return self.get_attribute_string("text:id")
-
-    def _set_text_id(self, text_id: str) -> None:
-        self.set_attribute("text:id", text_id)
-
-    def _get_xml_id(self) -> str | None:
-        return self.get_attribute_string("xml:id")
-
-    def _set_xml_id(self, xml_id: str) -> None:
-        self.set_attribute("xml:id", xml_id)
-
-    def get_id(self) -> str | None:
-        """Get the "text:id" attribute.
-
-        Return: str
-        """
-        return self._get_text_id()
-
-    def set_id(self, idx: str) -> None:
-        """Set both the "text:id" and "xml:id" attributes with same value."""
-        self._set_text_id(idx)
-        self._set_xml_id(idx)
-
-

Ancestors

- -

Methods

-
-
-def get_change_element(self) ‑> Element | None -
-
-

Get the change element child. It can be either: TextInsertion, -TextDeletion, or TextFormatChange as an Element object.

-

Return: Element.

-
- -Expand source code - -
def get_change_element(self) -> Element | None:
-    """Get the change element child. It can be either: TextInsertion,
-    TextDeletion, or TextFormatChange as an Element object.
-
-    Return: Element.
-    """
-    request = (
-        "descendant::text:insertion "
-        "| descendant::text:deletion"
-        "| descendant::text:format-change"
-    )
-    return self._filtered_element(request, 0)
-
-
-
-def get_change_info(self) ‑> Element | None -
-
-

Shortcut to get the ChangeInfo element of the change -element child.

-

Return: ChangeInfo element.

-
- -Expand source code - -
def get_change_info(self) -> Element | None:
-    """Shortcut to get the ChangeInfo element of the change
-    element child.
-
-    Return: ChangeInfo element.
-    """
-    return self.get_element("descendant::office:change-info")
-
-
-
-def get_id(self) ‑> str | None -
-
-

Get the "text:id" attribute.

-

Return: str

-
- -Expand source code - -
def get_id(self) -> str | None:
-    """Get the "text:id" attribute.
-
-    Return: str
-    """
-    return self._get_text_id()
-
-
-
-def set_change_info(self, change_info: Element | None = None, creator: str | None = None, date: datetime | None = None, comments: Element | odfdo.list[Element] | None = None) ‑> None -
-
-

Shortcut to set the ChangeInfo element of the sub change element. -See TextInsertion.set_change_info() for details.

-

Arguments

-

change_info – ChangeInfo element (or None)

-

cretor – str (or None)

-

date – datetime (or None)

-

comments – Paragraph or list of Paragraph elements (or None)

-
- -Expand source code - -
def set_change_info(
-    self,
-    change_info: Element | None = None,
-    creator: str | None = None,
-    date: datetime | None = None,
-    comments: Element | list[Element] | None = None,
-) -> None:
-    """Shortcut to set the ChangeInfo element of the sub change element.
-    See TextInsertion.set_change_info() for details.
-
-    Arguments:
-
-         change_info -- ChangeInfo element (or None)
-
-         cretor -- str (or None)
-
-         date -- datetime (or None)
-
-         comments -- Paragraph or list of Paragraph elements (or None)
-    """
-    child = self.get_change_element()
-    if not child:
-        raise ValueError
-    child.set_change_info(  # type: ignore
-        change_info=change_info, creator=creator, date=date, comments=comments
-    )
-
-
-
-def set_id(self, idx: str) ‑> None -
-
-

Set both the "text:id" and "xml:id" attributes with same value.

-
- -Expand source code - -
def set_id(self, idx: str) -> None:
-    """Set both the "text:id" and "xml:id" attributes with same value."""
-    self._set_text_id(idx)
-    self._set_xml_id(idx)
-
-
-
-

Inherited members

- -
-
-class TextDeletion -(**kwargs: Any) -
-
-

The TextDeletion "text:deletion" contains information that identifies -the person responsible for a deletion and the date of that deletion. -This information may also contain one or more Paragraph which contains -a comment on the deletion. The TextDeletion element may also contain -content that was deleted while change tracking was enabled. The position -where the text was deleted is marked by a "text:change" element. Deleted -text is contained in a paragraph element. To reconstruct the original -text, the paragraph containing the deleted text is merged with its -surrounding paragraph or heading element. To reconstruct the text before -a deletion took place: -- If the change mark is inside a paragraph, insert the content that was -deleted, but remove all leading start tags up to and including the -first "text:p" element and all trailing end tags up to and including -the last "/text:p" or "/text:h" element. If the last trailing element -is a "/text:h", change the end tag "/text:p" following this insertion -to a "/text:h" element. -- If the change mark is inside a heading, insert the content that was -deleted, but remove all leading start tags up to and including the -first "text:h" element and all trailing end tags up to and including -the last "/text:h" or "/text:p" element. If the last trailing element -is a "/text:p", change the end tag "/text:h" following this insertion -to a "/text:p" element. -- Otherwise, copy the text content of the "text:deletion" element in -place of the change mark.

-
- -Expand source code - -
class TextDeletion(TextInsertion):
-    """The TextDeletion "text:deletion" contains information that identifies
-    the person responsible for a deletion and the date of that deletion.
-    This information may also contain one or more Paragraph which contains
-    a comment on the deletion. The TextDeletion element may also contain
-    content that was deleted while change tracking was enabled. The position
-    where the text was deleted is marked by a "text:change" element. Deleted
-    text is contained in a paragraph element. To reconstruct the original
-    text, the paragraph containing the deleted text is merged with its
-    surrounding paragraph or heading element. To reconstruct the text before
-    a deletion took place:
-      - If the change mark is inside a paragraph, insert the content that was
-      deleted, but remove all leading start tags up to and including the
-      first "text:p" element and all trailing end tags up to and including
-      the last "/text:p" or "/text:h" element. If the last trailing element
-      is a "/text:h", change the end tag "/text:p" following this insertion
-      to a "/text:h" element.
-      - If the change mark is inside a heading, insert the content that was
-      deleted, but remove all leading start tags up to and including the
-      first "text:h" element and all trailing end tags up to and including
-      the last "/text:h" or "/text:p" element. If the last trailing element
-      is a "/text:p", change the end tag "/text:h" following this insertion
-      to a "/text:p" element.
-      - Otherwise, copy the text content of the "text:deletion" element in
-      place of the change mark.
-    """
-
-    _tag = "text:deletion"
-
-    def get_deleted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-    ) -> str | list[Element] | None:
-        """Get the deleted informations stored in the TextDeletion.
-        If as_text is True: returns the text content.
-        If no_header is True: existing Heading are changed in Paragraph
-
-        Arguments:
-
-            as_text -- boolean
-
-            no_header -- boolean
-
-        Return: Paragraph and Header list
-        """
-        children = self.children
-        inner = [elem for elem in children if elem.tag != "office:change-info"]
-        if no_header:  # crude replace t:h by t:p
-            new_inner = []
-            for element in inner:
-                if element.tag == "text:h":
-                    children = element.children
-                    text = element.text
-                    para = Element.from_tag("text:p")
-                    para.text = text
-                    for child in children:
-                        para.append(child)
-                    new_inner.append(para)
-                else:
-                    new_inner.append(element)
-            inner = new_inner
-        if as_text:
-            return "\n".join([elem.get_formatted_text(context=None) for elem in inner])
-        return inner
-
-    def set_deleted(self, paragraph_or_list: Element | list[Element]) -> None:
-        """Set the deleted informations stored in the TextDeletion. An
-        actual content that was deleted is expected, embeded in a Paragraph
-        element or Header.
-
-        Arguments:
-
-            paragraph_or_list -- Paragraph or Header element (or list)
-        """
-        for element in self.get_deleted():  # type: ignore
-            self.delete(element)  # type: ignore
-        if isinstance(paragraph_or_list, Element):
-            paragraph_or_list = [paragraph_or_list]
-        for element in paragraph_or_list:
-            self.append(element)
-
-    def get_inserted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> str | Element | list[Element] | None:
-        """Return None."""
-        if as_text:
-            return ""
-        return None
-
-

Ancestors

- -

Methods

-
-
-def get_deleted(self, as_text: bool = False, no_header: bool = False) ‑> str | odfdo.list[Element] | None -
-
-

Get the deleted informations stored in the TextDeletion. -If as_text is True: returns the text content. -If no_header is True: existing Heading are changed in Paragraph

-

Arguments

-

as_text – boolean

-

no_header – boolean

-

Return: Paragraph and Header list

-
- -Expand source code - -
def get_deleted(
-    self,
-    as_text: bool = False,
-    no_header: bool = False,
-) -> str | list[Element] | None:
-    """Get the deleted informations stored in the TextDeletion.
-    If as_text is True: returns the text content.
-    If no_header is True: existing Heading are changed in Paragraph
-
-    Arguments:
-
-        as_text -- boolean
-
-        no_header -- boolean
-
-    Return: Paragraph and Header list
-    """
-    children = self.children
-    inner = [elem for elem in children if elem.tag != "office:change-info"]
-    if no_header:  # crude replace t:h by t:p
-        new_inner = []
-        for element in inner:
-            if element.tag == "text:h":
-                children = element.children
-                text = element.text
-                para = Element.from_tag("text:p")
-                para.text = text
-                for child in children:
-                    para.append(child)
-                new_inner.append(para)
-            else:
-                new_inner.append(element)
-        inner = new_inner
-    if as_text:
-        return "\n".join([elem.get_formatted_text(context=None) for elem in inner])
-    return inner
-
-
-
-def get_inserted(self, as_text: bool = False, no_header: bool = False, clean: bool = True) ‑> str | Element | odfdo.list[Element] | None -
-
-

Return None.

-
- -Expand source code - -
def get_inserted(
-    self,
-    as_text: bool = False,
-    no_header: bool = False,
-    clean: bool = True,
-) -> str | Element | list[Element] | None:
-    """Return None."""
-    if as_text:
-        return ""
-    return None
-
-
-
-def set_deleted(self, paragraph_or_list: Element | odfdo.list[Element]) ‑> None -
-
-

Set the deleted informations stored in the TextDeletion. An -actual content that was deleted is expected, embeded in a Paragraph -element or Header.

-

Arguments

-

paragraph_or_list – Paragraph or Header element (or list)

-
- -Expand source code - -
def set_deleted(self, paragraph_or_list: Element | list[Element]) -> None:
-    """Set the deleted informations stored in the TextDeletion. An
-    actual content that was deleted is expected, embeded in a Paragraph
-    element or Header.
-
-    Arguments:
-
-        paragraph_or_list -- Paragraph or Header element (or list)
-    """
-    for element in self.get_deleted():  # type: ignore
-        self.delete(element)  # type: ignore
-    if isinstance(paragraph_or_list, Element):
-        paragraph_or_list = [paragraph_or_list]
-    for element in paragraph_or_list:
-        self.append(element)
-
-
-
-

Inherited members

- -
-
-class TextFormatChange -(**kwargs: Any) -
-
-

The TextFormatChange "text:format-change" element represents any change -in formatting attributes. The region where the change took place is -marked by "text:change-start", "text:change-end" or "text:change" -elements.

-

Note: This element does not contain formatting changes that have taken -place.

-
- -Expand source code - -
class TextFormatChange(TextInsertion):
-    """The TextFormatChange "text:format-change" element represents any change
-    in formatting attributes. The region where the change took place is
-    marked by "text:change-start", "text:change-end" or "text:change"
-    elements.
-
-    Note: This element does not contain formatting changes that have taken
-    place.
-    """
-
-    _tag = "text:format-change"
-
-

Ancestors

- -

Inherited members

- -
-
-class TextInsertion -(**kwargs: Any) -
-
-

The TextInsertion "text:insertion" element contains the information -that identifies the person responsible for a change and the date of -that change. This information may also contain one or more "text:p" -Paragraph which contain a comment on the insertion. The -TextInsertion element's parent "text:changed-region" element has an -xml:id or text:id attribute, the value of which binds that parent -element to the text:change-id attribute on the "text:change-start" -and "text:change-end" elements.

-
- -Expand source code - -
class TextInsertion(Element):
-    """The TextInsertion "text:insertion" element contains the information
-    that identifies the person responsible for a change and the date of
-    that change. This information may also contain one or more "text:p"
-    Paragraph which contain a comment on the insertion. The
-    TextInsertion element's parent "text:changed-region" element has an
-    xml:id or text:id attribute, the value of which binds that parent
-    element to the text:change-id attribute on the "text:change-start"
-    and "text:change-end" elements.
-    """
-
-    _tag = "text:insertion"
-
-    def get_deleted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-    ) -> str | list[Element] | None:
-        """Return: None."""
-        if as_text:
-            return ""
-        return None
-
-    def get_inserted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> str | Element | list[Element] | None:
-        """Shortcut to text:change-start.get_inserted(). Return the content
-        between text:change-start and text:change-end.
-
-        If as_text is True: returns the text content.
-        If no_header is True: existing Heading are changed in Paragraph
-        If no_header is True: existing text:h are changed in text:p
-        By default: returns a list of Element, cleaned and with headers
-
-        Arguments:
-
-            as_text -- boolean
-
-            clean -- boolean
-
-            no_header -- boolean
-
-        Return: list or Element or text
-        """
-        current = self.parent  # text:changed-region
-        if not current:
-            raise ValueError
-        idx = current.get_id()  # type: ignore
-        body = self.document_body
-        if not body:
-            body = self.root
-        text_change = body.get_text_change_start(idx=idx)
-        if not text_change:
-            raise ValueError
-        return text_change.get_inserted(  # type: ignore
-            as_text=as_text, no_header=no_header, clean=clean
-        )
-
-    def get_change_info(self) -> Element | None:
-        """Get the ChangeInfo child of the element.
-
-        Return: ChangeInfo element.
-        """
-        return self.get_element("descendant::office:change-info")
-
-    def set_change_info(
-        self,
-        change_info: Element | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-        comments: Element | list[Element] | None = None,
-    ) -> None:
-        """Set the ChangeInfo element for the change element. If change_info
-        is not provided, creator, date and comments will be used to build a
-        suitable change info element. Default for creator is 'Unknown',
-        default for date is current time and default for comments is no
-        comment at all.
-        The new change info element will replace any existant ChangeInfo.
-
-        Arguments:
-
-             change_info -- ChangeInfo element (or None)
-
-             cretor -- str (or None)
-
-             date -- datetime (or None)
-
-             comments -- Paragraph or list of Paragraph elements (or None)
-        """
-        if change_info is None:
-            new_change_info = ChangeInfo(creator, date)
-            if comments is not None:
-                if isinstance(comments, Element):
-                    # single pararagraph comment
-                    comments_list = [comments]
-                else:
-                    comments_list = comments
-                # assume iterable of Paragraph
-                for paragraph in comments_list:
-                    if not isinstance(paragraph, Paragraph):
-                        raise TypeError(f"Not a Paragraph: '{paragraph!r}'")
-                    new_change_info.insert(paragraph, xmlposition=LAST_CHILD)
-        else:
-            if not isinstance(change_info, ChangeInfo):
-                raise TypeError(f"Not a ChangeInfo: '{change_info!r}'")
-            new_change_info = change_info
-
-        old = self.get_change_info()
-        if old is not None:
-            self.replace_element(old, new_change_info)
-        else:
-            self.insert(new_change_info, xmlposition=FIRST_CHILD)
-
-

Ancestors

- -

Subclasses

- -

Methods

-
-
-def get_change_info(self) ‑> Element | None -
-
-

Get the ChangeInfo child of the element.

-

Return: ChangeInfo element.

-
- -Expand source code - -
def get_change_info(self) -> Element | None:
-    """Get the ChangeInfo child of the element.
-
-    Return: ChangeInfo element.
-    """
-    return self.get_element("descendant::office:change-info")
-
-
-
-def get_deleted(self, as_text: bool = False, no_header: bool = False) ‑> str | odfdo.list[Element] | None -
-
-

Return: None.

-
- -Expand source code - -
def get_deleted(
-    self,
-    as_text: bool = False,
-    no_header: bool = False,
-) -> str | list[Element] | None:
-    """Return: None."""
-    if as_text:
-        return ""
-    return None
-
-
-
-def get_inserted(self, as_text: bool = False, no_header: bool = False, clean: bool = True) ‑> str | Element | odfdo.list[Element] | None -
-
-

Shortcut to text:change-start.get_inserted(). Return the content -between text:change-start and text:change-end.

-

If as_text is True: returns the text content. -If no_header is True: existing Heading are changed in Paragraph -If no_header is True: existing text:h are changed in text:p -By default: returns a list of Element, cleaned and with headers

-

Arguments

-

as_text – boolean

-

clean – boolean

-

no_header – boolean

-

Return: list or Element or text

-
- -Expand source code - -
def get_inserted(
-    self,
-    as_text: bool = False,
-    no_header: bool = False,
-    clean: bool = True,
-) -> str | Element | list[Element] | None:
-    """Shortcut to text:change-start.get_inserted(). Return the content
-    between text:change-start and text:change-end.
-
-    If as_text is True: returns the text content.
-    If no_header is True: existing Heading are changed in Paragraph
-    If no_header is True: existing text:h are changed in text:p
-    By default: returns a list of Element, cleaned and with headers
-
-    Arguments:
-
-        as_text -- boolean
-
-        clean -- boolean
-
-        no_header -- boolean
-
-    Return: list or Element or text
-    """
-    current = self.parent  # text:changed-region
-    if not current:
-        raise ValueError
-    idx = current.get_id()  # type: ignore
-    body = self.document_body
-    if not body:
-        body = self.root
-    text_change = body.get_text_change_start(idx=idx)
-    if not text_change:
-        raise ValueError
-    return text_change.get_inserted(  # type: ignore
-        as_text=as_text, no_header=no_header, clean=clean
-    )
-
-
-
-def set_change_info(self, change_info: Element | None = None, creator: str | None = None, date: datetime | None = None, comments: Element | odfdo.list[Element] | None = None) ‑> None -
-
-

Set the ChangeInfo element for the change element. If change_info -is not provided, creator, date and comments will be used to build a -suitable change info element. Default for creator is 'Unknown', -default for date is current time and default for comments is no -comment at all. -The new change info element will replace any existant ChangeInfo.

-

Arguments

-

change_info – ChangeInfo element (or None)

-

cretor – str (or None)

-

date – datetime (or None)

-

comments – Paragraph or list of Paragraph elements (or None)

-
- -Expand source code - -
def set_change_info(
-    self,
-    change_info: Element | None = None,
-    creator: str | None = None,
-    date: datetime | None = None,
-    comments: Element | list[Element] | None = None,
-) -> None:
-    """Set the ChangeInfo element for the change element. If change_info
-    is not provided, creator, date and comments will be used to build a
-    suitable change info element. Default for creator is 'Unknown',
-    default for date is current time and default for comments is no
-    comment at all.
-    The new change info element will replace any existant ChangeInfo.
-
-    Arguments:
-
-         change_info -- ChangeInfo element (or None)
-
-         cretor -- str (or None)
-
-         date -- datetime (or None)
-
-         comments -- Paragraph or list of Paragraph elements (or None)
-    """
-    if change_info is None:
-        new_change_info = ChangeInfo(creator, date)
-        if comments is not None:
-            if isinstance(comments, Element):
-                # single pararagraph comment
-                comments_list = [comments]
-            else:
-                comments_list = comments
-            # assume iterable of Paragraph
-            for paragraph in comments_list:
-                if not isinstance(paragraph, Paragraph):
-                    raise TypeError(f"Not a Paragraph: '{paragraph!r}'")
-                new_change_info.insert(paragraph, xmlposition=LAST_CHILD)
-    else:
-        if not isinstance(change_info, ChangeInfo):
-            raise TypeError(f"Not a ChangeInfo: '{change_info!r}'")
-        new_change_info = change_info
-
-    old = self.get_change_info()
-    if old is not None:
-        self.replace_element(old, new_change_info)
-    else:
-        self.insert(new_change_info, xmlposition=FIRST_CHILD)
-
-
-
-

Inherited members

- -
-
-class TocEntryTemplate -(style: str | None = None, outline_level: int | None = None, **kwargs: Any) -
-
-

ODF "text:table-of-content-entry-template"

-

Arguments

-

style – str

-
- -Expand source code - -
class TocEntryTemplate(Element):
-    """ODF "text:table-of-content-entry-template"
-
-    Arguments:
-
-        style -- str
-    """
-
-    _tag = "text:table-of-content-entry-template"
-    _properties = (PropDef("style", "text:style-name"),)
-
-    def __init__(
-        self,
-        style: str | None = None,
-        outline_level: int | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style:
-                self.style = style
-            if outline_level:
-                self.outline_level = outline_level
-
-    @property
-    def outline_level(self) -> int | None:
-        return self.get_attribute_integer("text:outline-level")
-
-    @outline_level.setter
-    def outline_level(self, level: int) -> None:
-        self.set_attribute("text:outline-level", str(level))
-
-    def complete_defaults(self) -> None:
-        self.append(Element.from_tag("text:index-entry-chapter"))
-        self.append(Element.from_tag("text:index-entry-text"))
-        self.append(Element.from_tag("text:index-entry-text"))
-        ts = Element.from_tag("text:index-entry-text")
-        ts.set_style_attribute("style:type", "right")
-        ts.set_style_attribute("style:leader-char", ".")
-        self.append(ts)
-        self.append(Element.from_tag("text:index-entry-page-number"))
-
-

Ancestors

- -

Instance variables

-
-
var outline_level : int | None
-
-
-
- -Expand source code - -
@property
-def outline_level(self) -> int | None:
-    return self.get_attribute_integer("text:outline-level")
-
-
-
var style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def complete_defaults(self) ‑> None -
-
-
-
- -Expand source code - -
def complete_defaults(self) -> None:
-    self.append(Element.from_tag("text:index-entry-chapter"))
-    self.append(Element.from_tag("text:index-entry-text"))
-    self.append(Element.from_tag("text:index-entry-text"))
-    ts = Element.from_tag("text:index-entry-text")
-    ts.set_style_attribute("style:type", "right")
-    ts.set_style_attribute("style:leader-char", ".")
-    self.append(ts)
-    self.append(Element.from_tag("text:index-entry-page-number"))
-
-
-
-

Inherited members

- -
-
-class TrackedChanges -(**kwargs: Any) -
-
-

The TrackedChanges "text:tracked-changes" element acts as a container -for TextChangedRegion elements that represent changes in a certain -scope of an OpenDocument document. This scope is the element in which -the TrackedChanges element occurs. Changes in this scope shall be -tracked by TextChangedRegion elements contained in the -TrackedChanges element in this scope. If a TrackedChanges -element is absent, there are no tracked changes in the corresponding -scope. In this case, all change mark elements in this scope shall be -ignored.

-
- -Expand source code - -
class TrackedChanges(Element):
-    """The TrackedChanges "text:tracked-changes" element acts as a container
-    for TextChangedRegion elements that represent changes in a certain
-    scope of an OpenDocument document. This scope is the element in which
-    the TrackedChanges element occurs. Changes in this scope shall be
-    tracked by TextChangedRegion elements contained in the
-    TrackedChanges element in this scope. If a TrackedChanges
-    element is absent, there are no tracked changes in the corresponding
-    scope. In this case, all change mark elements in this scope shall be
-    ignored.
-    """
-
-    _tag = "text:tracked-changes"
-
-    def get_changed_regions(
-        self,
-        creator: str | None = None,
-        date: datetime | None = None,
-        content: str | None = None,
-        role: str | None = None,
-    ) -> list[Element]:
-        changed_regions = self._filtered_elements(
-            "text:changed-region",
-            dc_creator=creator,
-            dc_date=date,
-            content=content,
-        )
-        if role is None:
-            return changed_regions
-        result: list[Element] = []
-        for regien in changed_regions:
-            changed = regien.get_change_element()  # type: ignore
-            if not changed:
-                continue
-            if changed.tag.endswith(role):
-                result.append(regien)
-        return result
-
-    def get_changed_region(
-        self,
-        position: int = 0,
-        text_id: str | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        return self._filtered_element(
-            "text:changed-region",
-            position,
-            text_id=text_id,
-            dc_creator=creator,
-            dc_date=date,
-            content=content,
-        )
-
-

Ancestors

- -

Methods

-
-
-def get_changed_region(self, position: int = 0, text_id: str | None = None, creator: str | None = None, date: datetime | None = None, content: str | None = None) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_changed_region(
-    self,
-    position: int = 0,
-    text_id: str | None = None,
-    creator: str | None = None,
-    date: datetime | None = None,
-    content: str | None = None,
-) -> Element | None:
-    return self._filtered_element(
-        "text:changed-region",
-        position,
-        text_id=text_id,
-        dc_creator=creator,
-        dc_date=date,
-        content=content,
-    )
-
-
-
-def get_changed_regions(self, creator: str | None = None, date: datetime | None = None, content: str | None = None, role: str | None = None) ‑> odfdo.list[Element] -
-
-
-
- -Expand source code - -
def get_changed_regions(
-    self,
-    creator: str | None = None,
-    date: datetime | None = None,
-    content: str | None = None,
-    role: str | None = None,
-) -> list[Element]:
-    changed_regions = self._filtered_elements(
-        "text:changed-region",
-        dc_creator=creator,
-        dc_date=date,
-        content=content,
-    )
-    if role is None:
-        return changed_regions
-    result: list[Element] = []
-    for regien in changed_regions:
-        changed = regien.get_change_element()  # type: ignore
-        if not changed:
-            continue
-        if changed.tag.endswith(role):
-            result.append(regien)
-    return result
-
-
-
-

Inherited members

- -
-
-class UserDefined -(name: str = '', value: Any = None, value_type: str | None = None, text: str | None = None, style: str | None = None, from_document: Document | None = None, **kwargs: Any) -
-
-

Return a user defined field "text:user-defined". If the current -document is provided, try to extract the content of the meta user defined -field of same name.

-

Arguments

-

name – str, name of the user defined field

-

value – python typed value, value of the field

-

value_type – str, office:value-type known type

-

text – str

-

style – str

-

from_document – ODF document

-
- -Expand source code - -
class UserDefined(ElementTyped):
-    """Return a user defined field "text:user-defined". If the current
-    document is provided, try to extract the content of the meta user defined
-    field of same name.
-
-    Arguments:
-
-        name -- str, name of the user defined field
-
-        value -- python typed value, value of the field
-
-        value_type -- str, office:value-type known type
-
-        text -- str
-
-        style -- str
-
-        from_document -- ODF document
-    """
-
-    _tag = "text:user-defined"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        name: str = "",
-        value: Any = None,
-        value_type: str | None = None,
-        text: str | None = None,
-        style: str | None = None,
-        from_document: Document | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if style:
-                self.style = style
-            if from_document is not None:
-                meta_infos = from_document.meta
-                content = meta_infos.get_user_defined_metadata_of_name(name)
-                if content is not None:
-                    value = content.get("value", None)
-                    value_type = content.get("value_type", None)
-                    text = content.get("text", None)
-            text = self.set_value_and_type(
-                value=value, value_type=value_type, text=text
-            )
-            self.text = text  # type: ignore
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class UserFieldDecl -(name: str | None = None, value: Any = None, value_type: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class UserFieldDecl(ElementTyped):
-    _tag = "text:user-field-decl"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value: Any = None,
-        value_type: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            self.set_value_and_type(value=value, value_type=value_type)
-
-    def set_value(self, value: Any) -> None:
-        name = self.get_attribute("text:name")
-        self.clear()
-        self.set_value_and_type(value=value)
-        self.set_attribute("text:name", name)
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def set_value(self, value: Any) ‑> None -
-
-
-
- -Expand source code - -
def set_value(self, value: Any) -> None:
-    name = self.get_attribute("text:name")
-    self.clear()
-    self.set_value_and_type(value=value)
-    self.set_attribute("text:name", name)
-
-
-
-

Inherited members

- -
-
-class UserFieldDecls -(**kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class UserFieldDecls(Element):
-    _tag = "text:user-field-decls"
-
-

Ancestors

- -

Inherited members

- -
-
-class UserFieldGet -(name: str | None = None, value: Any = None, value_type: str | None = None, text: str | None = None, style: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class UserFieldGet(ElementTyped):
-    _tag = "text:user-field-get"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value: Any = None,
-        value_type: str | None = None,
-        text: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            text = self.set_value_and_type(
-                value=value, value_type=value_type, text=text
-            )
-            self.text = text  # type: ignore
-
-            if style:
-                self.style = style
-
-

Ancestors

- -

Subclasses

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class UserFieldInput -(name: str | None = None, value: Any = None, value_type: str | None = None, text: str | None = None, style: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class UserFieldInput(UserFieldGet):
-    _tag = "text:user-field-input"
-
-

Ancestors

- -

Inherited members

- -
-
-class VarChapter -(display: str | None = 'name', outline_level: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-

display can be: 'number', 'name', 'number-and-name', 'plain-number' or -'plain-number-and-name'

-
- -Expand source code - -
class VarChapter(Element):
-    _tag = "text:chapter"
-    _properties = (
-        PropDef("display", "text:display"),
-        PropDef("outline_level", "text:outline-level"),
-    )
-    DISPLAY_VALUE_CHOICE = {  # noqa: RUF012
-        "number",
-        "name",
-        "number-and-name",
-        "plain-number",
-        "plain-number-and-name",
-    }
-
-    def __init__(
-        self,
-        display: str | None = "name",
-        outline_level: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """display can be: 'number', 'name', 'number-and-name', 'plain-number' or
-        'plain-number-and-name'
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if display not in VarChapter.DISPLAY_VALUE_CHOICE:
-                raise ValueError("unknown display value: %s" % display)
-            self.display = display
-            if outline_level is not None:
-                self.outline_level = outline_level
-
-

Ancestors

- -

Class variables

-
-
var DISPLAY_VALUE_CHOICE
-
-
-
-
-

Instance variables

-
-
var display : str | bool | None
-
-

Get/set the attribute text:display

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var outline_level : str | bool | None
-
-

Get/set the attribute text:outline-level

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarCreationDate -(fixed: bool = False, data_style: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarCreationDate(Element):
-    _tag = "text:creation-date"
-    _properties = (
-        PropDef("fixed", "text:fixed"),
-        PropDef("data_style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        fixed: bool = False,
-        data_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if fixed:
-                self.fixed = True
-            if data_style:
-                self.data_style = data_style
-
-

Ancestors

- -

Instance variables

-
-
var data_style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var fixed : str | bool | None
-
-

Get/set the attribute text:fixed

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarCreationTime -(fixed: bool = False, data_style: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarCreationTime(Element):
-    _tag = "text:creation-time"
-    _properties = (
-        PropDef("fixed", "text:fixed"),
-        PropDef("data_style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        fixed: bool = False,
-        data_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if fixed:
-                self.fixed = True
-            if data_style:
-                self.data_style = data_style
-
-

Ancestors

- -

Instance variables

-
-
var data_style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var fixed : str | bool | None
-
-

Get/set the attribute text:fixed

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarDate -(date: datetime | None = None, fixed: bool = False, data_style: str | None = None, text: str | None = None, date_adjust: timedelta | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarDate(Element):
-    _tag = "text:date"
-    _properties = (
-        PropDef("date", "text:date-value"),
-        PropDef("fixed", "text:fixed"),
-        PropDef("data_style", "style:data-style-name"),
-        PropDef("date_adjust", "text:date-adjust"),
-    )
-
-    def __init__(
-        self,
-        date: datetime | None = None,
-        fixed: bool = False,
-        data_style: str | None = None,
-        text: str | None = None,
-        date_adjust: timedelta | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if date:
-                self.date = DateTime.encode(date)
-            if fixed:
-                self.fixed = True
-            if data_style is not None:
-                self.data_style = data_style
-            if text is None and date is not None:
-                text = Date.encode(date)
-            self.text = text  # type: ignore
-            if date_adjust is not None:
-                self.date_adjust = Duration.encode(date_adjust)
-
-

Ancestors

- -

Instance variables

-
-
var data_style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var date : str | bool | None
-
-

Get/set the attribute text:date-value

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var date_adjust : str | bool | None
-
-

Get/set the attribute text:date-adjust

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var fixed : str | bool | None
-
-

Get/set the attribute text:fixed

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarDecl -(name: str | None = None, value_type: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarDecl(Element):
-    _tag = "text:variable-decl"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("value_type", "office:value-type"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value_type: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if value_type:
-                self.value_type = value_type
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var value_type : str | bool | None
-
-

Get/set the attribute office:value-type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarDecls -(**kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarDecls(Element):
-    _tag = "text:variable-decls"
-
-

Ancestors

- -

Inherited members

- -
-
-class VarDescription -(fixed: bool = False, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarDescription(VarInitialCreator):
-    _tag = "text:description"
-
-

Ancestors

- -

Inherited members

- -
-
-class VarFileName -(display: str | None = 'full', fixed: bool = False, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-

display can be: 'full', 'path', 'name' or 'name-and-extension'

-
- -Expand source code - -
class VarFileName(Element):
-    _tag = "text:file-name"
-    _properties = (
-        PropDef("display", "text:display"),
-        PropDef("fixed", "text:fixed"),
-    )
-    DISPLAY_VALUE_CHOICE = {  # noqa: RUF012
-        "full",
-        "path",
-        "name",
-        "name-and-extension",
-    }
-
-    def __init__(
-        self,
-        display: str | None = "full",
-        fixed: bool = False,
-        **kwargs: Any,
-    ) -> None:
-        """display can be: 'full', 'path', 'name' or 'name-and-extension'"""
-        super().__init__(**kwargs)
-        if self._do_init:
-            if display not in VarFileName.DISPLAY_VALUE_CHOICE:
-                raise ValueError("unknown display value: %s" % display)
-            self.display = display
-            if fixed:
-                self.fixed = True
-
-

Ancestors

- -

Class variables

-
-
var DISPLAY_VALUE_CHOICE
-
-
-
-
-

Instance variables

-
-
var display : str | bool | None
-
-

Get/set the attribute text:display

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var fixed : str | bool | None
-
-

Get/set the attribute text:fixed

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarGet -(name: str | None = None, value: Any = None, value_type: str | None = None, text: str | None = None, style: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarGet(ElementTyped):
-    _tag = "text:variable-get"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value: Any = None,
-        value_type: str | None = None,
-        text: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if style:
-                self.style = style
-            text = self.set_value_and_type(
-                value=value, value_type=value_type, text=text
-            )
-            self.text = text  # type: ignore
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarInitialCreator -(fixed: bool = False, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarInitialCreator(Element):
-    _tag = "text:initial-creator"
-    _properties = (PropDef("fixed", "text:fixed"),)
-
-    def __init__(self, fixed: bool = False, **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init and fixed:
-            self.fixed = True
-
-

Ancestors

- -

Subclasses

- -

Instance variables

-
-
var fixed : str | bool | None
-
-

Get/set the attribute text:fixed

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarKeywords -(fixed: bool = False, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarKeywords(VarInitialCreator):
-    _tag = "text:keywords"
-
-

Ancestors

- -

Inherited members

- -
-
-class VarPageCount -(**kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarPageCount(Element):
-    _tag = "text:page-count"
-
-

Ancestors

- -

Inherited members

- -
-
-class VarPageNumber -(select_page: str | None = None, page_adjust: str | None = None, **kwargs: Any) -
-
-

select_page – string in ('previous', 'current', 'next')

-

page_adjust – int (to add or subtract to the page number)

-
- -Expand source code - -
class VarPageNumber(Element):
-    """
-    select_page -- string in ('previous', 'current', 'next')
-
-    page_adjust -- int (to add or subtract to the page number)
-    """
-
-    _tag = "text:page-number"
-    _properties = (
-        PropDef("select_page", "text:select-page"),
-        PropDef("page_adjust", "text:page-adjust"),
-    )
-
-    def __init__(
-        self,
-        select_page: str | None = None,
-        page_adjust: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if select_page is None:
-                select_page = "current"
-            self.select_page = select_page
-            if page_adjust is not None:
-                self.page_adjust = page_adjust
-
-

Ancestors

- -

Instance variables

-
-
var page_adjust : str | bool | None
-
-

Get/set the attribute text:page-adjust

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var select_page : str | bool | None
-
-

Get/set the attribute text:select-page

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarSet -(name: str | None = None, value: Any = None, value_type: str | None = None, display: str | bool = False, text: str | None = None, style: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarSet(ElementTyped):
-    _tag = "text:variable-set"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "style:data-style-name"),
-        PropDef("display", "text:display"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value: Any = None,
-        value_type: str | None = None,
-        display: str | bool = False,
-        text: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if style:
-                self.style = style
-            text = self.set_value_and_type(
-                value=value, value_type=value_type, text=text
-            )
-            if not display:
-                self.display = "none"
-            else:
-                self.text = text  # type: ignore
-
-    def set_value(self, value: Any) -> None:
-        name = self.get_attribute("text:name")
-        display = self.get_attribute("text:display")
-        self.clear()
-        text = self.set_value_and_type(value=value)
-        self.set_attribute("text:name", name)
-        if display is not None:
-            self.set_attribute("text:display", display)
-        if isinstance(text, str):
-            self.text = text
-
-

Ancestors

- -

Instance variables

-
-
var display : str | bool | None
-
-

Get/set the attribute text:display

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def set_value(self, value: Any) ‑> None -
-
-
-
- -Expand source code - -
def set_value(self, value: Any) -> None:
-    name = self.get_attribute("text:name")
-    display = self.get_attribute("text:display")
-    self.clear()
-    text = self.set_value_and_type(value=value)
-    self.set_attribute("text:name", name)
-    if display is not None:
-        self.set_attribute("text:display", display)
-    if isinstance(text, str):
-        self.text = text
-
-
-
-

Inherited members

- -
-
-class VarSubject -(fixed: bool = False, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarSubject(VarInitialCreator):
-    _tag = "text:subject"
-
-

Ancestors

- -

Inherited members

- -
-
-class VarTime -(time: datetime, fixed: bool = False, data_style: str | None = None, text: str | None = None, time_adjust: timedelta | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarTime(Element):
-    _tag = "text:time"
-    _properties = (
-        PropDef("time", "text:time-value"),
-        PropDef("fixed", "text:fixed"),
-        PropDef("data_style", "style:data-style-name"),
-        PropDef("time_adjust", "text:time-adjust"),
-    )
-
-    def __init__(
-        self,
-        time: datetime,
-        fixed: bool = False,
-        data_style: str | None = None,
-        text: str | None = None,
-        time_adjust: timedelta | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.time = DateTime.encode(time)
-            if fixed:
-                self.fixed = True
-            if data_style is not None:
-                self.data_style = data_style
-            if text is None:
-                text = time.strftime("%H:%M:%S")
-            self.text = text
-            if time_adjust is not None:
-                self.date_adjust = Duration.encode(time_adjust)
-
-

Ancestors

- -

Instance variables

-
-
var data_style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var fixed : str | bool | None
-
-

Get/set the attribute text:fixed

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var time : str | bool | None
-
-

Get/set the attribute text:time-value

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var time_adjust : str | bool | None
-
-

Get/set the attribute text:time-adjust

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarTitle -(fixed: bool = False, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarTitle(VarInitialCreator):
-    _tag = "text:title"
-
-

Ancestors

- -

Inherited members

- -
-
-class XmlPart -(part_name: str, container: Container) -
-
-

Representation of an XML part.

-

Abstraction of the XML library behind.

-
- -Expand source code - -
class XmlPart:
-    """Representation of an XML part.
-
-    Abstraction of the XML library behind.
-    """
-
-    def __init__(self, part_name: str, container: Container) -> None:
-        self.part_name = part_name
-        self.container = container
-
-        # Internal state
-        self.__tree: _ElementTree | None = None
-        self.__root: Element | None = None
-
-    def _get_tree(self) -> _ElementTree:
-        if self.__tree is None:
-            part = self.container.get_part(self.part_name)
-            self.__tree = parse(BytesIO(part))  # type: ignore
-        return self.__tree
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} part_name={self.part_name}>"
-
-    # Public API
-
-    @property
-    def root(self) -> Element:
-        if self.__root is None:
-            tree = self._get_tree()
-            self.__root = Element.from_tag(tree.getroot())
-        return self.__root
-
-    def get_elements(self, xpath_query: str) -> list[Element | Text]:
-        root = self.root
-        return root.xpath(xpath_query)
-
-    def get_element(self, xpath_query: str) -> Any:
-        result = self.get_elements(xpath_query)
-        if not result:
-            return None
-        return result[0]
-
-    def delete_element(self, child: Element) -> None:
-        child.delete()
-
-    def xpath(self, xpath_query: str) -> list[Element | Text]:
-        """Apply XPath query to the XML part. Return list of Element or
-        Text instances translated from the nodes found.
-        """
-        root = self.root
-        return root.xpath(xpath_query)
-
-    @property
-    def clone(self) -> XmlPart:
-        clone = object.__new__(self.__class__)
-        for name in self.__dict__:
-            if name == "container":
-                setattr(clone, name, self.container.clone)
-            elif name in ("_XmlPart__tree",):
-                setattr(clone, name, None)
-            else:
-                value = getattr(self, name)
-                value = deepcopy(value)
-                setattr(clone, name, value)
-        return clone
-
-    def serialize(self, pretty: bool = False) -> bytes:
-        tree = self._get_tree()
-        # Lxml declaration is too exotic to me
-        data = [b'<?xml version="1.0" encoding="UTF-8"?>']
-        bytes_tree = tostring(tree, pretty_print=pretty, encoding="utf-8")
-        # Lxml with pretty_print is adding a empty line
-        if pretty:
-            bytes_tree = bytes_tree.strip()
-        data.append(bytes_tree)
-        return b"\n".join(data)
-
-

Subclasses

- -

Instance variables

-
-
var cloneXmlPart
-
-
-
- -Expand source code - -
@property
-def clone(self) -> XmlPart:
-    clone = object.__new__(self.__class__)
-    for name in self.__dict__:
-        if name == "container":
-            setattr(clone, name, self.container.clone)
-        elif name in ("_XmlPart__tree",):
-            setattr(clone, name, None)
-        else:
-            value = getattr(self, name)
-            value = deepcopy(value)
-            setattr(clone, name, value)
-    return clone
-
-
-
var rootElement
-
-
-
- -Expand source code - -
@property
-def root(self) -> Element:
-    if self.__root is None:
-        tree = self._get_tree()
-        self.__root = Element.from_tag(tree.getroot())
-    return self.__root
-
-
-
-

Methods

-
-
-def delete_element(self, child: Element) ‑> None -
-
-
-
- -Expand source code - -
def delete_element(self, child: Element) -> None:
-    child.delete()
-
-
-
-def get_element(self, xpath_query: str) ‑> Any -
-
-
-
- -Expand source code - -
def get_element(self, xpath_query: str) -> Any:
-    result = self.get_elements(xpath_query)
-    if not result:
-        return None
-    return result[0]
-
-
-
-def get_elements(self, xpath_query: str) ‑> odfdo.list[Element | Text] -
-
-
-
- -Expand source code - -
def get_elements(self, xpath_query: str) -> list[Element | Text]:
-    root = self.root
-    return root.xpath(xpath_query)
-
-
-
-def serialize(self, pretty: bool = False) ‑> bytes -
-
-
-
- -Expand source code - -
def serialize(self, pretty: bool = False) -> bytes:
-    tree = self._get_tree()
-    # Lxml declaration is too exotic to me
-    data = [b'<?xml version="1.0" encoding="UTF-8"?>']
-    bytes_tree = tostring(tree, pretty_print=pretty, encoding="utf-8")
-    # Lxml with pretty_print is adding a empty line
-    if pretty:
-        bytes_tree = bytes_tree.strip()
-    data.append(bytes_tree)
-    return b"\n".join(data)
-
-
-
-def xpath(self, xpath_query: str) ‑> odfdo.list[Element | Text] -
-
-

Apply XPath query to the XML part. Return list of Element or -Text instances translated from the nodes found.

-
- -Expand source code - -
def xpath(self, xpath_query: str) -> list[Element | Text]:
-    """Apply XPath query to the XML part. Return list of Element or
-    Text instances translated from the nodes found.
-    """
-    root = self.root
-    return root.xpath(xpath_query)
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file + diff --git a/doc/link.html b/doc/link.html deleted file mode 100644 index 9846738..0000000 --- a/doc/link.html +++ /dev/null @@ -1,530 +0,0 @@ - - - - - - -odfdo.link API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.link

-
-
-

Link class for "text:a".

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Link class for "text:a".
-"""
-from __future__ import annotations
-
-from typing import Any
-
-from .element import PropDef, register_element_class
-from .paragraph_base import ParagraphBase
-
-
-class Link(ParagraphBase):
-    """Link class, "text:a" ODF element."""
-
-    _tag = "text:a"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("url", "xlink:href"),
-        PropDef("name", "office:name"),
-        PropDef("title", "office:title"),
-        PropDef("target_frame", "office:target-frame-name"),
-        PropDef("show", "xlink:show"),
-        PropDef("visited_style", "text:visited-style-name"),
-        PropDef("style", "text:style-name"),
-    )
-
-    def __init__(
-        self,
-        url: str | None = "",
-        name: str | None = None,
-        title: str | None = None,
-        text: str | None = None,
-        target_frame: str | None = None,
-        style: str | None = None,
-        visited_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """
-        Arguments:
-
-            url -- str
-
-            name -- str
-
-            title -- str
-
-            text -- str
-
-            target_frame -- '_self', '_blank', '_parent', '_top'
-
-            style -- str
-
-            visited_style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.url = url
-            if name is not None:
-                self.name = name
-            if title is not None:
-                self.title = title
-            if text is not None:
-                self.text = text
-            if target_frame is not None:
-                self.target_frame = target_frame
-                # show can be: 'new' or 'replace'"
-                if target_frame == "_blank":
-                    self.show = "new"
-                else:
-                    self.show = "replace"
-            if style is not None:
-                self.style = style
-            if visited_style is not None:
-                self.visited_style = visited_style
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} tag={self.tag} link={self.url}>"
-
-    def __str__(self) -> str:
-        if self.name:
-            return f"[{self.name}]({self.url})"
-        return f"({self.url})"
-
-
-Link._define_attribut_property()
-
-register_element_class(Link)
-
-
-
-
-
-
-
-
-
-

Classes

-
- -
-

Link class, "text:a" ODF element.

-

Arguments

-

url – str

-

name – str

-

title – str

-

text – str

-

target_frame – '_self', '_blank', '_parent', '_top'

-

style – str

-

visited_style – str

-
- -Expand source code - -
class Link(ParagraphBase):
-    """Link class, "text:a" ODF element."""
-
-    _tag = "text:a"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("url", "xlink:href"),
-        PropDef("name", "office:name"),
-        PropDef("title", "office:title"),
-        PropDef("target_frame", "office:target-frame-name"),
-        PropDef("show", "xlink:show"),
-        PropDef("visited_style", "text:visited-style-name"),
-        PropDef("style", "text:style-name"),
-    )
-
-    def __init__(
-        self,
-        url: str | None = "",
-        name: str | None = None,
-        title: str | None = None,
-        text: str | None = None,
-        target_frame: str | None = None,
-        style: str | None = None,
-        visited_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """
-        Arguments:
-
-            url -- str
-
-            name -- str
-
-            title -- str
-
-            text -- str
-
-            target_frame -- '_self', '_blank', '_parent', '_top'
-
-            style -- str
-
-            visited_style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.url = url
-            if name is not None:
-                self.name = name
-            if title is not None:
-                self.title = title
-            if text is not None:
-                self.text = text
-            if target_frame is not None:
-                self.target_frame = target_frame
-                # show can be: 'new' or 'replace'"
-                if target_frame == "_blank":
-                    self.show = "new"
-                else:
-                    self.show = "replace"
-            if style is not None:
-                self.style = style
-            if visited_style is not None:
-                self.visited_style = visited_style
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} tag={self.tag} link={self.url}>"
-
-    def __str__(self) -> str:
-        if self.name:
-            return f"[{self.name}]({self.url})"
-        return f"({self.url})"
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute office:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var show : str | bool | None
-
-

Get/set the attribute xlink:show

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var target_frame : str | bool | None
-
-

Get/set the attribute office:target-frame-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var title : str | bool | None
-
-

Get/set the attribute office:title

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var url : str | bool | None
-
-

Get/set the attribute xlink:href

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var visited_style : str | bool | None
-
-

Get/set the attribute text:visited-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/list.html b/doc/list.html deleted file mode 100644 index a5819e6..0000000 --- a/doc/list.html +++ /dev/null @@ -1,928 +0,0 @@ - - - - - - -odfdo.list API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.list

-
-
-

List class for "text:list".

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-"""List class for "text:list".
-"""
-from __future__ import annotations
-
-from collections.abc import Iterable
-from typing import Any
-
-from .element import (
-    FIRST_CHILD,
-    NEXT_SIBLING,
-    PREV_SIBLING,
-    Element,
-    PropDef,
-    register_element_class,
-)
-from .paragraph import Paragraph
-
-
-class ListItem(Element):
-    """ODF element "text:list-item", item of a List."""
-
-    _tag = "text:list-item"
-
-    def __init__(
-        self,
-        text_or_element: str | Element | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a list item element, optionaly passing at creation time a
-        string or Element as content.
-
-        Arguments:
-
-            text_or_element -- str or ODF Element
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if isinstance(text_or_element, str):
-                self.text_content = text_or_element
-            elif isinstance(text_or_element, Element):
-                self.append(text_or_element)
-            elif text_or_element is not None:
-                raise TypeError("Expected str or Element")
-
-
-class List(Element):
-    """ODF List "text:list"."""
-
-    _tag = "text:list"
-    _properties = (PropDef("style", "text:style-name"),)
-
-    def __init__(
-        self,
-        list_content: str | Element | Iterable[str | Element] | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a list element, optionaly loading the list by a list of
-        item (str or elements).
-
-        The list_content argument is just a shortcut for the most common case.
-        To create more complex lists, first create an empty list, and fill it
-        afterwards.
-
-        Arguments:
-
-            list_content -- str or Element, or a list of str or Element
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if list_content:
-                if isinstance(list_content, (Element, str)):
-                    self.append(ListItem(list_content))
-                elif hasattr(list_content, "__iter__"):
-                    for item in list_content:
-                        self.append(ListItem(item))
-            if style is not None:
-                self.style = style
-
-    def get_items(self, content: str | None = None) -> list[Element]:
-        """Return all the list items that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Element
-        """
-        return self._filtered_elements("text:list-item", content=content)
-
-    def get_item(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the list item that matches the criteria. In nested lists,
-        return the list item that really contains that content.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Element or None if not found
-        """
-        # Custom implementation because of nested lists
-        if content:
-            # Don't search recursively but on the very own paragraph(s) of
-            # each list item
-            for paragraph in self.get_elements("descendant::text:p"):
-                if paragraph.match(content):
-                    return paragraph.get_element("parent::text:list-item")
-            return None
-        return self._filtered_element("text:list-item", position)
-
-    def set_list_header(
-        self,
-        text_or_element: str | Element | Iterable[str | Element],
-    ) -> None:
-        if isinstance(text_or_element, (str, Element)):
-            actual_list: list[str | Element] | tuple = [text_or_element]
-        elif isinstance(text_or_element, (list, tuple)):
-            actual_list = text_or_element
-        else:
-            raise TypeError
-        # Remove existing header
-        for element in self.get_elements("text:p"):
-            self.delete(element)
-        for paragraph in reversed(actual_list):
-            if isinstance(paragraph, str):
-                paragraph = Paragraph(paragraph)
-            self.insert(paragraph, FIRST_CHILD)
-
-    def insert_item(
-        self,
-        item: ListItem | str | Element | None,
-        position: int | None = None,
-        before: Element | None = None,
-        after: Element | None = None,
-    ) -> None:
-        if not isinstance(item, ListItem):
-            item = ListItem(item)
-        if before is not None:
-            before.insert(item, xmlposition=PREV_SIBLING)
-        elif after is not None:
-            after.insert(item, xmlposition=NEXT_SIBLING)
-        elif position is not None:
-            self.insert(item, position=position)
-        else:
-            raise ValueError("Position must be defined")
-
-    def append_item(
-        self,
-        item: ListItem | str | Element | None,
-    ) -> None:
-        if not isinstance(item, ListItem):
-            item = ListItem(item)
-        self.append(item)
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        if context is None:
-            context = {}
-        rst_mode = context["rst_mode"]
-        result = []
-        if rst_mode:
-            result.append("\n")
-        for list_item in self.get_elements("text:list-item"):
-            textbuf = []
-            for child in list_item.children:
-                text = child.get_formatted_text(context)
-                tag = child.tag
-                if tag == "text:h":
-                    # A title in a list is a bug
-                    return text
-                if tag == "text:list" and not text.lstrip().startswith("-"):
-                    # If the list didn't indent, don't either
-                    # (inner title)
-                    return text
-                textbuf.append(text)
-            text_sum = "".join(textbuf)
-            text_sum = text_sum.strip("\n")
-            # Indent the text
-            text_sum = text_sum.replace("\n", "\n  ")
-            text_sum = f"- {text_sum}\n"
-            result.append(text_sum)
-        if rst_mode:
-            result.append("\n")
-        return "".join(result)
-
-
-List._define_attribut_property()
-
-register_element_class(ListItem)
-register_element_class(List)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class List -(list_content: str | Element | Iterable[str | Element] | None = None, style: str | None = None, **kwargs: Any) -
-
-

ODF List "text:list".

-

Create a list element, optionaly loading the list by a list of -item (str or elements).

-

The list_content argument is just a shortcut for the most common case. -To create more complex lists, first create an empty list, and fill it -afterwards.

-

Arguments

-

list_content – str or Element, or a list of str or Element

-

style – str

-
- -Expand source code - -
class List(Element):
-    """ODF List "text:list"."""
-
-    _tag = "text:list"
-    _properties = (PropDef("style", "text:style-name"),)
-
-    def __init__(
-        self,
-        list_content: str | Element | Iterable[str | Element] | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a list element, optionaly loading the list by a list of
-        item (str or elements).
-
-        The list_content argument is just a shortcut for the most common case.
-        To create more complex lists, first create an empty list, and fill it
-        afterwards.
-
-        Arguments:
-
-            list_content -- str or Element, or a list of str or Element
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if list_content:
-                if isinstance(list_content, (Element, str)):
-                    self.append(ListItem(list_content))
-                elif hasattr(list_content, "__iter__"):
-                    for item in list_content:
-                        self.append(ListItem(item))
-            if style is not None:
-                self.style = style
-
-    def get_items(self, content: str | None = None) -> list[Element]:
-        """Return all the list items that match the criteria.
-
-        Arguments:
-
-            style -- str
-
-            content -- str regex
-
-        Return: list of Element
-        """
-        return self._filtered_elements("text:list-item", content=content)
-
-    def get_item(
-        self,
-        position: int = 0,
-        content: str | None = None,
-    ) -> Element | None:
-        """Return the list item that matches the criteria. In nested lists,
-        return the list item that really contains that content.
-
-        Arguments:
-
-            position -- int
-
-            content -- str regex
-
-        Return: Element or None if not found
-        """
-        # Custom implementation because of nested lists
-        if content:
-            # Don't search recursively but on the very own paragraph(s) of
-            # each list item
-            for paragraph in self.get_elements("descendant::text:p"):
-                if paragraph.match(content):
-                    return paragraph.get_element("parent::text:list-item")
-            return None
-        return self._filtered_element("text:list-item", position)
-
-    def set_list_header(
-        self,
-        text_or_element: str | Element | Iterable[str | Element],
-    ) -> None:
-        if isinstance(text_or_element, (str, Element)):
-            actual_list: list[str | Element] | tuple = [text_or_element]
-        elif isinstance(text_or_element, (list, tuple)):
-            actual_list = text_or_element
-        else:
-            raise TypeError
-        # Remove existing header
-        for element in self.get_elements("text:p"):
-            self.delete(element)
-        for paragraph in reversed(actual_list):
-            if isinstance(paragraph, str):
-                paragraph = Paragraph(paragraph)
-            self.insert(paragraph, FIRST_CHILD)
-
-    def insert_item(
-        self,
-        item: ListItem | str | Element | None,
-        position: int | None = None,
-        before: Element | None = None,
-        after: Element | None = None,
-    ) -> None:
-        if not isinstance(item, ListItem):
-            item = ListItem(item)
-        if before is not None:
-            before.insert(item, xmlposition=PREV_SIBLING)
-        elif after is not None:
-            after.insert(item, xmlposition=NEXT_SIBLING)
-        elif position is not None:
-            self.insert(item, position=position)
-        else:
-            raise ValueError("Position must be defined")
-
-    def append_item(
-        self,
-        item: ListItem | str | Element | None,
-    ) -> None:
-        if not isinstance(item, ListItem):
-            item = ListItem(item)
-        self.append(item)
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        if context is None:
-            context = {}
-        rst_mode = context["rst_mode"]
-        result = []
-        if rst_mode:
-            result.append("\n")
-        for list_item in self.get_elements("text:list-item"):
-            textbuf = []
-            for child in list_item.children:
-                text = child.get_formatted_text(context)
-                tag = child.tag
-                if tag == "text:h":
-                    # A title in a list is a bug
-                    return text
-                if tag == "text:list" and not text.lstrip().startswith("-"):
-                    # If the list didn't indent, don't either
-                    # (inner title)
-                    return text
-                textbuf.append(text)
-            text_sum = "".join(textbuf)
-            text_sum = text_sum.strip("\n")
-            # Indent the text
-            text_sum = text_sum.replace("\n", "\n  ")
-            text_sum = f"- {text_sum}\n"
-            result.append(text_sum)
-        if rst_mode:
-            result.append("\n")
-        return "".join(result)
-
-

Ancestors

- -

Instance variables

-
-
var style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def append_item(self, item: ListItem | str | Element | None) ‑> None -
-
-
-
- -Expand source code - -
def append_item(
-    self,
-    item: ListItem | str | Element | None,
-) -> None:
-    if not isinstance(item, ListItem):
-        item = ListItem(item)
-    self.append(item)
-
-
-
-def get_item(self, position: int = 0, content: str | None = None) ‑> Element | None -
-
-

Return the list item that matches the criteria. In nested lists, -return the list item that really contains that content.

-

Arguments

-

position – int

-

content – str regex

-

Return: Element or None if not found

-
- -Expand source code - -
def get_item(
-    self,
-    position: int = 0,
-    content: str | None = None,
-) -> Element | None:
-    """Return the list item that matches the criteria. In nested lists,
-    return the list item that really contains that content.
-
-    Arguments:
-
-        position -- int
-
-        content -- str regex
-
-    Return: Element or None if not found
-    """
-    # Custom implementation because of nested lists
-    if content:
-        # Don't search recursively but on the very own paragraph(s) of
-        # each list item
-        for paragraph in self.get_elements("descendant::text:p"):
-            if paragraph.match(content):
-                return paragraph.get_element("parent::text:list-item")
-        return None
-    return self._filtered_element("text:list-item", position)
-
-
-
-def get_items(self, content: str | None = None) ‑> list[Element] -
-
-

Return all the list items that match the criteria.

-

Arguments

-

style – str

-

content – str regex

-

Return: list of Element

-
- -Expand source code - -
def get_items(self, content: str | None = None) -> list[Element]:
-    """Return all the list items that match the criteria.
-
-    Arguments:
-
-        style -- str
-
-        content -- str regex
-
-    Return: list of Element
-    """
-    return self._filtered_elements("text:list-item", content=content)
-
-
-
-def insert_item(self, item: ListItem | str | Element | None, position: int | None = None, before: Element | None = None, after: Element | None = None) ‑> None -
-
-
-
- -Expand source code - -
def insert_item(
-    self,
-    item: ListItem | str | Element | None,
-    position: int | None = None,
-    before: Element | None = None,
-    after: Element | None = None,
-) -> None:
-    if not isinstance(item, ListItem):
-        item = ListItem(item)
-    if before is not None:
-        before.insert(item, xmlposition=PREV_SIBLING)
-    elif after is not None:
-        after.insert(item, xmlposition=NEXT_SIBLING)
-    elif position is not None:
-        self.insert(item, position=position)
-    else:
-        raise ValueError("Position must be defined")
-
-
-
-def set_list_header(self, text_or_element: str | Element | Iterable[str | Element]) ‑> None -
-
-
-
- -Expand source code - -
def set_list_header(
-    self,
-    text_or_element: str | Element | Iterable[str | Element],
-) -> None:
-    if isinstance(text_or_element, (str, Element)):
-        actual_list: list[str | Element] | tuple = [text_or_element]
-    elif isinstance(text_or_element, (list, tuple)):
-        actual_list = text_or_element
-    else:
-        raise TypeError
-    # Remove existing header
-    for element in self.get_elements("text:p"):
-        self.delete(element)
-    for paragraph in reversed(actual_list):
-        if isinstance(paragraph, str):
-            paragraph = Paragraph(paragraph)
-        self.insert(paragraph, FIRST_CHILD)
-
-
-
-

Inherited members

- -
-
-class ListItem -(text_or_element: str | Element | None = None, **kwargs: Any) -
-
-

ODF element "text:list-item", item of a List.

-

Create a list item element, optionaly passing at creation time a -string or Element as content.

-

Arguments

-

text_or_element – str or ODF Element

-
- -Expand source code - -
class ListItem(Element):
-    """ODF element "text:list-item", item of a List."""
-
-    _tag = "text:list-item"
-
-    def __init__(
-        self,
-        text_or_element: str | Element | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a list item element, optionaly passing at creation time a
-        string or Element as content.
-
-        Arguments:
-
-            text_or_element -- str or ODF Element
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if isinstance(text_or_element, str):
-                self.text_content = text_or_element
-            elif isinstance(text_or_element, Element):
-                self.append(text_or_element)
-            elif text_or_element is not None:
-                raise TypeError("Expected str or Element")
-
-

Ancestors

- -

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/manifest.html b/doc/manifest.html deleted file mode 100644 index d158b68..0000000 --- a/doc/manifest.html +++ /dev/null @@ -1,451 +0,0 @@ - - - - - - -odfdo.manifest API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.manifest

-
-
-

Manifest class for manifest.xml part.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-"""Manifest class for manifest.xml part.
-"""
-from __future__ import annotations
-
-from .element import Element, Text
-from .xmlpart import XmlPart
-
-
-class Manifest(XmlPart):
-    def get_paths(self) -> list[Element | Text]:
-        """Return the list of full paths in the manifest.
-
-        Return: list of str
-        """
-        xpath_query = "//manifest:file-entry/attribute::manifest:full-path"
-        return self.xpath(xpath_query)
-
-    def _file_entry(self, full_path: str) -> Element:
-        xpath_query = (
-            f'//manifest:file-entry[attribute::manifest:full-path="{full_path}"]'
-        )
-        result = self.xpath(xpath_query)
-        if not result:
-            raise KeyError(f"Path not found: '{full_path}'")
-        return result[0]  # type: ignore
-
-    def get_path_medias(self) -> list[tuple]:
-        """Return the list of (full_path, media_type) pairs in the manifest.
-
-        Return: list of str tuples
-        """
-        xpath_query = "//manifest:file-entry"
-        result = []
-        for file_entry in self.xpath(xpath_query):
-            if not isinstance(file_entry, Element):
-                continue
-            result.append(
-                (
-                    file_entry.get_attribute_string("manifest:full-path"),
-                    file_entry.get_attribute_string("manifest:media-type"),
-                )
-            )
-        return result
-
-    def get_media_type(self, full_path: str) -> str | None:
-        """Get the media type of an existing path.
-
-        Return: str
-        """
-        xpath_query = (
-            f'//manifest:file-entry[attribute::manifest:full-path="{full_path}"]'
-            "/attribute::manifest:media-type"
-        )
-        result = self.xpath(xpath_query)
-        if not result:
-            return None
-        return str(result[0])
-
-    def set_media_type(self, full_path: str, media_type: str) -> None:
-        """Set the media type of an existing path.
-
-        Arguments:
-
-            full_path -- str
-
-            media_type -- str
-        """
-        file_entry = self._file_entry(full_path)
-        file_entry.set_attribute("manifest:media-type", media_type)
-
-    @staticmethod
-    def make_file_entry(full_path: str, media_type: str) -> Element:
-        tag = (
-            f"<manifest:file-entry "
-            f'manifest:media-type="{media_type}" '
-            f'manifest:full-path="{full_path}"/>'
-        )
-        return Element.from_tag(tag)
-
-    def add_full_path(self, full_path: str, media_type: str = "") -> None:
-        # Existing?
-        existing = self.get_media_type(full_path)
-        if existing is not None:
-            self.set_media_type(full_path, media_type)
-        root = self.root
-        root.append(self.make_file_entry(full_path, media_type))
-
-    def del_full_path(self, full_path: str) -> None:
-        file_entry = self._file_entry(full_path)
-        self.root.delete(file_entry)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class Manifest -(part_name: str, container: Container) -
-
-

Representation of an XML part.

-

Abstraction of the XML library behind.

-
- -Expand source code - -
class Manifest(XmlPart):
-    def get_paths(self) -> list[Element | Text]:
-        """Return the list of full paths in the manifest.
-
-        Return: list of str
-        """
-        xpath_query = "//manifest:file-entry/attribute::manifest:full-path"
-        return self.xpath(xpath_query)
-
-    def _file_entry(self, full_path: str) -> Element:
-        xpath_query = (
-            f'//manifest:file-entry[attribute::manifest:full-path="{full_path}"]'
-        )
-        result = self.xpath(xpath_query)
-        if not result:
-            raise KeyError(f"Path not found: '{full_path}'")
-        return result[0]  # type: ignore
-
-    def get_path_medias(self) -> list[tuple]:
-        """Return the list of (full_path, media_type) pairs in the manifest.
-
-        Return: list of str tuples
-        """
-        xpath_query = "//manifest:file-entry"
-        result = []
-        for file_entry in self.xpath(xpath_query):
-            if not isinstance(file_entry, Element):
-                continue
-            result.append(
-                (
-                    file_entry.get_attribute_string("manifest:full-path"),
-                    file_entry.get_attribute_string("manifest:media-type"),
-                )
-            )
-        return result
-
-    def get_media_type(self, full_path: str) -> str | None:
-        """Get the media type of an existing path.
-
-        Return: str
-        """
-        xpath_query = (
-            f'//manifest:file-entry[attribute::manifest:full-path="{full_path}"]'
-            "/attribute::manifest:media-type"
-        )
-        result = self.xpath(xpath_query)
-        if not result:
-            return None
-        return str(result[0])
-
-    def set_media_type(self, full_path: str, media_type: str) -> None:
-        """Set the media type of an existing path.
-
-        Arguments:
-
-            full_path -- str
-
-            media_type -- str
-        """
-        file_entry = self._file_entry(full_path)
-        file_entry.set_attribute("manifest:media-type", media_type)
-
-    @staticmethod
-    def make_file_entry(full_path: str, media_type: str) -> Element:
-        tag = (
-            f"<manifest:file-entry "
-            f'manifest:media-type="{media_type}" '
-            f'manifest:full-path="{full_path}"/>'
-        )
-        return Element.from_tag(tag)
-
-    def add_full_path(self, full_path: str, media_type: str = "") -> None:
-        # Existing?
-        existing = self.get_media_type(full_path)
-        if existing is not None:
-            self.set_media_type(full_path, media_type)
-        root = self.root
-        root.append(self.make_file_entry(full_path, media_type))
-
-    def del_full_path(self, full_path: str) -> None:
-        file_entry = self._file_entry(full_path)
-        self.root.delete(file_entry)
-
-

Ancestors

- -

Static methods

-
-
-def make_file_entry(full_path: str, media_type: str) ‑> Element -
-
-
-
- -Expand source code - -
@staticmethod
-def make_file_entry(full_path: str, media_type: str) -> Element:
-    tag = (
-        f"<manifest:file-entry "
-        f'manifest:media-type="{media_type}" '
-        f'manifest:full-path="{full_path}"/>'
-    )
-    return Element.from_tag(tag)
-
-
-
-

Methods

-
-
-def add_full_path(self, full_path: str, media_type: str = '') ‑> None -
-
-
-
- -Expand source code - -
def add_full_path(self, full_path: str, media_type: str = "") -> None:
-    # Existing?
-    existing = self.get_media_type(full_path)
-    if existing is not None:
-        self.set_media_type(full_path, media_type)
-    root = self.root
-    root.append(self.make_file_entry(full_path, media_type))
-
-
-
-def del_full_path(self, full_path: str) ‑> None -
-
-
-
- -Expand source code - -
def del_full_path(self, full_path: str) -> None:
-    file_entry = self._file_entry(full_path)
-    self.root.delete(file_entry)
-
-
-
-def get_media_type(self, full_path: str) ‑> str | None -
-
-

Get the media type of an existing path.

-

Return: str

-
- -Expand source code - -
def get_media_type(self, full_path: str) -> str | None:
-    """Get the media type of an existing path.
-
-    Return: str
-    """
-    xpath_query = (
-        f'//manifest:file-entry[attribute::manifest:full-path="{full_path}"]'
-        "/attribute::manifest:media-type"
-    )
-    result = self.xpath(xpath_query)
-    if not result:
-        return None
-    return str(result[0])
-
-
-
-def get_path_medias(self) ‑> list[tuple] -
-
-

Return the list of (full_path, media_type) pairs in the manifest.

-

Return: list of str tuples

-
- -Expand source code - -
def get_path_medias(self) -> list[tuple]:
-    """Return the list of (full_path, media_type) pairs in the manifest.
-
-    Return: list of str tuples
-    """
-    xpath_query = "//manifest:file-entry"
-    result = []
-    for file_entry in self.xpath(xpath_query):
-        if not isinstance(file_entry, Element):
-            continue
-        result.append(
-            (
-                file_entry.get_attribute_string("manifest:full-path"),
-                file_entry.get_attribute_string("manifest:media-type"),
-            )
-        )
-    return result
-
-
-
-def get_paths(self) ‑> list[Element | Text] -
-
-

Return the list of full paths in the manifest.

-

Return: list of str

-
- -Expand source code - -
def get_paths(self) -> list[Element | Text]:
-    """Return the list of full paths in the manifest.
-
-    Return: list of str
-    """
-    xpath_query = "//manifest:file-entry/attribute::manifest:full-path"
-    return self.xpath(xpath_query)
-
-
-
-def set_media_type(self, full_path: str, media_type: str) ‑> None -
-
-

Set the media type of an existing path.

-

Arguments

-

full_path – str

-

media_type – str

-
- -Expand source code - -
def set_media_type(self, full_path: str, media_type: str) -> None:
-    """Set the media type of an existing path.
-
-    Arguments:
-
-        full_path -- str
-
-        media_type -- str
-    """
-    file_entry = self._file_entry(full_path)
-    file_entry.set_attribute("manifest:media-type", media_type)
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/meta.html b/doc/meta.html deleted file mode 100644 index 921e14a..0000000 --- a/doc/meta.html +++ /dev/null @@ -1,2191 +0,0 @@ - - - - - - -odfdo.meta API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.meta

-
-
-

Meta class for meta.xml part.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Meta class for meta.xml part.
-"""
-from __future__ import annotations
-
-from datetime import date as dtdate
-from datetime import datetime, timedelta
-from decimal import Decimal
-from string import ascii_letters, digits
-from typing import Any
-
-from .datatype import Boolean, Date, DateTime, Duration
-from .element import Element
-from .utils import to_str
-from .version import __version__
-from .xmlpart import XmlPart
-
-
-class Meta(XmlPart):
-    _generator_modified = False
-
-    def get_meta_body(self) -> Element:
-        return self.get_element("//office:meta")
-
-    def get_title(self) -> str | None:
-        """Get the title of the document.
-
-        This is not the first heading but the title metadata.
-
-        Return: str (or None if inexistant)
-        """
-        element = self.get_element("//dc:title")
-        if element is None:
-            return None
-        return element.text
-
-    def set_title(self, title: str) -> None:
-        """Set the title of the document.
-
-        This is not the first heading but the title metadata.
-
-        Arguments:
-
-            title -- str
-        """
-        element = self.get_element("//dc:title")
-        if element is None:
-            element = Element.from_tag("dc:title")
-            self.get_meta_body().append(element)
-        element.text = title
-
-    def get_description(self) -> str | None:
-        """Get the description of the document. Also known as comments.
-
-        Return: str (or None if inexistant)
-        """
-        element = self.get_element("//dc:description")
-        if element is None:
-            return None
-        return element.text
-
-    # As named in OOo
-    get_comments = get_description
-
-    def set_description(self, description: str) -> None:
-        """Set the description of the document. Also known as comments.
-
-        Arguments:
-
-            description -- str
-        """
-        element = self.get_element("//dc:description")
-        if element is None:
-            element = Element.from_tag("dc:description")
-            self.get_meta_body().append(element)
-        element.text = description
-
-    set_comments = set_description
-
-    def get_subject(self) -> str | None:
-        """Get the subject of the document.
-
-        Return: str (or None if inexistant)
-        """
-        element = self.get_element("//dc:subject")
-        if element is None:
-            return None
-        return element.text
-
-    def set_subject(self, subject: str) -> None:
-        """Set the subject of the document.
-
-        Arguments:
-
-            subject -- str
-        """
-        element = self.get_element("//dc:subject")
-        if element is None:
-            element = Element.from_tag("dc:subject")
-            self.get_meta_body().append(element)
-        element.text = subject
-
-    def get_language(self) -> str | None:
-        """Get the language code of the document.
-
-        Return: str (or None if inexistant)
-
-        Example::
-
-            >>> document.meta.get_language()
-            fr-FR
-        """
-        element = self.get_element("//dc:language")
-        if element is None:
-            return None
-        return element.text
-
-    def set_language(self, language: str) -> None:
-        """Set the language code of the document.
-
-        Arguments:
-
-            language -- str
-
-        Example::
-
-            >>> document.meta.set_language('fr-FR')
-        """
-        language = str(language)
-        if not self._is_RFC3066(language):
-            raise TypeError(
-                'Language must be "xx" lang or "xx-YY" lang-COUNTRY code (RFC3066)'
-            )
-        element = self.get_element("//dc:language")
-        if element is None:
-            element = Element.from_tag("dc:language")
-            self.get_meta_body().append(element)
-        element.text = language
-
-    @staticmethod
-    def _is_RFC3066(lang: str) -> bool:
-        def test_part1(part1: str) -> bool:
-            if not 2 <= len(part1) <= 3:
-                return False
-            return all(x in ascii_letters for x in part1)
-
-        def test_part2(part2: str) -> bool:
-            return all(x in ascii_letters or x in digits for x in part2)
-
-        if not lang or not isinstance(lang, str):
-            return False
-        if "-" not in lang:
-            return test_part1(lang)
-        parts = lang.split("-")
-        if len(parts) > 3:
-            return False
-        if not test_part1(parts[0]):
-            return False
-        return all(test_part2(p) for p in parts[1:])
-
-    def get_modification_date(self) -> datetime | None:
-        """Get the last modified date of the document.
-
-        Return: datetime (or None if inexistant)
-        """
-        element = self.get_element("//dc:date")
-        if element is None:
-            return None
-        modification_date = element.text
-        return DateTime.decode(modification_date)
-
-    def set_modification_date(self, date: datetime) -> None:
-        """Set the last modified date of the document.
-
-        Arguments:
-
-            date -- datetime
-        """
-        element = self.get_element("//dc:date")
-        if element is None:
-            element = Element.from_tag("dc:date")
-            self.get_meta_body().append(element)
-        element.text = DateTime.encode(date)
-
-    def get_creation_date(self) -> datetime | None:
-        """Get the creation date of the document.
-
-        Return: datetime (or None if inexistant)
-        """
-        element = self.get_element("//meta:creation-date")
-        if element is None:
-            return None
-        creation_date = element.text
-        return DateTime.decode(creation_date)
-
-    def set_creation_date(self, date: datetime) -> None:
-        """Set the creation date of the document.
-
-        Arguments:
-
-            date -- datetime
-        """
-        element = self.get_element("//meta:creation-date")
-        if element is None:
-            element = Element.from_tag("meta:creation-date")
-            self.get_meta_body().append(element)
-        element.text = DateTime.encode(date)
-
-    def get_initial_creator(self) -> str | None:
-        """Get the first creator of the document.
-
-        Return: str (or None if inexistant)
-
-        Example::
-
-            >>> document.meta.get_initial_creator()
-            Unknown
-        """
-        element = self.get_element("//meta:initial-creator")
-        if element is None:
-            return None
-        return element.text
-
-    def set_initial_creator(self, creator: str) -> None:
-        """Set the first creator of the document.
-
-        Arguments:
-
-            creator -- str
-
-        Example::
-
-            >>> document.meta.set_initial_creator(u"Plato")
-        """
-        element = self.get_element("//meta:initial-creator")
-        if element is None:
-            element = Element.from_tag("meta:initial-creator")
-            self.get_meta_body().append(element)
-        element.text = creator
-
-    def get_creator(self) -> str | None:
-        """Get the creator of the document.
-
-        Return: str (or None if inexistant)
-
-        Example::
-
-            >>> document.meta.get_creator()
-            Unknown
-        """
-        element = self.get_element("//dc:creator")
-        if element is None:
-            return None
-        return element.text
-
-    def set_creator(self, creator: str) -> None:
-        """Set the creator of the document.
-
-        Arguments:
-
-            creator -- str
-
-        Example::
-
-            >>> document.meta.set_creator(u"Plato")
-        """
-        element = self.get_element("//dc:creator")
-        if element is None:
-            element = Element.from_tag("dc:creator")
-            self.get_meta_body().append(element)
-        element.text = creator
-
-    def get_keywords(self) -> str | None:
-        """Get the keywords of the document. Return the field as-is, without
-        any assumption on the keyword separator.
-
-        Return: str (or None if inexistant)
-        """
-        element = self.get_element("//meta:keyword")
-        if element is None:
-            return None
-        return element.text
-
-    def set_keywords(self, keywords: str) -> None:
-        """Set the keywords of the document. Although the name is plural, a
-        str string is required, so join your list first.
-
-        Arguments:
-
-            keywords -- str
-        """
-        element = self.get_element("//meta:keyword")
-        if element is None:
-            element = Element.from_tag("meta:keyword")
-            self.get_meta_body().append(element)
-        element.text = keywords
-
-    def get_editing_duration(self) -> timedelta | None:
-        """Get the time the document was edited, as reported by the
-        generator.
-
-        Return: timedelta (or None if inexistant)
-        """
-        element = self.get_element("//meta:editing-duration")
-        if element is None:
-            return None
-        duration = element.text
-        return Duration.decode(duration)
-
-    def set_editing_duration(self, duration: timedelta) -> None:
-        """Set the time the document was edited.
-
-        Arguments:
-
-            duration -- timedelta
-        """
-        if not isinstance(duration, timedelta):
-            raise TypeError("duration must be a timedelta")
-        element = self.get_element("//meta:editing-duration")
-        if element is None:
-            element = Element.from_tag("meta:editing-duration")
-            self.get_meta_body().append(element)
-        element.text = Duration.encode(duration)
-
-    def get_editing_cycles(self) -> int | None:
-        """Get the number of times the document was edited, as reported by
-        the generator.
-
-        Return: int (or None if inexistant)
-        """
-        element = self.get_element("//meta:editing-cycles")
-        if element is None:
-            return None
-        cycles = element.text
-        return int(cycles)
-
-    def set_editing_cycles(self, cycles: int) -> None:
-        """Set the number of times the document was edited.
-
-        Arguments:
-
-            cycles -- int
-        """
-        if not isinstance(cycles, int):
-            raise TypeError("cycles must be an int")
-        if cycles < 1:
-            raise ValueError("cycles must be a positive int")
-        element = self.get_element("//meta:editing-cycles")
-        if element is None:
-            element = Element.from_tag("meta:editing-cycles")
-            self.get_meta_body().append(element)
-        element.text = str(cycles)
-
-    def get_generator(self) -> str | None:
-        """Get the signature of the software that generated this document.
-
-        Return: str (or None if inexistant)
-
-        Example::
-
-            >>> document.meta.get_generator()
-            KOffice/2.0.0
-        """
-        element = self.get_element("//meta:generator")
-        if element is None:
-            return None
-        return element.text
-
-    def set_generator(self, generator: str) -> None:
-        """Set the signature of the software that generated this document.
-
-        Arguments:
-
-            generator -- str
-
-        Example::
-
-            >>> document.meta.set_generator(u"lpOD Project")
-        """
-        element = self.get_element("//meta:generator")
-        if element is None:
-            element = Element.from_tag("meta:generator")
-            self.get_meta_body().append(element)
-        element.text = generator
-        self._generator_modified = True
-
-    def set_generator_default(self) -> None:
-        """Set the signature of the software that generated this document
-        to ourself.
-
-        Example::
-
-            >>> document.meta.set_generator_default()
-        """
-        if not self._generator_modified:
-            self.set_generator(f"odfdo {__version__}")
-
-    def get_statistic(self) -> dict[str, int] | None:
-        """Get the statistic from the software that generated this document.
-
-        Return: dict (or None if inexistant)
-
-        Example::
-
-            >>> document.get_statistic():
-            {'meta:table-count': 1,
-             'meta:image-count': 2,
-             'meta:object-count': 3,
-             'meta:page-count': 4,
-             'meta:paragraph-count': 5,
-             'meta:word-count': 6,
-             'meta:character-count': 7}
-        """
-        element = self.get_element("//meta:document-statistic")
-        if element is None:
-            return None
-        statistic = {}
-        for key, value in element.attributes.items():
-            statistic[to_str(key)] = int(value)
-        return statistic
-
-    def set_statistic(self, statistic: dict[str, int]) -> None:
-        """Set the statistic for the documents: number of words, paragraphs,
-        etc.
-
-        Arguments:
-
-            statistic -- dict
-
-        Example::
-
-            >>> statistic = {'meta:table-count': 1,
-                             'meta:image-count': 2,
-                             'meta:object-count': 3,
-                             'meta:page-count': 4,
-                             'meta:paragraph-count': 5,
-                             'meta:word-count': 6,
-                             'meta:character-count': 7}
-            >>> document.meta.set_statistic(statistic)
-        """
-        if not isinstance(statistic, dict):
-            raise TypeError("Statistic must be a dict")
-        element = self.get_element("//meta:document-statistic")
-        for key, value in statistic.items():
-            try:
-                ivalue = int(value)
-            except ValueError as e:
-                raise TypeError("Statistic value must be a int") from e
-            element.set_attribute(to_str(key), str(ivalue))
-
-    def get_user_defined_metadata(self) -> dict[str, Any]:
-        """Return a dict of str/value mapping.
-
-        Value types can be: Decimal, date, time, boolean or str.
-        """
-        result: dict[str, Any] = {}
-        for item in self.get_elements("//meta:user-defined"):
-            if not isinstance(item, Element):
-                continue
-            # Read the values
-            name = item.get_attribute_string("meta:name")
-            if name is None:
-                continue
-            value = self._get_meta_value(item)
-            result[name] = value
-        return result
-
-    def get_user_defined_metadata_of_name(self, keyname: str) -> dict[str, Any] | None:
-        """Return the content of the user defined metadata of that name.
-        Return None if no name matchs or a dic of fields.
-
-        Arguments:
-
-            name -- string, name (meta:name content)
-        """
-        result = {}
-        found = False
-        for item in self.get_elements("//meta:user-defined"):
-            if not isinstance(item, Element):
-                continue
-            # Read the values
-            name = item.get_attribute("meta:name")
-            if name == keyname:
-                found = True
-                break
-        if not found:
-            return None
-        result["name"] = name
-        value, value_type, text = self._get_meta_value(item, full=True)  # type: ignore
-        result["value"] = value
-        result["value_type"] = value_type
-        result["text"] = text
-        return result
-
-    def set_user_defined_metadata(self, name: str, value: Any) -> None:
-        if isinstance(value, bool):
-            value_type = "boolean"
-            value = "true" if value else "false"
-        elif isinstance(value, (int, float, Decimal)):
-            value_type = "float"
-            value = str(value)
-        elif isinstance(value, dtdate):
-            value_type = "date"
-            value = str(Date.encode(value))
-        elif isinstance(value, datetime):
-            value_type = "date"
-            value = str(DateTime.encode(value))
-        elif isinstance(value, str):
-            value_type = "string"
-        elif isinstance(value, timedelta):
-            value_type = "time"
-            value = str(Duration.encode(value))
-        else:
-            raise TypeError('unexpected type "%s" for value' % type(value))
-        # Already the same element ?
-        for metadata in self.get_elements("//meta:user-defined"):
-            if not isinstance(metadata, Element):
-                continue
-            if metadata.get_attribute("meta:name") == name:
-                break
-        else:
-            metadata = Element.from_tag("meta:user-defined")
-            metadata.set_attribute("meta:name", name)
-            self.get_meta_body().append(metadata)
-        metadata.set_attribute("meta:value-type", value_type)
-        metadata.text = value
-
-    def _get_meta_value(
-        self, element: Element, full: bool = False
-    ) -> Any | tuple[Any, str, str]:
-        """get_value() deicated to the meta data part, for one meta element."""
-        if full:
-            return self._get_meta_value_full(element)
-        else:
-            return self._get_meta_value_full(element)[0]
-
-    @staticmethod
-    def _get_meta_value_full(element: Element) -> tuple[Any, str, str]:
-        """get_value deicated to the meta data part, for one meta element."""
-        # name = element.get_attribute('meta:name')
-        value_type = element.get_attribute_string("meta:value-type")
-        if value_type is None:
-            value_type = "string"
-        text = element.text
-        # Interpretation
-        if value_type == "boolean":
-            return (Boolean.decode(text), value_type, text)
-        if value_type in ("float", "percentage", "currency"):
-            return (Decimal(text), value_type, text)
-        if value_type == "date":
-            if "T" in text:
-                return (DateTime.decode(text), value_type, text)
-            else:
-                return (Date.decode(text), value_type, text)
-        if value_type == "string":
-            return (text, value_type, text)
-        if value_type == "time":
-            return (Duration.decode(text), value_type, text)
-        raise TypeError(f"Unknown value type: '{value_type!r}'")
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class Meta -(part_name: str, container: Container) -
-
-

Representation of an XML part.

-

Abstraction of the XML library behind.

-
- -Expand source code - -
class Meta(XmlPart):
-    _generator_modified = False
-
-    def get_meta_body(self) -> Element:
-        return self.get_element("//office:meta")
-
-    def get_title(self) -> str | None:
-        """Get the title of the document.
-
-        This is not the first heading but the title metadata.
-
-        Return: str (or None if inexistant)
-        """
-        element = self.get_element("//dc:title")
-        if element is None:
-            return None
-        return element.text
-
-    def set_title(self, title: str) -> None:
-        """Set the title of the document.
-
-        This is not the first heading but the title metadata.
-
-        Arguments:
-
-            title -- str
-        """
-        element = self.get_element("//dc:title")
-        if element is None:
-            element = Element.from_tag("dc:title")
-            self.get_meta_body().append(element)
-        element.text = title
-
-    def get_description(self) -> str | None:
-        """Get the description of the document. Also known as comments.
-
-        Return: str (or None if inexistant)
-        """
-        element = self.get_element("//dc:description")
-        if element is None:
-            return None
-        return element.text
-
-    # As named in OOo
-    get_comments = get_description
-
-    def set_description(self, description: str) -> None:
-        """Set the description of the document. Also known as comments.
-
-        Arguments:
-
-            description -- str
-        """
-        element = self.get_element("//dc:description")
-        if element is None:
-            element = Element.from_tag("dc:description")
-            self.get_meta_body().append(element)
-        element.text = description
-
-    set_comments = set_description
-
-    def get_subject(self) -> str | None:
-        """Get the subject of the document.
-
-        Return: str (or None if inexistant)
-        """
-        element = self.get_element("//dc:subject")
-        if element is None:
-            return None
-        return element.text
-
-    def set_subject(self, subject: str) -> None:
-        """Set the subject of the document.
-
-        Arguments:
-
-            subject -- str
-        """
-        element = self.get_element("//dc:subject")
-        if element is None:
-            element = Element.from_tag("dc:subject")
-            self.get_meta_body().append(element)
-        element.text = subject
-
-    def get_language(self) -> str | None:
-        """Get the language code of the document.
-
-        Return: str (or None if inexistant)
-
-        Example::
-
-            >>> document.meta.get_language()
-            fr-FR
-        """
-        element = self.get_element("//dc:language")
-        if element is None:
-            return None
-        return element.text
-
-    def set_language(self, language: str) -> None:
-        """Set the language code of the document.
-
-        Arguments:
-
-            language -- str
-
-        Example::
-
-            >>> document.meta.set_language('fr-FR')
-        """
-        language = str(language)
-        if not self._is_RFC3066(language):
-            raise TypeError(
-                'Language must be "xx" lang or "xx-YY" lang-COUNTRY code (RFC3066)'
-            )
-        element = self.get_element("//dc:language")
-        if element is None:
-            element = Element.from_tag("dc:language")
-            self.get_meta_body().append(element)
-        element.text = language
-
-    @staticmethod
-    def _is_RFC3066(lang: str) -> bool:
-        def test_part1(part1: str) -> bool:
-            if not 2 <= len(part1) <= 3:
-                return False
-            return all(x in ascii_letters for x in part1)
-
-        def test_part2(part2: str) -> bool:
-            return all(x in ascii_letters or x in digits for x in part2)
-
-        if not lang or not isinstance(lang, str):
-            return False
-        if "-" not in lang:
-            return test_part1(lang)
-        parts = lang.split("-")
-        if len(parts) > 3:
-            return False
-        if not test_part1(parts[0]):
-            return False
-        return all(test_part2(p) for p in parts[1:])
-
-    def get_modification_date(self) -> datetime | None:
-        """Get the last modified date of the document.
-
-        Return: datetime (or None if inexistant)
-        """
-        element = self.get_element("//dc:date")
-        if element is None:
-            return None
-        modification_date = element.text
-        return DateTime.decode(modification_date)
-
-    def set_modification_date(self, date: datetime) -> None:
-        """Set the last modified date of the document.
-
-        Arguments:
-
-            date -- datetime
-        """
-        element = self.get_element("//dc:date")
-        if element is None:
-            element = Element.from_tag("dc:date")
-            self.get_meta_body().append(element)
-        element.text = DateTime.encode(date)
-
-    def get_creation_date(self) -> datetime | None:
-        """Get the creation date of the document.
-
-        Return: datetime (or None if inexistant)
-        """
-        element = self.get_element("//meta:creation-date")
-        if element is None:
-            return None
-        creation_date = element.text
-        return DateTime.decode(creation_date)
-
-    def set_creation_date(self, date: datetime) -> None:
-        """Set the creation date of the document.
-
-        Arguments:
-
-            date -- datetime
-        """
-        element = self.get_element("//meta:creation-date")
-        if element is None:
-            element = Element.from_tag("meta:creation-date")
-            self.get_meta_body().append(element)
-        element.text = DateTime.encode(date)
-
-    def get_initial_creator(self) -> str | None:
-        """Get the first creator of the document.
-
-        Return: str (or None if inexistant)
-
-        Example::
-
-            >>> document.meta.get_initial_creator()
-            Unknown
-        """
-        element = self.get_element("//meta:initial-creator")
-        if element is None:
-            return None
-        return element.text
-
-    def set_initial_creator(self, creator: str) -> None:
-        """Set the first creator of the document.
-
-        Arguments:
-
-            creator -- str
-
-        Example::
-
-            >>> document.meta.set_initial_creator(u"Plato")
-        """
-        element = self.get_element("//meta:initial-creator")
-        if element is None:
-            element = Element.from_tag("meta:initial-creator")
-            self.get_meta_body().append(element)
-        element.text = creator
-
-    def get_creator(self) -> str | None:
-        """Get the creator of the document.
-
-        Return: str (or None if inexistant)
-
-        Example::
-
-            >>> document.meta.get_creator()
-            Unknown
-        """
-        element = self.get_element("//dc:creator")
-        if element is None:
-            return None
-        return element.text
-
-    def set_creator(self, creator: str) -> None:
-        """Set the creator of the document.
-
-        Arguments:
-
-            creator -- str
-
-        Example::
-
-            >>> document.meta.set_creator(u"Plato")
-        """
-        element = self.get_element("//dc:creator")
-        if element is None:
-            element = Element.from_tag("dc:creator")
-            self.get_meta_body().append(element)
-        element.text = creator
-
-    def get_keywords(self) -> str | None:
-        """Get the keywords of the document. Return the field as-is, without
-        any assumption on the keyword separator.
-
-        Return: str (or None if inexistant)
-        """
-        element = self.get_element("//meta:keyword")
-        if element is None:
-            return None
-        return element.text
-
-    def set_keywords(self, keywords: str) -> None:
-        """Set the keywords of the document. Although the name is plural, a
-        str string is required, so join your list first.
-
-        Arguments:
-
-            keywords -- str
-        """
-        element = self.get_element("//meta:keyword")
-        if element is None:
-            element = Element.from_tag("meta:keyword")
-            self.get_meta_body().append(element)
-        element.text = keywords
-
-    def get_editing_duration(self) -> timedelta | None:
-        """Get the time the document was edited, as reported by the
-        generator.
-
-        Return: timedelta (or None if inexistant)
-        """
-        element = self.get_element("//meta:editing-duration")
-        if element is None:
-            return None
-        duration = element.text
-        return Duration.decode(duration)
-
-    def set_editing_duration(self, duration: timedelta) -> None:
-        """Set the time the document was edited.
-
-        Arguments:
-
-            duration -- timedelta
-        """
-        if not isinstance(duration, timedelta):
-            raise TypeError("duration must be a timedelta")
-        element = self.get_element("//meta:editing-duration")
-        if element is None:
-            element = Element.from_tag("meta:editing-duration")
-            self.get_meta_body().append(element)
-        element.text = Duration.encode(duration)
-
-    def get_editing_cycles(self) -> int | None:
-        """Get the number of times the document was edited, as reported by
-        the generator.
-
-        Return: int (or None if inexistant)
-        """
-        element = self.get_element("//meta:editing-cycles")
-        if element is None:
-            return None
-        cycles = element.text
-        return int(cycles)
-
-    def set_editing_cycles(self, cycles: int) -> None:
-        """Set the number of times the document was edited.
-
-        Arguments:
-
-            cycles -- int
-        """
-        if not isinstance(cycles, int):
-            raise TypeError("cycles must be an int")
-        if cycles < 1:
-            raise ValueError("cycles must be a positive int")
-        element = self.get_element("//meta:editing-cycles")
-        if element is None:
-            element = Element.from_tag("meta:editing-cycles")
-            self.get_meta_body().append(element)
-        element.text = str(cycles)
-
-    def get_generator(self) -> str | None:
-        """Get the signature of the software that generated this document.
-
-        Return: str (or None if inexistant)
-
-        Example::
-
-            >>> document.meta.get_generator()
-            KOffice/2.0.0
-        """
-        element = self.get_element("//meta:generator")
-        if element is None:
-            return None
-        return element.text
-
-    def set_generator(self, generator: str) -> None:
-        """Set the signature of the software that generated this document.
-
-        Arguments:
-
-            generator -- str
-
-        Example::
-
-            >>> document.meta.set_generator(u"lpOD Project")
-        """
-        element = self.get_element("//meta:generator")
-        if element is None:
-            element = Element.from_tag("meta:generator")
-            self.get_meta_body().append(element)
-        element.text = generator
-        self._generator_modified = True
-
-    def set_generator_default(self) -> None:
-        """Set the signature of the software that generated this document
-        to ourself.
-
-        Example::
-
-            >>> document.meta.set_generator_default()
-        """
-        if not self._generator_modified:
-            self.set_generator(f"odfdo {__version__}")
-
-    def get_statistic(self) -> dict[str, int] | None:
-        """Get the statistic from the software that generated this document.
-
-        Return: dict (or None if inexistant)
-
-        Example::
-
-            >>> document.get_statistic():
-            {'meta:table-count': 1,
-             'meta:image-count': 2,
-             'meta:object-count': 3,
-             'meta:page-count': 4,
-             'meta:paragraph-count': 5,
-             'meta:word-count': 6,
-             'meta:character-count': 7}
-        """
-        element = self.get_element("//meta:document-statistic")
-        if element is None:
-            return None
-        statistic = {}
-        for key, value in element.attributes.items():
-            statistic[to_str(key)] = int(value)
-        return statistic
-
-    def set_statistic(self, statistic: dict[str, int]) -> None:
-        """Set the statistic for the documents: number of words, paragraphs,
-        etc.
-
-        Arguments:
-
-            statistic -- dict
-
-        Example::
-
-            >>> statistic = {'meta:table-count': 1,
-                             'meta:image-count': 2,
-                             'meta:object-count': 3,
-                             'meta:page-count': 4,
-                             'meta:paragraph-count': 5,
-                             'meta:word-count': 6,
-                             'meta:character-count': 7}
-            >>> document.meta.set_statistic(statistic)
-        """
-        if not isinstance(statistic, dict):
-            raise TypeError("Statistic must be a dict")
-        element = self.get_element("//meta:document-statistic")
-        for key, value in statistic.items():
-            try:
-                ivalue = int(value)
-            except ValueError as e:
-                raise TypeError("Statistic value must be a int") from e
-            element.set_attribute(to_str(key), str(ivalue))
-
-    def get_user_defined_metadata(self) -> dict[str, Any]:
-        """Return a dict of str/value mapping.
-
-        Value types can be: Decimal, date, time, boolean or str.
-        """
-        result: dict[str, Any] = {}
-        for item in self.get_elements("//meta:user-defined"):
-            if not isinstance(item, Element):
-                continue
-            # Read the values
-            name = item.get_attribute_string("meta:name")
-            if name is None:
-                continue
-            value = self._get_meta_value(item)
-            result[name] = value
-        return result
-
-    def get_user_defined_metadata_of_name(self, keyname: str) -> dict[str, Any] | None:
-        """Return the content of the user defined metadata of that name.
-        Return None if no name matchs or a dic of fields.
-
-        Arguments:
-
-            name -- string, name (meta:name content)
-        """
-        result = {}
-        found = False
-        for item in self.get_elements("//meta:user-defined"):
-            if not isinstance(item, Element):
-                continue
-            # Read the values
-            name = item.get_attribute("meta:name")
-            if name == keyname:
-                found = True
-                break
-        if not found:
-            return None
-        result["name"] = name
-        value, value_type, text = self._get_meta_value(item, full=True)  # type: ignore
-        result["value"] = value
-        result["value_type"] = value_type
-        result["text"] = text
-        return result
-
-    def set_user_defined_metadata(self, name: str, value: Any) -> None:
-        if isinstance(value, bool):
-            value_type = "boolean"
-            value = "true" if value else "false"
-        elif isinstance(value, (int, float, Decimal)):
-            value_type = "float"
-            value = str(value)
-        elif isinstance(value, dtdate):
-            value_type = "date"
-            value = str(Date.encode(value))
-        elif isinstance(value, datetime):
-            value_type = "date"
-            value = str(DateTime.encode(value))
-        elif isinstance(value, str):
-            value_type = "string"
-        elif isinstance(value, timedelta):
-            value_type = "time"
-            value = str(Duration.encode(value))
-        else:
-            raise TypeError('unexpected type "%s" for value' % type(value))
-        # Already the same element ?
-        for metadata in self.get_elements("//meta:user-defined"):
-            if not isinstance(metadata, Element):
-                continue
-            if metadata.get_attribute("meta:name") == name:
-                break
-        else:
-            metadata = Element.from_tag("meta:user-defined")
-            metadata.set_attribute("meta:name", name)
-            self.get_meta_body().append(metadata)
-        metadata.set_attribute("meta:value-type", value_type)
-        metadata.text = value
-
-    def _get_meta_value(
-        self, element: Element, full: bool = False
-    ) -> Any | tuple[Any, str, str]:
-        """get_value() deicated to the meta data part, for one meta element."""
-        if full:
-            return self._get_meta_value_full(element)
-        else:
-            return self._get_meta_value_full(element)[0]
-
-    @staticmethod
-    def _get_meta_value_full(element: Element) -> tuple[Any, str, str]:
-        """get_value deicated to the meta data part, for one meta element."""
-        # name = element.get_attribute('meta:name')
-        value_type = element.get_attribute_string("meta:value-type")
-        if value_type is None:
-            value_type = "string"
-        text = element.text
-        # Interpretation
-        if value_type == "boolean":
-            return (Boolean.decode(text), value_type, text)
-        if value_type in ("float", "percentage", "currency"):
-            return (Decimal(text), value_type, text)
-        if value_type == "date":
-            if "T" in text:
-                return (DateTime.decode(text), value_type, text)
-            else:
-                return (Date.decode(text), value_type, text)
-        if value_type == "string":
-            return (text, value_type, text)
-        if value_type == "time":
-            return (Duration.decode(text), value_type, text)
-        raise TypeError(f"Unknown value type: '{value_type!r}'")
-
-

Ancestors

- -

Methods

-
-
-def get_comments(self) ‑> str | None -
-
-

Get the description of the document. Also known as comments.

-

Return: str (or None if inexistant)

-
- -Expand source code - -
def get_description(self) -> str | None:
-    """Get the description of the document. Also known as comments.
-
-    Return: str (or None if inexistant)
-    """
-    element = self.get_element("//dc:description")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_creation_date(self) ‑> datetime.datetime | None -
-
-

Get the creation date of the document.

-

Return: datetime (or None if inexistant)

-
- -Expand source code - -
def get_creation_date(self) -> datetime | None:
-    """Get the creation date of the document.
-
-    Return: datetime (or None if inexistant)
-    """
-    element = self.get_element("//meta:creation-date")
-    if element is None:
-        return None
-    creation_date = element.text
-    return DateTime.decode(creation_date)
-
-
-
-def get_creator(self) ‑> str | None -
-
-

Get the creator of the document.

-

Return: str (or None if inexistant)

-

Example::

-
>>> document.meta.get_creator()
-Unknown
-
-
- -Expand source code - -
def get_creator(self) -> str | None:
-    """Get the creator of the document.
-
-    Return: str (or None if inexistant)
-
-    Example::
-
-        >>> document.meta.get_creator()
-        Unknown
-    """
-    element = self.get_element("//dc:creator")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_description(self) ‑> str | None -
-
-

Get the description of the document. Also known as comments.

-

Return: str (or None if inexistant)

-
- -Expand source code - -
def get_description(self) -> str | None:
-    """Get the description of the document. Also known as comments.
-
-    Return: str (or None if inexistant)
-    """
-    element = self.get_element("//dc:description")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_editing_cycles(self) ‑> int | None -
-
-

Get the number of times the document was edited, as reported by -the generator.

-

Return: int (or None if inexistant)

-
- -Expand source code - -
def get_editing_cycles(self) -> int | None:
-    """Get the number of times the document was edited, as reported by
-    the generator.
-
-    Return: int (or None if inexistant)
-    """
-    element = self.get_element("//meta:editing-cycles")
-    if element is None:
-        return None
-    cycles = element.text
-    return int(cycles)
-
-
-
-def get_editing_duration(self) ‑> datetime.timedelta | None -
-
-

Get the time the document was edited, as reported by the -generator.

-

Return: timedelta (or None if inexistant)

-
- -Expand source code - -
def get_editing_duration(self) -> timedelta | None:
-    """Get the time the document was edited, as reported by the
-    generator.
-
-    Return: timedelta (or None if inexistant)
-    """
-    element = self.get_element("//meta:editing-duration")
-    if element is None:
-        return None
-    duration = element.text
-    return Duration.decode(duration)
-
-
-
-def get_generator(self) ‑> str | None -
-
-

Get the signature of the software that generated this document.

-

Return: str (or None if inexistant)

-

Example::

-
>>> document.meta.get_generator()
-KOffice/2.0.0
-
-
- -Expand source code - -
def get_generator(self) -> str | None:
-    """Get the signature of the software that generated this document.
-
-    Return: str (or None if inexistant)
-
-    Example::
-
-        >>> document.meta.get_generator()
-        KOffice/2.0.0
-    """
-    element = self.get_element("//meta:generator")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_initial_creator(self) ‑> str | None -
-
-

Get the first creator of the document.

-

Return: str (or None if inexistant)

-

Example::

-
>>> document.meta.get_initial_creator()
-Unknown
-
-
- -Expand source code - -
def get_initial_creator(self) -> str | None:
-    """Get the first creator of the document.
-
-    Return: str (or None if inexistant)
-
-    Example::
-
-        >>> document.meta.get_initial_creator()
-        Unknown
-    """
-    element = self.get_element("//meta:initial-creator")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_keywords(self) ‑> str | None -
-
-

Get the keywords of the document. Return the field as-is, without -any assumption on the keyword separator.

-

Return: str (or None if inexistant)

-
- -Expand source code - -
def get_keywords(self) -> str | None:
-    """Get the keywords of the document. Return the field as-is, without
-    any assumption on the keyword separator.
-
-    Return: str (or None if inexistant)
-    """
-    element = self.get_element("//meta:keyword")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_language(self) ‑> str | None -
-
-

Get the language code of the document.

-

Return: str (or None if inexistant)

-

Example::

-
>>> document.meta.get_language()
-fr-FR
-
-
- -Expand source code - -
def get_language(self) -> str | None:
-    """Get the language code of the document.
-
-    Return: str (or None if inexistant)
-
-    Example::
-
-        >>> document.meta.get_language()
-        fr-FR
-    """
-    element = self.get_element("//dc:language")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_meta_body(self) ‑> Element -
-
-
-
- -Expand source code - -
def get_meta_body(self) -> Element:
-    return self.get_element("//office:meta")
-
-
-
-def get_modification_date(self) ‑> datetime.datetime | None -
-
-

Get the last modified date of the document.

-

Return: datetime (or None if inexistant)

-
- -Expand source code - -
def get_modification_date(self) -> datetime | None:
-    """Get the last modified date of the document.
-
-    Return: datetime (or None if inexistant)
-    """
-    element = self.get_element("//dc:date")
-    if element is None:
-        return None
-    modification_date = element.text
-    return DateTime.decode(modification_date)
-
-
-
-def get_statistic(self) ‑> dict[str, int] | None -
-
-

Get the statistic from the software that generated this document.

-

Return: dict (or None if inexistant)

-

Example::

-
>>> document.get_statistic():
-{'meta:table-count': 1,
- 'meta:image-count': 2,
- 'meta:object-count': 3,
- 'meta:page-count': 4,
- 'meta:paragraph-count': 5,
- 'meta:word-count': 6,
- 'meta:character-count': 7}
-
-
- -Expand source code - -
def get_statistic(self) -> dict[str, int] | None:
-    """Get the statistic from the software that generated this document.
-
-    Return: dict (or None if inexistant)
-
-    Example::
-
-        >>> document.get_statistic():
-        {'meta:table-count': 1,
-         'meta:image-count': 2,
-         'meta:object-count': 3,
-         'meta:page-count': 4,
-         'meta:paragraph-count': 5,
-         'meta:word-count': 6,
-         'meta:character-count': 7}
-    """
-    element = self.get_element("//meta:document-statistic")
-    if element is None:
-        return None
-    statistic = {}
-    for key, value in element.attributes.items():
-        statistic[to_str(key)] = int(value)
-    return statistic
-
-
-
-def get_subject(self) ‑> str | None -
-
-

Get the subject of the document.

-

Return: str (or None if inexistant)

-
- -Expand source code - -
def get_subject(self) -> str | None:
-    """Get the subject of the document.
-
-    Return: str (or None if inexistant)
-    """
-    element = self.get_element("//dc:subject")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_title(self) ‑> str | None -
-
-

Get the title of the document.

-

This is not the first heading but the title metadata.

-

Return: str (or None if inexistant)

-
- -Expand source code - -
def get_title(self) -> str | None:
-    """Get the title of the document.
-
-    This is not the first heading but the title metadata.
-
-    Return: str (or None if inexistant)
-    """
-    element = self.get_element("//dc:title")
-    if element is None:
-        return None
-    return element.text
-
-
-
-def get_user_defined_metadata(self) ‑> dict[str, typing.Any] -
-
-

Return a dict of str/value mapping.

-

Value types can be: Decimal, date, time, boolean or str.

-
- -Expand source code - -
def get_user_defined_metadata(self) -> dict[str, Any]:
-    """Return a dict of str/value mapping.
-
-    Value types can be: Decimal, date, time, boolean or str.
-    """
-    result: dict[str, Any] = {}
-    for item in self.get_elements("//meta:user-defined"):
-        if not isinstance(item, Element):
-            continue
-        # Read the values
-        name = item.get_attribute_string("meta:name")
-        if name is None:
-            continue
-        value = self._get_meta_value(item)
-        result[name] = value
-    return result
-
-
-
-def get_user_defined_metadata_of_name(self, keyname: str) ‑> dict[str, typing.Any] | None -
-
-

Return the content of the user defined metadata of that name. -Return None if no name matchs or a dic of fields.

-

Arguments

-

name – string, name (meta:name content)

-
- -Expand source code - -
def get_user_defined_metadata_of_name(self, keyname: str) -> dict[str, Any] | None:
-    """Return the content of the user defined metadata of that name.
-    Return None if no name matchs or a dic of fields.
-
-    Arguments:
-
-        name -- string, name (meta:name content)
-    """
-    result = {}
-    found = False
-    for item in self.get_elements("//meta:user-defined"):
-        if not isinstance(item, Element):
-            continue
-        # Read the values
-        name = item.get_attribute("meta:name")
-        if name == keyname:
-            found = True
-            break
-    if not found:
-        return None
-    result["name"] = name
-    value, value_type, text = self._get_meta_value(item, full=True)  # type: ignore
-    result["value"] = value
-    result["value_type"] = value_type
-    result["text"] = text
-    return result
-
-
-
-def set_comments(self, description: str) ‑> None -
-
-

Set the description of the document. Also known as comments.

-

Arguments

-

description – str

-
- -Expand source code - -
def set_description(self, description: str) -> None:
-    """Set the description of the document. Also known as comments.
-
-    Arguments:
-
-        description -- str
-    """
-    element = self.get_element("//dc:description")
-    if element is None:
-        element = Element.from_tag("dc:description")
-        self.get_meta_body().append(element)
-    element.text = description
-
-
-
-def set_creation_date(self, date: datetime) ‑> None -
-
-

Set the creation date of the document.

-

Arguments

-

date – datetime

-
- -Expand source code - -
def set_creation_date(self, date: datetime) -> None:
-    """Set the creation date of the document.
-
-    Arguments:
-
-        date -- datetime
-    """
-    element = self.get_element("//meta:creation-date")
-    if element is None:
-        element = Element.from_tag("meta:creation-date")
-        self.get_meta_body().append(element)
-    element.text = DateTime.encode(date)
-
-
-
-def set_creator(self, creator: str) ‑> None -
-
-

Set the creator of the document.

-

Arguments

-

creator – str

-

Example::

-
>>> document.meta.set_creator(u"Plato")
-
-
- -Expand source code - -
def set_creator(self, creator: str) -> None:
-    """Set the creator of the document.
-
-    Arguments:
-
-        creator -- str
-
-    Example::
-
-        >>> document.meta.set_creator(u"Plato")
-    """
-    element = self.get_element("//dc:creator")
-    if element is None:
-        element = Element.from_tag("dc:creator")
-        self.get_meta_body().append(element)
-    element.text = creator
-
-
-
-def set_description(self, description: str) ‑> None -
-
-

Set the description of the document. Also known as comments.

-

Arguments

-

description – str

-
- -Expand source code - -
def set_description(self, description: str) -> None:
-    """Set the description of the document. Also known as comments.
-
-    Arguments:
-
-        description -- str
-    """
-    element = self.get_element("//dc:description")
-    if element is None:
-        element = Element.from_tag("dc:description")
-        self.get_meta_body().append(element)
-    element.text = description
-
-
-
-def set_editing_cycles(self, cycles: int) ‑> None -
-
-

Set the number of times the document was edited.

-

Arguments

-

cycles – int

-
- -Expand source code - -
def set_editing_cycles(self, cycles: int) -> None:
-    """Set the number of times the document was edited.
-
-    Arguments:
-
-        cycles -- int
-    """
-    if not isinstance(cycles, int):
-        raise TypeError("cycles must be an int")
-    if cycles < 1:
-        raise ValueError("cycles must be a positive int")
-    element = self.get_element("//meta:editing-cycles")
-    if element is None:
-        element = Element.from_tag("meta:editing-cycles")
-        self.get_meta_body().append(element)
-    element.text = str(cycles)
-
-
-
-def set_editing_duration(self, duration: timedelta) ‑> None -
-
-

Set the time the document was edited.

-

Arguments

-

duration – timedelta

-
- -Expand source code - -
def set_editing_duration(self, duration: timedelta) -> None:
-    """Set the time the document was edited.
-
-    Arguments:
-
-        duration -- timedelta
-    """
-    if not isinstance(duration, timedelta):
-        raise TypeError("duration must be a timedelta")
-    element = self.get_element("//meta:editing-duration")
-    if element is None:
-        element = Element.from_tag("meta:editing-duration")
-        self.get_meta_body().append(element)
-    element.text = Duration.encode(duration)
-
-
-
-def set_generator(self, generator: str) ‑> None -
-
-

Set the signature of the software that generated this document.

-

Arguments

-

generator – str

-

Example::

-
>>> document.meta.set_generator(u"lpOD Project")
-
-
- -Expand source code - -
def set_generator(self, generator: str) -> None:
-    """Set the signature of the software that generated this document.
-
-    Arguments:
-
-        generator -- str
-
-    Example::
-
-        >>> document.meta.set_generator(u"lpOD Project")
-    """
-    element = self.get_element("//meta:generator")
-    if element is None:
-        element = Element.from_tag("meta:generator")
-        self.get_meta_body().append(element)
-    element.text = generator
-    self._generator_modified = True
-
-
-
-def set_generator_default(self) ‑> None -
-
-

Set the signature of the software that generated this document -to ourself.

-

Example::

-
>>> document.meta.set_generator_default()
-
-
- -Expand source code - -
def set_generator_default(self) -> None:
-    """Set the signature of the software that generated this document
-    to ourself.
-
-    Example::
-
-        >>> document.meta.set_generator_default()
-    """
-    if not self._generator_modified:
-        self.set_generator(f"odfdo {__version__}")
-
-
-
-def set_initial_creator(self, creator: str) ‑> None -
-
-

Set the first creator of the document.

-

Arguments

-

creator – str

-

Example::

-
>>> document.meta.set_initial_creator(u"Plato")
-
-
- -Expand source code - -
def set_initial_creator(self, creator: str) -> None:
-    """Set the first creator of the document.
-
-    Arguments:
-
-        creator -- str
-
-    Example::
-
-        >>> document.meta.set_initial_creator(u"Plato")
-    """
-    element = self.get_element("//meta:initial-creator")
-    if element is None:
-        element = Element.from_tag("meta:initial-creator")
-        self.get_meta_body().append(element)
-    element.text = creator
-
-
-
-def set_keywords(self, keywords: str) ‑> None -
-
-

Set the keywords of the document. Although the name is plural, a -str string is required, so join your list first.

-

Arguments

-

keywords – str

-
- -Expand source code - -
def set_keywords(self, keywords: str) -> None:
-    """Set the keywords of the document. Although the name is plural, a
-    str string is required, so join your list first.
-
-    Arguments:
-
-        keywords -- str
-    """
-    element = self.get_element("//meta:keyword")
-    if element is None:
-        element = Element.from_tag("meta:keyword")
-        self.get_meta_body().append(element)
-    element.text = keywords
-
-
-
-def set_language(self, language: str) ‑> None -
-
-

Set the language code of the document.

-

Arguments

-

language – str

-

Example::

-
>>> document.meta.set_language('fr-FR')
-
-
- -Expand source code - -
def set_language(self, language: str) -> None:
-    """Set the language code of the document.
-
-    Arguments:
-
-        language -- str
-
-    Example::
-
-        >>> document.meta.set_language('fr-FR')
-    """
-    language = str(language)
-    if not self._is_RFC3066(language):
-        raise TypeError(
-            'Language must be "xx" lang or "xx-YY" lang-COUNTRY code (RFC3066)'
-        )
-    element = self.get_element("//dc:language")
-    if element is None:
-        element = Element.from_tag("dc:language")
-        self.get_meta_body().append(element)
-    element.text = language
-
-
-
-def set_modification_date(self, date: datetime) ‑> None -
-
-

Set the last modified date of the document.

-

Arguments

-

date – datetime

-
- -Expand source code - -
def set_modification_date(self, date: datetime) -> None:
-    """Set the last modified date of the document.
-
-    Arguments:
-
-        date -- datetime
-    """
-    element = self.get_element("//dc:date")
-    if element is None:
-        element = Element.from_tag("dc:date")
-        self.get_meta_body().append(element)
-    element.text = DateTime.encode(date)
-
-
-
-def set_statistic(self, statistic: dict[str, int]) ‑> None -
-
-

Set the statistic for the documents: number of words, paragraphs, -etc.

-

Arguments

-

statistic – dict

-

Example::

-
>>> statistic = {'meta:table-count': 1,
-                 'meta:image-count': 2,
-                 'meta:object-count': 3,
-                 'meta:page-count': 4,
-                 'meta:paragraph-count': 5,
-                 'meta:word-count': 6,
-                 'meta:character-count': 7}
->>> document.meta.set_statistic(statistic)
-
-
- -Expand source code - -
def set_statistic(self, statistic: dict[str, int]) -> None:
-    """Set the statistic for the documents: number of words, paragraphs,
-    etc.
-
-    Arguments:
-
-        statistic -- dict
-
-    Example::
-
-        >>> statistic = {'meta:table-count': 1,
-                         'meta:image-count': 2,
-                         'meta:object-count': 3,
-                         'meta:page-count': 4,
-                         'meta:paragraph-count': 5,
-                         'meta:word-count': 6,
-                         'meta:character-count': 7}
-        >>> document.meta.set_statistic(statistic)
-    """
-    if not isinstance(statistic, dict):
-        raise TypeError("Statistic must be a dict")
-    element = self.get_element("//meta:document-statistic")
-    for key, value in statistic.items():
-        try:
-            ivalue = int(value)
-        except ValueError as e:
-            raise TypeError("Statistic value must be a int") from e
-        element.set_attribute(to_str(key), str(ivalue))
-
-
-
-def set_subject(self, subject: str) ‑> None -
-
-

Set the subject of the document.

-

Arguments

-

subject – str

-
- -Expand source code - -
def set_subject(self, subject: str) -> None:
-    """Set the subject of the document.
-
-    Arguments:
-
-        subject -- str
-    """
-    element = self.get_element("//dc:subject")
-    if element is None:
-        element = Element.from_tag("dc:subject")
-        self.get_meta_body().append(element)
-    element.text = subject
-
-
-
-def set_title(self, title: str) ‑> None -
-
-

Set the title of the document.

-

This is not the first heading but the title metadata.

-

Arguments

-

title – str

-
- -Expand source code - -
def set_title(self, title: str) -> None:
-    """Set the title of the document.
-
-    This is not the first heading but the title metadata.
-
-    Arguments:
-
-        title -- str
-    """
-    element = self.get_element("//dc:title")
-    if element is None:
-        element = Element.from_tag("dc:title")
-        self.get_meta_body().append(element)
-    element.text = title
-
-
-
-def set_user_defined_metadata(self, name: str, value: Any) ‑> None -
-
-
-
- -Expand source code - -
def set_user_defined_metadata(self, name: str, value: Any) -> None:
-    if isinstance(value, bool):
-        value_type = "boolean"
-        value = "true" if value else "false"
-    elif isinstance(value, (int, float, Decimal)):
-        value_type = "float"
-        value = str(value)
-    elif isinstance(value, dtdate):
-        value_type = "date"
-        value = str(Date.encode(value))
-    elif isinstance(value, datetime):
-        value_type = "date"
-        value = str(DateTime.encode(value))
-    elif isinstance(value, str):
-        value_type = "string"
-    elif isinstance(value, timedelta):
-        value_type = "time"
-        value = str(Duration.encode(value))
-    else:
-        raise TypeError('unexpected type "%s" for value' % type(value))
-    # Already the same element ?
-    for metadata in self.get_elements("//meta:user-defined"):
-        if not isinstance(metadata, Element):
-            continue
-        if metadata.get_attribute("meta:name") == name:
-            break
-    else:
-        metadata = Element.from_tag("meta:user-defined")
-        metadata.set_attribute("meta:name", name)
-        self.get_meta_body().append(metadata)
-    metadata.set_attribute("meta:value-type", value_type)
-    metadata.text = value
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/note.html b/doc/note.html deleted file mode 100644 index 6ac08cd..0000000 --- a/doc/note.html +++ /dev/null @@ -1,1580 +0,0 @@ - - - - - - -odfdo.note API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.note

-
-
-

Note class for "text:note" and Annotation class for "office:annotation".

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Note class for "text:note" and Annotation class for "office:annotation".
-"""
-from __future__ import annotations
-
-from datetime import datetime
-from typing import Any
-
-from .element import Element, PropDef, register_element_class
-
-
-def get_unique_office_name(element: Element | None = None) -> str:
-    """Provide an autogenerated unique "office:name" for the document."""
-    if element is not None:
-        body = element.document_body
-    else:
-        body = None
-    if body:
-        used = set(body.get_office_names())
-    else:
-        used = set()
-    # unplugged current paragraph:
-    if element is not None:
-        used.update(element.get_office_names())
-    indice = 1
-    while True:
-        name = f"__Fieldmark__lpod_{indice}"
-        if name in used:
-            indice += 1
-            continue
-        break
-    return name
-
-
-class Note(Element):
-    """Either a footnote or a endnote element with the given text,
-    optionally referencing it using the given note_id.
-
-    Arguments:
-
-        note_class -- 'footnote' or 'endnote'
-
-        note_id -- str
-
-        citation -- str
-
-        body -- str or Element
-    """
-
-    _tag = "text:note"
-    _properties = (
-        PropDef("note_class", "text:note-class"),
-        PropDef("note_id", "text:id"),
-    )
-
-    def __init__(
-        self,
-        note_class: str = "footnote",
-        note_id: str | None = None,
-        citation: str | None = None,
-        body: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.insert(Element.from_tag("text:note-body"), position=0)
-            self.insert(Element.from_tag("text:note-citation"), position=0)
-            self.note_class = note_class
-            if note_id is not None:
-                self.note_id = note_id
-            if citation is not None:
-                self.citation = citation
-            if body is not None:
-                self.note_body = body
-
-    @property
-    def citation(self) -> str:
-        note_citation = self.get_element("text:note-citation")
-        if note_citation:
-            return note_citation.text
-        return ""
-
-    @citation.setter
-    def citation(self, text: str | None) -> None:
-        note_citation = self.get_element("text:note-citation")
-        if note_citation:
-            note_citation.text = text  # type:ignore
-
-    @property
-    def note_body(self) -> str:
-        note_body = self.get_element("text:note-body")
-        if note_body:
-            return note_body.text_content
-        return ""
-
-    @note_body.setter
-    def note_body(self, text_or_element: Element | str | None) -> None:
-        note_body = self.get_element("text:note-body")
-        if not note_body:
-            return None
-        if text_or_element is None:
-            note_body.text_content = ""
-        elif isinstance(text_or_element, str):
-            note_body.text_content = text_or_element
-        elif isinstance(text_or_element, Element):
-            note_body.clear()
-            note_body.append(text_or_element)
-        else:
-            raise TypeError(f'Unexpected type for body: "{type(text_or_element)}"')
-
-    def check_validity(self) -> None:
-        if not self.note_class:
-            raise ValueError('Note class must be "footnote" or "endnote"')
-        if not self.note_id:
-            raise ValueError("Note must have an id")
-        if not self.citation:
-            raise ValueError("Note must have a citation")
-        if not self.note_body:
-            pass
-
-
-Note._define_attribut_property()
-
-
-class Annotation(Element):
-    """Annotation element credited to the given creator with the
-    given text, optionally dated (current date by default).
-    If name not provided and some parent is provided, the name is
-    autogenerated.
-
-    Arguments:
-
-        text -- str or odf_element
-
-        creator -- str
-
-        date -- datetime
-
-        name -- str
-
-        parent -- Element
-    """
-
-    _tag = "office:annotation"
-    _properties = (
-        PropDef("name", "office:name"),
-        PropDef("note_id", "text:id"),
-    )
-
-    def __init__(
-        self,
-        text_or_element: Element | str | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-        name: str | None = None,
-        parent: Element | None = None,
-        **kwargs: Any,
-    ) -> None:
-        # fixme : use offset
-        # TODO allow paragraph and text styles
-        super().__init__(**kwargs)
-
-        if self._do_init:
-            self.note_body = text_or_element  # type:ignore
-            if creator:
-                self.dc_creator = creator
-            if date is None:
-                date = datetime.now()
-            self.dc_date = date
-            if not name:
-                name = get_unique_office_name(parent)
-                self.name = name
-
-    @property
-    def note_body(self) -> str:
-        return self.text_content
-
-    @note_body.setter
-    def note_body(self, text_or_element: Element | str | None) -> None:
-        if text_or_element is None:
-            self.text_content = ""
-        elif isinstance(text_or_element, str):
-            self.text_content = text_or_element
-        elif isinstance(text_or_element, Element):
-            self.clear()
-            self.append(text_or_element)
-        else:
-            raise TypeError(f'Unexpected type for body: "{type(text_or_element)}"')
-
-    @property
-    def start(self) -> Element:
-        """Return self."""
-        return self
-
-    @property
-    def end(self) -> Element | None:
-        """Return the corresponding annotation-end tag or None."""
-        name = self.name
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can't find end tag: no parent available")
-        body = self.document_body
-        if not body:
-            body = parent
-        return body.get_annotation_end(name=name)
-
-    def get_annotated(
-        self,
-        as_text: bool = False,
-        no_header: bool = True,
-        clean: bool = True,
-    ) -> Element | list | str | None:
-        """Returns the annotated content from an annotation.
-
-        If no content exists (single position annotation or annotation-end not
-        found), returns [] (or u'' if text flag is True).
-        If as_text is True: returns the text content.
-        If clean is True: suppress unwanted tags (deletions marks, ...)
-        If no_header is True: existing text:h are changed in text:p
-        By default: returns a list of odf_element, cleaned and without headers.
-
-        Arguments:
-
-            as_text -- boolean
-
-            clean -- boolean
-
-            no_header -- boolean
-
-        Return: list or Element or text or None
-        """
-        end = self.end
-        if end is None:
-            if as_text:
-                return ""
-            return None
-        body = self.document_body
-        if not body:
-            body = self.root
-        return body.get_between(
-            self, end, as_text=as_text, no_header=no_header, clean=clean
-        )
-
-    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-        """Delete the given element from the XML tree. If no element is given,
-        "self" is deleted. The XML library may allow to continue to use an
-        element now "orphan" as long as you have a reference to it.
-
-        For Annotation : delete the annotation-end tag if exists.
-
-        Arguments:
-
-            child -- Element or None
-        """
-        if child is not None:  # act like normal delete
-            super().delete(child)
-            return
-        end = self.end
-        if end:
-            end.delete()
-        # act like normal delete
-        super().delete()
-
-    def check_validity(self) -> None:
-        if not self.note_body:
-            raise ValueError("Annotation must have a body")
-        if not self.dc_creator:
-            raise ValueError("Annotation must have a creator")
-        if not self.dc_date:
-            self.dc_date = datetime.now()
-
-
-Annotation._define_attribut_property()
-
-
-class AnnotationEnd(Element):
-    """AnnotationEnd: the "office:annotation-end" element may be used to
-    define the end of a text range of document content that spans element
-    boundaries. In that case, an "office:annotation" element shall precede
-    the "office:annotation-end" element. Both elements shall have the same
-    value for their office:name attribute. The "office:annotation-end" element
-    shall be preceded by an "office:annotation" element that has the same
-    value for its office:name attribute as the "office:annotation-end"
-    element. An "office:annotation-end" element without a preceding
-    "office:annotation" element that has the same name assigned is ignored.
-    """
-
-    _tag = "office:annotation-end"
-    _properties = (PropDef("name", "office:name"),)
-
-    def __init__(
-        self,
-        annotation: Element | None = None,
-        name: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Initialize an AnnotationEnd element. Either annotation or name must be
-        provided to have proper reference for the annotation-end.
-
-        Arguments:
-
-            annotation -- odf_annotation element
-
-            name -- str
-        """
-        # fixme : use offset
-        # TODO allow paragraph and text styles
-        super().__init__(**kwargs)
-        if self._do_init:
-            if annotation:
-                name = annotation.name  # type: ignore
-            if not name:
-                raise ValueError("Annotation-end must have a name")
-            self.name = name
-
-    @property
-    def start(self) -> Element | None:
-        """Return the corresponding annotation starting tag or None."""
-        name = self.name
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can't find start tag: no parent available")
-        body = self.document_body
-        if not body:
-            body = parent
-        return body.get_annotation(name=name)
-
-    @property
-    def end(self) -> Element:
-        """Return self."""
-        return self
-
-
-AnnotationEnd._define_attribut_property()
-
-register_element_class(Note)
-register_element_class(Annotation)
-register_element_class(AnnotationEnd)
-
-
-
-
-
-
-
-

Functions

-
-
-def get_unique_office_name(element: Element | None = None) ‑> str -
-
-

Provide an autogenerated unique "office:name" for the document.

-
- -Expand source code - -
def get_unique_office_name(element: Element | None = None) -> str:
-    """Provide an autogenerated unique "office:name" for the document."""
-    if element is not None:
-        body = element.document_body
-    else:
-        body = None
-    if body:
-        used = set(body.get_office_names())
-    else:
-        used = set()
-    # unplugged current paragraph:
-    if element is not None:
-        used.update(element.get_office_names())
-    indice = 1
-    while True:
-        name = f"__Fieldmark__lpod_{indice}"
-        if name in used:
-            indice += 1
-            continue
-        break
-    return name
-
-
-
-
-
-

Classes

-
-
-class Annotation -(text_or_element: Element | str | None = None, creator: str | None = None, date: datetime | None = None, name: str | None = None, parent: Element | None = None, **kwargs: Any) -
-
-

Annotation element credited to the given creator with the -given text, optionally dated (current date by default). -If name not provided and some parent is provided, the name is -autogenerated.

-

Arguments

-

text – str or odf_element

-

creator – str

-

date – datetime

-

name – str

-

parent – Element

-
- -Expand source code - -
class Annotation(Element):
-    """Annotation element credited to the given creator with the
-    given text, optionally dated (current date by default).
-    If name not provided and some parent is provided, the name is
-    autogenerated.
-
-    Arguments:
-
-        text -- str or odf_element
-
-        creator -- str
-
-        date -- datetime
-
-        name -- str
-
-        parent -- Element
-    """
-
-    _tag = "office:annotation"
-    _properties = (
-        PropDef("name", "office:name"),
-        PropDef("note_id", "text:id"),
-    )
-
-    def __init__(
-        self,
-        text_or_element: Element | str | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-        name: str | None = None,
-        parent: Element | None = None,
-        **kwargs: Any,
-    ) -> None:
-        # fixme : use offset
-        # TODO allow paragraph and text styles
-        super().__init__(**kwargs)
-
-        if self._do_init:
-            self.note_body = text_or_element  # type:ignore
-            if creator:
-                self.dc_creator = creator
-            if date is None:
-                date = datetime.now()
-            self.dc_date = date
-            if not name:
-                name = get_unique_office_name(parent)
-                self.name = name
-
-    @property
-    def note_body(self) -> str:
-        return self.text_content
-
-    @note_body.setter
-    def note_body(self, text_or_element: Element | str | None) -> None:
-        if text_or_element is None:
-            self.text_content = ""
-        elif isinstance(text_or_element, str):
-            self.text_content = text_or_element
-        elif isinstance(text_or_element, Element):
-            self.clear()
-            self.append(text_or_element)
-        else:
-            raise TypeError(f'Unexpected type for body: "{type(text_or_element)}"')
-
-    @property
-    def start(self) -> Element:
-        """Return self."""
-        return self
-
-    @property
-    def end(self) -> Element | None:
-        """Return the corresponding annotation-end tag or None."""
-        name = self.name
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can't find end tag: no parent available")
-        body = self.document_body
-        if not body:
-            body = parent
-        return body.get_annotation_end(name=name)
-
-    def get_annotated(
-        self,
-        as_text: bool = False,
-        no_header: bool = True,
-        clean: bool = True,
-    ) -> Element | list | str | None:
-        """Returns the annotated content from an annotation.
-
-        If no content exists (single position annotation or annotation-end not
-        found), returns [] (or u'' if text flag is True).
-        If as_text is True: returns the text content.
-        If clean is True: suppress unwanted tags (deletions marks, ...)
-        If no_header is True: existing text:h are changed in text:p
-        By default: returns a list of odf_element, cleaned and without headers.
-
-        Arguments:
-
-            as_text -- boolean
-
-            clean -- boolean
-
-            no_header -- boolean
-
-        Return: list or Element or text or None
-        """
-        end = self.end
-        if end is None:
-            if as_text:
-                return ""
-            return None
-        body = self.document_body
-        if not body:
-            body = self.root
-        return body.get_between(
-            self, end, as_text=as_text, no_header=no_header, clean=clean
-        )
-
-    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-        """Delete the given element from the XML tree. If no element is given,
-        "self" is deleted. The XML library may allow to continue to use an
-        element now "orphan" as long as you have a reference to it.
-
-        For Annotation : delete the annotation-end tag if exists.
-
-        Arguments:
-
-            child -- Element or None
-        """
-        if child is not None:  # act like normal delete
-            super().delete(child)
-            return
-        end = self.end
-        if end:
-            end.delete()
-        # act like normal delete
-        super().delete()
-
-    def check_validity(self) -> None:
-        if not self.note_body:
-            raise ValueError("Annotation must have a body")
-        if not self.dc_creator:
-            raise ValueError("Annotation must have a creator")
-        if not self.dc_date:
-            self.dc_date = datetime.now()
-
-

Ancestors

- -

Instance variables

-
-
var endElement | None
-
-

Return the corresponding annotation-end tag or None.

-
- -Expand source code - -
@property
-def end(self) -> Element | None:
-    """Return the corresponding annotation-end tag or None."""
-    name = self.name
-    parent = self.parent
-    if parent is None:
-        raise ValueError("Can't find end tag: no parent available")
-    body = self.document_body
-    if not body:
-        body = parent
-    return body.get_annotation_end(name=name)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute office:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var note_body : str
-
-
-
- -Expand source code - -
@property
-def note_body(self) -> str:
-    return self.text_content
-
-
-
var note_id : str | bool | None
-
-

Get/set the attribute text:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var startElement
-
-

Return self.

-
- -Expand source code - -
@property
-def start(self) -> Element:
-    """Return self."""
-    return self
-
-
-
-

Methods

-
-
-def check_validity(self) ‑> None -
-
-
-
- -Expand source code - -
def check_validity(self) -> None:
-    if not self.note_body:
-        raise ValueError("Annotation must have a body")
-    if not self.dc_creator:
-        raise ValueError("Annotation must have a creator")
-    if not self.dc_date:
-        self.dc_date = datetime.now()
-
-
-
-def delete(self, child: Element | None = None, keep_tail: bool = True) ‑> None -
-
-

Delete the given element from the XML tree. If no element is given, -"self" is deleted. The XML library may allow to continue to use an -element now "orphan" as long as you have a reference to it.

-

For Annotation : delete the annotation-end tag if exists.

-

Arguments

-

child – Element or None

-
- -Expand source code - -
def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-    """Delete the given element from the XML tree. If no element is given,
-    "self" is deleted. The XML library may allow to continue to use an
-    element now "orphan" as long as you have a reference to it.
-
-    For Annotation : delete the annotation-end tag if exists.
-
-    Arguments:
-
-        child -- Element or None
-    """
-    if child is not None:  # act like normal delete
-        super().delete(child)
-        return
-    end = self.end
-    if end:
-        end.delete()
-    # act like normal delete
-    super().delete()
-
-
-
-def get_annotated(self, as_text: bool = False, no_header: bool = True, clean: bool = True) ‑> Element | list | str | None -
-
-

Returns the annotated content from an annotation.

-

If no content exists (single position annotation or annotation-end not -found), returns [] (or u'' if text flag is True). -If as_text is True: returns the text content. -If clean is True: suppress unwanted tags (deletions marks, …) -If no_header is True: existing text:h are changed in text:p -By default: returns a list of odf_element, cleaned and without headers.

-

Arguments

-

as_text – boolean

-

clean – boolean

-

no_header – boolean

-

Return: list or Element or text or None

-
- -Expand source code - -
def get_annotated(
-    self,
-    as_text: bool = False,
-    no_header: bool = True,
-    clean: bool = True,
-) -> Element | list | str | None:
-    """Returns the annotated content from an annotation.
-
-    If no content exists (single position annotation or annotation-end not
-    found), returns [] (or u'' if text flag is True).
-    If as_text is True: returns the text content.
-    If clean is True: suppress unwanted tags (deletions marks, ...)
-    If no_header is True: existing text:h are changed in text:p
-    By default: returns a list of odf_element, cleaned and without headers.
-
-    Arguments:
-
-        as_text -- boolean
-
-        clean -- boolean
-
-        no_header -- boolean
-
-    Return: list or Element or text or None
-    """
-    end = self.end
-    if end is None:
-        if as_text:
-            return ""
-        return None
-    body = self.document_body
-    if not body:
-        body = self.root
-    return body.get_between(
-        self, end, as_text=as_text, no_header=no_header, clean=clean
-    )
-
-
-
-

Inherited members

- -
-
-class AnnotationEnd -(annotation: Element | None = None, name: str | None = None, **kwargs: Any) -
-
-

AnnotationEnd: the "office:annotation-end" element may be used to -define the end of a text range of document content that spans element -boundaries. In that case, an "office:annotation" element shall precede -the "office:annotation-end" element. Both elements shall have the same -value for their office:name attribute. The "office:annotation-end" element -shall be preceded by an "office:annotation" element that has the same -value for its office:name attribute as the "office:annotation-end" -element. An "office:annotation-end" element without a preceding -"office:annotation" element that has the same name assigned is ignored.

-

Initialize an AnnotationEnd element. Either annotation or name must be -provided to have proper reference for the annotation-end.

-

Arguments

-

annotation – odf_annotation element

-

name – str

-
- -Expand source code - -
class AnnotationEnd(Element):
-    """AnnotationEnd: the "office:annotation-end" element may be used to
-    define the end of a text range of document content that spans element
-    boundaries. In that case, an "office:annotation" element shall precede
-    the "office:annotation-end" element. Both elements shall have the same
-    value for their office:name attribute. The "office:annotation-end" element
-    shall be preceded by an "office:annotation" element that has the same
-    value for its office:name attribute as the "office:annotation-end"
-    element. An "office:annotation-end" element without a preceding
-    "office:annotation" element that has the same name assigned is ignored.
-    """
-
-    _tag = "office:annotation-end"
-    _properties = (PropDef("name", "office:name"),)
-
-    def __init__(
-        self,
-        annotation: Element | None = None,
-        name: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Initialize an AnnotationEnd element. Either annotation or name must be
-        provided to have proper reference for the annotation-end.
-
-        Arguments:
-
-            annotation -- odf_annotation element
-
-            name -- str
-        """
-        # fixme : use offset
-        # TODO allow paragraph and text styles
-        super().__init__(**kwargs)
-        if self._do_init:
-            if annotation:
-                name = annotation.name  # type: ignore
-            if not name:
-                raise ValueError("Annotation-end must have a name")
-            self.name = name
-
-    @property
-    def start(self) -> Element | None:
-        """Return the corresponding annotation starting tag or None."""
-        name = self.name
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can't find start tag: no parent available")
-        body = self.document_body
-        if not body:
-            body = parent
-        return body.get_annotation(name=name)
-
-    @property
-    def end(self) -> Element:
-        """Return self."""
-        return self
-
-

Ancestors

- -

Instance variables

-
-
var endElement
-
-

Return self.

-
- -Expand source code - -
@property
-def end(self) -> Element:
-    """Return self."""
-    return self
-
-
-
var name : str | bool | None
-
-

Get/set the attribute office:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var startElement | None
-
-

Return the corresponding annotation starting tag or None.

-
- -Expand source code - -
@property
-def start(self) -> Element | None:
-    """Return the corresponding annotation starting tag or None."""
-    name = self.name
-    parent = self.parent
-    if parent is None:
-        raise ValueError("Can't find start tag: no parent available")
-    body = self.document_body
-    if not body:
-        body = parent
-    return body.get_annotation(name=name)
-
-
-
-

Inherited members

- -
-
-class Note -(note_class: str = 'footnote', note_id: str | None = None, citation: str | None = None, body: str | None = None, **kwargs: Any) -
-
-

Either a footnote or a endnote element with the given text, -optionally referencing it using the given note_id.

-

Arguments

-

note_class – 'footnote' or 'endnote'

-

note_id – str

-

citation – str

-

body – str or Element

-
- -Expand source code - -
class Note(Element):
-    """Either a footnote or a endnote element with the given text,
-    optionally referencing it using the given note_id.
-
-    Arguments:
-
-        note_class -- 'footnote' or 'endnote'
-
-        note_id -- str
-
-        citation -- str
-
-        body -- str or Element
-    """
-
-    _tag = "text:note"
-    _properties = (
-        PropDef("note_class", "text:note-class"),
-        PropDef("note_id", "text:id"),
-    )
-
-    def __init__(
-        self,
-        note_class: str = "footnote",
-        note_id: str | None = None,
-        citation: str | None = None,
-        body: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.insert(Element.from_tag("text:note-body"), position=0)
-            self.insert(Element.from_tag("text:note-citation"), position=0)
-            self.note_class = note_class
-            if note_id is not None:
-                self.note_id = note_id
-            if citation is not None:
-                self.citation = citation
-            if body is not None:
-                self.note_body = body
-
-    @property
-    def citation(self) -> str:
-        note_citation = self.get_element("text:note-citation")
-        if note_citation:
-            return note_citation.text
-        return ""
-
-    @citation.setter
-    def citation(self, text: str | None) -> None:
-        note_citation = self.get_element("text:note-citation")
-        if note_citation:
-            note_citation.text = text  # type:ignore
-
-    @property
-    def note_body(self) -> str:
-        note_body = self.get_element("text:note-body")
-        if note_body:
-            return note_body.text_content
-        return ""
-
-    @note_body.setter
-    def note_body(self, text_or_element: Element | str | None) -> None:
-        note_body = self.get_element("text:note-body")
-        if not note_body:
-            return None
-        if text_or_element is None:
-            note_body.text_content = ""
-        elif isinstance(text_or_element, str):
-            note_body.text_content = text_or_element
-        elif isinstance(text_or_element, Element):
-            note_body.clear()
-            note_body.append(text_or_element)
-        else:
-            raise TypeError(f'Unexpected type for body: "{type(text_or_element)}"')
-
-    def check_validity(self) -> None:
-        if not self.note_class:
-            raise ValueError('Note class must be "footnote" or "endnote"')
-        if not self.note_id:
-            raise ValueError("Note must have an id")
-        if not self.citation:
-            raise ValueError("Note must have a citation")
-        if not self.note_body:
-            pass
-
-

Ancestors

- -

Instance variables

-
-
var citation : str
-
-
-
- -Expand source code - -
@property
-def citation(self) -> str:
-    note_citation = self.get_element("text:note-citation")
-    if note_citation:
-        return note_citation.text
-    return ""
-
-
-
var note_body : str
-
-
-
- -Expand source code - -
@property
-def note_body(self) -> str:
-    note_body = self.get_element("text:note-body")
-    if note_body:
-        return note_body.text_content
-    return ""
-
-
-
var note_class : str | bool | None
-
-

Get/set the attribute text:note-class

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var note_id : str | bool | None
-
-

Get/set the attribute text:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def check_validity(self) ‑> None -
-
-
-
- -Expand source code - -
def check_validity(self) -> None:
-    if not self.note_class:
-        raise ValueError('Note class must be "footnote" or "endnote"')
-    if not self.note_id:
-        raise ValueError("Note must have an id")
-    if not self.citation:
-        raise ValueError("Note must have a citation")
-    if not self.note_body:
-        pass
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/odfdo.html b/doc/odfdo.html new file mode 100644 index 0000000..199f41b --- /dev/null +++ b/doc/odfdo.html @@ -0,0 +1,59027 @@ + + + + + + + odfdo API documentation + + + + + + + + + +
+
+

+odfdo

+ +

odfdo

+ +

Python library for OpenDocument format (ODF)

+ +

logo

+ +

odfdo is a Python3 library implementing the ISO/IEC 26300 OpenDocument Format +standard.

+ +

Project: + https://github.com/jdum/odfdo

+ +

Author: + jerome.dumonteil@gmail.com

+ +

License: + Apache License, Version 2.0

+ +

odfdo is a derivative work of the former lpod-python project.

+ +

Installation

+ +

Installation from Pypi (recommended):

+ +
+
pip install odfdo
+
+
+ +

Installation from sources (requiring setuptools):

+ +
+
pip install .
+
+
+ +

After installation from sources, you can check everything is working (some requirements: pytest, Pillow, ...):

+ +
+
pytest
+
+
+ +

The tests should run for a few seconds or minutes and issue no error.

+ +

Usage

+ +
from odfdo import Document, Paragraph
+
+doc = Document('text')
+doc.body.append(Paragraph("Hello world!"))
+doc.save("hello.odt")
+
+ +

tl;dr

+ +

'Intended Audience :: Developers'

+ +

Documentation

+ +

There is no detailed documentation or tutorial, but:

+ +
    +
  • the recipes folder contains more than 50 working sample scripts,
  • +
  • the doc folder contains an auto generated documentation.
  • +
+ +

When installing odfdo, a few scripts are installed:

+ +
    +
  • odfdo-diff: show a diff between two .odt document.
  • +
  • odfdo-folder: convert standard ODF file to folder and files, and reverse.
  • +
  • odfdo-show: dump text from an ODF file to the standard output, and optionally styles and meta informations.
  • +
  • odfdo-styles: command line interface tool to manipulate styles of ODF files.
  • +
  • odfdo-replace: find a pattern (regex) in an ODF file and replace by some string.
  • +
  • odfdo-highlight: highlight the text matching a pattern (regex) in an ODF file.
  • +
  • odfdo-headers: print the headers of an ODF file.
  • +
+ +

About styles: the best way to apply style is by merging styles from a template +document into your generated document (See odfdo-styles script). +Styles are a complex matter in ODF, so trying to generate styles programmatically +is not recommended.

+ +

Limitations

+ +

odfdo is intended to facilitate the generation of ODF documents, +nevertheless a basic knowledge of the ODF format is necessary.

+ +

ODF document rendering can vary greatly from software to software. Especially the +"styles" of the document allow an adaptation of the rendering for a particular +software.

+ +

The best (only ?) way to apply style is by merging styles from a template +document into your generated document.

+ +

Related project

+ +

I you work on .ods files (spreadsheet), you may be interested by these scripts that +use this library to parse/generate .ods files: +https://github.com/jdum/odsgenerator and https://github.com/jdum/odsparsator

+ +

Changes from former lpod library

+ +

lpod-python was written in 2009-2010 as a Python 2.x library, +see: https://github.com/lpod/lpod-python

+ +

odfdo is an adaptation of this former project. odfdo main changes from lpod:

+ +
    +
  • odfdo requires Python version 3.9 to 3.12. For Python 3.6 to 3.8 see previous releases.
  • +
  • API change: more pythonic.
  • +
  • include recipes.
  • +
  • use Apache 2.0 license.
  • +
+
+ + + + + +
  1# Copyright 2018-2024 Jérôme Dumonteil
+  2# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
+  3#
+  4# Licensed under the Apache License, Version 2.0 (the "License");
+  5# you may not use this file except in compliance with the License.
+  6# You may obtain a copy of the License at
+  7#
+  8#     http://www.apache.org/licenses/LICENSE-2.0
+  9#
+ 10# Unless required by applicable law or agreed to in writing, software
+ 11# distributed under the License is distributed on an "AS IS" BASIS,
+ 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ 13# See the License for the specific language governing permissions and
+ 14# limitations under the License.
+ 15#
+ 16#
+ 17# Authors (odfdo project): jerome.dumonteil@gmail.com
+ 18# The odfdo project is a derivative work of the lpod-python project:
+ 19# https://github.com/lpod/lpod-python
+ 20# Authors: David Versmisse <david.versmisse@itaapy.com>
+ 21#          Hervé Cauwelier <herve@itaapy.com>
+ 22#          Romain Gauthier <romain@itaapy.com>
+ 23"""
+ 24.. include:: ../README.md
+ 25"""
+ 26
+ 27__all__ = [
+ 28    "AnimPar",
+ 29    "AnimSeq",
+ 30    "AnimTransFilter",
+ 31    "Annotation",
+ 32    "AnnotationEnd",
+ 33    "BackgroundImage",
+ 34    "Bookmark",
+ 35    "BookmarkEnd",
+ 36    "BookmarkStart",
+ 37    "Cell",
+ 38    "ChangeInfo",
+ 39    "Column",
+ 40    "ConnectorShape",
+ 41    "Container",
+ 42    "Content",
+ 43    "Content",
+ 44    "Document",
+ 45    "DrawFillImage",
+ 46    "DrawGroup",
+ 47    "DrawImage",
+ 48    "DrawPage",
+ 49    "Element",
+ 50    "ElementTyped",
+ 51    "EllipseShape",
+ 52    "FIRST_CHILD",
+ 53    "Frame",
+ 54    "Header",
+ 55    "HeaderRows",
+ 56    "IndexTitle",
+ 57    "IndexTitleTemplate",
+ 58    "LAST_CHILD",
+ 59    "LineBreak",
+ 60    "LineShape",
+ 61    "Link",
+ 62    "List",
+ 63    "ListItem",
+ 64    "Manifest",
+ 65    "Meta",
+ 66    "NEXT_SIBLING",
+ 67    "NamedRange",
+ 68    "Note",
+ 69    "PREV_SIBLING",
+ 70    "Paragraph",
+ 71    "PageBreak",
+ 72    "RectangleShape",
+ 73    "Reference",
+ 74    "ReferenceMark",
+ 75    "ReferenceMarkEnd",
+ 76    "ReferenceMarkStart",
+ 77    "Row",
+ 78    "RowGroup",
+ 79    "Section",
+ 80    "Spacer",
+ 81    "Span",
+ 82    "Style",
+ 83    "Styles",
+ 84    "TOC",
+ 85    "Tab",
+ 86    "TabStopStyle",
+ 87    "Table",
+ 88    "Text",
+ 89    "TextChange",
+ 90    "TextChangeEnd",
+ 91    "TextChangeStart",
+ 92    "TextChangedRegion",
+ 93    "TextDeletion",
+ 94    "TextFormatChange",
+ 95    "TextInsertion",
+ 96    "TocEntryTemplate",
+ 97    "TrackedChanges",
+ 98    "UserDefined",
+ 99    "UserFieldDecl",
+100    "UserFieldDecls",
+101    "UserFieldGet",
+102    "UserFieldInput",
+103    "VarChapter",
+104    "VarCreationDate",
+105    "VarCreationTime",
+106    "VarDate",
+107    "VarDecl",
+108    "VarDecls",
+109    "VarDescription",
+110    "VarFileName",
+111    "VarGet",
+112    "VarInitialCreator",
+113    "VarKeywords",
+114    "VarPageCount",
+115    "VarPageNumber",
+116    "VarSet",
+117    "VarSubject",
+118    "VarTime",
+119    "VarTitle",
+120    "XmlPart",
+121    "__version__",
+122    "create_table_cell_style",
+123    "default_boolean_style",
+124    "default_currency_style",
+125    "default_date_style",
+126    "default_frame_position_style",
+127    "default_number_style",
+128    "default_percentage_style",
+129    "default_time_style",
+130    "default_toc_level_style",
+131    "hex2rgb",
+132    "make_table_cell_border_string",
+133    "rgb2hex",
+134]
+135
+136
+137from .bookmark import Bookmark, BookmarkEnd, BookmarkStart
+138from .cell import Cell
+139from .container import Container
+140from .content import Content
+141from .document import Document
+142from .draw_page import DrawPage
+143from .element import FIRST_CHILD, LAST_CHILD, NEXT_SIBLING, PREV_SIBLING, Element, Text
+144from .element_typed import ElementTyped
+145from .frame import Frame, default_frame_position_style
+146from .header import Header
+147from .header_rows import HeaderRows
+148from .image import DrawFillImage, DrawImage
+149from .link import Link
+150from .list import List, ListItem
+151from .manifest import Manifest
+152from .meta import Meta
+153from .note import Annotation, AnnotationEnd, Note
+154from .paragraph import LineBreak, PageBreak, Paragraph, Spacer, Span, Tab
+155from .reference import Reference, ReferenceMark, ReferenceMarkEnd, ReferenceMarkStart
+156from .section import Section
+157from .shapes import ConnectorShape, DrawGroup, EllipseShape, LineShape, RectangleShape
+158from .smil import AnimPar, AnimSeq, AnimTransFilter
+159from .style import (
+160    BackgroundImage,
+161    Style,
+162    create_table_cell_style,
+163    default_boolean_style,
+164    default_currency_style,
+165    default_date_style,
+166    default_number_style,
+167    default_percentage_style,
+168    default_time_style,
+169    hex2rgb,
+170    make_table_cell_border_string,
+171    rgb2hex,
+172)
+173from .styles import Styles
+174from .table import Column, NamedRange, Row, RowGroup, Table
+175from .toc import (
+176    TOC,
+177    IndexTitle,
+178    IndexTitleTemplate,
+179    TabStopStyle,
+180    TocEntryTemplate,
+181    default_toc_level_style,
+182)
+183from .tracked_changes import (
+184    ChangeInfo,
+185    TextChange,
+186    TextChangedRegion,
+187    TextChangeEnd,
+188    TextChangeStart,
+189    TextDeletion,
+190    TextFormatChange,
+191    TextInsertion,
+192    TrackedChanges,
+193)
+194from .variable import (
+195    UserDefined,
+196    UserFieldDecl,
+197    UserFieldDecls,
+198    UserFieldGet,
+199    UserFieldInput,
+200    VarChapter,
+201    VarCreationDate,
+202    VarCreationTime,
+203    VarDate,
+204    VarDecl,
+205    VarDecls,
+206    VarDescription,
+207    VarFileName,
+208    VarGet,
+209    VarInitialCreator,
+210    VarKeywords,
+211    VarPageCount,
+212    VarPageNumber,
+213    VarSet,
+214    VarSubject,
+215    VarTime,
+216    VarTitle,
+217)
+218from .version import __version__
+219from .xmlpart import XmlPart
+
+ + +
+
+ +
+ + class + AnimPar(odfdo.Element): + + + +
+ +
32class AnimPar(Element):
+33    """A container for SMIL Presentation Animations.
+34
+35    Arguments:
+36
+37        presentation_node_type -- default, on-click, with-previous,
+38                                  after-previous, timing-root, main-sequence
+39                                  and interactive-sequence
+40
+41        smil_begin -- indefinite, 10s, [id].click, [id].begin
+42    """
+43
+44    _tag = "anim:par"
+45    _properties = (
+46        PropDef("presentation_node_type", "presentation:node-type"),
+47        PropDef("smil_begin", "smil:begin"),
+48    )
+49
+50    def __init__(
+51        self,
+52        presentation_node_type: str | None = None,
+53        smil_begin: str | None = None,
+54        **kwargs: Any,
+55    ) -> None:
+56        super().__init__(**kwargs)
+57        if self._do_init:
+58            if presentation_node_type:
+59                self.presentation_node_type = presentation_node_type
+60            if smil_begin:
+61                self.smil_begin = smil_begin
+
+ + +

A container for SMIL Presentation Animations.

+ +

Arguments:

+ +
presentation_node_type -- default, on-click, with-previous,
+                          after-previous, timing-root, main-sequence
+                          and interactive-sequence
+
+smil_begin -- indefinite, 10s, [id].click, [id].begin
+
+
+ + +
+ +
+ + AnimPar( presentation_node_type: str | None = None, smil_begin: str | None = None, **kwargs: Any) + + + +
+ +
50    def __init__(
+51        self,
+52        presentation_node_type: str | None = None,
+53        smil_begin: str | None = None,
+54        **kwargs: Any,
+55    ) -> None:
+56        super().__init__(**kwargs)
+57        if self._do_init:
+58            if presentation_node_type:
+59                self.presentation_node_type = presentation_node_type
+60            if smil_begin:
+61                self.smil_begin = smil_begin
+
+ + + + +
+
+ +
+ presentation_node_type: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ smil_begin: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + AnimSeq(odfdo.Element): + + + +
+ +
67class AnimSeq(Element):
+68    """TA container for SMIL Presentation Animations. Animations
+69    inside this block are executed after the slide has executed its initial
+70    transition.
+71
+72    Arguments:
+73
+74        presentation_node_type -- default, on-click, with-previous,
+75                                  after-previous, timing-root, main-sequence
+76                                  and interactive-sequence
+77    """
+78
+79    _tag = "anim:seq"
+80    _properties = (PropDef("presentation_node_type", "presentation:node-type"),)
+81
+82    def __init__(
+83        self,
+84        presentation_node_type: str | None = None,
+85        **kwargs: Any,
+86    ) -> None:
+87        super().__init__(**kwargs)
+88        if self._do_init and presentation_node_type:
+89            self.presentation_node_type = presentation_node_type
+
+ + +

TA container for SMIL Presentation Animations. Animations +inside this block are executed after the slide has executed its initial +transition.

+ +

Arguments:

+ +
presentation_node_type -- default, on-click, with-previous,
+                          after-previous, timing-root, main-sequence
+                          and interactive-sequence
+
+
+ + +
+ +
+ + AnimSeq(presentation_node_type: str | None = None, **kwargs: Any) + + + +
+ +
82    def __init__(
+83        self,
+84        presentation_node_type: str | None = None,
+85        **kwargs: Any,
+86    ) -> None:
+87        super().__init__(**kwargs)
+88        if self._do_init and presentation_node_type:
+89            self.presentation_node_type = presentation_node_type
+
+ + + + +
+
+ +
+ presentation_node_type: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + AnimTransFilter(odfdo.Element): + + + +
+ +
 95class AnimTransFilter(Element):
+ 96    """
+ 97    Class to make a beautiful transition between two frames.
+ 98
+ 99    Arguments:
+100      smil_dur -- XXX complete me
+101
+102      smil_type and smil_subtype -- see http://www.w3.org/TR/SMIL20/
+103                    smil-transitions.html#TransitionEffects-Appendix
+104                                    to get a list of all types/subtypes
+105
+106      smil_direction -- forward, reverse
+107
+108      smil_fadeColor -- forward, reverse
+109
+110      smil_mode -- in, out
+111    """
+112
+113    _tag = "anim:transitionFilter"
+114    _properties = (
+115        PropDef("smil_dur", "smil:dur"),
+116        PropDef("smil_type", "smil:type"),
+117        PropDef("smil_subtype", "smil:subtype"),
+118        PropDef("smil_direction", "smil:direction"),
+119        PropDef("smil_fadeColor", "smil:fadeColor"),
+120        PropDef("smil_mode", "smil:mode"),
+121    )
+122
+123    def __init__(
+124        self,
+125        smil_dur: str | None = None,
+126        smil_type: str | None = None,
+127        smil_subtype: str | None = None,
+128        smil_direction: str | None = None,
+129        smil_fadeColor: str | None = None,
+130        smil_mode: str | None = None,
+131        **kwargs: Any,
+132    ) -> None:
+133        super().__init__(**kwargs)
+134        if self._do_init:
+135            if smil_dur:
+136                self.smil_dur = smil_dur
+137            if smil_type:
+138                self.smil_type = smil_type
+139            if smil_subtype:
+140                self.smil_subtype = smil_subtype
+141            if smil_direction:
+142                self.smil_direction = smil_direction
+143            if smil_fadeColor:
+144                self.smil_fadeColor = smil_fadeColor
+145            if smil_mode:
+146                self.smil_mode = smil_mode
+
+ + +

Class to make a beautiful transition between two frames.

+ +

Arguments: + smil_dur -- XXX complete me

+ +

smil_type and smil_subtype -- see http://www.w3.org/TR/SMIL20/ + smil-transitions.html#TransitionEffects-Appendix + to get a list of all types/subtypes

+ +

smil_direction -- forward, reverse

+ +

smil_fadeColor -- forward, reverse

+ +

smil_mode -- in, out

+
+ + +
+ +
+ + AnimTransFilter( smil_dur: str | None = None, smil_type: str | None = None, smil_subtype: str | None = None, smil_direction: str | None = None, smil_fadeColor: str | None = None, smil_mode: str | None = None, **kwargs: Any) + + + +
+ +
123    def __init__(
+124        self,
+125        smil_dur: str | None = None,
+126        smil_type: str | None = None,
+127        smil_subtype: str | None = None,
+128        smil_direction: str | None = None,
+129        smil_fadeColor: str | None = None,
+130        smil_mode: str | None = None,
+131        **kwargs: Any,
+132    ) -> None:
+133        super().__init__(**kwargs)
+134        if self._do_init:
+135            if smil_dur:
+136                self.smil_dur = smil_dur
+137            if smil_type:
+138                self.smil_type = smil_type
+139            if smil_subtype:
+140                self.smil_subtype = smil_subtype
+141            if smil_direction:
+142                self.smil_direction = smil_direction
+143            if smil_fadeColor:
+144                self.smil_fadeColor = smil_fadeColor
+145            if smil_mode:
+146                self.smil_mode = smil_mode
+
+ + + + +
+
+ +
+ smil_dur: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ smil_type: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ smil_subtype: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ smil_direction: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ smil_fadeColor: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ smil_mode: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Annotation(odfdo.Element): + + + +
+ +
147class Annotation(Element):
+148    """Annotation element credited to the given creator with the
+149    given text, optionally dated (current date by default).
+150    If name not provided and some parent is provided, the name is
+151    autogenerated.
+152
+153    Arguments:
+154
+155        text -- str or odf_element
+156
+157        creator -- str
+158
+159        date -- datetime
+160
+161        name -- str
+162
+163        parent -- Element
+164    """
+165
+166    _tag = "office:annotation"
+167    _properties = (
+168        PropDef("name", "office:name"),
+169        PropDef("note_id", "text:id"),
+170    )
+171
+172    def __init__(
+173        self,
+174        text_or_element: Element | str | None = None,
+175        creator: str | None = None,
+176        date: datetime | None = None,
+177        name: str | None = None,
+178        parent: Element | None = None,
+179        **kwargs: Any,
+180    ) -> None:
+181        # fixme : use offset
+182        # TODO allow paragraph and text styles
+183        super().__init__(**kwargs)
+184
+185        if self._do_init:
+186            self.note_body = text_or_element  # type:ignore
+187            if creator:
+188                self.dc_creator = creator
+189            if date is None:
+190                date = datetime.now()
+191            self.dc_date = date
+192            if not name:
+193                name = get_unique_office_name(parent)
+194                self.name = name
+195
+196    @property
+197    def note_body(self) -> str:
+198        return self.text_content
+199
+200    @note_body.setter
+201    def note_body(self, text_or_element: Element | str | None) -> None:
+202        if text_or_element is None:
+203            self.text_content = ""
+204        elif isinstance(text_or_element, str):
+205            self.text_content = text_or_element
+206        elif isinstance(text_or_element, Element):
+207            self.clear()
+208            self.append(text_or_element)
+209        else:
+210            raise TypeError(f'Unexpected type for body: "{type(text_or_element)}"')
+211
+212    @property
+213    def start(self) -> Element:
+214        """Return self."""
+215        return self
+216
+217    @property
+218    def end(self) -> Element | None:
+219        """Return the corresponding annotation-end tag or None."""
+220        name = self.name
+221        parent = self.parent
+222        if parent is None:
+223            raise ValueError("Can't find end tag: no parent available")
+224        body = self.document_body
+225        if not body:
+226            body = parent
+227        return body.get_annotation_end(name=name)
+228
+229    def get_annotated(
+230        self,
+231        as_text: bool = False,
+232        no_header: bool = True,
+233        clean: bool = True,
+234    ) -> Element | list | str | None:
+235        """Returns the annotated content from an annotation.
+236
+237        If no content exists (single position annotation or annotation-end not
+238        found), returns [] (or "" if text flag is True).
+239        If as_text is True: returns the text content.
+240        If clean is True: suppress unwanted tags (deletions marks, ...)
+241        If no_header is True: existing text:h are changed in text:p
+242        By default: returns a list of odf_element, cleaned and without headers.
+243
+244        Arguments:
+245
+246            as_text -- boolean
+247
+248            clean -- boolean
+249
+250            no_header -- boolean
+251
+252        Return: list or Element or text or None
+253        """
+254        end = self.end
+255        if end is None:
+256            if as_text:
+257                return ""
+258            return None
+259        body = self.document_body
+260        if not body:
+261            body = self.root
+262        return body.get_between(
+263            self, end, as_text=as_text, no_header=no_header, clean=clean
+264        )
+265
+266    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
+267        """Delete the given element from the XML tree. If no element is given,
+268        "self" is deleted. The XML library may allow to continue to use an
+269        element now "orphan" as long as you have a reference to it.
+270
+271        For Annotation : delete the annotation-end tag if exists.
+272
+273        Arguments:
+274
+275            child -- Element or None
+276        """
+277        if child is not None:  # act like normal delete
+278            super().delete(child)
+279            return
+280        end = self.end
+281        if end:
+282            end.delete()
+283        # act like normal delete
+284        super().delete()
+285
+286    def check_validity(self) -> None:
+287        if not self.note_body:
+288            raise ValueError("Annotation must have a body")
+289        if not self.dc_creator:
+290            raise ValueError("Annotation must have a creator")
+291        if not self.dc_date:
+292            self.dc_date = datetime.now()
+
+ + +

Annotation element credited to the given creator with the +given text, optionally dated (current date by default). +If name not provided and some parent is provided, the name is +autogenerated.

+ +

Arguments:

+ +
text -- str or odf_element
+
+creator -- str
+
+date -- datetime
+
+name -- str
+
+parent -- Element
+
+
+ + +
+ +
+ + Annotation( text_or_element: Element | str | None = None, creator: str | None = None, date: datetime.datetime | None = None, name: str | None = None, parent: Element | None = None, **kwargs: Any) + + + +
+ +
172    def __init__(
+173        self,
+174        text_or_element: Element | str | None = None,
+175        creator: str | None = None,
+176        date: datetime | None = None,
+177        name: str | None = None,
+178        parent: Element | None = None,
+179        **kwargs: Any,
+180    ) -> None:
+181        # fixme : use offset
+182        # TODO allow paragraph and text styles
+183        super().__init__(**kwargs)
+184
+185        if self._do_init:
+186            self.note_body = text_or_element  # type:ignore
+187            if creator:
+188                self.dc_creator = creator
+189            if date is None:
+190                date = datetime.now()
+191            self.dc_date = date
+192            if not name:
+193                name = get_unique_office_name(parent)
+194                self.name = name
+
+ + + + +
+
+ +
+ note_body: str + + + +
+ +
196    @property
+197    def note_body(self) -> str:
+198        return self.text_content
+
+ + + + +
+
+ +
+ start: Element + + + +
+ +
212    @property
+213    def start(self) -> Element:
+214        """Return self."""
+215        return self
+
+ + +

Return self.

+
+ + +
+
+ +
+ end: Element | None + + + +
+ +
217    @property
+218    def end(self) -> Element | None:
+219        """Return the corresponding annotation-end tag or None."""
+220        name = self.name
+221        parent = self.parent
+222        if parent is None:
+223            raise ValueError("Can't find end tag: no parent available")
+224        body = self.document_body
+225        if not body:
+226            body = parent
+227        return body.get_annotation_end(name=name)
+
+ + +

Return the corresponding annotation-end tag or None.

+
+ + +
+
+ +
+ + def + get_annotated( self, as_text: bool = False, no_header: bool = True, clean: bool = True) -> Element | list | str | None: + + + +
+ +
229    def get_annotated(
+230        self,
+231        as_text: bool = False,
+232        no_header: bool = True,
+233        clean: bool = True,
+234    ) -> Element | list | str | None:
+235        """Returns the annotated content from an annotation.
+236
+237        If no content exists (single position annotation or annotation-end not
+238        found), returns [] (or "" if text flag is True).
+239        If as_text is True: returns the text content.
+240        If clean is True: suppress unwanted tags (deletions marks, ...)
+241        If no_header is True: existing text:h are changed in text:p
+242        By default: returns a list of odf_element, cleaned and without headers.
+243
+244        Arguments:
+245
+246            as_text -- boolean
+247
+248            clean -- boolean
+249
+250            no_header -- boolean
+251
+252        Return: list or Element or text or None
+253        """
+254        end = self.end
+255        if end is None:
+256            if as_text:
+257                return ""
+258            return None
+259        body = self.document_body
+260        if not body:
+261            body = self.root
+262        return body.get_between(
+263            self, end, as_text=as_text, no_header=no_header, clean=clean
+264        )
+
+ + +

Returns the annotated content from an annotation.

+ +

If no content exists (single position annotation or annotation-end not +found), returns [] (or "" if text flag is True). +If as_text is True: returns the text content. +If clean is True: suppress unwanted tags (deletions marks, ...) +If no_header is True: existing text:h are changed in text:p +By default: returns a list of odf_element, cleaned and without headers.

+ +

Arguments:

+ +
as_text -- boolean
+
+clean -- boolean
+
+no_header -- boolean
+
+ +

Return: list or Element or text or None

+
+ + +
+
+ +
+ + def + delete( self, child: Element | None = None, keep_tail: bool = True) -> None: + + + +
+ +
266    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
+267        """Delete the given element from the XML tree. If no element is given,
+268        "self" is deleted. The XML library may allow to continue to use an
+269        element now "orphan" as long as you have a reference to it.
+270
+271        For Annotation : delete the annotation-end tag if exists.
+272
+273        Arguments:
+274
+275            child -- Element or None
+276        """
+277        if child is not None:  # act like normal delete
+278            super().delete(child)
+279            return
+280        end = self.end
+281        if end:
+282            end.delete()
+283        # act like normal delete
+284        super().delete()
+
+ + +

Delete the given element from the XML tree. If no element is given, +"self" is deleted. The XML library may allow to continue to use an +element now "orphan" as long as you have a reference to it.

+ +

For Annotation : delete the annotation-end tag if exists.

+ +

Arguments:

+ +
child -- Element or None
+
+
+ + +
+
+ +
+ + def + check_validity(self) -> None: + + + +
+ +
286    def check_validity(self) -> None:
+287        if not self.note_body:
+288            raise ValueError("Annotation must have a body")
+289        if not self.dc_creator:
+290            raise ValueError("Annotation must have a creator")
+291        if not self.dc_date:
+292            self.dc_date = datetime.now()
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ note_id: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + AnnotationEnd(odfdo.Element): + + + +
+ +
298class AnnotationEnd(Element):
+299    """AnnotationEnd: the "office:annotation-end" element may be used to
+300    define the end of a text range of document content that spans element
+301    boundaries. In that case, an "office:annotation" element shall precede
+302    the "office:annotation-end" element. Both elements shall have the same
+303    value for their office:name attribute. The "office:annotation-end" element
+304    shall be preceded by an "office:annotation" element that has the same
+305    value for its office:name attribute as the "office:annotation-end"
+306    element. An "office:annotation-end" element without a preceding
+307    "office:annotation" element that has the same name assigned is ignored.
+308    """
+309
+310    _tag = "office:annotation-end"
+311    _properties = (PropDef("name", "office:name"),)
+312
+313    def __init__(
+314        self,
+315        annotation: Element | None = None,
+316        name: str | None = None,
+317        **kwargs: Any,
+318    ) -> None:
+319        """Initialize an AnnotationEnd element. Either annotation or name must be
+320        provided to have proper reference for the annotation-end.
+321
+322        Arguments:
+323
+324            annotation -- odf_annotation element
+325
+326            name -- str
+327        """
+328        # fixme : use offset
+329        # TODO allow paragraph and text styles
+330        super().__init__(**kwargs)
+331        if self._do_init:
+332            if annotation:
+333                name = annotation.name  # type: ignore
+334            if not name:
+335                raise ValueError("Annotation-end must have a name")
+336            self.name = name
+337
+338    @property
+339    def start(self) -> Element | None:
+340        """Return the corresponding annotation starting tag or None."""
+341        name = self.name
+342        parent = self.parent
+343        if parent is None:
+344            raise ValueError("Can't find start tag: no parent available")
+345        body = self.document_body
+346        if not body:
+347            body = parent
+348        return body.get_annotation(name=name)
+349
+350    @property
+351    def end(self) -> Element:
+352        """Return self."""
+353        return self
+
+ + +

AnnotationEnd: the "office:annotation-end" element may be used to +define the end of a text range of document content that spans element +boundaries. In that case, an "office:annotation" element shall precede +the "office:annotation-end" element. Both elements shall have the same +value for their office:name attribute. The "office:annotation-end" element +shall be preceded by an "office:annotation" element that has the same +value for its office:name attribute as the "office:annotation-end" +element. An "office:annotation-end" element without a preceding +"office:annotation" element that has the same name assigned is ignored.

+
+ + +
+ +
+ + AnnotationEnd( annotation: Element | None = None, name: str | None = None, **kwargs: Any) + + + +
+ +
313    def __init__(
+314        self,
+315        annotation: Element | None = None,
+316        name: str | None = None,
+317        **kwargs: Any,
+318    ) -> None:
+319        """Initialize an AnnotationEnd element. Either annotation or name must be
+320        provided to have proper reference for the annotation-end.
+321
+322        Arguments:
+323
+324            annotation -- odf_annotation element
+325
+326            name -- str
+327        """
+328        # fixme : use offset
+329        # TODO allow paragraph and text styles
+330        super().__init__(**kwargs)
+331        if self._do_init:
+332            if annotation:
+333                name = annotation.name  # type: ignore
+334            if not name:
+335                raise ValueError("Annotation-end must have a name")
+336            self.name = name
+
+ + +

Initialize an AnnotationEnd element. Either annotation or name must be +provided to have proper reference for the annotation-end.

+ +

Arguments:

+ +
annotation -- odf_annotation element
+
+name -- str
+
+
+ + +
+
+ +
+ start: Element | None + + + +
+ +
338    @property
+339    def start(self) -> Element | None:
+340        """Return the corresponding annotation starting tag or None."""
+341        name = self.name
+342        parent = self.parent
+343        if parent is None:
+344            raise ValueError("Can't find start tag: no parent available")
+345        body = self.document_body
+346        if not body:
+347            body = parent
+348        return body.get_annotation(name=name)
+
+ + +

Return the corresponding annotation starting tag or None.

+
+ + +
+
+ +
+ end: Element + + + +
+ +
350    @property
+351    def end(self) -> Element:
+352        """Return self."""
+353        return self
+
+ + +

Return self.

+
+ + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + BackgroundImage(odfdo.Style, odfdo.DrawImage): + + + +
+ +
1054class BackgroundImage(Style, DrawImage):
+1055    _tag = "style:background-image"
+1056    _properties: tuple[PropDef, ...] = (
+1057        PropDef("name", "style:name"),
+1058        PropDef("display_name", "style:display-name"),
+1059        PropDef("svg_font_family", "svg:font-family"),
+1060        PropDef("font_family_generic", "style:font-family-generic"),
+1061        PropDef("font_pitch", "style:font-pitch"),
+1062        PropDef("position", "style:position", "background-image"),
+1063        PropDef("repeat", "style:repeat", "background-image"),
+1064        PropDef("opacity", "draw:opacity", "background-image"),
+1065        PropDef("filter", "style:filter-name", "background-image"),
+1066        PropDef("text_style", "text:style-name"),
+1067    )
+1068
+1069    def __init__(
+1070        self,
+1071        name: str | None = None,
+1072        display_name: str | None = None,
+1073        position: str | None = None,
+1074        repeat: str | None = None,
+1075        opacity: str | None = None,
+1076        filter: str | None = None,  # noqa: A002
+1077        # Every other property
+1078        **kwargs: Any,
+1079    ):
+1080        kwargs["family"] = "background-image"
+1081        super().__init__(**kwargs)
+1082        if self._do_init:
+1083            kwargs.pop("tag", None)
+1084            kwargs.pop("tag_or_elem", None)
+1085            self.family = "background-image"
+1086            if name:
+1087                self.name = name
+1088            if display_name:
+1089                self.display_name = display_name
+1090            if position:
+1091                self.position = position
+1092            if repeat:
+1093                self.position = repeat
+1094            if opacity:
+1095                self.position = opacity
+1096            if filter:
+1097                self.position = filter
+1098            # Every other properties
+1099            for prop in BackgroundImage._properties:
+1100                if prop.name in kwargs:
+1101                    self.set_style_attribute(prop.attr, kwargs[prop.name])
+
+ + +

Style class for all these tags:

+ +

'style:style' +'number:date-style', +'number:number-style', +'number:percentage-style', +'number:time-style' +'style:font-face', +'style:master-page', +'style:page-layout', +'style:presentation-page-layout', +'text:list-style', +'text:outline-style', +'style:tab-stops', +...

+
+ + +
+ +
+ + BackgroundImage( name: str | None = None, display_name: str | None = None, position: str | None = None, repeat: str | None = None, opacity: str | None = None, filter: str | None = None, **kwargs: Any) + + + +
+ +
1069    def __init__(
+1070        self,
+1071        name: str | None = None,
+1072        display_name: str | None = None,
+1073        position: str | None = None,
+1074        repeat: str | None = None,
+1075        opacity: str | None = None,
+1076        filter: str | None = None,  # noqa: A002
+1077        # Every other property
+1078        **kwargs: Any,
+1079    ):
+1080        kwargs["family"] = "background-image"
+1081        super().__init__(**kwargs)
+1082        if self._do_init:
+1083            kwargs.pop("tag", None)
+1084            kwargs.pop("tag_or_elem", None)
+1085            self.family = "background-image"
+1086            if name:
+1087                self.name = name
+1088            if display_name:
+1089                self.display_name = display_name
+1090            if position:
+1091                self.position = position
+1092            if repeat:
+1093                self.position = repeat
+1094            if opacity:
+1095                self.position = opacity
+1096            if filter:
+1097                self.position = filter
+1098            # Every other properties
+1099            for prop in BackgroundImage._properties:
+1100                if prop.name in kwargs:
+1101                    self.set_style_attribute(prop.attr, kwargs[prop.name])
+
+ + +

Create a style of the given family. The name is not mandatory at this +point but will become required when inserting in a document as a common +style.

+ +

The display name is the name the user sees in an office application.

+ +

The parent_style is the name of the style this style will inherit from.

+ +

To set properties, pass them as keyword arguments. The area properties +apply to is optional and defaults to the family.

+ +

Arguments:

+ +
family -- 'paragraph', 'text', 'section', 'table', 'table-column',
+          'table-row', 'table-cell', 'table-page', 'chart',
+          'drawing-page', 'graphic', 'presentation',
+          'control', 'ruby', 'list', 'number', 'page-layout'
+          'font-face', or 'master-page'
+
+name -- str
+
+display_name -- str
+
+parent_style -- str
+
+area -- str
+
+ +

'text' Properties:

+ +
italic -- bool
+
+bold -- bool
+
+ +

'paragraph' Properties:

+ +
master_page -- str
+
+ +

'master-page' Properties:

+ +
page_layout -- str
+
+next_style -- str
+
+ +

'table-cell' Properties:

+ +
border, border_top, border_right, border_bottom, border_left -- str,
+e.g. "0.002cm solid #000000" or 'none'
+
+padding, padding_top, padding_right, padding_bottom, padding_left -- str,
+e.g. "0.002cm" or 'none'
+
+shadow -- str, e.g. "#808080 0.176cm 0.176cm"
+
+ +

'table-row' Properties:

+ +
height -- str, e.g. '5cm'
+
+use_optimal_height -- bool
+
+ +

'table-column' Properties:

+ +
width -- str, e.g. '5cm'
+
+break_before -- 'page', 'column' or 'auto'
+
+break_after -- 'page', 'column' or 'auto'
+
+
+ + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ display_name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ svg_font_family: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ font_family_generic: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ font_pitch: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ position: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ repeat: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ opacity: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ filter: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ text_style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+ +
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+ +
+
+
+
+ +
+ + class + Bookmark(odfdo.Element): + + + +
+ +
31class Bookmark(Element):
+32    """
+33    Bookmark class for ODF "text:bookmark"
+34
+35    Arguments:
+36
+37        name -- str
+38    """
+39
+40    _tag = "text:bookmark"
+41    _properties = (PropDef("name", "text:name"),)
+42
+43    def __init__(self, name: str = "", **kwargs: Any) -> None:
+44        super().__init__(**kwargs)
+45        if self._do_init:
+46            self.name = name
+
+ + +

Bookmark class for ODF "text:bookmark"

+ +

Arguments:

+ +
name -- str
+
+
+ + +
+ +
+ + Bookmark(name: str = '', **kwargs: Any) + + + +
+ +
43    def __init__(self, name: str = "", **kwargs: Any) -> None:
+44        super().__init__(**kwargs)
+45        if self._do_init:
+46            self.name = name
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + BookmarkEnd(odfdo.Element): + + + +
+ +
73class BookmarkEnd(Element):
+74    """
+75    BookmarkEnd class for ODF "text:bookmark-end"
+76
+77    Arguments:
+78
+79        name -- str
+80    """
+81
+82    _tag = "text:bookmark-end"
+83    _properties = (PropDef("name", "text:name"),)
+84
+85    def __init__(self, name: str = "", **kwargs: Any) -> None:
+86        super().__init__(**kwargs)
+87        if self._do_init:
+88            self.name = name
+
+ + +

BookmarkEnd class for ODF "text:bookmark-end"

+ +

Arguments:

+ +
name -- str
+
+
+ + +
+ +
+ + BookmarkEnd(name: str = '', **kwargs: Any) + + + +
+ +
85    def __init__(self, name: str = "", **kwargs: Any) -> None:
+86        super().__init__(**kwargs)
+87        if self._do_init:
+88            self.name = name
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + BookmarkStart(odfdo.Element): + + + +
+ +
52class BookmarkStart(Element):
+53    """
+54    BookmarkStart class for ODF "text:bookmark-start"
+55
+56    Arguments:
+57
+58        name -- str
+59    """
+60
+61    _tag = "text:bookmark-start"
+62    _properties = (PropDef("name", "text:name"),)
+63
+64    def __init__(self, name: str = "", **kwargs: Any) -> None:
+65        super().__init__(**kwargs)
+66        if self._do_init:
+67            self.name = name
+
+ + +

BookmarkStart class for ODF "text:bookmark-start"

+ +

Arguments:

+ +
name -- str
+
+
+ + +
+ +
+ + BookmarkStart(name: str = '', **kwargs: Any) + + + +
+ +
64    def __init__(self, name: str = "", **kwargs: Any) -> None:
+65        super().__init__(**kwargs)
+66        if self._do_init:
+67            self.name = name
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Cell(odfdo.ElementTyped): + + + +
+ +
 44class Cell(ElementTyped):
+ 45    """ "table:table-cell" table cell element."""
+ 46
+ 47    _tag = "table:table-cell"
+ 48    _caching = True
+ 49
+ 50    def __init__(
+ 51        self,
+ 52        value: Any = None,
+ 53        text: str | None = None,
+ 54        cell_type: str | None = None,
+ 55        currency: str | None = None,
+ 56        formula: str | None = None,
+ 57        repeated: int | None = None,
+ 58        style: str | None = None,
+ 59        **kwargs: Any,
+ 60    ) -> None:
+ 61        """Create a cell element containing the given value. The textual
+ 62        representation is automatically formatted but can be provided. Cell
+ 63        type can be deduced as well, unless the number is a percentage or
+ 64        currency. If cell type is "currency", the currency must be given.
+ 65        The cell can be repeated on the given number of columns.
+ 66
+ 67        Arguments:
+ 68
+ 69            value -- bool, int, float, Decimal, date, datetime, str,
+ 70                     timedelta
+ 71
+ 72            text -- str
+ 73
+ 74            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+ 75                         'string' or 'time'
+ 76
+ 77            currency -- three-letter str
+ 78
+ 79            repeated -- int
+ 80
+ 81            style -- str
+ 82        """
+ 83        super().__init__(**kwargs)
+ 84        self.x = None
+ 85        self.y = None
+ 86        if self._do_init:
+ 87            self.set_value(
+ 88                value,
+ 89                text=text,
+ 90                cell_type=cell_type,
+ 91                currency=currency,
+ 92                formula=formula,
+ 93            )
+ 94            if repeated and repeated > 1:
+ 95                self.repeated = repeated
+ 96            if style is not None:
+ 97                self.style = style
+ 98
+ 99    @property
+100    def clone(self) -> Cell:
+101        clone = Element.clone.fget(self)  # type: ignore
+102        clone.y = self.y
+103        clone.x = self.x
+104        if hasattr(self, "_tmap"):
+105            if hasattr(self, "_rmap"):
+106                clone._rmap = self._rmap[:]
+107            clone._tmap = self._tmap[:]
+108            clone._cmap = self._cmap[:]
+109        return clone
+110
+111    @property
+112    def value(
+113        self,
+114    ) -> str | bool | int | Float | Decimal | date | datetime | timedelta | None:
+115        """Set / get the value of the cell. The type is read from the
+116        'office:value-type' attribute of the cell. When setting the value,
+117        the type of the value will determine the new value_type of the cell.
+118
+119        Warning: use this method for boolean, float or string only.
+120        """
+121        value_type = self.get_attribute_string("office:value-type")
+122        if value_type == "boolean":
+123            return self.get_attribute("office:boolean-value")
+124        if value_type in {"float", "percentage", "currency"}:
+125            value_decimal = Decimal(str(self.get_attribute_string("office:value")))
+126            # Return 3 instead of 3.0 if possible
+127            if int(value_decimal) == value_decimal:
+128                return int(value_decimal)
+129            return value_decimal
+130        if value_type == "date":
+131            value_str = str(self.get_attribute_string("office:date-value"))
+132            if "T" in value_str:
+133                return DateTime.decode(value_str)
+134            return Date.decode(value_str)
+135        if value_type == "time":
+136            return Duration.decode(str(self.get_attribute_string("office:time-value")))
+137        if value_type == "string":
+138            value = self.get_attribute_string("office:string-value")
+139            if value is not None:
+140                return value
+141            value_list = []
+142            for para in self.get_elements("text:p"):
+143                value_list.append(para.text_recursive)
+144            return "\n".join(value_list)
+145        return None
+146
+147    @value.setter
+148    def value(self, value: str | bytes | bool | int | Float | Decimal | None) -> None:
+149        self.clear()
+150        if value is None:
+151            return
+152        if isinstance(value, (str, bytes)):
+153            if isinstance(value, bytes):
+154                value = bytes_to_str(value)
+155            self.set_attribute("office:value-type", "string")
+156            self.set_attribute("office:string-value", value)
+157            self.text = value
+158            return
+159        if value is True or value is False:
+160            self.set_attribute("office:value-type", "boolean")
+161            value_bool = Boolean.encode(value)
+162            self.set_attribute("office:boolean-value", value_bool)
+163            self.text = value_bool
+164            return
+165        if isinstance(value, (int, Float, Decimal)):
+166            self.set_attribute("office:value-type", "float")
+167            value_str = str(value)
+168            self.set_attribute("office:value", value_str)
+169            self.text = value_str
+170            return
+171        raise TypeError(f"Unknown value type, try with set_value() : {value!r}")
+172
+173    @property
+174    def float(self) -> Float:
+175        """Set / get the value of the cell as a float (or 0.0)."""
+176        for tag in ("office:value", "office:string-value", "office:boolean-value"):
+177            read_attr = self.get_attribute(tag)
+178            if isinstance(read_attr, str):
+179                with contextlib.suppress(ValueError, TypeError):
+180                    return Float(read_attr)
+181        return 0.0
+182
+183    @float.setter
+184    def float(self, value: str | Float | int | Decimal) -> None:
+185        try:
+186            value_float = Float(value)
+187        except (ValueError, TypeError):
+188            value_float = 0.0
+189        value_str = str(value_float)
+190        self.clear()
+191        self.set_attribute("office:value", value_str)
+192        self.set_attribute("office:value-type", "float")
+193        self.text = value_str
+194
+195    @property
+196    def string(self) -> str:
+197        """Set / get the value of the cell as a string (or '')."""
+198        value = self.get_attribute_string("office:string-value")
+199        if isinstance(value, str):
+200            return value
+201        return ""
+202
+203    @string.setter
+204    def string(
+205        self,
+206        value: str | bytes | int | Float | Decimal | bool | None,  # type: ignore
+207    ) -> None:
+208        self.clear()
+209        if value is None:
+210            value_str = ""
+211        else:
+212            value_str = str(value)
+213        self.set_attribute("office:value-type", "string")
+214        self.set_attribute("office:string-value", value_str)
+215        self.text = value_str
+216
+217    def set_value(
+218        self,
+219        value: (
+220            str  # type: ignore
+221            | bytes
+222            | Float
+223            | int
+224            | Decimal
+225            | bool
+226            | datetime
+227            | date
+228            | timedelta
+229            | None
+230        ),
+231        text: str | None = None,
+232        cell_type: str | None = None,
+233        currency: str | None = None,
+234        formula: str | None = None,
+235    ) -> None:
+236        """Set the cell state from the Python value type.
+237
+238        Text is how the cell is displayed. Cell type is guessed,
+239        unless provided.
+240
+241        For monetary values, provide the name of the currency.
+242
+243        Arguments:
+244
+245            value -- Python type
+246
+247            text -- str
+248
+249            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+250                        'currency' or 'percentage'
+251
+252            currency -- str
+253        """
+254        self.clear()
+255        text = self.set_value_and_type(
+256            value=value,
+257            text=text,
+258            value_type=cell_type,
+259            currency=currency,
+260        )
+261        if text is not None:
+262            self.text_content = text
+263        if formula is not None:
+264            self.formula = formula
+265
+266    @property
+267    def type(self) -> str | None:
+268        """Get / set the type of the cell: boolean, float, date, string
+269        or time.
+270
+271        Return: str | None
+272        """
+273        return self.get_attribute_string("office:value-type")
+274
+275    @type.setter
+276    def type(self, cell_type: str) -> None:
+277        self.set_attribute("office:value-type", cell_type)
+278
+279    @property
+280    def currency(self) -> str | None:
+281        """Get / set the currency used for monetary values.
+282
+283        Return: str | None
+284        """
+285        return self.get_attribute_string("office:currency")
+286
+287    @currency.setter
+288    def currency(self, currency: str) -> None:
+289        self.set_attribute("office:currency", currency)
+290
+291    def _set_repeated(self, repeated: int | None) -> None:
+292        """Internal only. Set the numnber of times the cell is repeated, or
+293        None to delete. Without changing cache.
+294        """
+295        if repeated is None or repeated < 2:
+296            with contextlib.suppress(KeyError):
+297                self.del_attribute("table:number-columns-repeated")
+298            return
+299        self.set_attribute("table:number-columns-repeated", str(repeated))
+300
+301    @property
+302    def repeated(self) -> int | None:
+303        """Get / set the number of times the cell is repeated.
+304
+305        Always None when using the table API.
+306
+307        Return: int or None
+308        """
+309        repeated = self.get_attribute("table:number-columns-repeated")
+310        if repeated is None:
+311            return None
+312        return int(repeated)
+313
+314    @repeated.setter
+315    def repeated(self, repeated: int | None) -> None:
+316        self._set_repeated(repeated)
+317        # update cache
+318        child: Element = self
+319        while True:
+320            # look for Row, parent may be group of rows
+321            upper = child.parent
+322            if not upper:
+323                # lonely cell
+324                return
+325            # parent may be group of rows, not table
+326            if isinstance(upper, Element) and upper._tag == "table:table-row":
+327                break
+328            child = upper
+329        # fixme : need to optimize this
+330        if isinstance(upper, Element) and upper._tag == "table:table-row":
+331            upper._compute_row_cache()
+332
+333    @property
+334    def style(self) -> str | None:
+335        """Get / set the style of the cell itself.
+336
+337        Return: str | None
+338        """
+339        return self.get_attribute_string("table:style-name")
+340
+341    @style.setter
+342    def style(self, style: str | Element) -> None:
+343        self.set_style_attribute("table:style-name", style)
+344
+345    @property
+346    def formula(self) -> str | None:
+347        """Get / set the formula of the cell, or None if undefined.
+348
+349        The formula is not interpreted in any way.
+350
+351        Return: str | None
+352        """
+353        return self.get_attribute_string("table:formula")
+354
+355    @formula.setter
+356    def formula(self, formula: str | None) -> None:
+357        self.set_attribute("table:formula", formula)
+358
+359    def is_empty(self, aggressive: bool = False) -> bool:
+360        if self.value is not None or self.children:
+361            return False
+362        if not aggressive and self.style is not None:
+363            return False
+364        return True
+365
+366    def _is_spanned(self) -> bool:
+367        if self.tag == "table:covered-table-cell":
+368            return True
+369        if self.get_attribute("table:number-columns-spanned") is not None:
+370            return True
+371        if self.get_attribute("table:number-rows-spanned") is not None:
+372            return True
+373        return False
+
+ + +

"table:table-cell" table cell element.

+
+ + +
+ +
+ + Cell( value: Any = None, text: str | None = None, cell_type: str | None = None, currency: str | None = None, formula: str | None = None, repeated: int | None = None, style: str | None = None, **kwargs: Any) + + + +
+ +
50    def __init__(
+51        self,
+52        value: Any = None,
+53        text: str | None = None,
+54        cell_type: str | None = None,
+55        currency: str | None = None,
+56        formula: str | None = None,
+57        repeated: int | None = None,
+58        style: str | None = None,
+59        **kwargs: Any,
+60    ) -> None:
+61        """Create a cell element containing the given value. The textual
+62        representation is automatically formatted but can be provided. Cell
+63        type can be deduced as well, unless the number is a percentage or
+64        currency. If cell type is "currency", the currency must be given.
+65        The cell can be repeated on the given number of columns.
+66
+67        Arguments:
+68
+69            value -- bool, int, float, Decimal, date, datetime, str,
+70                     timedelta
+71
+72            text -- str
+73
+74            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+75                         'string' or 'time'
+76
+77            currency -- three-letter str
+78
+79            repeated -- int
+80
+81            style -- str
+82        """
+83        super().__init__(**kwargs)
+84        self.x = None
+85        self.y = None
+86        if self._do_init:
+87            self.set_value(
+88                value,
+89                text=text,
+90                cell_type=cell_type,
+91                currency=currency,
+92                formula=formula,
+93            )
+94            if repeated and repeated > 1:
+95                self.repeated = repeated
+96            if style is not None:
+97                self.style = style
+
+ + +

Create a cell element containing the given value. The textual +representation is automatically formatted but can be provided. Cell +type can be deduced as well, unless the number is a percentage or +currency. If cell type is "currency", the currency must be given. +The cell can be repeated on the given number of columns.

+ +

Arguments:

+ +
value -- bool, int, float, Decimal, date, datetime, str,
+         timedelta
+
+text -- str
+
+cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+             'string' or 'time'
+
+currency -- three-letter str
+
+repeated -- int
+
+style -- str
+
+
+ + +
+
+
+ x + + +
+ + + + +
+
+
+ y + + +
+ + + + +
+
+ +
+ clone: Cell + + + +
+ +
 99    @property
+100    def clone(self) -> Cell:
+101        clone = Element.clone.fget(self)  # type: ignore
+102        clone.y = self.y
+103        clone.x = self.x
+104        if hasattr(self, "_tmap"):
+105            if hasattr(self, "_rmap"):
+106                clone._rmap = self._rmap[:]
+107            clone._tmap = self._tmap[:]
+108            clone._cmap = self._cmap[:]
+109        return clone
+
+ + + + +
+
+ +
+ value: str | bool | int | float | decimal.Decimal | datetime.date | datetime.datetime | datetime.timedelta | None + + + +
+ +
111    @property
+112    def value(
+113        self,
+114    ) -> str | bool | int | Float | Decimal | date | datetime | timedelta | None:
+115        """Set / get the value of the cell. The type is read from the
+116        'office:value-type' attribute of the cell. When setting the value,
+117        the type of the value will determine the new value_type of the cell.
+118
+119        Warning: use this method for boolean, float or string only.
+120        """
+121        value_type = self.get_attribute_string("office:value-type")
+122        if value_type == "boolean":
+123            return self.get_attribute("office:boolean-value")
+124        if value_type in {"float", "percentage", "currency"}:
+125            value_decimal = Decimal(str(self.get_attribute_string("office:value")))
+126            # Return 3 instead of 3.0 if possible
+127            if int(value_decimal) == value_decimal:
+128                return int(value_decimal)
+129            return value_decimal
+130        if value_type == "date":
+131            value_str = str(self.get_attribute_string("office:date-value"))
+132            if "T" in value_str:
+133                return DateTime.decode(value_str)
+134            return Date.decode(value_str)
+135        if value_type == "time":
+136            return Duration.decode(str(self.get_attribute_string("office:time-value")))
+137        if value_type == "string":
+138            value = self.get_attribute_string("office:string-value")
+139            if value is not None:
+140                return value
+141            value_list = []
+142            for para in self.get_elements("text:p"):
+143                value_list.append(para.text_recursive)
+144            return "\n".join(value_list)
+145        return None
+
+ + +

Set / get the value of the cell. The type is read from the +'office:value-type' attribute of the cell. When setting the value, +the type of the value will determine the new value_type of the cell.

+ +

Warning: use this method for boolean, float or string only.

+
+ + +
+
+ +
+ float: float + + + +
+ +
173    @property
+174    def float(self) -> Float:
+175        """Set / get the value of the cell as a float (or 0.0)."""
+176        for tag in ("office:value", "office:string-value", "office:boolean-value"):
+177            read_attr = self.get_attribute(tag)
+178            if isinstance(read_attr, str):
+179                with contextlib.suppress(ValueError, TypeError):
+180                    return Float(read_attr)
+181        return 0.0
+
+ + +

Set / get the value of the cell as a float (or 0.0).

+
+ + +
+
+ +
+ string: str + + + +
+ +
195    @property
+196    def string(self) -> str:
+197        """Set / get the value of the cell as a string (or '')."""
+198        value = self.get_attribute_string("office:string-value")
+199        if isinstance(value, str):
+200            return value
+201        return ""
+
+ + +

Set / get the value of the cell as a string (or '').

+
+ + +
+
+ +
+ + def + set_value( self, value: str | bytes | float | int | decimal.Decimal | bool | datetime.datetime | datetime.date | datetime.timedelta | None, text: str | None = None, cell_type: str | None = None, currency: str | None = None, formula: str | None = None) -> None: + + + +
+ +
217    def set_value(
+218        self,
+219        value: (
+220            str  # type: ignore
+221            | bytes
+222            | Float
+223            | int
+224            | Decimal
+225            | bool
+226            | datetime
+227            | date
+228            | timedelta
+229            | None
+230        ),
+231        text: str | None = None,
+232        cell_type: str | None = None,
+233        currency: str | None = None,
+234        formula: str | None = None,
+235    ) -> None:
+236        """Set the cell state from the Python value type.
+237
+238        Text is how the cell is displayed. Cell type is guessed,
+239        unless provided.
+240
+241        For monetary values, provide the name of the currency.
+242
+243        Arguments:
+244
+245            value -- Python type
+246
+247            text -- str
+248
+249            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+250                        'currency' or 'percentage'
+251
+252            currency -- str
+253        """
+254        self.clear()
+255        text = self.set_value_and_type(
+256            value=value,
+257            text=text,
+258            value_type=cell_type,
+259            currency=currency,
+260        )
+261        if text is not None:
+262            self.text_content = text
+263        if formula is not None:
+264            self.formula = formula
+
+ + +

Set the cell state from the Python value type.

+ +

Text is how the cell is displayed. Cell type is guessed, +unless provided.

+ +

For monetary values, provide the name of the currency.

+ +

Arguments:

+ +
value -- Python type
+
+text -- str
+
+cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+            'currency' or 'percentage'
+
+currency -- str
+
+
+ + +
+
+ +
+ type: str | None + + + +
+ +
266    @property
+267    def type(self) -> str | None:
+268        """Get / set the type of the cell: boolean, float, date, string
+269        or time.
+270
+271        Return: str | None
+272        """
+273        return self.get_attribute_string("office:value-type")
+
+ + +

Get / set the type of the cell: boolean, float, date, string +or time.

+ +

Return: str | None

+
+ + +
+
+ +
+ currency: str | None + + + +
+ +
279    @property
+280    def currency(self) -> str | None:
+281        """Get / set the currency used for monetary values.
+282
+283        Return: str | None
+284        """
+285        return self.get_attribute_string("office:currency")
+
+ + +

Get / set the currency used for monetary values.

+ +

Return: str | None

+
+ + +
+
+ +
+ repeated: int | None + + + +
+ +
301    @property
+302    def repeated(self) -> int | None:
+303        """Get / set the number of times the cell is repeated.
+304
+305        Always None when using the table API.
+306
+307        Return: int or None
+308        """
+309        repeated = self.get_attribute("table:number-columns-repeated")
+310        if repeated is None:
+311            return None
+312        return int(repeated)
+
+ + +

Get / set the number of times the cell is repeated.

+ +

Always None when using the table API.

+ +

Return: int or None

+
+ + +
+
+ +
+ style: str | None + + + +
+ +
333    @property
+334    def style(self) -> str | None:
+335        """Get / set the style of the cell itself.
+336
+337        Return: str | None
+338        """
+339        return self.get_attribute_string("table:style-name")
+
+ + +

Get / set the style of the cell itself.

+ +

Return: str | None

+
+ + +
+
+ +
+ formula: str | None + + + +
+ +
345    @property
+346    def formula(self) -> str | None:
+347        """Get / set the formula of the cell, or None if undefined.
+348
+349        The formula is not interpreted in any way.
+350
+351        Return: str | None
+352        """
+353        return self.get_attribute_string("table:formula")
+
+ + +

Get / set the formula of the cell, or None if undefined.

+ +

The formula is not interpreted in any way.

+ +

Return: str | None

+
+ + +
+
+ +
+ + def + is_empty(self, aggressive: bool = False) -> bool: + + + +
+ +
359    def is_empty(self, aggressive: bool = False) -> bool:
+360        if self.value is not None or self.children:
+361            return False
+362        if not aggressive and self.style is not None:
+363            return False
+364        return True
+
+ + +

Check if the element is empty : no text, no children, no tail.

+ +

Return: Boolean

+
+ + +
+
+
Inherited Members
+
+ +
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + ChangeInfo(odfdo.Element): + + + +
+ +
 37class ChangeInfo(Element):
+ 38    """The "office:change-info" element represents who made a change and when.
+ 39    It may also contain a comment (one or more Paragrah "text:p" elements)
+ 40    on the change.
+ 41
+ 42    The comments available in the ChangeInfo are available through:
+ 43      - get_paragraphs and get_paragraph methods for actual Paragraph.
+ 44      - get_comments for a plain text version
+ 45
+ 46      Arguments:
+ 47
+ 48         creator -- str (or None)
+ 49
+ 50         date -- datetime (or None)
+ 51    """
+ 52
+ 53    _tag = "office:change-info"
+ 54
+ 55    def __init__(
+ 56        self,
+ 57        creator: str | None = None,
+ 58        date: datetime | None = None,
+ 59        **kwargs: Any,
+ 60    ) -> None:
+ 61        super().__init__(**kwargs)
+ 62        if self._do_init:
+ 63            self.set_dc_creator(creator)
+ 64            self.set_dc_date(date)
+ 65
+ 66    def set_dc_creator(self, creator: str | None = None) -> None:
+ 67        """Set the creator of the change. Default for creator is 'Unknown'.
+ 68
+ 69        Arguments:
+ 70
+ 71            creator -- str (or None)
+ 72        """
+ 73        element = self.get_element("dc:creator")
+ 74        if element is None:
+ 75            element = Element.from_tag("dc:creator")
+ 76            self.insert(element, xmlposition=FIRST_CHILD)
+ 77        if not creator:
+ 78            creator = "Unknown"
+ 79        element.text = creator
+ 80
+ 81    def set_dc_date(self, date: datetime | None = None) -> None:
+ 82        """Set the date of the change. If date is None, use current time.
+ 83
+ 84        Arguments:
+ 85
+ 86            date -- datetime (or None)
+ 87        """
+ 88        if date is None:
+ 89            date = datetime.now()
+ 90        dcdate = DateTime.encode(date)
+ 91        element = self.get_element("dc:date")
+ 92        if element is None:
+ 93            element = Element.from_tag("dc:date")
+ 94            self.insert(element, xmlposition=LAST_CHILD)
+ 95        element.text = dcdate
+ 96
+ 97    def get_comments(self, joined: bool = True) -> str | list[str]:
+ 98        """Get text content of the comments. If joined is True (default), the
+ 99        text of different paragraphs is concatenated, else a list of strings,
+100        one per paragraph, is returned.
+101
+102        Arguments:
+103
+104            joined -- boolean (default is True)
+105
+106        Return: str or list of str.
+107        """
+108        content = self.get_paragraphs()
+109        if content is None:
+110            content = []
+111        text = [para.get_formatted_text(simple=True) for para in content]  # type: ignore
+112        if joined:
+113            return "\n".join(text)
+114        return text
+115
+116    def set_comments(self, text: str = "", replace: bool = True) -> None:
+117        """Set the text content of the comments. If replace is True (default),
+118        the new text replace old comments, else it is added at the end.
+119
+120        Arguments:
+121
+122            text -- str
+123
+124            replace -- boolean
+125        """
+126        if replace:
+127            for para in self.get_paragraphs():
+128                self.delete(para)
+129        para = Paragraph()
+130        para.append_plain_text(text)
+131        self.insert(para, xmlposition=LAST_CHILD)
+
+ + +

The "office:change-info" element represents who made a change and when. +It may also contain a comment (one or more Paragrah "text:p" elements) +on the change.

+ +

The comments available in the ChangeInfo are available through:

+ +
    +
  • get_paragraphs and get_paragraph methods for actual Paragraph.
  • +
  • get_comments for a plain text version
  • +
+ +

Arguments:

+ +
 creator -- str (or None)
+
+ date -- datetime (or None)
+
+
+ + +
+ +
+ + ChangeInfo( creator: str | None = None, date: datetime.datetime | None = None, **kwargs: Any) + + + +
+ +
55    def __init__(
+56        self,
+57        creator: str | None = None,
+58        date: datetime | None = None,
+59        **kwargs: Any,
+60    ) -> None:
+61        super().__init__(**kwargs)
+62        if self._do_init:
+63            self.set_dc_creator(creator)
+64            self.set_dc_date(date)
+
+ + + + +
+
+ +
+ + def + set_dc_creator(self, creator: str | None = None) -> None: + + + +
+ +
66    def set_dc_creator(self, creator: str | None = None) -> None:
+67        """Set the creator of the change. Default for creator is 'Unknown'.
+68
+69        Arguments:
+70
+71            creator -- str (or None)
+72        """
+73        element = self.get_element("dc:creator")
+74        if element is None:
+75            element = Element.from_tag("dc:creator")
+76            self.insert(element, xmlposition=FIRST_CHILD)
+77        if not creator:
+78            creator = "Unknown"
+79        element.text = creator
+
+ + +

Set the creator of the change. Default for creator is 'Unknown'.

+ +

Arguments:

+ +
creator -- str (or None)
+
+
+ + +
+
+ +
+ + def + set_dc_date(self, date: datetime.datetime | None = None) -> None: + + + +
+ +
81    def set_dc_date(self, date: datetime | None = None) -> None:
+82        """Set the date of the change. If date is None, use current time.
+83
+84        Arguments:
+85
+86            date -- datetime (or None)
+87        """
+88        if date is None:
+89            date = datetime.now()
+90        dcdate = DateTime.encode(date)
+91        element = self.get_element("dc:date")
+92        if element is None:
+93            element = Element.from_tag("dc:date")
+94            self.insert(element, xmlposition=LAST_CHILD)
+95        element.text = dcdate
+
+ + +

Set the date of the change. If date is None, use current time.

+ +

Arguments:

+ +
date -- datetime (or None)
+
+
+ + +
+
+ +
+ + def + get_comments(self, joined: bool = True) -> str | list[str]: + + + +
+ +
 97    def get_comments(self, joined: bool = True) -> str | list[str]:
+ 98        """Get text content of the comments. If joined is True (default), the
+ 99        text of different paragraphs is concatenated, else a list of strings,
+100        one per paragraph, is returned.
+101
+102        Arguments:
+103
+104            joined -- boolean (default is True)
+105
+106        Return: str or list of str.
+107        """
+108        content = self.get_paragraphs()
+109        if content is None:
+110            content = []
+111        text = [para.get_formatted_text(simple=True) for para in content]  # type: ignore
+112        if joined:
+113            return "\n".join(text)
+114        return text
+
+ + +

Get text content of the comments. If joined is True (default), the +text of different paragraphs is concatenated, else a list of strings, +one per paragraph, is returned.

+ +

Arguments:

+ +
joined -- boolean (default is True)
+
+ +

Return: str or list of str.

+
+ + +
+
+ +
+ + def + set_comments(self, text: str = '', replace: bool = True) -> None: + + + +
+ +
116    def set_comments(self, text: str = "", replace: bool = True) -> None:
+117        """Set the text content of the comments. If replace is True (default),
+118        the new text replace old comments, else it is added at the end.
+119
+120        Arguments:
+121
+122            text -- str
+123
+124            replace -- boolean
+125        """
+126        if replace:
+127            for para in self.get_paragraphs():
+128                self.delete(para)
+129        para = Paragraph()
+130        para.append_plain_text(text)
+131        self.insert(para, xmlposition=LAST_CHILD)
+
+ + +

Set the text content of the comments. If replace is True (default), +the new text replace old comments, else it is added at the end.

+ +

Arguments:

+ +
text -- str
+
+replace -- boolean
+
+
+ + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Column(odfdo.Element): + + + +
+ +
164class Column(Element):
+165    """ODF table column "table:table-column" """
+166
+167    _tag = "table:table-column"
+168    _caching = True
+169
+170    def __init__(
+171        self,
+172        default_cell_style: str | None = None,
+173        repeated: int | None = None,
+174        style: str | None = None,
+175        **kwargs: Any,
+176    ) -> None:
+177        """Create a column group element of the optionally given style. Cell
+178        style can be set for the whole column. If the properties apply to
+179        several columns, give the number of repeated columns.
+180
+181        Columns don't contain cells, just style information.
+182
+183        You don't generally have to create columns by hand, use the Table API.
+184
+185        Arguments:
+186
+187            default_cell_style -- str
+188
+189            repeated -- int
+190
+191            style -- str
+192        """
+193        super().__init__(**kwargs)
+194        self.x = None
+195        if self._do_init:
+196            if default_cell_style:
+197                self.set_default_cell_style(default_cell_style)
+198            if repeated and repeated > 1:
+199                self.repeated = repeated
+200            if style:
+201                self.style = style
+202
+203    @property
+204    def clone(self) -> Column:
+205        clone = Element.clone.fget(self)  # type: ignore
+206        clone.x = self.x
+207        if hasattr(self, "_tmap"):
+208            if hasattr(self, "_rmap"):
+209                clone._rmap = self._rmap[:]
+210            clone._tmap = self._tmap[:]
+211            clone._cmap = self._cmap[:]
+212        return clone
+213
+214    def get_default_cell_style(self) -> str | None:
+215        return self.get_attribute_string("table:default-cell-style-name")
+216
+217    def set_default_cell_style(self, style: Element | str) -> None:
+218        self.set_style_attribute("table:default-cell-style-name", style)
+219
+220    def _set_repeated(self, repeated: int | None) -> None:
+221        """Internal only. Set the number of times the column is repeated, or
+222        None to delete it. Without changing cache.
+223
+224        Arguments:
+225
+226            repeated -- int or None
+227        """
+228        if repeated is None or repeated < 2:
+229            with contextlib.suppress(KeyError):
+230                self.del_attribute("table:number-columns-repeated")
+231            return
+232        self.set_attribute("table:number-columns-repeated", str(repeated))
+233
+234    @property
+235    def repeated(self) -> int | None:
+236        """Get /set the number of times the column is repeated.
+237
+238        Always None when using the table API.
+239
+240        Return: int or None
+241        """
+242        repeated = self.get_attribute("table:number-columns-repeated")
+243        if repeated is None:
+244            return None
+245        return int(repeated)
+246
+247    @repeated.setter
+248    def repeated(self, repeated: int | None) -> None:
+249        self._set_repeated(repeated)
+250        # update cache
+251        current: Element = self
+252        while True:
+253            # look for Table, parent may be group of rows
+254            upper = current.parent
+255            if not upper:
+256                # lonely column
+257                return
+258            # parent may be group of rows, not table
+259            if isinstance(upper, Table):
+260                break
+261            current = upper
+262        # fixme : need to optimize this
+263        if isinstance(upper, Table):
+264            upper._compute_table_cache()
+265            if hasattr(self, "_cmap"):
+266                del self._cmap[:]
+267                self._cmap.extend(upper._cmap)
+268            else:
+269                self._cmap = upper._cmap
+270
+271    @property
+272    def style(self) -> str | None:
+273        """Get /set the style of the column itself.
+274
+275        Return: str
+276        """
+277        return self.get_attribute_string("table:style-name")
+278
+279    @style.setter
+280    def style(self, style: str | Element) -> None:
+281        self.set_style_attribute("table:style-name", style)
+
+ + +

ODF table column "table:table-column"

+
+ + +
+ +
+ + Column( default_cell_style: str | None = None, repeated: int | None = None, style: str | None = None, **kwargs: Any) + + + +
+ +
170    def __init__(
+171        self,
+172        default_cell_style: str | None = None,
+173        repeated: int | None = None,
+174        style: str | None = None,
+175        **kwargs: Any,
+176    ) -> None:
+177        """Create a column group element of the optionally given style. Cell
+178        style can be set for the whole column. If the properties apply to
+179        several columns, give the number of repeated columns.
+180
+181        Columns don't contain cells, just style information.
+182
+183        You don't generally have to create columns by hand, use the Table API.
+184
+185        Arguments:
+186
+187            default_cell_style -- str
+188
+189            repeated -- int
+190
+191            style -- str
+192        """
+193        super().__init__(**kwargs)
+194        self.x = None
+195        if self._do_init:
+196            if default_cell_style:
+197                self.set_default_cell_style(default_cell_style)
+198            if repeated and repeated > 1:
+199                self.repeated = repeated
+200            if style:
+201                self.style = style
+
+ + +

Create a column group element of the optionally given style. Cell +style can be set for the whole column. If the properties apply to +several columns, give the number of repeated columns.

+ +

Columns don't contain cells, just style information.

+ +

You don't generally have to create columns by hand, use the Table API.

+ +

Arguments:

+ +
default_cell_style -- str
+
+repeated -- int
+
+style -- str
+
+
+ + +
+
+
+ x + + +
+ + + + +
+
+ +
+ clone: Column + + + +
+ +
203    @property
+204    def clone(self) -> Column:
+205        clone = Element.clone.fget(self)  # type: ignore
+206        clone.x = self.x
+207        if hasattr(self, "_tmap"):
+208            if hasattr(self, "_rmap"):
+209                clone._rmap = self._rmap[:]
+210            clone._tmap = self._tmap[:]
+211            clone._cmap = self._cmap[:]
+212        return clone
+
+ + + + +
+
+ +
+ + def + get_default_cell_style(self) -> str | None: + + + +
+ +
214    def get_default_cell_style(self) -> str | None:
+215        return self.get_attribute_string("table:default-cell-style-name")
+
+ + + + +
+
+ +
+ + def + set_default_cell_style(self, style: Element | str) -> None: + + + +
+ +
217    def set_default_cell_style(self, style: Element | str) -> None:
+218        self.set_style_attribute("table:default-cell-style-name", style)
+
+ + + + +
+
+ +
+ repeated: int | None + + + +
+ +
234    @property
+235    def repeated(self) -> int | None:
+236        """Get /set the number of times the column is repeated.
+237
+238        Always None when using the table API.
+239
+240        Return: int or None
+241        """
+242        repeated = self.get_attribute("table:number-columns-repeated")
+243        if repeated is None:
+244            return None
+245        return int(repeated)
+
+ + +

Get /set the number of times the column is repeated.

+ +

Always None when using the table API.

+ +

Return: int or None

+
+ + +
+
+ +
+ style: str | None + + + +
+ +
271    @property
+272    def style(self) -> str | None:
+273        """Get /set the style of the column itself.
+274
+275        Return: str
+276        """
+277        return self.get_attribute_string("table:style-name")
+
+ + +

Get /set the style of the column itself.

+ +

Return: str

+
+ + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + ConnectorShape(odfdo.shapes.ShapeBase): + + + +
+ +
242class ConnectorShape(ShapeBase):
+243    """Create a Connector shape.
+244
+245    Arguments:
+246
+247        style -- str
+248
+249        text_style -- str
+250
+251        draw_id -- str
+252
+253        layer -- str
+254
+255        connected_shapes -- (shape, shape)
+256
+257        glue_points -- (point, point)
+258
+259        p1 -- (str, str)
+260
+261        p2 -- (str, str)
+262    """
+263
+264    _tag = "draw:connector"
+265    _properties: tuple[PropDef, ...] = (
+266        PropDef("start_shape", "draw:start-shape"),
+267        PropDef("end_shape", "draw:end-shape"),
+268        PropDef("start_glue_point", "draw:start-glue-point"),
+269        PropDef("end_glue_point", "draw:end-glue-point"),
+270        PropDef("x1", "svg:x1"),
+271        PropDef("y1", "svg:y1"),
+272        PropDef("x2", "svg:x2"),
+273        PropDef("y2", "svg:y2"),
+274    )
+275
+276    def __init__(
+277        self,
+278        style: str | None = None,
+279        text_style: str | None = None,
+280        draw_id: str | None = None,
+281        layer: str | None = None,
+282        connected_shapes: tuple | None = None,
+283        glue_points: tuple | None = None,
+284        p1: tuple | None = None,
+285        p2: tuple | None = None,
+286        **kwargs: Any,
+287    ) -> None:
+288        kwargs.update(
+289            {
+290                "style": style,
+291                "text_style": text_style,
+292                "draw_id": draw_id,
+293                "layer": layer,
+294            }
+295        )
+296        super().__init__(**kwargs)
+297        if self._do_init:
+298            if connected_shapes:
+299                self.start_shape = connected_shapes[0].draw_id
+300                self.end_shape = connected_shapes[1].draw_id
+301            if glue_points:
+302                self.start_glue_point = glue_points[0]
+303                self.end_glue_point = glue_points[1]
+304            if p1:
+305                self.x1 = p1[0]
+306                self.y1 = p1[1]
+307            if p2:
+308                self.x2 = p2[0]
+309                self.y2 = p2[1]
+
+ + +

Create a Connector shape.

+ +

Arguments:

+ +
style -- str
+
+text_style -- str
+
+draw_id -- str
+
+layer -- str
+
+connected_shapes -- (shape, shape)
+
+glue_points -- (point, point)
+
+p1 -- (str, str)
+
+p2 -- (str, str)
+
+
+ + +
+ +
+ + ConnectorShape( style: str | None = None, text_style: str | None = None, draw_id: str | None = None, layer: str | None = None, connected_shapes: tuple | None = None, glue_points: tuple | None = None, p1: tuple | None = None, p2: tuple | None = None, **kwargs: Any) + + + +
+ +
276    def __init__(
+277        self,
+278        style: str | None = None,
+279        text_style: str | None = None,
+280        draw_id: str | None = None,
+281        layer: str | None = None,
+282        connected_shapes: tuple | None = None,
+283        glue_points: tuple | None = None,
+284        p1: tuple | None = None,
+285        p2: tuple | None = None,
+286        **kwargs: Any,
+287    ) -> None:
+288        kwargs.update(
+289            {
+290                "style": style,
+291                "text_style": text_style,
+292                "draw_id": draw_id,
+293                "layer": layer,
+294            }
+295        )
+296        super().__init__(**kwargs)
+297        if self._do_init:
+298            if connected_shapes:
+299                self.start_shape = connected_shapes[0].draw_id
+300                self.end_shape = connected_shapes[1].draw_id
+301            if glue_points:
+302                self.start_glue_point = glue_points[0]
+303                self.end_glue_point = glue_points[1]
+304            if p1:
+305                self.x1 = p1[0]
+306                self.y1 = p1[1]
+307            if p2:
+308                self.x2 = p2[0]
+309                self.y2 = p2[1]
+
+ + + + +
+
+ +
+ start_shape: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ end_shape: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ start_glue_point: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ end_glue_point: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ x1: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ y1: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ x2: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ y2: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
odfdo.shapes.ShapeBase
+
get_formatted_text
+
draw_id
+
layer
+
width
+
height
+
pos_x
+
pos_y
+
presentation_class
+
style
+
text_style
+ +
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
odfdo.frame.SizeMix
+
size
+ +
+
odfdo.frame.PosMix
+
position
+ +
+
+
+
+
+ +
+ + class + Container: + + + +
+ +
 55class Container:
+ 56    """Representation of the ODF file."""
+ 57
+ 58    def __init__(self, path: Path | str | io.BytesIO | None = None) -> None:
+ 59        self.__parts: dict[str, bytes | None] = {}
+ 60        self.__parts_ts: dict[str, int] = {}
+ 61        self.__path_like: Path | str | io.BytesIO | None = None
+ 62        self.__packaging: str = "zip"
+ 63        self.path: Path | None = None  # or Path
+ 64        if path:
+ 65            self.open(path)
+ 66
+ 67    def __repr__(self) -> str:
+ 68        return f"<{self.__class__.__name__} type={self.mimetype} path={self.path}>"
+ 69
+ 70    def open(self, path_or_file: Path | str | io.BytesIO) -> None:
+ 71        """Load the content of an ODF file."""
+ 72        self.__path_like = path_or_file
+ 73        if isinstance(path_or_file, (str, Path)):
+ 74            self.path = Path(path_or_file)
+ 75            if not self.path.exists():
+ 76                raise FileNotFoundError(str(self.path))
+ 77        if (self.path or isinstance(path_or_file, io.BytesIO)) and is_zipfile(
+ 78            path_or_file
+ 79        ):
+ 80            self.__packaging = "zip"
+ 81            return self._read_zip()
+ 82        if self.path:
+ 83            is_folder = False
+ 84            with contextlib.suppress(OSError):
+ 85                is_folder = self.path.is_dir()
+ 86            if is_folder:
+ 87                self.__packaging = "folder"
+ 88                return self._read_folder()
+ 89        raise TypeError(f"Document format not managed by odfdo: {type(path_or_file)}.")
+ 90
+ 91    def _read_zip(self) -> None:
+ 92        if isinstance(self.__path_like, io.BytesIO):
+ 93            self.__path_like.seek(0)
+ 94        with ZipFile(self.__path_like) as zf:  # type: ignore
+ 95            mimetype = bytes_to_str(zf.read("mimetype"))
+ 96            if mimetype not in ODF_MIMETYPES:
+ 97                raise ValueError(f"Document of unknown type {mimetype}")
+ 98            self.__parts["mimetype"] = str_to_bytes(mimetype)
+ 99        if self.path is None:
+100            if isinstance(self.__path_like, io.BytesIO):
+101                self.__path_like.seek(0)
+102            # read the full file at once and forget file
+103            with ZipFile(self.__path_like) as zf:  # type: ignore
+104                for name in zf.namelist():
+105                    upath = normalize_path(name)
+106                    self.__parts[upath] = zf.read(name)
+107            self.__path_like = None
+108
+109    def _read_folder(self) -> None:
+110        try:
+111            mimetype, timestamp = self._get_folder_part("mimetype")
+112        except OSError:
+113            printwarn("Corrupted or not an OpenDocument folder (missing mimetype)")
+114            mimetype = b""
+115            timestamp = int(time.time())
+116        if bytes_to_str(mimetype) not in ODF_MIMETYPES:
+117            message = f"Document of unknown type {mimetype!r}, try with ODF Text."
+118            printwarn(message)
+119            self.__parts["mimetype"] = str_to_bytes(ODF_EXTENSIONS["odt"])
+120            self.__parts_ts["mimetype"] = timestamp
+121
+122    def _parse_folder(self, folder: str) -> list[str]:
+123        parts = []
+124        if self.path is None:
+125            raise ValueError("Document path is not defined")
+126        root = self.path / folder
+127        for path in root.iterdir():
+128            if path.name.startswith("."):  # no hidden files
+129                continue
+130            relative_path = path.relative_to(self.path)
+131            if path.is_file():
+132                parts.append(relative_path.as_posix())
+133            if path.is_dir():
+134                sub_parts = self._parse_folder(str(relative_path))
+135                if sub_parts:
+136                    parts.extend(sub_parts)
+137                else:
+138                    # store leaf directories
+139                    parts.append(relative_path.as_posix() + "/")
+140        return parts
+141
+142    def _get_folder_parts(self) -> list[str]:
+143        """Get the list of members in the ODF folder."""
+144        return self._parse_folder("")
+145
+146    def _get_folder_part(self, name: str) -> tuple[bytes, int]:
+147        """Get bytes of a part from the ODF folder, with timestamp."""
+148        if self.path is None:
+149            raise ValueError("Document path is not defined")
+150        path = self.path / name
+151        timestamp = int(path.stat().st_mtime)
+152        if path.is_dir():
+153            return (b"", timestamp)
+154        return (path.read_bytes(), timestamp)
+155
+156    def _get_folder_part_timestamp(self, name: str) -> int:
+157        if self.path is None:
+158            raise ValueError("Document path is not defined")
+159        path = self.path / name
+160        try:
+161            timestamp = int(path.stat().st_mtime)
+162        except OSError:
+163            timestamp = -1
+164        return timestamp
+165
+166    def _get_zip_part(self, name: str) -> bytes | None:
+167        """Get bytes of a part from the Zip ODF file. No cache."""
+168        if self.path is None:
+169            raise ValueError("Document path is not defined")
+170        try:
+171            with ZipFile(self.path) as zf:
+172                upath = normalize_path(name)
+173                self.__parts[upath] = zf.read(name)
+174                return self.__parts[upath]
+175        except BadZipfile:
+176            return None
+177
+178    def _get_all_zip_part(self) -> None:
+179        """Read all parts. No cache."""
+180        if self.path is None:
+181            raise ValueError("Document path is not defined")
+182        try:
+183            with ZipFile(self.path) as zf:
+184                for name in zf.namelist():
+185                    upath = normalize_path(name)
+186                    self.__parts[upath] = zf.read(name)
+187        except BadZipfile:
+188            pass
+189
+190    def _save_zip(self, target: str | Path | io.BytesIO) -> None:
+191        """Save a Zip ODF from the available parts."""
+192        parts = self.__parts
+193        with ZipFile(target, "w", compression=ZIP_DEFLATED) as filezip:
+194            # Parts to save, except manifest at the end
+195            part_names = list(parts.keys())
+196            try:
+197                part_names.remove(ODF_MANIFEST)
+198            except ValueError:
+199                printwarn(f"Missing '{ODF_MANIFEST}'")
+200            # "Pretty-save" parts in some order
+201            # mimetype requires to be first and uncompressed
+202            mimetype = parts.get("mimetype")
+203            if mimetype is None:
+204                raise ValueError("Mimetype is not defined")
+205            try:
+206                filezip.writestr("mimetype", mimetype, ZIP_STORED)
+207                part_names.remove("mimetype")
+208            except (ValueError, KeyError):
+209                printwarn("Missing 'mimetype'")
+210            # XML parts
+211            for path in ODF_CONTENT, ODF_META, ODF_SETTINGS, ODF_STYLES:
+212                if path not in parts:
+213                    printwarn(f"Missing '{path}'")
+214                    continue
+215                part = parts[path]
+216                if part is None:
+217                    continue
+218                filezip.writestr(path, part)
+219                part_names.remove(path)
+220            # Everything else
+221            for path in part_names:
+222                data = parts[path]
+223                if data is None:
+224                    # Deleted
+225                    continue
+226                filezip.writestr(path, data)
+227            # Manifest
+228            with contextlib.suppress(KeyError):
+229                part = parts[ODF_MANIFEST]
+230                if part is not None:
+231                    filezip.writestr(ODF_MANIFEST, part)
+232
+233    def _save_folder(self, folder: Path | str) -> None:
+234        """Save a folder ODF from the available parts."""
+235
+236        def dump(part_path: str, content: bytes) -> None:
+237            if part_path.endswith("/"):  # folder
+238                is_folder = True
+239                pure_path = PurePath(folder, part_path[:-1])
+240            else:
+241                is_folder = False
+242                pure_path = PurePath(folder, part_path)
+243            path = Path(pure_path)
+244            if is_folder:
+245                path.mkdir(parents=True, exist_ok=True)
+246            else:
+247                path.parent.mkdir(parents=True, exist_ok=True)
+248                path.write_bytes(content)
+249                path.chmod(0o666)
+250
+251        for part_path, data in self.__parts.items():
+252            if data is None:
+253                # Deleted
+254                continue
+255            dump(part_path, data)
+256
+257    # Public API
+258
+259    def get_parts(self) -> list[str]:
+260        """Get the list of members."""
+261        if not self.path:
+262            # maybe a file like zip archive
+263            return list(self.__parts.keys())
+264        if self.__packaging == "zip":
+265            parts = []
+266            with ZipFile(self.path) as zf:
+267                for name in zf.namelist():
+268                    upath = normalize_path(name)
+269                    parts.append(upath)
+270            return parts
+271        elif self.__packaging == "folder":
+272            return self._get_folder_parts()
+273        else:
+274            raise ValueError("Unable to provide parts of the document")
+275
+276    def get_part(self, path: str) -> str | bytes | None:
+277        """Get the bytes of a part of the ODF."""
+278        path = str(path)
+279        if path in self.__parts:
+280            part = self.__parts[path]
+281            if part is None:
+282                raise ValueError(f'Part "{path}" is deleted')
+283            if self.__packaging == "folder":
+284                cache_ts = self.__parts_ts.get(path, -1)
+285                current_ts = self._get_folder_part_timestamp(path)
+286                if current_ts != cache_ts:
+287                    part, timestamp = self._get_folder_part(path)
+288                    self.__parts[path] = part
+289                    self.__parts_ts[path] = timestamp
+290            return part
+291        if self.__packaging == "zip":
+292            return self._get_zip_part(path)
+293        if self.__packaging == "folder":
+294            part, timestamp = self._get_folder_part(path)
+295            self.__parts[path] = part
+296            self.__parts_ts[path] = timestamp
+297            return part
+298        return None
+299
+300    @property
+301    def mimetype(self) -> str:
+302        """Return str value of mimetype of the document."""
+303        with contextlib.suppress(Exception):
+304            b_mimetype = self.get_part("mimetype")
+305            if isinstance(b_mimetype, bytes):
+306                return bytes_to_str(b_mimetype)
+307        return ""
+308
+309    @mimetype.setter
+310    def mimetype(self, mimetype: str | bytes) -> None:
+311        """Set mimetype value of the document."""
+312        if isinstance(mimetype, str):
+313            self.__parts["mimetype"] = str_to_bytes(mimetype)
+314        elif isinstance(mimetype, bytes):
+315            self.__parts["mimetype"] = mimetype
+316        else:
+317            raise TypeError(f'Wrong mimetype "{mimetype!r}"')
+318
+319    def set_part(self, path: str, data: bytes) -> None:
+320        """Replace or add a new part."""
+321        self.__parts[path] = data
+322
+323    def del_part(self, path: str) -> None:
+324        """Mark a part for deletion."""
+325        self.__parts[path] = None
+326
+327    @property
+328    def clone(self) -> Container:
+329        """Make a copy of this container with no path."""
+330        if self.path and self.__packaging == "zip":
+331            self._get_all_zip_part()
+332        clone = deepcopy(self)
+333        clone.path = None
+334        return clone
+335
+336    @staticmethod
+337    def _do_backup(target: str | Path) -> None:
+338        path = Path(target)
+339        if not path.exists():
+340            return
+341        back_file = Path(path.stem + ".backup" + path.suffix)
+342        if back_file.is_dir():
+343            try:
+344                shutil.rmtree(back_file)
+345            except OSError as e:
+346                printwarn(str(e))
+347        try:
+348            shutil.move(target, back_file)
+349        except OSError as e:
+350            printwarn(str(e))
+351
+352    def _save_packaging(self, packaging: str | None) -> str:
+353        if not packaging:
+354            packaging = self.__packaging if self.__packaging else "zip"
+355        packaging = packaging.strip().lower()
+356        # if packaging not in ('zip', 'flat', 'folder'):
+357        if packaging not in ("zip", "folder"):
+358            raise ValueError(f'Packaging of type "{packaging}" is not supported')
+359        return packaging
+360
+361    def _save_target(self, target: str | Path | io.BytesIO | None) -> str | io.BytesIO:
+362        if target is None:
+363            target = self.path
+364        if isinstance(target, Path):
+365            target = str(target)
+366        if isinstance(target, str):
+367            while target.endswith(os.sep):
+368                target = target[:-1]
+369            while target.endswith(".folder"):
+370                target = target.split(".folder", 1)[0]
+371        return target  # type: ignore
+372
+373    def _save_as_zip(self, target: str | Path | io.BytesIO, backup: bool) -> None:
+374        if isinstance(target, (str, Path)) and backup:
+375            self._do_backup(target)
+376        self._save_zip(target)
+377
+378    def _save_as_folder(self, target: str | Path, backup: bool) -> None:
+379        if not isinstance(target, (str, Path)):
+380            raise TypeError(
+381                f"Saving in folder format requires a folder name, not '{target!r}'"
+382            )
+383        if not str(target).endswith(".folder"):
+384            target = str(target) + ".folder"
+385        if backup:
+386            self._do_backup(target)
+387        else:
+388            path = Path(target)
+389            if path.exists():
+390                try:
+391                    shutil.rmtree(path)
+392                except OSError as e:
+393                    printwarn(str(e))
+394        self._save_folder(target)
+395
+396    def save(
+397        self,
+398        target: str | Path | io.BytesIO | None,
+399        packaging: str | None = None,
+400        backup: bool = False,
+401    ) -> None:
+402        """Save the container to the given target, a path or a file-like
+403        object.
+404
+405        Package the output document in the same format than current document,
+406        unless "packaging" is different.
+407
+408        Arguments:
+409
+410            target -- str or file-like or Path
+411
+412            packaging -- 'zip', or for debugging purpose 'folder'
+413
+414            backup -- boolean
+415        """
+416        parts = self.__parts
+417        packaging = self._save_packaging(packaging)
+418        # Load parts else they will be considered deleted
+419        for path in self.get_parts():
+420            if path not in parts:
+421                self.get_part(path)
+422        target = self._save_target(target)
+423        if packaging == "folder":
+424            if isinstance(target, io.BytesIO):
+425                raise TypeError(
+426                    "Impossible to save on io.BytesIO with 'folder' packaging"
+427                )
+428            self._save_as_folder(target, backup)
+429        else:
+430            # default:
+431            self._save_as_zip(target, backup)
+
+ + +

Representation of the ODF file.

+
+ + +
+ +
+ + Container(path: pathlib.Path | str | _io.BytesIO | None = None) + + + +
+ +
58    def __init__(self, path: Path | str | io.BytesIO | None = None) -> None:
+59        self.__parts: dict[str, bytes | None] = {}
+60        self.__parts_ts: dict[str, int] = {}
+61        self.__path_like: Path | str | io.BytesIO | None = None
+62        self.__packaging: str = "zip"
+63        self.path: Path | None = None  # or Path
+64        if path:
+65            self.open(path)
+
+ + + + +
+
+
+ path: pathlib.Path | None + + +
+ + + + +
+
+ +
+ + def + open(self, path_or_file: pathlib.Path | str | _io.BytesIO) -> None: + + + +
+ +
70    def open(self, path_or_file: Path | str | io.BytesIO) -> None:
+71        """Load the content of an ODF file."""
+72        self.__path_like = path_or_file
+73        if isinstance(path_or_file, (str, Path)):
+74            self.path = Path(path_or_file)
+75            if not self.path.exists():
+76                raise FileNotFoundError(str(self.path))
+77        if (self.path or isinstance(path_or_file, io.BytesIO)) and is_zipfile(
+78            path_or_file
+79        ):
+80            self.__packaging = "zip"
+81            return self._read_zip()
+82        if self.path:
+83            is_folder = False
+84            with contextlib.suppress(OSError):
+85                is_folder = self.path.is_dir()
+86            if is_folder:
+87                self.__packaging = "folder"
+88                return self._read_folder()
+89        raise TypeError(f"Document format not managed by odfdo: {type(path_or_file)}.")
+
+ + +

Load the content of an ODF file.

+
+ + +
+
+ +
+ + def + get_parts(self) -> list[str]: + + + +
+ +
259    def get_parts(self) -> list[str]:
+260        """Get the list of members."""
+261        if not self.path:
+262            # maybe a file like zip archive
+263            return list(self.__parts.keys())
+264        if self.__packaging == "zip":
+265            parts = []
+266            with ZipFile(self.path) as zf:
+267                for name in zf.namelist():
+268                    upath = normalize_path(name)
+269                    parts.append(upath)
+270            return parts
+271        elif self.__packaging == "folder":
+272            return self._get_folder_parts()
+273        else:
+274            raise ValueError("Unable to provide parts of the document")
+
+ + +

Get the list of members.

+
+ + +
+
+ +
+ + def + get_part(self, path: str) -> str | bytes | None: + + + +
+ +
276    def get_part(self, path: str) -> str | bytes | None:
+277        """Get the bytes of a part of the ODF."""
+278        path = str(path)
+279        if path in self.__parts:
+280            part = self.__parts[path]
+281            if part is None:
+282                raise ValueError(f'Part "{path}" is deleted')
+283            if self.__packaging == "folder":
+284                cache_ts = self.__parts_ts.get(path, -1)
+285                current_ts = self._get_folder_part_timestamp(path)
+286                if current_ts != cache_ts:
+287                    part, timestamp = self._get_folder_part(path)
+288                    self.__parts[path] = part
+289                    self.__parts_ts[path] = timestamp
+290            return part
+291        if self.__packaging == "zip":
+292            return self._get_zip_part(path)
+293        if self.__packaging == "folder":
+294            part, timestamp = self._get_folder_part(path)
+295            self.__parts[path] = part
+296            self.__parts_ts[path] = timestamp
+297            return part
+298        return None
+
+ + +

Get the bytes of a part of the ODF.

+
+ + +
+
+ +
+ mimetype: str + + + +
+ +
300    @property
+301    def mimetype(self) -> str:
+302        """Return str value of mimetype of the document."""
+303        with contextlib.suppress(Exception):
+304            b_mimetype = self.get_part("mimetype")
+305            if isinstance(b_mimetype, bytes):
+306                return bytes_to_str(b_mimetype)
+307        return ""
+
+ + +

Return str value of mimetype of the document.

+
+ + +
+
+ +
+ + def + set_part(self, path: str, data: bytes) -> None: + + + +
+ +
319    def set_part(self, path: str, data: bytes) -> None:
+320        """Replace or add a new part."""
+321        self.__parts[path] = data
+
+ + +

Replace or add a new part.

+
+ + +
+
+ +
+ + def + del_part(self, path: str) -> None: + + + +
+ +
323    def del_part(self, path: str) -> None:
+324        """Mark a part for deletion."""
+325        self.__parts[path] = None
+
+ + +

Mark a part for deletion.

+
+ + +
+
+ +
+ clone: Container + + + +
+ +
327    @property
+328    def clone(self) -> Container:
+329        """Make a copy of this container with no path."""
+330        if self.path and self.__packaging == "zip":
+331            self._get_all_zip_part()
+332        clone = deepcopy(self)
+333        clone.path = None
+334        return clone
+
+ + +

Make a copy of this container with no path.

+
+ + +
+
+ +
+ + def + save( self, target: str | pathlib.Path | _io.BytesIO | None, packaging: str | None = None, backup: bool = False) -> None: + + + +
+ +
396    def save(
+397        self,
+398        target: str | Path | io.BytesIO | None,
+399        packaging: str | None = None,
+400        backup: bool = False,
+401    ) -> None:
+402        """Save the container to the given target, a path or a file-like
+403        object.
+404
+405        Package the output document in the same format than current document,
+406        unless "packaging" is different.
+407
+408        Arguments:
+409
+410            target -- str or file-like or Path
+411
+412            packaging -- 'zip', or for debugging purpose 'folder'
+413
+414            backup -- boolean
+415        """
+416        parts = self.__parts
+417        packaging = self._save_packaging(packaging)
+418        # Load parts else they will be considered deleted
+419        for path in self.get_parts():
+420            if path not in parts:
+421                self.get_part(path)
+422        target = self._save_target(target)
+423        if packaging == "folder":
+424            if isinstance(target, io.BytesIO):
+425                raise TypeError(
+426                    "Impossible to save on io.BytesIO with 'folder' packaging"
+427                )
+428            self._save_as_folder(target, backup)
+429        else:
+430            # default:
+431            self._save_as_zip(target, backup)
+
+ + +

Save the container to the given target, a path or a file-like +object.

+ +

Package the output document in the same format than current document, +unless "packaging" is different.

+ +

Arguments:

+ +
target -- str or file-like or Path
+
+packaging -- 'zip', or for debugging purpose 'folder'
+
+backup -- boolean
+
+
+ + +
+
+
+ +
+ + class + Content(odfdo.XmlPart): + + + +
+ +
 34class Content(XmlPart):
+ 35    @property
+ 36    def body(self) -> Element:
+ 37        body = self.root.document_body
+ 38        if not isinstance(body, Element):
+ 39            raise ValueError("No body found in document")  # noqa:TRY004
+ 40        return body
+ 41
+ 42    # The following two seem useless but they match styles API
+ 43
+ 44    def _get_style_contexts(self, family: str | None) -> tuple:
+ 45        if family == "font-face":
+ 46            return (self.get_element("//office:font-face-decls"),)
+ 47        return (
+ 48            self.get_element("//office:font-face-decls"),
+ 49            self.get_element("//office:automatic-styles"),
+ 50        )
+ 51
+ 52    def __str__(self) -> str:
+ 53        return str(self.body)
+ 54
+ 55    # Public API
+ 56
+ 57    def get_styles(self, family: str | None = None) -> list[Style]:
+ 58        """Return the list of styles in the Content part, optionally limited
+ 59        to the given family.
+ 60
+ 61        Arguments:
+ 62
+ 63            family -- str or None
+ 64
+ 65        Return: list of Style
+ 66        """
+ 67        result: list[Style] = []
+ 68        for context in self._get_style_contexts(family):
+ 69            if context is None:
+ 70                continue
+ 71            result.extend(context.get_styles(family=family))
+ 72        return result
+ 73
+ 74    def get_style(
+ 75        self,
+ 76        family: str,
+ 77        name_or_element: str | Element | None = None,
+ 78        display_name: str | None = None,
+ 79    ) -> Style | None:
+ 80        """Return the style uniquely identified by the name/family pair. If
+ 81        the argument is already a style object, it will return it.
+ 82
+ 83        If the name is None, the default style is fetched.
+ 84
+ 85        If the name is not the internal name but the name you gave in the
+ 86        desktop application, use display_name instead.
+ 87
+ 88        Arguments:
+ 89
+ 90            family -- 'paragraph', 'text', 'graphic', 'table', 'list',
+ 91                      'number'
+ 92
+ 93            name_or_element -- str or Style
+ 94
+ 95            display_name -- str
+ 96
+ 97        Return: Style or None if not found
+ 98        """
+ 99        for context in self._get_style_contexts(family):
+100            if context is None:
+101                continue
+102            style = context.get_style(
+103                family,
+104                name_or_element=name_or_element,
+105                display_name=display_name,
+106            )
+107            if style is not None:
+108                return style
+109        return None
+
+ + +

Representation of an XML part.

+ +

Abstraction of the XML library behind.

+
+ + +
+ +
+ body: Element + + + +
+ +
35    @property
+36    def body(self) -> Element:
+37        body = self.root.document_body
+38        if not isinstance(body, Element):
+39            raise ValueError("No body found in document")  # noqa:TRY004
+40        return body
+
+ + + + +
+
+ +
+ + def + get_styles(self, family: str | None = None) -> list[Style]: + + + +
+ +
57    def get_styles(self, family: str | None = None) -> list[Style]:
+58        """Return the list of styles in the Content part, optionally limited
+59        to the given family.
+60
+61        Arguments:
+62
+63            family -- str or None
+64
+65        Return: list of Style
+66        """
+67        result: list[Style] = []
+68        for context in self._get_style_contexts(family):
+69            if context is None:
+70                continue
+71            result.extend(context.get_styles(family=family))
+72        return result
+
+ + +

Return the list of styles in the Content part, optionally limited +to the given family.

+ +

Arguments:

+ +
family -- str or None
+
+ +

Return: list of Style

+
+ + +
+
+ +
+ + def + get_style( self, family: str, name_or_element: str | Element | None = None, display_name: str | None = None) -> Style | None: + + + +
+ +
 74    def get_style(
+ 75        self,
+ 76        family: str,
+ 77        name_or_element: str | Element | None = None,
+ 78        display_name: str | None = None,
+ 79    ) -> Style | None:
+ 80        """Return the style uniquely identified by the name/family pair. If
+ 81        the argument is already a style object, it will return it.
+ 82
+ 83        If the name is None, the default style is fetched.
+ 84
+ 85        If the name is not the internal name but the name you gave in the
+ 86        desktop application, use display_name instead.
+ 87
+ 88        Arguments:
+ 89
+ 90            family -- 'paragraph', 'text', 'graphic', 'table', 'list',
+ 91                      'number'
+ 92
+ 93            name_or_element -- str or Style
+ 94
+ 95            display_name -- str
+ 96
+ 97        Return: Style or None if not found
+ 98        """
+ 99        for context in self._get_style_contexts(family):
+100            if context is None:
+101                continue
+102            style = context.get_style(
+103                family,
+104                name_or_element=name_or_element,
+105                display_name=display_name,
+106            )
+107            if style is not None:
+108                return style
+109        return None
+
+ + +

Return the style uniquely identified by the name/family pair. If +the argument is already a style object, it will return it.

+ +

If the name is None, the default style is fetched.

+ +

If the name is not the internal name but the name you gave in the +desktop application, use display_name instead.

+ +

Arguments:

+ +
family -- 'paragraph', 'text', 'graphic', 'table', 'list',
+          'number'
+
+name_or_element -- str or Style
+
+display_name -- str
+
+ +

Return: Style or None if not found

+
+ + +
+
+
Inherited Members
+
+ +
+
+
+
+ +
+ + class + Document: + + + +
+ +
 155class Document:
+ 156    """Abstraction of the ODF document.
+ 157
+ 158    To create a new Document, several possibilities:
+ 159
+ 160        - Document() or Document("text") -> an "empty" document of type text
+ 161        - Document("spreadsheet") -> an "empty" document of type spreadsheet
+ 162        - Document("presentation") -> an "empty" document of type presentation
+ 163        - Document("drawing") -> an "empty" document of type drawing
+ 164
+ 165        Meaning of “empty”: these documents are copies of the default
+ 166        templates documents provided with this library, which, as templates,
+ 167        are not really empty. It may be useful to clear the newly created
+ 168        document: document.body.clear(), or adjust meta informations like
+ 169        description or default language: document.meta.set_language('fr-FR')
+ 170
+ 171    If the argument is not a known template type, or is a Path,
+ 172    Document(file) will load the content of the ODF file.
+ 173
+ 174    To explicitly create a document from a custom template, use the
+ 175    Document.new(path) method whose argument is the path to the template file.
+ 176    """
+ 177
+ 178    def __init__(
+ 179        self,
+ 180        target: str | bytes | Path | Container | io.BytesIO | None = "text",
+ 181    ) -> None:
+ 182        # Cache of XML parts
+ 183        self.__xmlparts: dict[str, XmlPart] = {}
+ 184        # Cache of the body
+ 185        self.__body: Element | None = None
+ 186        self.container: Container | None = None
+ 187        if isinstance(target, bytes):
+ 188            # eager conversion
+ 189            target = bytes_to_str(target)
+ 190        if target is None:
+ 191            # empty document, you probably don't wnat this.
+ 192            self.container = Container()
+ 193            return
+ 194        if isinstance(target, Path):
+ 195            # let's assume we open a container on existing file
+ 196            self.container = Container(target)
+ 197            return
+ 198        if isinstance(target, Container):
+ 199            # special internal case, use an existing container
+ 200            self.container = target
+ 201            return
+ 202        if isinstance(target, str):
+ 203            if target in ODF_TEMPLATES:
+ 204                # assuming a new document from templates
+ 205                self.container = container_from_template(target)
+ 206                return
+ 207            # let's assume we open a container on existing file
+ 208            self.container = Container(target)
+ 209            return
+ 210        if isinstance(target, io.BytesIO):
+ 211            self.container = Container(target)
+ 212            return
+ 213        raise TypeError(f"Unknown Document source type: '{target!r}'")
+ 214
+ 215    def __repr__(self) -> str:
+ 216        return f"<{self.__class__.__name__} type={self.get_type()} path={self.path}>"
+ 217
+ 218    def __str__(self) -> str:
+ 219        try:
+ 220            return str(self.get_formatted_text())
+ 221        except NotImplementedError:
+ 222            return self.body.text_recursive
+ 223
+ 224    @classmethod
+ 225    def new(cls, template: str | Path | io.BytesIO = "text") -> Document:
+ 226        """Create a Document from a template.
+ 227
+ 228        The template argument is expected to be the path to a ODF template.
+ 229
+ 230        Arguments:
+ 231
+ 232            template -- str or Path or file-like (io.BytesIO)
+ 233
+ 234        Return : ODF document -- Document
+ 235        """
+ 236        container = container_from_template(template)
+ 237        return cls(container)
+ 238
+ 239    # Public API
+ 240
+ 241    @property
+ 242    def path(self) -> Path | None:
+ 243        """Shortcut to Document.Container.path."""
+ 244        if not self.container:
+ 245            return None
+ 246        return self.container.path
+ 247
+ 248    @path.setter
+ 249    def path(self, path_or_str: str | Path) -> None:
+ 250        """Shortcut to Document.Container.path
+ 251
+ 252        Only accepting str or Path."""
+ 253        if not self.container:
+ 254            return
+ 255        self.container.path = Path(path_or_str)
+ 256
+ 257    def get_parts(self) -> list[str]:
+ 258        """Return available part names with path inside the archive, e.g.
+ 259        ['content.xml', ..., 'Pictures/100000000000032000000258912EB1C3.jpg']
+ 260        """
+ 261        if not self.container:
+ 262            raise ValueError("Empty Container")
+ 263        return self.container.get_parts()
+ 264
+ 265    def get_part(self, path: str) -> XmlPart | str | bytes | None:
+ 266        """Return the bytes of the given part. The path is relative to the
+ 267        archive, e.g. "Pictures/1003200258912EB1C3.jpg".
+ 268
+ 269        'content', 'meta', 'settings', 'styles' and 'manifest' are shortcuts
+ 270        to the real path, e.g. content.xml, and return a dedicated object with
+ 271        its own API.
+ 272
+ 273        path formated as URI, so always use '/' separator
+ 274        """
+ 275        if not self.container:
+ 276            raise ValueError("Empty Container")
+ 277        # "./ObjectReplacements/Object 1"
+ 278        path = path.lstrip("./")
+ 279        path = _get_part_path(path)
+ 280        cls = _get_part_class(path)
+ 281        # Raw bytes
+ 282        if cls is None:
+ 283            return self.container.get_part(path)
+ 284        # XML part
+ 285        part = self.__xmlparts.get(path)
+ 286        if part is None:
+ 287            self.__xmlparts[path] = part = cls(path, self.container)
+ 288        return part
+ 289
+ 290    def set_part(self, path: str, data: bytes) -> None:
+ 291        """Set the bytes of the given part. The path is relative to the
+ 292        archive, e.g. "Pictures/1003200258912EB1C3.jpg".
+ 293
+ 294        path formated as URI, so always use '/' separator
+ 295        """
+ 296        if not self.container:
+ 297            raise ValueError("Empty Container")
+ 298        # "./ObjectReplacements/Object 1"
+ 299        path = path.lstrip("./")
+ 300        path = _get_part_path(path)
+ 301        cls = _get_part_class(path)
+ 302        # XML part overwritten
+ 303        if cls is not None:
+ 304            with suppress(KeyError):
+ 305                self.__xmlparts[path]
+ 306        self.container.set_part(path, data)
+ 307
+ 308    def del_part(self, path: str) -> None:
+ 309        """Mark a part for deletion. The path is relative to the archive,
+ 310        e.g. "Pictures/1003200258912EB1C3.jpg"
+ 311        """
+ 312        if not self.container:
+ 313            raise ValueError("Empty Container")
+ 314        path = _get_part_path(path)
+ 315        cls = _get_part_class(path)
+ 316        if path == ODF_MANIFEST or cls is not None:
+ 317            raise ValueError(f"part '{path}' is mandatory")
+ 318        self.container.del_part(path)
+ 319
+ 320    @property
+ 321    def mimetype(self) -> str:
+ 322        if not self.container:
+ 323            raise ValueError("Empty Container")
+ 324        return self.container.mimetype
+ 325
+ 326    @mimetype.setter
+ 327    def mimetype(self, mimetype: str) -> None:
+ 328        if not self.container:
+ 329            raise ValueError("Empty Container")
+ 330        self.container.mimetype = mimetype
+ 331
+ 332    def get_type(self) -> str:
+ 333        """Get the ODF type (also called class) of this document.
+ 334
+ 335        Return: 'chart', 'database', 'formula', 'graphics',
+ 336            'graphics-template', 'image', 'presentation',
+ 337            'presentation-template', 'spreadsheet', 'spreadsheet-template',
+ 338            'text', 'text-master', 'text-template' or 'text-web'
+ 339        """
+ 340        # The mimetype must be with the form:
+ 341        # application/vnd.oasis.opendocument.text
+ 342
+ 343        # Isolate and return the last part
+ 344        return self.mimetype.rsplit(".", 1)[-1]
+ 345
+ 346    @property
+ 347    def body(self) -> Element:
+ 348        """Return the body element of the content part, where actual content
+ 349        is stored.
+ 350        """
+ 351        if self.__body is None:
+ 352            self.__body = self.content.body
+ 353        return self.__body
+ 354
+ 355    @property
+ 356    def meta(self) -> Meta:
+ 357        """Return the meta part (meta.xml) of the document, where meta data
+ 358        are stored."""
+ 359        metadata = self.get_part(ODF_META)
+ 360        if metadata is None or not isinstance(metadata, Meta):
+ 361            raise ValueError("Empty Meta")
+ 362        return metadata
+ 363
+ 364    @property
+ 365    def manifest(self) -> Manifest:
+ 366        """Return the manifest part (manifest.xml) of the document."""
+ 367        manifest = self.get_part(ODF_MANIFEST)
+ 368        if manifest is None or not isinstance(manifest, Manifest):
+ 369            raise ValueError("Empty Manifest")
+ 370        return manifest
+ 371
+ 372    def _get_formatted_text_footnotes(
+ 373        self,
+ 374        result: list[str],
+ 375        context: dict,
+ 376        rst_mode: bool,
+ 377    ) -> None:
+ 378        # Separate text from notes
+ 379        if rst_mode:
+ 380            result.append("\n")
+ 381        else:
+ 382            result.append("----\n")
+ 383        for citation, body in context["footnotes"]:
+ 384            if rst_mode:
+ 385                result.append(f".. [#] {body}\n")
+ 386            else:
+ 387                result.append(f"[{citation}] {body}\n")
+ 388        # Append a \n after the notes
+ 389        result.append("\n")
+ 390        # Reset for the next paragraph
+ 391        context["footnotes"] = []
+ 392
+ 393    def _get_formatted_text_annotations(
+ 394        self,
+ 395        result: list[str],
+ 396        context: dict,
+ 397        rst_mode: bool,
+ 398    ) -> None:
+ 399        # Insert the annotations
+ 400        # With a separation
+ 401        if rst_mode:
+ 402            result.append("\n")
+ 403        else:
+ 404            result.append("----\n")
+ 405        for annotation in context["annotations"]:
+ 406            if rst_mode:
+ 407                result.append(f".. [#] {annotation}\n")
+ 408            else:
+ 409                result.append(f"[*] {annotation}\n")
+ 410        context["annotations"] = []
+ 411
+ 412    def _get_formatted_text_images(
+ 413        self,
+ 414        result: list[str],
+ 415        context: dict,
+ 416        rst_mode: bool,
+ 417    ) -> None:
+ 418        # Insert the images ref, only in rst mode
+ 419        result.append("\n")
+ 420        for ref, filename, (width, height) in context["images"]:
+ 421            result.append(f".. {ref} image:: {filename}\n")
+ 422            if width is not None:
+ 423                result.append(f"   :width: {width}\n")
+ 424            if height is not None:
+ 425                result.append(f"   :height: {height}\n")
+ 426        context["images"] = []
+ 427
+ 428    def _get_formatted_text_endnotes(
+ 429        self,
+ 430        result: list[str],
+ 431        context: dict,
+ 432        rst_mode: bool,
+ 433    ) -> None:
+ 434        # Append the end notes
+ 435        if rst_mode:
+ 436            result.append("\n\n")
+ 437        else:
+ 438            result.append("\n========\n")
+ 439        for citation, body in context["endnotes"]:
+ 440            if rst_mode:
+ 441                result.append(f".. [*] {body}\n")
+ 442            else:
+ 443                result.append(f"({citation}) {body}\n")
+ 444
+ 445    def get_formatted_text(self, rst_mode: bool = False) -> str:
+ 446        """Return content as text, with some formatting."""
+ 447        # For the moment, only "type='text'"
+ 448        doc_type = self.get_type()
+ 449        if doc_type == "spreadsheet":
+ 450            return self._tables_csv()
+ 451        if doc_type in {
+ 452            "text",
+ 453            "text-template",
+ 454            "presentation",
+ 455            "presentation-template",
+ 456        }:
+ 457            return self._formatted_text(rst_mode)
+ 458        raise NotImplementedError(f"Type of document '{doc_type}' not supported yet")
+ 459
+ 460    def _tables_csv(self) -> str:
+ 461        return "\n\n".join(str(table) for table in self.body.get_tables())
+ 462
+ 463    def _formatted_text(self, rst_mode: bool) -> str:
+ 464        # Initialize an empty context
+ 465        context = {
+ 466            "document": self,
+ 467            "footnotes": [],
+ 468            "endnotes": [],
+ 469            "annotations": [],
+ 470            "rst_mode": rst_mode,
+ 471            "img_counter": 0,
+ 472            "images": [],
+ 473            "no_img_level": 0,
+ 474        }
+ 475        body = self.body
+ 476        # Get the text
+ 477        result = []
+ 478        for child in body.children:
+ 479            # self._get_formatted_text_child(result, element, context, rst_mode)
+ 480            # if child.tag == "table:table":
+ 481            #     result.append(child.get_formatted_text(context))
+ 482            #     return
+ 483            result.append(child.get_formatted_text(context))
+ 484            if context["footnotes"]:
+ 485                self._get_formatted_text_footnotes(result, context, rst_mode)
+ 486            if context["annotations"]:
+ 487                self._get_formatted_text_annotations(result, context, rst_mode)
+ 488            # Insert the images ref, only in rst mode
+ 489            if context["images"]:
+ 490                self._get_formatted_text_images(result, context, rst_mode)
+ 491        if context["endnotes"]:
+ 492            self._get_formatted_text_endnotes(result, context, rst_mode)
+ 493        return "".join(result)
+ 494
+ 495    def get_formated_meta(self) -> str:
+ 496        """Return meta informations as text, with some formatting."""
+ 497        result: list[str] = []
+ 498
+ 499        # Simple values
+ 500        def print_info(name: str, value: Any) -> None:
+ 501            if value:
+ 502                result.append(f"{name}: {value}")
+ 503
+ 504        meta = self.meta
+ 505        print_info("Title", meta.get_title())
+ 506        print_info("Subject", meta.get_subject())
+ 507        print_info("Language", meta.get_language())
+ 508        print_info("Modification date", meta.get_modification_date())
+ 509        print_info("Creation date", meta.get_creation_date())
+ 510        print_info("Initial creator", meta.get_initial_creator())
+ 511        print_info("Keyword", meta.get_keywords())
+ 512        print_info("Editing duration", meta.get_editing_duration())
+ 513        print_info("Editing cycles", meta.get_editing_cycles())
+ 514        print_info("Generator", meta.get_generator())
+ 515
+ 516        # Statistic
+ 517        result.append("Statistic:")
+ 518        statistic = meta.get_statistic()
+ 519        if statistic:
+ 520            for name, data in statistic.items():
+ 521                result.append(f"  - {name[5:].replace('-', ' ').capitalize()}: {data}")
+ 522
+ 523        # User defined metadata
+ 524        result.append("User defined metadata:")
+ 525        user_metadata = meta.get_user_defined_metadata()
+ 526        for name, data2 in user_metadata.items():
+ 527            result.append(f"  - {name}: {data2}")
+ 528
+ 529        # And the description
+ 530        print_info("Description", meta.get_description())
+ 531
+ 532        return "\n".join(result) + "\n"
+ 533
+ 534    def add_file(self, path_or_file: str | Path) -> str:
+ 535        """Insert a file from a path or a file-like object in the container.
+ 536
+ 537        Return the full path to reference in the content.
+ 538
+ 539        Arguments:
+ 540
+ 541            path_or_file -- str or Path or file-like
+ 542
+ 543        Return: str (URI)
+ 544        """
+ 545        if not self.container:
+ 546            raise ValueError("Empty Container")
+ 547        name = ""
+ 548        # Folder for added files (FIXME hard-coded and copied)
+ 549        manifest = self.manifest
+ 550        medias = manifest.get_paths()
+ 551        # uuid = str(uuid4())
+ 552
+ 553        if isinstance(path_or_file, (str, Path)):
+ 554            path = Path(path_or_file)
+ 555            extension = path.suffix.lower()
+ 556            name = f"{path.stem}{extension}"
+ 557            if posixpath.join("Pictures", name) in medias:
+ 558                name = f"{path.stem}_{uuid4()}{extension}"
+ 559        else:
+ 560            path = None
+ 561            name = getattr(path_or_file, "name", None)
+ 562            if not name:
+ 563                name = str(uuid4())
+ 564        media_type, _encoding = guess_type(name)
+ 565        if not media_type:
+ 566            media_type = "application/octet-stream"
+ 567        if manifest.get_media_type("Pictures/") is None:
+ 568            manifest.add_full_path("Pictures/")
+ 569        full_path = posixpath.join("Pictures", name)
+ 570        if path is None:
+ 571            self.container.set_part(full_path, path_or_file.read())
+ 572        else:
+ 573            self.container.set_part(full_path, path.read_bytes())
+ 574        manifest.add_full_path(full_path, media_type)
+ 575        return full_path
+ 576
+ 577    @property
+ 578    def clone(self) -> Document:
+ 579        """Return an exact copy of the document.
+ 580
+ 581        Return: Document
+ 582        """
+ 583        clone = object.__new__(self.__class__)
+ 584        for name in self.__dict__:
+ 585            if name == "_Document__body":
+ 586                setattr(clone, name, None)
+ 587            elif name == "_Document__xmlparts":
+ 588                setattr(clone, name, {})
+ 589            elif name == "container":
+ 590                if not self.container:
+ 591                    raise ValueError("Empty Container")
+ 592                setattr(clone, name, self.container.clone)
+ 593            else:
+ 594                value = deepcopy(getattr(self, name))
+ 595                setattr(clone, name, value)
+ 596        return clone
+ 597
+ 598    def save(
+ 599        self,
+ 600        target: str | Path | io.BytesIO | None = None,
+ 601        packaging: str = "zip",
+ 602        pretty: bool = False,
+ 603        backup: bool = False,
+ 604    ) -> None:
+ 605        """Save the document, at the same place it was opened or at the given
+ 606        target path. Target can also be a file-like object. It can be saved
+ 607        as a Zip file (default) or as files in a folder (for debugging
+ 608        purpose). XML parts can be pretty printed.
+ 609
+ 610        Arguments:
+ 611
+ 612            target -- str or file-like object
+ 613
+ 614            packaging -- 'zip' or 'folder'
+ 615
+ 616            pretty -- bool
+ 617
+ 618            backup -- bool
+ 619        """
+ 620        if not self.container:
+ 621            raise ValueError("Empty Container")
+ 622        # Some advertising
+ 623        self.meta.set_generator_default()
+ 624        # Synchronize data with container
+ 625        container = self.container
+ 626        for path, part in self.__xmlparts.items():
+ 627            if part is not None:
+ 628                container.set_part(path, part.serialize(pretty))
+ 629        # Save the container
+ 630        container.save(target, packaging=packaging, backup=backup)
+ 631
+ 632    @property
+ 633    def content(self) -> Content:
+ 634        content: Content | None = self.get_part(ODF_CONTENT)  # type:ignore
+ 635        if content is None:
+ 636            raise ValueError("Empty Content")
+ 637        return content
+ 638
+ 639    @property
+ 640    def styles(self) -> Styles:
+ 641        styles: Styles | None = self.get_part(ODF_STYLES)  # type:ignore
+ 642        if styles is None:
+ 643            raise ValueError("Empty Styles")
+ 644        return styles
+ 645
+ 646    # Styles over several parts
+ 647
+ 648    def get_styles(
+ 649        self,
+ 650        family: str | bytes = "",
+ 651        automatic: bool = False,
+ 652    ) -> list[Style | Element]:
+ 653        # compatibility with old versions:
+ 654
+ 655        if isinstance(family, bytes):
+ 656            family = bytes_to_str(family)
+ 657        return self.content.get_styles(family=family) + self.styles.get_styles(
+ 658            family=family, automatic=automatic
+ 659        )
+ 660
+ 661    def get_style(
+ 662        self,
+ 663        family: str,
+ 664        name_or_element: str | Style | None = None,
+ 665        display_name: str | None = None,
+ 666    ) -> Style | None:
+ 667        """Return the style uniquely identified by the name/family pair. If
+ 668        the argument is already a style object, it will return it.
+ 669
+ 670        If the name is None, the default style is fetched.
+ 671
+ 672        If the name is not the internal name but the name you gave in a
+ 673        desktop application, use display_name instead.
+ 674
+ 675        Arguments:
+ 676
+ 677            family -- 'paragraph', 'text',  'graphic', 'table', 'list',
+ 678                      'number', 'page-layout', 'master-page'
+ 679
+ 680            name -- str or Element or None
+ 681
+ 682            display_name -- str
+ 683
+ 684        Return: Style or None if not found.
+ 685        """
+ 686        # 1. content.xml
+ 687        element = self.content.get_style(
+ 688            family, name_or_element=name_or_element, display_name=display_name
+ 689        )
+ 690        if element is not None:
+ 691            return element
+ 692        # 2. styles.xml
+ 693        return self.styles.get_style(
+ 694            family,
+ 695            name_or_element=name_or_element,
+ 696            display_name=display_name,
+ 697        )
+ 698
+ 699    @staticmethod
+ 700    def _pseudo_style_attribute(style_element: Style | Element, attribute: str) -> Any:
+ 701        if hasattr(style_element, attribute):
+ 702            return getattr(style_element, attribute)
+ 703        return ""
+ 704
+ 705    def _set_automatic_name(self, style: Style, family: str) -> None:
+ 706        """Generate a name for the new automatic style."""
+ 707        if not hasattr(style, "name"):
+ 708            # do nothing
+ 709            return
+ 710        styles = self.get_styles(family=family, automatic=True)
+ 711        max_index = 0
+ 712        for existing_style in styles:
+ 713            if not hasattr(existing_style, "name"):
+ 714                continue
+ 715            if not existing_style.name.startswith(AUTOMATIC_PREFIX):
+ 716                continue
+ 717            try:
+ 718                index = int(existing_style.name[len(AUTOMATIC_PREFIX) :])
+ 719            except ValueError:
+ 720                continue
+ 721            max_index = max(max_index, index)
+ 722
+ 723        style.name = f"{AUTOMATIC_PREFIX}{max_index+1}"
+ 724
+ 725    def _insert_style_get_common_styles(
+ 726        self,
+ 727        family: str,
+ 728        name: str,
+ 729    ) -> tuple[Any, Any]:
+ 730        style_container = self.styles.get_element("office:styles")
+ 731        existing = self.styles.get_style(family, name)
+ 732        return existing, style_container
+ 733
+ 734    def _insert_style_get_automatic_styles(
+ 735        self,
+ 736        style: Style,
+ 737        family: str,
+ 738        name: str,
+ 739    ) -> tuple[Any, Any]:
+ 740        style_container = self.content.get_element("office:automatic-styles")
+ 741        # A name ?
+ 742        if name:
+ 743            if hasattr(style, "name"):
+ 744                style.name = name
+ 745            existing = self.content.get_style(family, name)
+ 746        else:
+ 747            self._set_automatic_name(style, family)
+ 748            existing = None
+ 749        return existing, style_container
+ 750
+ 751    def _insert_style_get_default_styles(
+ 752        self,
+ 753        style: Style,
+ 754        family: str,
+ 755        name: str,
+ 756    ) -> tuple[Any, Any]:
+ 757        style_container = self.styles.get_element("office:styles")
+ 758        style.tag = "style:default-style"
+ 759        if name:
+ 760            style.del_attribute("style:name")
+ 761        existing = self.styles.get_style(family)
+ 762        return existing, style_container
+ 763
+ 764    def _insert_style_get_master_page(
+ 765        self,
+ 766        family: str,
+ 767        name: str,
+ 768    ) -> tuple[Any, Any]:
+ 769        style_container = self.styles.get_element("office:master-styles")
+ 770        existing = self.styles.get_style(family, name)
+ 771        return existing, style_container
+ 772
+ 773    def _insert_style_get_font_face_default(
+ 774        self,
+ 775        family: str,
+ 776        name: str,
+ 777    ) -> tuple[Any, Any]:
+ 778        style_container = self.styles.get_element("office:font-face-decls")
+ 779        existing = self.styles.get_style(family, name)
+ 780        return existing, style_container
+ 781
+ 782    def _insert_style_get_font_face(
+ 783        self,
+ 784        family: str,
+ 785        name: str,
+ 786    ) -> tuple[Any, Any]:
+ 787        style_container = self.content.get_element("office:font-face-decls")
+ 788        existing = self.content.get_style(family, name)
+ 789        return existing, style_container
+ 790
+ 791    def _insert_style_get_page_layout(
+ 792        self,
+ 793        family: str,
+ 794        name: str,
+ 795    ) -> tuple[Any, Any]:
+ 796        # force to automatic
+ 797        style_container = self.styles.get_element("office:automatic-styles")
+ 798        existing = self.styles.get_style(family, name)
+ 799        return existing, style_container
+ 800
+ 801    def _insert_style_get_draw_fill_image(
+ 802        self,
+ 803        name: str,
+ 804    ) -> tuple[Any, Any]:
+ 805        # special case for 'draw:fill-image' pseudo style
+ 806        # not family and style_element.__class__.__name__ == "DrawFillImage"
+ 807        style_container = self.styles.get_element("office:styles")
+ 808        existing = self.styles.get_style("", name)
+ 809        return existing, style_container
+ 810
+ 811    def _insert_style_standard(
+ 812        self,
+ 813        style: Style,
+ 814        name: str,
+ 815        family: str,
+ 816        automatic: bool,
+ 817        default: bool,
+ 818    ) -> tuple[Any, Any]:
+ 819        # Common style
+ 820        if name and automatic is False and default is False:
+ 821            return self._insert_style_get_common_styles(family, name)
+ 822        # Automatic style
+ 823        elif automatic is True and default is False:
+ 824            return self._insert_style_get_automatic_styles(style, family, name)
+ 825        # Default style
+ 826        elif automatic is False and default is True:
+ 827            return self._insert_style_get_default_styles(style, family, name)
+ 828        else:
+ 829            raise AttributeError("Invalid combination of arguments")
+ 830
+ 831    def insert_style(  # noqa: C901
+ 832        self,
+ 833        style: Style | str,
+ 834        name: str = "",
+ 835        automatic: bool = False,
+ 836        default: bool = False,
+ 837    ) -> Any:
+ 838        """Insert the given style object in the document, as required by the
+ 839        style family and type.
+ 840
+ 841        The style is expected to be a common style with a name. In case it
+ 842        was created with no name, the given can be set on the fly.
+ 843
+ 844        If automatic is True, the style will be inserted as an automatic
+ 845        style.
+ 846
+ 847        If default is True, the style will be inserted as a default style and
+ 848        would replace any existing default style of the same family. Any name
+ 849        or display name would be ignored.
+ 850
+ 851        Automatic and default arguments are mutually exclusive.
+ 852
+ 853        All styles can't be used as default styles. Default styles are
+ 854        allowed for the following families: paragraph, text, section, table,
+ 855        table-column, table-row, table-cell, table-page, chart, drawing-page,
+ 856        graphic, presentation, control and ruby.
+ 857
+ 858        Arguments:
+ 859
+ 860            style -- Style or str
+ 861
+ 862            name -- str
+ 863
+ 864            automatic -- bool
+ 865
+ 866            default -- bool
+ 867
+ 868        Return : style name -- str
+ 869        """
+ 870
+ 871        # if style is a str, assume it is the Style definition
+ 872        if isinstance(style, str):
+ 873            style_element: Style = Element.from_tag(style)  # type: ignore
+ 874        else:
+ 875            style_element = style
+ 876        if not isinstance(style_element, Element):
+ 877            raise TypeError(f"Unknown Style type: '{style!r}'")
+ 878
+ 879        # Get family and name
+ 880        family = self._pseudo_style_attribute(style_element, "family")
+ 881        if not name:
+ 882            name = self._pseudo_style_attribute(style_element, "name")
+ 883
+ 884        # Master page style
+ 885        if family == "master-page":
+ 886            existing, style_container = self._insert_style_get_master_page(family, name)
+ 887        # Font face declarations
+ 888        elif family == "font-face":
+ 889            if default:
+ 890                existing, style_container = self._insert_style_get_font_face_default(
+ 891                    family, name
+ 892                )
+ 893            else:
+ 894                existing, style_container = self._insert_style_get_font_face(
+ 895                    family, name
+ 896                )
+ 897        # page layout style
+ 898        elif family == "page-layout":
+ 899            existing, style_container = self._insert_style_get_page_layout(family, name)
+ 900        # Common style
+ 901        elif family in FAMILY_ODF_STD or family in {"number"}:
+ 902            existing, style_container = self._insert_style_standard(
+ 903                style_element, name, family, automatic, default
+ 904            )
+ 905        elif not family and style_element.__class__.__name__ == "DrawFillImage":
+ 906            # special case for 'draw:fill-image' pseudo style
+ 907            existing, style_container = self._insert_style_get_draw_fill_image(name)
+ 908        # Invalid style
+ 909        else:
+ 910            raise ValueError(
+ 911                "Invalid style: "
+ 912                f"{style_element}, tag:{style_element.tag}, family:{family}"
+ 913            )
+ 914
+ 915        # Insert it!
+ 916        if existing is not None:
+ 917            style_container.delete(existing)
+ 918        style_container.append(style_element)
+ 919        return self._pseudo_style_attribute(style_element, "name")
+ 920
+ 921    def get_styled_elements(self, name: str = "") -> list[Element]:
+ 922        """Brute-force to find paragraphs, tables, etc. using the given style
+ 923        name (or all by default).
+ 924
+ 925        Arguments:
+ 926
+ 927            name -- str
+ 928
+ 929        Return: list
+ 930        """
+ 931        # Header, footer, etc. have styles too
+ 932        return self.content.root.get_styled_elements(
+ 933            name
+ 934        ) + self.styles.root.get_styled_elements(name)
+ 935
+ 936    def show_styles(
+ 937        self,
+ 938        automatic: bool = True,
+ 939        common: bool = True,
+ 940        properties: bool = False,
+ 941    ) -> str:
+ 942        infos = []
+ 943        for style in self.get_styles():
+ 944            try:
+ 945                name = style.name  # type: ignore
+ 946            except AttributeError:
+ 947                print("--------------")
+ 948                print(style.__class__)
+ 949                print(style.serialize())
+ 950                raise
+ 951            if style.__class__.__name__ == "DrawFillImage":
+ 952                family = ""
+ 953            else:
+ 954                family = str(style.family)  # type: ignore
+ 955            parent = style.parent
+ 956            is_auto = parent and parent.tag == "office:automatic-styles"
+ 957            if is_auto and automatic is False or not is_auto and common is False:
+ 958                continue
+ 959            is_used = bool(self.get_styled_elements(name))
+ 960            infos.append(
+ 961                {
+ 962                    "type": "auto  " if is_auto else "common",
+ 963                    "used": "y" if is_used else "n",
+ 964                    "family": family,
+ 965                    "parent": self._pseudo_style_attribute(style, "parent_style") or "",
+ 966                    "name": name or "",
+ 967                    "display_name": self._pseudo_style_attribute(style, "display_name")
+ 968                    or "",
+ 969                    "properties": style.get_properties() if properties else None,  # type: ignore
+ 970                }
+ 971            )
+ 972        if not infos:
+ 973            return ""
+ 974        # Sort by family and name
+ 975        infos.sort(key=itemgetter("family", "name"))
+ 976        # Show common and used first
+ 977        infos.sort(key=itemgetter("type", "used"), reverse=True)
+ 978        max_family = str(max([len(x["family"]) for x in infos]))  # type: ignore
+ 979        max_parent = str(max([len(x["parent"]) for x in infos]))  # type: ignore
+ 980        formater = (
+ 981            "%(type)s used:%(used)s family:%(family)-0"
+ 982            + max_family
+ 983            + "s parent:%(parent)-0"
+ 984            + max_parent
+ 985            + "s name:%(name)s"
+ 986        )
+ 987        output = []
+ 988        for info in infos:
+ 989            line = formater % info
+ 990            if info["display_name"]:
+ 991                line += " display_name:" + info["display_name"]  # type: ignore
+ 992            output.append(line)
+ 993            if info["properties"]:
+ 994                for name, value in info["properties"].items():  # type: ignore
+ 995                    output.append(f"   - {name}: {value}")
+ 996        output.append("")
+ 997        return "\n".join(output)
+ 998
+ 999    def delete_styles(self) -> int:
+1000        """Remove all style information from content and all styles.
+1001
+1002        Return: number of deleted styles
+1003        """
+1004        # First remove references to styles
+1005        for element in self.get_styled_elements():
+1006            for attribute in (
+1007                "text:style-name",
+1008                "draw:style-name",
+1009                "draw:text-style-name",
+1010                "table:style-name",
+1011                "style:page-layout-name",
+1012            ):
+1013                try:
+1014                    element.del_attribute(attribute)
+1015                except KeyError:
+1016                    continue
+1017        # Then remove supposedly orphaned styles
+1018        deleted = 0
+1019        for style in self.get_styles():
+1020            if style.name is None:  # type: ignore
+1021                # Don't delete default styles
+1022                continue
+1023            # elif type(style) is odf_master_page:
+1024            #    # Don't suppress header and footer, just styling was removed
+1025            #    continue
+1026            style.delete()
+1027            deleted += 1
+1028        return deleted
+1029
+1030    def merge_styles_from(self, document: Document) -> None:
+1031        """Copy all the styles of a document into ourself.
+1032
+1033        Styles with the same type and name will be replaced, so only unique
+1034        styles will be preserved.
+1035        """
+1036        manifest = self.manifest
+1037        document_manifest = document.manifest
+1038        for style in document.get_styles():
+1039            tagname = style.tag
+1040            family = self._pseudo_style_attribute(style, "family")
+1041            stylename = style.name  # type: ignore
+1042            container = style.parent
+1043            container_name = container.tag  # type: ignore
+1044            partname = container.parent.tag  # type: ignore
+1045            # The destination part
+1046            if partname == "office:document-styles":
+1047                part: Content | Styles = self.styles
+1048            elif partname == "office:document-content":
+1049                part = self.content
+1050            else:
+1051                raise NotImplementedError(partname)
+1052            # Implemented containers
+1053            if container_name not in {
+1054                "office:styles",
+1055                "office:automatic-styles",
+1056                "office:master-styles",
+1057                "office:font-face-decls",
+1058            }:
+1059                raise NotImplementedError(container_name)
+1060            dest = part.get_element(f"//{container_name}")
+1061            # Implemented style types
+1062            # if tagname not in registered_styles:
+1063            #    raise NotImplementedError(tagname)
+1064            duplicate = part.get_style(family, stylename)
+1065            if duplicate is not None:
+1066                duplicate.delete()
+1067            dest.append(style)
+1068            # Copy images from the header/footer
+1069            if tagname == "style:master-page":
+1070                query = "descendant::draw:image"
+1071                for image in style.get_elements(query):
+1072                    url = image.url  # type: ignore
+1073                    part_url = document.get_part(url)
+1074                    # Manually add the part to keep the name
+1075                    self.set_part(url, part_url)  # type: ignore
+1076                    media_type = document_manifest.get_media_type(url)
+1077                    manifest.add_full_path(url, media_type)  # type: ignore
+1078            # Copy images from the fill-image
+1079            elif tagname == "draw:fill-image":
+1080                url = style.url  # type: ignore
+1081                part_url = document.get_part(url)
+1082                self.set_part(url, part_url)  # type: ignore
+1083                media_type = document_manifest.get_media_type(url)
+1084                manifest.add_full_path(url, media_type)  # type: ignore
+1085
+1086    def add_page_break_style(self) -> None:
+1087        """Ensure that the document contains the style required for a manual page break.
+1088
+1089        Then a manual page break can be added to the document with:
+1090            from paragraph import PageBreak
+1091            ...
+1092            document.body.append(PageBreak())
+1093
+1094        Note: this style uses the property 'fo:break-after', another
+1095        possibility could be the property 'fo:break-before'
+1096        """
+1097        if existing := self.get_style(  # noqa: SIM102
+1098            family="paragraph",
+1099            name_or_element="odfdopagebreak",
+1100        ):
+1101            if properties := existing.get_properties():  # noqa: SIM102
+1102                if properties["fo:break-after"] == "page":
+1103                    return
+1104        style = (
+1105            '<style:style style:family="paragraph" style:parent-style-name="Standard" '
+1106            'style:name="odfdopagebreak">'
+1107            '<style:paragraph-properties fo:break-after="page"/></style:style>'
+1108        )
+1109        self.insert_style(style, automatic=False)
+
+ + +

Abstraction of the ODF document.

+ +

To create a new Document, several possibilities:

+ +
- Document() or Document("text") -> an "empty" document of type text
+- Document("spreadsheet") -> an "empty" document of type spreadsheet
+- Document("presentation") -> an "empty" document of type presentation
+- Document("drawing") -> an "empty" document of type drawing
+
+Meaning of “empty”: these documents are copies of the default
+templates documents provided with this library, which, as templates,
+are not really empty. It may be useful to clear the newly created
+document: document.body.clear(), or adjust meta informations like
+description or default language: document.meta.set_language('fr-FR')
+
+ +

If the argument is not a known template type, or is a Path, +Document(file) will load the content of the ODF file.

+ +

To explicitly create a document from a custom template, use the +Document.new(path) method whose argument is the path to the template file.

+
+ + +
+ +
+ + Document( target: str | bytes | pathlib.Path | Container | _io.BytesIO | None = 'text') + + + +
+ +
178    def __init__(
+179        self,
+180        target: str | bytes | Path | Container | io.BytesIO | None = "text",
+181    ) -> None:
+182        # Cache of XML parts
+183        self.__xmlparts: dict[str, XmlPart] = {}
+184        # Cache of the body
+185        self.__body: Element | None = None
+186        self.container: Container | None = None
+187        if isinstance(target, bytes):
+188            # eager conversion
+189            target = bytes_to_str(target)
+190        if target is None:
+191            # empty document, you probably don't wnat this.
+192            self.container = Container()
+193            return
+194        if isinstance(target, Path):
+195            # let's assume we open a container on existing file
+196            self.container = Container(target)
+197            return
+198        if isinstance(target, Container):
+199            # special internal case, use an existing container
+200            self.container = target
+201            return
+202        if isinstance(target, str):
+203            if target in ODF_TEMPLATES:
+204                # assuming a new document from templates
+205                self.container = container_from_template(target)
+206                return
+207            # let's assume we open a container on existing file
+208            self.container = Container(target)
+209            return
+210        if isinstance(target, io.BytesIO):
+211            self.container = Container(target)
+212            return
+213        raise TypeError(f"Unknown Document source type: '{target!r}'")
+
+ + + + +
+
+
+ container: Container | None + + +
+ + + + +
+
+ +
+
@classmethod
+ + def + new( cls, template: str | pathlib.Path | _io.BytesIO = 'text') -> Document: + + + +
+ +
224    @classmethod
+225    def new(cls, template: str | Path | io.BytesIO = "text") -> Document:
+226        """Create a Document from a template.
+227
+228        The template argument is expected to be the path to a ODF template.
+229
+230        Arguments:
+231
+232            template -- str or Path or file-like (io.BytesIO)
+233
+234        Return : ODF document -- Document
+235        """
+236        container = container_from_template(template)
+237        return cls(container)
+
+ + +

Create a Document from a template.

+ +

The template argument is expected to be the path to a ODF template.

+ +

Arguments:

+ +
template -- str or Path or file-like (io.BytesIO)
+
+ +

Return : ODF document -- Document

+
+ + +
+
+ +
+ path: pathlib.Path | None + + + +
+ +
241    @property
+242    def path(self) -> Path | None:
+243        """Shortcut to Document.Container.path."""
+244        if not self.container:
+245            return None
+246        return self.container.path
+
+ + +

Shortcut to Document.Container.path.

+
+ + +
+
+ +
+ + def + get_parts(self) -> list[str]: + + + +
+ +
257    def get_parts(self) -> list[str]:
+258        """Return available part names with path inside the archive, e.g.
+259        ['content.xml', ..., 'Pictures/100000000000032000000258912EB1C3.jpg']
+260        """
+261        if not self.container:
+262            raise ValueError("Empty Container")
+263        return self.container.get_parts()
+
+ + +

Return available part names with path inside the archive, e.g. +['content.xml', ..., 'Pictures/100000000000032000000258912EB1C3.jpg']

+
+ + +
+
+ +
+ + def + get_part(self, path: str) -> XmlPart | str | bytes | None: + + + +
+ +
265    def get_part(self, path: str) -> XmlPart | str | bytes | None:
+266        """Return the bytes of the given part. The path is relative to the
+267        archive, e.g. "Pictures/1003200258912EB1C3.jpg".
+268
+269        'content', 'meta', 'settings', 'styles' and 'manifest' are shortcuts
+270        to the real path, e.g. content.xml, and return a dedicated object with
+271        its own API.
+272
+273        path formated as URI, so always use '/' separator
+274        """
+275        if not self.container:
+276            raise ValueError("Empty Container")
+277        # "./ObjectReplacements/Object 1"
+278        path = path.lstrip("./")
+279        path = _get_part_path(path)
+280        cls = _get_part_class(path)
+281        # Raw bytes
+282        if cls is None:
+283            return self.container.get_part(path)
+284        # XML part
+285        part = self.__xmlparts.get(path)
+286        if part is None:
+287            self.__xmlparts[path] = part = cls(path, self.container)
+288        return part
+
+ + +

Return the bytes of the given part. The path is relative to the +archive, e.g. "Pictures/1003200258912EB1C3.jpg".

+ +

'content', 'meta', 'settings', 'styles' and 'manifest' are shortcuts +to the real path, e.g. content.xml, and return a dedicated object with +its own API.

+ +

path formated as URI, so always use '/' separator

+
+ + +
+
+ +
+ + def + set_part(self, path: str, data: bytes) -> None: + + + +
+ +
290    def set_part(self, path: str, data: bytes) -> None:
+291        """Set the bytes of the given part. The path is relative to the
+292        archive, e.g. "Pictures/1003200258912EB1C3.jpg".
+293
+294        path formated as URI, so always use '/' separator
+295        """
+296        if not self.container:
+297            raise ValueError("Empty Container")
+298        # "./ObjectReplacements/Object 1"
+299        path = path.lstrip("./")
+300        path = _get_part_path(path)
+301        cls = _get_part_class(path)
+302        # XML part overwritten
+303        if cls is not None:
+304            with suppress(KeyError):
+305                self.__xmlparts[path]
+306        self.container.set_part(path, data)
+
+ + +

Set the bytes of the given part. The path is relative to the +archive, e.g. "Pictures/1003200258912EB1C3.jpg".

+ +

path formated as URI, so always use '/' separator

+
+ + +
+
+ +
+ + def + del_part(self, path: str) -> None: + + + +
+ +
308    def del_part(self, path: str) -> None:
+309        """Mark a part for deletion. The path is relative to the archive,
+310        e.g. "Pictures/1003200258912EB1C3.jpg"
+311        """
+312        if not self.container:
+313            raise ValueError("Empty Container")
+314        path = _get_part_path(path)
+315        cls = _get_part_class(path)
+316        if path == ODF_MANIFEST or cls is not None:
+317            raise ValueError(f"part '{path}' is mandatory")
+318        self.container.del_part(path)
+
+ + +

Mark a part for deletion. The path is relative to the archive, +e.g. "Pictures/1003200258912EB1C3.jpg"

+
+ + +
+
+ +
+ mimetype: str + + + +
+ +
320    @property
+321    def mimetype(self) -> str:
+322        if not self.container:
+323            raise ValueError("Empty Container")
+324        return self.container.mimetype
+
+ + + + +
+
+ +
+ + def + get_type(self) -> str: + + + +
+ +
332    def get_type(self) -> str:
+333        """Get the ODF type (also called class) of this document.
+334
+335        Return: 'chart', 'database', 'formula', 'graphics',
+336            'graphics-template', 'image', 'presentation',
+337            'presentation-template', 'spreadsheet', 'spreadsheet-template',
+338            'text', 'text-master', 'text-template' or 'text-web'
+339        """
+340        # The mimetype must be with the form:
+341        # application/vnd.oasis.opendocument.text
+342
+343        # Isolate and return the last part
+344        return self.mimetype.rsplit(".", 1)[-1]
+
+ + +

Get the ODF type (also called class) of this document.

+ +

Return: 'chart', 'database', 'formula', 'graphics', + 'graphics-template', 'image', 'presentation', + 'presentation-template', 'spreadsheet', 'spreadsheet-template', + 'text', 'text-master', 'text-template' or 'text-web'

+
+ + +
+
+ +
+ body: Element + + + +
+ +
346    @property
+347    def body(self) -> Element:
+348        """Return the body element of the content part, where actual content
+349        is stored.
+350        """
+351        if self.__body is None:
+352            self.__body = self.content.body
+353        return self.__body
+
+ + +

Return the body element of the content part, where actual content +is stored.

+
+ + +
+
+ +
+ meta: Meta + + + +
+ +
355    @property
+356    def meta(self) -> Meta:
+357        """Return the meta part (meta.xml) of the document, where meta data
+358        are stored."""
+359        metadata = self.get_part(ODF_META)
+360        if metadata is None or not isinstance(metadata, Meta):
+361            raise ValueError("Empty Meta")
+362        return metadata
+
+ + +

Return the meta part (meta.xml) of the document, where meta data +are stored.

+
+ + +
+
+ +
+ manifest: Manifest + + + +
+ +
364    @property
+365    def manifest(self) -> Manifest:
+366        """Return the manifest part (manifest.xml) of the document."""
+367        manifest = self.get_part(ODF_MANIFEST)
+368        if manifest is None or not isinstance(manifest, Manifest):
+369            raise ValueError("Empty Manifest")
+370        return manifest
+
+ + +

Return the manifest part (manifest.xml) of the document.

+
+ + +
+
+ +
+ + def + get_formatted_text(self, rst_mode: bool = False) -> str: + + + +
+ +
445    def get_formatted_text(self, rst_mode: bool = False) -> str:
+446        """Return content as text, with some formatting."""
+447        # For the moment, only "type='text'"
+448        doc_type = self.get_type()
+449        if doc_type == "spreadsheet":
+450            return self._tables_csv()
+451        if doc_type in {
+452            "text",
+453            "text-template",
+454            "presentation",
+455            "presentation-template",
+456        }:
+457            return self._formatted_text(rst_mode)
+458        raise NotImplementedError(f"Type of document '{doc_type}' not supported yet")
+
+ + +

Return content as text, with some formatting.

+
+ + +
+
+ +
+ + def + get_formated_meta(self) -> str: + + + +
+ +
495    def get_formated_meta(self) -> str:
+496        """Return meta informations as text, with some formatting."""
+497        result: list[str] = []
+498
+499        # Simple values
+500        def print_info(name: str, value: Any) -> None:
+501            if value:
+502                result.append(f"{name}: {value}")
+503
+504        meta = self.meta
+505        print_info("Title", meta.get_title())
+506        print_info("Subject", meta.get_subject())
+507        print_info("Language", meta.get_language())
+508        print_info("Modification date", meta.get_modification_date())
+509        print_info("Creation date", meta.get_creation_date())
+510        print_info("Initial creator", meta.get_initial_creator())
+511        print_info("Keyword", meta.get_keywords())
+512        print_info("Editing duration", meta.get_editing_duration())
+513        print_info("Editing cycles", meta.get_editing_cycles())
+514        print_info("Generator", meta.get_generator())
+515
+516        # Statistic
+517        result.append("Statistic:")
+518        statistic = meta.get_statistic()
+519        if statistic:
+520            for name, data in statistic.items():
+521                result.append(f"  - {name[5:].replace('-', ' ').capitalize()}: {data}")
+522
+523        # User defined metadata
+524        result.append("User defined metadata:")
+525        user_metadata = meta.get_user_defined_metadata()
+526        for name, data2 in user_metadata.items():
+527            result.append(f"  - {name}: {data2}")
+528
+529        # And the description
+530        print_info("Description", meta.get_description())
+531
+532        return "\n".join(result) + "\n"
+
+ + +

Return meta informations as text, with some formatting.

+
+ + +
+
+ +
+ + def + add_file(self, path_or_file: str | pathlib.Path) -> str: + + + +
+ +
534    def add_file(self, path_or_file: str | Path) -> str:
+535        """Insert a file from a path or a file-like object in the container.
+536
+537        Return the full path to reference in the content.
+538
+539        Arguments:
+540
+541            path_or_file -- str or Path or file-like
+542
+543        Return: str (URI)
+544        """
+545        if not self.container:
+546            raise ValueError("Empty Container")
+547        name = ""
+548        # Folder for added files (FIXME hard-coded and copied)
+549        manifest = self.manifest
+550        medias = manifest.get_paths()
+551        # uuid = str(uuid4())
+552
+553        if isinstance(path_or_file, (str, Path)):
+554            path = Path(path_or_file)
+555            extension = path.suffix.lower()
+556            name = f"{path.stem}{extension}"
+557            if posixpath.join("Pictures", name) in medias:
+558                name = f"{path.stem}_{uuid4()}{extension}"
+559        else:
+560            path = None
+561            name = getattr(path_or_file, "name", None)
+562            if not name:
+563                name = str(uuid4())
+564        media_type, _encoding = guess_type(name)
+565        if not media_type:
+566            media_type = "application/octet-stream"
+567        if manifest.get_media_type("Pictures/") is None:
+568            manifest.add_full_path("Pictures/")
+569        full_path = posixpath.join("Pictures", name)
+570        if path is None:
+571            self.container.set_part(full_path, path_or_file.read())
+572        else:
+573            self.container.set_part(full_path, path.read_bytes())
+574        manifest.add_full_path(full_path, media_type)
+575        return full_path
+
+ + +

Insert a file from a path or a file-like object in the container.

+ +

Return the full path to reference in the content.

+ +

Arguments:

+ +
path_or_file -- str or Path or file-like
+
+ +

Return: str (URI)

+
+ + +
+
+ +
+ clone: Document + + + +
+ +
577    @property
+578    def clone(self) -> Document:
+579        """Return an exact copy of the document.
+580
+581        Return: Document
+582        """
+583        clone = object.__new__(self.__class__)
+584        for name in self.__dict__:
+585            if name == "_Document__body":
+586                setattr(clone, name, None)
+587            elif name == "_Document__xmlparts":
+588                setattr(clone, name, {})
+589            elif name == "container":
+590                if not self.container:
+591                    raise ValueError("Empty Container")
+592                setattr(clone, name, self.container.clone)
+593            else:
+594                value = deepcopy(getattr(self, name))
+595                setattr(clone, name, value)
+596        return clone
+
+ + +

Return an exact copy of the document.

+ +

Return: Document

+
+ + +
+
+ +
+ + def + save( self, target: str | pathlib.Path | _io.BytesIO | None = None, packaging: str = 'zip', pretty: bool = False, backup: bool = False) -> None: + + + +
+ +
598    def save(
+599        self,
+600        target: str | Path | io.BytesIO | None = None,
+601        packaging: str = "zip",
+602        pretty: bool = False,
+603        backup: bool = False,
+604    ) -> None:
+605        """Save the document, at the same place it was opened or at the given
+606        target path. Target can also be a file-like object. It can be saved
+607        as a Zip file (default) or as files in a folder (for debugging
+608        purpose). XML parts can be pretty printed.
+609
+610        Arguments:
+611
+612            target -- str or file-like object
+613
+614            packaging -- 'zip' or 'folder'
+615
+616            pretty -- bool
+617
+618            backup -- bool
+619        """
+620        if not self.container:
+621            raise ValueError("Empty Container")
+622        # Some advertising
+623        self.meta.set_generator_default()
+624        # Synchronize data with container
+625        container = self.container
+626        for path, part in self.__xmlparts.items():
+627            if part is not None:
+628                container.set_part(path, part.serialize(pretty))
+629        # Save the container
+630        container.save(target, packaging=packaging, backup=backup)
+
+ + +

Save the document, at the same place it was opened or at the given +target path. Target can also be a file-like object. It can be saved +as a Zip file (default) or as files in a folder (for debugging +purpose). XML parts can be pretty printed.

+ +

Arguments:

+ +
target -- str or file-like object
+
+packaging -- 'zip' or 'folder'
+
+pretty -- bool
+
+backup -- bool
+
+
+ + +
+
+ +
+ content: Content + + + +
+ +
632    @property
+633    def content(self) -> Content:
+634        content: Content | None = self.get_part(ODF_CONTENT)  # type:ignore
+635        if content is None:
+636            raise ValueError("Empty Content")
+637        return content
+
+ + + + +
+
+ +
+ styles: Styles + + + +
+ +
639    @property
+640    def styles(self) -> Styles:
+641        styles: Styles | None = self.get_part(ODF_STYLES)  # type:ignore
+642        if styles is None:
+643            raise ValueError("Empty Styles")
+644        return styles
+
+ + + + +
+
+ +
+ + def + get_styles( self, family: str | bytes = '', automatic: bool = False) -> list[Style | Element]: + + + +
+ +
648    def get_styles(
+649        self,
+650        family: str | bytes = "",
+651        automatic: bool = False,
+652    ) -> list[Style | Element]:
+653        # compatibility with old versions:
+654
+655        if isinstance(family, bytes):
+656            family = bytes_to_str(family)
+657        return self.content.get_styles(family=family) + self.styles.get_styles(
+658            family=family, automatic=automatic
+659        )
+
+ + + + +
+
+ +
+ + def + get_style( self, family: str, name_or_element: str | Style | None = None, display_name: str | None = None) -> Style | None: + + + +
+ +
661    def get_style(
+662        self,
+663        family: str,
+664        name_or_element: str | Style | None = None,
+665        display_name: str | None = None,
+666    ) -> Style | None:
+667        """Return the style uniquely identified by the name/family pair. If
+668        the argument is already a style object, it will return it.
+669
+670        If the name is None, the default style is fetched.
+671
+672        If the name is not the internal name but the name you gave in a
+673        desktop application, use display_name instead.
+674
+675        Arguments:
+676
+677            family -- 'paragraph', 'text',  'graphic', 'table', 'list',
+678                      'number', 'page-layout', 'master-page'
+679
+680            name -- str or Element or None
+681
+682            display_name -- str
+683
+684        Return: Style or None if not found.
+685        """
+686        # 1. content.xml
+687        element = self.content.get_style(
+688            family, name_or_element=name_or_element, display_name=display_name
+689        )
+690        if element is not None:
+691            return element
+692        # 2. styles.xml
+693        return self.styles.get_style(
+694            family,
+695            name_or_element=name_or_element,
+696            display_name=display_name,
+697        )
+
+ + +

Return the style uniquely identified by the name/family pair. If +the argument is already a style object, it will return it.

+ +

If the name is None, the default style is fetched.

+ +

If the name is not the internal name but the name you gave in a +desktop application, use display_name instead.

+ +

Arguments:

+ +
family -- 'paragraph', 'text',  'graphic', 'table', 'list',
+          'number', 'page-layout', 'master-page'
+
+name -- str or Element or None
+
+display_name -- str
+
+ +

Return: Style or None if not found.

+
+ + +
+
+ +
+ + def + insert_style( self, style: Style | str, name: str = '', automatic: bool = False, default: bool = False) -> Any: + + + +
+ +
831    def insert_style(  # noqa: C901
+832        self,
+833        style: Style | str,
+834        name: str = "",
+835        automatic: bool = False,
+836        default: bool = False,
+837    ) -> Any:
+838        """Insert the given style object in the document, as required by the
+839        style family and type.
+840
+841        The style is expected to be a common style with a name. In case it
+842        was created with no name, the given can be set on the fly.
+843
+844        If automatic is True, the style will be inserted as an automatic
+845        style.
+846
+847        If default is True, the style will be inserted as a default style and
+848        would replace any existing default style of the same family. Any name
+849        or display name would be ignored.
+850
+851        Automatic and default arguments are mutually exclusive.
+852
+853        All styles can't be used as default styles. Default styles are
+854        allowed for the following families: paragraph, text, section, table,
+855        table-column, table-row, table-cell, table-page, chart, drawing-page,
+856        graphic, presentation, control and ruby.
+857
+858        Arguments:
+859
+860            style -- Style or str
+861
+862            name -- str
+863
+864            automatic -- bool
+865
+866            default -- bool
+867
+868        Return : style name -- str
+869        """
+870
+871        # if style is a str, assume it is the Style definition
+872        if isinstance(style, str):
+873            style_element: Style = Element.from_tag(style)  # type: ignore
+874        else:
+875            style_element = style
+876        if not isinstance(style_element, Element):
+877            raise TypeError(f"Unknown Style type: '{style!r}'")
+878
+879        # Get family and name
+880        family = self._pseudo_style_attribute(style_element, "family")
+881        if not name:
+882            name = self._pseudo_style_attribute(style_element, "name")
+883
+884        # Master page style
+885        if family == "master-page":
+886            existing, style_container = self._insert_style_get_master_page(family, name)
+887        # Font face declarations
+888        elif family == "font-face":
+889            if default:
+890                existing, style_container = self._insert_style_get_font_face_default(
+891                    family, name
+892                )
+893            else:
+894                existing, style_container = self._insert_style_get_font_face(
+895                    family, name
+896                )
+897        # page layout style
+898        elif family == "page-layout":
+899            existing, style_container = self._insert_style_get_page_layout(family, name)
+900        # Common style
+901        elif family in FAMILY_ODF_STD or family in {"number"}:
+902            existing, style_container = self._insert_style_standard(
+903                style_element, name, family, automatic, default
+904            )
+905        elif not family and style_element.__class__.__name__ == "DrawFillImage":
+906            # special case for 'draw:fill-image' pseudo style
+907            existing, style_container = self._insert_style_get_draw_fill_image(name)
+908        # Invalid style
+909        else:
+910            raise ValueError(
+911                "Invalid style: "
+912                f"{style_element}, tag:{style_element.tag}, family:{family}"
+913            )
+914
+915        # Insert it!
+916        if existing is not None:
+917            style_container.delete(existing)
+918        style_container.append(style_element)
+919        return self._pseudo_style_attribute(style_element, "name")
+
+ + +

Insert the given style object in the document, as required by the +style family and type.

+ +

The style is expected to be a common style with a name. In case it +was created with no name, the given can be set on the fly.

+ +

If automatic is True, the style will be inserted as an automatic +style.

+ +

If default is True, the style will be inserted as a default style and +would replace any existing default style of the same family. Any name +or display name would be ignored.

+ +

Automatic and default arguments are mutually exclusive.

+ +

All styles can't be used as default styles. Default styles are +allowed for the following families: paragraph, text, section, table, +table-column, table-row, table-cell, table-page, chart, drawing-page, +graphic, presentation, control and ruby.

+ +

Arguments:

+ +
style -- Style or str
+
+name -- str
+
+automatic -- bool
+
+default -- bool
+
+ +

Return : style name -- str

+
+ + +
+
+ +
+ + def + get_styled_elements(self, name: str = '') -> list[Element]: + + + +
+ +
921    def get_styled_elements(self, name: str = "") -> list[Element]:
+922        """Brute-force to find paragraphs, tables, etc. using the given style
+923        name (or all by default).
+924
+925        Arguments:
+926
+927            name -- str
+928
+929        Return: list
+930        """
+931        # Header, footer, etc. have styles too
+932        return self.content.root.get_styled_elements(
+933            name
+934        ) + self.styles.root.get_styled_elements(name)
+
+ + +

Brute-force to find paragraphs, tables, etc. using the given style +name (or all by default).

+ +

Arguments:

+ +
name -- str
+
+ +

Return: list

+
+ + +
+
+ +
+ + def + show_styles( self, automatic: bool = True, common: bool = True, properties: bool = False) -> str: + + + +
+ +
936    def show_styles(
+937        self,
+938        automatic: bool = True,
+939        common: bool = True,
+940        properties: bool = False,
+941    ) -> str:
+942        infos = []
+943        for style in self.get_styles():
+944            try:
+945                name = style.name  # type: ignore
+946            except AttributeError:
+947                print("--------------")
+948                print(style.__class__)
+949                print(style.serialize())
+950                raise
+951            if style.__class__.__name__ == "DrawFillImage":
+952                family = ""
+953            else:
+954                family = str(style.family)  # type: ignore
+955            parent = style.parent
+956            is_auto = parent and parent.tag == "office:automatic-styles"
+957            if is_auto and automatic is False or not is_auto and common is False:
+958                continue
+959            is_used = bool(self.get_styled_elements(name))
+960            infos.append(
+961                {
+962                    "type": "auto  " if is_auto else "common",
+963                    "used": "y" if is_used else "n",
+964                    "family": family,
+965                    "parent": self._pseudo_style_attribute(style, "parent_style") or "",
+966                    "name": name or "",
+967                    "display_name": self._pseudo_style_attribute(style, "display_name")
+968                    or "",
+969                    "properties": style.get_properties() if properties else None,  # type: ignore
+970                }
+971            )
+972        if not infos:
+973            return ""
+974        # Sort by family and name
+975        infos.sort(key=itemgetter("family", "name"))
+976        # Show common and used first
+977        infos.sort(key=itemgetter("type", "used"), reverse=True)
+978        max_family = str(max([len(x["family"]) for x in infos]))  # type: ignore
+979        max_parent = str(max([len(x["parent"]) for x in infos]))  # type: ignore
+980        formater = (
+981            "%(type)s used:%(used)s family:%(family)-0"
+982            + max_family
+983            + "s parent:%(parent)-0"
+984            + max_parent
+985            + "s name:%(name)s"
+986        )
+987        output = []
+988        for info in infos:
+989            line = formater % info
+990            if info["display_name"]:
+991                line += " display_name:" + info["display_name"]  # type: ignore
+992            output.append(line)
+993            if info["properties"]:
+994                for name, value in info["properties"].items():  # type: ignore
+995                    output.append(f"   - {name}: {value}")
+996        output.append("")
+997        return "\n".join(output)
+
+ + + + +
+
+ +
+ + def + delete_styles(self) -> int: + + + +
+ +
 999    def delete_styles(self) -> int:
+1000        """Remove all style information from content and all styles.
+1001
+1002        Return: number of deleted styles
+1003        """
+1004        # First remove references to styles
+1005        for element in self.get_styled_elements():
+1006            for attribute in (
+1007                "text:style-name",
+1008                "draw:style-name",
+1009                "draw:text-style-name",
+1010                "table:style-name",
+1011                "style:page-layout-name",
+1012            ):
+1013                try:
+1014                    element.del_attribute(attribute)
+1015                except KeyError:
+1016                    continue
+1017        # Then remove supposedly orphaned styles
+1018        deleted = 0
+1019        for style in self.get_styles():
+1020            if style.name is None:  # type: ignore
+1021                # Don't delete default styles
+1022                continue
+1023            # elif type(style) is odf_master_page:
+1024            #    # Don't suppress header and footer, just styling was removed
+1025            #    continue
+1026            style.delete()
+1027            deleted += 1
+1028        return deleted
+
+ + +

Remove all style information from content and all styles.

+ +

Return: number of deleted styles

+
+ + +
+
+ +
+ + def + merge_styles_from(self, document: Document) -> None: + + + +
+ +
1030    def merge_styles_from(self, document: Document) -> None:
+1031        """Copy all the styles of a document into ourself.
+1032
+1033        Styles with the same type and name will be replaced, so only unique
+1034        styles will be preserved.
+1035        """
+1036        manifest = self.manifest
+1037        document_manifest = document.manifest
+1038        for style in document.get_styles():
+1039            tagname = style.tag
+1040            family = self._pseudo_style_attribute(style, "family")
+1041            stylename = style.name  # type: ignore
+1042            container = style.parent
+1043            container_name = container.tag  # type: ignore
+1044            partname = container.parent.tag  # type: ignore
+1045            # The destination part
+1046            if partname == "office:document-styles":
+1047                part: Content | Styles = self.styles
+1048            elif partname == "office:document-content":
+1049                part = self.content
+1050            else:
+1051                raise NotImplementedError(partname)
+1052            # Implemented containers
+1053            if container_name not in {
+1054                "office:styles",
+1055                "office:automatic-styles",
+1056                "office:master-styles",
+1057                "office:font-face-decls",
+1058            }:
+1059                raise NotImplementedError(container_name)
+1060            dest = part.get_element(f"//{container_name}")
+1061            # Implemented style types
+1062            # if tagname not in registered_styles:
+1063            #    raise NotImplementedError(tagname)
+1064            duplicate = part.get_style(family, stylename)
+1065            if duplicate is not None:
+1066                duplicate.delete()
+1067            dest.append(style)
+1068            # Copy images from the header/footer
+1069            if tagname == "style:master-page":
+1070                query = "descendant::draw:image"
+1071                for image in style.get_elements(query):
+1072                    url = image.url  # type: ignore
+1073                    part_url = document.get_part(url)
+1074                    # Manually add the part to keep the name
+1075                    self.set_part(url, part_url)  # type: ignore
+1076                    media_type = document_manifest.get_media_type(url)
+1077                    manifest.add_full_path(url, media_type)  # type: ignore
+1078            # Copy images from the fill-image
+1079            elif tagname == "draw:fill-image":
+1080                url = style.url  # type: ignore
+1081                part_url = document.get_part(url)
+1082                self.set_part(url, part_url)  # type: ignore
+1083                media_type = document_manifest.get_media_type(url)
+1084                manifest.add_full_path(url, media_type)  # type: ignore
+
+ + +

Copy all the styles of a document into ourself.

+ +

Styles with the same type and name will be replaced, so only unique +styles will be preserved.

+
+ + +
+
+ +
+ + def + add_page_break_style(self) -> None: + + + +
+ +
1086    def add_page_break_style(self) -> None:
+1087        """Ensure that the document contains the style required for a manual page break.
+1088
+1089        Then a manual page break can be added to the document with:
+1090            from paragraph import PageBreak
+1091            ...
+1092            document.body.append(PageBreak())
+1093
+1094        Note: this style uses the property 'fo:break-after', another
+1095        possibility could be the property 'fo:break-before'
+1096        """
+1097        if existing := self.get_style(  # noqa: SIM102
+1098            family="paragraph",
+1099            name_or_element="odfdopagebreak",
+1100        ):
+1101            if properties := existing.get_properties():  # noqa: SIM102
+1102                if properties["fo:break-after"] == "page":
+1103                    return
+1104        style = (
+1105            '<style:style style:family="paragraph" style:parent-style-name="Standard" '
+1106            'style:name="odfdopagebreak">'
+1107            '<style:paragraph-properties fo:break-after="page"/></style:style>'
+1108        )
+1109        self.insert_style(style, automatic=False)
+
+ + +

Ensure that the document contains the style required for a manual page break.

+ +

Then a manual page break can be added to the document with: + from paragraph import PageBreak + ... + document.body.append(PageBreak())

+ +

Note: this style uses the property 'fo:break-after', another +possibility could be the property 'fo:break-before'

+
+ + +
+
+
+ +
+ + class + DrawFillImage(odfdo.DrawImage): + + + +
+ +
 85class DrawFillImage(DrawImage):
+ 86    _tag = "draw:fill-image"
+ 87    _properties: tuple[PropDef, ...] = (
+ 88        PropDef("display_name", "draw:display-name"),
+ 89        PropDef("name", "draw:name"),
+ 90        PropDef("height", "svg:height"),
+ 91        PropDef("width", "svg:width"),
+ 92    )
+ 93
+ 94    def __init__(
+ 95        self,
+ 96        name: str | None = None,
+ 97        display_name: str | None = None,
+ 98        height: str | None = None,
+ 99        width: str | None = None,
+100        **kwargs: Any,
+101    ) -> None:
+102        """The "draw:fill-image" element specifies a link to a bitmap
+103        resource. Fill image are not available as automatic styles.
+104        The "draw:fill-image" element is usable within the following element:
+105        "office:styles"
+106
+107        Arguments:
+108
+109            name -- str
+110
+111            display_name -- str
+112
+113            height -- str
+114
+115            width -- str
+116        """
+117        super().__init__(**kwargs)
+118        if self._do_init:
+119            self.name = name
+120            self.display_name = display_name
+121            self.height = height
+122            self.width = width
+
+ + +

The "draw:image" element represents an image. An image can be +either:

+ +
    +
  • A link to an external resource or
  • +
  • Embedded in the document (Not implemented in this version)
  • +
+ +

Warning: image elements must be stored in a frame "draw:frame", +see Frame().

+
+ + +
+ +
+ + DrawFillImage( name: str | None = None, display_name: str | None = None, height: str | None = None, width: str | None = None, **kwargs: Any) + + + +
+ +
 94    def __init__(
+ 95        self,
+ 96        name: str | None = None,
+ 97        display_name: str | None = None,
+ 98        height: str | None = None,
+ 99        width: str | None = None,
+100        **kwargs: Any,
+101    ) -> None:
+102        """The "draw:fill-image" element specifies a link to a bitmap
+103        resource. Fill image are not available as automatic styles.
+104        The "draw:fill-image" element is usable within the following element:
+105        "office:styles"
+106
+107        Arguments:
+108
+109            name -- str
+110
+111            display_name -- str
+112
+113            height -- str
+114
+115            width -- str
+116        """
+117        super().__init__(**kwargs)
+118        if self._do_init:
+119            self.name = name
+120            self.display_name = display_name
+121            self.height = height
+122            self.width = width
+
+ + +

The "draw:fill-image" element specifies a link to a bitmap +resource. Fill image are not available as automatic styles. +The "draw:fill-image" element is usable within the following element: +"office:styles"

+ +

Arguments:

+ +
name -- str
+
+display_name -- str
+
+height -- str
+
+width -- str
+
+
+ + +
+
+ +
+ display_name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ height: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ width: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+ +
+
+
+
+ +
+ + class + DrawGroup(odfdo.Element, odfdo.frame.AnchorMix, odfdo.frame.ZMix, odfdo.frame.PosMix): + + + +
+ +
315class DrawGroup(Element, AnchorMix, ZMix, PosMix):
+316    """The DrawGroup "draw:g" element represents a group of drawing shapes.
+317
+318    Warning: implementation is currently minimal.
+319
+320    Drawing shapes contained by a "draw:g" element that is itself
+321    contained by a "draw:a" element, act as hyperlinks using the
+322    xlink:href attribute of the containing "draw:a" element. If the
+323    included drawing shapes are themselves contained within "draw:a"
+324    elements, then the xlink:href attributes of those "draw:a" elements
+325    act as the hyperlink information for the shapes they contain.
+326
+327    The "draw:g" element has the following attributes: draw:caption-id,
+328    draw:class-names, draw:id, draw:name, draw:style-name, draw:z-index,
+329    presentation:class-names, presentation:style-name, svg:y,
+330    table:end-cell-address, table:end-x, table:end-y,
+331    table:table-background, text:anchor-page-number, text:anchor-type,
+332    and xml:id.
+333
+334    The "draw:g" element has the following child elements: "dr3d:scene",
+335    "draw:a", "draw:caption", "draw:circle", "draw:connector",
+336    "draw:control", "draw:custom-shape", "draw:ellipse", "draw:frame",
+337    "draw:g", "draw:glue-point", "draw:line", "draw:measure",
+338    "draw:page-thumbnail", "draw:path", "draw:polygon", "draw:polyline",
+339    "draw:rect", "draw:regular-polygon", "office:event-listeners",
+340    "svg:desc" and "svg:title".
+341    """
+342
+343    _tag = "draw:g"
+344    _properties: tuple[PropDef, ...] = (
+345        PropDef("draw_id", "draw:id"),
+346        PropDef("caption_id", "draw:caption-id"),
+347        PropDef("draw_class_names", "draw:class-names"),
+348        PropDef("name", "draw:name"),
+349        PropDef("style", "draw:style-name"),
+350        # ('z_index', 'draw:z-index'),
+351        PropDef("presentation_class_names", "presentation:class-names"),
+352        PropDef("presentation_style", "presentation:style-name"),
+353        PropDef("table_end_cell", "table:end-cell-address"),
+354        PropDef("table_end_x", "table:end-x"),
+355        PropDef("table_end_y", "table:end-y"),
+356        PropDef("table_background", "table:table-background"),
+357        # ('anchor_page', 'text:anchor-page-number'),
+358        # ('anchor_type', 'text:anchor-type'),
+359        PropDef("xml_id", "xml:id"),
+360        PropDef("pos_x", "svg:x"),
+361        PropDef("pos_y", "svg:y"),
+362    )
+363
+364    def __init__(
+365        self,
+366        name: str | None = None,
+367        draw_id: str | None = None,
+368        style: str | None = None,
+369        position: tuple | None = None,
+370        z_index: int = 0,
+371        anchor_type: str | None = None,
+372        anchor_page: int | None = None,
+373        presentation_style: str | None = None,
+374        **kwargs: Any,
+375    ) -> None:
+376        super().__init__(**kwargs)
+377        if self._do_init:
+378            if z_index is not None:
+379                self.z_index = z_index
+380            if name:
+381                self.name = name
+382            if draw_id is not None:
+383                self.draw_id = draw_id
+384            if style is not None:
+385                self.style = style
+386            if position is not None:
+387                self.position = position
+388            if anchor_type:
+389                self.anchor_type = anchor_type
+390            if anchor_page is not None:
+391                self.anchor_page = anchor_page
+392            if presentation_style is not None:
+393                self.presentation_style = presentation_style
+
+ + +

The DrawGroup "draw:g" element represents a group of drawing shapes.

+ +

Warning: implementation is currently minimal.

+ +

Drawing shapes contained by a "draw:g" element that is itself +contained by a "draw:a" element, act as hyperlinks using the +xlink:href attribute of the containing "draw:a" element. If the +included drawing shapes are themselves contained within "draw:a" +elements, then the xlink:href attributes of those "draw:a" elements +act as the hyperlink information for the shapes they contain.

+ +

The "draw:g" element has the following attributes: draw:caption-id, +draw:class-names, draw:id, draw:name, draw:style-name, draw:z-index, +presentation:class-names, presentation:style-name, svg:y, +table:end-cell-address, table:end-x, table:end-y, +table:table-background, text:anchor-page-number, text:anchor-type, +and xml:id.

+ +

The "draw:g" element has the following child elements: "dr3d:scene", +"draw:a", "draw:caption", "draw:circle", "draw:connector", +"draw:control", "draw:custom-shape", "draw:ellipse", "draw:frame", +"draw:g", "draw:glue-point", "draw:line", "draw:measure", +"draw:page-thumbnail", "draw:path", "draw:polygon", "draw:polyline", +"draw:rect", "draw:regular-polygon", "office:event-listeners", +"svg:desc" and "svg:title".

+
+ + +
+ +
+ + DrawGroup( name: str | None = None, draw_id: str | None = None, style: str | None = None, position: tuple | None = None, z_index: int = 0, anchor_type: str | None = None, anchor_page: int | None = None, presentation_style: str | None = None, **kwargs: Any) + + + +
+ +
364    def __init__(
+365        self,
+366        name: str | None = None,
+367        draw_id: str | None = None,
+368        style: str | None = None,
+369        position: tuple | None = None,
+370        z_index: int = 0,
+371        anchor_type: str | None = None,
+372        anchor_page: int | None = None,
+373        presentation_style: str | None = None,
+374        **kwargs: Any,
+375    ) -> None:
+376        super().__init__(**kwargs)
+377        if self._do_init:
+378            if z_index is not None:
+379                self.z_index = z_index
+380            if name:
+381                self.name = name
+382            if draw_id is not None:
+383                self.draw_id = draw_id
+384            if style is not None:
+385                self.style = style
+386            if position is not None:
+387                self.position = position
+388            if anchor_type:
+389                self.anchor_type = anchor_type
+390            if anchor_page is not None:
+391                self.anchor_page = anchor_page
+392            if presentation_style is not None:
+393                self.presentation_style = presentation_style
+
+ + + + +
+
+ +
+ draw_id: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ caption_id: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ draw_class_names: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ presentation_class_names: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ presentation_style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ table_end_cell: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ table_end_x: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ table_end_y: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ table_background: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ xml_id: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ pos_x: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ pos_y: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
odfdo.frame.AnchorMix
+
ANCHOR_VALUE_CHOICE
+
anchor_type
+
anchor_page
+ +
+
odfdo.frame.ZMix
+
z_index
+ +
+
odfdo.frame.PosMix
+
position
+ +
+
+
+
+
+ +
+ + class + DrawImage(odfdo.Element): + + + +
+ +
31class DrawImage(Element):
+32    """The "draw:image" element represents an image. An image can be
+33    either:
+34    - A link to an external resource or
+35    - Embedded in the document (Not implemented in this version)
+36
+37    Warning: image elements must be stored in a frame "draw:frame",
+38    see Frame().
+39    """
+40
+41    _tag = "draw:image"
+42    _properties: tuple[PropDef, ...] = (
+43        PropDef("url", "xlink:href"),
+44        PropDef("type", "xlink:type"),
+45        PropDef("show", "xlink:show"),
+46        PropDef("actuate", "xlink:actuate"),
+47        PropDef("filter_name", "draw:filter-name"),
+48    )
+49
+50    def __init__(
+51        self,
+52        url: str = "",
+53        xlink_type: str = "simple",
+54        show: str = "embed",
+55        actuate: str = "onLoad",
+56        filter_name: str | None = None,
+57        **kwargs: Any,
+58    ) -> None:
+59        """Initialisation of an DrawImage.
+60
+61        Arguments:
+62
+63            url -- str
+64
+65            type -- str
+66
+67            show -- str
+68
+69            actuate -- str
+70
+71            filter_name -- str
+72        """
+73        super().__init__(**kwargs)
+74        if self._do_init:
+75            self.url = url
+76            self.type = xlink_type
+77            self.show = show
+78            self.actuate = actuate
+79            self.filter_name = filter_name
+
+ + +

The "draw:image" element represents an image. An image can be +either:

+ +
    +
  • A link to an external resource or
  • +
  • Embedded in the document (Not implemented in this version)
  • +
+ +

Warning: image elements must be stored in a frame "draw:frame", +see Frame().

+
+ + +
+ +
+ + DrawImage( url: str = '', xlink_type: str = 'simple', show: str = 'embed', actuate: str = 'onLoad', filter_name: str | None = None, **kwargs: Any) + + + +
+ +
50    def __init__(
+51        self,
+52        url: str = "",
+53        xlink_type: str = "simple",
+54        show: str = "embed",
+55        actuate: str = "onLoad",
+56        filter_name: str | None = None,
+57        **kwargs: Any,
+58    ) -> None:
+59        """Initialisation of an DrawImage.
+60
+61        Arguments:
+62
+63            url -- str
+64
+65            type -- str
+66
+67            show -- str
+68
+69            actuate -- str
+70
+71            filter_name -- str
+72        """
+73        super().__init__(**kwargs)
+74        if self._do_init:
+75            self.url = url
+76            self.type = xlink_type
+77            self.show = show
+78            self.actuate = actuate
+79            self.filter_name = filter_name
+
+ + +

Initialisation of an DrawImage.

+ +

Arguments:

+ +
url -- str
+
+type -- str
+
+show -- str
+
+actuate -- str
+
+filter_name -- str
+
+
+ + +
+
+ +
+ url: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ type: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ show: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ actuate: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ filter_name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + DrawPage(odfdo.Element): + + + +
+ +
 33class DrawPage(Element):
+ 34    """ODF draw page "draw:page", for pages of presentation and drawings."""
+ 35
+ 36    _tag = "draw:page"
+ 37    _properties = (
+ 38        PropDef("name", "draw:name"),
+ 39        PropDef("draw_id", "draw:id"),
+ 40        PropDef("master_page", "draw:master-page-name"),
+ 41        PropDef(
+ 42            "presentation_page_layout", "presentation:presentation-page-layout-name"
+ 43        ),
+ 44        PropDef("style", "draw:style-name"),
+ 45    )
+ 46
+ 47    def __init__(
+ 48        self,
+ 49        draw_id: str | None = None,
+ 50        name: str | None = None,
+ 51        master_page: str | None = None,
+ 52        presentation_page_layout: str | None = None,
+ 53        style: str | None = None,
+ 54        **kwargs: Any,
+ 55    ) -> None:
+ 56        """
+ 57        Arguments:
+ 58
+ 59            draw_id -- str
+ 60
+ 61            name -- str
+ 62
+ 63            master_page -- str
+ 64
+ 65            presentation_page_layout -- str
+ 66
+ 67            style -- str
+ 68        """
+ 69        super().__init__(**kwargs)
+ 70        if self._do_init:
+ 71            if draw_id:
+ 72                self.draw_id = draw_id
+ 73            if name:
+ 74                self.name = name
+ 75            if master_page:
+ 76                self.master_page = master_page
+ 77            if presentation_page_layout:
+ 78                self.presentation_page_layout = presentation_page_layout
+ 79            if style:
+ 80                self.style = style
+ 81
+ 82    def set_transition(
+ 83        self,
+ 84        smil_type: str,
+ 85        subtype: str | None = None,
+ 86        dur: str = "2s",
+ 87    ) -> None:
+ 88        # Create the new animation
+ 89        anim_page = AnimPar(presentation_node_type="timing-root")
+ 90        anim_begin = AnimPar(smil_begin=f"{self.draw_id}.begin")
+ 91        transition = AnimTransFilter(
+ 92            smil_dur=dur, smil_type=smil_type, smil_subtype=subtype
+ 93        )
+ 94        anim_page.append(anim_begin)
+ 95        anim_begin.append(transition)
+ 96
+ 97        # Replace when already a transition:
+ 98        #   anim:seq => After the frame's transition
+ 99        #   cf page 349 of OpenDocument-v1.0-os.pdf
+100        #   Conclusion: We must delete the first child 'anim:par'
+101        existing = self.get_element("anim:par")
+102        if existing:
+103            self.delete(existing)
+104        self.append(anim_page)
+105
+106    def get_shapes(self) -> list[Element]:
+107        query = "(descendant::" + "|descendant::".join(registered_shapes) + ")"
+108        return self.get_elements(query)
+109
+110    def get_formatted_text(self, context: dict | None = None) -> str:
+111        result: list[str] = []
+112        for child in self.children:
+113            if child.tag == "presentation:notes":
+114                # No need for an advanced odf_notes.get_formatted_text()
+115                # because the text seems to be only contained in paragraphs
+116                # and frames, that we already handle
+117                for sub_child in child.children:
+118                    result.append(sub_child.get_formatted_text(context))
+119                result.append("\n")
+120            result.append(child.get_formatted_text(context))
+121        result.append("\n")
+122        return "".join(result)
+
+ + +

ODF draw page "draw:page", for pages of presentation and drawings.

+
+ + +
+ +
+ + DrawPage( draw_id: str | None = None, name: str | None = None, master_page: str | None = None, presentation_page_layout: str | None = None, style: str | None = None, **kwargs: Any) + + + +
+ +
47    def __init__(
+48        self,
+49        draw_id: str | None = None,
+50        name: str | None = None,
+51        master_page: str | None = None,
+52        presentation_page_layout: str | None = None,
+53        style: str | None = None,
+54        **kwargs: Any,
+55    ) -> None:
+56        """
+57        Arguments:
+58
+59            draw_id -- str
+60
+61            name -- str
+62
+63            master_page -- str
+64
+65            presentation_page_layout -- str
+66
+67            style -- str
+68        """
+69        super().__init__(**kwargs)
+70        if self._do_init:
+71            if draw_id:
+72                self.draw_id = draw_id
+73            if name:
+74                self.name = name
+75            if master_page:
+76                self.master_page = master_page
+77            if presentation_page_layout:
+78                self.presentation_page_layout = presentation_page_layout
+79            if style:
+80                self.style = style
+
+ + +

Arguments:

+ +
draw_id -- str
+
+name -- str
+
+master_page -- str
+
+presentation_page_layout -- str
+
+style -- str
+
+
+ + +
+
+ +
+ + def + set_transition( self, smil_type: str, subtype: str | None = None, dur: str = '2s') -> None: + + + +
+ +
 82    def set_transition(
+ 83        self,
+ 84        smil_type: str,
+ 85        subtype: str | None = None,
+ 86        dur: str = "2s",
+ 87    ) -> None:
+ 88        # Create the new animation
+ 89        anim_page = AnimPar(presentation_node_type="timing-root")
+ 90        anim_begin = AnimPar(smil_begin=f"{self.draw_id}.begin")
+ 91        transition = AnimTransFilter(
+ 92            smil_dur=dur, smil_type=smil_type, smil_subtype=subtype
+ 93        )
+ 94        anim_page.append(anim_begin)
+ 95        anim_begin.append(transition)
+ 96
+ 97        # Replace when already a transition:
+ 98        #   anim:seq => After the frame's transition
+ 99        #   cf page 349 of OpenDocument-v1.0-os.pdf
+100        #   Conclusion: We must delete the first child 'anim:par'
+101        existing = self.get_element("anim:par")
+102        if existing:
+103            self.delete(existing)
+104        self.append(anim_page)
+
+ + + + +
+
+ +
+ + def + get_shapes(self) -> list[Element]: + + + +
+ +
106    def get_shapes(self) -> list[Element]:
+107        query = "(descendant::" + "|descendant::".join(registered_shapes) + ")"
+108        return self.get_elements(query)
+
+ + + + +
+
+ +
+ + def + get_formatted_text(self, context: dict | None = None) -> str: + + + +
+ +
110    def get_formatted_text(self, context: dict | None = None) -> str:
+111        result: list[str] = []
+112        for child in self.children:
+113            if child.tag == "presentation:notes":
+114                # No need for an advanced odf_notes.get_formatted_text()
+115                # because the text seems to be only contained in paragraphs
+116                # and frames, that we already handle
+117                for sub_child in child.children:
+118                    result.append(sub_child.get_formatted_text(context))
+119                result.append("\n")
+120            result.append(child.get_formatted_text(context))
+121        result.append("\n")
+122        return "".join(result)
+
+ + +

This function should return a beautiful version of the text.

+
+ + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ draw_id: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ master_page: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ presentation_page_layout: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Element(odfdo.utils.cached_element.CachedElement): + + + +
+ +
 304class Element(CachedElement):
+ 305    """Super class of all ODF classes.
+ 306
+ 307    Representation of an XML element. Abstraction of the XML library behind.
+ 308    """
+ 309
+ 310    _tag: str = ""
+ 311    _caching: bool = False
+ 312    _properties: tuple[PropDef, ...] = ()
+ 313
+ 314    def __init__(self, **kwargs: Any) -> None:
+ 315        tag_or_elem = kwargs.pop("tag_or_elem", None)
+ 316        if tag_or_elem is None:
+ 317            # Instance for newly created object: create new lxml element and
+ 318            # continue by subclass __init__
+ 319            # If the tag key word exists, make a custom element
+ 320            self._do_init = True
+ 321            tag = kwargs.pop("tag", self._tag)
+ 322            self.__element = self.make_etree_element(tag)
+ 323        else:
+ 324            # called with an existing lxml element, sould be a result of
+ 325            # from_tag() casting, do not execute the subclass __init__
+ 326            if not isinstance(tag_or_elem, _Element):
+ 327                raise TypeError(f'"{type(tag_or_elem)}" is not an element node')
+ 328            self._do_init = False
+ 329            self.__element = tag_or_elem
+ 330
+ 331    def __repr__(self) -> str:
+ 332        return f"<{self.__class__.__name__} tag={self.tag}>"
+ 333
+ 334    def __str__(self) -> str:
+ 335        return self.text_recursive
+ 336
+ 337    @classmethod
+ 338    def from_tag(cls, tag_or_elem: str | _Element) -> Element:
+ 339        """Element class and subclass factory.
+ 340
+ 341        Turn an lxml Element or ODF string tag into an ODF XML Element
+ 342        of the relevant class.
+ 343
+ 344        Arguments:
+ 345
+ 346            tag_or_elem -- ODF str tag or lxml.Element
+ 347
+ 348        Return: Element (or subclass) instance
+ 349        """
+ 350        if isinstance(tag_or_elem, str):
+ 351            # assume the argument is a prefix:name tag
+ 352            elem = cls.make_etree_element(tag_or_elem)
+ 353        else:
+ 354            elem = tag_or_elem
+ 355        klass = _class_registry.get(elem.tag, cls)
+ 356        return klass(tag_or_elem=elem)
+ 357
+ 358    @classmethod
+ 359    def from_tag_for_clone(
+ 360        cls: type,
+ 361        tree_element: _Element,
+ 362        cache: tuple | None,
+ 363    ) -> Element:
+ 364        tag = to_str(tree_element.tag)
+ 365        klass = _class_registry.get(tag, cls)
+ 366        element = klass(tag_or_elem=tree_element)
+ 367        if cache and element._caching:
+ 368            element._tmap = cache[0]
+ 369            element._cmap = cache[1]
+ 370            if len(cache) == 3:
+ 371                element._rmap = cache[2]
+ 372        return element
+ 373
+ 374    @staticmethod
+ 375    def make_etree_element(tag: str) -> _Element:
+ 376        if not isinstance(tag, str):
+ 377            raise TypeError(f"Tag is not str: {tag!r}")
+ 378        tag = tag.strip()
+ 379        if not tag:
+ 380            raise ValueError("Tag is empty")
+ 381        if "<" not in tag:
+ 382            # Qualified name
+ 383            # XXX don't build the element from scratch or lxml will pollute with
+ 384            # repeated namespace declarations
+ 385            tag = f"<{tag}/>"
+ 386        # XML fragment
+ 387        root = fromstring(NAMESPACES_XML % str_to_bytes(tag))
+ 388        return root[0]
+ 389
+ 390    @staticmethod
+ 391    def _generic_attrib_getter(attr_name: str, family: str | None = None) -> Callable:
+ 392        name = _get_lxml_tag(attr_name)
+ 393
+ 394        def getter(self: Element) -> str | bool | None:
+ 395            try:
+ 396                if family and self.family != family:  # type: ignore
+ 397                    return None
+ 398            except AttributeError:
+ 399                return None
+ 400            value = self.__element.get(name)
+ 401            if value is None:
+ 402                return None
+ 403            elif value in ("true", "false"):
+ 404                return Boolean.decode(value)
+ 405            return str(value)
+ 406
+ 407        return getter
+ 408
+ 409    @staticmethod
+ 410    def _generic_attrib_setter(attr_name: str, family: str | None = None) -> Callable:
+ 411        name = _get_lxml_tag(attr_name)
+ 412
+ 413        def setter(self: Element, value: Any) -> None:
+ 414            try:
+ 415                if family and self.family != family:  # type: ignore
+ 416                    return None
+ 417            except AttributeError:
+ 418                return None
+ 419            if value is None:
+ 420                with contextlib.suppress(KeyError):
+ 421                    del self.__element.attrib[name]
+ 422                return
+ 423            if isinstance(value, bool):
+ 424                value = Boolean.encode(value)
+ 425            self.__element.set(name, str(value))
+ 426
+ 427        return setter
+ 428
+ 429    @classmethod
+ 430    def _define_attribut_property(cls: type[Element]) -> None:
+ 431        for prop in cls._properties:
+ 432            setattr(
+ 433                cls,
+ 434                prop.name,
+ 435                property(
+ 436                    cls._generic_attrib_getter(prop.attr, prop.family or None),
+ 437                    cls._generic_attrib_setter(prop.attr, prop.family or None),
+ 438                    None,
+ 439                    f"Get/set the attribute {prop.attr}",
+ 440                ),
+ 441            )
+ 442
+ 443    @staticmethod
+ 444    def _make_before_regex(
+ 445        before: str | None,
+ 446        after: str | None,
+ 447    ) -> re.Pattern:
+ 448        # 1) before xor after is not None
+ 449        if before is not None:
+ 450            return re.compile(before)
+ 451        else:
+ 452            if after is None:
+ 453                raise ValueError("Both 'before' and 'after' are None")
+ 454            return re.compile(after)
+ 455
+ 456    @staticmethod
+ 457    def _search_negative_position(
+ 458        xpath_result: list,
+ 459        regex: re.Pattern,
+ 460    ) -> tuple[str, re.Match]:
+ 461        # Found the last text that matches the regex
+ 462        text = None
+ 463        for a_text in xpath_result:
+ 464            if regex.search(str(a_text)) is not None:
+ 465                text = a_text
+ 466        if text is None:
+ 467            raise ValueError(f"Text not found: '{xpath_result}'")
+ 468        if not isinstance(text, str):
+ 469            raise TypeError(f"Text not found or text not of type str: '{text}'")
+ 470        return text, list(regex.finditer(text))[-1]
+ 471
+ 472    @staticmethod
+ 473    def _search_positive_position(
+ 474        xpath_result: list,
+ 475        regex: re.Pattern,
+ 476        position: int,
+ 477    ) -> tuple[str, re.Match]:
+ 478        # Found the last text that matches the regex
+ 479        count = 0
+ 480        for text in xpath_result:
+ 481            found_nb = len(regex.findall(str(text)))
+ 482            if found_nb + count >= position + 1:
+ 483                break
+ 484            count += found_nb
+ 485        else:
+ 486            raise ValueError(f"Text not found: '{xpath_result}'")
+ 487        if not isinstance(text, str):
+ 488            raise TypeError(f"Text not found or text not of type str: '{text}'")
+ 489        return text, list(regex.finditer(text))[position - count]
+ 490
+ 491    def _insert_before_after(
+ 492        self,
+ 493        current: _Element,
+ 494        element: _Element,
+ 495        before: str | None,
+ 496        after: str | None,
+ 497        position: int,
+ 498        xpath_text: XPath,
+ 499    ) -> tuple[int, str]:
+ 500        regex = self._make_before_regex(before, after)
+ 501        xpath_result = xpath_text(current)
+ 502        if not isinstance(xpath_result, list):
+ 503            raise TypeError("Bad XPath result")
+ 504        # position = -1
+ 505        if position < 0:
+ 506            text, sre = self._search_negative_position(xpath_result, regex)
+ 507        # position >= 0
+ 508        else:
+ 509            text, sre = self._search_positive_position(xpath_result, regex, position)
+ 510        # Compute pos
+ 511        if before is None:
+ 512            pos = sre.end()
+ 513        else:
+ 514            pos = sre.start()
+ 515        return pos, text
+ 516
+ 517    def _insert_find_text(
+ 518        self,
+ 519        current: _Element,
+ 520        element: _Element,
+ 521        before: str | None,
+ 522        after: str | None,
+ 523        position: int,
+ 524        xpath_text: XPath,
+ 525    ) -> tuple[int, str]:
+ 526        # Find the text
+ 527        xpath_result = xpath_text(current)
+ 528        if not isinstance(xpath_result, list):
+ 529            raise TypeError("Bad XPath result")
+ 530        count = 0
+ 531        for text in xpath_result:
+ 532            if not isinstance(text, str):
+ 533                continue
+ 534            found_nb = len(text)
+ 535            if found_nb + count >= position:
+ 536                break
+ 537            count += found_nb
+ 538        else:
+ 539            raise ValueError("Text not found")
+ 540        # We insert before the character
+ 541        pos = position - count
+ 542        return pos, text
+ 543
+ 544    def _insert(
+ 545        self,
+ 546        element: Element,
+ 547        before: str | None = None,
+ 548        after: str | None = None,
+ 549        position: int = 0,
+ 550        main_text: bool = False,
+ 551    ) -> None:
+ 552        """Insert an element before or after the characters in the text which
+ 553        match the regex before/after.
+ 554
+ 555        When the regex matches more of one part of the text, position can be
+ 556        set to choice which part must be used. If before and after are None,
+ 557        we use only position that is the number of characters. If position is
+ 558        positive and before=after=None, we insert before the position
+ 559        character. But if position=-1, we insert after the last character.
+ 560
+ 561
+ 562        Arguments:
+ 563
+ 564        element -- Element
+ 565
+ 566        before -- str regex
+ 567
+ 568        after -- str regex
+ 569
+ 570        position -- int
+ 571        """
+ 572        # not implemented: if main_text is True, filter out the annotations texts in computation.
+ 573        current = self.__element
+ 574        xelement = element.__element
+ 575
+ 576        if main_text:
+ 577            xpath_text = _xpath_text_main_descendant
+ 578        else:
+ 579            xpath_text = _xpath_text_descendant
+ 580
+ 581        # 1) before xor after is not None
+ 582        if (before is not None) ^ (after is not None):
+ 583            pos, text = self._insert_before_after(
+ 584                current,
+ 585                xelement,
+ 586                before,
+ 587                after,
+ 588                position,
+ 589                xpath_text,
+ 590            )
+ 591        # 2) before=after=None => only with position
+ 592        elif before is None and after is None:
+ 593            # Hack if position is negative => quickly
+ 594            if position < 0:
+ 595                current.append(xelement)
+ 596                return
+ 597            pos, text = self._insert_find_text(
+ 598                current,
+ 599                xelement,
+ 600                before,
+ 601                after,
+ 602                position,
+ 603                xpath_text,
+ 604            )
+ 605        else:
+ 606            raise ValueError("bad combination of arguments")
+ 607
+ 608        # Compute new texts
+ 609        text_before = text[:pos] if text[:pos] else None
+ 610        text_after = text[pos:] if text[pos:] else None
+ 611
+ 612        # Insert!
+ 613        parent = text.getparent()  # type: ignore
+ 614        if text.is_text:  # type: ignore
+ 615            parent.text = text_before
+ 616            element.tail = text_after
+ 617            parent.insert(0, xelement)
+ 618        else:
+ 619            parent.addnext(xelement)
+ 620            parent.tail = text_before
+ 621            element.tail = text_after
+ 622
+ 623    def _insert_between(  # noqa: C901
+ 624        self,
+ 625        element: Element,
+ 626        from_: str,
+ 627        to: str,
+ 628    ) -> None:
+ 629        """Insert the given empty element to wrap the text beginning with
+ 630        "from_" and ending with "to".
+ 631
+ 632        Example 1: '<p>toto tata titi</p>
+ 633
+ 634        We want to insert a link around "tata".
+ 635
+ 636        Result 1: '<p>toto <a>tata</a> titi</p>
+ 637
+ 638        Example 2: '<p><span>toto</span> tata titi</p>
+ 639
+ 640        We want to insert a link around "tata".
+ 641
+ 642        Result 2: '<p><span>toto</span> <a>tata</a> titi</p>
+ 643
+ 644        Example 3: '<p>toto <span> tata </span> titi</p>'
+ 645
+ 646        We want to insert a link from "tata" to "titi" included.
+ 647
+ 648        Result 3: '<p>toto <span> </span>'
+ 649                  '<a><span>tata </span> titi</a></p>'
+ 650
+ 651        Example 4: '<p>toto <span>tata titi</span> tutu</p>'
+ 652
+ 653        We want to insert a link from "titi" to "tutu"
+ 654
+ 655        Result 4: '<p>toto <span>tata </span><a><span>titi</span></a>'
+ 656                  '<a> tutu</a></p>'
+ 657
+ 658        Example 5: '<p>toto <span>tata titi</span> '
+ 659                   '<span>tutu tyty</span></p>'
+ 660
+ 661        We want to insert a link from "titi" to "tutu"
+ 662
+ 663        Result 5: '<p>toto <span>tata </span><a><span>titi</span><a> '
+ 664                  '<a> <span>tutu</span></a><span> tyty</span></p>'
+ 665        """
+ 666        current = self.__element
+ 667        wrapper = element.__element
+ 668
+ 669        xpath_result = _xpath_text_descendant(current)
+ 670        if not isinstance(xpath_result, list):
+ 671            raise TypeError("Bad XPath result")
+ 672
+ 673        for text in xpath_result:
+ 674            if not isinstance(text, str):
+ 675                raise TypeError("Text not found or text not of type str")
+ 676            if from_ not in text:
+ 677                continue
+ 678            from_index = text.index(from_)
+ 679            text_before = text[:from_index]
+ 680            text_after = text[from_index:]
+ 681            from_container = text.getparent()  # type: ignore
+ 682            if not isinstance(from_container, _Element):
+ 683                raise TypeError("Bad XPath result")
+ 684            # Include from_index to match a single word
+ 685            to_index = text.find(to, from_index)
+ 686            if to_index >= 0:
+ 687                # Simple case: "from" and "to" in the same element
+ 688                to_end = to_index + len(to)
+ 689                if text.is_text:  # type: ignore
+ 690                    from_container.text = text_before
+ 691                    wrapper.text = text[to_index:to_end]
+ 692                    wrapper.tail = text[to_end:]
+ 693                    from_container.insert(0, wrapper)
+ 694                else:
+ 695                    from_container.tail = text_before
+ 696                    wrapper.text = text[to_index:to_end]
+ 697                    wrapper.tail = text[to_end:]
+ 698                    parent = from_container.getparent()
+ 699                    index = parent.index(from_container)  # type: ignore
+ 700                    parent.insert(index + 1, wrapper)  # type: ignore
+ 701                return
+ 702            else:
+ 703                # Exit to the second part where we search for the end text
+ 704                break
+ 705        else:
+ 706            raise ValueError("Start text not found")
+ 707
+ 708        # The container is split in two
+ 709        container2 = deepcopy(from_container)
+ 710        if text.is_text:  # type: ignore
+ 711            from_container.text = text_before
+ 712            from_container.tail = None
+ 713            container2.text = text_after
+ 714            from_container.tail = None
+ 715        else:
+ 716            from_container.tail = text_before
+ 717            container2.tail = text_after
+ 718        # Stack the copy into the surrounding element
+ 719        wrapper.append(container2)
+ 720        parent = from_container.getparent()
+ 721        index = parent.index(from_container)  # type: ignore
+ 722        parent.insert(index + 1, wrapper)  # type: ignore
+ 723
+ 724        xpath_result = _xpath_text_descendant(wrapper)
+ 725        if not isinstance(xpath_result, list):
+ 726            raise TypeError("Bad XPath result")
+ 727
+ 728        for text in xpath_result:
+ 729            if not isinstance(text, str):
+ 730                raise TypeError("Text not found or text not of type str")
+ 731            if to not in text:
+ 732                continue
+ 733            to_end = text.index(to) + len(to)
+ 734            text_before = text[:to_end]
+ 735            text_after = text[to_end:]
+ 736            container_to = text.getparent()  # type: ignore
+ 737            if not isinstance(container_to, _Element):
+ 738                raise TypeError("Bad XPath result")
+ 739            if text.is_text:  # type: ignore
+ 740                container_to.text = text_before
+ 741                container_to.tail = text_after
+ 742            else:
+ 743                container_to.tail = text_before
+ 744                next_one = container_to.getnext()
+ 745                if next_one is None:
+ 746                    next_one = container_to.getparent()
+ 747                next_one.tail = text_after  # type: ignore
+ 748            return
+ 749        raise ValueError("End text not found")
+ 750
+ 751    @property
+ 752    def tag(self) -> str:
+ 753        """Get/set the underlying xml tag with the given qualified name.
+ 754
+ 755        Warning: direct change of tag does not change the element class.
+ 756
+ 757        Arguments:
+ 758
+ 759            qname -- str (e.g. "text:span")
+ 760        """
+ 761        return _get_prefixed_name(self.__element.tag)
+ 762
+ 763    @tag.setter
+ 764    def tag(self, qname: str) -> None:
+ 765        self.__element.tag = _get_lxml_tag(qname)
+ 766
+ 767    def elements_repeated_sequence(
+ 768        self,
+ 769        xpath_instance: XPath,
+ 770        name: str,
+ 771    ) -> list[tuple[int, int]]:
+ 772        """Utility method for table module."""
+ 773        lxml_tag = _get_lxml_tag_or_name(name)
+ 774        element = self.__element
+ 775        sub_elements = xpath_instance(element)
+ 776        if not isinstance(sub_elements, list):
+ 777            raise TypeError("Bad XPath result.")
+ 778        result: list[tuple[int, int]] = []
+ 779        idx = -1
+ 780        for sub_element in sub_elements:
+ 781            if not isinstance(sub_element, _Element):
+ 782                continue
+ 783            idx += 1
+ 784            value = sub_element.get(lxml_tag)
+ 785            if value is None:
+ 786                result.append((idx, 1))
+ 787                continue
+ 788            try:
+ 789                int_value = int(value)
+ 790            except ValueError:
+ 791                int_value = 1
+ 792            result.append((idx, max(int_value, 1)))
+ 793        return result
+ 794
+ 795    def get_elements(self, xpath_query: XPath | str) -> list[Element]:
+ 796        cache: tuple | None = None
+ 797        element = self.__element
+ 798        if isinstance(xpath_query, str):
+ 799            new_xpath_query = xpath_compile(xpath_query)
+ 800            result = new_xpath_query(element)
+ 801        else:
+ 802            result = xpath_query(element)
+ 803        if not isinstance(result, list):
+ 804            raise TypeError("Bad XPath result")
+ 805
+ 806        if hasattr(self, "_tmap"):
+ 807            if hasattr(self, "_rmap"):
+ 808                cache = (self._tmap, self._cmap, self._rmap)
+ 809            else:
+ 810                cache = (self._tmap, self._cmap)
+ 811        return [
+ 812            Element.from_tag_for_clone(e, cache)
+ 813            for e in result
+ 814            if isinstance(e, _Element)
+ 815        ]
+ 816
+ 817    # fixme : need original get_element as wrapper of get_elements
+ 818
+ 819    def get_element(self, xpath_query: XPath | str) -> Element | None:
+ 820        element = self.__element
+ 821        result = element.xpath(f"({xpath_query})[1]", namespaces=ODF_NAMESPACES)
+ 822        if result:
+ 823            return Element.from_tag(result[0])  # type:ignore
+ 824        return None
+ 825
+ 826    def _get_element_idx(self, xpath_query: XPath | str, idx: int) -> Element | None:
+ 827        element = self.__element
+ 828        result = element.xpath(f"({xpath_query})[{idx + 1}]", namespaces=ODF_NAMESPACES)
+ 829        if result:
+ 830            return Element.from_tag(result[0])  # type:ignore
+ 831        return None
+ 832
+ 833    def _get_element_idx2(self, xpath_instance: XPath, idx: int) -> Element | None:
+ 834        element = self.__element
+ 835        result = xpath_instance(element, idx=idx + 1)
+ 836        if result:
+ 837            return Element.from_tag(result[0])  # type:ignore
+ 838        return None
+ 839
+ 840    @property
+ 841    def attributes(self) -> dict[str, str]:
+ 842        return {
+ 843            _get_prefixed_name(str(key)): str(value)
+ 844            for key, value in self.__element.attrib.items()
+ 845        }
+ 846
+ 847    def get_attribute(self, name: str) -> str | bool | None:
+ 848        """Return the attribute value as type str | bool | None."""
+ 849        element = self.__element
+ 850        lxml_tag = _get_lxml_tag_or_name(name)
+ 851        value = element.get(lxml_tag)
+ 852        if value is None:
+ 853            return None
+ 854        elif value in ("true", "false"):
+ 855            return Boolean.decode(value)
+ 856        return str(value)
+ 857
+ 858    def get_attribute_integer(self, name: str) -> int | None:
+ 859        """Return either the attribute as type int, or None."""
+ 860        element = self.__element
+ 861        lxml_tag = _get_lxml_tag_or_name(name)
+ 862        value = element.get(lxml_tag)
+ 863        if value is None:
+ 864            return None
+ 865        try:
+ 866            return int(value)
+ 867        except ValueError:
+ 868            return None
+ 869
+ 870    def get_attribute_string(self, name: str) -> str | None:
+ 871        """Return either the attribute as type str, or None."""
+ 872        element = self.__element
+ 873        lxml_tag = _get_lxml_tag_or_name(name)
+ 874        value = element.get(lxml_tag)
+ 875        if value is None:
+ 876            return None
+ 877        return str(value)
+ 878
+ 879    def set_attribute(self, name: str, value: bool | str | None) -> None:
+ 880        element = self.__element
+ 881        lxml_tag = _get_lxml_tag_or_name(name)
+ 882        if isinstance(value, bool):
+ 883            value = Boolean.encode(value)
+ 884        elif value is None:
+ 885            with contextlib.suppress(KeyError):
+ 886                del element.attrib[lxml_tag]
+ 887            return
+ 888        element.set(lxml_tag, str(value))
+ 889
+ 890    def set_style_attribute(self, name: str, value: Element | str) -> None:
+ 891        """Shortcut to accept a style object as a value."""
+ 892        if isinstance(value, Element):
+ 893            value = str(value.name)  # type:ignore
+ 894        return self.set_attribute(name, value)
+ 895
+ 896    def del_attribute(self, name: str) -> None:
+ 897        element = self.__element
+ 898        lxml_tag = _get_lxml_tag_or_name(name)
+ 899        del element.attrib[lxml_tag]
+ 900
+ 901    @property
+ 902    def text(self) -> str:
+ 903        """Get / set the text content of the element."""
+ 904        return self.__element.text or ""
+ 905
+ 906    @text.setter
+ 907    def text(self, text: str | None) -> None:
+ 908        if text is None:
+ 909            text = ""
+ 910        try:
+ 911            self.__element.text = text
+ 912        except TypeError as e:
+ 913            raise TypeError(f'Str type expected: "{type(text)}"') from e
+ 914
+ 915    @property
+ 916    def text_recursive(self) -> str:
+ 917        return "".join(str(x) for x in self.__element.itertext())
+ 918
+ 919    @property
+ 920    def tail(self) -> str | None:
+ 921        """Get / set the text immediately following the element."""
+ 922        return self.__element.tail
+ 923
+ 924    @tail.setter
+ 925    def tail(self, text: str | None) -> None:
+ 926        self.__element.tail = text or ""
+ 927
+ 928    def search(self, pattern: str) -> int | None:
+ 929        """Return the first position of the pattern in the text content of
+ 930        the element, or None if not found.
+ 931
+ 932        Python regular expression syntax applies.
+ 933
+ 934        Arguments:
+ 935
+ 936            pattern -- str
+ 937
+ 938        Return: int or None
+ 939        """
+ 940        match = re.search(pattern, self.text_recursive)
+ 941        if match is None:
+ 942            return None
+ 943        return match.start()
+ 944
+ 945    def match(self, pattern: str) -> bool:
+ 946        """return True if the pattern is found one or more times anywhere in
+ 947        the text content of the element.
+ 948
+ 949        Python regular expression syntax applies.
+ 950
+ 951        Arguments:
+ 952
+ 953            pattern -- str
+ 954
+ 955        Return: bool
+ 956        """
+ 957        return self.search(pattern) is not None
+ 958
+ 959    def replace(self, pattern: str, new: str | None = None) -> int:
+ 960        """Replace the pattern with the given text, or delete if text is an
+ 961        empty string, and return the number of replacements. By default, only
+ 962        return the number of occurences that would be replaced.
+ 963
+ 964        It cannot replace patterns found across several element, like a word
+ 965        split into two consecutive spans.
+ 966
+ 967        Python regular expression syntax applies.
+ 968
+ 969        Arguments:
+ 970
+ 971            pattern -- str
+ 972
+ 973            new -- str
+ 974
+ 975        Return: int
+ 976        """
+ 977        if not isinstance(pattern, str):
+ 978            # Fail properly if the pattern is an non-ascii bytestring
+ 979            pattern = str(pattern)
+ 980        cpattern = re.compile(pattern)
+ 981        count = 0
+ 982        for text in self.xpath("descendant::text()"):
+ 983            if new is None:
+ 984                count += len(cpattern.findall(str(text)))
+ 985            else:
+ 986                new_text, number = cpattern.subn(new, str(text))
+ 987                container = text.parent
+ 988                if text.is_text():  # type: ignore
+ 989                    container.text = new_text  # type: ignore
+ 990                else:
+ 991                    container.tail = new_text  # type: ignore
+ 992                count += number
+ 993        return count
+ 994
+ 995    @property
+ 996    def root(self) -> Element:
+ 997        element = self.__element
+ 998        tree = element.getroottree()
+ 999        root = tree.getroot()
+1000        return Element.from_tag(root)
+1001
+1002    @property
+1003    def parent(self) -> Element | None:
+1004        element = self.__element
+1005        parent = element.getparent()
+1006        if parent is None:
+1007            # Already at root
+1008            return None
+1009        return Element.from_tag(parent)
+1010
+1011    @property
+1012    def is_bound(self) -> bool:
+1013        return self.parent is not None
+1014
+1015    # def get_next_sibling(self):
+1016    #     element = self.__element
+1017    #     next_one = element.getnext()
+1018    #     if next_one is None:
+1019    #         return None
+1020    #     return Element.from_tag(next_one)
+1021    #
+1022    # def get_prev_sibling(self):
+1023    #     element = self.__element
+1024    #     prev = element.getprevious()
+1025    #     if prev is None:
+1026    #         return None
+1027    #     return Element.from_tag(prev)
+1028
+1029    @property
+1030    def children(self) -> list[Element]:
+1031        element = self.__element
+1032        return [
+1033            Element.from_tag(e)
+1034            for e in element.iterchildren()
+1035            if isinstance(e, _Element)
+1036        ]
+1037
+1038    def index(self, child: Element) -> int:
+1039        """Return the position of the child in this element.
+1040
+1041        Inspired by lxml
+1042        """
+1043        return self.__element.index(child.__element)
+1044
+1045    @property
+1046    def text_content(self) -> str:
+1047        """Get / set the text of the embedded paragraph, including embeded
+1048        annotations, cells...
+1049
+1050        Set create a paragraph if missing
+1051        """
+1052        return "\n".join(
+1053            child.text_recursive for child in self.get_elements("descendant::text:p")
+1054        )
+1055
+1056    @text_content.setter
+1057    def text_content(self, text: str | None) -> None:
+1058        paragraphs = self.get_elements("text:p")
+1059        if not paragraphs:
+1060            # E.g., text:p in draw:text-box in draw:frame
+1061            paragraphs = self.get_elements("*/text:p")
+1062        if paragraphs:
+1063            paragraph = paragraphs.pop(0)
+1064            for obsolete in paragraphs:
+1065                obsolete.delete()
+1066        else:
+1067            paragraph = Element.from_tag("text:p")
+1068            self.insert(paragraph, FIRST_CHILD)
+1069        # As "text_content" returned all text nodes, "text_content"
+1070        # will overwrite all text nodes and children that may contain them
+1071        element = paragraph.__element
+1072        # Clear but the attributes
+1073        del element[:]
+1074        element.text = text
+1075
+1076    def _erase_text_content(self) -> None:
+1077        paragraphs = self.get_elements("text:p")
+1078        if not paragraphs:
+1079            # E.g., text:p in draw:text-box in draw:frame
+1080            paragraphs = self.get_elements("*/text:p")
+1081        if paragraphs:
+1082            paragraphs.pop(0)
+1083            for obsolete in paragraphs:
+1084                obsolete.delete()
+1085
+1086    def is_empty(self) -> bool:
+1087        """Check if the element is empty : no text, no children, no tail.
+1088
+1089        Return: Boolean
+1090        """
+1091        element = self.__element
+1092        if element.tail is not None:
+1093            return False
+1094        if element.text is not None:
+1095            return False
+1096        if list(element.iterchildren()):
+1097            return False
+1098        return True
+1099
+1100    def _get_successor(self, target: Element) -> tuple[Element | None, Element | None]:
+1101        element = self.__element
+1102        next_one = element.getnext()
+1103        if next_one is not None:
+1104            return Element.from_tag(next_one), target
+1105        parent = self.parent
+1106        if parent is None:
+1107            return None, None
+1108        return parent._get_successor(target.parent)  # type:ignore
+1109
+1110    def _get_between_base(  # noqa:C901
+1111        self,
+1112        tag1: Element,
+1113        tag2: Element,
+1114    ) -> list[Element]:
+1115        def find_any_id(elem: Element) -> tuple[str, str, str]:
+1116            elem_tag = elem.tag
+1117            for attribute in (
+1118                "text:id",
+1119                "text:change-id",
+1120                "text:name",
+1121                "office:name",
+1122                "text:ref-name",
+1123                "xml:id",
+1124            ):
+1125                idx = elem.get_attribute(attribute)
+1126                if idx is not None:
+1127                    return elem_tag, attribute, str(idx)
+1128            raise ValueError(f"No Id found in {elem.serialize()}")
+1129
+1130        def common_ancestor(
+1131            tag1: str,
+1132            attr1: str,
+1133            val1: str,
+1134            tag2: str,
+1135            attr2: str,
+1136            val2: str,
+1137        ) -> Element | None:
+1138            root = self.root
+1139            request1 = f'descendant::{tag1}[@{attr1}="{val1}"]'
+1140            request2 = f'descendant::{tag2}[@{attr2}="{val2}"]'
+1141            ancestor = root.xpath(request1)[0]
+1142            if ancestor is None:
+1143                return None
+1144            while True:
+1145                # print "up",
+1146                new_ancestor = ancestor.parent
+1147                if new_ancestor is None:
+1148                    return None
+1149                has_tag2 = new_ancestor.xpath(request2)
+1150                ancestor = new_ancestor
+1151                if not has_tag2:
+1152                    continue
+1153                # print 'found'
+1154                break
+1155            # print up.serialize()
+1156            return ancestor
+1157
+1158        elem1_tag, elem1_attr, elem1_val = find_any_id(tag1)
+1159        elem2_tag, elem2_attr, elem2_val = find_any_id(tag2)
+1160        ancestor_result = common_ancestor(
+1161            elem1_tag,
+1162            elem1_attr,
+1163            elem1_val,
+1164            elem2_tag,
+1165            elem2_attr,
+1166            elem2_val,
+1167        )
+1168        if ancestor_result is None:
+1169            raise RuntimeError(f"No common ancestor for {elem1_tag} {elem2_tag}")
+1170        ancestor = ancestor_result.clone
+1171        path1 = f'{elem1_tag}[@{elem1_attr}="{elem1_val}"]'
+1172        path2 = f'{elem2_tag}[@{elem2_attr}="{elem2_val}"]'
+1173        result = ancestor.clone
+1174        for child in result.children:
+1175            result.delete(child)
+1176        result.text = ""
+1177        result.tail = ""
+1178        target = result
+1179        current = ancestor.children[0]
+1180
+1181        state = 0
+1182        while True:
+1183            if current is None:
+1184                raise RuntimeError(f"No current ancestor for {elem1_tag} {elem2_tag}")
+1185            # print 'current', state, current.serialize()
+1186            if state == 0:  # before tag 1
+1187                if current.xpath(f"descendant-or-self::{path1}"):
+1188                    if current.xpath(f"self::{path1}"):
+1189                        tail = current.tail
+1190                        if tail:
+1191                            # got a tail => the parent should be either t:p or t:h
+1192                            target.text = tail  # type: ignore
+1193                        current, target = current._get_successor(target)  # type: ignore
+1194                        state = 1
+1195                        continue
+1196                    # got T1 in chidren, need further analysis
+1197                    new_target = current.clone
+1198                    for child in new_target.children:
+1199                        new_target.delete(child)
+1200                    new_target.text = ""
+1201                    new_target.tail = ""
+1202                    target.append(new_target)  # type: ignore
+1203                    target = new_target
+1204                    current = current.children[0]
+1205                    continue
+1206                else:
+1207                    # before tag1 : forget element, go to next one
+1208                    current, target = current._get_successor(target)  # type: ignore
+1209                    continue
+1210            elif state == 1:  # collect elements
+1211                further = False
+1212                if current.xpath(f"descendant-or-self::{path2}"):
+1213                    if current.xpath(f"self::{path2}"):
+1214                        # end of trip
+1215                        break
+1216                    # got T2 in chidren, need further analysis
+1217                    further = True
+1218                # further analysis needed :
+1219                if further:
+1220                    new_target = current.clone
+1221                    for child in new_target.children:
+1222                        new_target.delete(child)
+1223                    new_target.text = ""
+1224                    new_target.tail = ""
+1225                    target.append(new_target)  # type: ignore
+1226                    target = new_target
+1227                    current = current.children[0]
+1228                    continue
+1229                # collect
+1230                target.append(current.clone)  # type: ignore
+1231                current, target = current._get_successor(target)  # type: ignore
+1232                continue
+1233        # Now resu should be the "parent" of inserted parts
+1234        # - a text:h or text:p sigle item (simple case)
+1235        # - a upper element, with some text:p, text:h in it => need to be
+1236        #   stripped to have a list of text:p, text:h
+1237        if result.tag in {"text:p", "text:h"}:
+1238            inner = [result]
+1239        else:
+1240            inner = result.children
+1241        return inner
+1242
+1243    def get_between(
+1244        self,
+1245        tag1: Element,
+1246        tag2: Element,
+1247        as_text: bool = False,
+1248        clean: bool = True,
+1249        no_header: bool = True,
+1250    ) -> list | Element | str:
+1251        """Returns elements between tag1 and tag2, tag1 and tag2 shall
+1252        be unique and having an id attribute.
+1253        (WARN: buggy if tag1/tag2 defines a malformed odf xml.)
+1254        If as_text is True: returns the text content.
+1255        If clean is True: suppress unwanted tags (deletions marks, ...)
+1256        If no_header is True: existing text:h are changed in text:p
+1257        By default: returns a list of Element, cleaned and without headers.
+1258
+1259        Implementation and standard retrictions:
+1260        Only text:h and text:p sould be 'cut' by an insert tag, so inner parts
+1261        of insert tags are:
+1262
+1263            - any text:h, text:p or sub tag of these
+1264
+1265            - some text, part of a parent text:h or text:p
+1266
+1267        Arguments:
+1268
+1269            tag1 -- Element
+1270
+1271            tag2 -- Element
+1272
+1273            as_text -- boolean
+1274
+1275            clean -- boolean
+1276
+1277            no_header -- boolean
+1278
+1279        Return: list of odf_paragraph or odf_header
+1280        """
+1281        inner = self._get_between_base(tag1, tag2)
+1282
+1283        if clean:
+1284            clean_tags = (
+1285                "text:change",
+1286                "text:change-start",
+1287                "text:change-end",
+1288                "text:reference-mark",
+1289                "text:reference-mark-start",
+1290                "text:reference-mark-end",
+1291            )
+1292            request_self = " | ".join(["self::%s" % c for c in clean_tags])
+1293            inner = [e for e in inner if not e.xpath(request_self)]
+1294            request = " | ".join([f"descendant::{tag}" for tag in clean_tags])
+1295            for element in inner:
+1296                to_del = element.xpath(request)
+1297                for elem in to_del:
+1298                    if isinstance(elem, Element):
+1299                        element.delete(elem)
+1300        if no_header:  # crude replace t:h by t:p
+1301            new_inner = []
+1302            for element in inner:
+1303                if element.tag == "text:h":
+1304                    children = element.children
+1305                    text = element.__element.text
+1306                    para = Element.from_tag("text:p")
+1307                    para.text = text or ""
+1308                    for c in children:
+1309                        para.append(c)
+1310                    new_inner.append(para)
+1311                else:
+1312                    new_inner.append(element)
+1313            inner = new_inner
+1314        if as_text:
+1315            return "\n".join([e.get_formatted_text() for e in inner])
+1316        else:
+1317            return inner
+1318
+1319    def insert(
+1320        self,
+1321        element: Element,
+1322        xmlposition: int | None = None,
+1323        position: int | None = None,
+1324        start: bool = False,
+1325    ) -> None:
+1326        """Insert an element relatively to ourself.
+1327
+1328        Insert either using DOM vocabulary or by numeric position.
+1329        If text start is True, insert the element before any existing text.
+1330
+1331        Position start at 0.
+1332
+1333        Arguments:
+1334
+1335            element -- Element
+1336
+1337            xmlposition -- FIRST_CHILD, LAST_CHILD, NEXT_SIBLING
+1338                           or PREV_SIBLING
+1339
+1340            start -- Boolean
+1341
+1342            position -- int
+1343        """
+1344        # child_tag = element.tag
+1345        current = self.__element
+1346        _element = element.__element
+1347        if start:
+1348            text = current.text
+1349            if text is not None:
+1350                current.text = None
+1351                tail = _element.tail
+1352                if tail is None:
+1353                    tail = text
+1354                else:
+1355                    tail = tail + text
+1356                _element.tail = tail
+1357            position = 0
+1358        if position is not None:
+1359            current.insert(position, _element)
+1360        elif xmlposition is FIRST_CHILD:
+1361            current.insert(0, _element)
+1362        elif xmlposition is LAST_CHILD:
+1363            current.append(_element)
+1364        elif xmlposition is NEXT_SIBLING:
+1365            parent = current.getparent()
+1366            index = parent.index(current)  # type: ignore
+1367            parent.insert(index + 1, _element)  # type: ignore
+1368        elif xmlposition is PREV_SIBLING:
+1369            parent = current.getparent()
+1370            index = parent.index(current)  # type: ignore
+1371            parent.insert(index, _element)  # type: ignore
+1372        else:
+1373            raise ValueError("(xml)position must be defined")
+1374
+1375    def extend(self, odf_elements: Iterable[Element]) -> None:
+1376        """Fast append elements at the end of ourself using extend."""
+1377        if odf_elements:
+1378            current = self.__element
+1379            elements = [element.__element for element in odf_elements]
+1380            current.extend(elements)
+1381
+1382    def append(self, str_or_element: str | Element) -> None:
+1383        """Insert element or text in the last position."""
+1384        current = self.__element
+1385        if isinstance(str_or_element, str):
+1386            # Has children ?
+1387            children = list(current.iterchildren())
+1388            if children:
+1389                # Append to tail of the last child
+1390                last_child = children[-1]
+1391                text = last_child.tail
+1392                text = text if text is not None else ""
+1393                text += str_or_element
+1394                last_child.tail = text
+1395            else:
+1396                # Append to text of the element
+1397                text = current.text
+1398                text = text if text is not None else ""
+1399                text += str_or_element
+1400                current.text = text
+1401        elif isinstance(str_or_element, Element):
+1402            current.append(str_or_element.__element)
+1403        else:
+1404            raise TypeError(f'Element or string expected, not "{type(str_or_element)}"')
+1405
+1406    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
+1407        """Delete the given element from the XML tree. If no element is given,
+1408        "self" is deleted. The XML library may allow to continue to use an
+1409        element now "orphan" as long as you have a reference to it.
+1410
+1411        if keep_tail is True (default), the tail text is not erased.
+1412
+1413        Arguments:
+1414
+1415            child -- Element
+1416
+1417            keep_tail -- boolean (default to True), True for most usages.
+1418        """
+1419        if child is None:
+1420            parent = self.parent
+1421            if parent is None:
+1422                raise ValueError(f"Can't delete the root element\n{self.serialize()}")
+1423            child = self
+1424        else:
+1425            parent = self
+1426        if keep_tail and child.__element.tail is not None:
+1427            current = child.__element
+1428            tail = str(current.tail)
+1429            current.tail = None
+1430            prev = current.getprevious()
+1431            if prev is not None:
+1432                if prev.tail is None:
+1433                    prev.tail = tail
+1434                else:
+1435                    prev.tail += tail
+1436            else:
+1437                if parent.__element.text is None:
+1438                    parent.__element.text = tail
+1439                else:
+1440                    parent.__element.text += tail
+1441        parent.__element.remove(child.__element)
+1442
+1443    def replace_element(self, old_element: Element, new_element: Element) -> None:
+1444        """Replaces in place a sub element with the element passed as second
+1445        argument.
+1446
+1447        Warning : no clone for old element.
+1448        """
+1449        current = self.__element
+1450        current.replace(old_element.__element, new_element.__element)
+1451
+1452    def strip_elements(
+1453        self,
+1454        sub_elements: Element | Iterable[Element],
+1455    ) -> Element | list:
+1456        """Remove the tags of provided elements, keeping inner childs and text.
+1457
+1458        Return : the striped element.
+1459
+1460        Warning : no clone in sub_elements list.
+1461
+1462        Arguments:
+1463
+1464            sub_elements -- Element or list of Element
+1465        """
+1466        if not sub_elements:
+1467            return self
+1468        if isinstance(sub_elements, Element):
+1469            sub_elements = (sub_elements,)
+1470        replacer = _get_lxml_tag("text:this-will-be-removed")
+1471        for element in sub_elements:
+1472            element.__element.tag = replacer
+1473        strip = ("text:this-will-be-removed",)
+1474        return self.strip_tags(strip=strip, default=None)
+1475
+1476    def strip_tags(
+1477        self,
+1478        strip: Iterable[str] | None = None,
+1479        protect: Iterable[str] | None = None,
+1480        default: str | None = "text:p",
+1481    ) -> Element | list:
+1482        """Remove the tags listed in strip, recursively, keeping inner childs
+1483        and text. Tags listed in protect stop the removal one level depth. If
+1484        the first level element is stripped, default is used to embed the
+1485        content in the default element. If default is None and first level is
+1486        striped, a list of text and children is returned. Return : the striped
+1487        element.
+1488
+1489        strip_tags should be used by on purpose methods (strip_span ...)
+1490        (Method name taken from lxml).
+1491
+1492        Arguments:
+1493
+1494            strip -- iterable list of str odf tags, or None
+1495
+1496            protect -- iterable list of str odf tags, or None
+1497
+1498            default -- str odf tag, or None
+1499
+1500        Return:
+1501
+1502            Element.
+1503        """
+1504        if not strip:
+1505            return self
+1506        if not protect:
+1507            protect = ()
+1508        protected = False
+1509        element, modified = Element._strip_tags(self, strip, protect, protected)
+1510        if modified and isinstance(element, list) and default:
+1511            new = Element.from_tag(default)
+1512            for content in element:
+1513                if isinstance(content, Element):
+1514                    new.append(content)
+1515                else:
+1516                    new.text = content
+1517            element = new
+1518        return element
+1519
+1520    @staticmethod
+1521    def _strip_tags(  # noqa:C901
+1522        element: Element,
+1523        strip: Iterable[str],
+1524        protect: Iterable[str],
+1525        protected: bool,
+1526    ) -> tuple[Element | list, bool]:
+1527        """Sub method for strip_tags()."""
+1528        element_clone = element.clone
+1529        modified = False
+1530        children = []
+1531        if protect and element.tag in protect:
+1532            protect_below = True
+1533        else:
+1534            protect_below = False
+1535        for child in element_clone.children:
+1536            striped_child, is_modified = Element._strip_tags(
+1537                child, strip, protect, protect_below
+1538            )
+1539            if is_modified:
+1540                modified = True
+1541            if isinstance(striped_child, list):
+1542                children.extend(striped_child)
+1543            else:
+1544                children.append(striped_child)
+1545
+1546        text = element_clone.text
+1547        tail = element_clone.tail
+1548        if not protected and strip and element.tag in strip:
+1549            element_result: list[Element | str] = []
+1550            if text is not None:
+1551                element_result.append(text)
+1552            for child in children:
+1553                element_result.append(child)
+1554            if tail is not None:
+1555                element_result.append(tail)
+1556            return (element_result, True)
+1557        else:
+1558            if not modified:
+1559                return (element, False)
+1560            element.clear()
+1561            try:
+1562                for key, value in element_clone.attributes.items():
+1563                    element.set_attribute(key, value)
+1564            except ValueError:
+1565                sys.stderr.write(f"strip_tags(): bad attribute in {element_clone}\n")
+1566            if text is not None:
+1567                element.append(text)
+1568            for child in children:
+1569                element.append(child)
+1570            if tail is not None:
+1571                element.tail = tail
+1572            return (element, True)
+1573
+1574    def xpath(self, xpath_query: str) -> list[Element | Text]:
+1575        """Apply XPath query to the element and its subtree. Return list of
+1576        Element or Text instances translated from the nodes found.
+1577        """
+1578        element = self.__element
+1579        xpath_instance = xpath_compile(xpath_query)
+1580        elements = xpath_instance(element)
+1581        result: list[Element | Text] = []
+1582        if hasattr(elements, "__iter__"):
+1583            for obj in elements:  # type: ignore
+1584                if isinstance(obj, (_ElementStringResult, _ElementUnicodeResult)):
+1585                    result.append(Text(obj))
+1586                elif isinstance(obj, _Element):
+1587                    result.append(Element.from_tag(obj))
+1588                # else:
+1589                #     result.append(obj)
+1590        return result
+1591
+1592    def clear(self) -> None:
+1593        """Remove text, children and attributes from the element."""
+1594        self.__element.clear()
+1595        if hasattr(self, "_tmap"):
+1596            self._tmap: list[int] = []
+1597        if hasattr(self, "_cmap"):
+1598            self._cmap: list[int] = []
+1599        if hasattr(self, "_rmap"):
+1600            self._rmap: list[int] = []
+1601        if hasattr(self, "_indexes"):
+1602            remember = False
+1603            if "_rmap" in self._indexes:
+1604                remember = True
+1605            self._indexes: dict[str, dict] = {}
+1606            self._indexes["_cmap"] = {}
+1607            self._indexes["_tmap"] = {}
+1608            if remember:
+1609                self._indexes["_rmap"] = {}
+1610
+1611    @property
+1612    def clone(self) -> Element:
+1613        clone = deepcopy(self.__element)
+1614        root = lxml_Element("ROOT", nsmap=ODF_NAMESPACES)
+1615        root.append(clone)
+1616        return self.from_tag(clone)
+1617
+1618        # slow data = tostring(self.__element, encoding='unicode')
+1619        # return self.from_tag(data)
+1620
+1621    @staticmethod
+1622    def _strip_namespaces(data: str) -> str:
+1623        """Remove xmlns:* fields from serialized XML."""
+1624        return re.sub(r' xmlns:\w*="[\w:\-\/\.#]*"', "", data)
+1625
+1626    def serialize(self, pretty: bool = False, with_ns: bool = False) -> str:
+1627        """Return text serialization of XML element."""
+1628        # This copy bypasses serialization side-effects in lxml
+1629        native = deepcopy(self.__element)
+1630        data = tostring(
+1631            native, with_tail=False, pretty_print=pretty, encoding="unicode"
+1632        )
+1633        if with_ns:
+1634            return data
+1635        # Remove namespaces
+1636        return self._strip_namespaces(data)
+1637
+1638    # Element helpers usable from any context
+1639
+1640    @property
+1641    def document_body(self) -> Element | None:
+1642        """Return the document body : 'office:body'"""
+1643        return self.get_element("//office:body/*[1]")
+1644
+1645    @document_body.setter
+1646    def document_body(self, new_body: Element) -> None:
+1647        """Change in place the full document body content."""
+1648        body = self.document_body
+1649        if body is None:
+1650            raise ValueError("//office:body not found in document")
+1651        tail = body.tail
+1652        body.clear()
+1653        for item in new_body.children:
+1654            body.append(item)
+1655        if tail:
+1656            body.tail = tail
+1657
+1658    def get_formatted_text(self, context: dict | None = None) -> str:
+1659        """This function should return a beautiful version of the text."""
+1660        return ""
+1661
+1662    def get_styled_elements(self, name: str = "") -> list[Element]:
+1663        """Brute-force to find paragraphs, tables, etc. using the given style
+1664        name (or all by default).
+1665
+1666        Arguments:
+1667
+1668            name -- str
+1669
+1670        Return: list
+1671        """
+1672        # FIXME incomplete (and possibly inaccurate)
+1673        return (
+1674            self._filtered_elements("descendant::*", text_style=name)
+1675            + self._filtered_elements("descendant::*", draw_style=name)
+1676            + self._filtered_elements("descendant::*", draw_text_style=name)
+1677            + self._filtered_elements("descendant::*", table_style=name)
+1678            + self._filtered_elements("descendant::*", page_layout=name)
+1679            + self._filtered_elements("descendant::*", master_page=name)
+1680            + self._filtered_elements("descendant::*", parent_style=name)
+1681        )
+1682
+1683    # Common attributes
+1684
+1685    def _get_inner_text(self, tag: str) -> str | None:
+1686        element = self.get_element(tag)
+1687        if element is None:
+1688            return None
+1689        return element.text
+1690
+1691    def _set_inner_text(self, tag: str, text: str) -> None:
+1692        element = self.get_element(tag)
+1693        if element is None:
+1694            element = Element.from_tag(tag)
+1695            self.append(element)
+1696        element.text = text
+1697
+1698    # Dublin core
+1699
+1700    @property
+1701    def dc_creator(self) -> str | None:
+1702        """Get dc:creator value.
+1703
+1704        Return: str (or None if inexistant)
+1705        """
+1706        return self._get_inner_text("dc:creator")
+1707
+1708    @dc_creator.setter
+1709    def dc_creator(self, creator: str) -> None:
+1710        """Set dc:creator value.
+1711
+1712        Arguments:
+1713
+1714            creator -- str
+1715        """
+1716        self._set_inner_text("dc:creator", creator)
+1717
+1718    @property
+1719    def dc_date(self) -> datetime | None:
+1720        """Get the dc:date value.
+1721
+1722        Return: datetime (or None if inexistant)
+1723        """
+1724        date = self._get_inner_text("dc:date")
+1725        if date is None:
+1726            return None
+1727        return DateTime.decode(date)
+1728
+1729    @dc_date.setter
+1730    def dc_date(self, date: datetime) -> None:
+1731        """Set the dc:date value.
+1732
+1733        Arguments:
+1734
+1735            darz -- datetime
+1736        """
+1737        self._set_inner_text("dc:date", DateTime.encode(date))
+1738
+1739    # SVG
+1740
+1741    @property
+1742    def svg_title(self) -> str | None:
+1743        return self._get_inner_text("svg:title")
+1744
+1745    @svg_title.setter
+1746    def svg_title(self, title: str) -> None:
+1747        self._set_inner_text("svg:title", title)
+1748
+1749    @property
+1750    def svg_description(self) -> str | None:
+1751        return self._get_inner_text("svg:desc")
+1752
+1753    @svg_description.setter
+1754    def svg_description(self, description: str) -> None:
+1755        self._set_inner_text("svg:desc", description)
+1756
+1757    # Sections
+1758
+1759    def get_sections(
+1760        self,
+1761        style: str | None = None,
+1762        content: str | None = None,
+1763    ) -> list[Element]:
+1764        """Return all the sections that match the criteria.
+1765
+1766        Arguments:
+1767
+1768            style -- str
+1769
+1770            content -- str regex
+1771
+1772        Return: list of Element
+1773        """
+1774        return self._filtered_elements(
+1775            "text:section", text_style=style, content=content
+1776        )
+1777
+1778    def get_section(
+1779        self,
+1780        position: int = 0,
+1781        content: str | None = None,
+1782    ) -> Element | None:
+1783        """Return the section that matches the criteria.
+1784
+1785        Arguments:
+1786
+1787            position -- int
+1788
+1789            content -- str regex
+1790
+1791        Return: Element or None if not found
+1792        """
+1793        return self._filtered_element(
+1794            "descendant::text:section", position, content=content
+1795        )
+1796
+1797    # Paragraphs
+1798
+1799    def get_paragraphs(
+1800        self,
+1801        style: str | None = None,
+1802        content: str | None = None,
+1803    ) -> list[Element]:
+1804        """Return all the paragraphs that match the criteria.
+1805
+1806        Arguments:
+1807
+1808            style -- str
+1809
+1810            content -- str regex
+1811
+1812        Return: list of Paragraph
+1813        """
+1814        return self._filtered_elements(
+1815            "descendant::text:p", text_style=style, content=content
+1816        )
+1817
+1818    def get_paragraph(
+1819        self,
+1820        position: int = 0,
+1821        content: str | None = None,
+1822    ) -> Element | None:
+1823        """Return the paragraph that matches the criteria.
+1824
+1825        Arguments:
+1826
+1827            position -- int
+1828
+1829            content -- str regex
+1830
+1831        Return: Paragraph or None if not found
+1832        """
+1833        return self._filtered_element("descendant::text:p", position, content=content)
+1834
+1835    # Span
+1836
+1837    def get_spans(
+1838        self,
+1839        style: str | None = None,
+1840        content: str | None = None,
+1841    ) -> list[Element]:
+1842        """Return all the spans that match the criteria.
+1843
+1844        Arguments:
+1845
+1846            style -- str
+1847
+1848            content -- str regex
+1849
+1850        Return: list of Span
+1851        """
+1852        return self._filtered_elements(
+1853            "descendant::text:span", text_style=style, content=content
+1854        )
+1855
+1856    def get_span(
+1857        self,
+1858        position: int = 0,
+1859        content: str | None = None,
+1860    ) -> Element | None:
+1861        """Return the span that matches the criteria.
+1862
+1863        Arguments:
+1864
+1865            position -- int
+1866
+1867            content -- str regex
+1868
+1869        Return: Span or None if not found
+1870        """
+1871        return self._filtered_element(
+1872            "descendant::text:span", position, content=content
+1873        )
+1874
+1875    # Headers
+1876
+1877    def get_headers(
+1878        self,
+1879        style: str | None = None,
+1880        outline_level: str | None = None,
+1881        content: str | None = None,
+1882    ) -> list[Element]:
+1883        """Return all the Headers that match the criteria.
+1884
+1885        Arguments:
+1886
+1887            style -- str
+1888
+1889            content -- str regex
+1890
+1891        Return: list of Header
+1892        """
+1893        return self._filtered_elements(
+1894            "descendant::text:h",
+1895            text_style=style,
+1896            outline_level=outline_level,
+1897            content=content,
+1898        )
+1899
+1900    def get_header(
+1901        self,
+1902        position: int = 0,
+1903        outline_level: str | None = None,
+1904        content: str | None = None,
+1905    ) -> Element | None:
+1906        """Return the Header that matches the criteria.
+1907
+1908        Arguments:
+1909
+1910            position -- int
+1911
+1912            content -- str regex
+1913
+1914        Return: Header or None if not found
+1915        """
+1916        return self._filtered_element(
+1917            "descendant::text:h",
+1918            position,
+1919            outline_level=outline_level,
+1920            content=content,
+1921        )
+1922
+1923    # Lists
+1924
+1925    def get_lists(
+1926        self,
+1927        style: str | None = None,
+1928        content: str | None = None,
+1929    ) -> list[Element]:
+1930        """Return all the lists that match the criteria.
+1931
+1932        Arguments:
+1933
+1934            style -- str
+1935
+1936            content -- str regex
+1937
+1938        Return: list of List
+1939        """
+1940        return self._filtered_elements(
+1941            "descendant::text:list", text_style=style, content=content
+1942        )
+1943
+1944    def get_list(
+1945        self,
+1946        position: int = 0,
+1947        content: str | None = None,
+1948    ) -> Element | None:
+1949        """Return the list that matches the criteria.
+1950
+1951        Arguments:
+1952
+1953            position -- int
+1954
+1955            content -- str regex
+1956
+1957        Return: List or None if not found
+1958        """
+1959        return self._filtered_element(
+1960            "descendant::text:list", position, content=content
+1961        )
+1962
+1963    # Frames
+1964
+1965    def get_frames(
+1966        self,
+1967        presentation_class: str | None = None,
+1968        style: str | None = None,
+1969        title: str | None = None,
+1970        description: str | None = None,
+1971        content: str | None = None,
+1972    ) -> list[Element]:
+1973        """Return all the frames that match the criteria.
+1974
+1975        Arguments:
+1976
+1977            presentation_class -- str
+1978
+1979            style -- str
+1980
+1981            title -- str regex
+1982
+1983            description -- str regex
+1984
+1985            content -- str regex
+1986
+1987        Return: list of Frame
+1988        """
+1989        return self._filtered_elements(
+1990            "descendant::draw:frame",
+1991            presentation_class=presentation_class,
+1992            draw_style=style,
+1993            svg_title=title,
+1994            svg_desc=description,
+1995            content=content,
+1996        )
+1997
+1998    def get_frame(
+1999        self,
+2000        position: int = 0,
+2001        name: str | None = None,
+2002        presentation_class: str | None = None,
+2003        title: str | None = None,
+2004        description: str | None = None,
+2005        content: str | None = None,
+2006    ) -> Element | None:
+2007        """Return the section that matches the criteria.
+2008
+2009        Arguments:
+2010
+2011            position -- int
+2012
+2013            name -- str
+2014
+2015            presentation_class -- str
+2016
+2017            title -- str regex
+2018
+2019            description -- str regex
+2020
+2021            content -- str regex
+2022
+2023        Return: Frame or None if not found
+2024        """
+2025        return self._filtered_element(
+2026            "descendant::draw:frame",
+2027            position,
+2028            draw_name=name,
+2029            presentation_class=presentation_class,
+2030            svg_title=title,
+2031            svg_desc=description,
+2032            content=content,
+2033        )
+2034
+2035    # Images
+2036
+2037    def get_images(
+2038        self,
+2039        style: str | None = None,
+2040        url: str | None = None,
+2041        content: str | None = None,
+2042    ) -> list[Element]:
+2043        """Return all the images matching the criteria.
+2044
+2045        Arguments:
+2046
+2047            style -- str
+2048
+2049            url -- str regex
+2050
+2051            content -- str regex
+2052
+2053        Return: list of Element
+2054        """
+2055        return self._filtered_elements(
+2056            "descendant::draw:image", text_style=style, url=url, content=content
+2057        )
+2058
+2059    def get_image(
+2060        self,
+2061        position: int = 0,
+2062        name: str | None = None,
+2063        url: str | None = None,
+2064        content: str | None = None,
+2065    ) -> Element | None:
+2066        """Return the image matching the criteria.
+2067
+2068        Arguments:
+2069
+2070            position -- int
+2071
+2072            name -- str
+2073
+2074            url -- str regex
+2075
+2076            content -- str regex
+2077
+2078        Return: Element or None if not found
+2079        """
+2080        # The frame is holding the name
+2081        if name is not None:
+2082            frame = self._filtered_element(
+2083                "descendant::draw:frame", position, draw_name=name
+2084            )
+2085            if frame is None:
+2086                return None
+2087            # The name is supposedly unique
+2088            return frame.get_element("draw:image")
+2089        return self._filtered_element(
+2090            "descendant::draw:image", position, url=url, content=content
+2091        )
+2092
+2093    # Tables
+2094
+2095    def get_tables(
+2096        self,
+2097        style: str | None = None,
+2098        content: str | None = None,
+2099    ) -> list[Element]:
+2100        """Return all the tables that match the criteria.
+2101
+2102        Arguments:
+2103
+2104            style -- str
+2105
+2106            content -- str regex
+2107
+2108        Return: list of Table
+2109        """
+2110        return self._filtered_elements(
+2111            "descendant::table:table", table_style=style, content=content
+2112        )
+2113
+2114    def get_table(
+2115        self,
+2116        position: int = 0,
+2117        name: str | None = None,
+2118        content: str | None = None,
+2119    ) -> Element | None:
+2120        """Return the table that matches the criteria.
+2121
+2122        Arguments:
+2123
+2124            position -- int
+2125
+2126            name -- str
+2127
+2128            content -- str regex
+2129
+2130        Return: Table or None if not found
+2131        """
+2132        if name is None and content is None:
+2133            result = self._filtered_element("descendant::table:table", position)
+2134        else:
+2135            result = self._filtered_element(
+2136                "descendant::table:table",
+2137                position,
+2138                table_name=name,
+2139                content=content,
+2140            )
+2141        return result
+2142
+2143    # Named Range
+2144
+2145    def get_named_ranges(self) -> list[Element]:
+2146        """Return all the tables named ranges.
+2147
+2148        Return: list of odf_named_range
+2149        """
+2150        named_ranges = self.get_elements(
+2151            "descendant::table:named-expressions/table:named-range"
+2152        )
+2153        return named_ranges
+2154
+2155    def get_named_range(self, name: str) -> Element | None:
+2156        """Return the named range of specified name, or None if not found.
+2157
+2158        Arguments:
+2159
+2160            name -- str
+2161
+2162        Return: NamedRange
+2163        """
+2164        named_range = self.get_elements(
+2165            f'descendant::table:named-expressions/table:named-range[@table:name="{name}"][1]'
+2166        )
+2167        if named_range:
+2168            return named_range[0]
+2169        else:
+2170            return None
+2171
+2172    def append_named_range(self, named_range: Element) -> None:
+2173        """Append the named range to the spreadsheet, replacing existing named
+2174        range of same name if any.
+2175
+2176        Arguments:
+2177
+2178            named_range --  NamedRange
+2179        """
+2180        if self.tag != "office:spreadsheet":
+2181            raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
+2182        named_expressions = self.get_element("table:named-expressions")
+2183        if not named_expressions:
+2184            named_expressions = Element.from_tag("table:named-expressions")
+2185            self.append(named_expressions)
+2186        # exists ?
+2187        current = named_expressions.get_element(
+2188            f'table:named-range[@table:name="{named_range.name}"][1]'  # type:ignore
+2189        )
+2190        if current:
+2191            named_expressions.delete(current)
+2192        named_expressions.append(named_range)
+2193
+2194    def delete_named_range(self, name: str) -> None:
+2195        """Delete the Named Range of specified name from the spreadsheet.
+2196
+2197        Arguments:
+2198
+2199            name -- str
+2200        """
+2201        if self.tag != "office:spreadsheet":
+2202            raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
+2203        named_range = self.get_named_range(name)
+2204        if not named_range:
+2205            return
+2206        named_range.delete()
+2207        named_expressions = self.get_element("table:named-expressions")
+2208        if not named_expressions:
+2209            return
+2210        element = named_expressions.__element
+2211        children = list(element.iterchildren())
+2212        if not children:
+2213            self.delete(named_expressions)
+2214
+2215    # Notes
+2216
+2217    def get_notes(
+2218        self,
+2219        note_class: str | None = None,
+2220        content: str | None = None,
+2221    ) -> list[Element]:
+2222        """Return all the notes that match the criteria.
+2223
+2224        Arguments:
+2225
+2226            note_class -- 'footnote' or 'endnote'
+2227
+2228            content -- str regex
+2229
+2230        Return: list of Note
+2231        """
+2232        return self._filtered_elements(
+2233            "descendant::text:note", note_class=note_class, content=content
+2234        )
+2235
+2236    def get_note(
+2237        self,
+2238        position: int = 0,
+2239        note_id: str | None = None,
+2240        note_class: str | None = None,
+2241        content: str | None = None,
+2242    ) -> Element | None:
+2243        """Return the note that matches the criteria.
+2244
+2245        Arguments:
+2246
+2247            position -- int
+2248
+2249            note_id -- str
+2250
+2251            note_class -- 'footnote' or 'endnote'
+2252
+2253            content -- str regex
+2254
+2255        Return: Note or None if not found
+2256        """
+2257        return self._filtered_element(
+2258            "descendant::text:note",
+2259            position,
+2260            text_id=note_id,
+2261            note_class=note_class,
+2262            content=content,
+2263        )
+2264
+2265    # Annotations
+2266
+2267    def get_annotations(
+2268        self,
+2269        creator: str | None = None,
+2270        start_date: datetime | None = None,
+2271        end_date: datetime | None = None,
+2272        content: str | None = None,
+2273    ) -> list[Element]:
+2274        """Return all the annotations that match the criteria.
+2275
+2276        Arguments:
+2277
+2278            creator -- str
+2279
+2280            start_date -- datetime instance
+2281
+2282            end_date --  datetime instance
+2283
+2284            content -- str regex
+2285
+2286        Return: list of Annotation
+2287        """
+2288        annotations = []
+2289        for annotation in self._filtered_elements(
+2290            "descendant::office:annotation", content=content
+2291        ):
+2292            if creator is not None and creator != annotation.dc_creator:
+2293                continue
+2294            date = annotation.dc_date
+2295            if date is None:
+2296                continue
+2297            if start_date is not None and date < start_date:
+2298                continue
+2299            if end_date is not None and date >= end_date:
+2300                continue
+2301            annotations.append(annotation)
+2302        return annotations
+2303
+2304    def get_annotation(
+2305        self,
+2306        position: int = 0,
+2307        creator: str | None = None,
+2308        start_date: datetime | None = None,
+2309        end_date: datetime | None = None,
+2310        content: str | None = None,
+2311        name: str | None = None,
+2312    ) -> Element | None:
+2313        """Return the annotation that matches the criteria.
+2314
+2315        Arguments:
+2316
+2317            position -- int
+2318
+2319            creator -- str
+2320
+2321            start_date -- datetime instance
+2322
+2323            end_date -- datetime instance
+2324
+2325            content -- str regex
+2326
+2327            name -- str
+2328
+2329        Return: Annotation or None if not found
+2330        """
+2331        if name is not None:
+2332            return self._filtered_element(
+2333                "descendant::office:annotation", 0, office_name=name
+2334            )
+2335        annotations = self.get_annotations(
+2336            creator=creator, start_date=start_date, end_date=end_date, content=content
+2337        )
+2338        if not annotations:
+2339            return None
+2340        try:
+2341            return annotations[position]
+2342        except IndexError:
+2343            return None
+2344
+2345    def get_annotation_ends(self) -> list[Element]:
+2346        """Return all the annotation ends.
+2347
+2348        Return: list of Element
+2349        """
+2350        return self._filtered_elements("descendant::office:annotation-end")
+2351
+2352    def get_annotation_end(
+2353        self,
+2354        position: int = 0,
+2355        name: str | None = None,
+2356    ) -> Element | None:
+2357        """Return the annotation end that matches the criteria.
+2358
+2359        Arguments:
+2360
+2361            position -- int
+2362
+2363            name -- str
+2364
+2365        Return: Element or None if not found
+2366        """
+2367        return self._filtered_element(
+2368            "descendant::office:annotation-end", position, office_name=name
+2369        )
+2370
+2371    # office:names
+2372
+2373    def get_office_names(self) -> list[str]:
+2374        """Return all the used office:name tags values of the element.
+2375
+2376        Return: list of unique str
+2377        """
+2378        name_xpath_query = xpath_compile("//@office:name")
+2379        response = name_xpath_query(self.__element)
+2380        if not isinstance(response, list):
+2381            return []
+2382        return list({str(name) for name in response if name})
+2383
+2384    # Variables
+2385
+2386    def get_variable_decls(self) -> Element:
+2387        """Return the container for variable declarations. Created if not
+2388        found.
+2389
+2390        Return: Element
+2391        """
+2392        variable_decls = self.get_element("//text:variable-decls")
+2393        if variable_decls is None:
+2394            body = self.document_body
+2395            if not body:
+2396                raise ValueError("Empty document.body")
+2397            body.insert(Element.from_tag("text:variable-decls"), FIRST_CHILD)
+2398            variable_decls = body.get_element("//text:variable-decls")
+2399
+2400        return variable_decls  # type:ignore
+2401
+2402    def get_variable_decl_list(self) -> list[Element]:
+2403        """Return all the variable declarations.
+2404
+2405        Return: list of Element
+2406        """
+2407        return self._filtered_elements("descendant::text:variable-decl")
+2408
+2409    def get_variable_decl(self, name: str, position: int = 0) -> Element | None:
+2410        """return the variable declaration for the given name.
+2411
+2412        Arguments:
+2413
+2414            name -- str
+2415
+2416            position -- int
+2417
+2418        return: Element or none if not found
+2419        """
+2420        return self._filtered_element(
+2421            "descendant::text:variable-decl", position, text_name=name
+2422        )
+2423
+2424    def get_variable_sets(self, name: str | None = None) -> list[Element]:
+2425        """Return all the variable sets that match the criteria.
+2426
+2427        Arguments:
+2428
+2429            name -- str
+2430
+2431        Return: list of Element
+2432        """
+2433        return self._filtered_elements("descendant::text:variable-set", text_name=name)
+2434
+2435    def get_variable_set(self, name: str, position: int = -1) -> Element | None:
+2436        """Return the variable set for the given name (last one by default).
+2437
+2438        Arguments:
+2439
+2440            name -- str
+2441
+2442            position -- int
+2443
+2444        Return: Element or None if not found
+2445        """
+2446        return self._filtered_element(
+2447            "descendant::text:variable-set", position, text_name=name
+2448        )
+2449
+2450    def get_variable_set_value(
+2451        self,
+2452        name: str,
+2453        value_type: str | None = None,
+2454    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
+2455        """Return the last value of the given variable name.
+2456
+2457        Arguments:
+2458
+2459            name -- str
+2460
+2461            value_type -- 'boolean', 'currency', 'date', 'float',
+2462                          'percentage', 'string', 'time' or automatic
+2463
+2464        Return: most appropriate Python type
+2465        """
+2466        variable_set = self.get_variable_set(name)
+2467        if not variable_set:
+2468            return None
+2469        return variable_set.get_value(value_type)  # type: ignore
+2470
+2471    # User fields
+2472
+2473    def get_user_field_decls(self) -> Element | None:
+2474        """Return the container for user field declarations. Created if not
+2475        found.
+2476
+2477        Return: Element
+2478        """
+2479        user_field_decls = self.get_element("//text:user-field-decls")
+2480        if user_field_decls is None:
+2481            body = self.document_body
+2482            if not body:
+2483                raise ValueError("Empty document.body")
+2484            body.insert(Element.from_tag("text:user-field-decls"), FIRST_CHILD)
+2485            user_field_decls = body.get_element("//text:user-field-decls")
+2486
+2487        return user_field_decls
+2488
+2489    def get_user_field_decl_list(self) -> list[Element]:
+2490        """Return all the user field declarations.
+2491
+2492        Return: list of Element
+2493        """
+2494        return self._filtered_elements("descendant::text:user-field-decl")
+2495
+2496    def get_user_field_decl(self, name: str, position: int = 0) -> Element | None:
+2497        """return the user field declaration for the given name.
+2498
+2499        return: Element or none if not found
+2500        """
+2501        return self._filtered_element(
+2502            "descendant::text:user-field-decl", position, text_name=name
+2503        )
+2504
+2505    def get_user_field_value(
+2506        self, name: str, value_type: str | None = None
+2507    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
+2508        """Return the value of the given user field name.
+2509
+2510        Arguments:
+2511
+2512            name -- str
+2513
+2514            value_type -- 'boolean', 'currency', 'date', 'float',
+2515                          'percentage', 'string', 'time' or automatic
+2516
+2517        Return: most appropriate Python type
+2518        """
+2519        user_field_decl = self.get_user_field_decl(name)
+2520        if user_field_decl is None:
+2521            return None
+2522        return user_field_decl.get_value(value_type)  # type: ignore
+2523
+2524    # User defined fields
+2525    # They are fields who should contain a copy of a user defined medtadata
+2526
+2527    def get_user_defined_list(self) -> list[Element]:
+2528        """Return all the user defined field declarations.
+2529
+2530        Return: list of Element
+2531        """
+2532        return self._filtered_elements("descendant::text:user-defined")
+2533
+2534    def get_user_defined(self, name: str, position: int = 0) -> Element | None:
+2535        """return the user defined declaration for the given name.
+2536
+2537        return: Element or none if not found
+2538        """
+2539        return self._filtered_element(
+2540            "descendant::text:user-defined", position, text_name=name
+2541        )
+2542
+2543    def get_user_defined_value(
+2544        self, name: str, value_type: str | None = None
+2545    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
+2546        """Return the value of the given user defined field name.
+2547
+2548        Arguments:
+2549
+2550            name -- str
+2551
+2552            value_type -- 'boolean', 'date', 'float',
+2553                          'string', 'time' or automatic
+2554
+2555        Return: most appropriate Python type
+2556        """
+2557        user_defined = self.get_user_defined(name)
+2558        if user_defined is None:
+2559            return None
+2560        return user_defined.get_value(value_type)  # type: ignore
+2561
+2562    # Draw Pages
+2563
+2564    def get_draw_pages(
+2565        self,
+2566        style: str | None = None,
+2567        content: str | None = None,
+2568    ) -> list[Element]:
+2569        """Return all the draw pages that match the criteria.
+2570
+2571        Arguments:
+2572
+2573            style -- str
+2574
+2575            content -- str regex
+2576
+2577        Return: list of DrawPage
+2578        """
+2579        return self._filtered_elements(
+2580            "descendant::draw:page", draw_style=style, content=content
+2581        )
+2582
+2583    def get_draw_page(
+2584        self,
+2585        position: int = 0,
+2586        name: str | None = None,
+2587        content: str | None = None,
+2588    ) -> Element | None:
+2589        """Return the draw page that matches the criteria.
+2590
+2591        Arguments:
+2592
+2593            position -- int
+2594
+2595            name -- str
+2596
+2597            content -- str regex
+2598
+2599        Return: DrawPage or None if not found
+2600        """
+2601        return self._filtered_element(
+2602            "descendant::draw:page", position, draw_name=name, content=content
+2603        )
+2604
+2605    # Links
+2606
+2607    def get_links(
+2608        self,
+2609        name: str | None = None,
+2610        title: str | None = None,
+2611        url: str | None = None,
+2612        content: str | None = None,
+2613    ) -> list[Element]:
+2614        """Return all the links that match the criteria.
+2615
+2616        Arguments:
+2617
+2618            name -- str
+2619
+2620            title -- str
+2621
+2622            url -- str regex
+2623
+2624            content -- str regex
+2625
+2626        Return: list of Element
+2627        """
+2628        return self._filtered_elements(
+2629            "descendant::text:a",
+2630            office_name=name,
+2631            office_title=title,
+2632            url=url,
+2633            content=content,
+2634        )
+2635
+2636    def get_link(
+2637        self,
+2638        position: int = 0,
+2639        name: str | None = None,
+2640        title: str | None = None,
+2641        url: str | None = None,
+2642        content: str | None = None,
+2643    ) -> Element | None:
+2644        """Return the link that matches the criteria.
+2645
+2646        Arguments:
+2647
+2648            position -- int
+2649
+2650            name -- str
+2651
+2652            title -- str
+2653
+2654            url -- str regex
+2655
+2656            content -- str regex
+2657
+2658        Return: Element or None if not found
+2659        """
+2660        return self._filtered_element(
+2661            "descendant::text:a",
+2662            position,
+2663            office_name=name,
+2664            office_title=title,
+2665            url=url,
+2666            content=content,
+2667        )
+2668
+2669    # Bookmarks
+2670
+2671    def get_bookmarks(self) -> list[Element]:
+2672        """Return all the bookmarks.
+2673
+2674        Return: list of Element
+2675        """
+2676        return self._filtered_elements("descendant::text:bookmark")
+2677
+2678    def get_bookmark(
+2679        self,
+2680        position: int = 0,
+2681        name: str | None = None,
+2682    ) -> Element | None:
+2683        """Return the bookmark that matches the criteria.
+2684
+2685        Arguments:
+2686
+2687            position -- int
+2688
+2689            name -- str
+2690
+2691        Return: Bookmark or None if not found
+2692        """
+2693        return self._filtered_element(
+2694            "descendant::text:bookmark", position, text_name=name
+2695        )
+2696
+2697    def get_bookmark_starts(self) -> list[Element]:
+2698        """Return all the bookmark starts.
+2699
+2700        Return: list of Element
+2701        """
+2702        return self._filtered_elements("descendant::text:bookmark-start")
+2703
+2704    def get_bookmark_start(
+2705        self,
+2706        position: int = 0,
+2707        name: str | None = None,
+2708    ) -> Element | None:
+2709        """Return the bookmark start that matches the criteria.
+2710
+2711        Arguments:
+2712
+2713            position -- int
+2714
+2715            name -- str
+2716
+2717        Return: Element or None if not found
+2718        """
+2719        return self._filtered_element(
+2720            "descendant::text:bookmark-start", position, text_name=name
+2721        )
+2722
+2723    def get_bookmark_ends(self) -> list[Element]:
+2724        """Return all the bookmark ends.
+2725
+2726        Return: list of Element
+2727        """
+2728        return self._filtered_elements("descendant::text:bookmark-end")
+2729
+2730    def get_bookmark_end(
+2731        self,
+2732        position: int = 0,
+2733        name: str | None = None,
+2734    ) -> Element | None:
+2735        """Return the bookmark end that matches the criteria.
+2736
+2737        Arguments:
+2738
+2739            position -- int
+2740
+2741            name -- str
+2742
+2743        Return: Element or None if not found
+2744        """
+2745        return self._filtered_element(
+2746            "descendant::text:bookmark-end", position, text_name=name
+2747        )
+2748
+2749    # Reference marks
+2750
+2751    def get_reference_marks_single(self) -> list[Element]:
+2752        """Return all the reference marks. Search only the tags
+2753        text:reference-mark.
+2754        Consider using : get_reference_marks()
+2755
+2756        Return: list of Element
+2757        """
+2758        return self._filtered_elements("descendant::text:reference-mark")
+2759
+2760    def get_reference_mark_single(
+2761        self,
+2762        position: int = 0,
+2763        name: str | None = None,
+2764    ) -> Element | None:
+2765        """Return the reference mark that matches the criteria. Search only the
+2766        tags text:reference-mark.
+2767        Consider using : get_reference_mark()
+2768
+2769        Arguments:
+2770
+2771            position -- int
+2772
+2773            name -- str
+2774
+2775        Return: Element or None if not found
+2776        """
+2777        return self._filtered_element(
+2778            "descendant::text:reference-mark", position, text_name=name
+2779        )
+2780
+2781    def get_reference_mark_starts(self) -> list[Element]:
+2782        """Return all the reference mark starts. Search only the tags
+2783        text:reference-mark-start.
+2784        Consider using : get_reference_marks()
+2785
+2786        Return: list of Element
+2787        """
+2788        return self._filtered_elements("descendant::text:reference-mark-start")
+2789
+2790    def get_reference_mark_start(
+2791        self,
+2792        position: int = 0,
+2793        name: str | None = None,
+2794    ) -> Element | None:
+2795        """Return the reference mark start that matches the criteria. Search
+2796        only the tags text:reference-mark-start.
+2797        Consider using : get_reference_mark()
+2798
+2799        Arguments:
+2800
+2801            position -- int
+2802
+2803            name -- str
+2804
+2805        Return: Element or None if not found
+2806        """
+2807        return self._filtered_element(
+2808            "descendant::text:reference-mark-start", position, text_name=name
+2809        )
+2810
+2811    def get_reference_mark_ends(self) -> list[Element]:
+2812        """Return all the reference mark ends. Search only the tags
+2813        text:reference-mark-end.
+2814        Consider using : get_reference_marks()
+2815
+2816        Return: list of Element
+2817        """
+2818        return self._filtered_elements("descendant::text:reference-mark-end")
+2819
+2820    def get_reference_mark_end(
+2821        self,
+2822        position: int = 0,
+2823        name: str | None = None,
+2824    ) -> Element | None:
+2825        """Return the reference mark end that matches the criteria. Search only
+2826        the tags text:reference-mark-end.
+2827        Consider using : get_reference_marks()
+2828
+2829        Arguments:
+2830
+2831            position -- int
+2832
+2833            name -- str
+2834
+2835        Return: Element or None if not found
+2836        """
+2837        return self._filtered_element(
+2838            "descendant::text:reference-mark-end", position, text_name=name
+2839        )
+2840
+2841    def get_reference_marks(self) -> list[Element]:
+2842        """Return all the reference marks, either single position reference
+2843        (text:reference-mark) or start of range reference
+2844        (text:reference-mark-start).
+2845
+2846        Return: list of Element
+2847        """
+2848        return self._filtered_elements(
+2849            "descendant::text:reference-mark-start | descendant::text:reference-mark"
+2850        )
+2851
+2852    def get_reference_mark(
+2853        self,
+2854        position: int = 0,
+2855        name: str | None = None,
+2856    ) -> Element | None:
+2857        """Return the reference mark that match the criteria. Either single
+2858        position reference mark (text:reference-mark) or start of range
+2859        reference (text:reference-mark-start).
+2860
+2861        Arguments:
+2862
+2863            position -- int
+2864
+2865            name -- str
+2866
+2867        Return: Element or None if not found
+2868        """
+2869        if name:
+2870            request = (
+2871                f"descendant::text:reference-mark-start"
+2872                f'[@text:name="{name}"] '
+2873                f"| descendant::text:reference-mark"
+2874                f'[@text:name="{name}"]'
+2875            )
+2876            return self._filtered_element(request, position=0)
+2877        request = (
+2878            "descendant::text:reference-mark-start | descendant::text:reference-mark"
+2879        )
+2880        return self._filtered_element(request, position)
+2881
+2882    def get_references(self, name: str | None = None) -> list[Element]:
+2883        """Return all the references (text:reference-ref). If name is
+2884        provided, returns the references of that name.
+2885
+2886        Return: list of Element
+2887
+2888        Arguments:
+2889
+2890            name -- str or None
+2891        """
+2892        if name is None:
+2893            return self._filtered_elements("descendant::text:reference-ref")
+2894        request = f'descendant::text:reference-ref[@text:ref-name="{name}"]'
+2895        return self._filtered_elements(request)
+2896
+2897    # Shapes elements
+2898
+2899    # Groups
+2900
+2901    def get_draw_groups(
+2902        self,
+2903        title: str | None = None,
+2904        description: str | None = None,
+2905        content: str | None = None,
+2906    ) -> list[Element]:
+2907        return self._filtered_elements(
+2908            "descendant::draw:g",
+2909            svg_title=title,
+2910            svg_desc=description,
+2911            content=content,
+2912        )
+2913
+2914    def get_draw_group(
+2915        self,
+2916        position: int = 0,
+2917        name: str | None = None,
+2918        title: str | None = None,
+2919        description: str | None = None,
+2920        content: str | None = None,
+2921    ) -> Element | None:
+2922        return self._filtered_element(
+2923            "descendant::draw:g",
+2924            position,
+2925            draw_name=name,
+2926            svg_title=title,
+2927            svg_desc=description,
+2928            content=content,
+2929        )
+2930
+2931    # Lines
+2932
+2933    def get_draw_lines(
+2934        self,
+2935        draw_style: str | None = None,
+2936        draw_text_style: str | None = None,
+2937        content: str | None = None,
+2938    ) -> list[Element]:
+2939        """Return all the draw lines that match the criteria.
+2940
+2941        Arguments:
+2942
+2943            draw_style -- str
+2944
+2945            draw_text_style -- str
+2946
+2947            content -- str regex
+2948
+2949        Return: list of odf_shape
+2950        """
+2951        return self._filtered_elements(
+2952            "descendant::draw:line",
+2953            draw_style=draw_style,
+2954            draw_text_style=draw_text_style,
+2955            content=content,
+2956        )
+2957
+2958    def get_draw_line(
+2959        self,
+2960        position: int = 0,
+2961        id: str | None = None,  # noqa:A002
+2962        content: str | None = None,
+2963    ) -> Element | None:
+2964        """Return the draw line that matches the criteria.
+2965
+2966        Arguments:
+2967
+2968            position -- int
+2969
+2970            id -- str
+2971
+2972            content -- str regex
+2973
+2974        Return: odf_shape or None if not found
+2975        """
+2976        return self._filtered_element(
+2977            "descendant::draw:line", position, draw_id=id, content=content
+2978        )
+2979
+2980    # Rectangles
+2981
+2982    def get_draw_rectangles(
+2983        self,
+2984        draw_style: str | None = None,
+2985        draw_text_style: str | None = None,
+2986        content: str | None = None,
+2987    ) -> list[Element]:
+2988        """Return all the draw rectangles that match the criteria.
+2989
+2990        Arguments:
+2991
+2992            draw_style -- str
+2993
+2994            draw_text_style -- str
+2995
+2996            content -- str regex
+2997
+2998        Return: list of odf_shape
+2999        """
+3000        return self._filtered_elements(
+3001            "descendant::draw:rect",
+3002            draw_style=draw_style,
+3003            draw_text_style=draw_text_style,
+3004            content=content,
+3005        )
+3006
+3007    def get_draw_rectangle(
+3008        self,
+3009        position: int = 0,
+3010        id: str | None = None,  # noqa:A002
+3011        content: str | None = None,
+3012    ) -> Element | None:
+3013        """Return the draw rectangle that matches the criteria.
+3014
+3015        Arguments:
+3016
+3017            position -- int
+3018
+3019            id -- str
+3020
+3021            content -- str regex
+3022
+3023        Return: odf_shape or None if not found
+3024        """
+3025        return self._filtered_element(
+3026            "descendant::draw:rect", position, draw_id=id, content=content
+3027        )
+3028
+3029    # Ellipse
+3030
+3031    def get_draw_ellipses(
+3032        self,
+3033        draw_style: str | None = None,
+3034        draw_text_style: str | None = None,
+3035        content: str | None = None,
+3036    ) -> list[Element]:
+3037        """Return all the draw ellipses that match the criteria.
+3038
+3039        Arguments:
+3040
+3041            draw_style -- str
+3042
+3043            draw_text_style -- str
+3044
+3045            content -- str regex
+3046
+3047        Return: list of odf_shape
+3048        """
+3049        return self._filtered_elements(
+3050            "descendant::draw:ellipse",
+3051            draw_style=draw_style,
+3052            draw_text_style=draw_text_style,
+3053            content=content,
+3054        )
+3055
+3056    def get_draw_ellipse(
+3057        self,
+3058        position: int = 0,
+3059        id: str | None = None,  # noqa:A002
+3060        content: str | None = None,
+3061    ) -> Element | None:
+3062        """Return the draw ellipse that matches the criteria.
+3063
+3064        Arguments:
+3065
+3066            position -- int
+3067
+3068            id -- str
+3069
+3070            content -- str regex
+3071
+3072        Return: odf_shape or None if not found
+3073        """
+3074        return self._filtered_element(
+3075            "descendant::draw:ellipse", position, draw_id=id, content=content
+3076        )
+3077
+3078    # Connectors
+3079
+3080    def get_draw_connectors(
+3081        self,
+3082        draw_style: str | None = None,
+3083        draw_text_style: str | None = None,
+3084        content: str | None = None,
+3085    ) -> list[Element]:
+3086        """Return all the draw connectors that match the criteria.
+3087
+3088        Arguments:
+3089
+3090            draw_style -- str
+3091
+3092            draw_text_style -- str
+3093
+3094            content -- str regex
+3095
+3096        Return: list of odf_shape
+3097        """
+3098        return self._filtered_elements(
+3099            "descendant::draw:connector",
+3100            draw_style=draw_style,
+3101            draw_text_style=draw_text_style,
+3102            content=content,
+3103        )
+3104
+3105    def get_draw_connector(
+3106        self,
+3107        position: int = 0,
+3108        id: str | None = None,  # noqa:A002
+3109        content: str | None = None,
+3110    ) -> Element | None:
+3111        """Return the draw connector that matches the criteria.
+3112
+3113        Arguments:
+3114
+3115            position -- int
+3116
+3117            id -- str
+3118
+3119            content -- str regex
+3120
+3121        Return: odf_shape or None if not found
+3122        """
+3123        return self._filtered_element(
+3124            "descendant::draw:connector", position, draw_id=id, content=content
+3125        )
+3126
+3127    def get_orphan_draw_connectors(self) -> list[Element]:
+3128        """Return a list of connectors which don't have any shape connected
+3129        to them.
+3130        """
+3131        connectors = []
+3132        for connector in self.get_draw_connectors():
+3133            start_shape = connector.get_attribute("draw:start-shape")
+3134            end_shape = connector.get_attribute("draw:end-shape")
+3135            if start_shape is None and end_shape is None:
+3136                connectors.append(connector)
+3137        return connectors
+3138
+3139    # Tracked changes and text change
+3140
+3141    def get_tracked_changes(self) -> Element | None:
+3142        """Return the tracked-changes part in the text body."""
+3143        return self.get_element("//text:tracked-changes")
+3144
+3145    def get_changes_ids(self) -> list[Element | Text]:
+3146        """Return a list of ids that refers to a change region in the tracked
+3147        changes list.
+3148        """
+3149        # Insertion changes
+3150        xpath_query = "descendant::text:change-start/@text:change-id"
+3151        # Deletion changes
+3152        xpath_query += " | descendant::text:change/@text:change-id"
+3153        return self.xpath(xpath_query)
+3154
+3155    def get_text_change_deletions(self) -> list[Element]:
+3156        """Return all the text changes of deletion kind: the tags text:change.
+3157        Consider using : get_text_changes()
+3158
+3159        Return: list of Element
+3160        """
+3161        return self._filtered_elements("descendant::text:text:change")
+3162
+3163    def get_text_change_deletion(
+3164        self,
+3165        position: int = 0,
+3166        idx: str | None = None,
+3167    ) -> Element | None:
+3168        """Return the text change of deletion kind that matches the criteria.
+3169        Search only for the tags text:change.
+3170        Consider using : get_text_change()
+3171
+3172        Arguments:
+3173
+3174            position -- int
+3175
+3176            idx -- str
+3177
+3178        Return: Element or None if not found
+3179        """
+3180        return self._filtered_element(
+3181            "descendant::text:change", position, change_id=idx
+3182        )
+3183
+3184    def get_text_change_starts(self) -> list[Element]:
+3185        """Return all the text change-start. Search only for the tags
+3186        text:change-start.
+3187        Consider using : get_text_changes()
+3188
+3189        Return: list of Element
+3190        """
+3191        return self._filtered_elements("descendant::text:change-start")
+3192
+3193    def get_text_change_start(
+3194        self,
+3195        position: int = 0,
+3196        idx: str | None = None,
+3197    ) -> Element | None:
+3198        """Return the text change-start that matches the criteria. Search
+3199        only the tags text:change-start.
+3200        Consider using : get_text_change()
+3201
+3202        Arguments:
+3203
+3204            position -- int
+3205
+3206            idx -- str
+3207
+3208        Return: Element or None if not found
+3209        """
+3210        return self._filtered_element(
+3211            "descendant::text:change-start", position, change_id=idx
+3212        )
+3213
+3214    def get_text_change_ends(self) -> list[Element]:
+3215        """Return all the text change-end. Search only the tags
+3216        text:change-end.
+3217        Consider using : get_text_changes()
+3218
+3219        Return: list of Element
+3220        """
+3221        return self._filtered_elements("descendant::text:change-end")
+3222
+3223    def get_text_change_end(
+3224        self,
+3225        position: int = 0,
+3226        idx: str | None = None,
+3227    ) -> Element | None:
+3228        """Return the text change-end that matches the criteria. Search only
+3229        the tags text:change-end.
+3230        Consider using : get_text_change()
+3231
+3232        Arguments:
+3233
+3234            position -- int
+3235
+3236            idx -- str
+3237
+3238        Return: Element or None if not found
+3239        """
+3240        return self._filtered_element(
+3241            "descendant::text:change-end", position, change_id=idx
+3242        )
+3243
+3244    def get_text_changes(self) -> list[Element]:
+3245        """Return all the text changes, either single deletion
+3246        (text:change) or start of range of changes (text:change-start).
+3247
+3248        Return: list of Element
+3249        """
+3250        request = "descendant::text:change-start | descendant::text:change"
+3251        return self._filtered_elements(request)
+3252
+3253    def get_text_change(
+3254        self,
+3255        position: int = 0,
+3256        idx: str | None = None,
+3257    ) -> Element | None:
+3258        """Return the text change that matches the criteria. Either single
+3259        deletion (text:change) or start of range of changes (text:change-start).
+3260        position : index of the element to retrieve if several matches, default
+3261        is 0.
+3262        idx : change-id of the element.
+3263
+3264        Arguments:
+3265
+3266            position -- int
+3267
+3268            idx -- str
+3269
+3270        Return: Element or None if not found
+3271        """
+3272        if idx:
+3273            request = (
+3274                f'descendant::text:change-start[@text:change-id="{idx}"] '
+3275                f'| descendant::text:change[@text:change-id="{idx}"]'
+3276            )
+3277            return self._filtered_element(request, 0)
+3278        request = "descendant::text:change-start | descendant::text:change"
+3279        return self._filtered_element(request, position)
+3280
+3281    # Table Of Content
+3282
+3283    def get_tocs(self) -> list[Element]:
+3284        """Return all the tables of contents.
+3285
+3286        Return: list of odf_toc
+3287        """
+3288        return self._filtered_elements("text:table-of-content")
+3289
+3290    def get_toc(
+3291        self,
+3292        position: int = 0,
+3293        content: str | None = None,
+3294    ) -> Element | None:
+3295        """Return the table of contents that matches the criteria.
+3296
+3297        Arguments:
+3298
+3299            position -- int
+3300
+3301            content -- str regex
+3302
+3303        Return: odf_toc or None if not found
+3304        """
+3305        return self._filtered_element(
+3306            "text:table-of-content", position, content=content
+3307        )
+3308
+3309    # Styles
+3310
+3311    @staticmethod
+3312    def _get_style_tagname(family: str | None, is_default: bool = False) -> str:
+3313        """Widely match possible tag names given the family (or not)."""
+3314        if not family:
+3315            tagname = "(style:default-style|*[@style:name]|draw:fill-image|draw:marker)"
+3316        elif is_default:
+3317            # Default style
+3318            tagname = "style:default-style"
+3319        else:
+3320            tagname = _family_style_tagname(family)
+3321            # if famattr:
+3322            #    # Include family default style
+3323            #    tagname = '(%s|style:default-style)' % tagname
+3324            if family in FAMILY_ODF_STD:
+3325                # Include family default style
+3326                tagname = f"({tagname}|style:default-style)"
+3327        return tagname
+3328
+3329    def get_styles(self, family: str | None = None) -> list[Element]:
+3330        # Both common and default styles
+3331        tagname = self._get_style_tagname(family)
+3332        return self._filtered_elements(tagname, family=family)
+3333
+3334    def get_style(
+3335        self,
+3336        family: str,
+3337        name_or_element: str | Element | None = None,
+3338        display_name: str | None = None,
+3339    ) -> Element | None:
+3340        """Return the style uniquely identified by the family/name pair. If
+3341        the argument is already a style object, it will return it.
+3342
+3343        If the name is not the internal name but the name you gave in the
+3344        desktop application, use display_name instead.
+3345
+3346        Arguments:
+3347
+3348            family -- 'paragraph', 'text', 'graphic', 'table', 'list',
+3349                      'number'
+3350
+3351            name_or_element -- str or Style
+3352
+3353            display_name -- str
+3354
+3355        Return: odf_style or None if not found
+3356        """
+3357        if isinstance(name_or_element, Element):
+3358            name = self.get_attribute("style:name")
+3359            if name is not None:
+3360                return name_or_element
+3361            else:
+3362                raise ValueError(f"Not a odf_style ? {name_or_element!r}")
+3363        style_name = name_or_element
+3364        is_default = not (style_name or display_name)
+3365        tagname = self._get_style_tagname(family, is_default=is_default)
+3366        # famattr became None if no "style:family" attribute
+3367        if family:
+3368            return self._filtered_element(
+3369                tagname,
+3370                0,
+3371                style_name=style_name,
+3372                display_name=display_name,
+3373                family=family,
+3374            )
+3375        else:
+3376            return self._filtered_element(
+3377                tagname,
+3378                0,
+3379                draw_name=style_name or display_name,
+3380                family=family,
+3381            )
+3382
+3383    def _filtered_element(
+3384        self,
+3385        query_string: str,
+3386        position: int,
+3387        **kwargs: Any,
+3388    ) -> Element | None:
+3389        results = self._filtered_elements(query_string, **kwargs)
+3390        try:
+3391            return results[position]
+3392        except IndexError:
+3393            return None
+3394
+3395    def _filtered_elements(
+3396        self,
+3397        query_string: str,
+3398        content: str | None = None,
+3399        url: str | None = None,
+3400        svg_title: str | None = None,
+3401        svg_desc: str | None = None,
+3402        dc_creator: str | None = None,
+3403        dc_date: datetime | None = None,
+3404        **kwargs: Any,
+3405    ) -> list[Element]:
+3406        query = make_xpath_query(query_string, **kwargs)
+3407        elements = self.get_elements(query)
+3408        # Filter the elements with the regex (TODO use XPath)
+3409        if content is not None:
+3410            elements = [element for element in elements if element.match(content)]
+3411        if url is not None:
+3412            filtered = []
+3413            for element in elements:
+3414                url_attr = element.get_attribute("xlink:href")
+3415                if isinstance(url_attr, str) and search(url, url_attr) is not None:
+3416                    filtered.append(element)
+3417            elements = filtered
+3418        if dc_date is None:
+3419            dt_dc_date = None
+3420        else:
+3421            dt_dc_date = DateTime.encode(dc_date)
+3422        for variable, childname in [
+3423            (svg_title, "svg:title"),
+3424            (svg_desc, "svg:desc"),
+3425            (dc_creator, "descendant::dc:creator"),
+3426            (dt_dc_date, "descendant::dc:date"),
+3427        ]:
+3428            if not variable:
+3429                continue
+3430            filtered = []
+3431            for element in elements:
+3432                child = element.get_element(childname)
+3433                if child and child.match(variable):
+3434                    filtered.append(element)
+3435            elements = filtered
+3436        return elements
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + Element(**kwargs: Any) + + + +
+ +
314    def __init__(self, **kwargs: Any) -> None:
+315        tag_or_elem = kwargs.pop("tag_or_elem", None)
+316        if tag_or_elem is None:
+317            # Instance for newly created object: create new lxml element and
+318            # continue by subclass __init__
+319            # If the tag key word exists, make a custom element
+320            self._do_init = True
+321            tag = kwargs.pop("tag", self._tag)
+322            self.__element = self.make_etree_element(tag)
+323        else:
+324            # called with an existing lxml element, sould be a result of
+325            # from_tag() casting, do not execute the subclass __init__
+326            if not isinstance(tag_or_elem, _Element):
+327                raise TypeError(f'"{type(tag_or_elem)}" is not an element node')
+328            self._do_init = False
+329            self.__element = tag_or_elem
+
+ + + + +
+
+ +
+
@classmethod
+ + def + from_tag(cls, tag_or_elem: str | lxml.etree._Element) -> Element: + + + +
+ +
337    @classmethod
+338    def from_tag(cls, tag_or_elem: str | _Element) -> Element:
+339        """Element class and subclass factory.
+340
+341        Turn an lxml Element or ODF string tag into an ODF XML Element
+342        of the relevant class.
+343
+344        Arguments:
+345
+346            tag_or_elem -- ODF str tag or lxml.Element
+347
+348        Return: Element (or subclass) instance
+349        """
+350        if isinstance(tag_or_elem, str):
+351            # assume the argument is a prefix:name tag
+352            elem = cls.make_etree_element(tag_or_elem)
+353        else:
+354            elem = tag_or_elem
+355        klass = _class_registry.get(elem.tag, cls)
+356        return klass(tag_or_elem=elem)
+
+ + +

Element class and subclass factory.

+ +

Turn an lxml Element or ODF string tag into an ODF XML Element +of the relevant class.

+ +

Arguments:

+ +
tag_or_elem -- ODF str tag or lxml.Element
+
+ +

Return: Element (or subclass) instance

+
+ + +
+
+ +
+
@classmethod
+ + def + from_tag_for_clone( cls: type, tree_element: lxml.etree._Element, cache: tuple | None) -> Element: + + + +
+ +
358    @classmethod
+359    def from_tag_for_clone(
+360        cls: type,
+361        tree_element: _Element,
+362        cache: tuple | None,
+363    ) -> Element:
+364        tag = to_str(tree_element.tag)
+365        klass = _class_registry.get(tag, cls)
+366        element = klass(tag_or_elem=tree_element)
+367        if cache and element._caching:
+368            element._tmap = cache[0]
+369            element._cmap = cache[1]
+370            if len(cache) == 3:
+371                element._rmap = cache[2]
+372        return element
+
+ + + + +
+
+ +
+
@staticmethod
+ + def + make_etree_element(tag: str) -> lxml.etree._Element: + + + +
+ +
374    @staticmethod
+375    def make_etree_element(tag: str) -> _Element:
+376        if not isinstance(tag, str):
+377            raise TypeError(f"Tag is not str: {tag!r}")
+378        tag = tag.strip()
+379        if not tag:
+380            raise ValueError("Tag is empty")
+381        if "<" not in tag:
+382            # Qualified name
+383            # XXX don't build the element from scratch or lxml will pollute with
+384            # repeated namespace declarations
+385            tag = f"<{tag}/>"
+386        # XML fragment
+387        root = fromstring(NAMESPACES_XML % str_to_bytes(tag))
+388        return root[0]
+
+ + + + +
+
+ +
+ tag: str + + + +
+ +
751    @property
+752    def tag(self) -> str:
+753        """Get/set the underlying xml tag with the given qualified name.
+754
+755        Warning: direct change of tag does not change the element class.
+756
+757        Arguments:
+758
+759            qname -- str (e.g. "text:span")
+760        """
+761        return _get_prefixed_name(self.__element.tag)
+
+ + +

Get/set the underlying xml tag with the given qualified name.

+ +

Warning: direct change of tag does not change the element class.

+ +

Arguments:

+ +
qname -- str (e.g. "text:span")
+
+
+ + +
+
+ +
+ + def + elements_repeated_sequence( self, xpath_instance: lxml.etree.XPath, name: str) -> list[tuple[int, int]]: + + + +
+ +
767    def elements_repeated_sequence(
+768        self,
+769        xpath_instance: XPath,
+770        name: str,
+771    ) -> list[tuple[int, int]]:
+772        """Utility method for table module."""
+773        lxml_tag = _get_lxml_tag_or_name(name)
+774        element = self.__element
+775        sub_elements = xpath_instance(element)
+776        if not isinstance(sub_elements, list):
+777            raise TypeError("Bad XPath result.")
+778        result: list[tuple[int, int]] = []
+779        idx = -1
+780        for sub_element in sub_elements:
+781            if not isinstance(sub_element, _Element):
+782                continue
+783            idx += 1
+784            value = sub_element.get(lxml_tag)
+785            if value is None:
+786                result.append((idx, 1))
+787                continue
+788            try:
+789                int_value = int(value)
+790            except ValueError:
+791                int_value = 1
+792            result.append((idx, max(int_value, 1)))
+793        return result
+
+ + +

Utility method for table module.

+
+ + +
+
+ +
+ + def + get_elements(self, xpath_query: lxml.etree.XPath | str) -> list[Element]: + + + +
+ +
795    def get_elements(self, xpath_query: XPath | str) -> list[Element]:
+796        cache: tuple | None = None
+797        element = self.__element
+798        if isinstance(xpath_query, str):
+799            new_xpath_query = xpath_compile(xpath_query)
+800            result = new_xpath_query(element)
+801        else:
+802            result = xpath_query(element)
+803        if not isinstance(result, list):
+804            raise TypeError("Bad XPath result")
+805
+806        if hasattr(self, "_tmap"):
+807            if hasattr(self, "_rmap"):
+808                cache = (self._tmap, self._cmap, self._rmap)
+809            else:
+810                cache = (self._tmap, self._cmap)
+811        return [
+812            Element.from_tag_for_clone(e, cache)
+813            for e in result
+814            if isinstance(e, _Element)
+815        ]
+
+ + + + +
+
+ +
+ + def + get_element( self, xpath_query: lxml.etree.XPath | str) -> Element | None: + + + +
+ +
819    def get_element(self, xpath_query: XPath | str) -> Element | None:
+820        element = self.__element
+821        result = element.xpath(f"({xpath_query})[1]", namespaces=ODF_NAMESPACES)
+822        if result:
+823            return Element.from_tag(result[0])  # type:ignore
+824        return None
+
+ + + + +
+
+ +
+ attributes: dict[str, str] + + + +
+ +
840    @property
+841    def attributes(self) -> dict[str, str]:
+842        return {
+843            _get_prefixed_name(str(key)): str(value)
+844            for key, value in self.__element.attrib.items()
+845        }
+
+ + + + +
+
+ +
+ + def + get_attribute(self, name: str) -> str | bool | None: + + + +
+ +
847    def get_attribute(self, name: str) -> str | bool | None:
+848        """Return the attribute value as type str | bool | None."""
+849        element = self.__element
+850        lxml_tag = _get_lxml_tag_or_name(name)
+851        value = element.get(lxml_tag)
+852        if value is None:
+853            return None
+854        elif value in ("true", "false"):
+855            return Boolean.decode(value)
+856        return str(value)
+
+ + +

Return the attribute value as type str | bool | None.

+
+ + +
+
+ +
+ + def + get_attribute_integer(self, name: str) -> int | None: + + + +
+ +
858    def get_attribute_integer(self, name: str) -> int | None:
+859        """Return either the attribute as type int, or None."""
+860        element = self.__element
+861        lxml_tag = _get_lxml_tag_or_name(name)
+862        value = element.get(lxml_tag)
+863        if value is None:
+864            return None
+865        try:
+866            return int(value)
+867        except ValueError:
+868            return None
+
+ + +

Return either the attribute as type int, or None.

+
+ + +
+
+ +
+ + def + get_attribute_string(self, name: str) -> str | None: + + + +
+ +
870    def get_attribute_string(self, name: str) -> str | None:
+871        """Return either the attribute as type str, or None."""
+872        element = self.__element
+873        lxml_tag = _get_lxml_tag_or_name(name)
+874        value = element.get(lxml_tag)
+875        if value is None:
+876            return None
+877        return str(value)
+
+ + +

Return either the attribute as type str, or None.

+
+ + +
+
+ +
+ + def + set_attribute(self, name: str, value: bool | str | None) -> None: + + + +
+ +
879    def set_attribute(self, name: str, value: bool | str | None) -> None:
+880        element = self.__element
+881        lxml_tag = _get_lxml_tag_or_name(name)
+882        if isinstance(value, bool):
+883            value = Boolean.encode(value)
+884        elif value is None:
+885            with contextlib.suppress(KeyError):
+886                del element.attrib[lxml_tag]
+887            return
+888        element.set(lxml_tag, str(value))
+
+ + + + +
+
+ +
+ + def + set_style_attribute(self, name: str, value: Element | str) -> None: + + + +
+ +
890    def set_style_attribute(self, name: str, value: Element | str) -> None:
+891        """Shortcut to accept a style object as a value."""
+892        if isinstance(value, Element):
+893            value = str(value.name)  # type:ignore
+894        return self.set_attribute(name, value)
+
+ + +

Shortcut to accept a style object as a value.

+
+ + +
+
+ +
+ + def + del_attribute(self, name: str) -> None: + + + +
+ +
896    def del_attribute(self, name: str) -> None:
+897        element = self.__element
+898        lxml_tag = _get_lxml_tag_or_name(name)
+899        del element.attrib[lxml_tag]
+
+ + + + +
+
+ +
+ text: str + + + +
+ +
901    @property
+902    def text(self) -> str:
+903        """Get / set the text content of the element."""
+904        return self.__element.text or ""
+
+ + +

Get / set the text content of the element.

+
+ + +
+
+ +
+ text_recursive: str + + + +
+ +
915    @property
+916    def text_recursive(self) -> str:
+917        return "".join(str(x) for x in self.__element.itertext())
+
+ + + + +
+
+ +
+ tail: str | None + + + +
+ +
919    @property
+920    def tail(self) -> str | None:
+921        """Get / set the text immediately following the element."""
+922        return self.__element.tail
+
+ + +

Get / set the text immediately following the element.

+
+ + +
+
+ +
+ + def + search(self, pattern: str) -> int | None: + + + +
+ +
928    def search(self, pattern: str) -> int | None:
+929        """Return the first position of the pattern in the text content of
+930        the element, or None if not found.
+931
+932        Python regular expression syntax applies.
+933
+934        Arguments:
+935
+936            pattern -- str
+937
+938        Return: int or None
+939        """
+940        match = re.search(pattern, self.text_recursive)
+941        if match is None:
+942            return None
+943        return match.start()
+
+ + +

Return the first position of the pattern in the text content of +the element, or None if not found.

+ +

Python regular expression syntax applies.

+ +

Arguments:

+ +
pattern -- str
+
+ +

Return: int or None

+
+ + +
+
+ +
+ + def + match(self, pattern: str) -> bool: + + + +
+ +
945    def match(self, pattern: str) -> bool:
+946        """return True if the pattern is found one or more times anywhere in
+947        the text content of the element.
+948
+949        Python regular expression syntax applies.
+950
+951        Arguments:
+952
+953            pattern -- str
+954
+955        Return: bool
+956        """
+957        return self.search(pattern) is not None
+
+ + +

return True if the pattern is found one or more times anywhere in +the text content of the element.

+ +

Python regular expression syntax applies.

+ +

Arguments:

+ +
pattern -- str
+
+ +

Return: bool

+
+ + +
+
+ +
+ + def + replace(self, pattern: str, new: str | None = None) -> int: + + + +
+ +
959    def replace(self, pattern: str, new: str | None = None) -> int:
+960        """Replace the pattern with the given text, or delete if text is an
+961        empty string, and return the number of replacements. By default, only
+962        return the number of occurences that would be replaced.
+963
+964        It cannot replace patterns found across several element, like a word
+965        split into two consecutive spans.
+966
+967        Python regular expression syntax applies.
+968
+969        Arguments:
+970
+971            pattern -- str
+972
+973            new -- str
+974
+975        Return: int
+976        """
+977        if not isinstance(pattern, str):
+978            # Fail properly if the pattern is an non-ascii bytestring
+979            pattern = str(pattern)
+980        cpattern = re.compile(pattern)
+981        count = 0
+982        for text in self.xpath("descendant::text()"):
+983            if new is None:
+984                count += len(cpattern.findall(str(text)))
+985            else:
+986                new_text, number = cpattern.subn(new, str(text))
+987                container = text.parent
+988                if text.is_text():  # type: ignore
+989                    container.text = new_text  # type: ignore
+990                else:
+991                    container.tail = new_text  # type: ignore
+992                count += number
+993        return count
+
+ + +

Replace the pattern with the given text, or delete if text is an +empty string, and return the number of replacements. By default, only +return the number of occurences that would be replaced.

+ +

It cannot replace patterns found across several element, like a word +split into two consecutive spans.

+ +

Python regular expression syntax applies.

+ +

Arguments:

+ +
pattern -- str
+
+new -- str
+
+ +

Return: int

+
+ + +
+
+ +
+ root: Element + + + +
+ +
 995    @property
+ 996    def root(self) -> Element:
+ 997        element = self.__element
+ 998        tree = element.getroottree()
+ 999        root = tree.getroot()
+1000        return Element.from_tag(root)
+
+ + + + +
+
+ +
+ parent: Element | None + + + +
+ +
1002    @property
+1003    def parent(self) -> Element | None:
+1004        element = self.__element
+1005        parent = element.getparent()
+1006        if parent is None:
+1007            # Already at root
+1008            return None
+1009        return Element.from_tag(parent)
+
+ + + + +
+
+ +
+ is_bound: bool + + + +
+ +
1011    @property
+1012    def is_bound(self) -> bool:
+1013        return self.parent is not None
+
+ + + + +
+
+ +
+ children: list[Element] + + + +
+ +
1029    @property
+1030    def children(self) -> list[Element]:
+1031        element = self.__element
+1032        return [
+1033            Element.from_tag(e)
+1034            for e in element.iterchildren()
+1035            if isinstance(e, _Element)
+1036        ]
+
+ + + + +
+
+ +
+ + def + index(self, child: Element) -> int: + + + +
+ +
1038    def index(self, child: Element) -> int:
+1039        """Return the position of the child in this element.
+1040
+1041        Inspired by lxml
+1042        """
+1043        return self.__element.index(child.__element)
+
+ + +

Return the position of the child in this element.

+ +

Inspired by lxml

+
+ + +
+
+ +
+ text_content: str + + + +
+ +
1045    @property
+1046    def text_content(self) -> str:
+1047        """Get / set the text of the embedded paragraph, including embeded
+1048        annotations, cells...
+1049
+1050        Set create a paragraph if missing
+1051        """
+1052        return "\n".join(
+1053            child.text_recursive for child in self.get_elements("descendant::text:p")
+1054        )
+
+ + +

Get / set the text of the embedded paragraph, including embeded +annotations, cells...

+ +

Set create a paragraph if missing

+
+ + +
+
+ +
+ + def + is_empty(self) -> bool: + + + +
+ +
1086    def is_empty(self) -> bool:
+1087        """Check if the element is empty : no text, no children, no tail.
+1088
+1089        Return: Boolean
+1090        """
+1091        element = self.__element
+1092        if element.tail is not None:
+1093            return False
+1094        if element.text is not None:
+1095            return False
+1096        if list(element.iterchildren()):
+1097            return False
+1098        return True
+
+ + +

Check if the element is empty : no text, no children, no tail.

+ +

Return: Boolean

+
+ + +
+
+ +
+ + def + get_between( self, tag1: Element, tag2: Element, as_text: bool = False, clean: bool = True, no_header: bool = True) -> list | Element | str: + + + +
+ +
1243    def get_between(
+1244        self,
+1245        tag1: Element,
+1246        tag2: Element,
+1247        as_text: bool = False,
+1248        clean: bool = True,
+1249        no_header: bool = True,
+1250    ) -> list | Element | str:
+1251        """Returns elements between tag1 and tag2, tag1 and tag2 shall
+1252        be unique and having an id attribute.
+1253        (WARN: buggy if tag1/tag2 defines a malformed odf xml.)
+1254        If as_text is True: returns the text content.
+1255        If clean is True: suppress unwanted tags (deletions marks, ...)
+1256        If no_header is True: existing text:h are changed in text:p
+1257        By default: returns a list of Element, cleaned and without headers.
+1258
+1259        Implementation and standard retrictions:
+1260        Only text:h and text:p sould be 'cut' by an insert tag, so inner parts
+1261        of insert tags are:
+1262
+1263            - any text:h, text:p or sub tag of these
+1264
+1265            - some text, part of a parent text:h or text:p
+1266
+1267        Arguments:
+1268
+1269            tag1 -- Element
+1270
+1271            tag2 -- Element
+1272
+1273            as_text -- boolean
+1274
+1275            clean -- boolean
+1276
+1277            no_header -- boolean
+1278
+1279        Return: list of odf_paragraph or odf_header
+1280        """
+1281        inner = self._get_between_base(tag1, tag2)
+1282
+1283        if clean:
+1284            clean_tags = (
+1285                "text:change",
+1286                "text:change-start",
+1287                "text:change-end",
+1288                "text:reference-mark",
+1289                "text:reference-mark-start",
+1290                "text:reference-mark-end",
+1291            )
+1292            request_self = " | ".join(["self::%s" % c for c in clean_tags])
+1293            inner = [e for e in inner if not e.xpath(request_self)]
+1294            request = " | ".join([f"descendant::{tag}" for tag in clean_tags])
+1295            for element in inner:
+1296                to_del = element.xpath(request)
+1297                for elem in to_del:
+1298                    if isinstance(elem, Element):
+1299                        element.delete(elem)
+1300        if no_header:  # crude replace t:h by t:p
+1301            new_inner = []
+1302            for element in inner:
+1303                if element.tag == "text:h":
+1304                    children = element.children
+1305                    text = element.__element.text
+1306                    para = Element.from_tag("text:p")
+1307                    para.text = text or ""
+1308                    for c in children:
+1309                        para.append(c)
+1310                    new_inner.append(para)
+1311                else:
+1312                    new_inner.append(element)
+1313            inner = new_inner
+1314        if as_text:
+1315            return "\n".join([e.get_formatted_text() for e in inner])
+1316        else:
+1317            return inner
+
+ + +

Returns elements between tag1 and tag2, tag1 and tag2 shall +be unique and having an id attribute. +(WARN: buggy if tag1/tag2 defines a malformed odf xml.) +If as_text is True: returns the text content. +If clean is True: suppress unwanted tags (deletions marks, ...) +If no_header is True: existing text:h are changed in text:p +By default: returns a list of Element, cleaned and without headers.

+ +

Implementation and standard retrictions: +Only text:h and text:p sould be 'cut' by an insert tag, so inner parts +of insert tags are:

+ +
- any text:h, text:p or sub tag of these
+
+- some text, part of a parent text:h or text:p
+
+ +

Arguments:

+ +
tag1 -- Element
+
+tag2 -- Element
+
+as_text -- boolean
+
+clean -- boolean
+
+no_header -- boolean
+
+ +

Return: list of odf_paragraph or odf_header

+
+ + +
+
+ +
+ + def + insert( self, element: Element, xmlposition: int | None = None, position: int | None = None, start: bool = False) -> None: + + + +
+ +
1319    def insert(
+1320        self,
+1321        element: Element,
+1322        xmlposition: int | None = None,
+1323        position: int | None = None,
+1324        start: bool = False,
+1325    ) -> None:
+1326        """Insert an element relatively to ourself.
+1327
+1328        Insert either using DOM vocabulary or by numeric position.
+1329        If text start is True, insert the element before any existing text.
+1330
+1331        Position start at 0.
+1332
+1333        Arguments:
+1334
+1335            element -- Element
+1336
+1337            xmlposition -- FIRST_CHILD, LAST_CHILD, NEXT_SIBLING
+1338                           or PREV_SIBLING
+1339
+1340            start -- Boolean
+1341
+1342            position -- int
+1343        """
+1344        # child_tag = element.tag
+1345        current = self.__element
+1346        _element = element.__element
+1347        if start:
+1348            text = current.text
+1349            if text is not None:
+1350                current.text = None
+1351                tail = _element.tail
+1352                if tail is None:
+1353                    tail = text
+1354                else:
+1355                    tail = tail + text
+1356                _element.tail = tail
+1357            position = 0
+1358        if position is not None:
+1359            current.insert(position, _element)
+1360        elif xmlposition is FIRST_CHILD:
+1361            current.insert(0, _element)
+1362        elif xmlposition is LAST_CHILD:
+1363            current.append(_element)
+1364        elif xmlposition is NEXT_SIBLING:
+1365            parent = current.getparent()
+1366            index = parent.index(current)  # type: ignore
+1367            parent.insert(index + 1, _element)  # type: ignore
+1368        elif xmlposition is PREV_SIBLING:
+1369            parent = current.getparent()
+1370            index = parent.index(current)  # type: ignore
+1371            parent.insert(index, _element)  # type: ignore
+1372        else:
+1373            raise ValueError("(xml)position must be defined")
+
+ + +

Insert an element relatively to ourself.

+ +

Insert either using DOM vocabulary or by numeric position. +If text start is True, insert the element before any existing text.

+ +

Position start at 0.

+ +

Arguments:

+ +
element -- Element
+
+xmlposition -- FIRST_CHILD, LAST_CHILD, NEXT_SIBLING
+               or PREV_SIBLING
+
+start -- Boolean
+
+position -- int
+
+
+ + +
+
+ +
+ + def + extend( self, odf_elements: collections.abc.Iterable[Element]) -> None: + + + +
+ +
1375    def extend(self, odf_elements: Iterable[Element]) -> None:
+1376        """Fast append elements at the end of ourself using extend."""
+1377        if odf_elements:
+1378            current = self.__element
+1379            elements = [element.__element for element in odf_elements]
+1380            current.extend(elements)
+
+ + +

Fast append elements at the end of ourself using extend.

+
+ + +
+
+ +
+ + def + append(self, str_or_element: str | Element) -> None: + + + +
+ +
1382    def append(self, str_or_element: str | Element) -> None:
+1383        """Insert element or text in the last position."""
+1384        current = self.__element
+1385        if isinstance(str_or_element, str):
+1386            # Has children ?
+1387            children = list(current.iterchildren())
+1388            if children:
+1389                # Append to tail of the last child
+1390                last_child = children[-1]
+1391                text = last_child.tail
+1392                text = text if text is not None else ""
+1393                text += str_or_element
+1394                last_child.tail = text
+1395            else:
+1396                # Append to text of the element
+1397                text = current.text
+1398                text = text if text is not None else ""
+1399                text += str_or_element
+1400                current.text = text
+1401        elif isinstance(str_or_element, Element):
+1402            current.append(str_or_element.__element)
+1403        else:
+1404            raise TypeError(f'Element or string expected, not "{type(str_or_element)}"')
+
+ + +

Insert element or text in the last position.

+
+ + +
+
+ +
+ + def + delete( self, child: Element | None = None, keep_tail: bool = True) -> None: + + + +
+ +
1406    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
+1407        """Delete the given element from the XML tree. If no element is given,
+1408        "self" is deleted. The XML library may allow to continue to use an
+1409        element now "orphan" as long as you have a reference to it.
+1410
+1411        if keep_tail is True (default), the tail text is not erased.
+1412
+1413        Arguments:
+1414
+1415            child -- Element
+1416
+1417            keep_tail -- boolean (default to True), True for most usages.
+1418        """
+1419        if child is None:
+1420            parent = self.parent
+1421            if parent is None:
+1422                raise ValueError(f"Can't delete the root element\n{self.serialize()}")
+1423            child = self
+1424        else:
+1425            parent = self
+1426        if keep_tail and child.__element.tail is not None:
+1427            current = child.__element
+1428            tail = str(current.tail)
+1429            current.tail = None
+1430            prev = current.getprevious()
+1431            if prev is not None:
+1432                if prev.tail is None:
+1433                    prev.tail = tail
+1434                else:
+1435                    prev.tail += tail
+1436            else:
+1437                if parent.__element.text is None:
+1438                    parent.__element.text = tail
+1439                else:
+1440                    parent.__element.text += tail
+1441        parent.__element.remove(child.__element)
+
+ + +

Delete the given element from the XML tree. If no element is given, +"self" is deleted. The XML library may allow to continue to use an +element now "orphan" as long as you have a reference to it.

+ +

if keep_tail is True (default), the tail text is not erased.

+ +

Arguments:

+ +
child -- Element
+
+keep_tail -- boolean (default to True), True for most usages.
+
+
+ + +
+
+ +
+ + def + replace_element( self, old_element: Element, new_element: Element) -> None: + + + +
+ +
1443    def replace_element(self, old_element: Element, new_element: Element) -> None:
+1444        """Replaces in place a sub element with the element passed as second
+1445        argument.
+1446
+1447        Warning : no clone for old element.
+1448        """
+1449        current = self.__element
+1450        current.replace(old_element.__element, new_element.__element)
+
+ + +

Replaces in place a sub element with the element passed as second +argument.

+ +

Warning : no clone for old element.

+
+ + +
+
+ +
+ + def + strip_elements( self, sub_elements: Element | collections.abc.Iterable[Element]) -> Element | list: + + + +
+ +
1452    def strip_elements(
+1453        self,
+1454        sub_elements: Element | Iterable[Element],
+1455    ) -> Element | list:
+1456        """Remove the tags of provided elements, keeping inner childs and text.
+1457
+1458        Return : the striped element.
+1459
+1460        Warning : no clone in sub_elements list.
+1461
+1462        Arguments:
+1463
+1464            sub_elements -- Element or list of Element
+1465        """
+1466        if not sub_elements:
+1467            return self
+1468        if isinstance(sub_elements, Element):
+1469            sub_elements = (sub_elements,)
+1470        replacer = _get_lxml_tag("text:this-will-be-removed")
+1471        for element in sub_elements:
+1472            element.__element.tag = replacer
+1473        strip = ("text:this-will-be-removed",)
+1474        return self.strip_tags(strip=strip, default=None)
+
+ + +

Remove the tags of provided elements, keeping inner childs and text.

+ +

Return : the striped element.

+ +

Warning : no clone in sub_elements list.

+ +

Arguments:

+ +
sub_elements -- Element or list of Element
+
+
+ + +
+
+ +
+ + def + strip_tags( self, strip: collections.abc.Iterable[str] | None = None, protect: collections.abc.Iterable[str] | None = None, default: str | None = 'text:p') -> Element | list: + + + +
+ +
1476    def strip_tags(
+1477        self,
+1478        strip: Iterable[str] | None = None,
+1479        protect: Iterable[str] | None = None,
+1480        default: str | None = "text:p",
+1481    ) -> Element | list:
+1482        """Remove the tags listed in strip, recursively, keeping inner childs
+1483        and text. Tags listed in protect stop the removal one level depth. If
+1484        the first level element is stripped, default is used to embed the
+1485        content in the default element. If default is None and first level is
+1486        striped, a list of text and children is returned. Return : the striped
+1487        element.
+1488
+1489        strip_tags should be used by on purpose methods (strip_span ...)
+1490        (Method name taken from lxml).
+1491
+1492        Arguments:
+1493
+1494            strip -- iterable list of str odf tags, or None
+1495
+1496            protect -- iterable list of str odf tags, or None
+1497
+1498            default -- str odf tag, or None
+1499
+1500        Return:
+1501
+1502            Element.
+1503        """
+1504        if not strip:
+1505            return self
+1506        if not protect:
+1507            protect = ()
+1508        protected = False
+1509        element, modified = Element._strip_tags(self, strip, protect, protected)
+1510        if modified and isinstance(element, list) and default:
+1511            new = Element.from_tag(default)
+1512            for content in element:
+1513                if isinstance(content, Element):
+1514                    new.append(content)
+1515                else:
+1516                    new.text = content
+1517            element = new
+1518        return element
+
+ + +

Remove the tags listed in strip, recursively, keeping inner childs +and text. Tags listed in protect stop the removal one level depth. If +the first level element is stripped, default is used to embed the +content in the default element. If default is None and first level is +striped, a list of text and children is returned. Return : the striped +element.

+ +

strip_tags should be used by on purpose methods (strip_span ...) +(Method name taken from lxml).

+ +

Arguments:

+ +
strip -- iterable list of str odf tags, or None
+
+protect -- iterable list of str odf tags, or None
+
+default -- str odf tag, or None
+
+ +

Return:

+ +
Element.
+
+
+ + +
+
+ +
+ + def + xpath( self, xpath_query: str) -> list[Element | Text]: + + + +
+ +
1574    def xpath(self, xpath_query: str) -> list[Element | Text]:
+1575        """Apply XPath query to the element and its subtree. Return list of
+1576        Element or Text instances translated from the nodes found.
+1577        """
+1578        element = self.__element
+1579        xpath_instance = xpath_compile(xpath_query)
+1580        elements = xpath_instance(element)
+1581        result: list[Element | Text] = []
+1582        if hasattr(elements, "__iter__"):
+1583            for obj in elements:  # type: ignore
+1584                if isinstance(obj, (_ElementStringResult, _ElementUnicodeResult)):
+1585                    result.append(Text(obj))
+1586                elif isinstance(obj, _Element):
+1587                    result.append(Element.from_tag(obj))
+1588                # else:
+1589                #     result.append(obj)
+1590        return result
+
+ + +

Apply XPath query to the element and its subtree. Return list of +Element or Text instances translated from the nodes found.

+
+ + +
+
+ +
+ + def + clear(self) -> None: + + + +
+ +
1592    def clear(self) -> None:
+1593        """Remove text, children and attributes from the element."""
+1594        self.__element.clear()
+1595        if hasattr(self, "_tmap"):
+1596            self._tmap: list[int] = []
+1597        if hasattr(self, "_cmap"):
+1598            self._cmap: list[int] = []
+1599        if hasattr(self, "_rmap"):
+1600            self._rmap: list[int] = []
+1601        if hasattr(self, "_indexes"):
+1602            remember = False
+1603            if "_rmap" in self._indexes:
+1604                remember = True
+1605            self._indexes: dict[str, dict] = {}
+1606            self._indexes["_cmap"] = {}
+1607            self._indexes["_tmap"] = {}
+1608            if remember:
+1609                self._indexes["_rmap"] = {}
+
+ + +

Remove text, children and attributes from the element.

+
+ + +
+
+ +
+ clone: Element + + + +
+ +
1611    @property
+1612    def clone(self) -> Element:
+1613        clone = deepcopy(self.__element)
+1614        root = lxml_Element("ROOT", nsmap=ODF_NAMESPACES)
+1615        root.append(clone)
+1616        return self.from_tag(clone)
+1617
+1618        # slow data = tostring(self.__element, encoding='unicode')
+1619        # return self.from_tag(data)
+
+ + + + +
+
+ +
+ + def + serialize(self, pretty: bool = False, with_ns: bool = False) -> str: + + + +
+ +
1626    def serialize(self, pretty: bool = False, with_ns: bool = False) -> str:
+1627        """Return text serialization of XML element."""
+1628        # This copy bypasses serialization side-effects in lxml
+1629        native = deepcopy(self.__element)
+1630        data = tostring(
+1631            native, with_tail=False, pretty_print=pretty, encoding="unicode"
+1632        )
+1633        if with_ns:
+1634            return data
+1635        # Remove namespaces
+1636        return self._strip_namespaces(data)
+
+ + +

Return text serialization of XML element.

+
+ + +
+
+ +
+ document_body: Element | None + + + +
+ +
1640    @property
+1641    def document_body(self) -> Element | None:
+1642        """Return the document body : 'office:body'"""
+1643        return self.get_element("//office:body/*[1]")
+
+ + +

Return the document body : 'office:body'

+
+ + +
+
+ +
+ + def + get_formatted_text(self, context: dict | None = None) -> str: + + + +
+ +
1658    def get_formatted_text(self, context: dict | None = None) -> str:
+1659        """This function should return a beautiful version of the text."""
+1660        return ""
+
+ + +

This function should return a beautiful version of the text.

+
+ + +
+
+ +
+ + def + get_styled_elements(self, name: str = '') -> list[Element]: + + + +
+ +
1662    def get_styled_elements(self, name: str = "") -> list[Element]:
+1663        """Brute-force to find paragraphs, tables, etc. using the given style
+1664        name (or all by default).
+1665
+1666        Arguments:
+1667
+1668            name -- str
+1669
+1670        Return: list
+1671        """
+1672        # FIXME incomplete (and possibly inaccurate)
+1673        return (
+1674            self._filtered_elements("descendant::*", text_style=name)
+1675            + self._filtered_elements("descendant::*", draw_style=name)
+1676            + self._filtered_elements("descendant::*", draw_text_style=name)
+1677            + self._filtered_elements("descendant::*", table_style=name)
+1678            + self._filtered_elements("descendant::*", page_layout=name)
+1679            + self._filtered_elements("descendant::*", master_page=name)
+1680            + self._filtered_elements("descendant::*", parent_style=name)
+1681        )
+
+ + +

Brute-force to find paragraphs, tables, etc. using the given style +name (or all by default).

+ +

Arguments:

+ +
name -- str
+
+ +

Return: list

+
+ + +
+
+ +
+ dc_creator: str | None + + + +
+ +
1700    @property
+1701    def dc_creator(self) -> str | None:
+1702        """Get dc:creator value.
+1703
+1704        Return: str (or None if inexistant)
+1705        """
+1706        return self._get_inner_text("dc:creator")
+
+ + +

Get dc:creator value.

+ +

Return: str (or None if inexistant)

+
+ + +
+
+ +
+ dc_date: datetime.datetime | None + + + +
+ +
1718    @property
+1719    def dc_date(self) -> datetime | None:
+1720        """Get the dc:date value.
+1721
+1722        Return: datetime (or None if inexistant)
+1723        """
+1724        date = self._get_inner_text("dc:date")
+1725        if date is None:
+1726            return None
+1727        return DateTime.decode(date)
+
+ + +

Get the dc:date value.

+ +

Return: datetime (or None if inexistant)

+
+ + +
+
+ +
+ svg_title: str | None + + + +
+ +
1741    @property
+1742    def svg_title(self) -> str | None:
+1743        return self._get_inner_text("svg:title")
+
+ + + + +
+
+ +
+ svg_description: str | None + + + +
+ +
1749    @property
+1750    def svg_description(self) -> str | None:
+1751        return self._get_inner_text("svg:desc")
+
+ + + + +
+
+ +
+ + def + get_sections( self, style: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
1759    def get_sections(
+1760        self,
+1761        style: str | None = None,
+1762        content: str | None = None,
+1763    ) -> list[Element]:
+1764        """Return all the sections that match the criteria.
+1765
+1766        Arguments:
+1767
+1768            style -- str
+1769
+1770            content -- str regex
+1771
+1772        Return: list of Element
+1773        """
+1774        return self._filtered_elements(
+1775            "text:section", text_style=style, content=content
+1776        )
+
+ + +

Return all the sections that match the criteria.

+ +

Arguments:

+ +
style -- str
+
+content -- str regex
+
+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_section( self, position: int = 0, content: str | None = None) -> Element | None: + + + +
+ +
1778    def get_section(
+1779        self,
+1780        position: int = 0,
+1781        content: str | None = None,
+1782    ) -> Element | None:
+1783        """Return the section that matches the criteria.
+1784
+1785        Arguments:
+1786
+1787            position -- int
+1788
+1789            content -- str regex
+1790
+1791        Return: Element or None if not found
+1792        """
+1793        return self._filtered_element(
+1794            "descendant::text:section", position, content=content
+1795        )
+
+ + +

Return the section that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+content -- str regex
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_paragraphs( self, style: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
1799    def get_paragraphs(
+1800        self,
+1801        style: str | None = None,
+1802        content: str | None = None,
+1803    ) -> list[Element]:
+1804        """Return all the paragraphs that match the criteria.
+1805
+1806        Arguments:
+1807
+1808            style -- str
+1809
+1810            content -- str regex
+1811
+1812        Return: list of Paragraph
+1813        """
+1814        return self._filtered_elements(
+1815            "descendant::text:p", text_style=style, content=content
+1816        )
+
+ + +

Return all the paragraphs that match the criteria.

+ +

Arguments:

+ +
style -- str
+
+content -- str regex
+
+ +

Return: list of Paragraph

+
+ + +
+
+ +
+ + def + get_paragraph( self, position: int = 0, content: str | None = None) -> Element | None: + + + +
+ +
1818    def get_paragraph(
+1819        self,
+1820        position: int = 0,
+1821        content: str | None = None,
+1822    ) -> Element | None:
+1823        """Return the paragraph that matches the criteria.
+1824
+1825        Arguments:
+1826
+1827            position -- int
+1828
+1829            content -- str regex
+1830
+1831        Return: Paragraph or None if not found
+1832        """
+1833        return self._filtered_element("descendant::text:p", position, content=content)
+
+ + +

Return the paragraph that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+content -- str regex
+
+ +

Return: Paragraph or None if not found

+
+ + +
+
+ +
+ + def + get_spans( self, style: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
1837    def get_spans(
+1838        self,
+1839        style: str | None = None,
+1840        content: str | None = None,
+1841    ) -> list[Element]:
+1842        """Return all the spans that match the criteria.
+1843
+1844        Arguments:
+1845
+1846            style -- str
+1847
+1848            content -- str regex
+1849
+1850        Return: list of Span
+1851        """
+1852        return self._filtered_elements(
+1853            "descendant::text:span", text_style=style, content=content
+1854        )
+
+ + +

Return all the spans that match the criteria.

+ +

Arguments:

+ +
style -- str
+
+content -- str regex
+
+ +

Return: list of Span

+
+ + +
+
+ +
+ + def + get_span( self, position: int = 0, content: str | None = None) -> Element | None: + + + +
+ +
1856    def get_span(
+1857        self,
+1858        position: int = 0,
+1859        content: str | None = None,
+1860    ) -> Element | None:
+1861        """Return the span that matches the criteria.
+1862
+1863        Arguments:
+1864
+1865            position -- int
+1866
+1867            content -- str regex
+1868
+1869        Return: Span or None if not found
+1870        """
+1871        return self._filtered_element(
+1872            "descendant::text:span", position, content=content
+1873        )
+
+ + +

Return the span that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+content -- str regex
+
+ +

Return: Span or None if not found

+
+ + +
+
+ +
+ + def + get_headers( self, style: str | None = None, outline_level: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
1877    def get_headers(
+1878        self,
+1879        style: str | None = None,
+1880        outline_level: str | None = None,
+1881        content: str | None = None,
+1882    ) -> list[Element]:
+1883        """Return all the Headers that match the criteria.
+1884
+1885        Arguments:
+1886
+1887            style -- str
+1888
+1889            content -- str regex
+1890
+1891        Return: list of Header
+1892        """
+1893        return self._filtered_elements(
+1894            "descendant::text:h",
+1895            text_style=style,
+1896            outline_level=outline_level,
+1897            content=content,
+1898        )
+
+ + +

Return all the Headers that match the criteria.

+ +

Arguments:

+ +
style -- str
+
+content -- str regex
+
+ +

Return: list of Header

+
+ + +
+
+ +
+ + def + get_header( self, position: int = 0, outline_level: str | None = None, content: str | None = None) -> Element | None: + + + +
+ +
1900    def get_header(
+1901        self,
+1902        position: int = 0,
+1903        outline_level: str | None = None,
+1904        content: str | None = None,
+1905    ) -> Element | None:
+1906        """Return the Header that matches the criteria.
+1907
+1908        Arguments:
+1909
+1910            position -- int
+1911
+1912            content -- str regex
+1913
+1914        Return: Header or None if not found
+1915        """
+1916        return self._filtered_element(
+1917            "descendant::text:h",
+1918            position,
+1919            outline_level=outline_level,
+1920            content=content,
+1921        )
+
+ + +

Return the Header that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+content -- str regex
+
+ +

Return: Header or None if not found

+
+ + +
+
+ +
+ + def + get_lists( self, style: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
1925    def get_lists(
+1926        self,
+1927        style: str | None = None,
+1928        content: str | None = None,
+1929    ) -> list[Element]:
+1930        """Return all the lists that match the criteria.
+1931
+1932        Arguments:
+1933
+1934            style -- str
+1935
+1936            content -- str regex
+1937
+1938        Return: list of List
+1939        """
+1940        return self._filtered_elements(
+1941            "descendant::text:list", text_style=style, content=content
+1942        )
+
+ + +

Return all the lists that match the criteria.

+ +

Arguments:

+ +
style -- str
+
+content -- str regex
+
+ +

Return: list of List

+
+ + +
+
+ +
+ + def + get_list( self, position: int = 0, content: str | None = None) -> Element | None: + + + +
+ +
1944    def get_list(
+1945        self,
+1946        position: int = 0,
+1947        content: str | None = None,
+1948    ) -> Element | None:
+1949        """Return the list that matches the criteria.
+1950
+1951        Arguments:
+1952
+1953            position -- int
+1954
+1955            content -- str regex
+1956
+1957        Return: List or None if not found
+1958        """
+1959        return self._filtered_element(
+1960            "descendant::text:list", position, content=content
+1961        )
+
+ + +

Return the list that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+content -- str regex
+
+ +

Return: List or None if not found

+
+ + +
+
+ +
+ + def + get_frames( self, presentation_class: str | None = None, style: str | None = None, title: str | None = None, description: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
1965    def get_frames(
+1966        self,
+1967        presentation_class: str | None = None,
+1968        style: str | None = None,
+1969        title: str | None = None,
+1970        description: str | None = None,
+1971        content: str | None = None,
+1972    ) -> list[Element]:
+1973        """Return all the frames that match the criteria.
+1974
+1975        Arguments:
+1976
+1977            presentation_class -- str
+1978
+1979            style -- str
+1980
+1981            title -- str regex
+1982
+1983            description -- str regex
+1984
+1985            content -- str regex
+1986
+1987        Return: list of Frame
+1988        """
+1989        return self._filtered_elements(
+1990            "descendant::draw:frame",
+1991            presentation_class=presentation_class,
+1992            draw_style=style,
+1993            svg_title=title,
+1994            svg_desc=description,
+1995            content=content,
+1996        )
+
+ + +

Return all the frames that match the criteria.

+ +

Arguments:

+ +
presentation_class -- str
+
+style -- str
+
+title -- str regex
+
+description -- str regex
+
+content -- str regex
+
+ +

Return: list of Frame

+
+ + +
+
+ +
+ + def + get_frame( self, position: int = 0, name: str | None = None, presentation_class: str | None = None, title: str | None = None, description: str | None = None, content: str | None = None) -> Element | None: + + + +
+ +
1998    def get_frame(
+1999        self,
+2000        position: int = 0,
+2001        name: str | None = None,
+2002        presentation_class: str | None = None,
+2003        title: str | None = None,
+2004        description: str | None = None,
+2005        content: str | None = None,
+2006    ) -> Element | None:
+2007        """Return the section that matches the criteria.
+2008
+2009        Arguments:
+2010
+2011            position -- int
+2012
+2013            name -- str
+2014
+2015            presentation_class -- str
+2016
+2017            title -- str regex
+2018
+2019            description -- str regex
+2020
+2021            content -- str regex
+2022
+2023        Return: Frame or None if not found
+2024        """
+2025        return self._filtered_element(
+2026            "descendant::draw:frame",
+2027            position,
+2028            draw_name=name,
+2029            presentation_class=presentation_class,
+2030            svg_title=title,
+2031            svg_desc=description,
+2032            content=content,
+2033        )
+
+ + +

Return the section that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+name -- str
+
+presentation_class -- str
+
+title -- str regex
+
+description -- str regex
+
+content -- str regex
+
+ +

Return: Frame or None if not found

+
+ + +
+
+ +
+ + def + get_images( self, style: str | None = None, url: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
2037    def get_images(
+2038        self,
+2039        style: str | None = None,
+2040        url: str | None = None,
+2041        content: str | None = None,
+2042    ) -> list[Element]:
+2043        """Return all the images matching the criteria.
+2044
+2045        Arguments:
+2046
+2047            style -- str
+2048
+2049            url -- str regex
+2050
+2051            content -- str regex
+2052
+2053        Return: list of Element
+2054        """
+2055        return self._filtered_elements(
+2056            "descendant::draw:image", text_style=style, url=url, content=content
+2057        )
+
+ + +

Return all the images matching the criteria.

+ +

Arguments:

+ +
style -- str
+
+url -- str regex
+
+content -- str regex
+
+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_image( self, position: int = 0, name: str | None = None, url: str | None = None, content: str | None = None) -> Element | None: + + + +
+ +
2059    def get_image(
+2060        self,
+2061        position: int = 0,
+2062        name: str | None = None,
+2063        url: str | None = None,
+2064        content: str | None = None,
+2065    ) -> Element | None:
+2066        """Return the image matching the criteria.
+2067
+2068        Arguments:
+2069
+2070            position -- int
+2071
+2072            name -- str
+2073
+2074            url -- str regex
+2075
+2076            content -- str regex
+2077
+2078        Return: Element or None if not found
+2079        """
+2080        # The frame is holding the name
+2081        if name is not None:
+2082            frame = self._filtered_element(
+2083                "descendant::draw:frame", position, draw_name=name
+2084            )
+2085            if frame is None:
+2086                return None
+2087            # The name is supposedly unique
+2088            return frame.get_element("draw:image")
+2089        return self._filtered_element(
+2090            "descendant::draw:image", position, url=url, content=content
+2091        )
+
+ + +

Return the image matching the criteria.

+ +

Arguments:

+ +
position -- int
+
+name -- str
+
+url -- str regex
+
+content -- str regex
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_tables( self, style: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
2095    def get_tables(
+2096        self,
+2097        style: str | None = None,
+2098        content: str | None = None,
+2099    ) -> list[Element]:
+2100        """Return all the tables that match the criteria.
+2101
+2102        Arguments:
+2103
+2104            style -- str
+2105
+2106            content -- str regex
+2107
+2108        Return: list of Table
+2109        """
+2110        return self._filtered_elements(
+2111            "descendant::table:table", table_style=style, content=content
+2112        )
+
+ + +

Return all the tables that match the criteria.

+ +

Arguments:

+ +
style -- str
+
+content -- str regex
+
+ +

Return: list of Table

+
+ + +
+
+ +
+ + def + get_table( self, position: int = 0, name: str | None = None, content: str | None = None) -> Element | None: + + + +
+ +
2114    def get_table(
+2115        self,
+2116        position: int = 0,
+2117        name: str | None = None,
+2118        content: str | None = None,
+2119    ) -> Element | None:
+2120        """Return the table that matches the criteria.
+2121
+2122        Arguments:
+2123
+2124            position -- int
+2125
+2126            name -- str
+2127
+2128            content -- str regex
+2129
+2130        Return: Table or None if not found
+2131        """
+2132        if name is None and content is None:
+2133            result = self._filtered_element("descendant::table:table", position)
+2134        else:
+2135            result = self._filtered_element(
+2136                "descendant::table:table",
+2137                position,
+2138                table_name=name,
+2139                content=content,
+2140            )
+2141        return result
+
+ + +

Return the table that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+name -- str
+
+content -- str regex
+
+ +

Return: Table or None if not found

+
+ + +
+
+ +
+ + def + get_named_ranges(self) -> list[Element]: + + + +
+ +
2145    def get_named_ranges(self) -> list[Element]:
+2146        """Return all the tables named ranges.
+2147
+2148        Return: list of odf_named_range
+2149        """
+2150        named_ranges = self.get_elements(
+2151            "descendant::table:named-expressions/table:named-range"
+2152        )
+2153        return named_ranges
+
+ + +

Return all the tables named ranges.

+ +

Return: list of odf_named_range

+
+ + +
+
+ +
+ + def + get_named_range(self, name: str) -> Element | None: + + + +
+ +
2155    def get_named_range(self, name: str) -> Element | None:
+2156        """Return the named range of specified name, or None if not found.
+2157
+2158        Arguments:
+2159
+2160            name -- str
+2161
+2162        Return: NamedRange
+2163        """
+2164        named_range = self.get_elements(
+2165            f'descendant::table:named-expressions/table:named-range[@table:name="{name}"][1]'
+2166        )
+2167        if named_range:
+2168            return named_range[0]
+2169        else:
+2170            return None
+
+ + +

Return the named range of specified name, or None if not found.

+ +

Arguments:

+ +
name -- str
+
+ +

Return: NamedRange

+
+ + +
+
+ +
+ + def + append_named_range(self, named_range: Element) -> None: + + + +
+ +
2172    def append_named_range(self, named_range: Element) -> None:
+2173        """Append the named range to the spreadsheet, replacing existing named
+2174        range of same name if any.
+2175
+2176        Arguments:
+2177
+2178            named_range --  NamedRange
+2179        """
+2180        if self.tag != "office:spreadsheet":
+2181            raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
+2182        named_expressions = self.get_element("table:named-expressions")
+2183        if not named_expressions:
+2184            named_expressions = Element.from_tag("table:named-expressions")
+2185            self.append(named_expressions)
+2186        # exists ?
+2187        current = named_expressions.get_element(
+2188            f'table:named-range[@table:name="{named_range.name}"][1]'  # type:ignore
+2189        )
+2190        if current:
+2191            named_expressions.delete(current)
+2192        named_expressions.append(named_range)
+
+ + +

Append the named range to the spreadsheet, replacing existing named +range of same name if any.

+ +

Arguments:

+ +
named_range --  NamedRange
+
+
+ + +
+
+ +
+ + def + delete_named_range(self, name: str) -> None: + + + +
+ +
2194    def delete_named_range(self, name: str) -> None:
+2195        """Delete the Named Range of specified name from the spreadsheet.
+2196
+2197        Arguments:
+2198
+2199            name -- str
+2200        """
+2201        if self.tag != "office:spreadsheet":
+2202            raise ValueError(f"Element is no 'office:spreadsheet' : {self.tag}")
+2203        named_range = self.get_named_range(name)
+2204        if not named_range:
+2205            return
+2206        named_range.delete()
+2207        named_expressions = self.get_element("table:named-expressions")
+2208        if not named_expressions:
+2209            return
+2210        element = named_expressions.__element
+2211        children = list(element.iterchildren())
+2212        if not children:
+2213            self.delete(named_expressions)
+
+ + +

Delete the Named Range of specified name from the spreadsheet.

+ +

Arguments:

+ +
name -- str
+
+
+ + +
+
+ +
+ + def + get_notes( self, note_class: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
2217    def get_notes(
+2218        self,
+2219        note_class: str | None = None,
+2220        content: str | None = None,
+2221    ) -> list[Element]:
+2222        """Return all the notes that match the criteria.
+2223
+2224        Arguments:
+2225
+2226            note_class -- 'footnote' or 'endnote'
+2227
+2228            content -- str regex
+2229
+2230        Return: list of Note
+2231        """
+2232        return self._filtered_elements(
+2233            "descendant::text:note", note_class=note_class, content=content
+2234        )
+
+ + +

Return all the notes that match the criteria.

+ +

Arguments:

+ +
note_class -- 'footnote' or 'endnote'
+
+content -- str regex
+
+ +

Return: list of Note

+
+ + +
+
+ +
+ + def + get_note( self, position: int = 0, note_id: str | None = None, note_class: str | None = None, content: str | None = None) -> Element | None: + + + +
+ +
2236    def get_note(
+2237        self,
+2238        position: int = 0,
+2239        note_id: str | None = None,
+2240        note_class: str | None = None,
+2241        content: str | None = None,
+2242    ) -> Element | None:
+2243        """Return the note that matches the criteria.
+2244
+2245        Arguments:
+2246
+2247            position -- int
+2248
+2249            note_id -- str
+2250
+2251            note_class -- 'footnote' or 'endnote'
+2252
+2253            content -- str regex
+2254
+2255        Return: Note or None if not found
+2256        """
+2257        return self._filtered_element(
+2258            "descendant::text:note",
+2259            position,
+2260            text_id=note_id,
+2261            note_class=note_class,
+2262            content=content,
+2263        )
+
+ + +

Return the note that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+note_id -- str
+
+note_class -- 'footnote' or 'endnote'
+
+content -- str regex
+
+ +

Return: Note or None if not found

+
+ + +
+
+ +
+ + def + get_annotations( self, creator: str | None = None, start_date: datetime.datetime | None = None, end_date: datetime.datetime | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
2267    def get_annotations(
+2268        self,
+2269        creator: str | None = None,
+2270        start_date: datetime | None = None,
+2271        end_date: datetime | None = None,
+2272        content: str | None = None,
+2273    ) -> list[Element]:
+2274        """Return all the annotations that match the criteria.
+2275
+2276        Arguments:
+2277
+2278            creator -- str
+2279
+2280            start_date -- datetime instance
+2281
+2282            end_date --  datetime instance
+2283
+2284            content -- str regex
+2285
+2286        Return: list of Annotation
+2287        """
+2288        annotations = []
+2289        for annotation in self._filtered_elements(
+2290            "descendant::office:annotation", content=content
+2291        ):
+2292            if creator is not None and creator != annotation.dc_creator:
+2293                continue
+2294            date = annotation.dc_date
+2295            if date is None:
+2296                continue
+2297            if start_date is not None and date < start_date:
+2298                continue
+2299            if end_date is not None and date >= end_date:
+2300                continue
+2301            annotations.append(annotation)
+2302        return annotations
+
+ + +

Return all the annotations that match the criteria.

+ +

Arguments:

+ +
creator -- str
+
+start_date -- datetime instance
+
+end_date --  datetime instance
+
+content -- str regex
+
+ +

Return: list of Annotation

+
+ + +
+
+ +
+ + def + get_annotation( self, position: int = 0, creator: str | None = None, start_date: datetime.datetime | None = None, end_date: datetime.datetime | None = None, content: str | None = None, name: str | None = None) -> Element | None: + + + +
+ +
2304    def get_annotation(
+2305        self,
+2306        position: int = 0,
+2307        creator: str | None = None,
+2308        start_date: datetime | None = None,
+2309        end_date: datetime | None = None,
+2310        content: str | None = None,
+2311        name: str | None = None,
+2312    ) -> Element | None:
+2313        """Return the annotation that matches the criteria.
+2314
+2315        Arguments:
+2316
+2317            position -- int
+2318
+2319            creator -- str
+2320
+2321            start_date -- datetime instance
+2322
+2323            end_date -- datetime instance
+2324
+2325            content -- str regex
+2326
+2327            name -- str
+2328
+2329        Return: Annotation or None if not found
+2330        """
+2331        if name is not None:
+2332            return self._filtered_element(
+2333                "descendant::office:annotation", 0, office_name=name
+2334            )
+2335        annotations = self.get_annotations(
+2336            creator=creator, start_date=start_date, end_date=end_date, content=content
+2337        )
+2338        if not annotations:
+2339            return None
+2340        try:
+2341            return annotations[position]
+2342        except IndexError:
+2343            return None
+
+ + +

Return the annotation that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+creator -- str
+
+start_date -- datetime instance
+
+end_date -- datetime instance
+
+content -- str regex
+
+name -- str
+
+ +

Return: Annotation or None if not found

+
+ + +
+
+ +
+ + def + get_annotation_ends(self) -> list[Element]: + + + +
+ +
2345    def get_annotation_ends(self) -> list[Element]:
+2346        """Return all the annotation ends.
+2347
+2348        Return: list of Element
+2349        """
+2350        return self._filtered_elements("descendant::office:annotation-end")
+
+ + +

Return all the annotation ends.

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_annotation_end( self, position: int = 0, name: str | None = None) -> Element | None: + + + +
+ +
2352    def get_annotation_end(
+2353        self,
+2354        position: int = 0,
+2355        name: str | None = None,
+2356    ) -> Element | None:
+2357        """Return the annotation end that matches the criteria.
+2358
+2359        Arguments:
+2360
+2361            position -- int
+2362
+2363            name -- str
+2364
+2365        Return: Element or None if not found
+2366        """
+2367        return self._filtered_element(
+2368            "descendant::office:annotation-end", position, office_name=name
+2369        )
+
+ + +

Return the annotation end that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+name -- str
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_office_names(self) -> list[str]: + + + +
+ +
2373    def get_office_names(self) -> list[str]:
+2374        """Return all the used office:name tags values of the element.
+2375
+2376        Return: list of unique str
+2377        """
+2378        name_xpath_query = xpath_compile("//@office:name")
+2379        response = name_xpath_query(self.__element)
+2380        if not isinstance(response, list):
+2381            return []
+2382        return list({str(name) for name in response if name})
+
+ + +

Return all the used office:name tags values of the element.

+ +

Return: list of unique str

+
+ + +
+
+ +
+ + def + get_variable_decls(self) -> Element: + + + +
+ +
2386    def get_variable_decls(self) -> Element:
+2387        """Return the container for variable declarations. Created if not
+2388        found.
+2389
+2390        Return: Element
+2391        """
+2392        variable_decls = self.get_element("//text:variable-decls")
+2393        if variable_decls is None:
+2394            body = self.document_body
+2395            if not body:
+2396                raise ValueError("Empty document.body")
+2397            body.insert(Element.from_tag("text:variable-decls"), FIRST_CHILD)
+2398            variable_decls = body.get_element("//text:variable-decls")
+2399
+2400        return variable_decls  # type:ignore
+
+ + +

Return the container for variable declarations. Created if not +found.

+ +

Return: Element

+
+ + +
+
+ +
+ + def + get_variable_decl_list(self) -> list[Element]: + + + +
+ +
2402    def get_variable_decl_list(self) -> list[Element]:
+2403        """Return all the variable declarations.
+2404
+2405        Return: list of Element
+2406        """
+2407        return self._filtered_elements("descendant::text:variable-decl")
+
+ + +

Return all the variable declarations.

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_variable_decl(self, name: str, position: int = 0) -> Element | None: + + + +
+ +
2409    def get_variable_decl(self, name: str, position: int = 0) -> Element | None:
+2410        """return the variable declaration for the given name.
+2411
+2412        Arguments:
+2413
+2414            name -- str
+2415
+2416            position -- int
+2417
+2418        return: Element or none if not found
+2419        """
+2420        return self._filtered_element(
+2421            "descendant::text:variable-decl", position, text_name=name
+2422        )
+
+ + +

return the variable declaration for the given name.

+ +

Arguments:

+ +
name -- str
+
+position -- int
+
+ +

return: Element or none if not found

+
+ + +
+
+ +
+ + def + get_variable_sets(self, name: str | None = None) -> list[Element]: + + + +
+ +
2424    def get_variable_sets(self, name: str | None = None) -> list[Element]:
+2425        """Return all the variable sets that match the criteria.
+2426
+2427        Arguments:
+2428
+2429            name -- str
+2430
+2431        Return: list of Element
+2432        """
+2433        return self._filtered_elements("descendant::text:variable-set", text_name=name)
+
+ + +

Return all the variable sets that match the criteria.

+ +

Arguments:

+ +
name -- str
+
+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_variable_set(self, name: str, position: int = -1) -> Element | None: + + + +
+ +
2435    def get_variable_set(self, name: str, position: int = -1) -> Element | None:
+2436        """Return the variable set for the given name (last one by default).
+2437
+2438        Arguments:
+2439
+2440            name -- str
+2441
+2442            position -- int
+2443
+2444        Return: Element or None if not found
+2445        """
+2446        return self._filtered_element(
+2447            "descendant::text:variable-set", position, text_name=name
+2448        )
+
+ + +

Return the variable set for the given name (last one by default).

+ +

Arguments:

+ +
name -- str
+
+position -- int
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_variable_set_value( self, name: str, value_type: str | None = None) -> bool | str | int | float | decimal.Decimal | datetime.datetime | datetime.timedelta | None: + + + +
+ +
2450    def get_variable_set_value(
+2451        self,
+2452        name: str,
+2453        value_type: str | None = None,
+2454    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
+2455        """Return the last value of the given variable name.
+2456
+2457        Arguments:
+2458
+2459            name -- str
+2460
+2461            value_type -- 'boolean', 'currency', 'date', 'float',
+2462                          'percentage', 'string', 'time' or automatic
+2463
+2464        Return: most appropriate Python type
+2465        """
+2466        variable_set = self.get_variable_set(name)
+2467        if not variable_set:
+2468            return None
+2469        return variable_set.get_value(value_type)  # type: ignore
+
+ + +

Return the last value of the given variable name.

+ +

Arguments:

+ +
name -- str
+
+value_type -- 'boolean', 'currency', 'date', 'float',
+              'percentage', 'string', 'time' or automatic
+
+ +

Return: most appropriate Python type

+
+ + +
+
+ +
+ + def + get_user_field_decls(self) -> Element | None: + + + +
+ +
2473    def get_user_field_decls(self) -> Element | None:
+2474        """Return the container for user field declarations. Created if not
+2475        found.
+2476
+2477        Return: Element
+2478        """
+2479        user_field_decls = self.get_element("//text:user-field-decls")
+2480        if user_field_decls is None:
+2481            body = self.document_body
+2482            if not body:
+2483                raise ValueError("Empty document.body")
+2484            body.insert(Element.from_tag("text:user-field-decls"), FIRST_CHILD)
+2485            user_field_decls = body.get_element("//text:user-field-decls")
+2486
+2487        return user_field_decls
+
+ + +

Return the container for user field declarations. Created if not +found.

+ +

Return: Element

+
+ + +
+
+ +
+ + def + get_user_field_decl_list(self) -> list[Element]: + + + +
+ +
2489    def get_user_field_decl_list(self) -> list[Element]:
+2490        """Return all the user field declarations.
+2491
+2492        Return: list of Element
+2493        """
+2494        return self._filtered_elements("descendant::text:user-field-decl")
+
+ + +

Return all the user field declarations.

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_user_field_decl(self, name: str, position: int = 0) -> Element | None: + + + +
+ +
2496    def get_user_field_decl(self, name: str, position: int = 0) -> Element | None:
+2497        """return the user field declaration for the given name.
+2498
+2499        return: Element or none if not found
+2500        """
+2501        return self._filtered_element(
+2502            "descendant::text:user-field-decl", position, text_name=name
+2503        )
+
+ + +

return the user field declaration for the given name.

+ +

return: Element or none if not found

+
+ + +
+
+ +
+ + def + get_user_field_value( self, name: str, value_type: str | None = None) -> bool | str | int | float | decimal.Decimal | datetime.datetime | datetime.timedelta | None: + + + +
+ +
2505    def get_user_field_value(
+2506        self, name: str, value_type: str | None = None
+2507    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
+2508        """Return the value of the given user field name.
+2509
+2510        Arguments:
+2511
+2512            name -- str
+2513
+2514            value_type -- 'boolean', 'currency', 'date', 'float',
+2515                          'percentage', 'string', 'time' or automatic
+2516
+2517        Return: most appropriate Python type
+2518        """
+2519        user_field_decl = self.get_user_field_decl(name)
+2520        if user_field_decl is None:
+2521            return None
+2522        return user_field_decl.get_value(value_type)  # type: ignore
+
+ + +

Return the value of the given user field name.

+ +

Arguments:

+ +
name -- str
+
+value_type -- 'boolean', 'currency', 'date', 'float',
+              'percentage', 'string', 'time' or automatic
+
+ +

Return: most appropriate Python type

+
+ + +
+
+ +
+ + def + get_user_defined_list(self) -> list[Element]: + + + +
+ +
2527    def get_user_defined_list(self) -> list[Element]:
+2528        """Return all the user defined field declarations.
+2529
+2530        Return: list of Element
+2531        """
+2532        return self._filtered_elements("descendant::text:user-defined")
+
+ + +

Return all the user defined field declarations.

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_user_defined(self, name: str, position: int = 0) -> Element | None: + + + +
+ +
2534    def get_user_defined(self, name: str, position: int = 0) -> Element | None:
+2535        """return the user defined declaration for the given name.
+2536
+2537        return: Element or none if not found
+2538        """
+2539        return self._filtered_element(
+2540            "descendant::text:user-defined", position, text_name=name
+2541        )
+
+ + +

return the user defined declaration for the given name.

+ +

return: Element or none if not found

+
+ + +
+
+ +
+ + def + get_user_defined_value( self, name: str, value_type: str | None = None) -> bool | str | int | float | decimal.Decimal | datetime.datetime | datetime.timedelta | None: + + + +
+ +
2543    def get_user_defined_value(
+2544        self, name: str, value_type: str | None = None
+2545    ) -> bool | str | int | float | Decimal | datetime | timedelta | None:
+2546        """Return the value of the given user defined field name.
+2547
+2548        Arguments:
+2549
+2550            name -- str
+2551
+2552            value_type -- 'boolean', 'date', 'float',
+2553                          'string', 'time' or automatic
+2554
+2555        Return: most appropriate Python type
+2556        """
+2557        user_defined = self.get_user_defined(name)
+2558        if user_defined is None:
+2559            return None
+2560        return user_defined.get_value(value_type)  # type: ignore
+
+ + +

Return the value of the given user defined field name.

+ +

Arguments:

+ +
name -- str
+
+value_type -- 'boolean', 'date', 'float',
+              'string', 'time' or automatic
+
+ +

Return: most appropriate Python type

+
+ + +
+
+ +
+ + def + get_draw_pages( self, style: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
2564    def get_draw_pages(
+2565        self,
+2566        style: str | None = None,
+2567        content: str | None = None,
+2568    ) -> list[Element]:
+2569        """Return all the draw pages that match the criteria.
+2570
+2571        Arguments:
+2572
+2573            style -- str
+2574
+2575            content -- str regex
+2576
+2577        Return: list of DrawPage
+2578        """
+2579        return self._filtered_elements(
+2580            "descendant::draw:page", draw_style=style, content=content
+2581        )
+
+ + +

Return all the draw pages that match the criteria.

+ +

Arguments:

+ +
style -- str
+
+content -- str regex
+
+ +

Return: list of DrawPage

+
+ + +
+
+ +
+ + def + get_draw_page( self, position: int = 0, name: str | None = None, content: str | None = None) -> Element | None: + + + +
+ +
2583    def get_draw_page(
+2584        self,
+2585        position: int = 0,
+2586        name: str | None = None,
+2587        content: str | None = None,
+2588    ) -> Element | None:
+2589        """Return the draw page that matches the criteria.
+2590
+2591        Arguments:
+2592
+2593            position -- int
+2594
+2595            name -- str
+2596
+2597            content -- str regex
+2598
+2599        Return: DrawPage or None if not found
+2600        """
+2601        return self._filtered_element(
+2602            "descendant::draw:page", position, draw_name=name, content=content
+2603        )
+
+ + +

Return the draw page that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+name -- str
+
+content -- str regex
+
+ +

Return: DrawPage or None if not found

+
+ + +
+ + +
+ +
+ + def + get_bookmarks(self) -> list[Element]: + + + +
+ +
2671    def get_bookmarks(self) -> list[Element]:
+2672        """Return all the bookmarks.
+2673
+2674        Return: list of Element
+2675        """
+2676        return self._filtered_elements("descendant::text:bookmark")
+
+ + +

Return all the bookmarks.

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_bookmark( self, position: int = 0, name: str | None = None) -> Element | None: + + + +
+ +
2678    def get_bookmark(
+2679        self,
+2680        position: int = 0,
+2681        name: str | None = None,
+2682    ) -> Element | None:
+2683        """Return the bookmark that matches the criteria.
+2684
+2685        Arguments:
+2686
+2687            position -- int
+2688
+2689            name -- str
+2690
+2691        Return: Bookmark or None if not found
+2692        """
+2693        return self._filtered_element(
+2694            "descendant::text:bookmark", position, text_name=name
+2695        )
+
+ + +

Return the bookmark that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+name -- str
+
+ +

Return: Bookmark or None if not found

+
+ + +
+
+ +
+ + def + get_bookmark_starts(self) -> list[Element]: + + + +
+ +
2697    def get_bookmark_starts(self) -> list[Element]:
+2698        """Return all the bookmark starts.
+2699
+2700        Return: list of Element
+2701        """
+2702        return self._filtered_elements("descendant::text:bookmark-start")
+
+ + +

Return all the bookmark starts.

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_bookmark_start( self, position: int = 0, name: str | None = None) -> Element | None: + + + +
+ +
2704    def get_bookmark_start(
+2705        self,
+2706        position: int = 0,
+2707        name: str | None = None,
+2708    ) -> Element | None:
+2709        """Return the bookmark start that matches the criteria.
+2710
+2711        Arguments:
+2712
+2713            position -- int
+2714
+2715            name -- str
+2716
+2717        Return: Element or None if not found
+2718        """
+2719        return self._filtered_element(
+2720            "descendant::text:bookmark-start", position, text_name=name
+2721        )
+
+ + +

Return the bookmark start that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+name -- str
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_bookmark_ends(self) -> list[Element]: + + + +
+ +
2723    def get_bookmark_ends(self) -> list[Element]:
+2724        """Return all the bookmark ends.
+2725
+2726        Return: list of Element
+2727        """
+2728        return self._filtered_elements("descendant::text:bookmark-end")
+
+ + +

Return all the bookmark ends.

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_bookmark_end( self, position: int = 0, name: str | None = None) -> Element | None: + + + +
+ +
2730    def get_bookmark_end(
+2731        self,
+2732        position: int = 0,
+2733        name: str | None = None,
+2734    ) -> Element | None:
+2735        """Return the bookmark end that matches the criteria.
+2736
+2737        Arguments:
+2738
+2739            position -- int
+2740
+2741            name -- str
+2742
+2743        Return: Element or None if not found
+2744        """
+2745        return self._filtered_element(
+2746            "descendant::text:bookmark-end", position, text_name=name
+2747        )
+
+ + +

Return the bookmark end that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+name -- str
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_reference_marks_single(self) -> list[Element]: + + + +
+ +
2751    def get_reference_marks_single(self) -> list[Element]:
+2752        """Return all the reference marks. Search only the tags
+2753        text:reference-mark.
+2754        Consider using : get_reference_marks()
+2755
+2756        Return: list of Element
+2757        """
+2758        return self._filtered_elements("descendant::text:reference-mark")
+
+ + +

Return all the reference marks. Search only the tags +text:reference-mark. +Consider using : get_reference_marks()

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_reference_mark_single( self, position: int = 0, name: str | None = None) -> Element | None: + + + +
+ +
2760    def get_reference_mark_single(
+2761        self,
+2762        position: int = 0,
+2763        name: str | None = None,
+2764    ) -> Element | None:
+2765        """Return the reference mark that matches the criteria. Search only the
+2766        tags text:reference-mark.
+2767        Consider using : get_reference_mark()
+2768
+2769        Arguments:
+2770
+2771            position -- int
+2772
+2773            name -- str
+2774
+2775        Return: Element or None if not found
+2776        """
+2777        return self._filtered_element(
+2778            "descendant::text:reference-mark", position, text_name=name
+2779        )
+
+ + +

Return the reference mark that matches the criteria. Search only the +tags text:reference-mark. +Consider using : get_reference_mark()

+ +

Arguments:

+ +
position -- int
+
+name -- str
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_reference_mark_starts(self) -> list[Element]: + + + +
+ +
2781    def get_reference_mark_starts(self) -> list[Element]:
+2782        """Return all the reference mark starts. Search only the tags
+2783        text:reference-mark-start.
+2784        Consider using : get_reference_marks()
+2785
+2786        Return: list of Element
+2787        """
+2788        return self._filtered_elements("descendant::text:reference-mark-start")
+
+ + +

Return all the reference mark starts. Search only the tags +text:reference-mark-start. +Consider using : get_reference_marks()

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_reference_mark_start( self, position: int = 0, name: str | None = None) -> Element | None: + + + +
+ +
2790    def get_reference_mark_start(
+2791        self,
+2792        position: int = 0,
+2793        name: str | None = None,
+2794    ) -> Element | None:
+2795        """Return the reference mark start that matches the criteria. Search
+2796        only the tags text:reference-mark-start.
+2797        Consider using : get_reference_mark()
+2798
+2799        Arguments:
+2800
+2801            position -- int
+2802
+2803            name -- str
+2804
+2805        Return: Element or None if not found
+2806        """
+2807        return self._filtered_element(
+2808            "descendant::text:reference-mark-start", position, text_name=name
+2809        )
+
+ + +

Return the reference mark start that matches the criteria. Search +only the tags text:reference-mark-start. +Consider using : get_reference_mark()

+ +

Arguments:

+ +
position -- int
+
+name -- str
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_reference_mark_ends(self) -> list[Element]: + + + +
+ +
2811    def get_reference_mark_ends(self) -> list[Element]:
+2812        """Return all the reference mark ends. Search only the tags
+2813        text:reference-mark-end.
+2814        Consider using : get_reference_marks()
+2815
+2816        Return: list of Element
+2817        """
+2818        return self._filtered_elements("descendant::text:reference-mark-end")
+
+ + +

Return all the reference mark ends. Search only the tags +text:reference-mark-end. +Consider using : get_reference_marks()

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_reference_mark_end( self, position: int = 0, name: str | None = None) -> Element | None: + + + +
+ +
2820    def get_reference_mark_end(
+2821        self,
+2822        position: int = 0,
+2823        name: str | None = None,
+2824    ) -> Element | None:
+2825        """Return the reference mark end that matches the criteria. Search only
+2826        the tags text:reference-mark-end.
+2827        Consider using : get_reference_marks()
+2828
+2829        Arguments:
+2830
+2831            position -- int
+2832
+2833            name -- str
+2834
+2835        Return: Element or None if not found
+2836        """
+2837        return self._filtered_element(
+2838            "descendant::text:reference-mark-end", position, text_name=name
+2839        )
+
+ + +

Return the reference mark end that matches the criteria. Search only +the tags text:reference-mark-end. +Consider using : get_reference_marks()

+ +

Arguments:

+ +
position -- int
+
+name -- str
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_reference_marks(self) -> list[Element]: + + + +
+ +
2841    def get_reference_marks(self) -> list[Element]:
+2842        """Return all the reference marks, either single position reference
+2843        (text:reference-mark) or start of range reference
+2844        (text:reference-mark-start).
+2845
+2846        Return: list of Element
+2847        """
+2848        return self._filtered_elements(
+2849            "descendant::text:reference-mark-start | descendant::text:reference-mark"
+2850        )
+
+ + +

Return all the reference marks, either single position reference +(text:reference-mark) or start of range reference +(text:reference-mark-start).

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_reference_mark( self, position: int = 0, name: str | None = None) -> Element | None: + + + +
+ +
2852    def get_reference_mark(
+2853        self,
+2854        position: int = 0,
+2855        name: str | None = None,
+2856    ) -> Element | None:
+2857        """Return the reference mark that match the criteria. Either single
+2858        position reference mark (text:reference-mark) or start of range
+2859        reference (text:reference-mark-start).
+2860
+2861        Arguments:
+2862
+2863            position -- int
+2864
+2865            name -- str
+2866
+2867        Return: Element or None if not found
+2868        """
+2869        if name:
+2870            request = (
+2871                f"descendant::text:reference-mark-start"
+2872                f'[@text:name="{name}"] '
+2873                f"| descendant::text:reference-mark"
+2874                f'[@text:name="{name}"]'
+2875            )
+2876            return self._filtered_element(request, position=0)
+2877        request = (
+2878            "descendant::text:reference-mark-start | descendant::text:reference-mark"
+2879        )
+2880        return self._filtered_element(request, position)
+
+ + +

Return the reference mark that match the criteria. Either single +position reference mark (text:reference-mark) or start of range +reference (text:reference-mark-start).

+ +

Arguments:

+ +
position -- int
+
+name -- str
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_references(self, name: str | None = None) -> list[Element]: + + + +
+ +
2882    def get_references(self, name: str | None = None) -> list[Element]:
+2883        """Return all the references (text:reference-ref). If name is
+2884        provided, returns the references of that name.
+2885
+2886        Return: list of Element
+2887
+2888        Arguments:
+2889
+2890            name -- str or None
+2891        """
+2892        if name is None:
+2893            return self._filtered_elements("descendant::text:reference-ref")
+2894        request = f'descendant::text:reference-ref[@text:ref-name="{name}"]'
+2895        return self._filtered_elements(request)
+
+ + +

Return all the references (text:reference-ref). If name is +provided, returns the references of that name.

+ +

Return: list of Element

+ +

Arguments:

+ +
name -- str or None
+
+
+ + +
+
+ +
+ + def + get_draw_groups( self, title: str | None = None, description: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
2901    def get_draw_groups(
+2902        self,
+2903        title: str | None = None,
+2904        description: str | None = None,
+2905        content: str | None = None,
+2906    ) -> list[Element]:
+2907        return self._filtered_elements(
+2908            "descendant::draw:g",
+2909            svg_title=title,
+2910            svg_desc=description,
+2911            content=content,
+2912        )
+
+ + + + +
+
+ +
+ + def + get_draw_group( self, position: int = 0, name: str | None = None, title: str | None = None, description: str | None = None, content: str | None = None) -> Element | None: + + + +
+ +
2914    def get_draw_group(
+2915        self,
+2916        position: int = 0,
+2917        name: str | None = None,
+2918        title: str | None = None,
+2919        description: str | None = None,
+2920        content: str | None = None,
+2921    ) -> Element | None:
+2922        return self._filtered_element(
+2923            "descendant::draw:g",
+2924            position,
+2925            draw_name=name,
+2926            svg_title=title,
+2927            svg_desc=description,
+2928            content=content,
+2929        )
+
+ + + + +
+
+ +
+ + def + get_draw_lines( self, draw_style: str | None = None, draw_text_style: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
2933    def get_draw_lines(
+2934        self,
+2935        draw_style: str | None = None,
+2936        draw_text_style: str | None = None,
+2937        content: str | None = None,
+2938    ) -> list[Element]:
+2939        """Return all the draw lines that match the criteria.
+2940
+2941        Arguments:
+2942
+2943            draw_style -- str
+2944
+2945            draw_text_style -- str
+2946
+2947            content -- str regex
+2948
+2949        Return: list of odf_shape
+2950        """
+2951        return self._filtered_elements(
+2952            "descendant::draw:line",
+2953            draw_style=draw_style,
+2954            draw_text_style=draw_text_style,
+2955            content=content,
+2956        )
+
+ + +

Return all the draw lines that match the criteria.

+ +

Arguments:

+ +
draw_style -- str
+
+draw_text_style -- str
+
+content -- str regex
+
+ +

Return: list of odf_shape

+
+ + +
+
+ +
+ + def + get_draw_line( self, position: int = 0, id: str | None = None, content: str | None = None) -> Element | None: + + + +
+ +
2958    def get_draw_line(
+2959        self,
+2960        position: int = 0,
+2961        id: str | None = None,  # noqa:A002
+2962        content: str | None = None,
+2963    ) -> Element | None:
+2964        """Return the draw line that matches the criteria.
+2965
+2966        Arguments:
+2967
+2968            position -- int
+2969
+2970            id -- str
+2971
+2972            content -- str regex
+2973
+2974        Return: odf_shape or None if not found
+2975        """
+2976        return self._filtered_element(
+2977            "descendant::draw:line", position, draw_id=id, content=content
+2978        )
+
+ + +

Return the draw line that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+id -- str
+
+content -- str regex
+
+ +

Return: odf_shape or None if not found

+
+ + +
+
+ +
+ + def + get_draw_rectangles( self, draw_style: str | None = None, draw_text_style: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
2982    def get_draw_rectangles(
+2983        self,
+2984        draw_style: str | None = None,
+2985        draw_text_style: str | None = None,
+2986        content: str | None = None,
+2987    ) -> list[Element]:
+2988        """Return all the draw rectangles that match the criteria.
+2989
+2990        Arguments:
+2991
+2992            draw_style -- str
+2993
+2994            draw_text_style -- str
+2995
+2996            content -- str regex
+2997
+2998        Return: list of odf_shape
+2999        """
+3000        return self._filtered_elements(
+3001            "descendant::draw:rect",
+3002            draw_style=draw_style,
+3003            draw_text_style=draw_text_style,
+3004            content=content,
+3005        )
+
+ + +

Return all the draw rectangles that match the criteria.

+ +

Arguments:

+ +
draw_style -- str
+
+draw_text_style -- str
+
+content -- str regex
+
+ +

Return: list of odf_shape

+
+ + +
+
+ +
+ + def + get_draw_rectangle( self, position: int = 0, id: str | None = None, content: str | None = None) -> Element | None: + + + +
+ +
3007    def get_draw_rectangle(
+3008        self,
+3009        position: int = 0,
+3010        id: str | None = None,  # noqa:A002
+3011        content: str | None = None,
+3012    ) -> Element | None:
+3013        """Return the draw rectangle that matches the criteria.
+3014
+3015        Arguments:
+3016
+3017            position -- int
+3018
+3019            id -- str
+3020
+3021            content -- str regex
+3022
+3023        Return: odf_shape or None if not found
+3024        """
+3025        return self._filtered_element(
+3026            "descendant::draw:rect", position, draw_id=id, content=content
+3027        )
+
+ + +

Return the draw rectangle that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+id -- str
+
+content -- str regex
+
+ +

Return: odf_shape or None if not found

+
+ + +
+
+ +
+ + def + get_draw_ellipses( self, draw_style: str | None = None, draw_text_style: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
3031    def get_draw_ellipses(
+3032        self,
+3033        draw_style: str | None = None,
+3034        draw_text_style: str | None = None,
+3035        content: str | None = None,
+3036    ) -> list[Element]:
+3037        """Return all the draw ellipses that match the criteria.
+3038
+3039        Arguments:
+3040
+3041            draw_style -- str
+3042
+3043            draw_text_style -- str
+3044
+3045            content -- str regex
+3046
+3047        Return: list of odf_shape
+3048        """
+3049        return self._filtered_elements(
+3050            "descendant::draw:ellipse",
+3051            draw_style=draw_style,
+3052            draw_text_style=draw_text_style,
+3053            content=content,
+3054        )
+
+ + +

Return all the draw ellipses that match the criteria.

+ +

Arguments:

+ +
draw_style -- str
+
+draw_text_style -- str
+
+content -- str regex
+
+ +

Return: list of odf_shape

+
+ + +
+
+ +
+ + def + get_draw_ellipse( self, position: int = 0, id: str | None = None, content: str | None = None) -> Element | None: + + + +
+ +
3056    def get_draw_ellipse(
+3057        self,
+3058        position: int = 0,
+3059        id: str | None = None,  # noqa:A002
+3060        content: str | None = None,
+3061    ) -> Element | None:
+3062        """Return the draw ellipse that matches the criteria.
+3063
+3064        Arguments:
+3065
+3066            position -- int
+3067
+3068            id -- str
+3069
+3070            content -- str regex
+3071
+3072        Return: odf_shape or None if not found
+3073        """
+3074        return self._filtered_element(
+3075            "descendant::draw:ellipse", position, draw_id=id, content=content
+3076        )
+
+ + +

Return the draw ellipse that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+id -- str
+
+content -- str regex
+
+ +

Return: odf_shape or None if not found

+
+ + +
+
+ +
+ + def + get_draw_connectors( self, draw_style: str | None = None, draw_text_style: str | None = None, content: str | None = None) -> list[Element]: + + + +
+ +
3080    def get_draw_connectors(
+3081        self,
+3082        draw_style: str | None = None,
+3083        draw_text_style: str | None = None,
+3084        content: str | None = None,
+3085    ) -> list[Element]:
+3086        """Return all the draw connectors that match the criteria.
+3087
+3088        Arguments:
+3089
+3090            draw_style -- str
+3091
+3092            draw_text_style -- str
+3093
+3094            content -- str regex
+3095
+3096        Return: list of odf_shape
+3097        """
+3098        return self._filtered_elements(
+3099            "descendant::draw:connector",
+3100            draw_style=draw_style,
+3101            draw_text_style=draw_text_style,
+3102            content=content,
+3103        )
+
+ + +

Return all the draw connectors that match the criteria.

+ +

Arguments:

+ +
draw_style -- str
+
+draw_text_style -- str
+
+content -- str regex
+
+ +

Return: list of odf_shape

+
+ + +
+
+ +
+ + def + get_draw_connector( self, position: int = 0, id: str | None = None, content: str | None = None) -> Element | None: + + + +
+ +
3105    def get_draw_connector(
+3106        self,
+3107        position: int = 0,
+3108        id: str | None = None,  # noqa:A002
+3109        content: str | None = None,
+3110    ) -> Element | None:
+3111        """Return the draw connector that matches the criteria.
+3112
+3113        Arguments:
+3114
+3115            position -- int
+3116
+3117            id -- str
+3118
+3119            content -- str regex
+3120
+3121        Return: odf_shape or None if not found
+3122        """
+3123        return self._filtered_element(
+3124            "descendant::draw:connector", position, draw_id=id, content=content
+3125        )
+
+ + +

Return the draw connector that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+id -- str
+
+content -- str regex
+
+ +

Return: odf_shape or None if not found

+
+ + +
+
+ +
+ + def + get_orphan_draw_connectors(self) -> list[Element]: + + + +
+ +
3127    def get_orphan_draw_connectors(self) -> list[Element]:
+3128        """Return a list of connectors which don't have any shape connected
+3129        to them.
+3130        """
+3131        connectors = []
+3132        for connector in self.get_draw_connectors():
+3133            start_shape = connector.get_attribute("draw:start-shape")
+3134            end_shape = connector.get_attribute("draw:end-shape")
+3135            if start_shape is None and end_shape is None:
+3136                connectors.append(connector)
+3137        return connectors
+
+ + +

Return a list of connectors which don't have any shape connected +to them.

+
+ + +
+
+ +
+ + def + get_tracked_changes(self) -> Element | None: + + + +
+ +
3141    def get_tracked_changes(self) -> Element | None:
+3142        """Return the tracked-changes part in the text body."""
+3143        return self.get_element("//text:tracked-changes")
+
+ + +

Return the tracked-changes part in the text body.

+
+ + +
+
+ +
+ + def + get_changes_ids(self) -> list[Element | Text]: + + + +
+ +
3145    def get_changes_ids(self) -> list[Element | Text]:
+3146        """Return a list of ids that refers to a change region in the tracked
+3147        changes list.
+3148        """
+3149        # Insertion changes
+3150        xpath_query = "descendant::text:change-start/@text:change-id"
+3151        # Deletion changes
+3152        xpath_query += " | descendant::text:change/@text:change-id"
+3153        return self.xpath(xpath_query)
+
+ + +

Return a list of ids that refers to a change region in the tracked +changes list.

+
+ + +
+
+ +
+ + def + get_text_change_deletions(self) -> list[Element]: + + + +
+ +
3155    def get_text_change_deletions(self) -> list[Element]:
+3156        """Return all the text changes of deletion kind: the tags text:change.
+3157        Consider using : get_text_changes()
+3158
+3159        Return: list of Element
+3160        """
+3161        return self._filtered_elements("descendant::text:text:change")
+
+ + +

Return all the text changes of deletion kind: the tags text:change. +Consider using : get_text_changes()

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_text_change_deletion( self, position: int = 0, idx: str | None = None) -> Element | None: + + + +
+ +
3163    def get_text_change_deletion(
+3164        self,
+3165        position: int = 0,
+3166        idx: str | None = None,
+3167    ) -> Element | None:
+3168        """Return the text change of deletion kind that matches the criteria.
+3169        Search only for the tags text:change.
+3170        Consider using : get_text_change()
+3171
+3172        Arguments:
+3173
+3174            position -- int
+3175
+3176            idx -- str
+3177
+3178        Return: Element or None if not found
+3179        """
+3180        return self._filtered_element(
+3181            "descendant::text:change", position, change_id=idx
+3182        )
+
+ + +

Return the text change of deletion kind that matches the criteria. +Search only for the tags text:change. +Consider using : get_text_change()

+ +

Arguments:

+ +
position -- int
+
+idx -- str
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_text_change_starts(self) -> list[Element]: + + + +
+ +
3184    def get_text_change_starts(self) -> list[Element]:
+3185        """Return all the text change-start. Search only for the tags
+3186        text:change-start.
+3187        Consider using : get_text_changes()
+3188
+3189        Return: list of Element
+3190        """
+3191        return self._filtered_elements("descendant::text:change-start")
+
+ + +

Return all the text change-start. Search only for the tags +text:change-start. +Consider using : get_text_changes()

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_text_change_start( self, position: int = 0, idx: str | None = None) -> Element | None: + + + +
+ +
3193    def get_text_change_start(
+3194        self,
+3195        position: int = 0,
+3196        idx: str | None = None,
+3197    ) -> Element | None:
+3198        """Return the text change-start that matches the criteria. Search
+3199        only the tags text:change-start.
+3200        Consider using : get_text_change()
+3201
+3202        Arguments:
+3203
+3204            position -- int
+3205
+3206            idx -- str
+3207
+3208        Return: Element or None if not found
+3209        """
+3210        return self._filtered_element(
+3211            "descendant::text:change-start", position, change_id=idx
+3212        )
+
+ + +

Return the text change-start that matches the criteria. Search +only the tags text:change-start. +Consider using : get_text_change()

+ +

Arguments:

+ +
position -- int
+
+idx -- str
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_text_change_ends(self) -> list[Element]: + + + +
+ +
3214    def get_text_change_ends(self) -> list[Element]:
+3215        """Return all the text change-end. Search only the tags
+3216        text:change-end.
+3217        Consider using : get_text_changes()
+3218
+3219        Return: list of Element
+3220        """
+3221        return self._filtered_elements("descendant::text:change-end")
+
+ + +

Return all the text change-end. Search only the tags +text:change-end. +Consider using : get_text_changes()

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_text_change_end( self, position: int = 0, idx: str | None = None) -> Element | None: + + + +
+ +
3223    def get_text_change_end(
+3224        self,
+3225        position: int = 0,
+3226        idx: str | None = None,
+3227    ) -> Element | None:
+3228        """Return the text change-end that matches the criteria. Search only
+3229        the tags text:change-end.
+3230        Consider using : get_text_change()
+3231
+3232        Arguments:
+3233
+3234            position -- int
+3235
+3236            idx -- str
+3237
+3238        Return: Element or None if not found
+3239        """
+3240        return self._filtered_element(
+3241            "descendant::text:change-end", position, change_id=idx
+3242        )
+
+ + +

Return the text change-end that matches the criteria. Search only +the tags text:change-end. +Consider using : get_text_change()

+ +

Arguments:

+ +
position -- int
+
+idx -- str
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_text_changes(self) -> list[Element]: + + + +
+ +
3244    def get_text_changes(self) -> list[Element]:
+3245        """Return all the text changes, either single deletion
+3246        (text:change) or start of range of changes (text:change-start).
+3247
+3248        Return: list of Element
+3249        """
+3250        request = "descendant::text:change-start | descendant::text:change"
+3251        return self._filtered_elements(request)
+
+ + +

Return all the text changes, either single deletion +(text:change) or start of range of changes (text:change-start).

+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_text_change( self, position: int = 0, idx: str | None = None) -> Element | None: + + + +
+ +
3253    def get_text_change(
+3254        self,
+3255        position: int = 0,
+3256        idx: str | None = None,
+3257    ) -> Element | None:
+3258        """Return the text change that matches the criteria. Either single
+3259        deletion (text:change) or start of range of changes (text:change-start).
+3260        position : index of the element to retrieve if several matches, default
+3261        is 0.
+3262        idx : change-id of the element.
+3263
+3264        Arguments:
+3265
+3266            position -- int
+3267
+3268            idx -- str
+3269
+3270        Return: Element or None if not found
+3271        """
+3272        if idx:
+3273            request = (
+3274                f'descendant::text:change-start[@text:change-id="{idx}"] '
+3275                f'| descendant::text:change[@text:change-id="{idx}"]'
+3276            )
+3277            return self._filtered_element(request, 0)
+3278        request = "descendant::text:change-start | descendant::text:change"
+3279        return self._filtered_element(request, position)
+
+ + +

Return the text change that matches the criteria. Either single +deletion (text:change) or start of range of changes (text:change-start). +position : index of the element to retrieve if several matches, default +is 0. +idx : change-id of the element.

+ +

Arguments:

+ +
position -- int
+
+idx -- str
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + get_tocs(self) -> list[Element]: + + + +
+ +
3283    def get_tocs(self) -> list[Element]:
+3284        """Return all the tables of contents.
+3285
+3286        Return: list of odf_toc
+3287        """
+3288        return self._filtered_elements("text:table-of-content")
+
+ + +

Return all the tables of contents.

+ +

Return: list of odf_toc

+
+ + +
+
+ +
+ + def + get_toc( self, position: int = 0, content: str | None = None) -> Element | None: + + + +
+ +
3290    def get_toc(
+3291        self,
+3292        position: int = 0,
+3293        content: str | None = None,
+3294    ) -> Element | None:
+3295        """Return the table of contents that matches the criteria.
+3296
+3297        Arguments:
+3298
+3299            position -- int
+3300
+3301            content -- str regex
+3302
+3303        Return: odf_toc or None if not found
+3304        """
+3305        return self._filtered_element(
+3306            "text:table-of-content", position, content=content
+3307        )
+
+ + +

Return the table of contents that matches the criteria.

+ +

Arguments:

+ +
position -- int
+
+content -- str regex
+
+ +

Return: odf_toc or None if not found

+
+ + +
+
+ +
+ + def + get_styles(self, family: str | None = None) -> list[Element]: + + + +
+ +
3329    def get_styles(self, family: str | None = None) -> list[Element]:
+3330        # Both common and default styles
+3331        tagname = self._get_style_tagname(family)
+3332        return self._filtered_elements(tagname, family=family)
+
+ + + + +
+
+ +
+ + def + get_style( self, family: str, name_or_element: str | Element | None = None, display_name: str | None = None) -> Element | None: + + + +
+ +
3334    def get_style(
+3335        self,
+3336        family: str,
+3337        name_or_element: str | Element | None = None,
+3338        display_name: str | None = None,
+3339    ) -> Element | None:
+3340        """Return the style uniquely identified by the family/name pair. If
+3341        the argument is already a style object, it will return it.
+3342
+3343        If the name is not the internal name but the name you gave in the
+3344        desktop application, use display_name instead.
+3345
+3346        Arguments:
+3347
+3348            family -- 'paragraph', 'text', 'graphic', 'table', 'list',
+3349                      'number'
+3350
+3351            name_or_element -- str or Style
+3352
+3353            display_name -- str
+3354
+3355        Return: odf_style or None if not found
+3356        """
+3357        if isinstance(name_or_element, Element):
+3358            name = self.get_attribute("style:name")
+3359            if name is not None:
+3360                return name_or_element
+3361            else:
+3362                raise ValueError(f"Not a odf_style ? {name_or_element!r}")
+3363        style_name = name_or_element
+3364        is_default = not (style_name or display_name)
+3365        tagname = self._get_style_tagname(family, is_default=is_default)
+3366        # famattr became None if no "style:family" attribute
+3367        if family:
+3368            return self._filtered_element(
+3369                tagname,
+3370                0,
+3371                style_name=style_name,
+3372                display_name=display_name,
+3373                family=family,
+3374            )
+3375        else:
+3376            return self._filtered_element(
+3377                tagname,
+3378                0,
+3379                draw_name=style_name or display_name,
+3380                family=family,
+3381            )
+
+ + +

Return the style uniquely identified by the family/name pair. If +the argument is already a style object, it will return it.

+ +

If the name is not the internal name but the name you gave in the +desktop application, use display_name instead.

+ +

Arguments:

+ +
family -- 'paragraph', 'text', 'graphic', 'table', 'list',
+          'number'
+
+name_or_element -- str or Style
+
+display_name -- str
+
+ +

Return: odf_style or None if not found

+
+ + +
+
+
+ +
+ + class + ElementTyped(odfdo.Element): + + + +
+ +
 35class ElementTyped(Element):
+ 36    def set_value_and_type(  # noqa: C901
+ 37        self,
+ 38        value: Any,
+ 39        value_type: str | None = None,
+ 40        text: str | None = None,
+ 41        currency: str | None = None,
+ 42    ) -> str | None:
+ 43        # Remove possible previous value and type
+ 44        for name in (
+ 45            "office:value-type",
+ 46            "office:boolean-value",
+ 47            "office:value",
+ 48            "office:date-value",
+ 49            "office:string-value",
+ 50            "office:time-value",
+ 51            "table:formula",
+ 52            "office:currency",
+ 53            "calcext:value-type",
+ 54            "loext:value-type",
+ 55        ):
+ 56            with contextlib.suppress(KeyError):
+ 57                self.del_attribute(name)
+ 58        if isinstance(value, bytes):
+ 59            value = bytes_to_str(value)
+ 60        if isinstance(value_type, bytes):
+ 61            value_type = bytes_to_str(value_type)
+ 62        if isinstance(text, bytes):
+ 63            text = bytes_to_str(text)
+ 64        if isinstance(currency, bytes):
+ 65            currency = bytes_to_str(currency)
+ 66        if value is None:
+ 67            self._erase_text_content()
+ 68            return text
+ 69        if isinstance(value, bool):
+ 70            if value_type is None:
+ 71                value_type = "boolean"
+ 72            if text is None:
+ 73                text = "true" if value else "false"
+ 74            value = Boolean.encode(value)
+ 75        elif isinstance(value, (int, float, Decimal)):
+ 76            if value_type == "percentage":
+ 77                text = "%d %%" % int(value * 100)
+ 78            if value_type is None:
+ 79                value_type = "float"
+ 80            if text is None:
+ 81                text = str(value)
+ 82            value = str(value)
+ 83        elif isinstance(value, datetime):
+ 84            if value_type is None:
+ 85                value_type = "date"
+ 86            if text is None:
+ 87                text = str(DateTime.encode(value))
+ 88            value = DateTime.encode(value)
+ 89        elif isinstance(value, date):
+ 90            if value_type is None:
+ 91                value_type = "date"
+ 92            if text is None:
+ 93                text = str(Date.encode(value))
+ 94            value = Date.encode(value)
+ 95        elif isinstance(value, str):
+ 96            if value_type is None:
+ 97                value_type = "string"
+ 98            if text is None:
+ 99                text = value
+100        elif isinstance(value, timedelta):
+101            if value_type is None:
+102                value_type = "time"
+103            if text is None:
+104                text = str(Duration.encode(value))
+105            value = Duration.encode(value)
+106        elif value is not None:
+107            raise TypeError(f"Type unknown: '{value!r}'")
+108
+109        if value_type is not None:
+110            self.set_attribute("office:value-type", value_type)
+111            self.set_attribute("calcext:value-type", value_type)
+112        if value_type == "boolean":
+113            self.set_attribute("office:boolean-value", value)
+114        elif value_type == "currency":
+115            self.set_attribute("office:value", value)
+116            self.set_attribute("office:currency", currency)
+117        elif value_type == "date":
+118            self.set_attribute("office:date-value", value)
+119        elif value_type in ("float", "percentage"):
+120            self.set_attribute("office:value", value)
+121            self.set_attribute("calcext:value", value)
+122        elif value_type == "string":
+123            self.set_attribute("office:string-value", value)
+124        elif value_type == "time":
+125            self.set_attribute("office:time-value", value)
+126
+127        return text
+128
+129    def _get_typed_value(  # noqa: C901
+130        self,
+131        value_type: str | None = None,
+132        try_get_text: bool = True,
+133    ) -> tuple[Any, str | None]:
+134        """Return Python typed value.
+135
+136        Only for "with office:value-type" elements, not for meta fields."""
+137        value: Decimal | str | bool | None = None
+138        if value_type is None:
+139            read_value_type = self.get_attribute("office:value-type")
+140            if isinstance(read_value_type, bool):
+141                raise TypeError(
+142                    f'Wrong type for "office:value-type": {type(read_value_type)}'
+143                )
+144            value_type = read_value_type
+145        # value_type = to_str(value_type)
+146        if value_type == "boolean":
+147            value = self.get_attribute("office:boolean-value")
+148            return (value, value_type)
+149        if value_type in {"float", "percentage", "currency"}:
+150            read_number = self.get_attribute("office:value")
+151            if not isinstance(read_number, (Decimal, str)):
+152                raise TypeError(f'Wrong type for "office:value": {type(read_number)}')
+153            value = Decimal(read_number)
+154            # Return 3 instead of 3.0 if possible
+155            if int(value) == value:
+156                return (int(value), value_type)
+157            return (value, value_type)
+158        if value_type == "date":
+159            read_attribute = self.get_attribute("office:date-value")
+160            if not isinstance(read_attribute, str):
+161                raise TypeError(
+162                    f'Wrong type for "office:date-value": {type(read_attribute)}'
+163                )
+164            if "T" in read_attribute:
+165                return (DateTime.decode(read_attribute), value_type)
+166            return (Date.decode(read_attribute), value_type)
+167        if value_type == "string":
+168            value = self.get_attribute("office:string-value")
+169            if value is not None:
+170                return (str(value), value_type)
+171            if try_get_text:
+172                list_value = [
+173                    para.text_recursive for para in self.get_elements("text:p")
+174                ]
+175                if list_value:
+176                    return ("\n".join(list_value), value_type)
+177            return (None, value_type)
+178        if value_type == "time":
+179            read_value = self.get_attribute("office:time-value")
+180            if not isinstance(read_value, str):
+181                raise TypeError(
+182                    f'Wrong type for "office:time-value": {type(read_value)}'
+183                )
+184            time_value = Duration.decode(read_value)
+185            return (time_value, value_type)
+186        if value_type is None:
+187            return (None, None)
+188        raise ValueError(f'Unexpected value type: "{value_type}"')
+189
+190    def get_value(
+191        self,
+192        value_type: str | None = None,
+193        try_get_text: bool = True,
+194        get_type: bool = False,
+195    ) -> Any | tuple[Any, str]:
+196        """Return Python typed value.
+197
+198        Only for "with office:value-type" elements, not for meta fields."""
+199        if get_type:
+200            return self._get_typed_value(
+201                value_type=value_type,
+202                try_get_text=try_get_text,
+203            )
+204        return self._get_typed_value(
+205            value_type=value_type,
+206            try_get_text=try_get_text,
+207        )[0]
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + def + set_value_and_type( self, value: Any, value_type: str | None = None, text: str | None = None, currency: str | None = None) -> str | None: + + + +
+ +
 36    def set_value_and_type(  # noqa: C901
+ 37        self,
+ 38        value: Any,
+ 39        value_type: str | None = None,
+ 40        text: str | None = None,
+ 41        currency: str | None = None,
+ 42    ) -> str | None:
+ 43        # Remove possible previous value and type
+ 44        for name in (
+ 45            "office:value-type",
+ 46            "office:boolean-value",
+ 47            "office:value",
+ 48            "office:date-value",
+ 49            "office:string-value",
+ 50            "office:time-value",
+ 51            "table:formula",
+ 52            "office:currency",
+ 53            "calcext:value-type",
+ 54            "loext:value-type",
+ 55        ):
+ 56            with contextlib.suppress(KeyError):
+ 57                self.del_attribute(name)
+ 58        if isinstance(value, bytes):
+ 59            value = bytes_to_str(value)
+ 60        if isinstance(value_type, bytes):
+ 61            value_type = bytes_to_str(value_type)
+ 62        if isinstance(text, bytes):
+ 63            text = bytes_to_str(text)
+ 64        if isinstance(currency, bytes):
+ 65            currency = bytes_to_str(currency)
+ 66        if value is None:
+ 67            self._erase_text_content()
+ 68            return text
+ 69        if isinstance(value, bool):
+ 70            if value_type is None:
+ 71                value_type = "boolean"
+ 72            if text is None:
+ 73                text = "true" if value else "false"
+ 74            value = Boolean.encode(value)
+ 75        elif isinstance(value, (int, float, Decimal)):
+ 76            if value_type == "percentage":
+ 77                text = "%d %%" % int(value * 100)
+ 78            if value_type is None:
+ 79                value_type = "float"
+ 80            if text is None:
+ 81                text = str(value)
+ 82            value = str(value)
+ 83        elif isinstance(value, datetime):
+ 84            if value_type is None:
+ 85                value_type = "date"
+ 86            if text is None:
+ 87                text = str(DateTime.encode(value))
+ 88            value = DateTime.encode(value)
+ 89        elif isinstance(value, date):
+ 90            if value_type is None:
+ 91                value_type = "date"
+ 92            if text is None:
+ 93                text = str(Date.encode(value))
+ 94            value = Date.encode(value)
+ 95        elif isinstance(value, str):
+ 96            if value_type is None:
+ 97                value_type = "string"
+ 98            if text is None:
+ 99                text = value
+100        elif isinstance(value, timedelta):
+101            if value_type is None:
+102                value_type = "time"
+103            if text is None:
+104                text = str(Duration.encode(value))
+105            value = Duration.encode(value)
+106        elif value is not None:
+107            raise TypeError(f"Type unknown: '{value!r}'")
+108
+109        if value_type is not None:
+110            self.set_attribute("office:value-type", value_type)
+111            self.set_attribute("calcext:value-type", value_type)
+112        if value_type == "boolean":
+113            self.set_attribute("office:boolean-value", value)
+114        elif value_type == "currency":
+115            self.set_attribute("office:value", value)
+116            self.set_attribute("office:currency", currency)
+117        elif value_type == "date":
+118            self.set_attribute("office:date-value", value)
+119        elif value_type in ("float", "percentage"):
+120            self.set_attribute("office:value", value)
+121            self.set_attribute("calcext:value", value)
+122        elif value_type == "string":
+123            self.set_attribute("office:string-value", value)
+124        elif value_type == "time":
+125            self.set_attribute("office:time-value", value)
+126
+127        return text
+
+ + + + +
+
+ +
+ + def + get_value( self, value_type: str | None = None, try_get_text: bool = True, get_type: bool = False) -> typing.Any | tuple[typing.Any, str]: + + + +
+ +
190    def get_value(
+191        self,
+192        value_type: str | None = None,
+193        try_get_text: bool = True,
+194        get_type: bool = False,
+195    ) -> Any | tuple[Any, str]:
+196        """Return Python typed value.
+197
+198        Only for "with office:value-type" elements, not for meta fields."""
+199        if get_type:
+200            return self._get_typed_value(
+201                value_type=value_type,
+202                try_get_text=try_get_text,
+203            )
+204        return self._get_typed_value(
+205            value_type=value_type,
+206            try_get_text=try_get_text,
+207        )[0]
+
+ + +

Return Python typed value.

+ +

Only for "with office:value-type" elements, not for meta fields.

+
+ + +
+
+
Inherited Members
+
+
Element
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + EllipseShape(odfdo.shapes.ShapeBase): + + + +
+ +
194class EllipseShape(ShapeBase):
+195    """Create a ellipse shape.
+196
+197    Arguments:
+198
+199        style -- str
+200
+201        text_style -- str
+202
+203        draw_id -- str
+204
+205        layer -- str
+206
+207        position -- (str, str)
+208
+209        size -- (str, str)
+210
+211    """
+212
+213    _tag = "draw:ellipse"
+214    _properties: tuple[PropDef, ...] = ()
+215
+216    def __init__(
+217        self,
+218        style: str | None = None,
+219        text_style: str | None = None,
+220        draw_id: str | None = None,
+221        layer: str | None = None,
+222        position: tuple | None = None,
+223        size: tuple | None = None,
+224        **kwargs: Any,
+225    ) -> None:
+226        kwargs.update(
+227            {
+228                "style": style,
+229                "text_style": text_style,
+230                "draw_id": draw_id,
+231                "layer": layer,
+232                "size": size,
+233                "position": position,
+234            }
+235        )
+236        super().__init__(**kwargs)
+
+ + +

Create a ellipse shape.

+ +

Arguments:

+ +
style -- str
+
+text_style -- str
+
+draw_id -- str
+
+layer -- str
+
+position -- (str, str)
+
+size -- (str, str)
+
+
+ + +
+ +
+ + EllipseShape( style: str | None = None, text_style: str | None = None, draw_id: str | None = None, layer: str | None = None, position: tuple | None = None, size: tuple | None = None, **kwargs: Any) + + + +
+ +
216    def __init__(
+217        self,
+218        style: str | None = None,
+219        text_style: str | None = None,
+220        draw_id: str | None = None,
+221        layer: str | None = None,
+222        position: tuple | None = None,
+223        size: tuple | None = None,
+224        **kwargs: Any,
+225    ) -> None:
+226        kwargs.update(
+227            {
+228                "style": style,
+229                "text_style": text_style,
+230                "draw_id": draw_id,
+231                "layer": layer,
+232                "size": size,
+233                "position": position,
+234            }
+235        )
+236        super().__init__(**kwargs)
+
+ + + + +
+
+
Inherited Members
+
+
odfdo.shapes.ShapeBase
+
get_formatted_text
+
draw_id
+
layer
+
width
+
height
+
pos_x
+
pos_y
+
presentation_class
+
style
+
text_style
+ +
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
odfdo.frame.SizeMix
+
size
+ +
+
odfdo.frame.PosMix
+
position
+ +
+
+
+
+
+
+ FIRST_CHILD = +0 + + +
+ + + + +
+
+ +
+ + class + Frame(odfdo.Element, odfdo.frame.AnchorMix, odfdo.frame.PosMix, odfdo.frame.ZMix, odfdo.frame.SizeMix): + + + +
+ +
168class Frame(Element, AnchorMix, PosMix, ZMix, SizeMix):
+169    """ODF Frame "draw:frame"
+170
+171    Frames are not useful by themselves. You should consider calling
+172    Frame.image_frame() or Frame.text_frame directly.
+173    """
+174
+175    _tag = "draw:frame"
+176    _properties = (
+177        PropDef("name", "draw:name"),
+178        PropDef("draw_id", "draw:id"),
+179        PropDef("width", "svg:width"),
+180        PropDef("height", "svg:height"),
+181        PropDef("style", "draw:style-name"),
+182        PropDef("pos_x", "svg:x"),
+183        PropDef("pos_y", "svg:y"),
+184        PropDef("presentation_class", "presentation:class"),
+185        PropDef("layer", "draw:layer"),
+186        PropDef("presentation_style", "presentation:style-name"),
+187    )
+188
+189    def __init__(  # noqa:  C901
+190        self,
+191        name: str | None = None,
+192        draw_id: str | None = None,
+193        style: str | None = None,
+194        position: tuple | None = None,
+195        size: tuple = ("1cm", "1cm"),
+196        z_index: int = 0,
+197        presentation_class: str | None = None,
+198        anchor_type: str | None = None,
+199        anchor_page: int | None = None,
+200        layer: str | None = None,
+201        presentation_style: str | None = None,
+202        **kwargs: Any,
+203    ) -> None:
+204        """Create a frame element of the given size. Position is relative to the
+205        context the frame is inserted in. If positioned by page, give the page
+206        number and the x, y position.
+207
+208        Size is a (width, height) tuple and position is a (left, top) tuple; items
+209        are strings including the unit, e.g. ('10cm', '15cm').
+210
+211        Frames are not useful by themselves. You should consider calling:
+212            Frame.image_frame()
+213        or
+214            Frame.text_frame()
+215
+216
+217        Arguments:
+218
+219            name -- str
+220
+221            draw_id -- str
+222
+223            style -- str
+224
+225            position -- (str, str)
+226
+227            size -- (str, str)
+228
+229            z_index -- int (default 0)
+230
+231            presentation_class -- str
+232
+233            anchor_type -- 'page', 'frame', 'paragraph', 'char' or 'as-char'
+234
+235            anchor_page -- int, page number is anchor_type is 'page'
+236
+237            layer -- str
+238
+239            presentation_style -- str
+240        """
+241        super().__init__(**kwargs)
+242        if self._do_init:
+243            self.size = size
+244            self.z_index = z_index
+245            if name:
+246                self.name = name
+247            if draw_id is not None:
+248                self.draw_id = draw_id
+249            if style is not None:
+250                self.style = style
+251            if position is not None:
+252                self.position = position
+253            if presentation_class is not None:
+254                self.presentation_class = presentation_class
+255            if anchor_type:
+256                self.anchor_type = anchor_type
+257            if position and not anchor_type:
+258                self.anchor_type = "paragraph"
+259            if anchor_page is not None:
+260                self.anchor_page = anchor_page
+261            if layer is not None:
+262                self.layer = layer
+263            if presentation_style is not None:
+264                self.presentation_style = presentation_style
+265
+266    @classmethod
+267    def image_frame(
+268        cls,
+269        image: Element | str,
+270        text: str | None = None,
+271        name: str | None = None,
+272        draw_id: str | None = None,
+273        style: str | None = None,
+274        position: tuple | None = None,
+275        size: tuple = ("1cm", "1cm"),
+276        z_index: int = 0,
+277        presentation_class: str | None = None,
+278        anchor_type: str | None = None,
+279        anchor_page: int | None = None,
+280        layer: str | None = None,
+281        presentation_style: str | None = None,
+282        **kwargs: Any,
+283    ) -> Element:
+284        """Create a ready-to-use image, since image must be embedded in a
+285        frame.
+286
+287        The optionnal text will appear above the image.
+288
+289        Arguments:
+290
+291            image -- DrawImage or str, DrawImage element or URL of the image
+292
+293            text -- str, text for the image
+294
+295            See Frame() initialization for the other arguments
+296
+297        Return: Frame
+298        """
+299        frame = cls(
+300            name=name,
+301            draw_id=draw_id,
+302            style=style,
+303            position=position,
+304            size=size,
+305            z_index=z_index,
+306            presentation_class=presentation_class,
+307            anchor_type=anchor_type,
+308            anchor_page=anchor_page,
+309            layer=layer,
+310            presentation_style=presentation_style,
+311            **kwargs,
+312        )
+313        image_element = frame.set_image(image)
+314        if text:
+315            image_element.text_content = text
+316        return frame
+317
+318    @classmethod
+319    def text_frame(
+320        cls,
+321        text_or_element: Iterable[Element] | Element | str,
+322        text_style: str | None = None,
+323        name: str | None = None,
+324        draw_id: str | None = None,
+325        style: str | None = None,
+326        position: tuple | None = None,
+327        size: tuple = ("1cm", "1cm"),
+328        z_index: int = 0,
+329        presentation_class: str | None = None,
+330        anchor_type: str | None = None,
+331        anchor_page: int | None = None,
+332        layer: str | None = None,
+333        presentation_style: str | None = None,
+334        **kwargs: Any,
+335    ) -> Element:
+336        """Create a ready-to-use text box, since text box must be embedded in
+337        a frame.
+338
+339        The optionnal text will appear above the image.
+340
+341        Arguments:
+342
+343            text_or_element -- str or Element, or list of them, text content
+344                               of the text box.
+345
+346            text_style -- str, name of the style for the text
+347
+348            See Frame() initialization for the other arguments
+349
+350        Return: Frame
+351        """
+352        frame = cls(
+353            name=name,
+354            draw_id=draw_id,
+355            style=style,
+356            position=position,
+357            size=size,
+358            z_index=z_index,
+359            presentation_class=presentation_class,
+360            anchor_type=anchor_type,
+361            anchor_page=anchor_page,
+362            layer=layer,
+363            presentation_style=presentation_style,
+364            **kwargs,
+365        )
+366        frame.set_text_box(text_or_element, text_style)
+367        return frame
+368
+369    @property
+370    def text_content(self) -> str:
+371        text_box = self.get_element("draw:text-box")
+372        if text_box is None:
+373            return ""
+374        return text_box.text_content
+375
+376    @text_content.setter
+377    def text_content(self, text_or_element: Element | str) -> None:
+378        text_box = self.get_element("draw:text-box")
+379        if text_box is None:
+380            text_box = Element.from_tag("draw:text-box")
+381            self.append(text_box)
+382        if isinstance(text_or_element, Element):
+383            text_box.clear()
+384            text_box.append(text_or_element)
+385        else:
+386            text_box.text_content = text_or_element
+387
+388    def get_image(
+389        self,
+390        position: int = 0,
+391        name: str | None = None,
+392        url: str | None = None,
+393        content: str | None = None,
+394    ) -> Element | None:
+395        return self.get_element("draw:image")
+396
+397    def set_image(self, url_or_element: Element | str) -> Element:
+398        image = self.get_image()
+399        if image is None:
+400            if isinstance(url_or_element, Element):
+401                image = url_or_element
+402                self.append(image)
+403            else:
+404                image = DrawImage(url_or_element)
+405                self.append(image)
+406        else:
+407            if isinstance(url_or_element, Element):
+408                image.delete()
+409                image = url_or_element
+410                self.append(image)
+411            else:
+412                image.set_url(url_or_element)  # type: ignore
+413        return image
+414
+415    def get_text_box(self) -> Element | None:
+416        return self.get_element("draw:text-box")
+417
+418    def set_text_box(
+419        self,
+420        text_or_element: Iterable[Element | str] | Element | str,
+421        text_style: str | None = None,
+422    ) -> Element:
+423        text_box = self.get_text_box()
+424        if text_box is None:
+425            text_box = Element.from_tag("draw:text-box")
+426            self.append(text_box)
+427        else:
+428            text_box.clear()
+429        if isinstance(text_or_element, (Element, str)):
+430            text_or_element_list: Iterable[Element | str] = [text_or_element]
+431        else:
+432            text_or_element_list = text_or_element
+433        for item in text_or_element_list:
+434            if isinstance(item, str):
+435                text_box.append(Paragraph(item, style=text_style))
+436            else:
+437                text_box.append(item)
+438        return text_box
+439
+440    @staticmethod
+441    def _get_formatted_text_subresult(context: dict, element: Element) -> str:
+442        str_list = ["  "]
+443        for child in element.children:
+444            str_list.append(child.get_formatted_text(context))
+445        subresult = "".join(str_list)
+446        subresult = subresult.replace("\n", "\n  ")
+447        return subresult.rstrip(" ")
+448
+449    def get_formatted_text(  # noqa:  C901
+450        self,
+451        context: dict | None = None,
+452    ) -> str:
+453        if not context:
+454            context = {}
+455        result = []
+456        for element in self.children:
+457            tag = element.tag
+458            if tag == "draw:image":
+459                if context["rst_mode"]:
+460                    filename = element.get_attribute("xlink:href")
+461
+462                    # Compute width and height
+463                    width, height = self.size
+464                    if width is not None:
+465                        width = Unit(width)
+466                        width = width.convert("px", DPI)
+467                    if height is not None:
+468                        height = Unit(height)
+469                        height = height.convert("px", DPI)
+470
+471                    # Insert or not ?
+472                    if context["no_img_level"]:
+473                        context["img_counter"] += 1
+474                        ref = f"|img{context['img_counter']}|"
+475                        result.append(ref)
+476                        context["images"].append((ref, filename, (width, height)))
+477                    else:
+478                        result.append(f"\n.. image:: {filename}\n")
+479                        if width is not None:
+480                            result.append(f"   :width: {width}\n")
+481                        if height is not None:
+482                            result.append(f"   :height: {height}\n")
+483                else:
+484                    result.append(f"[Image {element.get_attribute('xlink:href')}]\n")
+485            elif tag == "draw:text-box":
+486                result.append(self._get_formatted_text_subresult(context, element))
+487            else:
+488                result.append(element.get_formatted_text(context))
+489        result.append("\n")
+490        return "".join(result)
+
+ + +

ODF Frame "draw:frame"

+ +

Frames are not useful by themselves. You should consider calling +Frame.image_frame() or Frame.text_frame directly.

+
+ + +
+ +
+ + Frame( name: str | None = None, draw_id: str | None = None, style: str | None = None, position: tuple | None = None, size: tuple = ('1cm', '1cm'), z_index: int = 0, presentation_class: str | None = None, anchor_type: str | None = None, anchor_page: int | None = None, layer: str | None = None, presentation_style: str | None = None, **kwargs: Any) + + + +
+ +
189    def __init__(  # noqa:  C901
+190        self,
+191        name: str | None = None,
+192        draw_id: str | None = None,
+193        style: str | None = None,
+194        position: tuple | None = None,
+195        size: tuple = ("1cm", "1cm"),
+196        z_index: int = 0,
+197        presentation_class: str | None = None,
+198        anchor_type: str | None = None,
+199        anchor_page: int | None = None,
+200        layer: str | None = None,
+201        presentation_style: str | None = None,
+202        **kwargs: Any,
+203    ) -> None:
+204        """Create a frame element of the given size. Position is relative to the
+205        context the frame is inserted in. If positioned by page, give the page
+206        number and the x, y position.
+207
+208        Size is a (width, height) tuple and position is a (left, top) tuple; items
+209        are strings including the unit, e.g. ('10cm', '15cm').
+210
+211        Frames are not useful by themselves. You should consider calling:
+212            Frame.image_frame()
+213        or
+214            Frame.text_frame()
+215
+216
+217        Arguments:
+218
+219            name -- str
+220
+221            draw_id -- str
+222
+223            style -- str
+224
+225            position -- (str, str)
+226
+227            size -- (str, str)
+228
+229            z_index -- int (default 0)
+230
+231            presentation_class -- str
+232
+233            anchor_type -- 'page', 'frame', 'paragraph', 'char' or 'as-char'
+234
+235            anchor_page -- int, page number is anchor_type is 'page'
+236
+237            layer -- str
+238
+239            presentation_style -- str
+240        """
+241        super().__init__(**kwargs)
+242        if self._do_init:
+243            self.size = size
+244            self.z_index = z_index
+245            if name:
+246                self.name = name
+247            if draw_id is not None:
+248                self.draw_id = draw_id
+249            if style is not None:
+250                self.style = style
+251            if position is not None:
+252                self.position = position
+253            if presentation_class is not None:
+254                self.presentation_class = presentation_class
+255            if anchor_type:
+256                self.anchor_type = anchor_type
+257            if position and not anchor_type:
+258                self.anchor_type = "paragraph"
+259            if anchor_page is not None:
+260                self.anchor_page = anchor_page
+261            if layer is not None:
+262                self.layer = layer
+263            if presentation_style is not None:
+264                self.presentation_style = presentation_style
+
+ + +

Create a frame element of the given size. Position is relative to the +context the frame is inserted in. If positioned by page, give the page +number and the x, y position.

+ +

Size is a (width, height) tuple and position is a (left, top) tuple; items +are strings including the unit, e.g. ('10cm', '15cm').

+ +

Frames are not useful by themselves. You should consider calling: + Frame.image_frame() +or + Frame.text_frame()

+ +

Arguments:

+ +
name -- str
+
+draw_id -- str
+
+style -- str
+
+position -- (str, str)
+
+size -- (str, str)
+
+z_index -- int (default 0)
+
+presentation_class -- str
+
+anchor_type -- 'page', 'frame', 'paragraph', 'char' or 'as-char'
+
+anchor_page -- int, page number is anchor_type is 'page'
+
+layer -- str
+
+presentation_style -- str
+
+
+ + +
+
+ +
+
@classmethod
+ + def + image_frame( cls, image: Element | str, text: str | None = None, name: str | None = None, draw_id: str | None = None, style: str | None = None, position: tuple | None = None, size: tuple = ('1cm', '1cm'), z_index: int = 0, presentation_class: str | None = None, anchor_type: str | None = None, anchor_page: int | None = None, layer: str | None = None, presentation_style: str | None = None, **kwargs: Any) -> Element: + + + +
+ +
266    @classmethod
+267    def image_frame(
+268        cls,
+269        image: Element | str,
+270        text: str | None = None,
+271        name: str | None = None,
+272        draw_id: str | None = None,
+273        style: str | None = None,
+274        position: tuple | None = None,
+275        size: tuple = ("1cm", "1cm"),
+276        z_index: int = 0,
+277        presentation_class: str | None = None,
+278        anchor_type: str | None = None,
+279        anchor_page: int | None = None,
+280        layer: str | None = None,
+281        presentation_style: str | None = None,
+282        **kwargs: Any,
+283    ) -> Element:
+284        """Create a ready-to-use image, since image must be embedded in a
+285        frame.
+286
+287        The optionnal text will appear above the image.
+288
+289        Arguments:
+290
+291            image -- DrawImage or str, DrawImage element or URL of the image
+292
+293            text -- str, text for the image
+294
+295            See Frame() initialization for the other arguments
+296
+297        Return: Frame
+298        """
+299        frame = cls(
+300            name=name,
+301            draw_id=draw_id,
+302            style=style,
+303            position=position,
+304            size=size,
+305            z_index=z_index,
+306            presentation_class=presentation_class,
+307            anchor_type=anchor_type,
+308            anchor_page=anchor_page,
+309            layer=layer,
+310            presentation_style=presentation_style,
+311            **kwargs,
+312        )
+313        image_element = frame.set_image(image)
+314        if text:
+315            image_element.text_content = text
+316        return frame
+
+ + +

Create a ready-to-use image, since image must be embedded in a +frame.

+ +

The optionnal text will appear above the image.

+ +

Arguments:

+ +
image -- DrawImage or str, DrawImage element or URL of the image
+
+text -- str, text for the image
+
+See Frame() initialization for the other arguments
+
+ +

Return: Frame

+
+ + +
+
+ +
+
@classmethod
+ + def + text_frame( cls, text_or_element: collections.abc.Iterable[Element] | Element | str, text_style: str | None = None, name: str | None = None, draw_id: str | None = None, style: str | None = None, position: tuple | None = None, size: tuple = ('1cm', '1cm'), z_index: int = 0, presentation_class: str | None = None, anchor_type: str | None = None, anchor_page: int | None = None, layer: str | None = None, presentation_style: str | None = None, **kwargs: Any) -> Element: + + + +
+ +
318    @classmethod
+319    def text_frame(
+320        cls,
+321        text_or_element: Iterable[Element] | Element | str,
+322        text_style: str | None = None,
+323        name: str | None = None,
+324        draw_id: str | None = None,
+325        style: str | None = None,
+326        position: tuple | None = None,
+327        size: tuple = ("1cm", "1cm"),
+328        z_index: int = 0,
+329        presentation_class: str | None = None,
+330        anchor_type: str | None = None,
+331        anchor_page: int | None = None,
+332        layer: str | None = None,
+333        presentation_style: str | None = None,
+334        **kwargs: Any,
+335    ) -> Element:
+336        """Create a ready-to-use text box, since text box must be embedded in
+337        a frame.
+338
+339        The optionnal text will appear above the image.
+340
+341        Arguments:
+342
+343            text_or_element -- str or Element, or list of them, text content
+344                               of the text box.
+345
+346            text_style -- str, name of the style for the text
+347
+348            See Frame() initialization for the other arguments
+349
+350        Return: Frame
+351        """
+352        frame = cls(
+353            name=name,
+354            draw_id=draw_id,
+355            style=style,
+356            position=position,
+357            size=size,
+358            z_index=z_index,
+359            presentation_class=presentation_class,
+360            anchor_type=anchor_type,
+361            anchor_page=anchor_page,
+362            layer=layer,
+363            presentation_style=presentation_style,
+364            **kwargs,
+365        )
+366        frame.set_text_box(text_or_element, text_style)
+367        return frame
+
+ + +

Create a ready-to-use text box, since text box must be embedded in +a frame.

+ +

The optionnal text will appear above the image.

+ +

Arguments:

+ +
text_or_element -- str or Element, or list of them, text content
+                   of the text box.
+
+text_style -- str, name of the style for the text
+
+See Frame() initialization for the other arguments
+
+ +

Return: Frame

+
+ + +
+
+ +
+ text_content: str + + + +
+ +
369    @property
+370    def text_content(self) -> str:
+371        text_box = self.get_element("draw:text-box")
+372        if text_box is None:
+373            return ""
+374        return text_box.text_content
+
+ + +

Get / set the text of the embedded paragraph, including embeded +annotations, cells...

+ +

Set create a paragraph if missing

+
+ + +
+
+ +
+ + def + get_image( self, position: int = 0, name: str | None = None, url: str | None = None, content: str | None = None) -> Element | None: + + + +
+ +
388    def get_image(
+389        self,
+390        position: int = 0,
+391        name: str | None = None,
+392        url: str | None = None,
+393        content: str | None = None,
+394    ) -> Element | None:
+395        return self.get_element("draw:image")
+
+ + +

Return the image matching the criteria.

+ +

Arguments:

+ +
position -- int
+
+name -- str
+
+url -- str regex
+
+content -- str regex
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + set_image( self, url_or_element: Element | str) -> Element: + + + +
+ +
397    def set_image(self, url_or_element: Element | str) -> Element:
+398        image = self.get_image()
+399        if image is None:
+400            if isinstance(url_or_element, Element):
+401                image = url_or_element
+402                self.append(image)
+403            else:
+404                image = DrawImage(url_or_element)
+405                self.append(image)
+406        else:
+407            if isinstance(url_or_element, Element):
+408                image.delete()
+409                image = url_or_element
+410                self.append(image)
+411            else:
+412                image.set_url(url_or_element)  # type: ignore
+413        return image
+
+ + + + +
+
+ +
+ + def + get_text_box(self) -> Element | None: + + + +
+ +
415    def get_text_box(self) -> Element | None:
+416        return self.get_element("draw:text-box")
+
+ + + + +
+
+ +
+ + def + set_text_box( self, text_or_element: collections.abc.Iterable[Element | str] | Element | str, text_style: str | None = None) -> Element: + + + +
+ +
418    def set_text_box(
+419        self,
+420        text_or_element: Iterable[Element | str] | Element | str,
+421        text_style: str | None = None,
+422    ) -> Element:
+423        text_box = self.get_text_box()
+424        if text_box is None:
+425            text_box = Element.from_tag("draw:text-box")
+426            self.append(text_box)
+427        else:
+428            text_box.clear()
+429        if isinstance(text_or_element, (Element, str)):
+430            text_or_element_list: Iterable[Element | str] = [text_or_element]
+431        else:
+432            text_or_element_list = text_or_element
+433        for item in text_or_element_list:
+434            if isinstance(item, str):
+435                text_box.append(Paragraph(item, style=text_style))
+436            else:
+437                text_box.append(item)
+438        return text_box
+
+ + + + +
+
+ +
+ + def + get_formatted_text(self, context: dict | None = None) -> str: + + + +
+ +
449    def get_formatted_text(  # noqa:  C901
+450        self,
+451        context: dict | None = None,
+452    ) -> str:
+453        if not context:
+454            context = {}
+455        result = []
+456        for element in self.children:
+457            tag = element.tag
+458            if tag == "draw:image":
+459                if context["rst_mode"]:
+460                    filename = element.get_attribute("xlink:href")
+461
+462                    # Compute width and height
+463                    width, height = self.size
+464                    if width is not None:
+465                        width = Unit(width)
+466                        width = width.convert("px", DPI)
+467                    if height is not None:
+468                        height = Unit(height)
+469                        height = height.convert("px", DPI)
+470
+471                    # Insert or not ?
+472                    if context["no_img_level"]:
+473                        context["img_counter"] += 1
+474                        ref = f"|img{context['img_counter']}|"
+475                        result.append(ref)
+476                        context["images"].append((ref, filename, (width, height)))
+477                    else:
+478                        result.append(f"\n.. image:: {filename}\n")
+479                        if width is not None:
+480                            result.append(f"   :width: {width}\n")
+481                        if height is not None:
+482                            result.append(f"   :height: {height}\n")
+483                else:
+484                    result.append(f"[Image {element.get_attribute('xlink:href')}]\n")
+485            elif tag == "draw:text-box":
+486                result.append(self._get_formatted_text_subresult(context, element))
+487            else:
+488                result.append(element.get_formatted_text(context))
+489        result.append("\n")
+490        return "".join(result)
+
+ + +

This function should return a beautiful version of the text.

+
+ + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ draw_id: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ width: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ height: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ pos_x: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ pos_y: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ presentation_class: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ layer: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ presentation_style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
odfdo.frame.AnchorMix
+
ANCHOR_VALUE_CHOICE
+
anchor_type
+
anchor_page
+ +
+
odfdo.frame.PosMix
+
position
+ +
+
odfdo.frame.ZMix
+
z_index
+ +
+
odfdo.frame.SizeMix
+
size
+ +
+
+
+
+ +
+ +
+ + class + HeaderRows(odfdo.Element): + + + +
+ +
32class HeaderRows(Element):
+33    _tag = "table:table-header-rows"
+34    _caching = True
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+
Inherited Members
+
+
Element
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + IndexTitle(odfdo.Element): + + + +
+ +
40class IndexTitle(Element):
+41    """The "text:index-title" element contains the title of an index.
+42
+43    The element has the following attributes:
+44    text:name, text:protected, text:protection-key,
+45    text:protection-key-digest-algorithm, text:style-name, xml:id.
+46
+47    The actual title is stored in a child element
+48    """
+49
+50    _tag = "text:index-title"
+51    _properties = (
+52        PropDef("name", "text:name"),
+53        PropDef("style", "text:style-name"),
+54        PropDef("xml_id", "xml:id"),
+55        PropDef("protected", "text:protected"),
+56        PropDef("protection_key", "text:protection-key"),
+57        PropDef(
+58            "protection_key_digest_algorithm", "text:protection-key-digest-algorithm"
+59        ),
+60    )
+61
+62    def __init__(
+63        self,
+64        name: str | None = None,
+65        style: str | None = None,
+66        title_text: str | None = None,
+67        title_text_style: str | None = None,
+68        xml_id: str | None = None,
+69        **kwargs: Any,
+70    ) -> None:
+71        super().__init__(**kwargs)
+72        if self._do_init:
+73            if name:
+74                self.name = name
+75            if style:
+76                self.style = style
+77            if xml_id:
+78                self.xml_id = xml_id
+79            if title_text:
+80                self.set_title_text(title_text, title_text_style)
+81
+82    def set_title_text(
+83        self,
+84        title_text: str,
+85        title_text_style: str | None = None,
+86    ) -> None:
+87        title = Paragraph(title_text, style=title_text_style)
+88        self.append(title)
+
+ + +

The "text:index-title" element contains the title of an index.

+ +

The element has the following attributes: +text:name, text:protected, text:protection-key, +text:protection-key-digest-algorithm, text:style-name, xml:id.

+ +

The actual title is stored in a child element

+
+ + +
+ +
+ + IndexTitle( name: str | None = None, style: str | None = None, title_text: str | None = None, title_text_style: str | None = None, xml_id: str | None = None, **kwargs: Any) + + + +
+ +
62    def __init__(
+63        self,
+64        name: str | None = None,
+65        style: str | None = None,
+66        title_text: str | None = None,
+67        title_text_style: str | None = None,
+68        xml_id: str | None = None,
+69        **kwargs: Any,
+70    ) -> None:
+71        super().__init__(**kwargs)
+72        if self._do_init:
+73            if name:
+74                self.name = name
+75            if style:
+76                self.style = style
+77            if xml_id:
+78                self.xml_id = xml_id
+79            if title_text:
+80                self.set_title_text(title_text, title_text_style)
+
+ + + + +
+
+ +
+ + def + set_title_text(self, title_text: str, title_text_style: str | None = None) -> None: + + + +
+ +
82    def set_title_text(
+83        self,
+84        title_text: str,
+85        title_text_style: str | None = None,
+86    ) -> None:
+87        title = Paragraph(title_text, style=title_text_style)
+88        self.append(title)
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ xml_id: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ protected: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ protection_key: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ protection_key_digest_algorithm: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + IndexTitleTemplate(odfdo.Element): + + + +
+ +
447class IndexTitleTemplate(Element):
+448    """ODF "text:index-title-template"
+449
+450    Arguments:
+451
+452        style -- str
+453    """
+454
+455    _tag = "text:index-title-template"
+456    _properties = (PropDef("style", "text:style-name"),)
+457
+458    def __init__(self, style: str | None = None, **kwargs: Any) -> None:
+459        super().__init__(**kwargs)
+460        if self._do_init and style:
+461            self.style = style
+
+ + +

ODF "text:index-title-template"

+ +

Arguments:

+ +
style -- str
+
+
+ + +
+ +
+ + IndexTitleTemplate(style: str | None = None, **kwargs: Any) + + + +
+ +
458    def __init__(self, style: str | None = None, **kwargs: Any) -> None:
+459        super().__init__(**kwargs)
+460        if self._do_init and style:
+461            self.style = style
+
+ + + + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+
+ LAST_CHILD = +1 + + +
+ + + + +
+
+ +
+ + class + LineBreak(odfdo.Element): + + + +
+ +
223class LineBreak(Element):
+224    """This element represents a line break "text:line-break" """
+225
+226    _tag = "text:line-break"
+227
+228    def __init__(self, **kwargs: Any) -> None:
+229        super().__init__(**kwargs)
+
+ + +

This element represents a line break "text:line-break"

+
+ + +
+ +
+ + LineBreak(**kwargs: Any) + + + +
+ +
228    def __init__(self, **kwargs: Any) -> None:
+229        super().__init__(**kwargs)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + LineShape(odfdo.shapes.ShapeBase): + + + +
+ +
 89class LineShape(ShapeBase):
+ 90    """Create a line shape.
+ 91
+ 92    Arguments:
+ 93
+ 94        style -- str
+ 95
+ 96        text_style -- str
+ 97
+ 98        draw_id -- str
+ 99
+100        layer -- str
+101
+102        p1 -- (str, str)
+103
+104        p2 -- (str, str)
+105    """
+106
+107    _tag = "draw:line"
+108    _properties: tuple[PropDef, ...] = (
+109        PropDef("x1", "svg:x1"),
+110        PropDef("y1", "svg:y1"),
+111        PropDef("x2", "svg:x2"),
+112        PropDef("y2", "svg:y2"),
+113    )
+114
+115    def __init__(
+116        self,
+117        style: str | None = None,
+118        text_style: str | None = None,
+119        draw_id: str | None = None,
+120        layer: str | None = None,
+121        p1: tuple | None = None,
+122        p2: tuple | None = None,
+123        **kwargs: Any,
+124    ) -> None:
+125        kwargs.update(
+126            {
+127                "style": style,
+128                "text_style": text_style,
+129                "draw_id": draw_id,
+130                "layer": layer,
+131            }
+132        )
+133        super().__init__(**kwargs)
+134        if self._do_init:
+135            if p1:
+136                self.x1 = p1[0]
+137                self.y1 = p1[1]
+138            if p2:
+139                self.x2 = p2[0]
+140                self.y2 = p2[1]
+
+ + +

Create a line shape.

+ +

Arguments:

+ +
style -- str
+
+text_style -- str
+
+draw_id -- str
+
+layer -- str
+
+p1 -- (str, str)
+
+p2 -- (str, str)
+
+
+ + +
+ +
+ + LineShape( style: str | None = None, text_style: str | None = None, draw_id: str | None = None, layer: str | None = None, p1: tuple | None = None, p2: tuple | None = None, **kwargs: Any) + + + +
+ +
115    def __init__(
+116        self,
+117        style: str | None = None,
+118        text_style: str | None = None,
+119        draw_id: str | None = None,
+120        layer: str | None = None,
+121        p1: tuple | None = None,
+122        p2: tuple | None = None,
+123        **kwargs: Any,
+124    ) -> None:
+125        kwargs.update(
+126            {
+127                "style": style,
+128                "text_style": text_style,
+129                "draw_id": draw_id,
+130                "layer": layer,
+131            }
+132        )
+133        super().__init__(**kwargs)
+134        if self._do_init:
+135            if p1:
+136                self.x1 = p1[0]
+137                self.y1 = p1[1]
+138            if p2:
+139                self.x2 = p2[0]
+140                self.y2 = p2[1]
+
+ + + + +
+
+ +
+ x1: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ y1: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ x2: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ y2: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
odfdo.shapes.ShapeBase
+
get_formatted_text
+
draw_id
+
layer
+
width
+
height
+
pos_x
+
pos_y
+
presentation_class
+
style
+
text_style
+ +
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
odfdo.frame.SizeMix
+
size
+ +
+
odfdo.frame.PosMix
+
position
+ +
+
+
+
+ +
+ +
+ + class + List(odfdo.Element): + + + +
+ +
 68class List(Element):
+ 69    """ODF List "text:list"."""
+ 70
+ 71    _tag = "text:list"
+ 72    _properties = (PropDef("style", "text:style-name"),)
+ 73
+ 74    def __init__(
+ 75        self,
+ 76        list_content: str | Element | Iterable[str | Element] | None = None,
+ 77        style: str | None = None,
+ 78        **kwargs: Any,
+ 79    ) -> None:
+ 80        """Create a list element, optionaly loading the list by a list of
+ 81        item (str or elements).
+ 82
+ 83        The list_content argument is just a shortcut for the most common case.
+ 84        To create more complex lists, first create an empty list, and fill it
+ 85        afterwards.
+ 86
+ 87        Arguments:
+ 88
+ 89            list_content -- str or Element, or a list of str or Element
+ 90
+ 91            style -- str
+ 92        """
+ 93        super().__init__(**kwargs)
+ 94        if self._do_init:
+ 95            if list_content:
+ 96                if isinstance(list_content, (Element, str)):
+ 97                    self.append(ListItem(list_content))
+ 98                elif hasattr(list_content, "__iter__"):
+ 99                    for item in list_content:
+100                        self.append(ListItem(item))
+101            if style is not None:
+102                self.style = style
+103
+104    def get_items(self, content: str | None = None) -> list[Element]:
+105        """Return all the list items that match the criteria.
+106
+107        Arguments:
+108
+109            style -- str
+110
+111            content -- str regex
+112
+113        Return: list of Element
+114        """
+115        return self._filtered_elements("text:list-item", content=content)
+116
+117    def get_item(
+118        self,
+119        position: int = 0,
+120        content: str | None = None,
+121    ) -> Element | None:
+122        """Return the list item that matches the criteria. In nested lists,
+123        return the list item that really contains that content.
+124
+125        Arguments:
+126
+127            position -- int
+128
+129            content -- str regex
+130
+131        Return: Element or None if not found
+132        """
+133        # Custom implementation because of nested lists
+134        if content:
+135            # Don't search recursively but on the very own paragraph(s) of
+136            # each list item
+137            for paragraph in self.get_elements("descendant::text:p"):
+138                if paragraph.match(content):
+139                    return paragraph.get_element("parent::text:list-item")
+140            return None
+141        return self._filtered_element("text:list-item", position)
+142
+143    def set_list_header(
+144        self,
+145        text_or_element: str | Element | Iterable[str | Element],
+146    ) -> None:
+147        if isinstance(text_or_element, (str, Element)):
+148            actual_list: list[str | Element] | tuple = [text_or_element]
+149        elif isinstance(text_or_element, (list, tuple)):
+150            actual_list = text_or_element
+151        else:
+152            raise TypeError
+153        # Remove existing header
+154        for element in self.get_elements("text:p"):
+155            self.delete(element)
+156        for paragraph in reversed(actual_list):
+157            if isinstance(paragraph, str):
+158                paragraph = Paragraph(paragraph)
+159            self.insert(paragraph, FIRST_CHILD)
+160
+161    def insert_item(
+162        self,
+163        item: ListItem | str | Element | None,
+164        position: int | None = None,
+165        before: Element | None = None,
+166        after: Element | None = None,
+167    ) -> None:
+168        if not isinstance(item, ListItem):
+169            item = ListItem(item)
+170        if before is not None:
+171            before.insert(item, xmlposition=PREV_SIBLING)
+172        elif after is not None:
+173            after.insert(item, xmlposition=NEXT_SIBLING)
+174        elif position is not None:
+175            self.insert(item, position=position)
+176        else:
+177            raise ValueError("Position must be defined")
+178
+179    def append_item(
+180        self,
+181        item: ListItem | str | Element | None,
+182    ) -> None:
+183        if not isinstance(item, ListItem):
+184            item = ListItem(item)
+185        self.append(item)
+186
+187    def get_formatted_text(self, context: dict | None = None) -> str:
+188        if context is None:
+189            context = {}
+190        rst_mode = context["rst_mode"]
+191        result = []
+192        if rst_mode:
+193            result.append("\n")
+194        for list_item in self.get_elements("text:list-item"):
+195            textbuf = []
+196            for child in list_item.children:
+197                text = child.get_formatted_text(context)
+198                tag = child.tag
+199                if tag == "text:h":
+200                    # A title in a list is a bug
+201                    return text
+202                if tag == "text:list" and not text.lstrip().startswith("-"):
+203                    # If the list didn't indent, don't either
+204                    # (inner title)
+205                    return text
+206                textbuf.append(text)
+207            text_sum = "".join(textbuf)
+208            text_sum = text_sum.strip("\n")
+209            # Indent the text
+210            text_sum = text_sum.replace("\n", "\n  ")
+211            text_sum = f"- {text_sum}\n"
+212            result.append(text_sum)
+213        if rst_mode:
+214            result.append("\n")
+215        return "".join(result)
+
+ + +

ODF List "text:list".

+
+ + +
+ +
+ + List( list_content: str | Element | collections.abc.Iterable[str | Element] | None = None, style: str | None = None, **kwargs: Any) + + + +
+ +
 74    def __init__(
+ 75        self,
+ 76        list_content: str | Element | Iterable[str | Element] | None = None,
+ 77        style: str | None = None,
+ 78        **kwargs: Any,
+ 79    ) -> None:
+ 80        """Create a list element, optionaly loading the list by a list of
+ 81        item (str or elements).
+ 82
+ 83        The list_content argument is just a shortcut for the most common case.
+ 84        To create more complex lists, first create an empty list, and fill it
+ 85        afterwards.
+ 86
+ 87        Arguments:
+ 88
+ 89            list_content -- str or Element, or a list of str or Element
+ 90
+ 91            style -- str
+ 92        """
+ 93        super().__init__(**kwargs)
+ 94        if self._do_init:
+ 95            if list_content:
+ 96                if isinstance(list_content, (Element, str)):
+ 97                    self.append(ListItem(list_content))
+ 98                elif hasattr(list_content, "__iter__"):
+ 99                    for item in list_content:
+100                        self.append(ListItem(item))
+101            if style is not None:
+102                self.style = style
+
+ + +

Create a list element, optionaly loading the list by a list of +item (str or elements).

+ +

The list_content argument is just a shortcut for the most common case. +To create more complex lists, first create an empty list, and fill it +afterwards.

+ +

Arguments:

+ +
list_content -- str or Element, or a list of str or Element
+
+style -- str
+
+
+ + +
+
+ +
+ + def + get_items(self, content: str | None = None) -> list[Element]: + + + +
+ +
104    def get_items(self, content: str | None = None) -> list[Element]:
+105        """Return all the list items that match the criteria.
+106
+107        Arguments:
+108
+109            style -- str
+110
+111            content -- str regex
+112
+113        Return: list of Element
+114        """
+115        return self._filtered_elements("text:list-item", content=content)
+
+ + +

Return all the list items that match the criteria.

+ +

Arguments:

+ +
style -- str
+
+content -- str regex
+
+ +

Return: list of Element

+
+ + +
+
+ +
+ + def + get_item( self, position: int = 0, content: str | None = None) -> Element | None: + + + +
+ +
117    def get_item(
+118        self,
+119        position: int = 0,
+120        content: str | None = None,
+121    ) -> Element | None:
+122        """Return the list item that matches the criteria. In nested lists,
+123        return the list item that really contains that content.
+124
+125        Arguments:
+126
+127            position -- int
+128
+129            content -- str regex
+130
+131        Return: Element or None if not found
+132        """
+133        # Custom implementation because of nested lists
+134        if content:
+135            # Don't search recursively but on the very own paragraph(s) of
+136            # each list item
+137            for paragraph in self.get_elements("descendant::text:p"):
+138                if paragraph.match(content):
+139                    return paragraph.get_element("parent::text:list-item")
+140            return None
+141        return self._filtered_element("text:list-item", position)
+
+ + +

Return the list item that matches the criteria. In nested lists, +return the list item that really contains that content.

+ +

Arguments:

+ +
position -- int
+
+content -- str regex
+
+ +

Return: Element or None if not found

+
+ + +
+
+ +
+ + def + set_list_header( self, text_or_element: str | Element | collections.abc.Iterable[str | Element]) -> None: + + + +
+ +
143    def set_list_header(
+144        self,
+145        text_or_element: str | Element | Iterable[str | Element],
+146    ) -> None:
+147        if isinstance(text_or_element, (str, Element)):
+148            actual_list: list[str | Element] | tuple = [text_or_element]
+149        elif isinstance(text_or_element, (list, tuple)):
+150            actual_list = text_or_element
+151        else:
+152            raise TypeError
+153        # Remove existing header
+154        for element in self.get_elements("text:p"):
+155            self.delete(element)
+156        for paragraph in reversed(actual_list):
+157            if isinstance(paragraph, str):
+158                paragraph = Paragraph(paragraph)
+159            self.insert(paragraph, FIRST_CHILD)
+
+ + + + +
+
+ +
+ + def + insert_item( self, item: ListItem | str | Element | None, position: int | None = None, before: Element | None = None, after: Element | None = None) -> None: + + + +
+ +
161    def insert_item(
+162        self,
+163        item: ListItem | str | Element | None,
+164        position: int | None = None,
+165        before: Element | None = None,
+166        after: Element | None = None,
+167    ) -> None:
+168        if not isinstance(item, ListItem):
+169            item = ListItem(item)
+170        if before is not None:
+171            before.insert(item, xmlposition=PREV_SIBLING)
+172        elif after is not None:
+173            after.insert(item, xmlposition=NEXT_SIBLING)
+174        elif position is not None:
+175            self.insert(item, position=position)
+176        else:
+177            raise ValueError("Position must be defined")
+
+ + + + +
+
+ +
+ + def + append_item( self, item: ListItem | str | Element | None) -> None: + + + +
+ +
179    def append_item(
+180        self,
+181        item: ListItem | str | Element | None,
+182    ) -> None:
+183        if not isinstance(item, ListItem):
+184            item = ListItem(item)
+185        self.append(item)
+
+ + + + +
+
+ +
+ + def + get_formatted_text(self, context: dict | None = None) -> str: + + + +
+ +
187    def get_formatted_text(self, context: dict | None = None) -> str:
+188        if context is None:
+189            context = {}
+190        rst_mode = context["rst_mode"]
+191        result = []
+192        if rst_mode:
+193            result.append("\n")
+194        for list_item in self.get_elements("text:list-item"):
+195            textbuf = []
+196            for child in list_item.children:
+197                text = child.get_formatted_text(context)
+198                tag = child.tag
+199                if tag == "text:h":
+200                    # A title in a list is a bug
+201                    return text
+202                if tag == "text:list" and not text.lstrip().startswith("-"):
+203                    # If the list didn't indent, don't either
+204                    # (inner title)
+205                    return text
+206                textbuf.append(text)
+207            text_sum = "".join(textbuf)
+208            text_sum = text_sum.strip("\n")
+209            # Indent the text
+210            text_sum = text_sum.replace("\n", "\n  ")
+211            text_sum = f"- {text_sum}\n"
+212            result.append(text_sum)
+213        if rst_mode:
+214            result.append("\n")
+215        return "".join(result)
+
+ + +

This function should return a beautiful version of the text.

+
+ + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + ListItem(odfdo.Element): + + + +
+ +
41class ListItem(Element):
+42    """ODF element "text:list-item", item of a List."""
+43
+44    _tag = "text:list-item"
+45
+46    def __init__(
+47        self,
+48        text_or_element: str | Element | None = None,
+49        **kwargs: Any,
+50    ) -> None:
+51        """Create a list item element, optionaly passing at creation time a
+52        string or Element as content.
+53
+54        Arguments:
+55
+56            text_or_element -- str or ODF Element
+57        """
+58        super().__init__(**kwargs)
+59        if self._do_init:
+60            if isinstance(text_or_element, str):
+61                self.text_content = text_or_element
+62            elif isinstance(text_or_element, Element):
+63                self.append(text_or_element)
+64            elif text_or_element is not None:
+65                raise TypeError("Expected str or Element")
+
+ + +

ODF element "text:list-item", item of a List.

+
+ + +
+ +
+ + ListItem( text_or_element: str | Element | None = None, **kwargs: Any) + + + +
+ +
46    def __init__(
+47        self,
+48        text_or_element: str | Element | None = None,
+49        **kwargs: Any,
+50    ) -> None:
+51        """Create a list item element, optionaly passing at creation time a
+52        string or Element as content.
+53
+54        Arguments:
+55
+56            text_or_element -- str or ODF Element
+57        """
+58        super().__init__(**kwargs)
+59        if self._do_init:
+60            if isinstance(text_or_element, str):
+61                self.text_content = text_or_element
+62            elif isinstance(text_or_element, Element):
+63                self.append(text_or_element)
+64            elif text_or_element is not None:
+65                raise TypeError("Expected str or Element")
+
+ + +

Create a list item element, optionaly passing at creation time a +string or Element as content.

+ +

Arguments:

+ +
text_or_element -- str or ODF Element
+
+
+ + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Manifest(odfdo.XmlPart): + + + +
+ +
 31class Manifest(XmlPart):
+ 32    def get_paths(self) -> list[Element | Text]:
+ 33        """Return the list of full paths in the manifest.
+ 34
+ 35        Return: list of str
+ 36        """
+ 37        xpath_query = "//manifest:file-entry/attribute::manifest:full-path"
+ 38        return self.xpath(xpath_query)
+ 39
+ 40    def _file_entry(self, full_path: str) -> Element:
+ 41        xpath_query = (
+ 42            f'//manifest:file-entry[attribute::manifest:full-path="{full_path}"]'
+ 43        )
+ 44        result = self.xpath(xpath_query)
+ 45        if not result:
+ 46            raise KeyError(f"Path not found: '{full_path}'")
+ 47        return result[0]  # type: ignore
+ 48
+ 49    def get_path_medias(self) -> list[tuple]:
+ 50        """Return the list of (full_path, media_type) pairs in the manifest.
+ 51
+ 52        Return: list of str tuples
+ 53        """
+ 54        xpath_query = "//manifest:file-entry"
+ 55        result = []
+ 56        for file_entry in self.xpath(xpath_query):
+ 57            if not isinstance(file_entry, Element):
+ 58                continue
+ 59            result.append(
+ 60                (
+ 61                    file_entry.get_attribute_string("manifest:full-path"),
+ 62                    file_entry.get_attribute_string("manifest:media-type"),
+ 63                )
+ 64            )
+ 65        return result
+ 66
+ 67    def get_media_type(self, full_path: str) -> str | None:
+ 68        """Get the media type of an existing path.
+ 69
+ 70        Return: str
+ 71        """
+ 72        xpath_query = (
+ 73            f'//manifest:file-entry[attribute::manifest:full-path="{full_path}"]'
+ 74            "/attribute::manifest:media-type"
+ 75        )
+ 76        result = self.xpath(xpath_query)
+ 77        if not result:
+ 78            return None
+ 79        return str(result[0])
+ 80
+ 81    def set_media_type(self, full_path: str, media_type: str) -> None:
+ 82        """Set the media type of an existing path.
+ 83
+ 84        Arguments:
+ 85
+ 86            full_path -- str
+ 87
+ 88            media_type -- str
+ 89        """
+ 90        file_entry = self._file_entry(full_path)
+ 91        file_entry.set_attribute("manifest:media-type", media_type)
+ 92
+ 93    @staticmethod
+ 94    def make_file_entry(full_path: str, media_type: str) -> Element:
+ 95        tag = (
+ 96            f"<manifest:file-entry "
+ 97            f'manifest:media-type="{media_type}" '
+ 98            f'manifest:full-path="{full_path}"/>'
+ 99        )
+100        return Element.from_tag(tag)
+101
+102    def add_full_path(self, full_path: str, media_type: str = "") -> None:
+103        # Existing?
+104        existing = self.get_media_type(full_path)
+105        if existing is not None:
+106            self.set_media_type(full_path, media_type)
+107        root = self.root
+108        root.append(self.make_file_entry(full_path, media_type))
+109
+110    def del_full_path(self, full_path: str) -> None:
+111        file_entry = self._file_entry(full_path)
+112        self.root.delete(file_entry)
+
+ + +

Representation of an XML part.

+ +

Abstraction of the XML library behind.

+
+ + +
+ +
+ + def + get_paths(self) -> list[Element | Text]: + + + +
+ +
32    def get_paths(self) -> list[Element | Text]:
+33        """Return the list of full paths in the manifest.
+34
+35        Return: list of str
+36        """
+37        xpath_query = "//manifest:file-entry/attribute::manifest:full-path"
+38        return self.xpath(xpath_query)
+
+ + +

Return the list of full paths in the manifest.

+ +

Return: list of str

+
+ + +
+
+ +
+ + def + get_path_medias(self) -> list[tuple]: + + + +
+ +
49    def get_path_medias(self) -> list[tuple]:
+50        """Return the list of (full_path, media_type) pairs in the manifest.
+51
+52        Return: list of str tuples
+53        """
+54        xpath_query = "//manifest:file-entry"
+55        result = []
+56        for file_entry in self.xpath(xpath_query):
+57            if not isinstance(file_entry, Element):
+58                continue
+59            result.append(
+60                (
+61                    file_entry.get_attribute_string("manifest:full-path"),
+62                    file_entry.get_attribute_string("manifest:media-type"),
+63                )
+64            )
+65        return result
+
+ + +

Return the list of (full_path, media_type) pairs in the manifest.

+ +

Return: list of str tuples

+
+ + +
+
+ +
+ + def + get_media_type(self, full_path: str) -> str | None: + + + +
+ +
67    def get_media_type(self, full_path: str) -> str | None:
+68        """Get the media type of an existing path.
+69
+70        Return: str
+71        """
+72        xpath_query = (
+73            f'//manifest:file-entry[attribute::manifest:full-path="{full_path}"]'
+74            "/attribute::manifest:media-type"
+75        )
+76        result = self.xpath(xpath_query)
+77        if not result:
+78            return None
+79        return str(result[0])
+
+ + +

Get the media type of an existing path.

+ +

Return: str

+
+ + +
+
+ +
+ + def + set_media_type(self, full_path: str, media_type: str) -> None: + + + +
+ +
81    def set_media_type(self, full_path: str, media_type: str) -> None:
+82        """Set the media type of an existing path.
+83
+84        Arguments:
+85
+86            full_path -- str
+87
+88            media_type -- str
+89        """
+90        file_entry = self._file_entry(full_path)
+91        file_entry.set_attribute("manifest:media-type", media_type)
+
+ + +

Set the media type of an existing path.

+ +

Arguments:

+ +
full_path -- str
+
+media_type -- str
+
+
+ + +
+
+ +
+
@staticmethod
+ + def + make_file_entry(full_path: str, media_type: str) -> Element: + + + +
+ +
 93    @staticmethod
+ 94    def make_file_entry(full_path: str, media_type: str) -> Element:
+ 95        tag = (
+ 96            f"<manifest:file-entry "
+ 97            f'manifest:media-type="{media_type}" '
+ 98            f'manifest:full-path="{full_path}"/>'
+ 99        )
+100        return Element.from_tag(tag)
+
+ + + + +
+
+ +
+ + def + add_full_path(self, full_path: str, media_type: str = '') -> None: + + + +
+ +
102    def add_full_path(self, full_path: str, media_type: str = "") -> None:
+103        # Existing?
+104        existing = self.get_media_type(full_path)
+105        if existing is not None:
+106            self.set_media_type(full_path, media_type)
+107        root = self.root
+108        root.append(self.make_file_entry(full_path, media_type))
+
+ + + + +
+
+ +
+ + def + del_full_path(self, full_path: str) -> None: + + + +
+ +
110    def del_full_path(self, full_path: str) -> None:
+111        file_entry = self._file_entry(full_path)
+112        self.root.delete(file_entry)
+
+ + + + +
+
+
Inherited Members
+
+ +
+
+
+
+ +
+ + class + Meta(odfdo.XmlPart): + + + +
+ +
 43class Meta(XmlPart):
+ 44    def __init__(self, *args: Any, **kwargs: Any) -> None:
+ 45        super().__init__(*args, **kwargs)
+ 46        self._generator_modified: bool = False
+ 47
+ 48    def get_meta_body(self) -> Element:
+ 49        return self.get_element("//office:meta")
+ 50
+ 51    def get_title(self) -> str | None:
+ 52        """Get the title of the document.
+ 53
+ 54        This is not the first heading but the title metadata.
+ 55
+ 56        Return: str (or None if inexistant)
+ 57        """
+ 58        element = self.get_element("//dc:title")
+ 59        if element is None:
+ 60            return None
+ 61        return element.text
+ 62
+ 63    def set_title(self, title: str) -> None:
+ 64        """Set the title of the document.
+ 65
+ 66        This is not the first heading but the title metadata.
+ 67
+ 68        Arguments:
+ 69
+ 70            title -- str
+ 71        """
+ 72        element = self.get_element("//dc:title")
+ 73        if element is None:
+ 74            element = Element.from_tag("dc:title")
+ 75            self.get_meta_body().append(element)
+ 76        element.text = title
+ 77
+ 78    def get_description(self) -> str | None:
+ 79        """Get the description of the document. Also known as comments.
+ 80
+ 81        Return: str (or None if inexistant)
+ 82        """
+ 83        element = self.get_element("//dc:description")
+ 84        if element is None:
+ 85            return None
+ 86        return element.text
+ 87
+ 88    # As named in OOo
+ 89    get_comments = get_description
+ 90
+ 91    def set_description(self, description: str) -> None:
+ 92        """Set the description of the document. Also known as comments.
+ 93
+ 94        Arguments:
+ 95
+ 96            description -- str
+ 97        """
+ 98        element = self.get_element("//dc:description")
+ 99        if element is None:
+100            element = Element.from_tag("dc:description")
+101            self.get_meta_body().append(element)
+102        element.text = description
+103
+104    set_comments = set_description
+105
+106    def get_subject(self) -> str | None:
+107        """Get the subject of the document.
+108
+109        Return: str (or None if inexistant)
+110        """
+111        element = self.get_element("//dc:subject")
+112        if element is None:
+113            return None
+114        return element.text
+115
+116    def set_subject(self, subject: str) -> None:
+117        """Set the subject of the document.
+118
+119        Arguments:
+120
+121            subject -- str
+122        """
+123        element = self.get_element("//dc:subject")
+124        if element is None:
+125            element = Element.from_tag("dc:subject")
+126            self.get_meta_body().append(element)
+127        element.text = subject
+128
+129    def get_language(self) -> str | None:
+130        """Get the language code of the document.
+131
+132        Return: str (or None if inexistant)
+133
+134        Example::
+135
+136            >>> document.meta.get_language()
+137            fr-FR
+138        """
+139        element = self.get_element("//dc:language")
+140        if element is None:
+141            return None
+142        return element.text
+143
+144    def set_language(self, language: str) -> None:
+145        """Set the language code of the document.
+146
+147        Arguments:
+148
+149            language -- str
+150
+151        Example::
+152
+153            >>> document.meta.set_language('fr-FR')
+154        """
+155        language = str(language)
+156        if not self._is_RFC3066(language):
+157            raise TypeError(
+158                'Language must be "xx" lang or "xx-YY" lang-COUNTRY code (RFC3066)'
+159            )
+160        element = self.get_element("//dc:language")
+161        if element is None:
+162            element = Element.from_tag("dc:language")
+163            self.get_meta_body().append(element)
+164        element.text = language
+165
+166    @staticmethod
+167    def _is_RFC3066(lang: str) -> bool:
+168        def test_part1(part1: str) -> bool:
+169            if not 2 <= len(part1) <= 3:
+170                return False
+171            return all(x in ascii_letters for x in part1)
+172
+173        def test_part2(part2: str) -> bool:
+174            return all(x in ascii_letters or x in digits for x in part2)
+175
+176        if not lang or not isinstance(lang, str):
+177            return False
+178        if "-" not in lang:
+179            return test_part1(lang)
+180        parts = lang.split("-")
+181        if len(parts) > 3:
+182            return False
+183        if not test_part1(parts[0]):
+184            return False
+185        return all(test_part2(p) for p in parts[1:])
+186
+187    def get_modification_date(self) -> datetime | None:
+188        """Get the last modified date of the document.
+189
+190        Return: datetime (or None if inexistant)
+191        """
+192        element = self.get_element("//dc:date")
+193        if element is None:
+194            return None
+195        modification_date = element.text
+196        return DateTime.decode(modification_date)
+197
+198    def set_modification_date(self, date: datetime) -> None:
+199        """Set the last modified date of the document.
+200
+201        Arguments:
+202
+203            date -- datetime
+204        """
+205        element = self.get_element("//dc:date")
+206        if element is None:
+207            element = Element.from_tag("dc:date")
+208            self.get_meta_body().append(element)
+209        element.text = DateTime.encode(date)
+210
+211    def get_creation_date(self) -> datetime | None:
+212        """Get the creation date of the document.
+213
+214        Return: datetime (or None if inexistant)
+215        """
+216        element = self.get_element("//meta:creation-date")
+217        if element is None:
+218            return None
+219        creation_date = element.text
+220        return DateTime.decode(creation_date)
+221
+222    def set_creation_date(self, date: datetime) -> None:
+223        """Set the creation date of the document.
+224
+225        Arguments:
+226
+227            date -- datetime
+228        """
+229        element = self.get_element("//meta:creation-date")
+230        if element is None:
+231            element = Element.from_tag("meta:creation-date")
+232            self.get_meta_body().append(element)
+233        element.text = DateTime.encode(date)
+234
+235    def get_initial_creator(self) -> str | None:
+236        """Get the first creator of the document.
+237
+238        Return: str (or None if inexistant)
+239
+240        Example::
+241
+242            >>> document.meta.get_initial_creator()
+243            Unknown
+244        """
+245        element = self.get_element("//meta:initial-creator")
+246        if element is None:
+247            return None
+248        return element.text
+249
+250    def set_initial_creator(self, creator: str) -> None:
+251        """Set the first creator of the document.
+252
+253        Arguments:
+254
+255            creator -- str
+256
+257        Example::
+258
+259            >>> document.meta.set_initial_creator("Plato")
+260        """
+261        element = self.get_element("//meta:initial-creator")
+262        if element is None:
+263            element = Element.from_tag("meta:initial-creator")
+264            self.get_meta_body().append(element)
+265        element.text = creator
+266
+267    def get_creator(self) -> str | None:
+268        """Get the creator of the document.
+269
+270        Return: str (or None if inexistant)
+271
+272        Example::
+273
+274            >>> document.meta.get_creator()
+275            Unknown
+276        """
+277        element = self.get_element("//dc:creator")
+278        if element is None:
+279            return None
+280        return element.text
+281
+282    def set_creator(self, creator: str) -> None:
+283        """Set the creator of the document.
+284
+285        Arguments:
+286
+287            creator -- str
+288
+289        Example::
+290
+291            >>> document.meta.set_creator("Plato")
+292        """
+293        element = self.get_element("//dc:creator")
+294        if element is None:
+295            element = Element.from_tag("dc:creator")
+296            self.get_meta_body().append(element)
+297        element.text = creator
+298
+299    def get_keywords(self) -> str | None:
+300        """Get the keywords of the document. Return the field as-is, without
+301        any assumption on the keyword separator.
+302
+303        Return: str (or None if inexistant)
+304        """
+305        element = self.get_element("//meta:keyword")
+306        if element is None:
+307            return None
+308        return element.text
+309
+310    def set_keywords(self, keywords: str) -> None:
+311        """Set the keywords of the document. Although the name is plural, a
+312        str string is required, so join your list first.
+313
+314        Arguments:
+315
+316            keywords -- str
+317        """
+318        element = self.get_element("//meta:keyword")
+319        if element is None:
+320            element = Element.from_tag("meta:keyword")
+321            self.get_meta_body().append(element)
+322        element.text = keywords
+323
+324    def get_editing_duration(self) -> timedelta | None:
+325        """Get the time the document was edited, as reported by the
+326        generator.
+327
+328        Return: timedelta (or None if inexistant)
+329        """
+330        element = self.get_element("//meta:editing-duration")
+331        if element is None:
+332            return None
+333        duration = element.text
+334        return Duration.decode(duration)
+335
+336    def set_editing_duration(self, duration: timedelta) -> None:
+337        """Set the time the document was edited.
+338
+339        Arguments:
+340
+341            duration -- timedelta
+342        """
+343        if not isinstance(duration, timedelta):
+344            raise TypeError("duration must be a timedelta")
+345        element = self.get_element("//meta:editing-duration")
+346        if element is None:
+347            element = Element.from_tag("meta:editing-duration")
+348            self.get_meta_body().append(element)
+349        element.text = Duration.encode(duration)
+350
+351    def get_editing_cycles(self) -> int | None:
+352        """Get the number of times the document was edited, as reported by
+353        the generator.
+354
+355        Return: int (or None if inexistant)
+356        """
+357        element = self.get_element("//meta:editing-cycles")
+358        if element is None:
+359            return None
+360        cycles = element.text
+361        return int(cycles)
+362
+363    def set_editing_cycles(self, cycles: int) -> None:
+364        """Set the number of times the document was edited.
+365
+366        Arguments:
+367
+368            cycles -- int
+369        """
+370        if not isinstance(cycles, int):
+371            raise TypeError("cycles must be an int")
+372        if cycles < 1:
+373            raise ValueError("cycles must be a positive int")
+374        element = self.get_element("//meta:editing-cycles")
+375        if element is None:
+376            element = Element.from_tag("meta:editing-cycles")
+377            self.get_meta_body().append(element)
+378        element.text = str(cycles)
+379
+380    def get_generator(self) -> str | None:
+381        """Get the signature of the software that generated this document.
+382
+383        Return: str (or None if inexistant)
+384
+385        Example::
+386
+387            >>> document.meta.get_generator()
+388            KOffice/2.0.0
+389        """
+390        element = self.get_element("//meta:generator")
+391        if element is None:
+392            return None
+393        return element.text
+394
+395    def set_generator(self, generator: str) -> None:
+396        """Set the signature of the software that generated this document.
+397
+398        Arguments:
+399
+400            generator -- str
+401
+402        Example::
+403
+404            >>> document.meta.set_generator("Odfdo experiment")
+405        """
+406        element = self.get_element("//meta:generator")
+407        if element is None:
+408            element = Element.from_tag("meta:generator")
+409            self.get_meta_body().append(element)
+410        element.text = generator
+411        self._generator_modified = True
+412
+413    def set_generator_default(self) -> None:
+414        """Set the signature of the software that generated this document
+415        to ourself.
+416
+417        Example::
+418
+419            >>> document.meta.set_generator_default()
+420        """
+421        if not self._generator_modified:
+422            self.set_generator(GENERATOR)
+423
+424    def get_statistic(self) -> dict[str, int] | None:
+425        """Get the statistic from the software that generated this document.
+426
+427        Return: dict (or None if inexistant)
+428
+429        Example::
+430
+431            >>> document.get_statistic():
+432            {'meta:table-count': 1,
+433             'meta:image-count': 2,
+434             'meta:object-count': 3,
+435             'meta:page-count': 4,
+436             'meta:paragraph-count': 5,
+437             'meta:word-count': 6,
+438             'meta:character-count': 7}
+439        """
+440        element = self.get_element("//meta:document-statistic")
+441        if element is None:
+442            return None
+443        statistic = {}
+444        for key, value in element.attributes.items():
+445            statistic[to_str(key)] = int(value)
+446        return statistic
+447
+448    def set_statistic(self, statistic: dict[str, int]) -> None:
+449        """Set the statistic for the documents: number of words, paragraphs,
+450        etc.
+451
+452        Arguments:
+453
+454            statistic -- dict
+455
+456        Example::
+457
+458            >>> statistic = {'meta:table-count': 1,
+459                             'meta:image-count': 2,
+460                             'meta:object-count': 3,
+461                             'meta:page-count': 4,
+462                             'meta:paragraph-count': 5,
+463                             'meta:word-count': 6,
+464                             'meta:character-count': 7}
+465            >>> document.meta.set_statistic(statistic)
+466        """
+467        if not isinstance(statistic, dict):
+468            raise TypeError("Statistic must be a dict")
+469        element = self.get_element("//meta:document-statistic")
+470        for key, value in statistic.items():
+471            try:
+472                ivalue = int(value)
+473            except ValueError as e:
+474                raise TypeError("Statistic value must be a int") from e
+475            element.set_attribute(to_str(key), str(ivalue))
+476
+477    def get_user_defined_metadata(self) -> dict[str, Any]:
+478        """Return a dict of str/value mapping.
+479
+480        Value types can be: Decimal, date, time, boolean or str.
+481        """
+482        result: dict[str, Any] = {}
+483        for item in self.get_elements("//meta:user-defined"):
+484            if not isinstance(item, Element):
+485                continue
+486            # Read the values
+487            name = item.get_attribute_string("meta:name")
+488            if name is None:
+489                continue
+490            value = self._get_meta_value(item)
+491            result[name] = value
+492        return result
+493
+494    def get_user_defined_metadata_of_name(self, keyname: str) -> dict[str, Any] | None:
+495        """Return the content of the user defined metadata of that name.
+496        Return None if no name matchs or a dic of fields.
+497
+498        Arguments:
+499
+500            name -- string, name (meta:name content)
+501        """
+502        result = {}
+503        found = False
+504        for item in self.get_elements("//meta:user-defined"):
+505            if not isinstance(item, Element):
+506                continue
+507            # Read the values
+508            name = item.get_attribute("meta:name")
+509            if name == keyname:
+510                found = True
+511                break
+512        if not found:
+513            return None
+514        result["name"] = name
+515        value, value_type, text = self._get_meta_value(item, full=True)  # type: ignore
+516        result["value"] = value
+517        result["value_type"] = value_type
+518        result["text"] = text
+519        return result
+520
+521    def set_user_defined_metadata(self, name: str, value: Any) -> None:
+522        if isinstance(value, bool):
+523            value_type = "boolean"
+524            value = "true" if value else "false"
+525        elif isinstance(value, (int, float, Decimal)):
+526            value_type = "float"
+527            value = str(value)
+528        elif isinstance(value, dtdate):
+529            value_type = "date"
+530            value = str(Date.encode(value))
+531        elif isinstance(value, datetime):
+532            value_type = "date"
+533            value = str(DateTime.encode(value))
+534        elif isinstance(value, str):
+535            value_type = "string"
+536        elif isinstance(value, timedelta):
+537            value_type = "time"
+538            value = str(Duration.encode(value))
+539        else:
+540            raise TypeError('unexpected type "%s" for value' % type(value))
+541        # Already the same element ?
+542        for metadata in self.get_elements("//meta:user-defined"):
+543            if not isinstance(metadata, Element):
+544                continue
+545            if metadata.get_attribute("meta:name") == name:
+546                break
+547        else:
+548            metadata = Element.from_tag("meta:user-defined")
+549            metadata.set_attribute("meta:name", name)
+550            self.get_meta_body().append(metadata)
+551        metadata.set_attribute("meta:value-type", value_type)
+552        metadata.text = value
+553
+554    def _get_meta_value(
+555        self, element: Element, full: bool = False
+556    ) -> Any | tuple[Any, str, str]:
+557        """get_value() deicated to the meta data part, for one meta element."""
+558        if full:
+559            return self._get_meta_value_full(element)
+560        else:
+561            return self._get_meta_value_full(element)[0]
+562
+563    @staticmethod
+564    def _get_meta_value_full(element: Element) -> tuple[Any, str, str]:
+565        """get_value deicated to the meta data part, for one meta element."""
+566        # name = element.get_attribute('meta:name')
+567        value_type = element.get_attribute_string("meta:value-type")
+568        if value_type is None:
+569            value_type = "string"
+570        text = element.text
+571        # Interpretation
+572        if value_type == "boolean":
+573            return (Boolean.decode(text), value_type, text)
+574        if value_type in ("float", "percentage", "currency"):
+575            return (Decimal(text), value_type, text)
+576        if value_type == "date":
+577            if "T" in text:
+578                return (DateTime.decode(text), value_type, text)
+579            else:
+580                return (Date.decode(text), value_type, text)
+581        if value_type == "string":
+582            return (text, value_type, text)
+583        if value_type == "time":
+584            return (Duration.decode(text), value_type, text)
+585        raise TypeError(f"Unknown value type: '{value_type!r}'")
+
+ + +

Representation of an XML part.

+ +

Abstraction of the XML library behind.

+
+ + +
+ +
+ + Meta(*args: Any, **kwargs: Any) + + + +
+ +
44    def __init__(self, *args: Any, **kwargs: Any) -> None:
+45        super().__init__(*args, **kwargs)
+46        self._generator_modified: bool = False
+
+ + + + +
+
+ +
+ + def + get_meta_body(self) -> Element: + + + +
+ +
48    def get_meta_body(self) -> Element:
+49        return self.get_element("//office:meta")
+
+ + + + +
+
+ +
+ + def + get_title(self) -> str | None: + + + +
+ +
51    def get_title(self) -> str | None:
+52        """Get the title of the document.
+53
+54        This is not the first heading but the title metadata.
+55
+56        Return: str (or None if inexistant)
+57        """
+58        element = self.get_element("//dc:title")
+59        if element is None:
+60            return None
+61        return element.text
+
+ + +

Get the title of the document.

+ +

This is not the first heading but the title metadata.

+ +

Return: str (or None if inexistant)

+
+ + +
+
+ +
+ + def + set_title(self, title: str) -> None: + + + +
+ +
63    def set_title(self, title: str) -> None:
+64        """Set the title of the document.
+65
+66        This is not the first heading but the title metadata.
+67
+68        Arguments:
+69
+70            title -- str
+71        """
+72        element = self.get_element("//dc:title")
+73        if element is None:
+74            element = Element.from_tag("dc:title")
+75            self.get_meta_body().append(element)
+76        element.text = title
+
+ + +

Set the title of the document.

+ +

This is not the first heading but the title metadata.

+ +

Arguments:

+ +
title -- str
+
+
+ + +
+
+ +
+ + def + get_description(self) -> str | None: + + + +
+ +
78    def get_description(self) -> str | None:
+79        """Get the description of the document. Also known as comments.
+80
+81        Return: str (or None if inexistant)
+82        """
+83        element = self.get_element("//dc:description")
+84        if element is None:
+85            return None
+86        return element.text
+
+ + +

Get the description of the document. Also known as comments.

+ +

Return: str (or None if inexistant)

+
+ + +
+
+ +
+ + def + get_comments(self) -> str | None: + + + +
+ +
78    def get_description(self) -> str | None:
+79        """Get the description of the document. Also known as comments.
+80
+81        Return: str (or None if inexistant)
+82        """
+83        element = self.get_element("//dc:description")
+84        if element is None:
+85            return None
+86        return element.text
+
+ + +

Get the description of the document. Also known as comments.

+ +

Return: str (or None if inexistant)

+
+ + +
+
+ +
+ + def + set_description(self, description: str) -> None: + + + +
+ +
 91    def set_description(self, description: str) -> None:
+ 92        """Set the description of the document. Also known as comments.
+ 93
+ 94        Arguments:
+ 95
+ 96            description -- str
+ 97        """
+ 98        element = self.get_element("//dc:description")
+ 99        if element is None:
+100            element = Element.from_tag("dc:description")
+101            self.get_meta_body().append(element)
+102        element.text = description
+
+ + +

Set the description of the document. Also known as comments.

+ +

Arguments:

+ +
description -- str
+
+
+ + +
+
+ +
+ + def + set_comments(self, description: str) -> None: + + + +
+ +
 91    def set_description(self, description: str) -> None:
+ 92        """Set the description of the document. Also known as comments.
+ 93
+ 94        Arguments:
+ 95
+ 96            description -- str
+ 97        """
+ 98        element = self.get_element("//dc:description")
+ 99        if element is None:
+100            element = Element.from_tag("dc:description")
+101            self.get_meta_body().append(element)
+102        element.text = description
+
+ + +

Set the description of the document. Also known as comments.

+ +

Arguments:

+ +
description -- str
+
+
+ + +
+
+ +
+ + def + get_subject(self) -> str | None: + + + +
+ +
106    def get_subject(self) -> str | None:
+107        """Get the subject of the document.
+108
+109        Return: str (or None if inexistant)
+110        """
+111        element = self.get_element("//dc:subject")
+112        if element is None:
+113            return None
+114        return element.text
+
+ + +

Get the subject of the document.

+ +

Return: str (or None if inexistant)

+
+ + +
+
+ +
+ + def + set_subject(self, subject: str) -> None: + + + +
+ +
116    def set_subject(self, subject: str) -> None:
+117        """Set the subject of the document.
+118
+119        Arguments:
+120
+121            subject -- str
+122        """
+123        element = self.get_element("//dc:subject")
+124        if element is None:
+125            element = Element.from_tag("dc:subject")
+126            self.get_meta_body().append(element)
+127        element.text = subject
+
+ + +

Set the subject of the document.

+ +

Arguments:

+ +
subject -- str
+
+
+ + +
+
+ +
+ + def + get_language(self) -> str | None: + + + +
+ +
129    def get_language(self) -> str | None:
+130        """Get the language code of the document.
+131
+132        Return: str (or None if inexistant)
+133
+134        Example::
+135
+136            >>> document.meta.get_language()
+137            fr-FR
+138        """
+139        element = self.get_element("//dc:language")
+140        if element is None:
+141            return None
+142        return element.text
+
+ + +

Get the language code of the document.

+ +

Return: str (or None if inexistant)

+ +

Example::

+ +
>>> document.meta.get_language()
+fr-FR
+
+
+ + +
+
+ +
+ + def + set_language(self, language: str) -> None: + + + +
+ +
144    def set_language(self, language: str) -> None:
+145        """Set the language code of the document.
+146
+147        Arguments:
+148
+149            language -- str
+150
+151        Example::
+152
+153            >>> document.meta.set_language('fr-FR')
+154        """
+155        language = str(language)
+156        if not self._is_RFC3066(language):
+157            raise TypeError(
+158                'Language must be "xx" lang or "xx-YY" lang-COUNTRY code (RFC3066)'
+159            )
+160        element = self.get_element("//dc:language")
+161        if element is None:
+162            element = Element.from_tag("dc:language")
+163            self.get_meta_body().append(element)
+164        element.text = language
+
+ + +

Set the language code of the document.

+ +

Arguments:

+ +
language -- str
+
+ +

Example::

+ +
>>> document.meta.set_language('fr-FR')
+
+
+ + +
+
+ +
+ + def + get_modification_date(self) -> datetime.datetime | None: + + + +
+ +
187    def get_modification_date(self) -> datetime | None:
+188        """Get the last modified date of the document.
+189
+190        Return: datetime (or None if inexistant)
+191        """
+192        element = self.get_element("//dc:date")
+193        if element is None:
+194            return None
+195        modification_date = element.text
+196        return DateTime.decode(modification_date)
+
+ + +

Get the last modified date of the document.

+ +

Return: datetime (or None if inexistant)

+
+ + +
+
+ +
+ + def + set_modification_date(self, date: datetime.datetime) -> None: + + + +
+ +
198    def set_modification_date(self, date: datetime) -> None:
+199        """Set the last modified date of the document.
+200
+201        Arguments:
+202
+203            date -- datetime
+204        """
+205        element = self.get_element("//dc:date")
+206        if element is None:
+207            element = Element.from_tag("dc:date")
+208            self.get_meta_body().append(element)
+209        element.text = DateTime.encode(date)
+
+ + +

Set the last modified date of the document.

+ +

Arguments:

+ +
date -- datetime
+
+
+ + +
+
+ +
+ + def + get_creation_date(self) -> datetime.datetime | None: + + + +
+ +
211    def get_creation_date(self) -> datetime | None:
+212        """Get the creation date of the document.
+213
+214        Return: datetime (or None if inexistant)
+215        """
+216        element = self.get_element("//meta:creation-date")
+217        if element is None:
+218            return None
+219        creation_date = element.text
+220        return DateTime.decode(creation_date)
+
+ + +

Get the creation date of the document.

+ +

Return: datetime (or None if inexistant)

+
+ + +
+
+ +
+ + def + set_creation_date(self, date: datetime.datetime) -> None: + + + +
+ +
222    def set_creation_date(self, date: datetime) -> None:
+223        """Set the creation date of the document.
+224
+225        Arguments:
+226
+227            date -- datetime
+228        """
+229        element = self.get_element("//meta:creation-date")
+230        if element is None:
+231            element = Element.from_tag("meta:creation-date")
+232            self.get_meta_body().append(element)
+233        element.text = DateTime.encode(date)
+
+ + +

Set the creation date of the document.

+ +

Arguments:

+ +
date -- datetime
+
+
+ + +
+
+ +
+ + def + get_initial_creator(self) -> str | None: + + + +
+ +
235    def get_initial_creator(self) -> str | None:
+236        """Get the first creator of the document.
+237
+238        Return: str (or None if inexistant)
+239
+240        Example::
+241
+242            >>> document.meta.get_initial_creator()
+243            Unknown
+244        """
+245        element = self.get_element("//meta:initial-creator")
+246        if element is None:
+247            return None
+248        return element.text
+
+ + +

Get the first creator of the document.

+ +

Return: str (or None if inexistant)

+ +

Example::

+ +
>>> document.meta.get_initial_creator()
+Unknown
+
+
+ + +
+
+ +
+ + def + set_initial_creator(self, creator: str) -> None: + + + +
+ +
250    def set_initial_creator(self, creator: str) -> None:
+251        """Set the first creator of the document.
+252
+253        Arguments:
+254
+255            creator -- str
+256
+257        Example::
+258
+259            >>> document.meta.set_initial_creator("Plato")
+260        """
+261        element = self.get_element("//meta:initial-creator")
+262        if element is None:
+263            element = Element.from_tag("meta:initial-creator")
+264            self.get_meta_body().append(element)
+265        element.text = creator
+
+ + +

Set the first creator of the document.

+ +

Arguments:

+ +
creator -- str
+
+ +

Example::

+ +
>>> document.meta.set_initial_creator("Plato")
+
+
+ + +
+
+ +
+ + def + get_creator(self) -> str | None: + + + +
+ +
267    def get_creator(self) -> str | None:
+268        """Get the creator of the document.
+269
+270        Return: str (or None if inexistant)
+271
+272        Example::
+273
+274            >>> document.meta.get_creator()
+275            Unknown
+276        """
+277        element = self.get_element("//dc:creator")
+278        if element is None:
+279            return None
+280        return element.text
+
+ + +

Get the creator of the document.

+ +

Return: str (or None if inexistant)

+ +

Example::

+ +
>>> document.meta.get_creator()
+Unknown
+
+
+ + +
+
+ +
+ + def + set_creator(self, creator: str) -> None: + + + +
+ +
282    def set_creator(self, creator: str) -> None:
+283        """Set the creator of the document.
+284
+285        Arguments:
+286
+287            creator -- str
+288
+289        Example::
+290
+291            >>> document.meta.set_creator("Plato")
+292        """
+293        element = self.get_element("//dc:creator")
+294        if element is None:
+295            element = Element.from_tag("dc:creator")
+296            self.get_meta_body().append(element)
+297        element.text = creator
+
+ + +

Set the creator of the document.

+ +

Arguments:

+ +
creator -- str
+
+ +

Example::

+ +
>>> document.meta.set_creator("Plato")
+
+
+ + +
+
+ +
+ + def + get_keywords(self) -> str | None: + + + +
+ +
299    def get_keywords(self) -> str | None:
+300        """Get the keywords of the document. Return the field as-is, without
+301        any assumption on the keyword separator.
+302
+303        Return: str (or None if inexistant)
+304        """
+305        element = self.get_element("//meta:keyword")
+306        if element is None:
+307            return None
+308        return element.text
+
+ + +

Get the keywords of the document. Return the field as-is, without +any assumption on the keyword separator.

+ +

Return: str (or None if inexistant)

+
+ + +
+
+ +
+ + def + set_keywords(self, keywords: str) -> None: + + + +
+ +
310    def set_keywords(self, keywords: str) -> None:
+311        """Set the keywords of the document. Although the name is plural, a
+312        str string is required, so join your list first.
+313
+314        Arguments:
+315
+316            keywords -- str
+317        """
+318        element = self.get_element("//meta:keyword")
+319        if element is None:
+320            element = Element.from_tag("meta:keyword")
+321            self.get_meta_body().append(element)
+322        element.text = keywords
+
+ + +

Set the keywords of the document. Although the name is plural, a +str string is required, so join your list first.

+ +

Arguments:

+ +
keywords -- str
+
+
+ + +
+
+ +
+ + def + get_editing_duration(self) -> datetime.timedelta | None: + + + +
+ +
324    def get_editing_duration(self) -> timedelta | None:
+325        """Get the time the document was edited, as reported by the
+326        generator.
+327
+328        Return: timedelta (or None if inexistant)
+329        """
+330        element = self.get_element("//meta:editing-duration")
+331        if element is None:
+332            return None
+333        duration = element.text
+334        return Duration.decode(duration)
+
+ + +

Get the time the document was edited, as reported by the +generator.

+ +

Return: timedelta (or None if inexistant)

+
+ + +
+
+ +
+ + def + set_editing_duration(self, duration: datetime.timedelta) -> None: + + + +
+ +
336    def set_editing_duration(self, duration: timedelta) -> None:
+337        """Set the time the document was edited.
+338
+339        Arguments:
+340
+341            duration -- timedelta
+342        """
+343        if not isinstance(duration, timedelta):
+344            raise TypeError("duration must be a timedelta")
+345        element = self.get_element("//meta:editing-duration")
+346        if element is None:
+347            element = Element.from_tag("meta:editing-duration")
+348            self.get_meta_body().append(element)
+349        element.text = Duration.encode(duration)
+
+ + +

Set the time the document was edited.

+ +

Arguments:

+ +
duration -- timedelta
+
+
+ + +
+
+ +
+ + def + get_editing_cycles(self) -> int | None: + + + +
+ +
351    def get_editing_cycles(self) -> int | None:
+352        """Get the number of times the document was edited, as reported by
+353        the generator.
+354
+355        Return: int (or None if inexistant)
+356        """
+357        element = self.get_element("//meta:editing-cycles")
+358        if element is None:
+359            return None
+360        cycles = element.text
+361        return int(cycles)
+
+ + +

Get the number of times the document was edited, as reported by +the generator.

+ +

Return: int (or None if inexistant)

+
+ + +
+
+ +
+ + def + set_editing_cycles(self, cycles: int) -> None: + + + +
+ +
363    def set_editing_cycles(self, cycles: int) -> None:
+364        """Set the number of times the document was edited.
+365
+366        Arguments:
+367
+368            cycles -- int
+369        """
+370        if not isinstance(cycles, int):
+371            raise TypeError("cycles must be an int")
+372        if cycles < 1:
+373            raise ValueError("cycles must be a positive int")
+374        element = self.get_element("//meta:editing-cycles")
+375        if element is None:
+376            element = Element.from_tag("meta:editing-cycles")
+377            self.get_meta_body().append(element)
+378        element.text = str(cycles)
+
+ + +

Set the number of times the document was edited.

+ +

Arguments:

+ +
cycles -- int
+
+
+ + +
+
+ +
+ + def + get_generator(self) -> str | None: + + + +
+ +
380    def get_generator(self) -> str | None:
+381        """Get the signature of the software that generated this document.
+382
+383        Return: str (or None if inexistant)
+384
+385        Example::
+386
+387            >>> document.meta.get_generator()
+388            KOffice/2.0.0
+389        """
+390        element = self.get_element("//meta:generator")
+391        if element is None:
+392            return None
+393        return element.text
+
+ + +

Get the signature of the software that generated this document.

+ +

Return: str (or None if inexistant)

+ +

Example::

+ +
>>> document.meta.get_generator()
+KOffice/2.0.0
+
+
+ + +
+
+ +
+ + def + set_generator(self, generator: str) -> None: + + + +
+ +
395    def set_generator(self, generator: str) -> None:
+396        """Set the signature of the software that generated this document.
+397
+398        Arguments:
+399
+400            generator -- str
+401
+402        Example::
+403
+404            >>> document.meta.set_generator("Odfdo experiment")
+405        """
+406        element = self.get_element("//meta:generator")
+407        if element is None:
+408            element = Element.from_tag("meta:generator")
+409            self.get_meta_body().append(element)
+410        element.text = generator
+411        self._generator_modified = True
+
+ + +

Set the signature of the software that generated this document.

+ +

Arguments:

+ +
generator -- str
+
+ +

Example::

+ +
>>> document.meta.set_generator("Odfdo experiment")
+
+
+ + +
+
+ +
+ + def + set_generator_default(self) -> None: + + + +
+ +
413    def set_generator_default(self) -> None:
+414        """Set the signature of the software that generated this document
+415        to ourself.
+416
+417        Example::
+418
+419            >>> document.meta.set_generator_default()
+420        """
+421        if not self._generator_modified:
+422            self.set_generator(GENERATOR)
+
+ + +

Set the signature of the software that generated this document +to ourself.

+ +

Example::

+ +
>>> document.meta.set_generator_default()
+
+
+ + +
+
+ +
+ + def + get_statistic(self) -> dict[str, int] | None: + + + +
+ +
424    def get_statistic(self) -> dict[str, int] | None:
+425        """Get the statistic from the software that generated this document.
+426
+427        Return: dict (or None if inexistant)
+428
+429        Example::
+430
+431            >>> document.get_statistic():
+432            {'meta:table-count': 1,
+433             'meta:image-count': 2,
+434             'meta:object-count': 3,
+435             'meta:page-count': 4,
+436             'meta:paragraph-count': 5,
+437             'meta:word-count': 6,
+438             'meta:character-count': 7}
+439        """
+440        element = self.get_element("//meta:document-statistic")
+441        if element is None:
+442            return None
+443        statistic = {}
+444        for key, value in element.attributes.items():
+445            statistic[to_str(key)] = int(value)
+446        return statistic
+
+ + +

Get the statistic from the software that generated this document.

+ +

Return: dict (or None if inexistant)

+ +

Example::

+ +
>>> document.get_statistic():
+{'meta:table-count': 1,
+ 'meta:image-count': 2,
+ 'meta:object-count': 3,
+ 'meta:page-count': 4,
+ 'meta:paragraph-count': 5,
+ 'meta:word-count': 6,
+ 'meta:character-count': 7}
+
+
+ + +
+
+ +
+ + def + set_statistic(self, statistic: dict[str, int]) -> None: + + + +
+ +
448    def set_statistic(self, statistic: dict[str, int]) -> None:
+449        """Set the statistic for the documents: number of words, paragraphs,
+450        etc.
+451
+452        Arguments:
+453
+454            statistic -- dict
+455
+456        Example::
+457
+458            >>> statistic = {'meta:table-count': 1,
+459                             'meta:image-count': 2,
+460                             'meta:object-count': 3,
+461                             'meta:page-count': 4,
+462                             'meta:paragraph-count': 5,
+463                             'meta:word-count': 6,
+464                             'meta:character-count': 7}
+465            >>> document.meta.set_statistic(statistic)
+466        """
+467        if not isinstance(statistic, dict):
+468            raise TypeError("Statistic must be a dict")
+469        element = self.get_element("//meta:document-statistic")
+470        for key, value in statistic.items():
+471            try:
+472                ivalue = int(value)
+473            except ValueError as e:
+474                raise TypeError("Statistic value must be a int") from e
+475            element.set_attribute(to_str(key), str(ivalue))
+
+ + +

Set the statistic for the documents: number of words, paragraphs, +etc.

+ +

Arguments:

+ +
statistic -- dict
+
+ +

Example::

+ +
>>> statistic = {'meta:table-count': 1,
+                 'meta:image-count': 2,
+                 'meta:object-count': 3,
+                 'meta:page-count': 4,
+                 'meta:paragraph-count': 5,
+                 'meta:word-count': 6,
+                 'meta:character-count': 7}
+>>> document.meta.set_statistic(statistic)
+
+
+ + +
+
+ +
+ + def + get_user_defined_metadata(self) -> dict[str, typing.Any]: + + + +
+ +
477    def get_user_defined_metadata(self) -> dict[str, Any]:
+478        """Return a dict of str/value mapping.
+479
+480        Value types can be: Decimal, date, time, boolean or str.
+481        """
+482        result: dict[str, Any] = {}
+483        for item in self.get_elements("//meta:user-defined"):
+484            if not isinstance(item, Element):
+485                continue
+486            # Read the values
+487            name = item.get_attribute_string("meta:name")
+488            if name is None:
+489                continue
+490            value = self._get_meta_value(item)
+491            result[name] = value
+492        return result
+
+ + +

Return a dict of str/value mapping.

+ +

Value types can be: Decimal, date, time, boolean or str.

+
+ + +
+
+ +
+ + def + get_user_defined_metadata_of_name(self, keyname: str) -> dict[str, typing.Any] | None: + + + +
+ +
494    def get_user_defined_metadata_of_name(self, keyname: str) -> dict[str, Any] | None:
+495        """Return the content of the user defined metadata of that name.
+496        Return None if no name matchs or a dic of fields.
+497
+498        Arguments:
+499
+500            name -- string, name (meta:name content)
+501        """
+502        result = {}
+503        found = False
+504        for item in self.get_elements("//meta:user-defined"):
+505            if not isinstance(item, Element):
+506                continue
+507            # Read the values
+508            name = item.get_attribute("meta:name")
+509            if name == keyname:
+510                found = True
+511                break
+512        if not found:
+513            return None
+514        result["name"] = name
+515        value, value_type, text = self._get_meta_value(item, full=True)  # type: ignore
+516        result["value"] = value
+517        result["value_type"] = value_type
+518        result["text"] = text
+519        return result
+
+ + +

Return the content of the user defined metadata of that name. +Return None if no name matchs or a dic of fields.

+ +

Arguments:

+ +
name -- string, name (meta:name content)
+
+
+ + +
+
+ +
+ + def + set_user_defined_metadata(self, name: str, value: Any) -> None: + + + +
+ +
521    def set_user_defined_metadata(self, name: str, value: Any) -> None:
+522        if isinstance(value, bool):
+523            value_type = "boolean"
+524            value = "true" if value else "false"
+525        elif isinstance(value, (int, float, Decimal)):
+526            value_type = "float"
+527            value = str(value)
+528        elif isinstance(value, dtdate):
+529            value_type = "date"
+530            value = str(Date.encode(value))
+531        elif isinstance(value, datetime):
+532            value_type = "date"
+533            value = str(DateTime.encode(value))
+534        elif isinstance(value, str):
+535            value_type = "string"
+536        elif isinstance(value, timedelta):
+537            value_type = "time"
+538            value = str(Duration.encode(value))
+539        else:
+540            raise TypeError('unexpected type "%s" for value' % type(value))
+541        # Already the same element ?
+542        for metadata in self.get_elements("//meta:user-defined"):
+543            if not isinstance(metadata, Element):
+544                continue
+545            if metadata.get_attribute("meta:name") == name:
+546                break
+547        else:
+548            metadata = Element.from_tag("meta:user-defined")
+549            metadata.set_attribute("meta:name", name)
+550            self.get_meta_body().append(metadata)
+551        metadata.set_attribute("meta:value-type", value_type)
+552        metadata.text = value
+
+ + + + +
+
+
Inherited Members
+
+ +
+
+
+
+
+ NEXT_SIBLING = +2 + + +
+ + + + +
+
+ +
+ + class + NamedRange(odfdo.Element): + + + +
+ +
2844class NamedRange(Element):
+2845    """ODF Named Range "table:named-range". Identifies inside the spreadsheet
+2846    a range of cells of a table by a name and the name of the table.
+2847
+2848    Name Ranges have the following attributes:
+2849
+2850        name -- name of the named range
+2851
+2852        table_name -- name of the table
+2853
+2854        start -- first cell of the named range, tuple (x, y)
+2855
+2856        end -- last cell of the named range, tuple (x, y)
+2857
+2858        crange -- range of the named range, tuple (x, y, z, t)
+2859
+2860        usage -- None or str, usage of the named range.
+2861    """
+2862
+2863    _tag = "table:named-range"
+2864
+2865    def __init__(
+2866        self,
+2867        name: str | None = None,
+2868        crange: str | tuple | list | None = None,
+2869        table_name: str | None = None,
+2870        usage: str | None = None,
+2871        **kwargs: Any,
+2872    ) -> None:
+2873        """Create a Named Range element. 'name' must contains only letters, digits
+2874           and '_', and must not be like a coordinate as 'A1'. 'table_name' must be
+2875           a correct table name (no "'" or "/" in it).
+2876
+2877        Arguments:
+2878
+2879             name -- str, name of the named range
+2880
+2881             crange -- str or tuple of int, cell or area coordinate
+2882
+2883             table_name -- str, name of the table
+2884
+2885             usage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
+2886        """
+2887        super().__init__(**kwargs)
+2888        self.usage = None
+2889        if self._do_init:
+2890            self.name = name or ""
+2891            self.table_name = _table_name_check(table_name)
+2892            self.set_range(crange or "")
+2893            self.set_usage(usage)
+2894        cell_range_address = self.get_attribute_string("table:cell-range-address") or ""
+2895        if not cell_range_address:
+2896            self.table_name = ""
+2897            self.start = None
+2898            self.end = None
+2899            self.crange = None
+2900            self.usage = None
+2901            return
+2902        self.usage = self.get_attribute("table:range-usable-as")
+2903        name_range = cell_range_address.replace("$", "")
+2904        name, crange = name_range.split(".", 1)
+2905        if name.startswith("'") and name.endswith("'"):
+2906            name = name[1:-1]
+2907        self.table_name = name
+2908        crange = crange.replace(".", "")
+2909        self._set_range(crange)
+2910
+2911    def set_usage(self, usage: str | None = None) -> None:
+2912        """Set the usage of the Named Range. Usage can be None (default) or one
+2913        of :
+2914            'print-range'
+2915            'filter'
+2916            'repeat-column'
+2917            'repeat-row'
+2918
+2919        Arguments:
+2920
+2921            usage -- None or str
+2922        """
+2923        if usage is not None:
+2924            usage = usage.strip().lower()
+2925            if usage not in ("print-range", "filter", "repeat-column", "repeat-row"):
+2926                usage = None
+2927        if usage is None:
+2928            with contextlib.suppress(KeyError):
+2929                self.del_attribute("table:range-usable-as")
+2930            self.usage = None
+2931        else:
+2932            self.set_attribute("table:range-usable-as", usage)
+2933            self.usage = usage
+2934
+2935    @property
+2936    def name(self) -> str | None:
+2937        """Get / set the name of the table."""
+2938        return self.get_attribute_string("table:name")
+2939
+2940    @name.setter
+2941    def name(self, name: str) -> None:
+2942        """Set the name of the Named Range. The name is mandatory, if a Named
+2943        Range of the same name exists, it will be replaced. Name must contains
+2944        only alphanumerics characters and '_', and can not be of a cell
+2945        coordinates form like 'AB12'.
+2946
+2947        Arguments:
+2948
+2949            name -- str
+2950        """
+2951        name = name.strip()
+2952        if not name:
+2953            raise ValueError("Name required.")
+2954        for x in name:
+2955            if x in forbidden_in_named_range():
+2956                raise ValueError(f"Character forbidden '{x}' ")
+2957        step = ""
+2958        for x in name:
+2959            if x in string.ascii_letters and step in ("", "A"):
+2960                step = "A"
+2961                continue
+2962            elif step in ("A", "A1") and x in string.digits:
+2963                step = "A1"
+2964                continue
+2965            else:
+2966                step = ""
+2967                break
+2968        if step == "A1":
+2969            raise ValueError("Name of the type 'ABC123' is not allowed.")
+2970        with contextlib.suppress(Exception):
+2971            # we are not on an inserted in a document.
+2972            body = self.document_body
+2973            named_range = body.get_named_range(name)  # type: ignore
+2974            if named_range:
+2975                named_range.delete()
+2976        self.set_attribute("table:name", name)
+2977
+2978    def set_table_name(self, name: str) -> None:
+2979        """Set the name of the table of the Named Range. The name is mandatory.
+2980
+2981        Arguments:
+2982
+2983            name -- str
+2984        """
+2985        self.table_name = _table_name_check(name)
+2986        self._update_attributes()
+2987
+2988    def _set_range(self, coord: tuple | list | str) -> None:
+2989        digits = convert_coordinates(coord)
+2990        if len(digits) == 4:
+2991            x, y, z, t = digits
+2992        else:
+2993            x, y = digits
+2994            z, t = digits
+2995        self.start = x, y  # type: ignore
+2996        self.end = z, t  # type: ignore
+2997        self.crange = x, y, z, t  # type: ignore
+2998
+2999    def set_range(self, crange: str | tuple | list) -> None:
+3000        """Set the range of the named range. Range can be either one cell
+3001        (like 'A1') or an area ('A1:B2'). It can be provided as an alpha numeric
+3002        value like "A1:B2' or a tuple like (0, 0, 1, 1) or (0, 0).
+3003
+3004        Arguments:
+3005
+3006            crange -- str or tuple of int, cell or area coordinate
+3007        """
+3008        self._set_range(crange)
+3009        self._update_attributes()
+3010
+3011    def _update_attributes(self) -> None:
+3012        self.set_attribute("table:base-cell-address", self._make_base_cell_address())
+3013        self.set_attribute("table:cell-range-address", self._make_cell_range_address())
+3014
+3015    def _make_base_cell_address(self) -> str:
+3016        # assuming we got table_name and range
+3017        if " " in self.table_name:
+3018            name = f"'{self.table_name}'"
+3019        else:
+3020            name = self.table_name
+3021        return f"${name}.${digit_to_alpha(self.start[0])}${self.start[1] + 1}"  # type: ignore
+3022
+3023    def _make_cell_range_address(self) -> str:
+3024        # assuming we got table_name and range
+3025        if " " in self.table_name:
+3026            name = f"'{self.table_name}'"
+3027        else:
+3028            name = self.table_name
+3029        if self.start == self.end:
+3030            return self._make_base_cell_address()
+3031        return (
+3032            f"${name}.${digit_to_alpha(self.start[0])}${self.start[1] + 1}:"  # type: ignore
+3033            f".${digit_to_alpha(self.end[0])}${self.end[1] + 1}"  # type: ignore
+3034        )
+3035
+3036    def get_values(
+3037        self,
+3038        cell_type: str | None = None,
+3039        complete: bool = True,
+3040        get_type: bool = False,
+3041        flat: bool = False,
+3042    ) -> list:
+3043        """Shortcut to retrieve the values of the cells of the named range. See
+3044        table.get_values() for the arguments description and return format.
+3045        """
+3046        body = self.document_body
+3047        if not body:
+3048            raise ValueError("Table is not inside a document.")
+3049        table = body.get_table(name=self.table_name)
+3050        if table is None:
+3051            raise ValueError
+3052        return table.get_values(self.crange, cell_type, complete, get_type, flat)  # type: ignore
+3053
+3054    def get_value(self, get_type: bool = False) -> Any:
+3055        """Shortcut to retrieve the value of the first cell of the named range.
+3056        See table.get_value() for the arguments description and return format.
+3057        """
+3058        body = self.document_body
+3059        if not body:
+3060            raise ValueError("Table is not inside a document.")
+3061        table = body.get_table(name=self.table_name)
+3062        if table is None:
+3063            raise ValueError
+3064        return table.get_value(self.start, get_type)  # type: ignore
+3065
+3066    def set_values(
+3067        self,
+3068        values: list,
+3069        style: str | None = None,
+3070        cell_type: str | None = None,
+3071        currency: str | None = None,
+3072    ) -> None:
+3073        """Shortcut to set the values of the cells of the named range.
+3074        See table.set_values() for the arguments description.
+3075        """
+3076        body = self.document_body
+3077        if not body:
+3078            raise ValueError("Table is not inside a document.")
+3079        table = body.get_table(name=self.table_name)
+3080        if table is None:
+3081            raise ValueError
+3082        table.set_values(  # type: ignore
+3083            values,
+3084            coord=self.crange,
+3085            style=style,
+3086            cell_type=cell_type,
+3087            currency=currency,
+3088        )
+3089
+3090    def set_value(
+3091        self,
+3092        value: Any,
+3093        cell_type: str | None = None,
+3094        currency: str | None = None,
+3095        style: str | None = None,
+3096    ) -> None:
+3097        """Shortcut to set the value of the first cell of the named range.
+3098        See table.set_value() for the arguments description.
+3099        """
+3100        body = self.document_body
+3101        if not body:
+3102            raise ValueError("Table is not inside a document.")
+3103        table = body.get_table(name=self.table_name)
+3104        if table is None:
+3105            raise ValueError
+3106        table.set_value(  # type: ignore
+3107            coord=self.start,
+3108            value=value,
+3109            cell_type=cell_type,
+3110            currency=currency,
+3111            style=style,
+3112        )
+
+ + +

ODF Named Range "table:named-range". Identifies inside the spreadsheet +a range of cells of a table by a name and the name of the table.

+ +

Name Ranges have the following attributes:

+ +
name -- name of the named range
+
+table_name -- name of the table
+
+start -- first cell of the named range, tuple (x, y)
+
+end -- last cell of the named range, tuple (x, y)
+
+crange -- range of the named range, tuple (x, y, z, t)
+
+usage -- None or str, usage of the named range.
+
+
+ + +
+ +
+ + NamedRange( name: str | None = None, crange: str | tuple | list | None = None, table_name: str | None = None, usage: str | None = None, **kwargs: Any) + + + +
+ +
2865    def __init__(
+2866        self,
+2867        name: str | None = None,
+2868        crange: str | tuple | list | None = None,
+2869        table_name: str | None = None,
+2870        usage: str | None = None,
+2871        **kwargs: Any,
+2872    ) -> None:
+2873        """Create a Named Range element. 'name' must contains only letters, digits
+2874           and '_', and must not be like a coordinate as 'A1'. 'table_name' must be
+2875           a correct table name (no "'" or "/" in it).
+2876
+2877        Arguments:
+2878
+2879             name -- str, name of the named range
+2880
+2881             crange -- str or tuple of int, cell or area coordinate
+2882
+2883             table_name -- str, name of the table
+2884
+2885             usage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
+2886        """
+2887        super().__init__(**kwargs)
+2888        self.usage = None
+2889        if self._do_init:
+2890            self.name = name or ""
+2891            self.table_name = _table_name_check(table_name)
+2892            self.set_range(crange or "")
+2893            self.set_usage(usage)
+2894        cell_range_address = self.get_attribute_string("table:cell-range-address") or ""
+2895        if not cell_range_address:
+2896            self.table_name = ""
+2897            self.start = None
+2898            self.end = None
+2899            self.crange = None
+2900            self.usage = None
+2901            return
+2902        self.usage = self.get_attribute("table:range-usable-as")
+2903        name_range = cell_range_address.replace("$", "")
+2904        name, crange = name_range.split(".", 1)
+2905        if name.startswith("'") and name.endswith("'"):
+2906            name = name[1:-1]
+2907        self.table_name = name
+2908        crange = crange.replace(".", "")
+2909        self._set_range(crange)
+
+ + +

Create a Named Range element. 'name' must contains only letters, digits + and '_', and must not be like a coordinate as 'A1'. 'table_name' must be + a correct table name (no "'" or "/" in it).

+ +

Arguments:

+ +
 name -- str, name of the named range
+
+ crange -- str or tuple of int, cell or area coordinate
+
+ table_name -- str, name of the table
+
+ usage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
+
+
+ + +
+
+
+ usage + + +
+ + + + +
+
+
+ table_name + + +
+ + + + +
+
+ +
+ + def + set_usage(self, usage: str | None = None) -> None: + + + +
+ +
2911    def set_usage(self, usage: str | None = None) -> None:
+2912        """Set the usage of the Named Range. Usage can be None (default) or one
+2913        of :
+2914            'print-range'
+2915            'filter'
+2916            'repeat-column'
+2917            'repeat-row'
+2918
+2919        Arguments:
+2920
+2921            usage -- None or str
+2922        """
+2923        if usage is not None:
+2924            usage = usage.strip().lower()
+2925            if usage not in ("print-range", "filter", "repeat-column", "repeat-row"):
+2926                usage = None
+2927        if usage is None:
+2928            with contextlib.suppress(KeyError):
+2929                self.del_attribute("table:range-usable-as")
+2930            self.usage = None
+2931        else:
+2932            self.set_attribute("table:range-usable-as", usage)
+2933            self.usage = usage
+
+ + +

Set the usage of the Named Range. Usage can be None (default) or one +of : + 'print-range' + 'filter' + 'repeat-column' + 'repeat-row'

+ +

Arguments:

+ +
usage -- None or str
+
+
+ + +
+
+ +
+ name: str | None + + + +
+ +
2935    @property
+2936    def name(self) -> str | None:
+2937        """Get / set the name of the table."""
+2938        return self.get_attribute_string("table:name")
+
+ + +

Get / set the name of the table.

+
+ + +
+
+ +
+ + def + set_table_name(self, name: str) -> None: + + + +
+ +
2978    def set_table_name(self, name: str) -> None:
+2979        """Set the name of the table of the Named Range. The name is mandatory.
+2980
+2981        Arguments:
+2982
+2983            name -- str
+2984        """
+2985        self.table_name = _table_name_check(name)
+2986        self._update_attributes()
+
+ + +

Set the name of the table of the Named Range. The name is mandatory.

+ +

Arguments:

+ +
name -- str
+
+
+ + +
+
+ +
+ + def + set_range(self, crange: str | tuple | list) -> None: + + + +
+ +
2999    def set_range(self, crange: str | tuple | list) -> None:
+3000        """Set the range of the named range. Range can be either one cell
+3001        (like 'A1') or an area ('A1:B2'). It can be provided as an alpha numeric
+3002        value like "A1:B2' or a tuple like (0, 0, 1, 1) or (0, 0).
+3003
+3004        Arguments:
+3005
+3006            crange -- str or tuple of int, cell or area coordinate
+3007        """
+3008        self._set_range(crange)
+3009        self._update_attributes()
+
+ + +

Set the range of the named range. Range can be either one cell +(like 'A1') or an area ('A1:B2'). It can be provided as an alpha numeric +value like "A1:B2' or a tuple like (0, 0, 1, 1) or (0, 0).

+ +

Arguments:

+ +
crange -- str or tuple of int, cell or area coordinate
+
+
+ + +
+
+ +
+ + def + get_values( self, cell_type: str | None = None, complete: bool = True, get_type: bool = False, flat: bool = False) -> list: + + + +
+ +
3036    def get_values(
+3037        self,
+3038        cell_type: str | None = None,
+3039        complete: bool = True,
+3040        get_type: bool = False,
+3041        flat: bool = False,
+3042    ) -> list:
+3043        """Shortcut to retrieve the values of the cells of the named range. See
+3044        table.get_values() for the arguments description and return format.
+3045        """
+3046        body = self.document_body
+3047        if not body:
+3048            raise ValueError("Table is not inside a document.")
+3049        table = body.get_table(name=self.table_name)
+3050        if table is None:
+3051            raise ValueError
+3052        return table.get_values(self.crange, cell_type, complete, get_type, flat)  # type: ignore
+
+ + +

Shortcut to retrieve the values of the cells of the named range. See +table.get_values() for the arguments description and return format.

+
+ + +
+
+ +
+ + def + get_value(self, get_type: bool = False) -> Any: + + + +
+ +
3054    def get_value(self, get_type: bool = False) -> Any:
+3055        """Shortcut to retrieve the value of the first cell of the named range.
+3056        See table.get_value() for the arguments description and return format.
+3057        """
+3058        body = self.document_body
+3059        if not body:
+3060            raise ValueError("Table is not inside a document.")
+3061        table = body.get_table(name=self.table_name)
+3062        if table is None:
+3063            raise ValueError
+3064        return table.get_value(self.start, get_type)  # type: ignore
+
+ + +

Shortcut to retrieve the value of the first cell of the named range. +See table.get_value() for the arguments description and return format.

+
+ + +
+
+ +
+ + def + set_values( self, values: list, style: str | None = None, cell_type: str | None = None, currency: str | None = None) -> None: + + + +
+ +
3066    def set_values(
+3067        self,
+3068        values: list,
+3069        style: str | None = None,
+3070        cell_type: str | None = None,
+3071        currency: str | None = None,
+3072    ) -> None:
+3073        """Shortcut to set the values of the cells of the named range.
+3074        See table.set_values() for the arguments description.
+3075        """
+3076        body = self.document_body
+3077        if not body:
+3078            raise ValueError("Table is not inside a document.")
+3079        table = body.get_table(name=self.table_name)
+3080        if table is None:
+3081            raise ValueError
+3082        table.set_values(  # type: ignore
+3083            values,
+3084            coord=self.crange,
+3085            style=style,
+3086            cell_type=cell_type,
+3087            currency=currency,
+3088        )
+
+ + +

Shortcut to set the values of the cells of the named range. +See table.set_values() for the arguments description.

+
+ + +
+
+ +
+ + def + set_value( self, value: Any, cell_type: str | None = None, currency: str | None = None, style: str | None = None) -> None: + + + +
+ +
3090    def set_value(
+3091        self,
+3092        value: Any,
+3093        cell_type: str | None = None,
+3094        currency: str | None = None,
+3095        style: str | None = None,
+3096    ) -> None:
+3097        """Shortcut to set the value of the first cell of the named range.
+3098        See table.set_value() for the arguments description.
+3099        """
+3100        body = self.document_body
+3101        if not body:
+3102            raise ValueError("Table is not inside a document.")
+3103        table = body.get_table(name=self.table_name)
+3104        if table is None:
+3105            raise ValueError
+3106        table.set_value(  # type: ignore
+3107            coord=self.start,
+3108            value=value,
+3109            cell_type=cell_type,
+3110            currency=currency,
+3111            style=style,
+3112        )
+
+ + +

Shortcut to set the value of the first cell of the named range. +See table.set_value() for the arguments description.

+
+ + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Note(odfdo.Element): + + + +
+ +
 57class Note(Element):
+ 58    """Either a footnote or a endnote element with the given text,
+ 59    optionally referencing it using the given note_id.
+ 60
+ 61    Arguments:
+ 62
+ 63        note_class -- 'footnote' or 'endnote'
+ 64
+ 65        note_id -- str
+ 66
+ 67        citation -- str
+ 68
+ 69        body -- str or Element
+ 70    """
+ 71
+ 72    _tag = "text:note"
+ 73    _properties = (
+ 74        PropDef("note_class", "text:note-class"),
+ 75        PropDef("note_id", "text:id"),
+ 76    )
+ 77
+ 78    def __init__(
+ 79        self,
+ 80        note_class: str = "footnote",
+ 81        note_id: str | None = None,
+ 82        citation: str | None = None,
+ 83        body: str | None = None,
+ 84        **kwargs: Any,
+ 85    ) -> None:
+ 86        super().__init__(**kwargs)
+ 87        if self._do_init:
+ 88            self.insert(Element.from_tag("text:note-body"), position=0)
+ 89            self.insert(Element.from_tag("text:note-citation"), position=0)
+ 90            self.note_class = note_class
+ 91            if note_id is not None:
+ 92                self.note_id = note_id
+ 93            if citation is not None:
+ 94                self.citation = citation
+ 95            if body is not None:
+ 96                self.note_body = body
+ 97
+ 98    @property
+ 99    def citation(self) -> str:
+100        note_citation = self.get_element("text:note-citation")
+101        if note_citation:
+102            return note_citation.text
+103        return ""
+104
+105    @citation.setter
+106    def citation(self, text: str | None) -> None:
+107        note_citation = self.get_element("text:note-citation")
+108        if note_citation:
+109            note_citation.text = text  # type:ignore
+110
+111    @property
+112    def note_body(self) -> str:
+113        note_body = self.get_element("text:note-body")
+114        if note_body:
+115            return note_body.text_content
+116        return ""
+117
+118    @note_body.setter
+119    def note_body(self, text_or_element: Element | str | None) -> None:
+120        note_body = self.get_element("text:note-body")
+121        if not note_body:
+122            return None
+123        if text_or_element is None:
+124            note_body.text_content = ""
+125        elif isinstance(text_or_element, str):
+126            note_body.text_content = text_or_element
+127        elif isinstance(text_or_element, Element):
+128            note_body.clear()
+129            note_body.append(text_or_element)
+130        else:
+131            raise TypeError(f'Unexpected type for body: "{type(text_or_element)}"')
+132
+133    def check_validity(self) -> None:
+134        if not self.note_class:
+135            raise ValueError('Note class must be "footnote" or "endnote"')
+136        if not self.note_id:
+137            raise ValueError("Note must have an id")
+138        if not self.citation:
+139            raise ValueError("Note must have a citation")
+140        if not self.note_body:
+141            pass
+
+ + +

Either a footnote or a endnote element with the given text, +optionally referencing it using the given note_id.

+ +

Arguments:

+ +
note_class -- 'footnote' or 'endnote'
+
+note_id -- str
+
+citation -- str
+
+body -- str or Element
+
+
+ + +
+ +
+ + Note( note_class: str = 'footnote', note_id: str | None = None, citation: str | None = None, body: str | None = None, **kwargs: Any) + + + +
+ +
78    def __init__(
+79        self,
+80        note_class: str = "footnote",
+81        note_id: str | None = None,
+82        citation: str | None = None,
+83        body: str | None = None,
+84        **kwargs: Any,
+85    ) -> None:
+86        super().__init__(**kwargs)
+87        if self._do_init:
+88            self.insert(Element.from_tag("text:note-body"), position=0)
+89            self.insert(Element.from_tag("text:note-citation"), position=0)
+90            self.note_class = note_class
+91            if note_id is not None:
+92                self.note_id = note_id
+93            if citation is not None:
+94                self.citation = citation
+95            if body is not None:
+96                self.note_body = body
+
+ + + + +
+
+ +
+ citation: str + + + +
+ +
 98    @property
+ 99    def citation(self) -> str:
+100        note_citation = self.get_element("text:note-citation")
+101        if note_citation:
+102            return note_citation.text
+103        return ""
+
+ + + + +
+
+ +
+ note_body: str + + + +
+ +
111    @property
+112    def note_body(self) -> str:
+113        note_body = self.get_element("text:note-body")
+114        if note_body:
+115            return note_body.text_content
+116        return ""
+
+ + + + +
+
+ +
+ + def + check_validity(self) -> None: + + + +
+ +
133    def check_validity(self) -> None:
+134        if not self.note_class:
+135            raise ValueError('Note class must be "footnote" or "endnote"')
+136        if not self.note_id:
+137            raise ValueError("Note must have an id")
+138        if not self.citation:
+139            raise ValueError("Note must have a citation")
+140        if not self.note_body:
+141            pass
+
+ + + + +
+
+ +
+ note_class: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ note_id: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+
+ PREV_SIBLING = +3 + + +
+ + + + +
+
+ +
+ + class + Paragraph(odfdo.paragraph_base.ParagraphBase): + + + +
+ +
147class Paragraph(ParagraphBase):
+148    """Specialised element for paragraphs "text:p". The "text:p" element
+149    represents a paragraph, which is the basic unit of text in an OpenDocument
+150    file.
+151    """
+152
+153    _tag = "text:p"
+154
+155    def __init__(
+156        self,
+157        text_or_element: str | Element | None = None,
+158        style: str | None = None,
+159        **kwargs: Any,
+160    ):
+161        """Create a paragraph element of the given style containing the optional
+162        given text.
+163
+164        Arguments:
+165
+166            text -- str or Element
+167
+168            style -- str
+169        """
+170        super().__init__(**kwargs)
+171        if self._do_init:
+172            if isinstance(text_or_element, Element):
+173                self.append(text_or_element)
+174            else:
+175                self.text = text_or_element  # type:ignore
+176            if style is not None:
+177                self.style = style
+178
+179    def insert_note(
+180        self,
+181        note_element: Note | None = None,
+182        after: str | Element | None = None,
+183        note_class: str = "footnote",
+184        note_id: str | None = None,
+185        citation: str | None = None,
+186        body: str | None = None,
+187    ) -> None:
+188        if note_element is None:
+189            note_element = Note(
+190                note_class=note_class, note_id=note_id, citation=citation, body=body
+191            )
+192        else:
+193            # XXX clone or modify the argument?
+194            if note_class:
+195                note_element.note_class = note_class
+196            if note_id:
+197                note_element.note_id = note_id
+198            if citation:
+199                note_element.citation = citation
+200            if body:
+201                note_element.note_body = body
+202        note_element.check_validity()
+203        if isinstance(after, str):
+204            self._insert(note_element, after=after, main_text=True)
+205        elif isinstance(after, Element):
+206            after.insert(note_element, FIRST_CHILD)
+207        else:
+208            self.insert(note_element, FIRST_CHILD)
+209
+210    def insert_annotation(  # noqa: C901
+211        self,
+212        annotation_element: Annotation | None = None,
+213        before: str | None = None,
+214        after: str | Element | None = None,
+215        position: int | tuple = 0,
+216        content: str | Element | None = None,
+217        body: str | None = None,
+218        creator: str | None = None,
+219        date: datetime | None = None,
+220    ) -> Annotation:
+221        """Insert an annotation, at the position defined by the regex (before,
+222        after, content) or by positionnal argument (position). If content is
+223        provided, the annotation covers the full content regex. Else, the
+224        annotation is positionned either 'before' or 'after' provided regex.
+225
+226        If content is an odf element (ie: paragraph, span, ...), the full inner
+227        content is covered by the annotation (of the position just after if
+228        content is a single empty tag).
+229
+230        If content/before or after exists (regex) and return a group of matching
+231        positions, the position value is the index of matching place to use.
+232
+233        annotation_element can contain a previously created annotation, else
+234        the annotation is created from the body, creator and optional date
+235        (current date by default).
+236
+237        Arguments:
+238
+239            annotation_element -- Annotation or None
+240
+241            before -- str regular expression or None
+242
+243            after -- str regular expression or Element or None
+244
+245            content -- str regular expression or None, or Element
+246
+247            position -- int or tuple of int
+248
+249            body -- str or Element
+250
+251            creator -- str
+252
+253            date -- datetime
+254        """
+255
+256        if annotation_element is None:
+257            annotation_element = Annotation(
+258                text_or_element=body, creator=creator, date=date, parent=self
+259            )
+260        else:
+261            # XXX clone or modify the argument?
+262            if body:
+263                annotation_element.note_body = body
+264            if creator:
+265                annotation_element.dc_creator = creator
+266            if date:
+267                annotation_element.dc_date = date
+268        annotation_element.check_validity()
+269
+270        # special case: content is an odf element (ie: a paragraph)
+271        if isinstance(content, Element):
+272            if content.is_empty():
+273                content.insert(annotation_element, xmlposition=NEXT_SIBLING)
+274                return annotation_element
+275            content.insert(annotation_element, start=True)
+276            annotation_end = AnnotationEnd(annotation_element)
+277            content.append(annotation_end)
+278            return annotation_element
+279
+280        # special case
+281        if isinstance(after, Element):
+282            after.insert(annotation_element, FIRST_CHILD)
+283            return annotation_element
+284
+285        # With "content" => automatically insert a "start" and an "end"
+286        # bookmark
+287        if (
+288            before is None
+289            and after is None
+290            and content is not None
+291            and isinstance(position, int)
+292        ):
+293            # Start tag
+294            self._insert(
+295                annotation_element, before=content, position=position, main_text=True
+296            )
+297            # End tag
+298            annotation_end = AnnotationEnd(annotation_element)
+299            self._insert(
+300                annotation_end, after=content, position=position, main_text=True
+301            )
+302            return annotation_element
+303
+304        # With "(int, int)" =>  automatically insert a "start" and an "end"
+305        # bookmark
+306        if (
+307            before is None
+308            and after is None
+309            and content is None
+310            and isinstance(position, tuple)
+311        ):
+312            # Start
+313            self._insert(annotation_element, position=position[0], main_text=True)
+314            # End
+315            annotation_end = AnnotationEnd(annotation_element)
+316            self._insert(annotation_end, position=position[1], main_text=True)
+317            return annotation_element
+318
+319        # Without "content" nor "position"
+320        if content is not None or not isinstance(position, int):
+321            raise ValueError("Bad arguments")
+322
+323        # Insert
+324        self._insert(
+325            annotation_element,
+326            before=before,
+327            after=after,
+328            position=position,
+329            main_text=True,
+330        )
+331        return annotation_element
+332
+333    def insert_annotation_end(
+334        self,
+335        annotation_element: Annotation,
+336        before: str | None = None,
+337        after: str | None = None,
+338        position: int = 0,
+339    ) -> AnnotationEnd:
+340        """Insert an annotation end tag for an existing annotation. If some end
+341        tag already exists, replace it. Annotation end tag is set at the
+342        position defined by the regex (before or after).
+343
+344        If content/before or after (regex) returns a group of matching
+345        positions, the position value is the index of matching place to use.
+346
+347        Arguments:
+348
+349            annotation_element -- Annotation (mandatory)
+350
+351            before -- str regular expression or None
+352
+353            after -- str regular expression or None
+354
+355            position -- int
+356        """
+357
+358        if annotation_element is None:
+359            raise ValueError
+360        if not isinstance(annotation_element, Annotation):
+361            raise TypeError("Not a <office:annotation> Annotation")
+362
+363        # remove existing end tag
+364        name = annotation_element.name
+365        existing_end_tag = self.get_annotation_end(name=name)
+366        if existing_end_tag:
+367            existing_end_tag.delete()
+368
+369        # create the end tag
+370        end_tag = AnnotationEnd(annotation_element)
+371
+372        # Insert
+373        self._insert(
+374            end_tag, before=before, after=after, position=position, main_text=True
+375        )
+376        return end_tag
+377
+378    def set_reference_mark(
+379        self,
+380        name: str,
+381        before: str | None = None,
+382        after: str | None = None,
+383        position: int = 0,
+384        content: str | Element | None = None,
+385    ) -> Element:
+386        """Insert a reference mark, at the position defined by the regex
+387        (before, after, content) or by positionnal argument (position). If
+388        content is provided, the annotation covers the full range content regex
+389        (instances of ReferenceMarkStart and ReferenceMarkEnd are
+390        created). Else, an instance of ReferenceMark is positionned either
+391        'before' or 'after' provided regex.
+392
+393        If content is an ODF Element (ie: Paragraph, Span, ...), the full inner
+394        content is referenced (of the position just after if content is a single
+395        empty tag).
+396
+397        If content/before or after exists (regex) and return a group of matching
+398        positions, the position value is the index of matching place to use.
+399
+400        Name is mandatory and shall be unique in the document for the preference
+401        mark range.
+402
+403        Arguments:
+404
+405            name -- str
+406
+407            before -- str regular expression or None
+408
+409            after -- str regular expression or None,
+410
+411            content -- str regular expression or None, or Element
+412
+413            position -- int or tuple of int
+414
+415        Return: the created ReferenceMark or ReferenceMarkStart
+416        """
+417        # special case: content is an odf element (ie: a paragraph)
+418        if isinstance(content, Element):
+419            if content.is_empty():
+420                reference = ReferenceMark(name)
+421                content.insert(reference, xmlposition=NEXT_SIBLING)
+422                return reference
+423            reference_start = ReferenceMarkStart(name)
+424            content.insert(reference_start, start=True)
+425            reference_end = ReferenceMarkEnd(name)
+426            content.append(reference_end)
+427            return reference_start
+428
+429        # With "content" => automatically insert a "start" and an "end"
+430        # reference
+431        if (
+432            before is None
+433            and after is None
+434            and content is not None
+435            and isinstance(position, int)
+436        ):
+437            # Start tag
+438            reference_start = ReferenceMarkStart(name)
+439            self._insert(
+440                reference_start, before=content, position=position, main_text=True
+441            )
+442            # End tag
+443            reference_end = ReferenceMarkEnd(name)
+444            self._insert(
+445                reference_end, after=content, position=position, main_text=True
+446            )
+447            return reference_start
+448
+449        # With "(int, int)" =>  automatically insert a "start" and an "end"
+450        if (
+451            before is None
+452            and after is None
+453            and content is None
+454            and isinstance(position, tuple)
+455        ):
+456            # Start
+457            reference_start = ReferenceMarkStart(name)
+458            self._insert(reference_start, position=position[0], main_text=True)
+459            # End
+460            reference_end = ReferenceMarkEnd(name)
+461            self._insert(reference_end, position=position[1], main_text=True)
+462            return reference_start
+463
+464        # Without "content" nor "position"
+465        if content is not None or not isinstance(position, int):
+466            raise ValueError("bad arguments")
+467
+468        # Insert a positional reference mark
+469        reference = ReferenceMark(name)
+470        self._insert(
+471            reference,
+472            before=before,
+473            after=after,
+474            position=position,
+475            main_text=True,
+476        )
+477        return reference
+478
+479    def set_reference_mark_end(
+480        self,
+481        reference_mark: Element,
+482        before: str | None = None,
+483        after: str | None = None,
+484        position: int = 0,
+485    ) -> ReferenceMarkEnd:
+486        """Insert/move a ReferenceMarkEnd for an existing reference mark. If
+487        some end tag already exists, replace it. Reference tag is set at the
+488        position defined by the regex (before or after).
+489
+490        If content/before or after (regex) returns a group of matching
+491        positions, the position value is the index of matching place to use.
+492
+493        Arguments:
+494
+495            reference_mark -- ReferenceMark or ReferenceMarkStart (mandatory)
+496
+497            before -- str regular expression or None
+498
+499            after -- str regular expression or None
+500
+501            position -- int
+502        """
+503        if not isinstance(reference_mark, (ReferenceMark, ReferenceMarkStart)):
+504            raise TypeError("Not a ReferenceMark or ReferenceMarkStart")
+505        name = reference_mark.name
+506        if isinstance(reference_mark, ReferenceMark):
+507            # change it to a range reference:
+508            reference_mark.tag = ReferenceMarkStart._tag
+509
+510        existing_end_tag = self.get_reference_mark_end(name=name)
+511        if existing_end_tag:
+512            existing_end_tag.delete()
+513
+514        # create the end tag
+515        end_tag = ReferenceMarkEnd(name)
+516
+517        # Insert
+518        self._insert(
+519            end_tag, before=before, after=after, position=position, main_text=True
+520        )
+521        return end_tag
+522
+523    def insert_variable(self, variable_element: Element, after: str | None) -> None:
+524        self._insert(variable_element, after=after, main_text=True)
+525
+526    @_by_regex_offset
+527    def set_span(
+528        self,
+529        match: str,
+530        tail: str,
+531        style: str,
+532        regex: str | None = None,
+533        offset: int | None = None,
+534        length: int = 0,
+535    ) -> Span:
+536        """
+537        set_span(style, regex=None, offset=None, length=0)
+538        Apply the given style to text content matching the regex OR the
+539        positional arguments offset and length.
+540
+541        (match, tail: provided by regex decorator)
+542
+543        Arguments:
+544
+545            style -- str
+546
+547            regex -- str regular expression
+548
+549            offset -- int
+550
+551            length -- int
+552        """
+553        span = Span(match, style=style)
+554        span.tail = tail
+555        return span
+556
+557    def remove_spans(self, keep_heading: bool = True) -> Element | list:
+558        """Send back a copy of the element, without span styles.
+559        If keep_heading is True (default), the first level heading style is left
+560        unchanged.
+561        """
+562        strip = (Span._tag,)
+563        if keep_heading:
+564            protect = ("text:h",)
+565        else:
+566            protect = None
+567        return self.strip_tags(strip=strip, protect=protect)
+568
+569    def remove_span(self, spans: Element | list[Element]) -> Element | list:
+570        """Send back a copy of the element, the spans (not a clone) removed.
+571
+572        Arguments:
+573
+574            spans -- Element or list of Element
+575        """
+576        return self.strip_elements(spans)
+577
+578    @_by_regex_offset
+579    def set_link(
+580        self,
+581        match: str,
+582        tail: str,
+583        url: str,
+584        regex: str | None = None,
+585        offset: int | None = None,
+586        length: int = 0,
+587    ) -> Element:
+588        """
+589        set_link(url, regex=None, offset=None, length=0)
+590        Make a link to the provided url from text content matching the regex
+591        OR the positional arguments offset and length.
+592
+593        (match, tail: provided by regex decorator)
+594
+595        Arguments:
+596
+597            url -- str
+598
+599            regex -- str regular expression
+600
+601            offset -- int
+602
+603            length -- int
+604        """
+605        link = Link(url, text=match)
+606        link.tail = tail
+607        return link
+608
+609    def remove_links(self) -> Element | list:
+610        """Send back a copy of the element, without links tags."""
+611        strip = (Link._tag,)
+612        return self.strip_tags(strip=strip)
+613
+614    def remove_link(self, links: Link | list[Link]) -> Element | list:
+615        """Send back a copy of the element (not a clone), with the sub links
+616           removed.
+617
+618        Arguments:
+619
+620            links -- Link or list of Link
+621        """
+622        return self.strip_elements(links)
+623
+624    def insert_reference(
+625        self,
+626        name: str,
+627        ref_format: str = "",
+628        before: str | None = None,
+629        after: str | Element | None = None,
+630        position: int = 0,
+631        display: str | None = None,
+632    ) -> None:
+633        """Create and insert a reference to a content marked by a reference
+634        mark. The Reference element ("text:reference-ref") represents a
+635        field that references a "text:reference-mark-start" or
+636        "text:reference-mark" element. Its "text:reference-format" attribute
+637        specifies what is displayed from the referenced element. Default is
+638        'page'. Actual content is not automatically updated except for the 'text'
+639        format.
+640
+641        name is mandatory and should represent an existing reference mark of the
+642        document.
+643
+644        ref_format is the argument for format reference (default is 'page').
+645
+646        The reference is inserted the position defined by the regex (before /
+647        after), or by positionnal argument (position). If 'display' is provided,
+648        it will be used as the text value for the reference.
+649
+650        If after is an ODF Element, the reference is inserted as first child of
+651        this element.
+652
+653        Arguments:
+654
+655            name -- str
+656
+657            ref_format -- one of : 'chapter', 'direction', 'page', 'text',
+658                                    'caption', 'category-and-value', 'value',
+659                                    'number', 'number-all-superior',
+660                                    'number-no-superior'
+661
+662            before -- str regular expression or None
+663
+664            after -- str regular expression or odf element or None
+665
+666            position -- int
+667
+668            display -- str or None
+669        """
+670        reference = Reference(name, ref_format)
+671        if display is None and ref_format == "text":
+672            # get reference content
+673            body = self.document_body
+674            if not body:
+675                body = self.root
+676            mark = body.get_reference_mark(name=name)
+677            if mark:
+678                display = mark.referenced_text  # type: ignore
+679        if not display:
+680            display = " "
+681        reference.text = display
+682        if isinstance(after, Element):
+683            after.insert(reference, FIRST_CHILD)
+684        else:
+685            self._insert(
+686                reference, before=before, after=after, position=position, main_text=True
+687            )
+688
+689    def set_bookmark(
+690        self,
+691        name: str,
+692        before: str | None = None,
+693        after: str | None = None,
+694        position: int | tuple = 0,
+695        role: str | None = None,
+696        content: str | None = None,
+697    ) -> Element | tuple[Element, Element]:
+698        """Insert a bookmark before or after the characters in the text which
+699        match the regex before/after. When the regex matches more of one part
+700        of the text, position can be set to choose which part must be used.
+701        If before and after are None, we use only position that is the number
+702        of characters.
+703
+704        So, by default, this function inserts a bookmark before the first
+705        character of the content. Role can be None, "start" or "end", we
+706        insert respectively a position bookmark a bookmark-start or a
+707        bookmark-end.
+708
+709        If content is not None these 2 calls are equivalent:
+710
+711          paragraph.set_bookmark("bookmark", content="xyz")
+712
+713        and:
+714
+715          paragraph.set_bookmark("bookmark", before="xyz", role="start")
+716          paragraph.set_bookmark("bookmark", after="xyz", role="end")
+717
+718
+719        If position is a 2-tuple, these 2 calls are equivalent:
+720
+721          paragraph.set_bookmark("bookmark", position=(10, 20))
+722
+723        and:
+724
+725          paragraph.set_bookmark("bookmark", position=10, role="start")
+726          paragraph.set_bookmark("bookmark", position=20, role="end")
+727
+728
+729        Arguments:
+730
+731            name -- str
+732
+733            before -- str regex
+734
+735            after -- str regex
+736
+737            position -- int or (int, int)
+738
+739            role -- None, "start" or "end"
+740
+741            content -- str regex
+742        """
+743        # With "content" => automatically insert a "start" and an "end"
+744        # bookmark
+745        if (
+746            before is None
+747            and after is None
+748            and role is None
+749            and content is not None
+750            and isinstance(position, int)
+751        ):
+752            # Start
+753            start = BookmarkStart(name)
+754            self._insert(start, before=content, position=position, main_text=True)
+755            # End
+756            end = BookmarkEnd(name)
+757            self._insert(end, after=content, position=position, main_text=True)
+758            return start, end
+759
+760        # With "(int, int)" =>  automatically insert a "start" and an "end"
+761        # bookmark
+762        if (
+763            before is None
+764            and after is None
+765            and role is None
+766            and content is None
+767            and isinstance(position, tuple)
+768        ):
+769            # Start
+770            start = BookmarkStart(name)
+771            self._insert(start, position=position[0], main_text=True)
+772            # End
+773            end = BookmarkEnd(name)
+774            self._insert(end, position=position[1], main_text=True)
+775            return start, end
+776
+777        # Without "content" nor "position"
+778        if content is not None or not isinstance(position, int):
+779            raise ValueError("bad arguments")
+780
+781        # Role
+782        if role is None:
+783            bookmark: Element = Bookmark(name)
+784        elif role == "start":
+785            bookmark = BookmarkStart(name)
+786        elif role == "end":
+787            bookmark = BookmarkEnd(name)
+788        else:
+789            raise ValueError("bad arguments")
+790
+791        # Insert
+792        self._insert(
+793            bookmark, before=before, after=after, position=position, main_text=True
+794        )
+795
+796        return bookmark
+
+ + +

Specialised element for paragraphs "text:p". The "text:p" element +represents a paragraph, which is the basic unit of text in an OpenDocument +file.

+
+ + +
+ +
+ + Paragraph( text_or_element: str | Element | None = None, style: str | None = None, **kwargs: Any) + + + +
+ +
155    def __init__(
+156        self,
+157        text_or_element: str | Element | None = None,
+158        style: str | None = None,
+159        **kwargs: Any,
+160    ):
+161        """Create a paragraph element of the given style containing the optional
+162        given text.
+163
+164        Arguments:
+165
+166            text -- str or Element
+167
+168            style -- str
+169        """
+170        super().__init__(**kwargs)
+171        if self._do_init:
+172            if isinstance(text_or_element, Element):
+173                self.append(text_or_element)
+174            else:
+175                self.text = text_or_element  # type:ignore
+176            if style is not None:
+177                self.style = style
+
+ + +

Create a paragraph element of the given style containing the optional +given text.

+ +

Arguments:

+ +
text -- str or Element
+
+style -- str
+
+
+ + +
+
+ +
+ + def + insert_note( self, note_element: Note | None = None, after: str | Element | None = None, note_class: str = 'footnote', note_id: str | None = None, citation: str | None = None, body: str | None = None) -> None: + + + +
+ +
179    def insert_note(
+180        self,
+181        note_element: Note | None = None,
+182        after: str | Element | None = None,
+183        note_class: str = "footnote",
+184        note_id: str | None = None,
+185        citation: str | None = None,
+186        body: str | None = None,
+187    ) -> None:
+188        if note_element is None:
+189            note_element = Note(
+190                note_class=note_class, note_id=note_id, citation=citation, body=body
+191            )
+192        else:
+193            # XXX clone or modify the argument?
+194            if note_class:
+195                note_element.note_class = note_class
+196            if note_id:
+197                note_element.note_id = note_id
+198            if citation:
+199                note_element.citation = citation
+200            if body:
+201                note_element.note_body = body
+202        note_element.check_validity()
+203        if isinstance(after, str):
+204            self._insert(note_element, after=after, main_text=True)
+205        elif isinstance(after, Element):
+206            after.insert(note_element, FIRST_CHILD)
+207        else:
+208            self.insert(note_element, FIRST_CHILD)
+
+ + + + +
+
+ +
+ + def + insert_annotation( self, annotation_element: Annotation | None = None, before: str | None = None, after: str | Element | None = None, position: int | tuple = 0, content: str | Element | None = None, body: str | None = None, creator: str | None = None, date: datetime.datetime | None = None) -> Annotation: + + + +
+ +
210    def insert_annotation(  # noqa: C901
+211        self,
+212        annotation_element: Annotation | None = None,
+213        before: str | None = None,
+214        after: str | Element | None = None,
+215        position: int | tuple = 0,
+216        content: str | Element | None = None,
+217        body: str | None = None,
+218        creator: str | None = None,
+219        date: datetime | None = None,
+220    ) -> Annotation:
+221        """Insert an annotation, at the position defined by the regex (before,
+222        after, content) or by positionnal argument (position). If content is
+223        provided, the annotation covers the full content regex. Else, the
+224        annotation is positionned either 'before' or 'after' provided regex.
+225
+226        If content is an odf element (ie: paragraph, span, ...), the full inner
+227        content is covered by the annotation (of the position just after if
+228        content is a single empty tag).
+229
+230        If content/before or after exists (regex) and return a group of matching
+231        positions, the position value is the index of matching place to use.
+232
+233        annotation_element can contain a previously created annotation, else
+234        the annotation is created from the body, creator and optional date
+235        (current date by default).
+236
+237        Arguments:
+238
+239            annotation_element -- Annotation or None
+240
+241            before -- str regular expression or None
+242
+243            after -- str regular expression or Element or None
+244
+245            content -- str regular expression or None, or Element
+246
+247            position -- int or tuple of int
+248
+249            body -- str or Element
+250
+251            creator -- str
+252
+253            date -- datetime
+254        """
+255
+256        if annotation_element is None:
+257            annotation_element = Annotation(
+258                text_or_element=body, creator=creator, date=date, parent=self
+259            )
+260        else:
+261            # XXX clone or modify the argument?
+262            if body:
+263                annotation_element.note_body = body
+264            if creator:
+265                annotation_element.dc_creator = creator
+266            if date:
+267                annotation_element.dc_date = date
+268        annotation_element.check_validity()
+269
+270        # special case: content is an odf element (ie: a paragraph)
+271        if isinstance(content, Element):
+272            if content.is_empty():
+273                content.insert(annotation_element, xmlposition=NEXT_SIBLING)
+274                return annotation_element
+275            content.insert(annotation_element, start=True)
+276            annotation_end = AnnotationEnd(annotation_element)
+277            content.append(annotation_end)
+278            return annotation_element
+279
+280        # special case
+281        if isinstance(after, Element):
+282            after.insert(annotation_element, FIRST_CHILD)
+283            return annotation_element
+284
+285        # With "content" => automatically insert a "start" and an "end"
+286        # bookmark
+287        if (
+288            before is None
+289            and after is None
+290            and content is not None
+291            and isinstance(position, int)
+292        ):
+293            # Start tag
+294            self._insert(
+295                annotation_element, before=content, position=position, main_text=True
+296            )
+297            # End tag
+298            annotation_end = AnnotationEnd(annotation_element)
+299            self._insert(
+300                annotation_end, after=content, position=position, main_text=True
+301            )
+302            return annotation_element
+303
+304        # With "(int, int)" =>  automatically insert a "start" and an "end"
+305        # bookmark
+306        if (
+307            before is None
+308            and after is None
+309            and content is None
+310            and isinstance(position, tuple)
+311        ):
+312            # Start
+313            self._insert(annotation_element, position=position[0], main_text=True)
+314            # End
+315            annotation_end = AnnotationEnd(annotation_element)
+316            self._insert(annotation_end, position=position[1], main_text=True)
+317            return annotation_element
+318
+319        # Without "content" nor "position"
+320        if content is not None or not isinstance(position, int):
+321            raise ValueError("Bad arguments")
+322
+323        # Insert
+324        self._insert(
+325            annotation_element,
+326            before=before,
+327            after=after,
+328            position=position,
+329            main_text=True,
+330        )
+331        return annotation_element
+
+ + +

Insert an annotation, at the position defined by the regex (before, +after, content) or by positionnal argument (position). If content is +provided, the annotation covers the full content regex. Else, the +annotation is positionned either 'before' or 'after' provided regex.

+ +

If content is an odf element (ie: paragraph, span, ...), the full inner +content is covered by the annotation (of the position just after if +content is a single empty tag).

+ +

If content/before or after exists (regex) and return a group of matching +positions, the position value is the index of matching place to use.

+ +

annotation_element can contain a previously created annotation, else +the annotation is created from the body, creator and optional date +(current date by default).

+ +

Arguments:

+ +
annotation_element -- Annotation or None
+
+before -- str regular expression or None
+
+after -- str regular expression or Element or None
+
+content -- str regular expression or None, or Element
+
+position -- int or tuple of int
+
+body -- str or Element
+
+creator -- str
+
+date -- datetime
+
+
+ + +
+
+ +
+ + def + insert_annotation_end( self, annotation_element: Annotation, before: str | None = None, after: str | None = None, position: int = 0) -> AnnotationEnd: + + + +
+ +
333    def insert_annotation_end(
+334        self,
+335        annotation_element: Annotation,
+336        before: str | None = None,
+337        after: str | None = None,
+338        position: int = 0,
+339    ) -> AnnotationEnd:
+340        """Insert an annotation end tag for an existing annotation. If some end
+341        tag already exists, replace it. Annotation end tag is set at the
+342        position defined by the regex (before or after).
+343
+344        If content/before or after (regex) returns a group of matching
+345        positions, the position value is the index of matching place to use.
+346
+347        Arguments:
+348
+349            annotation_element -- Annotation (mandatory)
+350
+351            before -- str regular expression or None
+352
+353            after -- str regular expression or None
+354
+355            position -- int
+356        """
+357
+358        if annotation_element is None:
+359            raise ValueError
+360        if not isinstance(annotation_element, Annotation):
+361            raise TypeError("Not a <office:annotation> Annotation")
+362
+363        # remove existing end tag
+364        name = annotation_element.name
+365        existing_end_tag = self.get_annotation_end(name=name)
+366        if existing_end_tag:
+367            existing_end_tag.delete()
+368
+369        # create the end tag
+370        end_tag = AnnotationEnd(annotation_element)
+371
+372        # Insert
+373        self._insert(
+374            end_tag, before=before, after=after, position=position, main_text=True
+375        )
+376        return end_tag
+
+ + +

Insert an annotation end tag for an existing annotation. If some end +tag already exists, replace it. Annotation end tag is set at the +position defined by the regex (before or after).

+ +

If content/before or after (regex) returns a group of matching +positions, the position value is the index of matching place to use.

+ +

Arguments:

+ +
annotation_element -- Annotation (mandatory)
+
+before -- str regular expression or None
+
+after -- str regular expression or None
+
+position -- int
+
+
+ + +
+
+ +
+ + def + set_reference_mark( self, name: str, before: str | None = None, after: str | None = None, position: int = 0, content: str | Element | None = None) -> Element: + + + +
+ +
378    def set_reference_mark(
+379        self,
+380        name: str,
+381        before: str | None = None,
+382        after: str | None = None,
+383        position: int = 0,
+384        content: str | Element | None = None,
+385    ) -> Element:
+386        """Insert a reference mark, at the position defined by the regex
+387        (before, after, content) or by positionnal argument (position). If
+388        content is provided, the annotation covers the full range content regex
+389        (instances of ReferenceMarkStart and ReferenceMarkEnd are
+390        created). Else, an instance of ReferenceMark is positionned either
+391        'before' or 'after' provided regex.
+392
+393        If content is an ODF Element (ie: Paragraph, Span, ...), the full inner
+394        content is referenced (of the position just after if content is a single
+395        empty tag).
+396
+397        If content/before or after exists (regex) and return a group of matching
+398        positions, the position value is the index of matching place to use.
+399
+400        Name is mandatory and shall be unique in the document for the preference
+401        mark range.
+402
+403        Arguments:
+404
+405            name -- str
+406
+407            before -- str regular expression or None
+408
+409            after -- str regular expression or None,
+410
+411            content -- str regular expression or None, or Element
+412
+413            position -- int or tuple of int
+414
+415        Return: the created ReferenceMark or ReferenceMarkStart
+416        """
+417        # special case: content is an odf element (ie: a paragraph)
+418        if isinstance(content, Element):
+419            if content.is_empty():
+420                reference = ReferenceMark(name)
+421                content.insert(reference, xmlposition=NEXT_SIBLING)
+422                return reference
+423            reference_start = ReferenceMarkStart(name)
+424            content.insert(reference_start, start=True)
+425            reference_end = ReferenceMarkEnd(name)
+426            content.append(reference_end)
+427            return reference_start
+428
+429        # With "content" => automatically insert a "start" and an "end"
+430        # reference
+431        if (
+432            before is None
+433            and after is None
+434            and content is not None
+435            and isinstance(position, int)
+436        ):
+437            # Start tag
+438            reference_start = ReferenceMarkStart(name)
+439            self._insert(
+440                reference_start, before=content, position=position, main_text=True
+441            )
+442            # End tag
+443            reference_end = ReferenceMarkEnd(name)
+444            self._insert(
+445                reference_end, after=content, position=position, main_text=True
+446            )
+447            return reference_start
+448
+449        # With "(int, int)" =>  automatically insert a "start" and an "end"
+450        if (
+451            before is None
+452            and after is None
+453            and content is None
+454            and isinstance(position, tuple)
+455        ):
+456            # Start
+457            reference_start = ReferenceMarkStart(name)
+458            self._insert(reference_start, position=position[0], main_text=True)
+459            # End
+460            reference_end = ReferenceMarkEnd(name)
+461            self._insert(reference_end, position=position[1], main_text=True)
+462            return reference_start
+463
+464        # Without "content" nor "position"
+465        if content is not None or not isinstance(position, int):
+466            raise ValueError("bad arguments")
+467
+468        # Insert a positional reference mark
+469        reference = ReferenceMark(name)
+470        self._insert(
+471            reference,
+472            before=before,
+473            after=after,
+474            position=position,
+475            main_text=True,
+476        )
+477        return reference
+
+ + +

Insert a reference mark, at the position defined by the regex +(before, after, content) or by positionnal argument (position). If +content is provided, the annotation covers the full range content regex +(instances of ReferenceMarkStart and ReferenceMarkEnd are +created). Else, an instance of ReferenceMark is positionned either +'before' or 'after' provided regex.

+ +

If content is an ODF Element (ie: Paragraph, Span, ...), the full inner +content is referenced (of the position just after if content is a single +empty tag).

+ +

If content/before or after exists (regex) and return a group of matching +positions, the position value is the index of matching place to use.

+ +

Name is mandatory and shall be unique in the document for the preference +mark range.

+ +

Arguments:

+ +
name -- str
+
+before -- str regular expression or None
+
+after -- str regular expression or None,
+
+content -- str regular expression or None, or Element
+
+position -- int or tuple of int
+
+ +

Return: the created ReferenceMark or ReferenceMarkStart

+
+ + +
+
+ +
+ + def + set_reference_mark_end( self, reference_mark: Element, before: str | None = None, after: str | None = None, position: int = 0) -> ReferenceMarkEnd: + + + +
+ +
479    def set_reference_mark_end(
+480        self,
+481        reference_mark: Element,
+482        before: str | None = None,
+483        after: str | None = None,
+484        position: int = 0,
+485    ) -> ReferenceMarkEnd:
+486        """Insert/move a ReferenceMarkEnd for an existing reference mark. If
+487        some end tag already exists, replace it. Reference tag is set at the
+488        position defined by the regex (before or after).
+489
+490        If content/before or after (regex) returns a group of matching
+491        positions, the position value is the index of matching place to use.
+492
+493        Arguments:
+494
+495            reference_mark -- ReferenceMark or ReferenceMarkStart (mandatory)
+496
+497            before -- str regular expression or None
+498
+499            after -- str regular expression or None
+500
+501            position -- int
+502        """
+503        if not isinstance(reference_mark, (ReferenceMark, ReferenceMarkStart)):
+504            raise TypeError("Not a ReferenceMark or ReferenceMarkStart")
+505        name = reference_mark.name
+506        if isinstance(reference_mark, ReferenceMark):
+507            # change it to a range reference:
+508            reference_mark.tag = ReferenceMarkStart._tag
+509
+510        existing_end_tag = self.get_reference_mark_end(name=name)
+511        if existing_end_tag:
+512            existing_end_tag.delete()
+513
+514        # create the end tag
+515        end_tag = ReferenceMarkEnd(name)
+516
+517        # Insert
+518        self._insert(
+519            end_tag, before=before, after=after, position=position, main_text=True
+520        )
+521        return end_tag
+
+ + +

Insert/move a ReferenceMarkEnd for an existing reference mark. If +some end tag already exists, replace it. Reference tag is set at the +position defined by the regex (before or after).

+ +

If content/before or after (regex) returns a group of matching +positions, the position value is the index of matching place to use.

+ +

Arguments:

+ +
reference_mark -- ReferenceMark or ReferenceMarkStart (mandatory)
+
+before -- str regular expression or None
+
+after -- str regular expression or None
+
+position -- int
+
+
+ + +
+
+ +
+ + def + insert_variable(self, variable_element: Element, after: str | None) -> None: + + + +
+ +
523    def insert_variable(self, variable_element: Element, after: str | None) -> None:
+524        self._insert(variable_element, after=after, main_text=True)
+
+ + + + +
+
+ +
+ + def + set_span( self, match: str, tail: str, style: str, regex: str | None = None, offset: int | None = None, length: int = 0) -> Span: + + + +
+ +
526    @_by_regex_offset
+527    def set_span(
+528        self,
+529        match: str,
+530        tail: str,
+531        style: str,
+532        regex: str | None = None,
+533        offset: int | None = None,
+534        length: int = 0,
+535    ) -> Span:
+536        """
+537        set_span(style, regex=None, offset=None, length=0)
+538        Apply the given style to text content matching the regex OR the
+539        positional arguments offset and length.
+540
+541        (match, tail: provided by regex decorator)
+542
+543        Arguments:
+544
+545            style -- str
+546
+547            regex -- str regular expression
+548
+549            offset -- int
+550
+551            length -- int
+552        """
+553        span = Span(match, style=style)
+554        span.tail = tail
+555        return span
+
+ + +

set_span(style, regex=None, offset=None, length=0) +Apply the given style to text content matching the regex OR the +positional arguments offset and length.

+ +

(match, tail: provided by regex decorator)

+ +

Arguments:

+ +
style -- str
+
+regex -- str regular expression
+
+offset -- int
+
+length -- int
+
+
+ + +
+
+ +
+ + def + remove_spans(self, keep_heading: bool = True) -> Element | list: + + + +
+ +
557    def remove_spans(self, keep_heading: bool = True) -> Element | list:
+558        """Send back a copy of the element, without span styles.
+559        If keep_heading is True (default), the first level heading style is left
+560        unchanged.
+561        """
+562        strip = (Span._tag,)
+563        if keep_heading:
+564            protect = ("text:h",)
+565        else:
+566            protect = None
+567        return self.strip_tags(strip=strip, protect=protect)
+
+ + +

Send back a copy of the element, without span styles. +If keep_heading is True (default), the first level heading style is left +unchanged.

+
+ + +
+
+ +
+ + def + remove_span( self, spans: Element | list[Element]) -> Element | list: + + + +
+ +
569    def remove_span(self, spans: Element | list[Element]) -> Element | list:
+570        """Send back a copy of the element, the spans (not a clone) removed.
+571
+572        Arguments:
+573
+574            spans -- Element or list of Element
+575        """
+576        return self.strip_elements(spans)
+
+ + +

Send back a copy of the element, the spans (not a clone) removed.

+ +

Arguments:

+ +
spans -- Element or list of Element
+
+
+ + +
+ + + +
+ +
+ + def + insert_reference( self, name: str, ref_format: str = '', before: str | None = None, after: str | Element | None = None, position: int = 0, display: str | None = None) -> None: + + + +
+ +
624    def insert_reference(
+625        self,
+626        name: str,
+627        ref_format: str = "",
+628        before: str | None = None,
+629        after: str | Element | None = None,
+630        position: int = 0,
+631        display: str | None = None,
+632    ) -> None:
+633        """Create and insert a reference to a content marked by a reference
+634        mark. The Reference element ("text:reference-ref") represents a
+635        field that references a "text:reference-mark-start" or
+636        "text:reference-mark" element. Its "text:reference-format" attribute
+637        specifies what is displayed from the referenced element. Default is
+638        'page'. Actual content is not automatically updated except for the 'text'
+639        format.
+640
+641        name is mandatory and should represent an existing reference mark of the
+642        document.
+643
+644        ref_format is the argument for format reference (default is 'page').
+645
+646        The reference is inserted the position defined by the regex (before /
+647        after), or by positionnal argument (position). If 'display' is provided,
+648        it will be used as the text value for the reference.
+649
+650        If after is an ODF Element, the reference is inserted as first child of
+651        this element.
+652
+653        Arguments:
+654
+655            name -- str
+656
+657            ref_format -- one of : 'chapter', 'direction', 'page', 'text',
+658                                    'caption', 'category-and-value', 'value',
+659                                    'number', 'number-all-superior',
+660                                    'number-no-superior'
+661
+662            before -- str regular expression or None
+663
+664            after -- str regular expression or odf element or None
+665
+666            position -- int
+667
+668            display -- str or None
+669        """
+670        reference = Reference(name, ref_format)
+671        if display is None and ref_format == "text":
+672            # get reference content
+673            body = self.document_body
+674            if not body:
+675                body = self.root
+676            mark = body.get_reference_mark(name=name)
+677            if mark:
+678                display = mark.referenced_text  # type: ignore
+679        if not display:
+680            display = " "
+681        reference.text = display
+682        if isinstance(after, Element):
+683            after.insert(reference, FIRST_CHILD)
+684        else:
+685            self._insert(
+686                reference, before=before, after=after, position=position, main_text=True
+687            )
+
+ + +

Create and insert a reference to a content marked by a reference +mark. The Reference element ("text:reference-ref") represents a +field that references a "text:reference-mark-start" or +"text:reference-mark" element. Its "text:reference-format" attribute +specifies what is displayed from the referenced element. Default is +'page'. Actual content is not automatically updated except for the 'text' +format.

+ +

name is mandatory and should represent an existing reference mark of the +document.

+ +

ref_format is the argument for format reference (default is 'page').

+ +

The reference is inserted the position defined by the regex (before / +after), or by positionnal argument (position). If 'display' is provided, +it will be used as the text value for the reference.

+ +

If after is an ODF Element, the reference is inserted as first child of +this element.

+ +

Arguments:

+ +
name -- str
+
+ref_format -- one of : 'chapter', 'direction', 'page', 'text',
+                        'caption', 'category-and-value', 'value',
+                        'number', 'number-all-superior',
+                        'number-no-superior'
+
+before -- str regular expression or None
+
+after -- str regular expression or odf element or None
+
+position -- int
+
+display -- str or None
+
+
+ + +
+
+ +
+ + def + set_bookmark( self, name: str, before: str | None = None, after: str | None = None, position: int | tuple = 0, role: str | None = None, content: str | None = None) -> Element | tuple[Element, Element]: + + + +
+ +
689    def set_bookmark(
+690        self,
+691        name: str,
+692        before: str | None = None,
+693        after: str | None = None,
+694        position: int | tuple = 0,
+695        role: str | None = None,
+696        content: str | None = None,
+697    ) -> Element | tuple[Element, Element]:
+698        """Insert a bookmark before or after the characters in the text which
+699        match the regex before/after. When the regex matches more of one part
+700        of the text, position can be set to choose which part must be used.
+701        If before and after are None, we use only position that is the number
+702        of characters.
+703
+704        So, by default, this function inserts a bookmark before the first
+705        character of the content. Role can be None, "start" or "end", we
+706        insert respectively a position bookmark a bookmark-start or a
+707        bookmark-end.
+708
+709        If content is not None these 2 calls are equivalent:
+710
+711          paragraph.set_bookmark("bookmark", content="xyz")
+712
+713        and:
+714
+715          paragraph.set_bookmark("bookmark", before="xyz", role="start")
+716          paragraph.set_bookmark("bookmark", after="xyz", role="end")
+717
+718
+719        If position is a 2-tuple, these 2 calls are equivalent:
+720
+721          paragraph.set_bookmark("bookmark", position=(10, 20))
+722
+723        and:
+724
+725          paragraph.set_bookmark("bookmark", position=10, role="start")
+726          paragraph.set_bookmark("bookmark", position=20, role="end")
+727
+728
+729        Arguments:
+730
+731            name -- str
+732
+733            before -- str regex
+734
+735            after -- str regex
+736
+737            position -- int or (int, int)
+738
+739            role -- None, "start" or "end"
+740
+741            content -- str regex
+742        """
+743        # With "content" => automatically insert a "start" and an "end"
+744        # bookmark
+745        if (
+746            before is None
+747            and after is None
+748            and role is None
+749            and content is not None
+750            and isinstance(position, int)
+751        ):
+752            # Start
+753            start = BookmarkStart(name)
+754            self._insert(start, before=content, position=position, main_text=True)
+755            # End
+756            end = BookmarkEnd(name)
+757            self._insert(end, after=content, position=position, main_text=True)
+758            return start, end
+759
+760        # With "(int, int)" =>  automatically insert a "start" and an "end"
+761        # bookmark
+762        if (
+763            before is None
+764            and after is None
+765            and role is None
+766            and content is None
+767            and isinstance(position, tuple)
+768        ):
+769            # Start
+770            start = BookmarkStart(name)
+771            self._insert(start, position=position[0], main_text=True)
+772            # End
+773            end = BookmarkEnd(name)
+774            self._insert(end, position=position[1], main_text=True)
+775            return start, end
+776
+777        # Without "content" nor "position"
+778        if content is not None or not isinstance(position, int):
+779            raise ValueError("bad arguments")
+780
+781        # Role
+782        if role is None:
+783            bookmark: Element = Bookmark(name)
+784        elif role == "start":
+785            bookmark = BookmarkStart(name)
+786        elif role == "end":
+787            bookmark = BookmarkEnd(name)
+788        else:
+789            raise ValueError("bad arguments")
+790
+791        # Insert
+792        self._insert(
+793            bookmark, before=before, after=after, position=position, main_text=True
+794        )
+795
+796        return bookmark
+
+ + +

Insert a bookmark before or after the characters in the text which +match the regex before/after. When the regex matches more of one part +of the text, position can be set to choose which part must be used. +If before and after are None, we use only position that is the number +of characters.

+ +

So, by default, this function inserts a bookmark before the first +character of the content. Role can be None, "start" or "end", we +insert respectively a position bookmark a bookmark-start or a +bookmark-end.

+ +

If content is not None these 2 calls are equivalent:

+ +

paragraph.set_bookmark("bookmark", content="xyz")

+ +

and:

+ +

paragraph.set_bookmark("bookmark", before="xyz", role="start") + paragraph.set_bookmark("bookmark", after="xyz", role="end")

+ +

If position is a 2-tuple, these 2 calls are equivalent:

+ +

paragraph.set_bookmark("bookmark", position=(10, 20))

+ +

and:

+ +

paragraph.set_bookmark("bookmark", position=10, role="start") + paragraph.set_bookmark("bookmark", position=20, role="end")

+ +

Arguments:

+ +
name -- str
+
+before -- str regex
+
+after -- str regex
+
+position -- int or (int, int)
+
+role -- None, "start" or "end"
+
+content -- str regex
+
+
+ + +
+
+
Inherited Members
+
+
odfdo.paragraph_base.ParagraphBase
+
get_formatted_text
+
append_plain_text
+
style
+ +
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + def + PageBreak() -> Paragraph: + + + +
+ +
831def PageBreak() -> Paragraph:
+832    """Return an empty paragraph with a manual page break.
+833
+834    Using this function requires to register the page break style with:
+835        document.add_page_break_style()
+836    """
+837    return Paragraph("", style="odfdopagebreak")
+
+ + +

Return an empty paragraph with a manual page break.

+ +

Using this function requires to register the page break style with: + document.add_page_break_style()

+
+ + +
+
+ +
+ + class + RectangleShape(odfdo.shapes.ShapeBase): + + + +
+ +
146class RectangleShape(ShapeBase):
+147    """Create a rectangle shape.
+148
+149    Arguments:
+150
+151        style -- str
+152
+153        text_style -- str
+154
+155        draw_id -- str
+156
+157        layer -- str
+158
+159        position -- (str, str)
+160
+161        size -- (str, str)
+162
+163    """
+164
+165    _tag = "draw:rect"
+166    _properties: tuple[PropDef, ...] = ()
+167
+168    def __init__(
+169        self,
+170        style: str | None = None,
+171        text_style: str | None = None,
+172        draw_id: str | None = None,
+173        layer: str | None = None,
+174        position: tuple | None = None,
+175        size: tuple | None = None,
+176        **kwargs: Any,
+177    ) -> None:
+178        kwargs.update(
+179            {
+180                "style": style,
+181                "text_style": text_style,
+182                "draw_id": draw_id,
+183                "layer": layer,
+184                "size": size,
+185                "position": position,
+186            }
+187        )
+188        super().__init__(**kwargs)
+
+ + +

Create a rectangle shape.

+ +

Arguments:

+ +
style -- str
+
+text_style -- str
+
+draw_id -- str
+
+layer -- str
+
+position -- (str, str)
+
+size -- (str, str)
+
+
+ + +
+ +
+ + RectangleShape( style: str | None = None, text_style: str | None = None, draw_id: str | None = None, layer: str | None = None, position: tuple | None = None, size: tuple | None = None, **kwargs: Any) + + + +
+ +
168    def __init__(
+169        self,
+170        style: str | None = None,
+171        text_style: str | None = None,
+172        draw_id: str | None = None,
+173        layer: str | None = None,
+174        position: tuple | None = None,
+175        size: tuple | None = None,
+176        **kwargs: Any,
+177    ) -> None:
+178        kwargs.update(
+179            {
+180                "style": style,
+181                "text_style": text_style,
+182                "draw_id": draw_id,
+183                "layer": layer,
+184                "size": size,
+185                "position": position,
+186            }
+187        )
+188        super().__init__(**kwargs)
+
+ + + + +
+
+
Inherited Members
+
+
odfdo.shapes.ShapeBase
+
get_formatted_text
+
draw_id
+
layer
+
width
+
height
+
pos_x
+
pos_y
+
presentation_class
+
style
+
text_style
+ +
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
odfdo.frame.SizeMix
+
size
+ +
+
odfdo.frame.PosMix
+
position
+ +
+
+
+
+
+ +
+ + class + Reference(odfdo.Element): + + + +
+ +
 59class Reference(Element):
+ 60    """A reference to a content marked by a reference mark.
+ 61    The odf_reference element ("text:reference-ref") represents a field that
+ 62    references a "text:reference-mark-start" or "text:reference-mark" element.
+ 63    Its text:reference-format attribute specifies what is displayed from the
+ 64    referenced element. Default is 'page'
+ 65    Actual content is not updated except for the 'text' format by the
+ 66    update() method.
+ 67
+ 68
+ 69    Creation of references can be tricky, consider using this method:
+ 70        odfdo.paragraph.insert_reference()
+ 71
+ 72    Values for text:reference-format :
+ 73        The defined values for the text:reference-format attribute supported by
+ 74        all reference fields are:
+ 75          - 'chapter': displays the number of the chapter in which the
+ 76            referenced item appears.
+ 77          - 'direction': displays whether the referenced item is above or
+ 78            below the reference field.
+ 79          - 'page': displays the number of the page on which the referenced
+ 80            item appears.
+ 81          - 'text': displays the text of the referenced item.
+ 82        Additional defined values for the text:reference-format attribute
+ 83        supported by references to sequence fields are:
+ 84          - 'caption': displays the caption in which the sequence is used.
+ 85          - 'category-and-value': displays the name and value of the sequence.
+ 86          - 'value': displays the value of the sequence.
+ 87
+ 88        References to bookmarks and other references support additional values,
+ 89        which display the list label of the referenced item. If the referenced
+ 90        item is contained in a list or a numbered paragraph, the list label is
+ 91        the formatted number of the paragraph which contains the referenced
+ 92        item. If the referenced item is not contained in a list or numbered
+ 93        paragraph, the list label is empty, and the referenced field therefore
+ 94        displays nothing. If the referenced bookmark or reference contains more
+ 95        than one paragraph, the list label of the paragraph at which the
+ 96        bookmark or reference starts is taken.
+ 97
+ 98        Additional defined values for the text:reference-format attribute
+ 99        supported by all references to bookmark's or other reference fields
+100        are:
+101          - 'number': displays the list label of the referenced item. [...]
+102          - 'number-all-superior': displays the list label of the referenced
+103            item and adds the contents of all list labels of superior levels
+104            in front of it. [...]
+105          - 'number-no-superior': displays the contents of the list label of
+106            the referenced item.
+107    """
+108
+109    _tag = "text:reference-ref"
+110    _properties = (PropDef("name", "text:ref-name"),)
+111    format_allowed = (
+112        "chapter",
+113        "direction",
+114        "page",
+115        "text",
+116        "caption",
+117        "category-and-value",
+118        "value",
+119        "number",
+120        "number-all-superior",
+121        "number-no-superior",
+122    )
+123
+124    def __init__(self, name: str = "", ref_format: str = "", **kwargs: Any) -> None:
+125        """Create a reference to a content marked by a reference mark. An
+126        actual reference mark with the provided name should exist.
+127
+128        Consider using: odfdo.paragraph.insert_reference()
+129
+130        The text:ref-name attribute identifies a "text:reference-mark" or
+131        "text:referencemark-start" element by the value of that element's
+132        text:name attribute.
+133        If ref_format is 'text', the current text content of the reference_mark
+134        is retrieved.
+135
+136        Arguments:
+137
+138            name -- str : name of the reference mark
+139
+140            ref_format -- str : format of the field. Default is 'page', allowed
+141                            values are 'chapter', 'direction', 'page', 'text',
+142                            'caption', 'category-and-value', 'value', 'number',
+143                            'number-all-superior', 'number-no-superior'.
+144        """
+145        super().__init__(**kwargs)
+146        if self._do_init:
+147            self.name = name
+148            self.ref_format = ref_format
+149
+150    @property
+151    def ref_format(self) -> str | None:
+152        reference = self.get_attribute("text:reference-format")
+153        if isinstance(reference, str):
+154            return reference
+155        return None
+156
+157    @ref_format.setter
+158    def ref_format(self, ref_format: str) -> None:
+159        """Set the text:reference-format attribute.
+160
+161        Arguments:
+162
+163            ref_format -- str
+164        """
+165        if not ref_format or ref_format not in self.format_allowed:
+166            ref_format = "page"
+167        self.set_attribute("text:reference-format", ref_format)
+168
+169    def update(self) -> None:
+170        """Update the content of the reference text field. Currently only
+171        'text' format is implemented. Other values, for example the 'page' text
+172        field, may need to be refreshed through a visual ODF parser.
+173        """
+174        ref_format = self.ref_format
+175        if ref_format != "text":
+176            # only 'text' is implemented
+177            return None
+178        body = self.document_body
+179        if not body:
+180            body = self.root
+181        name = self.name
+182        reference = body.get_reference_mark(name=name)
+183        if not reference:
+184            return None
+185        # we know it is a ReferenceMarkStart:
+186        self.text = reference.referenced_text()  # type: ignore
+
+ + +

A reference to a content marked by a reference mark. +The odf_reference element ("text:reference-ref") represents a field that +references a "text:reference-mark-start" or "text:reference-mark" element. +Its text:reference-format attribute specifies what is displayed from the +referenced element. Default is 'page' +Actual content is not updated except for the 'text' format by the +update() method.

+ +

Creation of references can be tricky, consider using this method: + odfdo.paragraph.insert_reference()

+ +

Values for text:reference-format : + The defined values for the text:reference-format attribute supported by + all reference fields are: + - 'chapter': displays the number of the chapter in which the + referenced item appears. + - 'direction': displays whether the referenced item is above or + below the reference field. + - 'page': displays the number of the page on which the referenced + item appears. + - 'text': displays the text of the referenced item. + Additional defined values for the text:reference-format attribute + supported by references to sequence fields are: + - 'caption': displays the caption in which the sequence is used. + - 'category-and-value': displays the name and value of the sequence. + - 'value': displays the value of the sequence.

+ +
References to bookmarks and other references support additional values,
+which display the list label of the referenced item. If the referenced
+item is contained in a list or a numbered paragraph, the list label is
+the formatted number of the paragraph which contains the referenced
+item. If the referenced item is not contained in a list or numbered
+paragraph, the list label is empty, and the referenced field therefore
+displays nothing. If the referenced bookmark or reference contains more
+than one paragraph, the list label of the paragraph at which the
+bookmark or reference starts is taken.
+
+Additional defined values for the text:reference-format attribute
+supported by all references to bookmark's or other reference fields
+are:
+  - 'number': displays the list label of the referenced item. [...]
+  - 'number-all-superior': displays the list label of the referenced
+    item and adds the contents of all list labels of superior levels
+    in front of it. [...]
+  - 'number-no-superior': displays the contents of the list label of
+    the referenced item.
+
+
+ + +
+ +
+ + Reference(name: str = '', ref_format: str = '', **kwargs: Any) + + + +
+ +
124    def __init__(self, name: str = "", ref_format: str = "", **kwargs: Any) -> None:
+125        """Create a reference to a content marked by a reference mark. An
+126        actual reference mark with the provided name should exist.
+127
+128        Consider using: odfdo.paragraph.insert_reference()
+129
+130        The text:ref-name attribute identifies a "text:reference-mark" or
+131        "text:referencemark-start" element by the value of that element's
+132        text:name attribute.
+133        If ref_format is 'text', the current text content of the reference_mark
+134        is retrieved.
+135
+136        Arguments:
+137
+138            name -- str : name of the reference mark
+139
+140            ref_format -- str : format of the field. Default is 'page', allowed
+141                            values are 'chapter', 'direction', 'page', 'text',
+142                            'caption', 'category-and-value', 'value', 'number',
+143                            'number-all-superior', 'number-no-superior'.
+144        """
+145        super().__init__(**kwargs)
+146        if self._do_init:
+147            self.name = name
+148            self.ref_format = ref_format
+
+ + +

Create a reference to a content marked by a reference mark. An +actual reference mark with the provided name should exist.

+ +

Consider using: odfdo.paragraph.insert_reference()

+ +

The text:ref-name attribute identifies a "text:reference-mark" or +"text:referencemark-start" element by the value of that element's +text:name attribute. +If ref_format is 'text', the current text content of the reference_mark +is retrieved.

+ +

Arguments:

+ +
name -- str : name of the reference mark
+
+ref_format -- str : format of the field. Default is 'page', allowed
+                values are 'chapter', 'direction', 'page', 'text',
+                'caption', 'category-and-value', 'value', 'number',
+                'number-all-superior', 'number-no-superior'.
+
+
+ + +
+
+
+ format_allowed = + + ('chapter', 'direction', 'page', 'text', 'caption', 'category-and-value', 'value', 'number', 'number-all-superior', 'number-no-superior') + + +
+ + + + +
+
+ +
+ ref_format: str | None + + + +
+ +
150    @property
+151    def ref_format(self) -> str | None:
+152        reference = self.get_attribute("text:reference-format")
+153        if isinstance(reference, str):
+154            return reference
+155        return None
+
+ + +

Set the text:reference-format attribute.

+ +

Arguments:

+ +
ref_format -- str
+
+
+ + +
+
+ +
+ + def + update(self) -> None: + + + +
+ +
169    def update(self) -> None:
+170        """Update the content of the reference text field. Currently only
+171        'text' format is implemented. Other values, for example the 'page' text
+172        field, may need to be refreshed through a visual ODF parser.
+173        """
+174        ref_format = self.ref_format
+175        if ref_format != "text":
+176            # only 'text' is implemented
+177            return None
+178        body = self.document_body
+179        if not body:
+180            body = self.root
+181        name = self.name
+182        reference = body.get_reference_mark(name=name)
+183        if not reference:
+184            return None
+185        # we know it is a ReferenceMarkStart:
+186        self.text = reference.referenced_text()  # type: ignore
+
+ + +

Update the content of the reference text field. Currently only +'text' format is implemented. Other values, for example the 'page' text +field, may need to be refreshed through a visual ODF parser.

+
+ + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + ReferenceMark(odfdo.Element): + + + +
+ +
192class ReferenceMark(Element):
+193    """A point reference.
+194    A point reference marks a position in text and is represented by a single
+195    "text:reference-mark" element.
+196    """
+197
+198    _tag = "text:reference-mark"
+199    _properties = (PropDef("name", "text:name"),)
+200
+201    def __init__(self, name: str = "", **kwargs: Any) -> None:
+202        """A point reference. A point reference marks a position in text and is
+203        represented by a single "text:reference-mark" element.
+204        Consider using the wrapper: odfdo.paragraph.set_reference_mark()
+205
+206        Arguments:
+207
+208            name -- str
+209        """
+210        super().__init__(**kwargs)
+211        if self._do_init:
+212            self.name = name
+
+ + +

A point reference. +A point reference marks a position in text and is represented by a single +"text:reference-mark" element.

+
+ + +
+ +
+ + ReferenceMark(name: str = '', **kwargs: Any) + + + +
+ +
201    def __init__(self, name: str = "", **kwargs: Any) -> None:
+202        """A point reference. A point reference marks a position in text and is
+203        represented by a single "text:reference-mark" element.
+204        Consider using the wrapper: odfdo.paragraph.set_reference_mark()
+205
+206        Arguments:
+207
+208            name -- str
+209        """
+210        super().__init__(**kwargs)
+211        if self._do_init:
+212            self.name = name
+
+ + +

A point reference. A point reference marks a position in text and is +represented by a single "text:reference-mark" element. +Consider using the wrapper: odfdo.paragraph.set_reference_mark()

+ +

Arguments:

+ +
name -- str
+
+
+ + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + ReferenceMarkEnd(odfdo.Element): + + + +
+ +
218class ReferenceMarkEnd(Element):
+219    """The "text:reference-mark-end" element represents the end of a range
+220    reference.
+221    """
+222
+223    _tag = "text:reference-mark-end"
+224    _properties = (PropDef("name", "text:name"),)
+225
+226    def __init__(self, name: str = "", **kwargs: Any) -> None:
+227        """The "text:reference-mark-end" element represent the end of a range
+228        reference.
+229        Consider using the wrappers: odfdo.paragraph.set_reference_mark() and
+230        odfdo.paragraph.set_reference_mark_end()
+231
+232        Arguments:
+233
+234            name -- str
+235        """
+236        super().__init__(**kwargs)
+237        if self._do_init:
+238            self.name = name
+239
+240    def referenced_text(self) -> str:
+241        """Return the text between reference-mark-start and reference-mark-end."""
+242        name = self.name
+243        request = (
+244            f"//text()"
+245            f"[preceding::text:reference-mark-start[@text:name='{name}'] "
+246            f"and following::text:reference-mark-end[@text:name='{name}']]"
+247        )
+248        result = " ".join(str(x) for x in self.xpath(request))
+249        return result
+
+ + +

The "text:reference-mark-end" element represents the end of a range +reference.

+
+ + +
+ +
+ + ReferenceMarkEnd(name: str = '', **kwargs: Any) + + + +
+ +
226    def __init__(self, name: str = "", **kwargs: Any) -> None:
+227        """The "text:reference-mark-end" element represent the end of a range
+228        reference.
+229        Consider using the wrappers: odfdo.paragraph.set_reference_mark() and
+230        odfdo.paragraph.set_reference_mark_end()
+231
+232        Arguments:
+233
+234            name -- str
+235        """
+236        super().__init__(**kwargs)
+237        if self._do_init:
+238            self.name = name
+
+ + +

The "text:reference-mark-end" element represent the end of a range +reference. +Consider using the wrappers: odfdo.paragraph.set_reference_mark() and +odfdo.paragraph.set_reference_mark_end()

+ +

Arguments:

+ +
name -- str
+
+
+ + +
+
+ +
+ + def + referenced_text(self) -> str: + + + +
+ +
240    def referenced_text(self) -> str:
+241        """Return the text between reference-mark-start and reference-mark-end."""
+242        name = self.name
+243        request = (
+244            f"//text()"
+245            f"[preceding::text:reference-mark-start[@text:name='{name}'] "
+246            f"and following::text:reference-mark-end[@text:name='{name}']]"
+247        )
+248        result = " ".join(str(x) for x in self.xpath(request))
+249        return result
+
+ + +

Return the text between reference-mark-start and reference-mark-end.

+
+ + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + ReferenceMarkStart(odfdo.Element): + + + +
+ +
255class ReferenceMarkStart(Element):
+256    """The "text:reference-mark-start" element represents the start of a
+257    range reference.
+258    """
+259
+260    _tag = "text:reference-mark-start"
+261    _properties = (PropDef("name", "text:name"),)
+262
+263    def __init__(self, name: str = "", **kwargs: Any) -> None:
+264        """The "text:reference-mark-start" element represent the start of a range
+265        reference.
+266        Consider using the wrapper: odfdo.paragraph.set_reference_mark()
+267
+268        Arguments:
+269
+270            name -- str
+271        """
+272        super().__init__(**kwargs)
+273        if self._do_init:
+274            self.name = name
+275
+276    def referenced_text(self) -> str:
+277        """Return the text between reference-mark-start and reference-mark-end."""
+278        name = self.name
+279        request = (
+280            f"//text()"
+281            f"[preceding::text:reference-mark-start[@text:name='{name}'] "
+282            f"and following::text:reference-mark-end[@text:name='{name}']]"
+283        )
+284        result = " ".join(str(x) for x in self.xpath(request))
+285        return result
+286
+287    def get_referenced(
+288        self,
+289        no_header: bool = False,
+290        clean: bool = True,
+291        as_xml: bool = False,
+292        as_list: bool = False,
+293    ) -> Element | list | str | None:
+294        """Return the document content between the start and end tags of the
+295        reference. The content returned by this method can spread over several
+296        headers and paragraphs.
+297        By default, the content is returned as an "office:text" odf element.
+298
+299
+300        Arguments:
+301
+302            no_header -- boolean (default to False), translate existing headers
+303                         tags "text:h" into paragraphs "text:p".
+304
+305            clean -- boolean (default to True), suppress unwanted tags. Striped
+306                     tags are : 'text:change', 'text:change-start',
+307                     'text:change-end', 'text:reference-mark',
+308                     'text:reference-mark-start', 'text:reference-mark-end'.
+309
+310            as_xml -- boolean (default to False), format the returned content as
+311                      a XML string (serialization).
+312
+313            as_list -- boolean (default to False), do not embed the returned
+314                       content in a "office:text'" element, instead simply
+315                       return a raw list of odf elements.
+316        """
+317        name = self.name
+318        parent = self.parent
+319        if parent is None:
+320            raise ValueError("Reference need some upper document part")
+321        body = self.document_body
+322        if not body:
+323            body = parent
+324        end = body.get_reference_mark_end(name=name)
+325        if end is None:
+326            raise ValueError("No reference-end found")
+327        start = self
+328        return _get_referenced(body, start, end, no_header, clean, as_xml, as_list)
+329
+330    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
+331        """Delete the given element from the XML tree. If no element is given,
+332        "self" is deleted. The XML library may allow to continue to use an
+333        element now "orphan" as long as you have a reference to it.
+334
+335        For odf_reference_mark_start : delete the reference-end tag if exists.
+336
+337        Arguments:
+338
+339            child -- Element
+340
+341            keep_tail -- boolean (default to True), True for most usages.
+342        """
+343        if child is not None:  # act like normal delete
+344            return super().delete(child, keep_tail)
+345        name = self.name
+346        parent = self.parent
+347        if parent is None:
+348            raise ValueError("Can't delete the root element")
+349        body = self.document_body
+350        if not body:
+351            body = parent
+352        end = body.get_reference_mark_end(name=name)
+353        if end:
+354            end.delete()
+355        # act like normal delete
+356        return super().delete()
+
+ + +

The "text:reference-mark-start" element represents the start of a +range reference.

+
+ + +
+ +
+ + ReferenceMarkStart(name: str = '', **kwargs: Any) + + + +
+ +
263    def __init__(self, name: str = "", **kwargs: Any) -> None:
+264        """The "text:reference-mark-start" element represent the start of a range
+265        reference.
+266        Consider using the wrapper: odfdo.paragraph.set_reference_mark()
+267
+268        Arguments:
+269
+270            name -- str
+271        """
+272        super().__init__(**kwargs)
+273        if self._do_init:
+274            self.name = name
+
+ + +

The "text:reference-mark-start" element represent the start of a range +reference. +Consider using the wrapper: odfdo.paragraph.set_reference_mark()

+ +

Arguments:

+ +
name -- str
+
+
+ + +
+
+ +
+ + def + referenced_text(self) -> str: + + + +
+ +
276    def referenced_text(self) -> str:
+277        """Return the text between reference-mark-start and reference-mark-end."""
+278        name = self.name
+279        request = (
+280            f"//text()"
+281            f"[preceding::text:reference-mark-start[@text:name='{name}'] "
+282            f"and following::text:reference-mark-end[@text:name='{name}']]"
+283        )
+284        result = " ".join(str(x) for x in self.xpath(request))
+285        return result
+
+ + +

Return the text between reference-mark-start and reference-mark-end.

+
+ + +
+
+ +
+ + def + get_referenced( self, no_header: bool = False, clean: bool = True, as_xml: bool = False, as_list: bool = False) -> Element | list | str | None: + + + +
+ +
287    def get_referenced(
+288        self,
+289        no_header: bool = False,
+290        clean: bool = True,
+291        as_xml: bool = False,
+292        as_list: bool = False,
+293    ) -> Element | list | str | None:
+294        """Return the document content between the start and end tags of the
+295        reference. The content returned by this method can spread over several
+296        headers and paragraphs.
+297        By default, the content is returned as an "office:text" odf element.
+298
+299
+300        Arguments:
+301
+302            no_header -- boolean (default to False), translate existing headers
+303                         tags "text:h" into paragraphs "text:p".
+304
+305            clean -- boolean (default to True), suppress unwanted tags. Striped
+306                     tags are : 'text:change', 'text:change-start',
+307                     'text:change-end', 'text:reference-mark',
+308                     'text:reference-mark-start', 'text:reference-mark-end'.
+309
+310            as_xml -- boolean (default to False), format the returned content as
+311                      a XML string (serialization).
+312
+313            as_list -- boolean (default to False), do not embed the returned
+314                       content in a "office:text'" element, instead simply
+315                       return a raw list of odf elements.
+316        """
+317        name = self.name
+318        parent = self.parent
+319        if parent is None:
+320            raise ValueError("Reference need some upper document part")
+321        body = self.document_body
+322        if not body:
+323            body = parent
+324        end = body.get_reference_mark_end(name=name)
+325        if end is None:
+326            raise ValueError("No reference-end found")
+327        start = self
+328        return _get_referenced(body, start, end, no_header, clean, as_xml, as_list)
+
+ + +

Return the document content between the start and end tags of the +reference. The content returned by this method can spread over several +headers and paragraphs. +By default, the content is returned as an "office:text" odf element.

+ +

Arguments:

+ +
no_header -- boolean (default to False), translate existing headers
+             tags "text:h" into paragraphs "text:p".
+
+clean -- boolean (default to True), suppress unwanted tags. Striped
+         tags are : 'text:change', 'text:change-start',
+         'text:change-end', 'text:reference-mark',
+         'text:reference-mark-start', 'text:reference-mark-end'.
+
+as_xml -- boolean (default to False), format the returned content as
+          a XML string (serialization).
+
+as_list -- boolean (default to False), do not embed the returned
+           content in a "office:text'" element, instead simply
+           return a raw list of odf elements.
+
+
+ + +
+
+ +
+ + def + delete( self, child: Element | None = None, keep_tail: bool = True) -> None: + + + +
+ +
330    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
+331        """Delete the given element from the XML tree. If no element is given,
+332        "self" is deleted. The XML library may allow to continue to use an
+333        element now "orphan" as long as you have a reference to it.
+334
+335        For odf_reference_mark_start : delete the reference-end tag if exists.
+336
+337        Arguments:
+338
+339            child -- Element
+340
+341            keep_tail -- boolean (default to True), True for most usages.
+342        """
+343        if child is not None:  # act like normal delete
+344            return super().delete(child, keep_tail)
+345        name = self.name
+346        parent = self.parent
+347        if parent is None:
+348            raise ValueError("Can't delete the root element")
+349        body = self.document_body
+350        if not body:
+351            body = parent
+352        end = body.get_reference_mark_end(name=name)
+353        if end:
+354            end.delete()
+355        # act like normal delete
+356        return super().delete()
+
+ + +

Delete the given element from the XML tree. If no element is given, +"self" is deleted. The XML library may allow to continue to use an +element now "orphan" as long as you have a reference to it.

+ +

For odf_reference_mark_start : delete the reference-end tag if exists.

+ +

Arguments:

+ +
child -- Element
+
+keep_tail -- boolean (default to True), True for most usages.
+
+
+ + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Row(odfdo.Element): + + + +
+ +
 52class Row(Element):
+ 53    """ODF table row "table:table-row" """
+ 54
+ 55    _tag = "table:table-row"
+ 56    _caching = True
+ 57    _append = Element.append
+ 58
+ 59    def __init__(
+ 60        self,
+ 61        width: int | None = None,
+ 62        repeated: int | None = None,
+ 63        style: str | None = None,
+ 64        **kwargs: Any,
+ 65    ) -> None:
+ 66        """create a Row, optionally filled with "width" number of cells.
+ 67
+ 68        Rows contain cells, their number determine the number of columns.
+ 69
+ 70        You don't generally have to create rows by hand, use the Table API.
+ 71
+ 72        Arguments:
+ 73
+ 74            width -- int
+ 75
+ 76            repeated -- int
+ 77
+ 78            style -- str
+ 79        """
+ 80        super().__init__(**kwargs)
+ 81        self.y = None
+ 82        if not hasattr(self, "_indexes"):
+ 83            self._indexes = {}
+ 84            self._indexes["_rmap"] = {}
+ 85        if not hasattr(self, "_rmap"):
+ 86            self._compute_row_cache()
+ 87            if not hasattr(self, "_tmap"):
+ 88                self._tmap = []
+ 89                self._cmap = []
+ 90        if self._do_init:
+ 91            if width is not None:
+ 92                for _i in range(width):
+ 93                    self.append(Cell())  # type:ignore
+ 94            if repeated:
+ 95                self.repeated = repeated
+ 96            if style is not None:
+ 97                self.style = style
+ 98            self._compute_row_cache()
+ 99
+100    def _get_cells(self) -> list[Element]:
+101        return self.get_elements(_xpath_cell)
+102
+103    def _translate_row_coordinates(
+104        self,
+105        coord: tuple | list | str,
+106    ) -> tuple[int | None, int | None]:
+107        xyzt = convert_coordinates(coord)
+108        if len(xyzt) == 2:
+109            x, z = xyzt
+110        else:
+111            x, _, z, __ = xyzt
+112        if x and x < 0:
+113            x = increment(x, self.width)
+114        if z and z < 0:
+115            z = increment(z, self.width)
+116        return (x, z)
+117
+118    def _compute_row_cache(self) -> None:
+119        idx_repeated_seq = self.elements_repeated_sequence(
+120            _xpath_cell, "table:number-columns-repeated"
+121        )
+122        self._rmap = make_cache_map(idx_repeated_seq)
+123
+124    # Public API
+125
+126    @property
+127    def clone(self) -> Row:
+128        clone = Element.clone.fget(self)  # type: ignore
+129        clone.y = self.y
+130        if hasattr(self, "_tmap"):
+131            if hasattr(self, "_rmap"):
+132                clone._rmap = self._rmap[:]
+133            clone._tmap = self._tmap[:]
+134            clone._cmap = self._cmap[:]
+135        return clone
+136
+137    def _set_repeated(self, repeated: int | None) -> None:
+138        """Internal only. Set the numnber of times the row is repeated, or
+139        None to delete it. Without changing cache.
+140
+141        Arguments:
+142
+143            repeated -- int
+144        """
+145        if repeated is None or repeated < 2:
+146            with contextlib.suppress(KeyError):
+147                self.del_attribute("table:number-rows-repeated")
+148            return
+149        self.set_attribute("table:number-rows-repeated", str(repeated))
+150
+151    @property
+152    def repeated(self) -> int | None:
+153        """Get / set the number of times the row is repeated.
+154
+155        Always None when using the table API.
+156
+157        Return: int or None
+158        """
+159        repeated = self.get_attribute("table:number-rows-repeated")
+160        if repeated is None:
+161            return None
+162        return int(repeated)
+163
+164    @repeated.setter
+165    def repeated(self, repeated: int | None) -> None:
+166        self._set_repeated(repeated)
+167        # update cache
+168        current: Element = self
+169        while True:
+170            # look for Table, parent may be group of rows
+171            upper = current.parent
+172            if not upper:
+173                # lonely row
+174                return
+175            # parent may be group of rows, not table
+176            if isinstance(upper, Element) and upper._tag == "table:table":
+177                break
+178            current = upper
+179        # fixme : need to optimize this
+180        if isinstance(upper, Element) and upper._tag == "table:table":
+181            upper._compute_table_cache()
+182            if hasattr(self, "_tmap"):
+183                del self._tmap[:]
+184                self._tmap.extend(upper._tmap)
+185            else:
+186                self._tmap = upper._tmap
+187
+188    @property
+189    def style(self) -> str | None:
+190        """Get /set the style of the row itself.
+191
+192        Return: str
+193        """
+194        return self.get_attribute("table:style-name")  # type: ignore
+195
+196    @style.setter
+197    def style(self, style: str | Element) -> None:
+198        self.set_style_attribute("table:style-name", style)
+199
+200    @property
+201    def width(self) -> int:
+202        """Get the number of expected cells in the row, i.e. addition
+203        repetitions.
+204
+205        Return: int
+206        """
+207        try:
+208            value = self._rmap[-1] + 1
+209        except Exception:
+210            value = 0
+211        return value
+212
+213    def _translate_x_from_any(self, x: str | int) -> int:
+214        return translate_from_any(x, self.width, 0)
+215
+216    def traverse(  # noqa: C901
+217        self,
+218        start: int | None = None,
+219        end: int | None = None,
+220    ) -> Iterator[Cell]:
+221        """Yield as many cell elements as expected cells in the row, i.e.
+222        expand repetitions by returning the same cell as many times as
+223        necessary.
+224
+225            Arguments:
+226
+227                start -- int
+228
+229                end -- int
+230
+231        Copies are returned, use set_cell() to push them back.
+232        """
+233        idx = -1
+234        before = -1
+235        x = 0
+236        cell: Cell
+237        if start is None and end is None:
+238            for juska in self._rmap:
+239                idx += 1
+240                if idx in self._indexes["_rmap"]:
+241                    cell = self._indexes["_rmap"][idx]
+242                else:
+243                    cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
+244                    if not isinstance(cell, Cell):
+245                        raise TypeError(f"Not a cell: {cell!r}")
+246                    self._indexes["_rmap"][idx] = cell
+247                repeated = juska - before
+248                before = juska
+249                for _i in range(repeated or 1):
+250                    # Return a copy without the now obsolete repetition
+251                    if cell is None:
+252                        cell = Cell()
+253                    else:
+254                        cell = cell.clone
+255                        if repeated > 1:
+256                            cell.repeated = None
+257                    cell.y = self.y
+258                    cell.x = x
+259                    x += 1
+260                    yield cell
+261        else:
+262            if start is None:
+263                start = 0
+264            start = max(0, start)
+265            if end is None:
+266                try:
+267                    end = self._rmap[-1]
+268                except Exception:
+269                    end = -1
+270            start_map = find_odf_idx(self._rmap, start)
+271            if start_map is None:
+272                return
+273            if start_map > 0:
+274                before = self._rmap[start_map - 1]
+275            idx = start_map - 1
+276            before = start - 1
+277            x = start
+278            for juska in self._rmap[start_map:]:
+279                idx += 1
+280                if idx in self._indexes["_rmap"]:
+281                    cell = self._indexes["_rmap"][idx]
+282                else:
+283                    cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
+284                    if not isinstance(cell, Cell):
+285                        raise TypeError(f"Not a cell: {cell!r}")
+286                    self._indexes["_rmap"][idx] = cell
+287                repeated = juska - before
+288                before = juska
+289                for _i in range(repeated or 1):
+290                    if x <= end:
+291                        if cell is None:
+292                            cell = Cell()
+293                        else:
+294                            cell = cell.clone
+295                            if repeated > 1 or (x == start and start > 0):
+296                                cell.repeated = None
+297                        cell.y = self.y
+298                        cell.x = x
+299                        x += 1
+300                        yield cell
+301
+302    def get_cells(
+303        self,
+304        coord: str | tuple | None = None,
+305        style: str | None = None,
+306        content: str | None = None,
+307        cell_type: str | None = None,
+308    ) -> list[Cell]:
+309        """Get the list of cells matching the criteria.
+310
+311        Filter by cell_type, with cell_type 'all' will retrieve cells of any
+312        type, aka non empty cells.
+313
+314        Filter by coordinates will retrieve the amount of cells defined by
+315        'coord', minus the other filters.
+316
+317        Arguments:
+318
+319            coord -- str or tuple of int : coordinates
+320
+321            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+322                         'currency', 'percentage' or 'all'
+323
+324            content -- str regex
+325
+326            style -- str
+327
+328        Return: list of Cell
+329        """
+330        # fixme : not clones ?
+331        if coord:
+332            x, z = self._translate_row_coordinates(coord)
+333        else:
+334            x = None
+335            z = None
+336        if cell_type:
+337            cell_type = cell_type.lower().strip()
+338        cells: list[Cell] = []
+339        for cell in self.traverse(start=x, end=z):
+340            # Filter the cells by cell_type
+341            if cell_type:
+342                ctype = cell.type
+343                if not ctype or not (ctype == cell_type or cell_type == "all"):
+344                    continue
+345            # Filter the cells with the regex
+346            if content and not cell.match(content):
+347                continue
+348            # Filter the cells with the style
+349            if style and style != cell.style:
+350                continue
+351            cells.append(cell)
+352        return cells
+353
+354    def _get_cell2(self, x: int, clone: bool = True) -> Cell | None:
+355        if x >= self.width:
+356            return Cell()
+357        if clone:
+358            return self._get_cell2_base(x).clone  # type: ignore
+359        else:
+360            return self._get_cell2_base(x)
+361
+362    def _get_cell2_base(self, x: int) -> Cell | None:
+363        idx = find_odf_idx(self._rmap, x)
+364        cell: Cell
+365        if idx is not None:
+366            if idx in self._indexes["_rmap"]:
+367                cell = self._indexes["_rmap"][idx]
+368            else:
+369                cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
+370                self._indexes["_rmap"][idx] = cell
+371            return cell
+372        return None
+373
+374    def get_cell(self, x: int, clone: bool = True) -> Cell | None:
+375        """Get the cell at position "x" starting from 0. Alphabetical
+376        positions like "D" are accepted.
+377
+378        A  copy is returned, use set_cell() to push it back.
+379
+380        Arguments:
+381
+382            x -- int or str
+383
+384        Return: Cell | None
+385        """
+386        x = self._translate_x_from_any(x)
+387        cell = self._get_cell2(x, clone=clone)
+388        if not cell:
+389            return None
+390        cell.y = self.y
+391        cell.x = x
+392        return cell
+393
+394    def get_value(
+395        self,
+396        x: int | str,
+397        get_type: bool = False,
+398    ) -> Any | tuple[Any, str]:
+399        """Shortcut to get the value of the cell at position "x".
+400        If get_type is True, returns the tuples (value, ODF type).
+401
+402        If the cell is empty, returns None or (None, None)
+403
+404        See get_cell() and Cell.get_value().
+405        """
+406        if get_type:
+407            x = self._translate_x_from_any(x)
+408            cell = self._get_cell2_base(x)
+409            if cell is None:
+410                return (None, None)
+411            return cell.get_value(get_type=get_type)
+412        x = self._translate_x_from_any(x)
+413        cell = self._get_cell2_base(x)
+414        if cell is None:
+415            return None
+416        return cell.get_value()
+417
+418    def set_cell(
+419        self,
+420        x: int | str,
+421        cell: Cell | None = None,
+422        clone: bool = True,
+423    ) -> Cell:
+424        """Push the cell back in the row at position "x" starting from 0.
+425        Alphabetical positions like "D" are accepted.
+426
+427        Arguments:
+428
+429            x -- int or str
+430
+431        returns the cell with x and y updated
+432        """
+433        cell_back: Cell
+434        if cell is None:
+435            cell = Cell()
+436            repeated = 1
+437            clone = False
+438        else:
+439            repeated = cell.repeated or 1
+440        x = self._translate_x_from_any(x)
+441        # Outside the defined row
+442        diff = x - self.width
+443        if diff == 0:
+444            cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
+445        elif diff > 0:
+446            self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
+447            cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
+448        else:
+449            # Inside the defined row
+450            set_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap", clone=clone)
+451            cell.x = x
+452            cell.y = self.y
+453            cell_back = cell
+454        return cell_back
+455
+456    def set_value(
+457        self,
+458        x: int | str,
+459        value: Any,
+460        style: str | None = None,
+461        cell_type: str | None = None,
+462        currency: str | None = None,
+463    ) -> None:
+464        """Shortcut to set the value of the cell at position "x".
+465
+466        Arguments:
+467
+468            x -- int or str
+469
+470            value -- Python type
+471
+472            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+473                     'string' or 'time'
+474
+475            currency -- three-letter str
+476
+477            style -- str
+478
+479        See get_cell() and Cell.get_value().
+480        """
+481        self.set_cell(
+482            x,
+483            Cell(value, style=style, cell_type=cell_type, currency=currency),
+484            clone=False,
+485        )
+486
+487    def insert_cell(
+488        self,
+489        x: int | str,
+490        cell: Cell | None = None,
+491        clone: bool = True,
+492    ) -> Cell:
+493        """Insert the given cell at position "x" starting from 0. If no cell
+494        is given, an empty one is created.
+495
+496        Alphabetical positions like "D" are accepted.
+497
+498        Do not use when working on a table, use Table.insert_cell().
+499
+500        Arguments:
+501
+502            x -- int or str
+503
+504            cell -- Cell
+505
+506        returns the cell with x and y updated
+507        """
+508        cell_back: Cell
+509        if cell is None:
+510            cell = Cell()
+511        x = self._translate_x_from_any(x)
+512        # Outside the defined row
+513        diff = x - self.width
+514        if diff < 0:
+515            insert_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap")
+516            cell.x = x
+517            cell.y = self.y
+518            cell_back = cell
+519        elif diff == 0:
+520            cell_back = self.append_cell(cell, clone=clone)
+521        else:
+522            self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
+523            cell_back = self.append_cell(cell, clone=clone)
+524        return cell_back
+525
+526    def extend_cells(self, cells: Iterable[Cell] | None = None) -> None:
+527        if cells is None:
+528            cells = []
+529        self.extend(cells)
+530        self._compute_row_cache()
+531
+532    def append_cell(
+533        self,
+534        cell: Cell | None = None,
+535        clone: bool = True,
+536        _repeated: int | None = None,
+537    ) -> Cell:
+538        """Append the given cell at the end of the row. Repeated cells are
+539        accepted. If no cell is given, an empty one is created.
+540
+541        Do not use when working on a table, use Table.append_cell().
+542
+543        Arguments:
+544
+545            cell -- Cell
+546
+547            _repeated -- (optional), repeated value of the row
+548
+549        returns the cell with x and y updated
+550        """
+551        if cell is None:
+552            cell = Cell()
+553            clone = False
+554        if clone:
+555            cell = cell.clone
+556        self._append(cell)
+557        if _repeated is None:
+558            _repeated = cell.repeated or 1
+559        self._rmap = insert_map_once(self._rmap, len(self._rmap), _repeated)
+560        cell.x = self.width - 1
+561        cell.y = self.y
+562        return cell
+563
+564    # fix for unit test and typos
+565    append = append_cell  # type: ignore
+566
+567    def delete_cell(self, x: int | str) -> None:
+568        """Delete the cell at the given position "x" starting from 0.
+569        Alphabetical positions like "D" are accepted.
+570
+571        Cells on the right will be shifted to the left. In a table, other
+572        rows remain unaffected.
+573
+574        Arguments:
+575
+576            x -- int or str
+577        """
+578        x = self._translate_x_from_any(x)
+579        if x >= self.width:
+580            return
+581        delete_item_in_vault(x, self, _xpath_cell_idx, "_rmap")
+582
+583    def get_values(
+584        self,
+585        coord: str | tuple | None = None,
+586        cell_type: str | None = None,
+587        complete: bool = False,
+588        get_type: bool = False,
+589    ) -> list[Any | tuple[Any, Any]]:
+590        """Shortcut to get the cell values in this row.
+591
+592        Filter by cell_type, with cell_type 'all' will retrieve cells of any
+593        type, aka non empty cells.
+594        If cell_type is used and complete is True, missing values are
+595        replaced by None.
+596        If cell_type is None, complete is always True : with no cell type
+597        queried, get_values() returns None for each empty cell, the length
+598        of the list is equal to the length of the row (depending on
+599        coordinates use).
+600
+601        If get_type is True, returns a tuple (value, ODF type of value), or
+602        (None, None) for empty cells if complete is True.
+603
+604        Filter by coordinates will retrieve the amount of cells defined by
+605        coordinates with None for empty cells, except when using cell_type.
+606
+607
+608        Arguments:
+609
+610            coord -- str or tuple of int : coordinates in row
+611
+612            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+613                         'currency', 'percentage' or 'all'
+614
+615            complete -- boolean
+616
+617            get_type -- boolean
+618
+619        Return: list of Python types, or list of tuples.
+620        """
+621        if coord:
+622            x, z = self._translate_row_coordinates(coord)
+623        else:
+624            x = None
+625            z = None
+626        if cell_type:
+627            cell_type = cell_type.lower().strip()
+628            values: list[Any | tuple[Any, Any]] = []
+629            for cell in self.traverse(start=x, end=z):
+630                # Filter the cells by cell_type
+631                ctype = cell.type
+632                if not ctype or not (ctype == cell_type or cell_type == "all"):
+633                    if complete:
+634                        if get_type:
+635                            values.append((None, None))
+636                        else:
+637                            values.append(None)
+638                    continue
+639                values.append(cell.get_value(get_type=get_type))
+640            return values
+641        else:
+642            return [
+643                cell.get_value(get_type=get_type)
+644                for cell in self.traverse(start=x, end=z)
+645            ]
+646
+647    def set_cells(
+648        self,
+649        cells: list[Cell] | tuple[Cell] | None = None,
+650        start: int | str = 0,
+651        clone: bool = True,
+652    ) -> None:
+653        """Set the cells in the row, from the 'start' column.
+654        This method does not clear the row, use row.clear() before to start
+655        with an empty row.
+656
+657        Arguments:
+658
+659            cells -- list of cells
+660
+661            start -- int or str
+662        """
+663        if cells is None:
+664            cells = []
+665        if start is None:
+666            start = 0
+667        else:
+668            start = self._translate_x_from_any(start)
+669        if start == 0 and clone is False and (len(cells) >= self.width):
+670            self.clear()
+671            self.extend_cells(cells)
+672        else:
+673            x = start
+674            for cell in cells:
+675                self.set_cell(x, cell, clone=clone)
+676                if cell:
+677                    x += cell.repeated or 1
+678                else:
+679                    x += 1
+680
+681    def set_values(
+682        self,
+683        values: list[Any],
+684        start: int | str = 0,
+685        style: str | None = None,
+686        cell_type: str | None = None,
+687        currency: str | None = None,
+688    ) -> None:
+689        """Shortcut to set the value of cells in the row, from the 'start'
+690        column vith values.
+691        This method does not clear the row, use row.clear() before to start
+692        with an empty row.
+693
+694        Arguments:
+695
+696            values -- list of Python types
+697
+698            start -- int or str
+699
+700            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+701                         'currency' or 'percentage'
+702
+703            currency -- three-letter str
+704
+705            style -- cell style
+706        """
+707        # fixme : if values n, n+ are same, use repeat
+708        if start is None:
+709            start = 0
+710        else:
+711            start = self._translate_x_from_any(start)
+712        if start == 0 and (len(values) >= self.width):
+713            self.clear()
+714            cells = [
+715                Cell(value, style=style, cell_type=cell_type, currency=currency)
+716                for value in values
+717            ]
+718            self.extend_cells(cells)
+719        else:
+720            x = start
+721            for value in values:
+722                self.set_cell(
+723                    x,
+724                    Cell(value, style=style, cell_type=cell_type, currency=currency),
+725                    clone=False,
+726                )
+727                x += 1
+728
+729    def rstrip(self, aggressive: bool = False) -> None:
+730        """Remove *in-place* empty cells at the right of the row. An empty
+731        cell has no value but can have style. If "aggressive" is True, style
+732        is ignored.
+733
+734        Arguments:
+735
+736            aggressive -- bool
+737        """
+738        for cell in reversed(self._get_cells()):
+739            if not cell.is_empty(aggressive=aggressive):  # type: ignore
+740                break
+741            self.delete(cell)
+742        self._compute_row_cache()
+743        self._indexes["_rmap"] = {}
+744
+745    def is_empty(self, aggressive: bool = False) -> bool:
+746        """Return whether every cell in the row has no value or the value
+747        evaluates to False (empty string), and no style.
+748
+749        If aggressive is True, empty cells with style are considered empty.
+750
+751        Arguments:
+752
+753            aggressive -- bool
+754
+755        Return: bool
+756        """
+757        return all(cell.is_empty(aggressive=aggressive) for cell in self._get_cells())  # type: ignore
+
+ + +

ODF table row "table:table-row"

+
+ + +
+ +
+ + Row( width: int | None = None, repeated: int | None = None, style: str | None = None, **kwargs: Any) + + + +
+ +
59    def __init__(
+60        self,
+61        width: int | None = None,
+62        repeated: int | None = None,
+63        style: str | None = None,
+64        **kwargs: Any,
+65    ) -> None:
+66        """create a Row, optionally filled with "width" number of cells.
+67
+68        Rows contain cells, their number determine the number of columns.
+69
+70        You don't generally have to create rows by hand, use the Table API.
+71
+72        Arguments:
+73
+74            width -- int
+75
+76            repeated -- int
+77
+78            style -- str
+79        """
+80        super().__init__(**kwargs)
+81        self.y = None
+82        if not hasattr(self, "_indexes"):
+83            self._indexes = {}
+84            self._indexes["_rmap"] = {}
+85        if not hasattr(self, "_rmap"):
+86            self._compute_row_cache()
+87            if not hasattr(self, "_tmap"):
+88                self._tmap = []
+89                self._cmap = []
+90        if self._do_init:
+91            if width is not None:
+92                for _i in range(width):
+93                    self.append(Cell())  # type:ignore
+94            if repeated:
+95                self.repeated = repeated
+96            if style is not None:
+97                self.style = style
+98            self._compute_row_cache()
+
+ + +

create a Row, optionally filled with "width" number of cells.

+ +

Rows contain cells, their number determine the number of columns.

+ +

You don't generally have to create rows by hand, use the Table API.

+ +

Arguments:

+ +
width -- int
+
+repeated -- int
+
+style -- str
+
+
+ + +
+
+
+ y + + +
+ + + + +
+
+ +
+ clone: Row + + + +
+ +
126    @property
+127    def clone(self) -> Row:
+128        clone = Element.clone.fget(self)  # type: ignore
+129        clone.y = self.y
+130        if hasattr(self, "_tmap"):
+131            if hasattr(self, "_rmap"):
+132                clone._rmap = self._rmap[:]
+133            clone._tmap = self._tmap[:]
+134            clone._cmap = self._cmap[:]
+135        return clone
+
+ + + + +
+
+ +
+ repeated: int | None + + + +
+ +
151    @property
+152    def repeated(self) -> int | None:
+153        """Get / set the number of times the row is repeated.
+154
+155        Always None when using the table API.
+156
+157        Return: int or None
+158        """
+159        repeated = self.get_attribute("table:number-rows-repeated")
+160        if repeated is None:
+161            return None
+162        return int(repeated)
+
+ + +

Get / set the number of times the row is repeated.

+ +

Always None when using the table API.

+ +

Return: int or None

+
+ + +
+
+ +
+ style: str | None + + + +
+ +
188    @property
+189    def style(self) -> str | None:
+190        """Get /set the style of the row itself.
+191
+192        Return: str
+193        """
+194        return self.get_attribute("table:style-name")  # type: ignore
+
+ + +

Get /set the style of the row itself.

+ +

Return: str

+
+ + +
+
+ +
+ width: int + + + +
+ +
200    @property
+201    def width(self) -> int:
+202        """Get the number of expected cells in the row, i.e. addition
+203        repetitions.
+204
+205        Return: int
+206        """
+207        try:
+208            value = self._rmap[-1] + 1
+209        except Exception:
+210            value = 0
+211        return value
+
+ + +

Get the number of expected cells in the row, i.e. addition +repetitions.

+ +

Return: int

+
+ + +
+
+ +
+ + def + traverse( self, start: int | None = None, end: int | None = None) -> collections.abc.Iterator[Cell]: + + + +
+ +
216    def traverse(  # noqa: C901
+217        self,
+218        start: int | None = None,
+219        end: int | None = None,
+220    ) -> Iterator[Cell]:
+221        """Yield as many cell elements as expected cells in the row, i.e.
+222        expand repetitions by returning the same cell as many times as
+223        necessary.
+224
+225            Arguments:
+226
+227                start -- int
+228
+229                end -- int
+230
+231        Copies are returned, use set_cell() to push them back.
+232        """
+233        idx = -1
+234        before = -1
+235        x = 0
+236        cell: Cell
+237        if start is None and end is None:
+238            for juska in self._rmap:
+239                idx += 1
+240                if idx in self._indexes["_rmap"]:
+241                    cell = self._indexes["_rmap"][idx]
+242                else:
+243                    cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
+244                    if not isinstance(cell, Cell):
+245                        raise TypeError(f"Not a cell: {cell!r}")
+246                    self._indexes["_rmap"][idx] = cell
+247                repeated = juska - before
+248                before = juska
+249                for _i in range(repeated or 1):
+250                    # Return a copy without the now obsolete repetition
+251                    if cell is None:
+252                        cell = Cell()
+253                    else:
+254                        cell = cell.clone
+255                        if repeated > 1:
+256                            cell.repeated = None
+257                    cell.y = self.y
+258                    cell.x = x
+259                    x += 1
+260                    yield cell
+261        else:
+262            if start is None:
+263                start = 0
+264            start = max(0, start)
+265            if end is None:
+266                try:
+267                    end = self._rmap[-1]
+268                except Exception:
+269                    end = -1
+270            start_map = find_odf_idx(self._rmap, start)
+271            if start_map is None:
+272                return
+273            if start_map > 0:
+274                before = self._rmap[start_map - 1]
+275            idx = start_map - 1
+276            before = start - 1
+277            x = start
+278            for juska in self._rmap[start_map:]:
+279                idx += 1
+280                if idx in self._indexes["_rmap"]:
+281                    cell = self._indexes["_rmap"][idx]
+282                else:
+283                    cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
+284                    if not isinstance(cell, Cell):
+285                        raise TypeError(f"Not a cell: {cell!r}")
+286                    self._indexes["_rmap"][idx] = cell
+287                repeated = juska - before
+288                before = juska
+289                for _i in range(repeated or 1):
+290                    if x <= end:
+291                        if cell is None:
+292                            cell = Cell()
+293                        else:
+294                            cell = cell.clone
+295                            if repeated > 1 or (x == start and start > 0):
+296                                cell.repeated = None
+297                        cell.y = self.y
+298                        cell.x = x
+299                        x += 1
+300                        yield cell
+
+ + +

Yield as many cell elements as expected cells in the row, i.e. +expand repetitions by returning the same cell as many times as +necessary.

+ +
Arguments:
+
+    start -- int
+
+    end -- int
+
+ +

Copies are returned, use set_cell() to push them back.

+
+ + +
+
+ +
+ + def + get_cells( self, coord: str | tuple | None = None, style: str | None = None, content: str | None = None, cell_type: str | None = None) -> list[Cell]: + + + +
+ +
302    def get_cells(
+303        self,
+304        coord: str | tuple | None = None,
+305        style: str | None = None,
+306        content: str | None = None,
+307        cell_type: str | None = None,
+308    ) -> list[Cell]:
+309        """Get the list of cells matching the criteria.
+310
+311        Filter by cell_type, with cell_type 'all' will retrieve cells of any
+312        type, aka non empty cells.
+313
+314        Filter by coordinates will retrieve the amount of cells defined by
+315        'coord', minus the other filters.
+316
+317        Arguments:
+318
+319            coord -- str or tuple of int : coordinates
+320
+321            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+322                         'currency', 'percentage' or 'all'
+323
+324            content -- str regex
+325
+326            style -- str
+327
+328        Return: list of Cell
+329        """
+330        # fixme : not clones ?
+331        if coord:
+332            x, z = self._translate_row_coordinates(coord)
+333        else:
+334            x = None
+335            z = None
+336        if cell_type:
+337            cell_type = cell_type.lower().strip()
+338        cells: list[Cell] = []
+339        for cell in self.traverse(start=x, end=z):
+340            # Filter the cells by cell_type
+341            if cell_type:
+342                ctype = cell.type
+343                if not ctype or not (ctype == cell_type or cell_type == "all"):
+344                    continue
+345            # Filter the cells with the regex
+346            if content and not cell.match(content):
+347                continue
+348            # Filter the cells with the style
+349            if style and style != cell.style:
+350                continue
+351            cells.append(cell)
+352        return cells
+
+ + +

Get the list of cells matching the criteria.

+ +

Filter by cell_type, with cell_type 'all' will retrieve cells of any +type, aka non empty cells.

+ +

Filter by coordinates will retrieve the amount of cells defined by +'coord', minus the other filters.

+ +

Arguments:

+ +
coord -- str or tuple of int : coordinates
+
+cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+             'currency', 'percentage' or 'all'
+
+content -- str regex
+
+style -- str
+
+ +

Return: list of Cell

+
+ + +
+
+ +
+ + def + get_cell(self, x: int, clone: bool = True) -> Cell | None: + + + +
+ +
374    def get_cell(self, x: int, clone: bool = True) -> Cell | None:
+375        """Get the cell at position "x" starting from 0. Alphabetical
+376        positions like "D" are accepted.
+377
+378        A  copy is returned, use set_cell() to push it back.
+379
+380        Arguments:
+381
+382            x -- int or str
+383
+384        Return: Cell | None
+385        """
+386        x = self._translate_x_from_any(x)
+387        cell = self._get_cell2(x, clone=clone)
+388        if not cell:
+389            return None
+390        cell.y = self.y
+391        cell.x = x
+392        return cell
+
+ + +

Get the cell at position "x" starting from 0. Alphabetical +positions like "D" are accepted.

+ +

A copy is returned, use set_cell() to push it back.

+ +

Arguments:

+ +
x -- int or str
+
+ +

Return: Cell | None

+
+ + +
+
+ +
+ + def + get_value( self, x: int | str, get_type: bool = False) -> typing.Any | tuple[typing.Any, str]: + + + +
+ +
394    def get_value(
+395        self,
+396        x: int | str,
+397        get_type: bool = False,
+398    ) -> Any | tuple[Any, str]:
+399        """Shortcut to get the value of the cell at position "x".
+400        If get_type is True, returns the tuples (value, ODF type).
+401
+402        If the cell is empty, returns None or (None, None)
+403
+404        See get_cell() and Cell.get_value().
+405        """
+406        if get_type:
+407            x = self._translate_x_from_any(x)
+408            cell = self._get_cell2_base(x)
+409            if cell is None:
+410                return (None, None)
+411            return cell.get_value(get_type=get_type)
+412        x = self._translate_x_from_any(x)
+413        cell = self._get_cell2_base(x)
+414        if cell is None:
+415            return None
+416        return cell.get_value()
+
+ + +

Shortcut to get the value of the cell at position "x". +If get_type is True, returns the tuples (value, ODF type).

+ +

If the cell is empty, returns None or (None, None)

+ +

See get_cell() and Cell.get_value().

+
+ + +
+
+ +
+ + def + set_cell( self, x: int | str, cell: Cell | None = None, clone: bool = True) -> Cell: + + + +
+ +
418    def set_cell(
+419        self,
+420        x: int | str,
+421        cell: Cell | None = None,
+422        clone: bool = True,
+423    ) -> Cell:
+424        """Push the cell back in the row at position "x" starting from 0.
+425        Alphabetical positions like "D" are accepted.
+426
+427        Arguments:
+428
+429            x -- int or str
+430
+431        returns the cell with x and y updated
+432        """
+433        cell_back: Cell
+434        if cell is None:
+435            cell = Cell()
+436            repeated = 1
+437            clone = False
+438        else:
+439            repeated = cell.repeated or 1
+440        x = self._translate_x_from_any(x)
+441        # Outside the defined row
+442        diff = x - self.width
+443        if diff == 0:
+444            cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
+445        elif diff > 0:
+446            self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
+447            cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
+448        else:
+449            # Inside the defined row
+450            set_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap", clone=clone)
+451            cell.x = x
+452            cell.y = self.y
+453            cell_back = cell
+454        return cell_back
+
+ + +

Push the cell back in the row at position "x" starting from 0. +Alphabetical positions like "D" are accepted.

+ +

Arguments:

+ +
x -- int or str
+
+ +

returns the cell with x and y updated

+
+ + +
+
+ +
+ + def + set_value( self, x: int | str, value: Any, style: str | None = None, cell_type: str | None = None, currency: str | None = None) -> None: + + + +
+ +
456    def set_value(
+457        self,
+458        x: int | str,
+459        value: Any,
+460        style: str | None = None,
+461        cell_type: str | None = None,
+462        currency: str | None = None,
+463    ) -> None:
+464        """Shortcut to set the value of the cell at position "x".
+465
+466        Arguments:
+467
+468            x -- int or str
+469
+470            value -- Python type
+471
+472            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+473                     'string' or 'time'
+474
+475            currency -- three-letter str
+476
+477            style -- str
+478
+479        See get_cell() and Cell.get_value().
+480        """
+481        self.set_cell(
+482            x,
+483            Cell(value, style=style, cell_type=cell_type, currency=currency),
+484            clone=False,
+485        )
+
+ + +

Shortcut to set the value of the cell at position "x".

+ +

Arguments:

+ +
x -- int or str
+
+value -- Python type
+
+cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+         'string' or 'time'
+
+currency -- three-letter str
+
+style -- str
+
+ +

See get_cell() and Cell.get_value().

+
+ + +
+
+ +
+ + def + insert_cell( self, x: int | str, cell: Cell | None = None, clone: bool = True) -> Cell: + + + +
+ +
487    def insert_cell(
+488        self,
+489        x: int | str,
+490        cell: Cell | None = None,
+491        clone: bool = True,
+492    ) -> Cell:
+493        """Insert the given cell at position "x" starting from 0. If no cell
+494        is given, an empty one is created.
+495
+496        Alphabetical positions like "D" are accepted.
+497
+498        Do not use when working on a table, use Table.insert_cell().
+499
+500        Arguments:
+501
+502            x -- int or str
+503
+504            cell -- Cell
+505
+506        returns the cell with x and y updated
+507        """
+508        cell_back: Cell
+509        if cell is None:
+510            cell = Cell()
+511        x = self._translate_x_from_any(x)
+512        # Outside the defined row
+513        diff = x - self.width
+514        if diff < 0:
+515            insert_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap")
+516            cell.x = x
+517            cell.y = self.y
+518            cell_back = cell
+519        elif diff == 0:
+520            cell_back = self.append_cell(cell, clone=clone)
+521        else:
+522            self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
+523            cell_back = self.append_cell(cell, clone=clone)
+524        return cell_back
+
+ + +

Insert the given cell at position "x" starting from 0. If no cell +is given, an empty one is created.

+ +

Alphabetical positions like "D" are accepted.

+ +

Do not use when working on a table, use Table.insert_cell().

+ +

Arguments:

+ +
x -- int or str
+
+cell -- Cell
+
+ +

returns the cell with x and y updated

+
+ + +
+
+ +
+ + def + extend_cells( self, cells: collections.abc.Iterable[Cell] | None = None) -> None: + + + +
+ +
526    def extend_cells(self, cells: Iterable[Cell] | None = None) -> None:
+527        if cells is None:
+528            cells = []
+529        self.extend(cells)
+530        self._compute_row_cache()
+
+ + + + +
+
+ +
+ + def + append_cell( self, cell: Cell | None = None, clone: bool = True, _repeated: int | None = None) -> Cell: + + + +
+ +
532    def append_cell(
+533        self,
+534        cell: Cell | None = None,
+535        clone: bool = True,
+536        _repeated: int | None = None,
+537    ) -> Cell:
+538        """Append the given cell at the end of the row. Repeated cells are
+539        accepted. If no cell is given, an empty one is created.
+540
+541        Do not use when working on a table, use Table.append_cell().
+542
+543        Arguments:
+544
+545            cell -- Cell
+546
+547            _repeated -- (optional), repeated value of the row
+548
+549        returns the cell with x and y updated
+550        """
+551        if cell is None:
+552            cell = Cell()
+553            clone = False
+554        if clone:
+555            cell = cell.clone
+556        self._append(cell)
+557        if _repeated is None:
+558            _repeated = cell.repeated or 1
+559        self._rmap = insert_map_once(self._rmap, len(self._rmap), _repeated)
+560        cell.x = self.width - 1
+561        cell.y = self.y
+562        return cell
+
+ + +

Append the given cell at the end of the row. Repeated cells are +accepted. If no cell is given, an empty one is created.

+ +

Do not use when working on a table, use Table.append_cell().

+ +

Arguments:

+ +
cell -- Cell
+
+_repeated -- (optional), repeated value of the row
+
+ +

returns the cell with x and y updated

+
+ + +
+
+ +
+ + def + append( self, cell: Cell | None = None, clone: bool = True, _repeated: int | None = None) -> Cell: + + + +
+ +
532    def append_cell(
+533        self,
+534        cell: Cell | None = None,
+535        clone: bool = True,
+536        _repeated: int | None = None,
+537    ) -> Cell:
+538        """Append the given cell at the end of the row. Repeated cells are
+539        accepted. If no cell is given, an empty one is created.
+540
+541        Do not use when working on a table, use Table.append_cell().
+542
+543        Arguments:
+544
+545            cell -- Cell
+546
+547            _repeated -- (optional), repeated value of the row
+548
+549        returns the cell with x and y updated
+550        """
+551        if cell is None:
+552            cell = Cell()
+553            clone = False
+554        if clone:
+555            cell = cell.clone
+556        self._append(cell)
+557        if _repeated is None:
+558            _repeated = cell.repeated or 1
+559        self._rmap = insert_map_once(self._rmap, len(self._rmap), _repeated)
+560        cell.x = self.width - 1
+561        cell.y = self.y
+562        return cell
+
+ + +

Append the given cell at the end of the row. Repeated cells are +accepted. If no cell is given, an empty one is created.

+ +

Do not use when working on a table, use Table.append_cell().

+ +

Arguments:

+ +
cell -- Cell
+
+_repeated -- (optional), repeated value of the row
+
+ +

returns the cell with x and y updated

+
+ + +
+
+ +
+ + def + delete_cell(self, x: int | str) -> None: + + + +
+ +
567    def delete_cell(self, x: int | str) -> None:
+568        """Delete the cell at the given position "x" starting from 0.
+569        Alphabetical positions like "D" are accepted.
+570
+571        Cells on the right will be shifted to the left. In a table, other
+572        rows remain unaffected.
+573
+574        Arguments:
+575
+576            x -- int or str
+577        """
+578        x = self._translate_x_from_any(x)
+579        if x >= self.width:
+580            return
+581        delete_item_in_vault(x, self, _xpath_cell_idx, "_rmap")
+
+ + +

Delete the cell at the given position "x" starting from 0. +Alphabetical positions like "D" are accepted.

+ +

Cells on the right will be shifted to the left. In a table, other +rows remain unaffected.

+ +

Arguments:

+ +
x -- int or str
+
+
+ + +
+
+ +
+ + def + get_values( self, coord: str | tuple | None = None, cell_type: str | None = None, complete: bool = False, get_type: bool = False) -> list[typing.Any | tuple[typing.Any, typing.Any]]: + + + +
+ +
583    def get_values(
+584        self,
+585        coord: str | tuple | None = None,
+586        cell_type: str | None = None,
+587        complete: bool = False,
+588        get_type: bool = False,
+589    ) -> list[Any | tuple[Any, Any]]:
+590        """Shortcut to get the cell values in this row.
+591
+592        Filter by cell_type, with cell_type 'all' will retrieve cells of any
+593        type, aka non empty cells.
+594        If cell_type is used and complete is True, missing values are
+595        replaced by None.
+596        If cell_type is None, complete is always True : with no cell type
+597        queried, get_values() returns None for each empty cell, the length
+598        of the list is equal to the length of the row (depending on
+599        coordinates use).
+600
+601        If get_type is True, returns a tuple (value, ODF type of value), or
+602        (None, None) for empty cells if complete is True.
+603
+604        Filter by coordinates will retrieve the amount of cells defined by
+605        coordinates with None for empty cells, except when using cell_type.
+606
+607
+608        Arguments:
+609
+610            coord -- str or tuple of int : coordinates in row
+611
+612            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+613                         'currency', 'percentage' or 'all'
+614
+615            complete -- boolean
+616
+617            get_type -- boolean
+618
+619        Return: list of Python types, or list of tuples.
+620        """
+621        if coord:
+622            x, z = self._translate_row_coordinates(coord)
+623        else:
+624            x = None
+625            z = None
+626        if cell_type:
+627            cell_type = cell_type.lower().strip()
+628            values: list[Any | tuple[Any, Any]] = []
+629            for cell in self.traverse(start=x, end=z):
+630                # Filter the cells by cell_type
+631                ctype = cell.type
+632                if not ctype or not (ctype == cell_type or cell_type == "all"):
+633                    if complete:
+634                        if get_type:
+635                            values.append((None, None))
+636                        else:
+637                            values.append(None)
+638                    continue
+639                values.append(cell.get_value(get_type=get_type))
+640            return values
+641        else:
+642            return [
+643                cell.get_value(get_type=get_type)
+644                for cell in self.traverse(start=x, end=z)
+645            ]
+
+ + +

Shortcut to get the cell values in this row.

+ +

Filter by cell_type, with cell_type 'all' will retrieve cells of any +type, aka non empty cells. +If cell_type is used and complete is True, missing values are +replaced by None. +If cell_type is None, complete is always True : with no cell type +queried, get_values() returns None for each empty cell, the length +of the list is equal to the length of the row (depending on +coordinates use).

+ +

If get_type is True, returns a tuple (value, ODF type of value), or +(None, None) for empty cells if complete is True.

+ +

Filter by coordinates will retrieve the amount of cells defined by +coordinates with None for empty cells, except when using cell_type.

+ +

Arguments:

+ +
coord -- str or tuple of int : coordinates in row
+
+cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+             'currency', 'percentage' or 'all'
+
+complete -- boolean
+
+get_type -- boolean
+
+ +

Return: list of Python types, or list of tuples.

+
+ + +
+
+ +
+ + def + set_cells( self, cells: list[Cell] | tuple[Cell] | None = None, start: int | str = 0, clone: bool = True) -> None: + + + +
+ +
647    def set_cells(
+648        self,
+649        cells: list[Cell] | tuple[Cell] | None = None,
+650        start: int | str = 0,
+651        clone: bool = True,
+652    ) -> None:
+653        """Set the cells in the row, from the 'start' column.
+654        This method does not clear the row, use row.clear() before to start
+655        with an empty row.
+656
+657        Arguments:
+658
+659            cells -- list of cells
+660
+661            start -- int or str
+662        """
+663        if cells is None:
+664            cells = []
+665        if start is None:
+666            start = 0
+667        else:
+668            start = self._translate_x_from_any(start)
+669        if start == 0 and clone is False and (len(cells) >= self.width):
+670            self.clear()
+671            self.extend_cells(cells)
+672        else:
+673            x = start
+674            for cell in cells:
+675                self.set_cell(x, cell, clone=clone)
+676                if cell:
+677                    x += cell.repeated or 1
+678                else:
+679                    x += 1
+
+ + +

Set the cells in the row, from the 'start' column. +This method does not clear the row, use row.clear() before to start +with an empty row.

+ +

Arguments:

+ +
cells -- list of cells
+
+start -- int or str
+
+
+ + +
+
+ +
+ + def + set_values( self, values: list[typing.Any], start: int | str = 0, style: str | None = None, cell_type: str | None = None, currency: str | None = None) -> None: + + + +
+ +
681    def set_values(
+682        self,
+683        values: list[Any],
+684        start: int | str = 0,
+685        style: str | None = None,
+686        cell_type: str | None = None,
+687        currency: str | None = None,
+688    ) -> None:
+689        """Shortcut to set the value of cells in the row, from the 'start'
+690        column vith values.
+691        This method does not clear the row, use row.clear() before to start
+692        with an empty row.
+693
+694        Arguments:
+695
+696            values -- list of Python types
+697
+698            start -- int or str
+699
+700            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+701                         'currency' or 'percentage'
+702
+703            currency -- three-letter str
+704
+705            style -- cell style
+706        """
+707        # fixme : if values n, n+ are same, use repeat
+708        if start is None:
+709            start = 0
+710        else:
+711            start = self._translate_x_from_any(start)
+712        if start == 0 and (len(values) >= self.width):
+713            self.clear()
+714            cells = [
+715                Cell(value, style=style, cell_type=cell_type, currency=currency)
+716                for value in values
+717            ]
+718            self.extend_cells(cells)
+719        else:
+720            x = start
+721            for value in values:
+722                self.set_cell(
+723                    x,
+724                    Cell(value, style=style, cell_type=cell_type, currency=currency),
+725                    clone=False,
+726                )
+727                x += 1
+
+ + +

Shortcut to set the value of cells in the row, from the 'start' +column vith values. +This method does not clear the row, use row.clear() before to start +with an empty row.

+ +

Arguments:

+ +
values -- list of Python types
+
+start -- int or str
+
+cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+             'currency' or 'percentage'
+
+currency -- three-letter str
+
+style -- cell style
+
+
+ + +
+
+ +
+ + def + rstrip(self, aggressive: bool = False) -> None: + + + +
+ +
729    def rstrip(self, aggressive: bool = False) -> None:
+730        """Remove *in-place* empty cells at the right of the row. An empty
+731        cell has no value but can have style. If "aggressive" is True, style
+732        is ignored.
+733
+734        Arguments:
+735
+736            aggressive -- bool
+737        """
+738        for cell in reversed(self._get_cells()):
+739            if not cell.is_empty(aggressive=aggressive):  # type: ignore
+740                break
+741            self.delete(cell)
+742        self._compute_row_cache()
+743        self._indexes["_rmap"] = {}
+
+ + +

Remove in-place empty cells at the right of the row. An empty +cell has no value but can have style. If "aggressive" is True, style +is ignored.

+ +

Arguments:

+ +
aggressive -- bool
+
+
+ + +
+
+ +
+ + def + is_empty(self, aggressive: bool = False) -> bool: + + + +
+ +
745    def is_empty(self, aggressive: bool = False) -> bool:
+746        """Return whether every cell in the row has no value or the value
+747        evaluates to False (empty string), and no style.
+748
+749        If aggressive is True, empty cells with style are considered empty.
+750
+751        Arguments:
+752
+753            aggressive -- bool
+754
+755        Return: bool
+756        """
+757        return all(cell.is_empty(aggressive=aggressive) for cell in self._get_cells())  # type: ignore
+
+ + +

Return whether every cell in the row has no value or the value +evaluates to False (empty string), and no style.

+ +

If aggressive is True, empty cells with style are considered empty.

+ +

Arguments:

+ +
aggressive -- bool
+
+ +

Return: bool

+
+ + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
get_between
+
insert
+
extend
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + RowGroup(odfdo.Element): + + + +
+ +
133class RowGroup(Element):
+134    """ "table:table-row-group" group rows with common properties."""
+135
+136    # TODO
+137    _tag = "table:table-row-group"
+138    _caching = True
+139
+140    def __init__(
+141        self,
+142        height: int | None = None,
+143        width: int | None = None,
+144        **kwargs: Any,
+145    ) -> None:
+146        """Create a group of rows, optionnaly filled with "height" number of
+147        rows, of "width" cells each.
+148
+149        Row group bear style information applied to a series of rows.
+150
+151        Arguments:
+152
+153            height -- int
+154
+155            width -- int
+156        """
+157        super().__init__(**kwargs)
+158        if self._do_init and height is not None:
+159            for _i in range(height):
+160                row = Row(width=width)
+161                self.append(row)
+
+ + +

"table:table-row-group" group rows with common properties.

+
+ + +
+ +
+ + RowGroup(height: int | None = None, width: int | None = None, **kwargs: Any) + + + +
+ +
140    def __init__(
+141        self,
+142        height: int | None = None,
+143        width: int | None = None,
+144        **kwargs: Any,
+145    ) -> None:
+146        """Create a group of rows, optionnaly filled with "height" number of
+147        rows, of "width" cells each.
+148
+149        Row group bear style information applied to a series of rows.
+150
+151        Arguments:
+152
+153            height -- int
+154
+155            width -- int
+156        """
+157        super().__init__(**kwargs)
+158        if self._do_init and height is not None:
+159            for _i in range(height):
+160                row = Row(width=width)
+161                self.append(row)
+
+ + +

Create a group of rows, optionnaly filled with "height" number of +rows, of "width" cells each.

+ +

Row group bear style information applied to a series of rows.

+ +

Arguments:

+ +
height -- int
+
+width -- int
+
+
+ + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Section(odfdo.Element): + + + +
+ +
32class Section(Element):
+33    """ODF section "text:section"
+34
+35    Arguments:
+36
+37        style -- str
+38
+39        name -- str
+40    """
+41
+42    _tag = "text:section"
+43    _properties = (
+44        PropDef("style", "text:style-name"),
+45        PropDef("name", "text:name"),
+46    )
+47
+48    def __init__(
+49        self,
+50        style: str | None = None,
+51        name: str | None = None,
+52        **kwargs: Any,
+53    ) -> None:
+54        super().__init__(**kwargs)
+55        if self._do_init:
+56            if style:
+57                self.style = style
+58            if name:
+59                self.name = name
+60
+61    def get_formatted_text(self, context: dict | None = None) -> str:
+62        result = [element.get_formatted_text(context) for element in self.children]
+63        result.append("\n")
+64        return "".join(result)
+
+ + +

ODF section "text:section"

+ +

Arguments:

+ +
style -- str
+
+name -- str
+
+
+ + +
+ +
+ + Section(style: str | None = None, name: str | None = None, **kwargs: Any) + + + +
+ +
48    def __init__(
+49        self,
+50        style: str | None = None,
+51        name: str | None = None,
+52        **kwargs: Any,
+53    ) -> None:
+54        super().__init__(**kwargs)
+55        if self._do_init:
+56            if style:
+57                self.style = style
+58            if name:
+59                self.name = name
+
+ + + + +
+
+ +
+ + def + get_formatted_text(self, context: dict | None = None) -> str: + + + +
+ +
61    def get_formatted_text(self, context: dict | None = None) -> str:
+62        result = [element.get_formatted_text(context) for element in self.children]
+63        result.append("\n")
+64        return "".join(result)
+
+ + +

This function should return a beautiful version of the text.

+
+ + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Spacer(odfdo.Element): + + + +
+ +
169class Spacer(Element):
+170    """This element shall be used to represent the second and all following “ “
+171    (U+0020, SPACE) characters in a sequence of “ “ (U+0020, SPACE) characters.
+172    Note: It is not an error if the character preceding the element is not a
+173    white space character, but it is good practice to use this element only for
+174    the second and all following SPACE characters in a sequence.
+175    """
+176
+177    _tag = "text:s"
+178    _properties: tuple[PropDef, ...] = (PropDef("number", "text:c"),)
+179
+180    def __init__(self, number: int = 1, **kwargs: Any):
+181        """
+182        Arguments:
+183
+184            number -- int
+185        """
+186        super().__init__(**kwargs)
+187        if self._do_init:
+188            self.number = str(number)
+
+ + +

This element shall be used to represent the second and all following “ “ +(U+0020, SPACE) characters in a sequence of “ “ (U+0020, SPACE) characters. +Note: It is not an error if the character preceding the element is not a +white space character, but it is good practice to use this element only for +the second and all following SPACE characters in a sequence.

+
+ + +
+ +
+ + Spacer(number: int = 1, **kwargs: Any) + + + +
+ +
180    def __init__(self, number: int = 1, **kwargs: Any):
+181        """
+182        Arguments:
+183
+184            number -- int
+185        """
+186        super().__init__(**kwargs)
+187        if self._do_init:
+188            self.number = str(number)
+
+ + +

Arguments:

+ +
number -- int
+
+
+ + +
+
+ +
+ number: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Span(odfdo.Paragraph): + + + +
+ +
799class Span(Paragraph):
+800    """Create a span element "text:span" of the given style containing the optional
+801    given text.
+802    """
+803
+804    _tag = "text:span"
+805    _properties = (
+806        PropDef("style", "text:style-name"),
+807        PropDef("class_names", "text:class-names"),
+808    )
+809
+810    def __init__(
+811        self,
+812        text: str | None = None,
+813        style: str | None = None,
+814        **kwargs: Any,
+815    ) -> None:
+816        """
+817        Arguments:
+818
+819            text -- str
+820
+821            style -- str
+822        """
+823        super().__init__(**kwargs)
+824        if self._do_init:
+825            if text:
+826                self.text = text
+827            if style:
+828                self.style = style
+
+ + +

Create a span element "text:span" of the given style containing the optional +given text.

+
+ + +
+ +
+ + Span(text: str | None = None, style: str | None = None, **kwargs: Any) + + + +
+ +
810    def __init__(
+811        self,
+812        text: str | None = None,
+813        style: str | None = None,
+814        **kwargs: Any,
+815    ) -> None:
+816        """
+817        Arguments:
+818
+819            text -- str
+820
+821            style -- str
+822        """
+823        super().__init__(**kwargs)
+824        if self._do_init:
+825            if text:
+826                self.text = text
+827            if style:
+828                self.style = style
+
+ + +

Arguments:

+ +
text -- str
+
+style -- str
+
+
+ + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ class_names: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+ +
odfdo.paragraph_base.ParagraphBase
+
get_formatted_text
+
append_plain_text
+ +
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Style(odfdo.Element): + + + +
+ +
 340class Style(Element):
+ 341    """Style class for all these tags:
+ 342
+ 343    'style:style'
+ 344    'number:date-style',
+ 345    'number:number-style',
+ 346    'number:percentage-style',
+ 347    'number:time-style'
+ 348    'style:font-face',
+ 349    'style:master-page',
+ 350    'style:page-layout',
+ 351    'style:presentation-page-layout',
+ 352    'text:list-style',
+ 353    'text:outline-style',
+ 354    'style:tab-stops',
+ 355    ...
+ 356    """
+ 357
+ 358    _properties: tuple[PropDef, ...] = (
+ 359        PropDef("page_layout", "style:page-layout-name", "master-page"),
+ 360        PropDef("next_style", "style:next-style-name", "master-page"),
+ 361        PropDef("name", "style:name"),
+ 362        PropDef("parent_style", "style:parent-style-name"),
+ 363        PropDef("display_name", "style:display-name"),
+ 364        PropDef("svg_font_family", "svg:font-family"),
+ 365        PropDef("font_family_generic", "style:font-family-generic"),
+ 366        PropDef("font_pitch", "style:font-pitch"),
+ 367        PropDef("text_style", "text:style-name"),
+ 368        PropDef("master_page", "style:master-page-name", "paragraph"),
+ 369        PropDef("master_page", "style:master-page-name", "paragraph"),
+ 370        PropDef("master_page", "style:master-page-name", "paragraph"),
+ 371        # style:tab-stop
+ 372        PropDef("style_type", "style:type"),
+ 373        PropDef("leader_style", "style:leader-style"),
+ 374        PropDef("leader_text", "style:leader-text"),
+ 375        PropDef("style_position", "style:position"),
+ 376        PropDef("leader_text", "style:position"),
+ 377    )
+ 378
+ 379    def __init__(  # noqa: C901
+ 380        self,
+ 381        family: str | None = None,
+ 382        name: str | None = None,
+ 383        display_name: str | None = None,
+ 384        parent_style: str | None = None,
+ 385        # Where properties apply
+ 386        area: str | None = None,
+ 387        # For family 'text':
+ 388        color: str | tuple | None = None,
+ 389        background_color: str | tuple | None = None,
+ 390        italic: bool = False,
+ 391        bold: bool = False,
+ 392        # For family 'paragraph'
+ 393        master_page: str | None = None,
+ 394        # For family 'master-page'
+ 395        page_layout: str | None = None,
+ 396        next_style: str | None = None,
+ 397        # For family 'table-cell'
+ 398        data_style: str | None = None,  # unused
+ 399        border: str | None = None,
+ 400        border_top: str | None = None,
+ 401        border_right: str | None = None,
+ 402        border_bottom: str | None = None,
+ 403        border_left: str | None = None,
+ 404        padding: str | None = None,
+ 405        padding_top: str | None = None,
+ 406        padding_bottom: str | None = None,
+ 407        padding_left: str | None = None,
+ 408        padding_right: str | None = None,
+ 409        shadow: str | None = None,
+ 410        # For family 'table-row'
+ 411        height: str | None = None,
+ 412        use_optimal_height: bool = False,
+ 413        # For family 'table-column'
+ 414        width: str | None = None,
+ 415        break_before: str | None = None,
+ 416        break_after: str | None = None,
+ 417        # For family 'graphic'
+ 418        min_height: str | None = None,
+ 419        # For family 'font-face'
+ 420        font_name: str | None = None,
+ 421        font_family: str | None = None,
+ 422        font_family_generic: str | None = None,
+ 423        font_pitch: str = "variable",
+ 424        # Every other property
+ 425        **kwargs: Any,
+ 426    ) -> None:
+ 427        """Create a style of the given family. The name is not mandatory at this
+ 428        point but will become required when inserting in a document as a common
+ 429        style.
+ 430
+ 431        The display name is the name the user sees in an office application.
+ 432
+ 433        The parent_style is the name of the style this style will inherit from.
+ 434
+ 435        To set properties, pass them as keyword arguments. The area properties
+ 436        apply to is optional and defaults to the family.
+ 437
+ 438        Arguments:
+ 439
+ 440            family -- 'paragraph', 'text', 'section', 'table', 'table-column',
+ 441                      'table-row', 'table-cell', 'table-page', 'chart',
+ 442                      'drawing-page', 'graphic', 'presentation',
+ 443                      'control', 'ruby', 'list', 'number', 'page-layout'
+ 444                      'font-face', or 'master-page'
+ 445
+ 446            name -- str
+ 447
+ 448            display_name -- str
+ 449
+ 450            parent_style -- str
+ 451
+ 452            area -- str
+ 453
+ 454        'text' Properties:
+ 455
+ 456            italic -- bool
+ 457
+ 458            bold -- bool
+ 459
+ 460        'paragraph' Properties:
+ 461
+ 462            master_page -- str
+ 463
+ 464        'master-page' Properties:
+ 465
+ 466            page_layout -- str
+ 467
+ 468            next_style -- str
+ 469
+ 470        'table-cell' Properties:
+ 471
+ 472            border, border_top, border_right, border_bottom, border_left -- str,
+ 473            e.g. "0.002cm solid #000000" or 'none'
+ 474
+ 475            padding, padding_top, padding_right, padding_bottom, padding_left -- str,
+ 476            e.g. "0.002cm" or 'none'
+ 477
+ 478            shadow -- str, e.g. "#808080 0.176cm 0.176cm"
+ 479
+ 480        'table-row' Properties:
+ 481
+ 482            height -- str, e.g. '5cm'
+ 483
+ 484            use_optimal_height -- bool
+ 485
+ 486        'table-column' Properties:
+ 487
+ 488            width -- str, e.g. '5cm'
+ 489
+ 490            break_before -- 'page', 'column' or 'auto'
+ 491
+ 492            break_after -- 'page', 'column' or 'auto'
+ 493        """
+ 494        self._family: str | None = None
+ 495        tag_or_elem = kwargs.get("tag_or_elem", None)
+ 496        if tag_or_elem is None:
+ 497            family = to_str(family)
+ 498            if family not in FAMILY_MAPPING:
+ 499                raise ValueError("Unknown family value: %s" % family)
+ 500            kwargs["tag"] = FAMILY_MAPPING[family]
+ 501        super().__init__(**kwargs)
+ 502        if self._do_init and family not in SUBCLASSED_STYLES:
+ 503            kwargs.pop("tag", None)
+ 504            kwargs.pop("tag_or_elem", None)
+ 505            self.family = family  # relevant test made by property
+ 506            # Common attributes
+ 507            if name:
+ 508                self.name = name
+ 509            if display_name:
+ 510                self.display_name = display_name
+ 511            if parent_style:
+ 512                self.parent_style = parent_style
+ 513            # Paragraph
+ 514            if family == "paragraph":
+ 515                if master_page:
+ 516                    self.master_page = master_page
+ 517            # Master Page
+ 518            elif family == "master-page":
+ 519                if page_layout:
+ 520                    self.page_layout = page_layout
+ 521                if next_style:
+ 522                    self.next_style = next_style
+ 523            # Font face
+ 524            elif family == "font-face":
+ 525                if not font_name:
+ 526                    raise ValueError("A font_name is required for 'font-face' style")
+ 527                self.set_font(
+ 528                    font_name,
+ 529                    family=font_family,
+ 530                    family_generic=font_family_generic,
+ 531                    pitch=font_pitch,
+ 532                )
+ 533            # Properties
+ 534            if area is None:
+ 535                area = family
+ 536            area = to_str(area)
+ 537            # Text
+ 538            if area == "text":
+ 539                if color:
+ 540                    kwargs["fo:color"] = color
+ 541                if background_color:
+ 542                    kwargs["fo:background-color"] = background_color
+ 543                if italic:
+ 544                    kwargs["fo:font-style"] = "italic"
+ 545                    kwargs["style:font-style-asian"] = "italic"
+ 546                    kwargs["style:font-style-complex"] = "italic"
+ 547                if bold:
+ 548                    kwargs["fo:font-weight"] = "bold"
+ 549                    kwargs["style:font-weight-asian"] = "bold"
+ 550                    kwargs["style:font-weight-complex"] = "bold"
+ 551            # Table cell
+ 552            elif area == "table-cell":
+ 553                if border:
+ 554                    kwargs["fo:border"] = border
+ 555                elif border_top or border_right or border_bottom or border_left:
+ 556                    kwargs["fo:border-top"] = border_top or "none"
+ 557                    kwargs["fo:border-right"] = border_right or "none"
+ 558                    kwargs["fo:border-bottom"] = border_bottom or "none"
+ 559                    kwargs["fo:border-left"] = border_left or "none"
+ 560                else:  # no border_top, ... neither border are defined
+ 561                    pass  # left untouched
+ 562                if padding:
+ 563                    kwargs["fo:padding"] = padding
+ 564                elif padding_top or padding_right or padding_bottom or padding_left:
+ 565                    kwargs["fo:padding-top"] = padding_top or "none"
+ 566                    kwargs["fo:padding-right"] = padding_right or "none"
+ 567                    kwargs["fo:padding-bottom"] = padding_bottom or "none"
+ 568                    kwargs["fo:padding-left"] = padding_left or "none"
+ 569                else:  # no border_top, ... neither border are defined
+ 570                    pass  # left untouched
+ 571                if shadow:
+ 572                    kwargs["style:shadow"] = shadow
+ 573                if background_color:
+ 574                    kwargs["fo:background-color"] = background_color
+ 575            # Table row
+ 576            elif area == "table-row":
+ 577                if height:
+ 578                    kwargs["style:row-height"] = height
+ 579                if use_optimal_height:
+ 580                    kwargs["style:use-optimal-row-height"] = Boolean.encode(
+ 581                        use_optimal_height
+ 582                    )
+ 583                if background_color:
+ 584                    kwargs["fo:background-color"] = background_color
+ 585            # Table column
+ 586            elif area == "table-column":
+ 587                if width:
+ 588                    kwargs["style:column-width"] = width
+ 589                if break_before:
+ 590                    kwargs["fo:break-before"] = break_before
+ 591                if break_after:
+ 592                    kwargs["fo:break-after"] = break_after
+ 593            # Graphic
+ 594            elif area == "graphic":
+ 595                if min_height:
+ 596                    kwargs["fo:min-height"] = min_height
+ 597            # Every other properties
+ 598            if kwargs:
+ 599                self.set_properties(kwargs, area=area)
+ 600
+ 601    @property
+ 602    def family(self) -> str | None:
+ 603        if self._family is None:
+ 604            self._family = FALSE_FAMILY_MAP_REVERSE.get(
+ 605                self.tag, self.get_attribute_string("style:family")
+ 606            )
+ 607        return self._family
+ 608
+ 609    @family.setter
+ 610    def family(self, family: str | None) -> None:
+ 611        self._family = family
+ 612        if family in FAMILY_ODF_STD and self.tag == "style:style":
+ 613            self.set_attribute("style:family", family)
+ 614
+ 615    def get_properties(self, area: str | None = None) -> dict[str, str | dict] | None:
+ 616        """Get the mapping of all properties of this style. By default the
+ 617        properties of the same family, e.g. a paragraph style and its
+ 618        paragraph properties. Specify the area to get the text properties of
+ 619        a paragraph style for example.
+ 620
+ 621        Arguments:
+ 622
+ 623            area -- str
+ 624
+ 625        Return: dict
+ 626        """
+ 627        if area is None:
+ 628            area = self.family
+ 629        element = self.get_element(f"style:{area}-properties")
+ 630        if element is None:
+ 631            return None
+ 632        properties: dict[str, str | dict] = element.attributes  # type: ignore
+ 633        # Nested properties are nested dictionaries
+ 634        for child in element.children:
+ 635            properties[child.tag] = child.attributes
+ 636        return properties
+ 637
+ 638    def set_properties(  # noqa: C901
+ 639        self,
+ 640        properties: dict[str, str | dict] | None = None,
+ 641        style: Style | None = None,
+ 642        area: str | None = None,
+ 643        **kwargs: Any,
+ 644    ) -> None:
+ 645        """Set the properties of the "area" type of this style. Properties
+ 646        are given either as a dict or as named arguments (or both). The area
+ 647        is identical to the style family by default. If the properties
+ 648        element is missing, it is created.
+ 649
+ 650        Instead of properties, you can pass a style with properties of the
+ 651        same area. These will be copied.
+ 652
+ 653        Arguments:
+ 654
+ 655            properties -- dict
+ 656
+ 657            style -- Style
+ 658
+ 659            area -- 'paragraph', 'text'...
+ 660        """
+ 661        if properties is None:
+ 662            properties = {}
+ 663        if area is None:
+ 664            if isinstance(self.family, bool):
+ 665                area = None
+ 666            else:
+ 667                area = self.family
+ 668        element = self.get_element(f"style:{area}-properties")
+ 669        if element is None:
+ 670            element = Element.from_tag(f"style:{area}-properties")
+ 671            self.append(element)
+ 672        if properties or kwargs:
+ 673            properties = _expand_properties_dict(_merge_dicts(properties, kwargs))
+ 674        elif style is not None:
+ 675            properties = style.get_properties(area=area)
+ 676            if properties is None:
+ 677                return
+ 678        if properties is None:
+ 679            return
+ 680        for key, value in properties.items():
+ 681            if value is None:
+ 682                element.del_attribute(key)
+ 683            elif isinstance(value, (str, bool)):
+ 684                element.set_attribute(key, value)
+ 685            else:
+ 686                pass
+ 687
+ 688    def del_properties(
+ 689        self,
+ 690        properties: list[str] | None = None,
+ 691        area: str | None = None,
+ 692    ) -> None:
+ 693        """Delete the given properties, either by list argument or
+ 694        positional argument (or both). Remove only from the given area,
+ 695        identical to the style family by default.
+ 696
+ 697        Arguments:
+ 698
+ 699            properties -- list
+ 700
+ 701            area -- str
+ 702        """
+ 703        if properties is None:
+ 704            properties = []
+ 705        if area is None:
+ 706            area = self.family
+ 707        element = self.get_element(f"style:{area}-properties")
+ 708        if element is None:
+ 709            raise ValueError(
+ 710                f"properties element is inexistent for: style:{area}-properties"
+ 711            )
+ 712        for key in _expand_properties_list(properties):
+ 713            element.del_attribute(key)
+ 714
+ 715    def set_background(  # noqa: C901
+ 716        self,
+ 717        color: str | None = None,
+ 718        url: str | None = None,
+ 719        position: str | None = "center",
+ 720        repeat: str | None = None,
+ 721        opacity: str | None = None,
+ 722        filter: str | None = None,  # noqa: A002
+ 723    ) -> None:
+ 724        """Set the background color of a text style, or the background color
+ 725        or image of a paragraph style or page layout.
+ 726
+ 727        With no argument, remove any existing background.
+ 728
+ 729        The position is one or two of 'center', 'left', 'right', 'top' or
+ 730        'bottom'.
+ 731
+ 732        The repeat is 'no-repeat', 'repeat' or 'stretch'.
+ 733
+ 734        The opacity is a percentage integer (not a string with the '%s' sign)
+ 735
+ 736        The filter is an application-specific filter name defined elsewhere.
+ 737
+ 738        Though this method is defined on the base style class, it will raise
+ 739        an error if the style type is not compatible.
+ 740
+ 741        Arguments:
+ 742
+ 743            color -- '#rrggbb'
+ 744
+ 745            url -- str
+ 746
+ 747            position -- str
+ 748
+ 749            repeat -- str
+ 750
+ 751            opacity -- int
+ 752
+ 753            filter -- str
+ 754        """
+ 755        family = self.family
+ 756        if family not in {
+ 757            "text",
+ 758            "paragraph",
+ 759            "page-layout",
+ 760            "section",
+ 761            "table",
+ 762            "table-row",
+ 763            "table-cell",
+ 764            "graphic",
+ 765        }:
+ 766            raise TypeError("No background support for this family")
+ 767        if url is not None and family == "text":
+ 768            raise TypeError("No background image for text styles")
+ 769        properties = self.get_element(f"style:{family}-properties")
+ 770        bg_image: BackgroundImage | None = None
+ 771        if properties is not None:
+ 772            bg_image = properties.get_element("style:background-image")  # type:ignore
+ 773        # Erasing
+ 774        if color is None and url is None:
+ 775            if properties is None:
+ 776                return
+ 777            properties.del_attribute("fo:background-color")
+ 778            if bg_image is not None:
+ 779                properties.delete(bg_image)
+ 780            return
+ 781        # Add the properties if necessary
+ 782        if properties is None:
+ 783            properties = Element.from_tag(f"style:{family}-properties")
+ 784            self.append(properties)
+ 785        # Add the color...
+ 786        if color:
+ 787            properties.set_attribute("fo:background-color", color)
+ 788            if bg_image is not None:
+ 789                properties.delete(bg_image)
+ 790        # ... or the background
+ 791        elif url:
+ 792            properties.set_attribute("fo:background-color", "transparent")
+ 793            if bg_image is None:
+ 794                bg_image = Element.from_tag("style:background-image")  # type:ignore
+ 795                properties.append(bg_image)  # type:ignore
+ 796            bg_image.url = url  # type:ignore
+ 797            if position:
+ 798                bg_image.position = position  # type:ignore
+ 799            if repeat:
+ 800                bg_image.repeat = repeat  # type:ignore
+ 801            if opacity:
+ 802                bg_image.opacity = opacity  # type:ignore
+ 803            if filter:
+ 804                bg_image.filter = filter  # type:ignore
+ 805
+ 806    # list-style only:
+ 807
+ 808    def get_level_style(self, level: int) -> Style | None:
+ 809        if self.family != "list":
+ 810            return None
+ 811        level_styles = (
+ 812            "(text:list-level-style-number"
+ 813            "|text:list-level-style-bullet"
+ 814            "|text:list-level-style-image)"
+ 815        )
+ 816        return self._filtered_element(level_styles, 0, level=level)  # type: ignore
+ 817
+ 818    def set_level_style(  # noqa: C901
+ 819        self,
+ 820        level: int,
+ 821        num_format: str | None = None,
+ 822        bullet_char: str | None = None,
+ 823        url: str | None = None,
+ 824        display_levels: int | None = None,
+ 825        prefix: str | None = None,
+ 826        suffix: str | None = None,
+ 827        start_value: int | None = None,
+ 828        style: str | None = None,
+ 829        clone: Style | None = None,
+ 830    ) -> Style | None:
+ 831        """
+ 832        Arguments:
+ 833
+ 834            level -- int
+ 835
+ 836            num_format (for number) -- int
+ 837
+ 838            bullet_char (for bullet) -- str
+ 839
+ 840            url (for image) -- str
+ 841
+ 842            display_levels -- int
+ 843
+ 844            prefix -- str
+ 845
+ 846            suffix -- str
+ 847
+ 848            start_value -- int
+ 849
+ 850            style -- str
+ 851
+ 852            clone -- List Style
+ 853
+ 854        Return:
+ 855            level_style created
+ 856        """
+ 857        if self.family != "list":
+ 858            return None
+ 859        # Expected name
+ 860        if num_format is not None:
+ 861            level_style_name = "text:list-level-style-number"
+ 862        elif bullet_char is not None:
+ 863            level_style_name = "text:list-level-style-bullet"
+ 864        elif url is not None:
+ 865            level_style_name = "text:list-level-style-image"
+ 866        elif clone is not None:
+ 867            level_style_name = clone.tag
+ 868        else:
+ 869            raise ValueError("unknown level style type")
+ 870        was_created = False
+ 871        # Cloning or reusing an existing element
+ 872        level_style: Style | None = None
+ 873        if clone is not None:
+ 874            level_style = clone.clone  # type: ignore
+ 875            was_created = True
+ 876        else:
+ 877            level_style = self.get_level_style(level)
+ 878            if level_style is None:
+ 879                level_style = Element.from_tag(level_style_name)  # type: ignore
+ 880                was_created = True
+ 881        if level_style is None:
+ 882            return None
+ 883        # Transmute if the type changed
+ 884        if level_style.tag != level_style_name:
+ 885            print("Warn: different style", level_style_name, level_style.tag)
+ 886            level_style.tag = level_style_name
+ 887        # Set the level
+ 888        level_style.set_attribute("text:level", str(level))
+ 889        # Set the main attribute
+ 890        if num_format is not None:
+ 891            level_style.set_attribute("fo:num-format", num_format)
+ 892        elif bullet_char is not None:
+ 893            level_style.set_attribute("text:bullet-char", bullet_char)
+ 894        elif url is not None:
+ 895            level_style.set_attribute("xlink:href", url)
+ 896        # Set attributes
+ 897        if prefix:
+ 898            level_style.set_attribute("style:num-prefix", prefix)
+ 899        if suffix:
+ 900            level_style.set_attribute("style:num-suffix", suffix)
+ 901        if display_levels:
+ 902            level_style.set_attribute("text:display-levels", str(display_levels))
+ 903        if start_value:
+ 904            level_style.set_attribute("text:start-value", str(start_value))
+ 905        if style:
+ 906            level_style.text_style = style  # type: ignore
+ 907        # Commit the creation
+ 908        if was_created:
+ 909            self.append(level_style)
+ 910        return level_style
+ 911
+ 912    # page-layout only:
+ 913
+ 914    def get_header_style(self) -> Element | None:
+ 915        if self.family != "page-layout":
+ 916            return None
+ 917        return self.get_element("style:header-style")
+ 918
+ 919    def set_header_style(self, new_style: Style) -> None:
+ 920        if self.family != "page-layout":
+ 921            return
+ 922        header_style = self.get_header_style()
+ 923        if header_style is not None:
+ 924            self.delete(header_style)
+ 925        self.append(new_style)
+ 926
+ 927    def get_footer_style(self) -> Style | None:
+ 928        if self.family != "page-layout":
+ 929            return None
+ 930        return self.get_element("style:footer-style")  # type: ignore
+ 931
+ 932    def set_footer_style(self, new_style: Style) -> None:
+ 933        if self.family != "page-layout":
+ 934            return
+ 935        footer_style = self.get_footer_style()
+ 936        if footer_style is not None:
+ 937            self.delete(footer_style)
+ 938        self.append(new_style)
+ 939
+ 940    # master-page only:
+ 941
+ 942    def _set_header_or_footer(
+ 943        self,
+ 944        text_or_element: str | Element | list[Element | str],
+ 945        name: str = "header",
+ 946        style: str = "Header",
+ 947    ) -> None:
+ 948        if name == "header":
+ 949            header_or_footer = self.get_page_header()
+ 950        else:
+ 951            header_or_footer = self.get_page_footer()
+ 952        if header_or_footer is None:
+ 953            header_or_footer = Element.from_tag("style:" + name)
+ 954            self.append(header_or_footer)
+ 955        else:
+ 956            header_or_footer.clear()
+ 957        if (
+ 958            isinstance(text_or_element, Element)
+ 959            and text_or_element.tag == f"style:{name}"
+ 960        ):
+ 961            # Already a header or footer?
+ 962            self.delete(header_or_footer)
+ 963            self.append(text_or_element)
+ 964            return
+ 965        if isinstance(text_or_element, (Element, str)):
+ 966            elem_list: list[Element | str] = [text_or_element]
+ 967        else:
+ 968            elem_list = text_or_element
+ 969        for item in elem_list:
+ 970            if isinstance(item, str):
+ 971                paragraph = Element.from_tag("text:p")
+ 972                paragraph.style = style  # type: ignore
+ 973                header_or_footer.append(paragraph)
+ 974            elif isinstance(item, Element):
+ 975                header_or_footer.append(item)
+ 976
+ 977    def get_page_header(self) -> Element | None:
+ 978        """Get the element that contains the header contents.
+ 979
+ 980        If None, no header was set.
+ 981        """
+ 982        if self.family != "master-page":
+ 983            return None
+ 984        return self.get_element("style:header")
+ 985
+ 986    def set_page_header(
+ 987        self,
+ 988        text_or_element: str | Element | list[Element | str],
+ 989    ) -> None:
+ 990        """Create or replace the header by the given content. It can already
+ 991        be a complete header.
+ 992
+ 993        If you only want to update the existing header, get it and use the
+ 994        API.
+ 995
+ 996        Arguments:
+ 997
+ 998            text_or_element -- str or Element or a list of them
+ 999        """
+1000        if self.family != "master-page":
+1001            return None
+1002        self._set_header_or_footer(text_or_element)
+1003
+1004    def get_page_footer(self) -> Element | None:
+1005        """Get the element that contains the footer contents.
+1006
+1007        If None, no footer was set.
+1008        """
+1009        if self.family != "master-page":
+1010            return None
+1011        return self.get_element("style:footer")
+1012
+1013    def set_page_footer(
+1014        self,
+1015        text_or_element: str | Element | list[Element | str],
+1016    ) -> None:
+1017        """Create or replace the footer by the given content. It can already
+1018        be a complete footer.
+1019
+1020        If you only want to update the existing footer, get it and use the
+1021        API.
+1022
+1023        Arguments:
+1024
+1025            text_or_element -- str or Element or a list of them
+1026        """
+1027        if self.family != "master-page":
+1028            return None
+1029        self._set_header_or_footer(text_or_element, name="footer", style="Footer")
+1030
+1031    # font-face only:
+1032
+1033    def set_font(
+1034        self,
+1035        name: str,
+1036        family: str | None = None,
+1037        family_generic: str | None = None,
+1038        pitch: str = "variable",
+1039    ) -> None:
+1040        if self.family != "font-face":
+1041            return
+1042        self.name = name
+1043        if family is None:
+1044            family = name
+1045        self.svg_font_family = f'"{family}"'
+1046        if family_generic is not None:
+1047            self.font_family_generic = family_generic
+1048        self.font_pitch = pitch
+
+ + +

Style class for all these tags:

+ +

'style:style' +'number:date-style', +'number:number-style', +'number:percentage-style', +'number:time-style' +'style:font-face', +'style:master-page', +'style:page-layout', +'style:presentation-page-layout', +'text:list-style', +'text:outline-style', +'style:tab-stops', +...

+
+ + +
+ +
+ + Style( family: str | None = None, name: str | None = None, display_name: str | None = None, parent_style: str | None = None, area: str | None = None, color: str | tuple | None = None, background_color: str | tuple | None = None, italic: bool = False, bold: bool = False, master_page: str | None = None, page_layout: str | None = None, next_style: str | None = None, data_style: str | None = None, border: str | None = None, border_top: str | None = None, border_right: str | None = None, border_bottom: str | None = None, border_left: str | None = None, padding: str | None = None, padding_top: str | None = None, padding_bottom: str | None = None, padding_left: str | None = None, padding_right: str | None = None, shadow: str | None = None, height: str | None = None, use_optimal_height: bool = False, width: str | None = None, break_before: str | None = None, break_after: str | None = None, min_height: str | None = None, font_name: str | None = None, font_family: str | None = None, font_family_generic: str | None = None, font_pitch: str = 'variable', **kwargs: Any) + + + +
+ +
379    def __init__(  # noqa: C901
+380        self,
+381        family: str | None = None,
+382        name: str | None = None,
+383        display_name: str | None = None,
+384        parent_style: str | None = None,
+385        # Where properties apply
+386        area: str | None = None,
+387        # For family 'text':
+388        color: str | tuple | None = None,
+389        background_color: str | tuple | None = None,
+390        italic: bool = False,
+391        bold: bool = False,
+392        # For family 'paragraph'
+393        master_page: str | None = None,
+394        # For family 'master-page'
+395        page_layout: str | None = None,
+396        next_style: str | None = None,
+397        # For family 'table-cell'
+398        data_style: str | None = None,  # unused
+399        border: str | None = None,
+400        border_top: str | None = None,
+401        border_right: str | None = None,
+402        border_bottom: str | None = None,
+403        border_left: str | None = None,
+404        padding: str | None = None,
+405        padding_top: str | None = None,
+406        padding_bottom: str | None = None,
+407        padding_left: str | None = None,
+408        padding_right: str | None = None,
+409        shadow: str | None = None,
+410        # For family 'table-row'
+411        height: str | None = None,
+412        use_optimal_height: bool = False,
+413        # For family 'table-column'
+414        width: str | None = None,
+415        break_before: str | None = None,
+416        break_after: str | None = None,
+417        # For family 'graphic'
+418        min_height: str | None = None,
+419        # For family 'font-face'
+420        font_name: str | None = None,
+421        font_family: str | None = None,
+422        font_family_generic: str | None = None,
+423        font_pitch: str = "variable",
+424        # Every other property
+425        **kwargs: Any,
+426    ) -> None:
+427        """Create a style of the given family. The name is not mandatory at this
+428        point but will become required when inserting in a document as a common
+429        style.
+430
+431        The display name is the name the user sees in an office application.
+432
+433        The parent_style is the name of the style this style will inherit from.
+434
+435        To set properties, pass them as keyword arguments. The area properties
+436        apply to is optional and defaults to the family.
+437
+438        Arguments:
+439
+440            family -- 'paragraph', 'text', 'section', 'table', 'table-column',
+441                      'table-row', 'table-cell', 'table-page', 'chart',
+442                      'drawing-page', 'graphic', 'presentation',
+443                      'control', 'ruby', 'list', 'number', 'page-layout'
+444                      'font-face', or 'master-page'
+445
+446            name -- str
+447
+448            display_name -- str
+449
+450            parent_style -- str
+451
+452            area -- str
+453
+454        'text' Properties:
+455
+456            italic -- bool
+457
+458            bold -- bool
+459
+460        'paragraph' Properties:
+461
+462            master_page -- str
+463
+464        'master-page' Properties:
+465
+466            page_layout -- str
+467
+468            next_style -- str
+469
+470        'table-cell' Properties:
+471
+472            border, border_top, border_right, border_bottom, border_left -- str,
+473            e.g. "0.002cm solid #000000" or 'none'
+474
+475            padding, padding_top, padding_right, padding_bottom, padding_left -- str,
+476            e.g. "0.002cm" or 'none'
+477
+478            shadow -- str, e.g. "#808080 0.176cm 0.176cm"
+479
+480        'table-row' Properties:
+481
+482            height -- str, e.g. '5cm'
+483
+484            use_optimal_height -- bool
+485
+486        'table-column' Properties:
+487
+488            width -- str, e.g. '5cm'
+489
+490            break_before -- 'page', 'column' or 'auto'
+491
+492            break_after -- 'page', 'column' or 'auto'
+493        """
+494        self._family: str | None = None
+495        tag_or_elem = kwargs.get("tag_or_elem", None)
+496        if tag_or_elem is None:
+497            family = to_str(family)
+498            if family not in FAMILY_MAPPING:
+499                raise ValueError("Unknown family value: %s" % family)
+500            kwargs["tag"] = FAMILY_MAPPING[family]
+501        super().__init__(**kwargs)
+502        if self._do_init and family not in SUBCLASSED_STYLES:
+503            kwargs.pop("tag", None)
+504            kwargs.pop("tag_or_elem", None)
+505            self.family = family  # relevant test made by property
+506            # Common attributes
+507            if name:
+508                self.name = name
+509            if display_name:
+510                self.display_name = display_name
+511            if parent_style:
+512                self.parent_style = parent_style
+513            # Paragraph
+514            if family == "paragraph":
+515                if master_page:
+516                    self.master_page = master_page
+517            # Master Page
+518            elif family == "master-page":
+519                if page_layout:
+520                    self.page_layout = page_layout
+521                if next_style:
+522                    self.next_style = next_style
+523            # Font face
+524            elif family == "font-face":
+525                if not font_name:
+526                    raise ValueError("A font_name is required for 'font-face' style")
+527                self.set_font(
+528                    font_name,
+529                    family=font_family,
+530                    family_generic=font_family_generic,
+531                    pitch=font_pitch,
+532                )
+533            # Properties
+534            if area is None:
+535                area = family
+536            area = to_str(area)
+537            # Text
+538            if area == "text":
+539                if color:
+540                    kwargs["fo:color"] = color
+541                if background_color:
+542                    kwargs["fo:background-color"] = background_color
+543                if italic:
+544                    kwargs["fo:font-style"] = "italic"
+545                    kwargs["style:font-style-asian"] = "italic"
+546                    kwargs["style:font-style-complex"] = "italic"
+547                if bold:
+548                    kwargs["fo:font-weight"] = "bold"
+549                    kwargs["style:font-weight-asian"] = "bold"
+550                    kwargs["style:font-weight-complex"] = "bold"
+551            # Table cell
+552            elif area == "table-cell":
+553                if border:
+554                    kwargs["fo:border"] = border
+555                elif border_top or border_right or border_bottom or border_left:
+556                    kwargs["fo:border-top"] = border_top or "none"
+557                    kwargs["fo:border-right"] = border_right or "none"
+558                    kwargs["fo:border-bottom"] = border_bottom or "none"
+559                    kwargs["fo:border-left"] = border_left or "none"
+560                else:  # no border_top, ... neither border are defined
+561                    pass  # left untouched
+562                if padding:
+563                    kwargs["fo:padding"] = padding
+564                elif padding_top or padding_right or padding_bottom or padding_left:
+565                    kwargs["fo:padding-top"] = padding_top or "none"
+566                    kwargs["fo:padding-right"] = padding_right or "none"
+567                    kwargs["fo:padding-bottom"] = padding_bottom or "none"
+568                    kwargs["fo:padding-left"] = padding_left or "none"
+569                else:  # no border_top, ... neither border are defined
+570                    pass  # left untouched
+571                if shadow:
+572                    kwargs["style:shadow"] = shadow
+573                if background_color:
+574                    kwargs["fo:background-color"] = background_color
+575            # Table row
+576            elif area == "table-row":
+577                if height:
+578                    kwargs["style:row-height"] = height
+579                if use_optimal_height:
+580                    kwargs["style:use-optimal-row-height"] = Boolean.encode(
+581                        use_optimal_height
+582                    )
+583                if background_color:
+584                    kwargs["fo:background-color"] = background_color
+585            # Table column
+586            elif area == "table-column":
+587                if width:
+588                    kwargs["style:column-width"] = width
+589                if break_before:
+590                    kwargs["fo:break-before"] = break_before
+591                if break_after:
+592                    kwargs["fo:break-after"] = break_after
+593            # Graphic
+594            elif area == "graphic":
+595                if min_height:
+596                    kwargs["fo:min-height"] = min_height
+597            # Every other properties
+598            if kwargs:
+599                self.set_properties(kwargs, area=area)
+
+ + +

Create a style of the given family. The name is not mandatory at this +point but will become required when inserting in a document as a common +style.

+ +

The display name is the name the user sees in an office application.

+ +

The parent_style is the name of the style this style will inherit from.

+ +

To set properties, pass them as keyword arguments. The area properties +apply to is optional and defaults to the family.

+ +

Arguments:

+ +
family -- 'paragraph', 'text', 'section', 'table', 'table-column',
+          'table-row', 'table-cell', 'table-page', 'chart',
+          'drawing-page', 'graphic', 'presentation',
+          'control', 'ruby', 'list', 'number', 'page-layout'
+          'font-face', or 'master-page'
+
+name -- str
+
+display_name -- str
+
+parent_style -- str
+
+area -- str
+
+ +

'text' Properties:

+ +
italic -- bool
+
+bold -- bool
+
+ +

'paragraph' Properties:

+ +
master_page -- str
+
+ +

'master-page' Properties:

+ +
page_layout -- str
+
+next_style -- str
+
+ +

'table-cell' Properties:

+ +
border, border_top, border_right, border_bottom, border_left -- str,
+e.g. "0.002cm solid #000000" or 'none'
+
+padding, padding_top, padding_right, padding_bottom, padding_left -- str,
+e.g. "0.002cm" or 'none'
+
+shadow -- str, e.g. "#808080 0.176cm 0.176cm"
+
+ +

'table-row' Properties:

+ +
height -- str, e.g. '5cm'
+
+use_optimal_height -- bool
+
+ +

'table-column' Properties:

+ +
width -- str, e.g. '5cm'
+
+break_before -- 'page', 'column' or 'auto'
+
+break_after -- 'page', 'column' or 'auto'
+
+
+ + +
+
+ +
+ family: str | None + + + +
+ +
601    @property
+602    def family(self) -> str | None:
+603        if self._family is None:
+604            self._family = FALSE_FAMILY_MAP_REVERSE.get(
+605                self.tag, self.get_attribute_string("style:family")
+606            )
+607        return self._family
+
+ + + + +
+
+ +
+ + def + get_properties(self, area: str | None = None) -> dict[str, str | dict] | None: + + + +
+ +
615    def get_properties(self, area: str | None = None) -> dict[str, str | dict] | None:
+616        """Get the mapping of all properties of this style. By default the
+617        properties of the same family, e.g. a paragraph style and its
+618        paragraph properties. Specify the area to get the text properties of
+619        a paragraph style for example.
+620
+621        Arguments:
+622
+623            area -- str
+624
+625        Return: dict
+626        """
+627        if area is None:
+628            area = self.family
+629        element = self.get_element(f"style:{area}-properties")
+630        if element is None:
+631            return None
+632        properties: dict[str, str | dict] = element.attributes  # type: ignore
+633        # Nested properties are nested dictionaries
+634        for child in element.children:
+635            properties[child.tag] = child.attributes
+636        return properties
+
+ + +

Get the mapping of all properties of this style. By default the +properties of the same family, e.g. a paragraph style and its +paragraph properties. Specify the area to get the text properties of +a paragraph style for example.

+ +

Arguments:

+ +
area -- str
+
+ +

Return: dict

+
+ + +
+
+ +
+ + def + set_properties( self, properties: dict[str, str | dict] | None = None, style: Style | None = None, area: str | None = None, **kwargs: Any) -> None: + + + +
+ +
638    def set_properties(  # noqa: C901
+639        self,
+640        properties: dict[str, str | dict] | None = None,
+641        style: Style | None = None,
+642        area: str | None = None,
+643        **kwargs: Any,
+644    ) -> None:
+645        """Set the properties of the "area" type of this style. Properties
+646        are given either as a dict or as named arguments (or both). The area
+647        is identical to the style family by default. If the properties
+648        element is missing, it is created.
+649
+650        Instead of properties, you can pass a style with properties of the
+651        same area. These will be copied.
+652
+653        Arguments:
+654
+655            properties -- dict
+656
+657            style -- Style
+658
+659            area -- 'paragraph', 'text'...
+660        """
+661        if properties is None:
+662            properties = {}
+663        if area is None:
+664            if isinstance(self.family, bool):
+665                area = None
+666            else:
+667                area = self.family
+668        element = self.get_element(f"style:{area}-properties")
+669        if element is None:
+670            element = Element.from_tag(f"style:{area}-properties")
+671            self.append(element)
+672        if properties or kwargs:
+673            properties = _expand_properties_dict(_merge_dicts(properties, kwargs))
+674        elif style is not None:
+675            properties = style.get_properties(area=area)
+676            if properties is None:
+677                return
+678        if properties is None:
+679            return
+680        for key, value in properties.items():
+681            if value is None:
+682                element.del_attribute(key)
+683            elif isinstance(value, (str, bool)):
+684                element.set_attribute(key, value)
+685            else:
+686                pass
+
+ + +

Set the properties of the "area" type of this style. Properties +are given either as a dict or as named arguments (or both). The area +is identical to the style family by default. If the properties +element is missing, it is created.

+ +

Instead of properties, you can pass a style with properties of the +same area. These will be copied.

+ +

Arguments:

+ +
properties -- dict
+
+style -- Style
+
+area -- 'paragraph', 'text'...
+
+
+ + +
+
+ +
+ + def + del_properties( self, properties: list[str] | None = None, area: str | None = None) -> None: + + + +
+ +
688    def del_properties(
+689        self,
+690        properties: list[str] | None = None,
+691        area: str | None = None,
+692    ) -> None:
+693        """Delete the given properties, either by list argument or
+694        positional argument (or both). Remove only from the given area,
+695        identical to the style family by default.
+696
+697        Arguments:
+698
+699            properties -- list
+700
+701            area -- str
+702        """
+703        if properties is None:
+704            properties = []
+705        if area is None:
+706            area = self.family
+707        element = self.get_element(f"style:{area}-properties")
+708        if element is None:
+709            raise ValueError(
+710                f"properties element is inexistent for: style:{area}-properties"
+711            )
+712        for key in _expand_properties_list(properties):
+713            element.del_attribute(key)
+
+ + +

Delete the given properties, either by list argument or +positional argument (or both). Remove only from the given area, +identical to the style family by default.

+ +

Arguments:

+ +
properties -- list
+
+area -- str
+
+
+ + +
+
+ +
+ + def + set_background( self, color: str | None = None, url: str | None = None, position: str | None = 'center', repeat: str | None = None, opacity: str | None = None, filter: str | None = None) -> None: + + + +
+ +
715    def set_background(  # noqa: C901
+716        self,
+717        color: str | None = None,
+718        url: str | None = None,
+719        position: str | None = "center",
+720        repeat: str | None = None,
+721        opacity: str | None = None,
+722        filter: str | None = None,  # noqa: A002
+723    ) -> None:
+724        """Set the background color of a text style, or the background color
+725        or image of a paragraph style or page layout.
+726
+727        With no argument, remove any existing background.
+728
+729        The position is one or two of 'center', 'left', 'right', 'top' or
+730        'bottom'.
+731
+732        The repeat is 'no-repeat', 'repeat' or 'stretch'.
+733
+734        The opacity is a percentage integer (not a string with the '%s' sign)
+735
+736        The filter is an application-specific filter name defined elsewhere.
+737
+738        Though this method is defined on the base style class, it will raise
+739        an error if the style type is not compatible.
+740
+741        Arguments:
+742
+743            color -- '#rrggbb'
+744
+745            url -- str
+746
+747            position -- str
+748
+749            repeat -- str
+750
+751            opacity -- int
+752
+753            filter -- str
+754        """
+755        family = self.family
+756        if family not in {
+757            "text",
+758            "paragraph",
+759            "page-layout",
+760            "section",
+761            "table",
+762            "table-row",
+763            "table-cell",
+764            "graphic",
+765        }:
+766            raise TypeError("No background support for this family")
+767        if url is not None and family == "text":
+768            raise TypeError("No background image for text styles")
+769        properties = self.get_element(f"style:{family}-properties")
+770        bg_image: BackgroundImage | None = None
+771        if properties is not None:
+772            bg_image = properties.get_element("style:background-image")  # type:ignore
+773        # Erasing
+774        if color is None and url is None:
+775            if properties is None:
+776                return
+777            properties.del_attribute("fo:background-color")
+778            if bg_image is not None:
+779                properties.delete(bg_image)
+780            return
+781        # Add the properties if necessary
+782        if properties is None:
+783            properties = Element.from_tag(f"style:{family}-properties")
+784            self.append(properties)
+785        # Add the color...
+786        if color:
+787            properties.set_attribute("fo:background-color", color)
+788            if bg_image is not None:
+789                properties.delete(bg_image)
+790        # ... or the background
+791        elif url:
+792            properties.set_attribute("fo:background-color", "transparent")
+793            if bg_image is None:
+794                bg_image = Element.from_tag("style:background-image")  # type:ignore
+795                properties.append(bg_image)  # type:ignore
+796            bg_image.url = url  # type:ignore
+797            if position:
+798                bg_image.position = position  # type:ignore
+799            if repeat:
+800                bg_image.repeat = repeat  # type:ignore
+801            if opacity:
+802                bg_image.opacity = opacity  # type:ignore
+803            if filter:
+804                bg_image.filter = filter  # type:ignore
+
+ + +

Set the background color of a text style, or the background color +or image of a paragraph style or page layout.

+ +

With no argument, remove any existing background.

+ +

The position is one or two of 'center', 'left', 'right', 'top' or +'bottom'.

+ +

The repeat is 'no-repeat', 'repeat' or 'stretch'.

+ +

The opacity is a percentage integer (not a string with the '%s' sign)

+ +

The filter is an application-specific filter name defined elsewhere.

+ +

Though this method is defined on the base style class, it will raise +an error if the style type is not compatible.

+ +

Arguments:

+ +
color -- '#rrggbb'
+
+url -- str
+
+position -- str
+
+repeat -- str
+
+opacity -- int
+
+filter -- str
+
+
+ + +
+
+ +
+ + def + get_level_style(self, level: int) -> Style | None: + + + +
+ +
808    def get_level_style(self, level: int) -> Style | None:
+809        if self.family != "list":
+810            return None
+811        level_styles = (
+812            "(text:list-level-style-number"
+813            "|text:list-level-style-bullet"
+814            "|text:list-level-style-image)"
+815        )
+816        return self._filtered_element(level_styles, 0, level=level)  # type: ignore
+
+ + + + +
+
+ +
+ + def + set_level_style( self, level: int, num_format: str | None = None, bullet_char: str | None = None, url: str | None = None, display_levels: int | None = None, prefix: str | None = None, suffix: str | None = None, start_value: int | None = None, style: str | None = None, clone: Style | None = None) -> Style | None: + + + +
+ +
818    def set_level_style(  # noqa: C901
+819        self,
+820        level: int,
+821        num_format: str | None = None,
+822        bullet_char: str | None = None,
+823        url: str | None = None,
+824        display_levels: int | None = None,
+825        prefix: str | None = None,
+826        suffix: str | None = None,
+827        start_value: int | None = None,
+828        style: str | None = None,
+829        clone: Style | None = None,
+830    ) -> Style | None:
+831        """
+832        Arguments:
+833
+834            level -- int
+835
+836            num_format (for number) -- int
+837
+838            bullet_char (for bullet) -- str
+839
+840            url (for image) -- str
+841
+842            display_levels -- int
+843
+844            prefix -- str
+845
+846            suffix -- str
+847
+848            start_value -- int
+849
+850            style -- str
+851
+852            clone -- List Style
+853
+854        Return:
+855            level_style created
+856        """
+857        if self.family != "list":
+858            return None
+859        # Expected name
+860        if num_format is not None:
+861            level_style_name = "text:list-level-style-number"
+862        elif bullet_char is not None:
+863            level_style_name = "text:list-level-style-bullet"
+864        elif url is not None:
+865            level_style_name = "text:list-level-style-image"
+866        elif clone is not None:
+867            level_style_name = clone.tag
+868        else:
+869            raise ValueError("unknown level style type")
+870        was_created = False
+871        # Cloning or reusing an existing element
+872        level_style: Style | None = None
+873        if clone is not None:
+874            level_style = clone.clone  # type: ignore
+875            was_created = True
+876        else:
+877            level_style = self.get_level_style(level)
+878            if level_style is None:
+879                level_style = Element.from_tag(level_style_name)  # type: ignore
+880                was_created = True
+881        if level_style is None:
+882            return None
+883        # Transmute if the type changed
+884        if level_style.tag != level_style_name:
+885            print("Warn: different style", level_style_name, level_style.tag)
+886            level_style.tag = level_style_name
+887        # Set the level
+888        level_style.set_attribute("text:level", str(level))
+889        # Set the main attribute
+890        if num_format is not None:
+891            level_style.set_attribute("fo:num-format", num_format)
+892        elif bullet_char is not None:
+893            level_style.set_attribute("text:bullet-char", bullet_char)
+894        elif url is not None:
+895            level_style.set_attribute("xlink:href", url)
+896        # Set attributes
+897        if prefix:
+898            level_style.set_attribute("style:num-prefix", prefix)
+899        if suffix:
+900            level_style.set_attribute("style:num-suffix", suffix)
+901        if display_levels:
+902            level_style.set_attribute("text:display-levels", str(display_levels))
+903        if start_value:
+904            level_style.set_attribute("text:start-value", str(start_value))
+905        if style:
+906            level_style.text_style = style  # type: ignore
+907        # Commit the creation
+908        if was_created:
+909            self.append(level_style)
+910        return level_style
+
+ + +

Arguments:

+ +
level -- int
+
+num_format (for number) -- int
+
+bullet_char (for bullet) -- str
+
+url (for image) -- str
+
+display_levels -- int
+
+prefix -- str
+
+suffix -- str
+
+start_value -- int
+
+style -- str
+
+clone -- List Style
+
+ +

Return: + level_style created

+
+ + +
+
+ +
+ + def + get_header_style(self) -> Element | None: + + + +
+ +
914    def get_header_style(self) -> Element | None:
+915        if self.family != "page-layout":
+916            return None
+917        return self.get_element("style:header-style")
+
+ + + + +
+
+ +
+ + def + set_header_style(self, new_style: Style) -> None: + + + +
+ +
919    def set_header_style(self, new_style: Style) -> None:
+920        if self.family != "page-layout":
+921            return
+922        header_style = self.get_header_style()
+923        if header_style is not None:
+924            self.delete(header_style)
+925        self.append(new_style)
+
+ + + + +
+ + +
+ +
+ + def + get_page_header(self) -> Element | None: + + + +
+ +
977    def get_page_header(self) -> Element | None:
+978        """Get the element that contains the header contents.
+979
+980        If None, no header was set.
+981        """
+982        if self.family != "master-page":
+983            return None
+984        return self.get_element("style:header")
+
+ + +

Get the element that contains the header contents.

+ +

If None, no header was set.

+
+ + +
+
+ +
+ + def + set_page_header( self, text_or_element: str | Element | list[Element | str]) -> None: + + + +
+ +
 986    def set_page_header(
+ 987        self,
+ 988        text_or_element: str | Element | list[Element | str],
+ 989    ) -> None:
+ 990        """Create or replace the header by the given content. It can already
+ 991        be a complete header.
+ 992
+ 993        If you only want to update the existing header, get it and use the
+ 994        API.
+ 995
+ 996        Arguments:
+ 997
+ 998            text_or_element -- str or Element or a list of them
+ 999        """
+1000        if self.family != "master-page":
+1001            return None
+1002        self._set_header_or_footer(text_or_element)
+
+ + +

Create or replace the header by the given content. It can already +be a complete header.

+ +

If you only want to update the existing header, get it and use the +API.

+ +

Arguments:

+ +
text_or_element -- str or Element or a list of them
+
+
+ + +
+ + +
+ +
+ + def + set_font( self, name: str, family: str | None = None, family_generic: str | None = None, pitch: str = 'variable') -> None: + + + +
+ +
1033    def set_font(
+1034        self,
+1035        name: str,
+1036        family: str | None = None,
+1037        family_generic: str | None = None,
+1038        pitch: str = "variable",
+1039    ) -> None:
+1040        if self.family != "font-face":
+1041            return
+1042        self.name = name
+1043        if family is None:
+1044            family = name
+1045        self.svg_font_family = f'"{family}"'
+1046        if family_generic is not None:
+1047            self.font_family_generic = family_generic
+1048        self.font_pitch = pitch
+
+ + + + +
+
+ +
+ page_layout: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ next_style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ parent_style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ display_name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ svg_font_family: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ font_family_generic: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ font_pitch: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ text_style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ master_page: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style_type: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ leader_style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ leader_text: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style_position: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Styles(odfdo.XmlPart): + + + +
+ +
 58class Styles(XmlPart):
+ 59    def _get_style_contexts(
+ 60        self, family: str, automatic: bool = False
+ 61    ) -> list[Element]:
+ 62        if automatic:
+ 63            return [self.get_element("//office:automatic-styles")]
+ 64        if not family:
+ 65            # All possibilities
+ 66            return [
+ 67                self.get_element("//office:automatic-styles"),
+ 68                self.get_element("//office:styles"),
+ 69                self.get_element("//office:master-styles"),
+ 70                self.get_element("//office:font-face-decls"),
+ 71            ]
+ 72        queries = CONTEXT_MAPPING.get(family)
+ 73        if queries is None:
+ 74            raise ValueError(f"unknown family: {family}")
+ 75        # print('q:', queries)
+ 76        return [self.get_element(query) for query in queries]
+ 77
+ 78    def get_styles(self, family: str = "", automatic: bool = False) -> list[Element]:
+ 79        """Return the list of styles in the Content part, optionally limited
+ 80        to the given family, optionaly limited to automatic styles.
+ 81
+ 82        Arguments:
+ 83
+ 84            family -- str
+ 85
+ 86            automatic -- bool
+ 87
+ 88        Return: list of Style
+ 89        """
+ 90        result = []
+ 91        for context in self._get_style_contexts(family, automatic=automatic):
+ 92            if context is None:
+ 93                continue
+ 94            # print('-ctx----', automatic)
+ 95            # print(context.tag)
+ 96            # print(context.__class__)
+ 97            # print(context.serialize())
+ 98            result.extend(context.get_styles(family=family))
+ 99        return result
+100
+101    def get_style(
+102        self,
+103        family: str,
+104        name_or_element: str | Style | None = None,
+105        display_name: str | None = None,
+106    ) -> Style | None:
+107        """Return the style uniquely identified by the name/family pair. If
+108        the argument is already a style object, it will return it.
+109
+110        If the name is None, the default style is fetched.
+111
+112        If the name is not the internal name but the name you gave in the
+113        desktop application, use display_name instead.
+114
+115        Arguments:
+116
+117            family -- 'paragraph', 'text',  'graphic', 'table', 'list',
+118                      'number', 'page-layout', 'master-page'
+119
+120            name_or_element -- str, odf_style or None
+121
+122            display_name -- str or None
+123
+124        Return: odf_style or None if not found
+125        """
+126        for context in self._get_style_contexts(family):
+127            if context is None:
+128                continue
+129            style = context.get_style(
+130                family,
+131                name_or_element=name_or_element,
+132                display_name=display_name,
+133            )
+134            if style is not None:
+135                return style  # type: ignore
+136        return None
+137
+138    def get_master_pages(self) -> list[Element]:
+139        query = make_xpath_query("descendant::style:master-page")
+140        return self.get_elements(query)  # type:ignore
+141
+142    def get_master_page(self, position: int = 0) -> Element | None:
+143        results = self.get_master_pages()
+144        try:
+145            return results[position]
+146        except IndexError:
+147            return None
+
+ + +

Representation of an XML part.

+ +

Abstraction of the XML library behind.

+
+ + +
+ +
+ + def + get_styles( self, family: str = '', automatic: bool = False) -> list[Element]: + + + +
+ +
78    def get_styles(self, family: str = "", automatic: bool = False) -> list[Element]:
+79        """Return the list of styles in the Content part, optionally limited
+80        to the given family, optionaly limited to automatic styles.
+81
+82        Arguments:
+83
+84            family -- str
+85
+86            automatic -- bool
+87
+88        Return: list of Style
+89        """
+90        result = []
+91        for context in self._get_style_contexts(family, automatic=automatic):
+92            if context is None:
+93                continue
+94            # print('-ctx----', automatic)
+95            # print(context.tag)
+96            # print(context.__class__)
+97            # print(context.serialize())
+98            result.extend(context.get_styles(family=family))
+99        return result
+
+ + +

Return the list of styles in the Content part, optionally limited +to the given family, optionaly limited to automatic styles.

+ +

Arguments:

+ +
family -- str
+
+automatic -- bool
+
+ +

Return: list of Style

+
+ + +
+
+ +
+ + def + get_style( self, family: str, name_or_element: str | Style | None = None, display_name: str | None = None) -> Style | None: + + + +
+ +
101    def get_style(
+102        self,
+103        family: str,
+104        name_or_element: str | Style | None = None,
+105        display_name: str | None = None,
+106    ) -> Style | None:
+107        """Return the style uniquely identified by the name/family pair. If
+108        the argument is already a style object, it will return it.
+109
+110        If the name is None, the default style is fetched.
+111
+112        If the name is not the internal name but the name you gave in the
+113        desktop application, use display_name instead.
+114
+115        Arguments:
+116
+117            family -- 'paragraph', 'text',  'graphic', 'table', 'list',
+118                      'number', 'page-layout', 'master-page'
+119
+120            name_or_element -- str, odf_style or None
+121
+122            display_name -- str or None
+123
+124        Return: odf_style or None if not found
+125        """
+126        for context in self._get_style_contexts(family):
+127            if context is None:
+128                continue
+129            style = context.get_style(
+130                family,
+131                name_or_element=name_or_element,
+132                display_name=display_name,
+133            )
+134            if style is not None:
+135                return style  # type: ignore
+136        return None
+
+ + +

Return the style uniquely identified by the name/family pair. If +the argument is already a style object, it will return it.

+ +

If the name is None, the default style is fetched.

+ +

If the name is not the internal name but the name you gave in the +desktop application, use display_name instead.

+ +

Arguments:

+ +
family -- 'paragraph', 'text',  'graphic', 'table', 'list',
+          'number', 'page-layout', 'master-page'
+
+name_or_element -- str, odf_style or None
+
+display_name -- str or None
+
+ +

Return: odf_style or None if not found

+
+ + +
+
+ +
+ + def + get_master_pages(self) -> list[Element]: + + + +
+ +
138    def get_master_pages(self) -> list[Element]:
+139        query = make_xpath_query("descendant::style:master-page")
+140        return self.get_elements(query)  # type:ignore
+
+ + + + +
+
+ +
+ + def + get_master_page(self, position: int = 0) -> Element | None: + + + +
+ +
142    def get_master_page(self, position: int = 0) -> Element | None:
+143        results = self.get_master_pages()
+144        try:
+145            return results[position]
+146        except IndexError:
+147            return None
+
+ + + + +
+
+
Inherited Members
+
+ +
+
+
+
+ +
+ + class + TOC(odfdo.Element): + + + +
+ +
168class TOC(Element):
+169    """Table of content.
+170    The "text:table-of-content" element represents a table of contents for a
+171    document. The items that can be listed in a table of contents are:
+172      - Headings (as defined by the outline structure of the document), up to
+173        a selected level.
+174      - Table of contents index marks.
+175      - Paragraphs formatted with specified paragraph styles.
+176
+177
+178    Implementation:
+179    Default parameters are what most people use: protected from manual
+180    modifications and not limited in title levels.
+181
+182    The name is mandatory and derived automatically from the title if not
+183    given. Provide one in case of a conflict with other TOCs in the same
+184    document.
+185
+186    The "text:table-of-content" element has the following attributes:
+187    text:name, text:protected, text:protection-key,
+188    text:protection-key-digest-algorithm, text:style-name and xml:id.
+189
+190    Arguments:
+191
+192        title -- str
+193
+194        name -- str
+195
+196        protected -- bool
+197
+198        outline_level -- int
+199
+200        style -- str
+201
+202        title_style -- str
+203
+204        entry_style -- str
+205    """
+206
+207    _tag = "text:table-of-content"
+208    _properties = (
+209        PropDef("name", "text:name"),
+210        PropDef("style", "text:style-name"),
+211        PropDef("xml_id", "xml:id"),
+212        PropDef("protected", "text:protected"),
+213        PropDef("protection_key", "text:protection-key"),
+214        PropDef(
+215            "protection_key_digest_algorithm", "text:protection-key-digest-algorithm"
+216        ),
+217    )
+218
+219    def __init__(
+220        self,
+221        title: str = "Table of Contents",
+222        name: str | None = None,
+223        protected: bool = True,
+224        outline_level: int = 0,
+225        style: str | None = None,
+226        title_style: str = "Contents_20_Heading",
+227        entry_style: str = "Contents_20_%d",
+228        **kwargs: Any,
+229    ) -> None:
+230        super().__init__(**kwargs)
+231        if self._do_init:
+232            if style:
+233                self.style = style
+234            if protected:
+235                self.protected = protected
+236            if name is None:
+237                self.name = f"{title}1"
+238            # Create the source template
+239            toc_source = self.create_toc_source(
+240                title, outline_level, title_style, entry_style
+241            )
+242            self.append(toc_source)
+243            # Create the index body automatically with the index title
+244            if title:
+245                # This style is in the template document
+246                self.set_toc_title(title, text_style=title_style)
+247
+248    @staticmethod
+249    def create_toc_source(
+250        title: str,
+251        outline_level: int,
+252        title_style: str,
+253        entry_style: str,
+254    ) -> Element:
+255        toc_source = Element.from_tag("text:table-of-content-source")
+256        toc_source.set_attribute("text:outline-level", str(outline_level))
+257        if title:
+258            title_template = IndexTitleTemplate()
+259            if title_style:
+260                # This style is in the template document
+261                title_template.style = title_style
+262            title_template.text = title
+263            toc_source.append(title_template)
+264        for level in range(1, 11):
+265            template = TocEntryTemplate(outline_level=level)
+266            if entry_style:
+267                template.style = entry_style % level
+268            toc_source.append(template)
+269        return toc_source
+270
+271    def __str__(self) -> str:
+272        return self.get_formatted_text()
+273
+274    def get_formatted_text(self, context: dict | None = None) -> str:
+275        index_body = self.get_element("text:index-body")
+276
+277        if index_body is None:
+278            return ""
+279        if context is None:
+280            context = {}
+281        if context.get("rst_mode"):
+282            return "\n.. contents::\n\n"
+283
+284        result = []
+285        for element in index_body.children:
+286            if element.tag == "text:index-title":
+287                for child_element in element.children:
+288                    result.append(child_element.get_formatted_text(context).strip())
+289            else:
+290                result.append(element.get_formatted_text(context).strip())
+291        return "\n".join(result)
+292
+293    @property
+294    def outline_level(self) -> int | None:
+295        source = self.get_element("text:table-of-content-source")
+296        if source is None:
+297            return None
+298        return source.get_attribute_integer("text:outline-level")
+299
+300    @outline_level.setter
+301    def outline_level(self, level: int) -> None:
+302        source = self.get_element("text:table-of-content-source")
+303        if source is None:
+304            source = Element.from_tag("text:table-of-content-source")
+305            self.insert(source, FIRST_CHILD)
+306        source.set_attribute("text:outline-level", str(level))
+307
+308    @property
+309    def body(self) -> Element | None:
+310        return self.get_element("text:index-body")
+311
+312    @body.setter
+313    def body(self, body: Element | None = None) -> Element | None:
+314        old_body = self.body
+315        if old_body is not None:
+316            self.delete(old_body)
+317        if body is None:
+318            body = Element.from_tag("text:index-body")
+319        self.append(body)
+320        return body
+321
+322    def get_title(self) -> str:
+323        index_body = self.body
+324        if index_body is None:
+325            return ""
+326        index_title = index_body.get_element(IndexTitle._tag)
+327        if index_title is None:
+328            return ""
+329        return index_title.text_content
+330
+331    def set_toc_title(
+332        self,
+333        title: str,
+334        style: str | None = None,
+335        text_style: str | None = None,
+336    ) -> None:
+337        index_body = self.body
+338        if index_body is None:
+339            self.body = None
+340            index_body = self.body
+341        index_title = index_body.get_element(IndexTitle._tag)  # type: ignore
+342        if index_title is None:
+343            name = f"{self.name}_Head"
+344            index_title = IndexTitle(
+345                name=name, style=style, title_text=title, text_style=text_style
+346            )
+347            index_body.append(index_title)  # type: ignore
+348        else:
+349            if style:
+350                index_title.style = style  # type: ignore
+351            paragraph = index_title.get_paragraph()
+352            if paragraph is None:
+353                paragraph = Paragraph()
+354                index_title.append(paragraph)
+355            if text_style:
+356                paragraph.style = text_style  # type: ignore
+357            paragraph.text = title
+358
+359    @staticmethod
+360    def _header_numbering(level_indexes: dict[int, int], level: int) -> str:
+361        """Return the header hierarchical number (like "1.2.3.")."""
+362        numbers: list[int] = []
+363        # before header level
+364        for idx in range(1, level):
+365            numbers.append(level_indexes.setdefault(idx, 1))
+366        # header level
+367        index = level_indexes.get(level, 0) + 1
+368        level_indexes[level] = index
+369        numbers.append(index)
+370        # after header level
+371        idx = level + 1
+372        while idx in level_indexes:
+373            del level_indexes[idx]
+374            idx += 1
+375        return ".".join(str(x) for x in numbers) + "."
+376
+377    def fill(  # noqa: C901
+378        self,
+379        document: Document | None = None,
+380        use_default_styles: bool = True,
+381    ) -> None:
+382        """Fill the TOC with the titles found in the document. A TOC is not
+383        contextual so it will catch all titles before and after its insertion.
+384        If the TOC is not attached to a document, attach it beforehand or
+385        provide one as argument.
+386
+387        For having a pretty TOC, let use_default_styles by default.
+388
+389        Arguments:
+390
+391            document -- Document
+392
+393            use_default_styles -- bool
+394        """
+395        # Find the body
+396        if document is not None:
+397            body: Element | None = document.body
+398        else:
+399            body = self.document_body
+400        if body is None:
+401            raise ValueError("The TOC must be related to a document somehow")
+402
+403        # Save the title
+404        index_body = self.body
+405        title = index_body.get_element("text:index-title")  # type: ignore
+406
+407        # Clean the old index-body
+408        self.body = None
+409        index_body = self.body
+410
+411        # Restore the title
+412        if title and str(title):
+413            index_body.insert(title, position=0)  # type: ignore
+414
+415        # Insert default TOC style
+416        if use_default_styles:
+417            automatic_styles = body.get_element("//office:automatic-styles")
+418            if isinstance(automatic_styles, Element):
+419                for level in range(1, 11):
+420                    if (
+421                        automatic_styles.get_style(
+422                            "paragraph", _toc_entry_style_name(level)
+423                        )
+424                        is None
+425                    ):
+426                        level_style = default_toc_level_style(level)
+427                        automatic_styles.append(level_style)
+428
+429        # Auto-fill the index
+430        outline_level = self.outline_level or 10
+431        level_indexes: dict[int, int] = {}
+432        for header in body.get_headers():
+433            level = header.get_attribute_integer("text:outline-level") or 0
+434            if level is None or level > outline_level:
+435                continue
+436            number_str = self._header_numbering(level_indexes, level)
+437            # Make the title with "1.2.3. Title" format
+438            paragraph = Paragraph(f"{number_str} {header}")
+439            if use_default_styles:
+440                paragraph.style = _toc_entry_style_name(level)
+441            index_body.append(paragraph)  # type: ignore
+
+ + +

Table of content. +The "text:table-of-content" element represents a table of contents for a +document. The items that can be listed in a table of contents are:

+ +
    +
  • Headings (as defined by the outline structure of the document), up to +a selected level.
  • +
  • Table of contents index marks.
  • +
  • Paragraphs formatted with specified paragraph styles.
  • +
+ +

Implementation: +Default parameters are what most people use: protected from manual +modifications and not limited in title levels.

+ +

The name is mandatory and derived automatically from the title if not +given. Provide one in case of a conflict with other TOCs in the same +document.

+ +

The "text:table-of-content" element has the following attributes: +text:name, text:protected, text:protection-key, +text:protection-key-digest-algorithm, text:style-name and xml:id.

+ +

Arguments:

+ +
title -- str
+
+name -- str
+
+protected -- bool
+
+outline_level -- int
+
+style -- str
+
+title_style -- str
+
+entry_style -- str
+
+
+ + +
+ +
+ + TOC( title: str = 'Table of Contents', name: str | None = None, protected: bool = True, outline_level: int = 0, style: str | None = None, title_style: str = 'Contents_20_Heading', entry_style: str = 'Contents_20_%d', **kwargs: Any) + + + +
+ +
219    def __init__(
+220        self,
+221        title: str = "Table of Contents",
+222        name: str | None = None,
+223        protected: bool = True,
+224        outline_level: int = 0,
+225        style: str | None = None,
+226        title_style: str = "Contents_20_Heading",
+227        entry_style: str = "Contents_20_%d",
+228        **kwargs: Any,
+229    ) -> None:
+230        super().__init__(**kwargs)
+231        if self._do_init:
+232            if style:
+233                self.style = style
+234            if protected:
+235                self.protected = protected
+236            if name is None:
+237                self.name = f"{title}1"
+238            # Create the source template
+239            toc_source = self.create_toc_source(
+240                title, outline_level, title_style, entry_style
+241            )
+242            self.append(toc_source)
+243            # Create the index body automatically with the index title
+244            if title:
+245                # This style is in the template document
+246                self.set_toc_title(title, text_style=title_style)
+
+ + + + +
+
+ +
+
@staticmethod
+ + def + create_toc_source( title: str, outline_level: int, title_style: str, entry_style: str) -> Element: + + + +
+ +
248    @staticmethod
+249    def create_toc_source(
+250        title: str,
+251        outline_level: int,
+252        title_style: str,
+253        entry_style: str,
+254    ) -> Element:
+255        toc_source = Element.from_tag("text:table-of-content-source")
+256        toc_source.set_attribute("text:outline-level", str(outline_level))
+257        if title:
+258            title_template = IndexTitleTemplate()
+259            if title_style:
+260                # This style is in the template document
+261                title_template.style = title_style
+262            title_template.text = title
+263            toc_source.append(title_template)
+264        for level in range(1, 11):
+265            template = TocEntryTemplate(outline_level=level)
+266            if entry_style:
+267                template.style = entry_style % level
+268            toc_source.append(template)
+269        return toc_source
+
+ + + + +
+
+ +
+ + def + get_formatted_text(self, context: dict | None = None) -> str: + + + +
+ +
274    def get_formatted_text(self, context: dict | None = None) -> str:
+275        index_body = self.get_element("text:index-body")
+276
+277        if index_body is None:
+278            return ""
+279        if context is None:
+280            context = {}
+281        if context.get("rst_mode"):
+282            return "\n.. contents::\n\n"
+283
+284        result = []
+285        for element in index_body.children:
+286            if element.tag == "text:index-title":
+287                for child_element in element.children:
+288                    result.append(child_element.get_formatted_text(context).strip())
+289            else:
+290                result.append(element.get_formatted_text(context).strip())
+291        return "\n".join(result)
+
+ + +

This function should return a beautiful version of the text.

+
+ + +
+
+ +
+ outline_level: int | None + + + +
+ +
293    @property
+294    def outline_level(self) -> int | None:
+295        source = self.get_element("text:table-of-content-source")
+296        if source is None:
+297            return None
+298        return source.get_attribute_integer("text:outline-level")
+
+ + + + +
+
+ +
+ body: Element | None + + + +
+ +
308    @property
+309    def body(self) -> Element | None:
+310        return self.get_element("text:index-body")
+
+ + + + +
+
+ +
+ + def + get_title(self) -> str: + + + +
+ +
322    def get_title(self) -> str:
+323        index_body = self.body
+324        if index_body is None:
+325            return ""
+326        index_title = index_body.get_element(IndexTitle._tag)
+327        if index_title is None:
+328            return ""
+329        return index_title.text_content
+
+ + + + +
+
+ +
+ + def + set_toc_title( self, title: str, style: str | None = None, text_style: str | None = None) -> None: + + + +
+ +
331    def set_toc_title(
+332        self,
+333        title: str,
+334        style: str | None = None,
+335        text_style: str | None = None,
+336    ) -> None:
+337        index_body = self.body
+338        if index_body is None:
+339            self.body = None
+340            index_body = self.body
+341        index_title = index_body.get_element(IndexTitle._tag)  # type: ignore
+342        if index_title is None:
+343            name = f"{self.name}_Head"
+344            index_title = IndexTitle(
+345                name=name, style=style, title_text=title, text_style=text_style
+346            )
+347            index_body.append(index_title)  # type: ignore
+348        else:
+349            if style:
+350                index_title.style = style  # type: ignore
+351            paragraph = index_title.get_paragraph()
+352            if paragraph is None:
+353                paragraph = Paragraph()
+354                index_title.append(paragraph)
+355            if text_style:
+356                paragraph.style = text_style  # type: ignore
+357            paragraph.text = title
+
+ + + + +
+
+ +
+ + def + fill( self, document: Document | None = None, use_default_styles: bool = True) -> None: + + + +
+ +
377    def fill(  # noqa: C901
+378        self,
+379        document: Document | None = None,
+380        use_default_styles: bool = True,
+381    ) -> None:
+382        """Fill the TOC with the titles found in the document. A TOC is not
+383        contextual so it will catch all titles before and after its insertion.
+384        If the TOC is not attached to a document, attach it beforehand or
+385        provide one as argument.
+386
+387        For having a pretty TOC, let use_default_styles by default.
+388
+389        Arguments:
+390
+391            document -- Document
+392
+393            use_default_styles -- bool
+394        """
+395        # Find the body
+396        if document is not None:
+397            body: Element | None = document.body
+398        else:
+399            body = self.document_body
+400        if body is None:
+401            raise ValueError("The TOC must be related to a document somehow")
+402
+403        # Save the title
+404        index_body = self.body
+405        title = index_body.get_element("text:index-title")  # type: ignore
+406
+407        # Clean the old index-body
+408        self.body = None
+409        index_body = self.body
+410
+411        # Restore the title
+412        if title and str(title):
+413            index_body.insert(title, position=0)  # type: ignore
+414
+415        # Insert default TOC style
+416        if use_default_styles:
+417            automatic_styles = body.get_element("//office:automatic-styles")
+418            if isinstance(automatic_styles, Element):
+419                for level in range(1, 11):
+420                    if (
+421                        automatic_styles.get_style(
+422                            "paragraph", _toc_entry_style_name(level)
+423                        )
+424                        is None
+425                    ):
+426                        level_style = default_toc_level_style(level)
+427                        automatic_styles.append(level_style)
+428
+429        # Auto-fill the index
+430        outline_level = self.outline_level or 10
+431        level_indexes: dict[int, int] = {}
+432        for header in body.get_headers():
+433            level = header.get_attribute_integer("text:outline-level") or 0
+434            if level is None or level > outline_level:
+435                continue
+436            number_str = self._header_numbering(level_indexes, level)
+437            # Make the title with "1.2.3. Title" format
+438            paragraph = Paragraph(f"{number_str} {header}")
+439            if use_default_styles:
+440                paragraph.style = _toc_entry_style_name(level)
+441            index_body.append(paragraph)  # type: ignore
+
+ + +

Fill the TOC with the titles found in the document. A TOC is not +contextual so it will catch all titles before and after its insertion. +If the TOC is not attached to a document, attach it beforehand or +provide one as argument.

+ +

For having a pretty TOC, let use_default_styles by default.

+ +

Arguments:

+ +
document -- Document
+
+use_default_styles -- bool
+
+
+ + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ xml_id: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ protected: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ protection_key: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ protection_key_digest_algorithm: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Tab(odfdo.Element): + + + +
+ +
194class Tab(Element):
+195    """This element represents the [UNICODE] tab character (HORIZONTAL
+196    TABULATION, U+0009).
+197
+198    The position attribute contains the number of the tab-stop to which
+199    a tab character refers. The position 0 marks the start margin of a
+200    paragraph. Note: The position attribute is only a hint to help non-layout
+201    oriented consumers to determine the tab/tab-stop association. Layout
+202    oriented consumers should determine the tab positions based on the style
+203    information
+204    """
+205
+206    _tag = "text:tab"
+207    _properties: tuple[PropDef, ...] = (PropDef("position", "text:tab-ref"),)
+208
+209    def __init__(self, position: int | None = None, **kwargs: Any) -> None:
+210        """
+211        Arguments:
+212
+213            position -- int
+214        """
+215        super().__init__(**kwargs)
+216        if self._do_init and position is not None and position >= 0:
+217            self.position = str(position)
+
+ + +

This element represents the [UNICODE] tab character (HORIZONTAL +TABULATION, U+0009).

+ +

The position attribute contains the number of the tab-stop to which +a tab character refers. The position 0 marks the start margin of a +paragraph. Note: The position attribute is only a hint to help non-layout +oriented consumers to determine the tab/tab-stop association. Layout +oriented consumers should determine the tab positions based on the style +information

+
+ + +
+ +
+ + Tab(position: int | None = None, **kwargs: Any) + + + +
+ +
209    def __init__(self, position: int | None = None, **kwargs: Any) -> None:
+210        """
+211        Arguments:
+212
+213            position -- int
+214        """
+215        super().__init__(**kwargs)
+216        if self._do_init and position is not None and position >= 0:
+217            self.position = str(position)
+
+ + +

Arguments:

+ +
position -- int
+
+
+ + +
+
+ +
+ position: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + TabStopStyle(odfdo.Element): + + + +
+ +
 94class TabStopStyle(Element):
+ 95    """ODF "style:tab-stop"
+ 96    Base style for a TOC entryBase style for a TOC entry
+ 97    """
+ 98
+ 99    _tag = "style:tab-stop"
+100    _properties = (
+101        PropDef("style_char", "style:char"),
+102        PropDef("leader_color", "style:leader-color"),
+103        PropDef("leader_style", "style:leader-style"),
+104        PropDef("leader_text", "style:leader-text"),
+105        PropDef("leader_text_style", "style:leader-text-style"),
+106        PropDef("leader_type", "style:leader-type"),
+107        PropDef("leader_width", "style:leader-width"),
+108        PropDef("style_position", "style:position"),
+109        PropDef("style_type", "style:type"),
+110    )
+111
+112    def __init__(  # noqa: C901
+113        self,
+114        style_char: str | None = None,
+115        leader_color: str | None = None,
+116        leader_style: str | None = None,
+117        leader_text: str | None = None,
+118        leader_text_style: str | None = None,
+119        leader_type: str | None = None,
+120        leader_width: str | None = None,
+121        style_position: str | None = None,
+122        style_type: str | None = None,
+123        **kwargs: Any,
+124    ):
+125        super().__init__(**kwargs)
+126        if self._do_init:
+127            if style_char:
+128                self.style_char = style_char
+129            if leader_color:
+130                self.leader_color = leader_color
+131            if leader_style:
+132                self.leader_style = leader_style
+133            if leader_text:
+134                self.leader_text = leader_text
+135            if leader_text_style:
+136                self.leader_text_style = leader_text_style
+137            if leader_type:
+138                self.leader_type = leader_type
+139            if leader_width:
+140                self.leader_width = leader_width
+141            if style_position:
+142                self.style_position = style_position
+143            if style_type:
+144                self.style_type = style_type
+
+ + +

ODF "style:tab-stop" +Base style for a TOC entryBase style for a TOC entry

+
+ + +
+ +
+ + TabStopStyle( style_char: str | None = None, leader_color: str | None = None, leader_style: str | None = None, leader_text: str | None = None, leader_text_style: str | None = None, leader_type: str | None = None, leader_width: str | None = None, style_position: str | None = None, style_type: str | None = None, **kwargs: Any) + + + +
+ +
112    def __init__(  # noqa: C901
+113        self,
+114        style_char: str | None = None,
+115        leader_color: str | None = None,
+116        leader_style: str | None = None,
+117        leader_text: str | None = None,
+118        leader_text_style: str | None = None,
+119        leader_type: str | None = None,
+120        leader_width: str | None = None,
+121        style_position: str | None = None,
+122        style_type: str | None = None,
+123        **kwargs: Any,
+124    ):
+125        super().__init__(**kwargs)
+126        if self._do_init:
+127            if style_char:
+128                self.style_char = style_char
+129            if leader_color:
+130                self.leader_color = leader_color
+131            if leader_style:
+132                self.leader_style = leader_style
+133            if leader_text:
+134                self.leader_text = leader_text
+135            if leader_text_style:
+136                self.leader_text_style = leader_text_style
+137            if leader_type:
+138                self.leader_type = leader_type
+139            if leader_width:
+140                self.leader_width = leader_width
+141            if style_position:
+142                self.style_position = style_position
+143            if style_type:
+144                self.style_type = style_type
+
+ + + + +
+
+ +
+ style_char: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ leader_color: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ leader_style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ leader_text: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ leader_text_style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ leader_type: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ leader_width: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style_position: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style_type: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Table(odfdo.Element): + + + +
+ +
 284class Table(Element):
+ 285    """ODF table "table:table" """
+ 286
+ 287    _tag = "table:table"
+ 288    _caching = True
+ 289    _append = Element.append
+ 290
+ 291    def __init__(
+ 292        self,
+ 293        name: str | None = None,
+ 294        width: int | None = None,
+ 295        height: int | None = None,
+ 296        protected: bool = False,
+ 297        protection_key: str | None = None,
+ 298        display: bool = True,
+ 299        printable: bool = True,
+ 300        print_ranges: list[str] | None = None,
+ 301        style: str | None = None,
+ 302        **kwargs: Any,
+ 303    ) -> None:
+ 304        """Create a table element, optionally prefilled with "height" rows of
+ 305        "width" cells each.
+ 306
+ 307        If the table is to be protected, a protection key must be provided,
+ 308        i.e. a hash value of the password.
+ 309
+ 310        If the table must not be displayed, set "display" to False.
+ 311
+ 312        If the table must not be printed, set "printable" to False. The table
+ 313        will not be printed when it is not displayed, whatever the value of
+ 314        this argument.
+ 315
+ 316        Ranges of cells to print can be provided as a list of cell ranges,
+ 317        e.g. ['E6:K12', 'P6:R12'] or directly as a raw string, e.g.
+ 318        "E6:K12 P6:R12".
+ 319
+ 320        You can access and modify the XML tree manually, but you probably want
+ 321        to use the API to access and alter cells. It will save you from
+ 322        handling repetitions and the same number of cells for each row.
+ 323
+ 324        If you use both the table API and the XML API, you are on your own for
+ 325        ensuiring model integrity.
+ 326
+ 327        Arguments:
+ 328
+ 329            name -- str
+ 330
+ 331            width -- int
+ 332
+ 333            height -- int
+ 334
+ 335            protected -- bool
+ 336
+ 337            protection_key -- str
+ 338
+ 339            display -- bool
+ 340
+ 341            printable -- bool
+ 342
+ 343            print_ranges -- list
+ 344
+ 345            style -- str
+ 346        """
+ 347        super().__init__(**kwargs)
+ 348        self._indexes = {}
+ 349        self._indexes["_cmap"] = {}
+ 350        self._indexes["_tmap"] = {}
+ 351        if self._do_init:
+ 352            self.name = name
+ 353            if protected:
+ 354                self.protected = protected
+ 355                self.set_protection_key = protection_key
+ 356            if not display:
+ 357                self.displayed = display
+ 358            if not printable:
+ 359                self.printable = printable
+ 360            if print_ranges:
+ 361                self.print_ranges = print_ranges
+ 362            if style:
+ 363                self.style = style
+ 364            # Prefill the table
+ 365            if width is not None or height is not None:
+ 366                width = width or 1
+ 367                height = height or 1
+ 368                # Column groups for style information
+ 369                columns = Column(repeated=width)
+ 370                self._append(columns)
+ 371                for _i in range(height):
+ 372                    row = Row(width)
+ 373                    self._append(row)
+ 374        self._compute_table_cache()
+ 375
+ 376    def __str__(self) -> str:
+ 377        def write_content(csv_writer: object) -> None:
+ 378            for values in self.iter_values():
+ 379                line = []
+ 380                for value in values:
+ 381                    if value is None:
+ 382                        value = ""
+ 383                    if isinstance(value, str):
+ 384                        value = value.strip()
+ 385                    line.append(value)
+ 386                csv_writer.writerow(line)  # type: ignore
+ 387
+ 388        out = StringIO(newline=os.linesep)
+ 389        csv_writer = csv.writer(
+ 390            out,
+ 391            delimiter=" ",
+ 392            doublequote=False,
+ 393            escapechar="\\",
+ 394            lineterminator=os.linesep,
+ 395            quotechar='"',
+ 396            quoting=csv.QUOTE_NONNUMERIC,
+ 397        )
+ 398        write_content(csv_writer)
+ 399        return out.getvalue()
+ 400
+ 401    def _translate_y_from_any(self, y: str | int) -> int:
+ 402        # "3" (couting from 1) -> 2 (couting from 0)
+ 403        return translate_from_any(y, self.height, 1)
+ 404
+ 405    def _translate_table_coordinates_list(
+ 406        self,
+ 407        coord: tuple | list,
+ 408    ) -> tuple[int | None, ...]:
+ 409        height = self.height
+ 410        width = self.width
+ 411        # assuming we got int values
+ 412        if len(coord) == 1:
+ 413            # It is a row
+ 414            y = coord[0]
+ 415            if y and y < 0:
+ 416                y = increment(y, height)
+ 417            return (None, y, None, y)
+ 418        if len(coord) == 2:
+ 419            # It is a row range, not a cell, because context is table
+ 420            y = coord[0]
+ 421            if y and y < 0:
+ 422                y = increment(y, height)
+ 423            t = coord[1]
+ 424            if t and t < 0:
+ 425                t = increment(t, height)
+ 426            return (None, y, None, t)
+ 427        # should be 4 int
+ 428        x, y, z, t = coord
+ 429        if x and x < 0:
+ 430            x = increment(x, width)
+ 431        if y and y < 0:
+ 432            y = increment(y, height)
+ 433        if z and z < 0:
+ 434            z = increment(z, width)
+ 435        if t and t < 0:
+ 436            t = increment(t, height)
+ 437        return (x, y, z, t)
+ 438
+ 439    def _translate_table_coordinates_str(
+ 440        self,
+ 441        coord_str: str,
+ 442    ) -> tuple[int | None, ...]:
+ 443        height = self.height
+ 444        width = self.width
+ 445        coord = convert_coordinates(coord_str)
+ 446        if len(coord) == 2:
+ 447            x, y = coord
+ 448            if x and x < 0:
+ 449                x = increment(x, width)
+ 450            if y and y < 0:
+ 451                y = increment(y, height)
+ 452            # extent to an area :
+ 453            return (x, y, x, y)
+ 454        x, y, z, t = coord
+ 455        if x and x < 0:
+ 456            x = increment(x, width)
+ 457        if y and y < 0:
+ 458            y = increment(y, height)
+ 459        if z and z < 0:
+ 460            z = increment(z, width)
+ 461        if t and t < 0:
+ 462            t = increment(t, height)
+ 463        return (x, y, z, t)
+ 464
+ 465    def _translate_table_coordinates(
+ 466        self,
+ 467        coord: tuple | list | str,
+ 468    ) -> tuple[int | None, ...]:
+ 469        if isinstance(coord, str):
+ 470            return self._translate_table_coordinates_str(coord)
+ 471        return self._translate_table_coordinates_list(coord)
+ 472
+ 473    def _translate_column_coordinates_str(
+ 474        self,
+ 475        coord_str: str,
+ 476    ) -> tuple[int | None, ...]:
+ 477        width = self.width
+ 478        height = self.height
+ 479        coord = convert_coordinates(coord_str)
+ 480        if len(coord) == 2:
+ 481            x, y = coord
+ 482            if x and x < 0:
+ 483                x = increment(x, width)
+ 484            if y and y < 0:
+ 485                y = increment(y, height)
+ 486            # extent to an area :
+ 487            return (x, y, x, y)
+ 488        x, y, z, t = coord
+ 489        if x and x < 0:
+ 490            x = increment(x, width)
+ 491        if y and y < 0:
+ 492            y = increment(y, height)
+ 493        if z and z < 0:
+ 494            z = increment(z, width)
+ 495        if t and t < 0:
+ 496            t = increment(t, height)
+ 497        return (x, y, z, t)
+ 498
+ 499    def _translate_column_coordinates_list(
+ 500        self,
+ 501        coord: tuple | list,
+ 502    ) -> tuple[int | None, ...]:
+ 503        width = self.width
+ 504        height = self.height
+ 505        # assuming we got int values
+ 506        if len(coord) == 1:
+ 507            # It is a column
+ 508            x = coord[0]
+ 509            if x and x < 0:
+ 510                x = increment(x, width)
+ 511            return (x, None, x, None)
+ 512        if len(coord) == 2:
+ 513            # It is a column range, not a cell, because context is table
+ 514            x = coord[0]
+ 515            if x and x < 0:
+ 516                x = increment(x, width)
+ 517            z = coord[1]
+ 518            if z and z < 0:
+ 519                z = increment(z, width)
+ 520            return (x, None, z, None)
+ 521        # should be 4 int
+ 522        x, y, z, t = coord
+ 523        if x and x < 0:
+ 524            x = increment(x, width)
+ 525        if y and y < 0:
+ 526            y = increment(y, height)
+ 527        if z and z < 0:
+ 528            z = increment(z, width)
+ 529        if t and t < 0:
+ 530            t = increment(t, height)
+ 531        return (x, y, z, t)
+ 532
+ 533    def _translate_column_coordinates(
+ 534        self,
+ 535        coord: tuple | list | str,
+ 536    ) -> tuple[int | None, ...]:
+ 537        if isinstance(coord, str):
+ 538            return self._translate_column_coordinates_str(coord)
+ 539        return self._translate_column_coordinates_list(coord)
+ 540
+ 541    def _translate_cell_coordinates(
+ 542        self,
+ 543        coord: tuple | list | str,
+ 544    ) -> tuple[int | None, int | None]:
+ 545        # we want an x,y result
+ 546        coord = convert_coordinates(coord)
+ 547        if len(coord) == 2:
+ 548            x, y = coord
+ 549        # If we got an area, take the first cell
+ 550        elif len(coord) == 4:
+ 551            x, y, z, t = coord
+ 552        else:
+ 553            raise ValueError(str(coord))
+ 554        if x and x < 0:
+ 555            x = increment(x, self.width)
+ 556        if y and y < 0:
+ 557            y = increment(y, self.height)
+ 558        return (x, y)
+ 559
+ 560    def _compute_table_cache(self) -> None:
+ 561        idx_repeated_seq = self.elements_repeated_sequence(
+ 562            _xpath_row, "table:number-rows-repeated"
+ 563        )
+ 564        self._tmap = make_cache_map(idx_repeated_seq)
+ 565        idx_repeated_seq = self.elements_repeated_sequence(
+ 566            _xpath_column, "table:number-columns-repeated"
+ 567        )
+ 568        self._cmap = make_cache_map(idx_repeated_seq)
+ 569
+ 570    def _update_width(self, row: Row) -> None:
+ 571        """Synchronize the number of columns if the row is bigger.
+ 572
+ 573        Append, don't insert, not to disturb the current layout.
+ 574        """
+ 575        diff = row.width - self.width
+ 576        if diff > 0:
+ 577            self.append_column(Column(repeated=diff))
+ 578
+ 579    def _get_formatted_text_normal(self, context: dict | None) -> str:
+ 580        result = []
+ 581        for row in self.traverse():
+ 582            for cell in row.traverse():
+ 583                value = cell.get_value(try_get_text=False)
+ 584                # None ?
+ 585                if value is None:
+ 586                    # Try with get_formatted_text on the elements
+ 587                    value = []
+ 588                    for element in cell.children:
+ 589                        value.append(element.get_formatted_text(context))
+ 590                    value = "".join(value)
+ 591                else:
+ 592                    value = str(value)
+ 593                result.append(value)
+ 594                result.append("\n")
+ 595            result.append("\n")
+ 596        return "".join(result)
+ 597
+ 598    def _get_formatted_text_rst(self, context: dict) -> str:  # noqa: C901
+ 599        context["no_img_level"] += 1
+ 600        # Strip the table => We must clone
+ 601        table = self.clone
+ 602        table.rstrip(aggressive=True)  # type: ignore
+ 603
+ 604        # Fill the rows
+ 605        rows = []
+ 606        cols_nb = 0
+ 607        cols_size: dict[int, int] = {}
+ 608        for odf_row in table.traverse():  # type: ignore
+ 609            row = []
+ 610            for i, cell in enumerate(odf_row.traverse()):
+ 611                value = cell.get_value(try_get_text=False)
+ 612                # None ?
+ 613                if value is None:
+ 614                    # Try with get_formatted_text on the elements
+ 615                    value = []
+ 616                    for element in cell.children:
+ 617                        value.append(element.get_formatted_text(context))
+ 618                    value = "".join(value)
+ 619                else:
+ 620                    value = str(value)
+ 621                value = value.strip()
+ 622                # Strip the empty columns
+ 623                if value:
+ 624                    cols_nb = max(cols_nb, i + 1)
+ 625                # Compute the size of each columns (at least 2)
+ 626                cols_size[i] = max(cols_size.get(i, 2), len(value))
+ 627                # Append
+ 628                row.append(value)
+ 629            rows.append(row)
+ 630
+ 631        # Nothing ?
+ 632        if cols_nb == 0:
+ 633            return ""
+ 634
+ 635        # Prevent a crash with empty columns (by example with images)
+ 636        for col, size in cols_size.items():
+ 637            if size == 0:
+ 638                cols_size[col] = 1
+ 639
+ 640        # Update cols_size
+ 641        LINE_MAX = 100
+ 642        COL_MIN = 16
+ 643
+ 644        free_size = LINE_MAX - (cols_nb - 1) * 3 - 4
+ 645        real_size = sum([cols_size[i] for i in range(cols_nb)])
+ 646        if real_size > free_size:
+ 647            factor = float(free_size) / real_size
+ 648
+ 649            for i in range(cols_nb):
+ 650                old_size = cols_size[i]
+ 651
+ 652                # The cell is already small
+ 653                if old_size <= COL_MIN:
+ 654                    continue
+ 655
+ 656                new_size = int(factor * old_size)
+ 657
+ 658                if new_size < COL_MIN:
+ 659                    new_size = COL_MIN
+ 660                cols_size[i] = new_size
+ 661
+ 662        # Convert !
+ 663        result: list[str] = [""]
+ 664        # Construct the first/last line
+ 665        line: list[str] = []
+ 666        for i in range(cols_nb):
+ 667            line.append("=" * cols_size[i])
+ 668            line.append(" ")
+ 669        line_str = "".join(line)
+ 670
+ 671        # Add the lines
+ 672        result.append(line_str)
+ 673        for row in rows:
+ 674            # Wrap the row
+ 675            wrapped_row = []
+ 676            for i, value in enumerate(row[:cols_nb]):
+ 677                wrapped_value = []
+ 678                for part in value.split("\n"):
+ 679                    # Hack to handle correctly the lists or the directives
+ 680                    subsequent_indent = ""
+ 681                    part_lstripped = part.lstrip()
+ 682                    if part_lstripped.startswith("-") or part_lstripped.startswith(
+ 683                        ".."
+ 684                    ):
+ 685                        subsequent_indent = " " * (len(part) - len(part.lstrip()) + 2)
+ 686                    wrapped_part = wrap(
+ 687                        part, width=cols_size[i], subsequent_indent=subsequent_indent
+ 688                    )
+ 689                    if wrapped_part:
+ 690                        wrapped_value.extend(wrapped_part)
+ 691                    else:
+ 692                        wrapped_value.append("")
+ 693                wrapped_row.append(wrapped_value)
+ 694
+ 695            # Append!
+ 696            for j in range(max([1] + [len(values) for values in wrapped_row])):
+ 697                txt_row: list[str] = []
+ 698                for i in range(cols_nb):
+ 699                    values = wrapped_row[i] if i < len(wrapped_row) else []
+ 700
+ 701                    # An empty cell ?
+ 702                    if len(values) - 1 < j or not values[j]:
+ 703                        if i == 0 and j == 0:
+ 704                            txt_row.append("..")
+ 705                            txt_row.append(" " * (cols_size[i] - 1))
+ 706                        else:
+ 707                            txt_row.append(" " * (cols_size[i] + 1))
+ 708                        continue
+ 709
+ 710                    # Not empty
+ 711                    value = values[j]
+ 712                    txt_row.append(value)
+ 713                    txt_row.append(" " * (cols_size[i] - len(value) + 1))
+ 714                result.append("".join(txt_row))
+ 715
+ 716        result.append(line_str)
+ 717        result.append("")
+ 718        result.append("")
+ 719        result_str = "\n".join(result)
+ 720
+ 721        context["no_img_level"] -= 1
+ 722        return result_str
+ 723
+ 724    def _translate_x_from_any(self, x: str | int) -> int:
+ 725        return translate_from_any(x, self.width, 0)
+ 726
+ 727    #
+ 728    # Public API
+ 729    #
+ 730
+ 731    def append(self, something: Element | str) -> None:
+ 732        """Dispatch .append() call to append_row() or append_column()."""
+ 733        if isinstance(something, Row):
+ 734            self.append_row(something)
+ 735        elif isinstance(something, Column):
+ 736            self.append_column(something)
+ 737        else:
+ 738            # probably still an error
+ 739            self._append(something)
+ 740
+ 741    @property
+ 742    def height(self) -> int:
+ 743        """Get the current height of the table.
+ 744
+ 745        Return: int
+ 746        """
+ 747        try:
+ 748            height = self._tmap[-1] + 1
+ 749        except Exception:
+ 750            height = 0
+ 751        return height
+ 752
+ 753    @property
+ 754    def width(self) -> int:
+ 755        """Get the current width of the table, measured on columns.
+ 756
+ 757        Rows may have different widths, use the Table API to ensure width
+ 758        consistency.
+ 759
+ 760        Return: int
+ 761        """
+ 762        # Columns are our reference for user expected width
+ 763
+ 764        try:
+ 765            width = self._cmap[-1] + 1
+ 766        except Exception:
+ 767            width = 0
+ 768
+ 769        # columns = self._get_columns()
+ 770        # repeated = self.xpath(
+ 771        #        'table:table-column/@table:number-columns-repeated')
+ 772        # unrepeated = len(columns) - len(repeated)
+ 773        # ws = sum(int(r) for r in repeated) + unrepeated
+ 774        # if w != ws:
+ 775        #    print "WARNING   ws", ws, "w", w
+ 776
+ 777        return width
+ 778
+ 779    @property
+ 780    def size(self) -> tuple[int, int]:
+ 781        """Shortcut to get the current width and height of the table.
+ 782
+ 783        Return: (int, int)
+ 784        """
+ 785        return self.width, self.height
+ 786
+ 787    @property
+ 788    def name(self) -> str | None:
+ 789        """Get / set the name of the table."""
+ 790        return self.get_attribute_string("table:name")
+ 791
+ 792    @name.setter
+ 793    def name(self, name: str) -> None:
+ 794        name = _table_name_check(name)
+ 795        # first, update named ranges
+ 796        # fixme : delete name ranges when deleting table, too.
+ 797        for named_range in self.get_named_ranges(table_name=self.name):
+ 798            named_range.set_table_name(name)
+ 799        self.set_attribute("table:name", name)
+ 800
+ 801    @property
+ 802    def protected(self) -> bool:
+ 803        return bool(self.get_attribute("table:protected"))
+ 804
+ 805    @protected.setter
+ 806    def protected(self, protect: bool) -> None:
+ 807        self.set_attribute("table:protected", protect)
+ 808
+ 809    @property
+ 810    def protection_key(self) -> str | None:
+ 811        return self.get_attribute_string("table:protection-key")
+ 812
+ 813    @protection_key.setter
+ 814    def protection_key(self, key: str) -> None:
+ 815        self.set_attribute("table:protection-key", key)
+ 816
+ 817    @property
+ 818    def displayed(self) -> bool:
+ 819        return bool(self.get_attribute("table:display"))
+ 820
+ 821    @displayed.setter
+ 822    def displayed(self, display: bool) -> None:
+ 823        self.set_attribute("table:display", display)
+ 824
+ 825    @property
+ 826    def printable(self) -> bool:
+ 827        printable = self.get_attribute("table:print")
+ 828        # Default value
+ 829        if printable is None:
+ 830            return True
+ 831        return bool(printable)
+ 832
+ 833    @printable.setter
+ 834    def printable(self, printable: bool) -> None:
+ 835        self.set_attribute("table:print", printable)
+ 836
+ 837    @property
+ 838    def print_ranges(self) -> list[str]:
+ 839        ranges = self.get_attribute_string("table:print-ranges")
+ 840        if isinstance(ranges, str):
+ 841            return ranges.split()
+ 842        return []
+ 843
+ 844    @print_ranges.setter
+ 845    def print_ranges(self, ranges: list[str] | None) -> None:
+ 846        if isinstance(ranges, (list, tuple)):
+ 847            self.set_attribute("table:print-ranges", " ".join(ranges))
+ 848        else:
+ 849            self.set_attribute("table:print-ranges", ranges)
+ 850
+ 851    @property
+ 852    def style(self) -> str | None:
+ 853        """Get / set the style of the table
+ 854
+ 855        Return: str
+ 856        """
+ 857        return self.get_attribute_string("table:style-name")
+ 858
+ 859    @style.setter
+ 860    def style(self, style: str | Element) -> None:
+ 861        self.set_style_attribute("table:style-name", style)
+ 862
+ 863    def get_formatted_text(self, context: dict | None = None) -> str:
+ 864        if context and context["rst_mode"]:
+ 865            return self._get_formatted_text_rst(context)
+ 866        return self._get_formatted_text_normal(context)
+ 867
+ 868    def get_values(
+ 869        self,
+ 870        coord: tuple | list | str | None = None,
+ 871        cell_type: str | None = None,
+ 872        complete: bool = True,
+ 873        get_type: bool = False,
+ 874        flat: bool = False,
+ 875    ) -> list:
+ 876        """Get a matrix of values of the table.
+ 877
+ 878        Filter by coordinates will parse the area defined by the coordinates.
+ 879
+ 880        If 'cell_type' is used and 'complete' is True (default), missing values
+ 881        are replaced by None.
+ 882        Filter by ' cell_type = "all" ' will retrieve cells of any
+ 883        type, aka non empty cells.
+ 884
+ 885        If 'cell_type' is None, complete is always True : with no cell type
+ 886        queried, get_values() returns None for each empty cell, the length
+ 887        each lists is equal to the width of the table.
+ 888
+ 889        If get_type is True, returns tuples (value, ODF type of value), or
+ 890        (None, None) for empty cells with complete True.
+ 891
+ 892        If flat is True, the methods return a single list of all the values.
+ 893        By default, flat is False.
+ 894
+ 895        Arguments:
+ 896
+ 897            coord -- str or tuple of int : coordinates of area
+ 898
+ 899            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+ 900                         'currency', 'percentage' or 'all'
+ 901
+ 902            complete -- boolean
+ 903
+ 904            get_type -- boolean
+ 905
+ 906        Return: list of lists of Python types
+ 907        """
+ 908        if coord:
+ 909            x, y, z, t = self._translate_table_coordinates(coord)
+ 910        else:
+ 911            x = y = z = t = None
+ 912        data = []
+ 913        for row in self.traverse(start=y, end=t):
+ 914            if z is None:
+ 915                width = self.width
+ 916            else:
+ 917                width = min(z + 1, self.width)
+ 918            if x is not None:
+ 919                width -= x
+ 920            values = row.get_values(
+ 921                (x, z),
+ 922                cell_type=cell_type,
+ 923                complete=complete,
+ 924                get_type=get_type,
+ 925            )
+ 926            # complete row to match request width
+ 927            if complete:
+ 928                if get_type:
+ 929                    values.extend([(None, None)] * (width - len(values)))
+ 930                else:
+ 931                    values.extend([None] * (width - len(values)))
+ 932            if flat:
+ 933                data.extend(values)
+ 934            else:
+ 935                data.append(values)
+ 936        return data
+ 937
+ 938    def iter_values(
+ 939        self,
+ 940        coord: tuple | list | str | None = None,
+ 941        cell_type: str | None = None,
+ 942        complete: bool = True,
+ 943        get_type: bool = False,
+ 944    ) -> Iterator[list]:
+ 945        """Iterate through lines of Python values of the table.
+ 946
+ 947        Filter by coordinates will parse the area defined by the coordinates.
+ 948
+ 949        cell_type, complete, grt_type : see get_values()
+ 950
+ 951
+ 952
+ 953        Arguments:
+ 954
+ 955            coord -- str or tuple of int : coordinates of area
+ 956
+ 957            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+ 958                         'currency', 'percentage' or 'all'
+ 959
+ 960            complete -- boolean
+ 961
+ 962            get_type -- boolean
+ 963
+ 964        Return: iterator of lists
+ 965        """
+ 966        if coord:
+ 967            x, y, z, t = self._translate_table_coordinates(coord)
+ 968        else:
+ 969            x = y = z = t = None
+ 970        for row in self.traverse(start=y, end=t):
+ 971            if z is None:
+ 972                width = self.width
+ 973            else:
+ 974                width = min(z + 1, self.width)
+ 975            if x is not None:
+ 976                width -= x
+ 977            values = row.get_values(
+ 978                (x, z),
+ 979                cell_type=cell_type,
+ 980                complete=complete,
+ 981                get_type=get_type,
+ 982            )
+ 983            # complete row to match column width
+ 984            if complete:
+ 985                if get_type:
+ 986                    values.extend([(None, None)] * (width - len(values)))
+ 987                else:
+ 988                    values.extend([None] * (width - len(values)))
+ 989            yield values
+ 990
+ 991    def set_values(
+ 992        self,
+ 993        values: list,
+ 994        coord: tuple | list | str | None = None,
+ 995        style: str | None = None,
+ 996        cell_type: str | None = None,
+ 997        currency: str | None = None,
+ 998    ) -> None:
+ 999        """Set the value of cells in the table, from the 'coord' position
+1000        with values.
+1001
+1002        'coord' is the coordinate of the upper left cell to be modified by
+1003        values. If 'coord' is None, default to the position (0,0) ("A1").
+1004        If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
+1005        area is used as coordinate.
+1006
+1007        The table is *not* cleared before the operation, to reset the table
+1008        before setting values, use table.clear().
+1009
+1010        A list of lists is expected, with as many lists as rows, and as many
+1011        items in each sublist as cells to be setted. None values in the list
+1012        will create empty cells with no cell type (but eventually a style).
+1013
+1014        Arguments:
+1015
+1016            coord -- tuple or str
+1017
+1018            values -- list of lists of python types
+1019
+1020            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+1021                         'string' or 'time'
+1022
+1023            currency -- three-letter str
+1024
+1025            style -- str
+1026        """
+1027        if coord:
+1028            x, y = self._translate_cell_coordinates(coord)
+1029        else:
+1030            x = y = 0
+1031        if y is None:
+1032            y = 0
+1033        if x is None:
+1034            x = 0
+1035        y -= 1
+1036        for row_values in values:
+1037            y += 1
+1038            if not row_values:
+1039                continue
+1040            row = self.get_row(y, clone=True)
+1041            repeated = row.repeated or 1
+1042            if repeated >= 2:
+1043                row.repeated = None
+1044            row.set_values(
+1045                row_values,
+1046                start=x,
+1047                cell_type=cell_type,
+1048                currency=currency,
+1049                style=style,
+1050            )
+1051            self.set_row(y, row, clone=False)
+1052            self._update_width(row)
+1053
+1054    def rstrip(self, aggressive: bool = False) -> None:
+1055        """Remove *in-place* empty rows below and empty cells at the right of
+1056        the table. Cells are empty if they contain no value or it evaluates
+1057        to False, and no style.
+1058
+1059        If aggressive is True, empty cells with style are removed too.
+1060
+1061        Argument:
+1062
+1063            aggressive -- bool
+1064        """
+1065        # Step 1: remove empty rows below the table
+1066        for row in reversed(self._get_rows()):
+1067            if row.is_empty(aggressive=aggressive):
+1068                row.parent.delete(row)  # type: ignore
+1069            else:
+1070                break
+1071        # Step 2: rstrip remaining rows
+1072        max_width = 0
+1073        for row in self._get_rows():
+1074            row.rstrip(aggressive=aggressive)
+1075            # keep count of the biggest row
+1076            max_width = max(max_width, row.width)
+1077        # raz cache of rows
+1078        self._indexes["_tmap"] = {}
+1079        # Step 3: trim columns to match max_width
+1080        columns = self._get_columns()
+1081        repeated_cols = self.xpath("table:table-column/@table:number-columns-repeated")
+1082        if not isinstance(repeated_cols, list):
+1083            raise TypeError
+1084        unrepeated = len(columns) - len(repeated_cols)
+1085        column_width = sum(int(r) for r in repeated_cols) + unrepeated  # type: ignore
+1086        diff = column_width - max_width
+1087        if diff > 0:
+1088            for column in reversed(columns):
+1089                repeated = column.repeated or 1
+1090                repeated = repeated - diff
+1091                if repeated > 0:
+1092                    column.repeated = repeated
+1093                    break
+1094                else:
+1095                    column.parent.delete(column)
+1096                    diff = -repeated
+1097                    if diff == 0:
+1098                        break
+1099        # raz cache of columns
+1100        self._indexes["_cmap"] = {}
+1101        self._compute_table_cache()
+1102
+1103    def transpose(self, coord: tuple | list | str | None = None) -> None:  # noqa: C901
+1104        """Swap *in-place* rows and columns of the table.
+1105
+1106        If 'coord' is not None, apply transpose only to the area defined by the
+1107        coordinates. Beware, if area is not square, some cells mays be over
+1108        written during the process.
+1109
+1110        Arguments:
+1111
+1112            coord -- str or tuple of int : coordinates of area
+1113
+1114            start -- int or str
+1115        """
+1116        data = []
+1117        if coord is None:
+1118            for row in self.traverse():
+1119                data.append(list(row.traverse()))
+1120            transposed_data = zip_longest(*data)
+1121            self.clear()
+1122            # new_rows = []
+1123            for row_cells in transposed_data:
+1124                if not isiterable(row_cells):
+1125                    row_cells = (row_cells,)
+1126                row = Row()
+1127                row.extend_cells(row_cells)
+1128                self.append_row(row, clone=False)
+1129            self._compute_table_cache()
+1130        else:
+1131            x, y, z, t = self._translate_table_coordinates(coord)
+1132            if x is None:
+1133                x = 0
+1134            else:
+1135                x = min(x, self.width - 1)
+1136            if z is None:
+1137                z = self.width - 1
+1138            else:
+1139                z = min(z, self.width - 1)
+1140            if y is None:
+1141                y = 0
+1142            else:
+1143                y = min(y, self.height - 1)
+1144            if t is None:
+1145                t = self.height - 1
+1146            else:
+1147                t = min(t, self.height - 1)
+1148            for row in self.traverse(start=y, end=t):
+1149                data.append(list(row.traverse(start=x, end=z)))
+1150            transposed_data = zip_longest(*data)
+1151            # clear locally
+1152            w = z - x + 1
+1153            h = t - y + 1
+1154            if w != h:
+1155                nones = [[None] * w for i in range(h)]
+1156                self.set_values(nones, coord=(x, y, z, t))
+1157            # put transposed
+1158            filtered_data: list[tuple[Cell]] = []
+1159            for row_cells in transposed_data:
+1160                if isinstance(row_cells, (list, tuple)):
+1161                    filtered_data.append(row_cells)
+1162                else:
+1163                    filtered_data.append((row_cells,))
+1164            self.set_cells(filtered_data, (x, y, x + h - 1, y + w - 1))
+1165            self._compute_table_cache()
+1166
+1167    def is_empty(self, aggressive: bool = False) -> bool:
+1168        """Return whether every cell in the table has no value or the value
+1169        evaluates to False (empty string), and no style.
+1170
+1171        If aggressive is True, empty cells with style are considered empty.
+1172
+1173        Arguments:
+1174
+1175            aggressive -- bool
+1176        """
+1177        return all(row.is_empty(aggressive=aggressive) for row in self._get_rows())
+1178
+1179    #
+1180    # Rows
+1181    #
+1182
+1183    def _get_rows(self) -> list[Row]:
+1184        return self.get_elements(_xpath_row)  # type: ignore
+1185
+1186    def traverse(  # noqa: C901
+1187        self,
+1188        start: int | None = None,
+1189        end: int | None = None,
+1190    ) -> Iterator[Row]:
+1191        """Yield as many row elements as expected rows in the table, i.e.
+1192        expand repetitions by returning the same row as many times as
+1193        necessary.
+1194
+1195            Arguments:
+1196
+1197                start -- int
+1198
+1199                end -- int
+1200
+1201        Copies are returned, use set_row() to push them back.
+1202        """
+1203        idx = -1
+1204        before = -1
+1205        y = 0
+1206        if start is None and end is None:
+1207            for juska in self._tmap:
+1208                idx += 1
+1209                if idx in self._indexes["_tmap"]:
+1210                    row = self._indexes["_tmap"][idx]
+1211                else:
+1212                    row = self._get_element_idx2(_xpath_row_idx, idx)
+1213                    self._indexes["_tmap"][idx] = row
+1214                repeated = juska - before
+1215                before = juska
+1216                for _i in range(repeated or 1):
+1217                    # Return a copy without the now obsolete repetition
+1218                    row = row.clone
+1219                    row.y = y
+1220                    y += 1
+1221                    if repeated > 1:
+1222                        row.repeated = None
+1223                    yield row
+1224        else:
+1225            if start is None:
+1226                start = 0
+1227            start = max(0, start)
+1228            if end is None:
+1229                try:
+1230                    end = self._tmap[-1]
+1231                except Exception:
+1232                    end = -1
+1233            start_map = find_odf_idx(self._tmap, start)
+1234            if start_map is None:
+1235                return
+1236            if start_map > 0:
+1237                before = self._tmap[start_map - 1]
+1238            idx = start_map - 1
+1239            before = start - 1
+1240            y = start
+1241            for juska in self._tmap[start_map:]:
+1242                idx += 1
+1243                if idx in self._indexes["_tmap"]:
+1244                    row = self._indexes["_tmap"][idx]
+1245                else:
+1246                    row = self._get_element_idx2(_xpath_row_idx, idx)
+1247                    self._indexes["_tmap"][idx] = row
+1248                repeated = juska - before
+1249                before = juska
+1250                for _i in range(repeated or 1):
+1251                    if y <= end:
+1252                        row = row.clone
+1253                        row.y = y
+1254                        y += 1
+1255                        if repeated > 1 or (y == start and start > 0):
+1256                            row.repeated = None
+1257                        yield row
+1258
+1259    def get_rows(
+1260        self,
+1261        coord: tuple | list | str | None = None,
+1262        style: str | None = None,
+1263        content: str | None = None,
+1264    ) -> list[Row]:
+1265        """Get the list of rows matching the criteria.
+1266
+1267        Filter by coordinates will parse the area defined by the coordinates.
+1268
+1269        Arguments:
+1270
+1271            coord -- str or tuple of int : coordinates of rows
+1272
+1273            content -- str regex
+1274
+1275            style -- str
+1276
+1277        Return: list of rows
+1278        """
+1279        if coord:
+1280            _x, y, _z, t = self._translate_table_coordinates(coord)
+1281        else:
+1282            y = t = None
+1283        # fixme : not clones ?
+1284        if not content and not style:
+1285            return list(self.traverse(start=y, end=t))
+1286        rows = []
+1287        for row in self.traverse(start=y, end=t):
+1288            if content and not row.match(content):
+1289                continue
+1290            if style and style != row.style:
+1291                continue
+1292            rows.append(row)
+1293        return rows
+1294
+1295    def _get_row2(self, y: int, clone: bool = True, create: bool = True) -> Row:
+1296        if y >= self.height:
+1297            if create:
+1298                return Row()
+1299            raise ValueError("Row not found")
+1300        row = self._get_row2_base(y)
+1301        if row is None:
+1302            raise ValueError("Row not found")
+1303        if clone:
+1304            return row.clone
+1305        return row
+1306
+1307    def _get_row2_base(self, y: int) -> Row | None:
+1308        idx = find_odf_idx(self._tmap, y)
+1309        if idx is not None:
+1310            if idx in self._indexes["_tmap"]:
+1311                row = self._indexes["_tmap"][idx]
+1312            else:
+1313                row = self._get_element_idx2(_xpath_row_idx, idx)
+1314                self._indexes["_tmap"][idx] = row
+1315            return row
+1316        return None
+1317
+1318    def get_row(self, y: int | str, clone: bool = True, create: bool = True) -> Row:
+1319        """Get the row at the given "y" position.
+1320
+1321        Position start at 0. So cell A4 is on row 3.
+1322
+1323        A copy is returned, use set_cell() to push it back.
+1324
+1325        Arguments:
+1326
+1327            y -- int or str
+1328
+1329        Return: Row
+1330        """
+1331        # fixme : keep repeat ? maybe an option to functions : "raw=False"
+1332        y = self._translate_y_from_any(y)
+1333        row = self._get_row2(y, clone=clone, create=create)
+1334        if row is None:
+1335            raise ValueError("Row not found")
+1336        row.y = y
+1337        return row
+1338
+1339    def set_row(self, y: int | str, row: Row | None = None, clone: bool = True) -> Row:
+1340        """Replace the row at the given position with the new one. Repetions of
+1341        the old row will be adjusted.
+1342
+1343        If row is None, a new empty row is created.
+1344
+1345        Position start at 0. So cell A4 is on row 3.
+1346
+1347        Arguments:
+1348
+1349            y -- int or str
+1350
+1351            row -- Row
+1352
+1353        returns the row, with updated row.y
+1354        """
+1355        if row is None:
+1356            row = Row()
+1357            repeated = 1
+1358            clone = False
+1359        else:
+1360            repeated = row.repeated or 1
+1361        y = self._translate_y_from_any(y)
+1362        row.y = y
+1363        # Outside the defined table ?
+1364        diff = y - self.height
+1365        if diff == 0:
+1366            row_back = self.append_row(row, _repeated=repeated, clone=clone)
+1367        elif diff > 0:
+1368            self.append_row(Row(repeated=diff), _repeated=diff, clone=clone)
+1369            row_back = self.append_row(row, _repeated=repeated, clone=clone)
+1370        else:
+1371            # Inside the defined table
+1372            row_back = set_item_in_vault(  # type: ignore
+1373                y, row, self, _xpath_row_idx, "_tmap", clone=clone
+1374            )
+1375        # print self.serialize(True)
+1376        # Update width if necessary
+1377        self._update_width(row_back)
+1378        return row_back
+1379
+1380    def insert_row(
+1381        self, y: str | int, row: Row | None = None, clone: bool = True
+1382    ) -> Row:
+1383        """Insert the row before the given "y" position. If no row is given,
+1384        an empty one is created.
+1385
+1386        Position start at 0. So cell A4 is on row 3.
+1387
+1388        If row is None, a new empty row is created.
+1389
+1390        Arguments:
+1391
+1392            y -- int or str
+1393
+1394            row -- Row
+1395
+1396        returns the row, with updated row.y
+1397        """
+1398        if row is None:
+1399            row = Row()
+1400            clone = False
+1401        y = self._translate_y_from_any(y)
+1402        diff = y - self.height
+1403        if diff < 0:
+1404            row_back = insert_item_in_vault(y, row, self, _xpath_row_idx, "_tmap")
+1405        elif diff == 0:
+1406            row_back = self.append_row(row, clone=clone)
+1407        else:
+1408            self.append_row(Row(repeated=diff), _repeated=diff, clone=False)
+1409            row_back = self.append_row(row, clone=clone)
+1410        row_back.y = y  # type: ignore
+1411        # Update width if necessary
+1412        self._update_width(row_back)  # type: ignore
+1413        return row_back  # type: ignore
+1414
+1415    def extend_rows(self, rows: list[Row] | None = None) -> None:
+1416        """Append a list of rows at the end of the table.
+1417
+1418        Arguments:
+1419
+1420            rows -- list of Row
+1421        """
+1422        if rows is None:
+1423            rows = []
+1424        self.extend(rows)
+1425        self._compute_table_cache()
+1426        # Update width if necessary
+1427        width = self.width
+1428        for row in self.traverse():
+1429            if row.width > width:
+1430                width = row.width
+1431        diff = width - self.width
+1432        if diff > 0:
+1433            self.append_column(Column(repeated=diff))
+1434
+1435    def append_row(
+1436        self,
+1437        row: Row | None = None,
+1438        clone: bool = True,
+1439        _repeated: int | None = None,
+1440    ) -> Row:
+1441        """Append the row at the end of the table. If no row is given, an
+1442        empty one is created.
+1443
+1444        Position start at 0. So cell A4 is on row 3.
+1445
+1446        Note the columns are automatically created when the first row is
+1447        inserted in an empty table. So better insert a filled row.
+1448
+1449        Arguments:
+1450
+1451            row -- Row
+1452
+1453            _repeated -- (optional), repeated value of the row
+1454
+1455        returns the row, with updated row.y
+1456        """
+1457        if row is None:
+1458            row = Row()
+1459            _repeated = 1
+1460        elif clone:
+1461            row = row.clone
+1462        # Appending a repeated row accepted
+1463        # Do not insert next to the last row because it could be in a group
+1464        self._append(row)
+1465        if _repeated is None:
+1466            _repeated = row.repeated or 1
+1467        self._tmap = insert_map_once(self._tmap, len(self._tmap), _repeated)
+1468        row.y = self.height - 1
+1469        # Initialize columns
+1470        if not self._get_columns():
+1471            repeated = row.width
+1472            self.insert(Column(repeated=repeated), position=0)
+1473            self._compute_table_cache()
+1474        # Update width if necessary
+1475        self._update_width(row)
+1476        return row
+1477
+1478    def delete_row(self, y: int | str) -> None:
+1479        """Delete the row at the given "y" position.
+1480
+1481        Position start at 0. So cell A4 is on row 3.
+1482
+1483        Arguments:
+1484
+1485            y -- int or str
+1486        """
+1487        y = self._translate_y_from_any(y)
+1488        # Outside the defined table
+1489        if y >= self.height:
+1490            return
+1491        # Inside the defined table
+1492        delete_item_in_vault(y, self, _xpath_row_idx, "_tmap")
+1493
+1494    def get_row_values(
+1495        self,
+1496        y: int | str,
+1497        cell_type: str | None = None,
+1498        complete: bool = True,
+1499        get_type: bool = False,
+1500    ) -> list:
+1501        """Shortcut to get the list of Python values for the cells of the row
+1502        at the given "y" position.
+1503
+1504        Position start at 0. So cell A4 is on row 3.
+1505
+1506        Filter by cell_type, with cell_type 'all' will retrieve cells of any
+1507        type, aka non empty cells.
+1508        If cell_type and complete is True, replace missing values by None.
+1509
+1510        If get_type is True, returns a tuple (value, ODF type of value)
+1511
+1512        Arguments:
+1513
+1514            y -- int, str
+1515
+1516            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+1517                         'currency', 'percentage' or 'all'
+1518
+1519            complete -- boolean
+1520
+1521            get_type -- boolean
+1522
+1523        Return: list of lists of Python types
+1524        """
+1525        values = self.get_row(y, clone=False).get_values(
+1526            cell_type=cell_type, complete=complete, get_type=get_type
+1527        )
+1528        # complete row to match column width
+1529        if complete:
+1530            if get_type:
+1531                values.extend([(None, None)] * (self.width - len(values)))
+1532            else:
+1533                values.extend([None] * (self.width - len(values)))
+1534        return values
+1535
+1536    def set_row_values(
+1537        self,
+1538        y: int | str,
+1539        values: list,
+1540        cell_type: str | None = None,
+1541        currency: str | None = None,
+1542        style: str | None = None,
+1543    ) -> Row:
+1544        """Shortcut to set the values of *all* cells of the row at the given
+1545        "y" position.
+1546
+1547        Position start at 0. So cell A4 is on row 3.
+1548
+1549        Arguments:
+1550
+1551            y -- int or str
+1552
+1553            values -- list of Python types
+1554
+1555            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+1556                         'string' or 'time'
+1557
+1558            currency -- three-letter str
+1559
+1560            style -- str
+1561
+1562        returns the row, with updated row.y
+1563        """
+1564        row = Row()  # needed if clones rows
+1565        row.set_values(values, style=style, cell_type=cell_type, currency=currency)
+1566        return self.set_row(y, row)  # needed if clones rows
+1567
+1568    def set_row_cells(self, y: int | str, cells: list | None = None) -> Row:
+1569        """Shortcut to set *all* the cells of the row at the given
+1570        "y" position.
+1571
+1572        Position start at 0. So cell A4 is on row 3.
+1573
+1574        Arguments:
+1575
+1576            y -- int or str
+1577
+1578            cells -- list of Python types
+1579
+1580            style -- str
+1581
+1582        returns the row, with updated row.y
+1583        """
+1584        if cells is None:
+1585            cells = []
+1586        row = Row()  # needed if clones rows
+1587        row.extend_cells(cells)
+1588        return self.set_row(y, row)  # needed if clones rows
+1589
+1590    def is_row_empty(self, y: int | str, aggressive: bool = False) -> bool:
+1591        """Return wether every cell in the row at the given "y" position has
+1592        no value or the value evaluates to False (empty string), and no style.
+1593
+1594        Position start at 0. So cell A4 is on row 3.
+1595
+1596        If aggressive is True, empty cells with style are considered empty.
+1597
+1598        Arguments:
+1599
+1600            y -- int or str
+1601
+1602            aggressive -- bool
+1603        """
+1604        return self.get_row(y, clone=False).is_empty(aggressive=aggressive)
+1605
+1606    #
+1607    # Cells
+1608    #
+1609
+1610    def get_cells(
+1611        self,
+1612        coord: tuple | list | str | None = None,
+1613        cell_type: str | None = None,
+1614        style: str | None = None,
+1615        content: str | None = None,
+1616        flat: bool = False,
+1617    ) -> list:
+1618        """Get the cells matching the criteria. If 'coord' is None,
+1619        parse the whole table, else parse the area defined by 'coord'.
+1620
+1621        Filter by  cell_type = "all"  will retrieve cells of any
+1622        type, aka non empty cells.
+1623
+1624        If flat is True (default is False), the method return a single list
+1625        of all the values, else a list of lists of cells.
+1626
+1627        if cell_type, style and content are None, get_cells() will return
+1628        the exact number of cells of the area, including empty cells.
+1629
+1630        Arguments:
+1631
+1632            coordinates -- str or tuple of int : coordinates of area
+1633
+1634            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+1635                         'currency', 'percentage' or 'all'
+1636
+1637            content -- str regex
+1638
+1639            style -- str
+1640
+1641            flat -- boolean
+1642
+1643        Return: list of tuples
+1644        """
+1645        if coord:
+1646            x, y, z, t = self._translate_table_coordinates(coord)
+1647        else:
+1648            x = y = z = t = None
+1649        if flat:
+1650            cells: list[Cell] = []
+1651            for row in self.traverse(start=y, end=t):
+1652                row_cells = row.get_cells(
+1653                    coord=(x, z),
+1654                    cell_type=cell_type,
+1655                    style=style,
+1656                    content=content,
+1657                )
+1658                cells.extend(row_cells)
+1659            return cells
+1660        else:
+1661            lcells: list[list[Cell]] = []
+1662            for row in self.traverse(start=y, end=t):
+1663                row_cells = row.get_cells(
+1664                    coord=(x, z),
+1665                    cell_type=cell_type,
+1666                    style=style,
+1667                    content=content,
+1668                )
+1669                lcells.append(row_cells)
+1670            return lcells
+1671
+1672    def get_cell(
+1673        self,
+1674        coord: tuple | list | str,
+1675        clone: bool = True,
+1676        keep_repeated: bool = True,
+1677    ) -> Cell:
+1678        """Get the cell at the given coordinates.
+1679
+1680        They are either a 2-uplet of (x, y) starting from 0, or a
+1681        human-readable position like "C4".
+1682
+1683        A copy is returned, use ``set_cell`` to push it back.
+1684
+1685        Arguments:
+1686
+1687            coord -- (int, int) or str
+1688
+1689        Return: Cell
+1690        """
+1691        x, y = self._translate_cell_coordinates(coord)
+1692        if x is None:
+1693            raise ValueError
+1694        if y is None:
+1695            raise ValueError
+1696        # Outside the defined table
+1697        if y >= self.height:
+1698            cell = Cell()
+1699        else:
+1700            # Inside the defined table
+1701            row = self._get_row2_base(y)
+1702            if row is None:
+1703                raise ValueError
+1704            read_cell = row.get_cell(x, clone=clone)
+1705            if read_cell is None:
+1706                raise ValueError
+1707            cell = read_cell
+1708            if not keep_repeated:
+1709                repeated = cell.repeated or 1
+1710                if repeated >= 2:
+1711                    cell.repeated = None
+1712        cell.x = x
+1713        cell.y = y
+1714        return cell
+1715
+1716    def get_value(
+1717        self,
+1718        coord: tuple | list | str,
+1719        get_type: bool = False,
+1720    ) -> Any:
+1721        """Shortcut to get the Python value of the cell at the given
+1722        coordinates.
+1723
+1724        If get_type is True, returns the tuples (value, ODF type)
+1725
+1726        coord is either a 2-uplet of (x, y) starting from 0, or a
+1727        human-readable position like "C4". If an Area is given, the upper
+1728        left position is used as coord.
+1729
+1730        Arguments:
+1731
+1732            coord -- (int, int) or str : coordinate
+1733
+1734        Return: Python type
+1735        """
+1736        x, y = self._translate_cell_coordinates(coord)
+1737        if x is None:
+1738            raise ValueError
+1739        if y is None:
+1740            raise ValueError
+1741        # Outside the defined table
+1742        if y >= self.height:
+1743            if get_type:
+1744                return (None, None)
+1745            return None
+1746        else:
+1747            # Inside the defined table
+1748            row = self._get_row2_base(y)
+1749            if row is None:
+1750                raise ValueError
+1751            cell = row._get_cell2_base(x)
+1752            if cell is None:
+1753                if get_type:
+1754                    return (None, None)
+1755                return None
+1756            return cell.get_value(get_type=get_type)
+1757
+1758    def set_cell(
+1759        self,
+1760        coord: tuple | list | str,
+1761        cell: Cell | None = None,
+1762        clone: bool = True,
+1763    ) -> Cell:
+1764        """Replace a cell of the table at the given coordinates.
+1765
+1766        They are either a 2-uplet of (x, y) starting from 0, or a
+1767        human-readable position like "C4".
+1768
+1769        Arguments:
+1770
+1771            coord -- (int, int) or str : coordinate
+1772
+1773            cell -- Cell
+1774
+1775        return the cell, with x and y updated
+1776        """
+1777        if cell is None:
+1778            cell = Cell()
+1779            clone = False
+1780        x, y = self._translate_cell_coordinates(coord)
+1781        if x is None:
+1782            raise ValueError
+1783        if y is None:
+1784            raise ValueError
+1785        cell.x = x
+1786        cell.y = y
+1787        if y >= self.height:
+1788            row = Row()
+1789            cell_back = row.set_cell(x, cell, clone=clone)
+1790            self.set_row(y, row, clone=False)
+1791        else:
+1792            row_read = self._get_row2_base(y)
+1793            if row_read is None:
+1794                raise ValueError
+1795            row = row_read
+1796            row.y = y
+1797            repeated = row.repeated or 1
+1798            if repeated > 1:
+1799                row = row.clone
+1800                row.repeated = None
+1801                cell_back = row.set_cell(x, cell, clone=clone)
+1802                self.set_row(y, row, clone=False)
+1803            else:
+1804                cell_back = row.set_cell(x, cell, clone=clone)
+1805                # Update width if necessary, since we don't use set_row
+1806                self._update_width(row)
+1807        return cell_back
+1808
+1809    def set_cells(
+1810        self,
+1811        cells: list[list[Cell]] | list[tuple[Cell]],
+1812        coord: tuple | list | str | None = None,
+1813        clone: bool = True,
+1814    ) -> None:
+1815        """Set the cells in the table, from the 'coord' position.
+1816
+1817        'coord' is the coordinate of the upper left cell to be modified by
+1818        values. If 'coord' is None, default to the position (0,0) ("A1").
+1819        If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
+1820        area is used as coordinate.
+1821
+1822        The table is *not* cleared before the operation, to reset the table
+1823        before setting cells, use table.clear().
+1824
+1825        A list of lists is expected, with as many lists as rows to be set, and
+1826        as many cell in each sublist as cells to be setted in the row.
+1827
+1828        Arguments:
+1829
+1830            cells -- list of list of cells
+1831
+1832            coord -- tuple or str
+1833
+1834            values -- list of lists of python types
+1835        """
+1836        if coord:
+1837            x, y = self._translate_cell_coordinates(coord)
+1838        else:
+1839            x = y = 0
+1840        if y is None:
+1841            y = 0
+1842        if x is None:
+1843            x = 0
+1844        y -= 1
+1845        for row_cells in cells:
+1846            y += 1
+1847            if not row_cells:
+1848                continue
+1849            row = self.get_row(y, clone=True)
+1850            repeated = row.repeated or 1
+1851            if repeated >= 2:
+1852                row.repeated = None
+1853            row.set_cells(row_cells, start=x, clone=clone)
+1854            self.set_row(y, row, clone=False)
+1855            self._update_width(row)
+1856
+1857    def set_value(
+1858        self,
+1859        coord: tuple | list | str,
+1860        value: Any,
+1861        cell_type: str | None = None,
+1862        currency: str | None = None,
+1863        style: str | None = None,
+1864    ) -> None:
+1865        """Set the Python value of the cell at the given coordinates.
+1866
+1867        They are either a 2-uplet of (x, y) starting from 0, or a
+1868        human-readable position like "C4".
+1869
+1870        Arguments:
+1871
+1872            coord -- (int, int) or str
+1873
+1874            value -- Python type
+1875
+1876            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+1877                     'string' or 'time'
+1878
+1879            currency -- three-letter str
+1880
+1881            style -- str
+1882
+1883        """
+1884        self.set_cell(
+1885            coord,
+1886            Cell(value, cell_type=cell_type, currency=currency, style=style),
+1887            clone=False,
+1888        )
+1889
+1890    def set_cell_image(
+1891        self,
+1892        coord: tuple | list | str,
+1893        image_frame: Frame,
+1894        doc_type: str | None = None,
+1895    ) -> None:
+1896        """Do all the magic to display an image in the cell at the given
+1897        coordinates.
+1898
+1899        They are either a 2-uplet of (x, y) starting from 0, or a
+1900        human-readable position like "C4".
+1901
+1902        The frame element must contain the expected image position and
+1903        dimensions.
+1904
+1905        DrawImage insertion depends on the document type, so the type must be
+1906        provided or the table element must be already attached to a document.
+1907
+1908        Arguments:
+1909
+1910            coord -- (int, int) or str
+1911
+1912            image_frame -- Frame including an image
+1913
+1914            doc_type -- 'spreadsheet' or 'text'
+1915        """
+1916        # Test document type
+1917        if doc_type is None:
+1918            body = self.document_body
+1919            if body is None:
+1920                raise ValueError("document type not found")
+1921            doc_type = {"office:spreadsheet": "spreadsheet", "office:text": "text"}.get(
+1922                body.tag
+1923            )
+1924            if doc_type is None:
+1925                raise ValueError("document type not supported for images")
+1926        # We need the end address of the image
+1927        x, y = self._translate_cell_coordinates(coord)
+1928        if x is None:
+1929            raise ValueError
+1930        if y is None:
+1931            raise ValueError
+1932        cell = self.get_cell((x, y))
+1933        image_frame = image_frame.clone  # type: ignore
+1934        # Remove any previous paragraph, frame, etc.
+1935        for child in cell.children:
+1936            cell.delete(child)
+1937        # Now it all depends on the document type
+1938        if doc_type == "spreadsheet":
+1939            image_frame.anchor_type = "char"
+1940            # The frame needs end coordinates
+1941            width, height = image_frame.size
+1942            image_frame.set_attribute("table:end-x", width)
+1943            image_frame.set_attribute("table:end-y", height)
+1944            # FIXME what happens when the address changes?
+1945            address = f"{self.name}.{digit_to_alpha(x)}{y + 1}"
+1946            image_frame.set_attribute("table:end-cell-address", address)
+1947            # The frame is directly in the cell
+1948            cell.append(image_frame)
+1949        elif doc_type == "text":
+1950            # The frame must be in a paragraph
+1951            cell.set_value("")
+1952            paragraph = cell.get_element("text:p")
+1953            if paragraph is None:
+1954                raise ValueError
+1955            paragraph.append(image_frame)
+1956        self.set_cell(coord, cell)
+1957
+1958    def insert_cell(
+1959        self,
+1960        coord: tuple | list | str,
+1961        cell: Cell | None = None,
+1962        clone: bool = True,
+1963    ) -> Cell:
+1964        """Insert the given cell at the given coordinates. If no cell is
+1965        given, an empty one is created.
+1966
+1967        Coordinates are either a 2-uplet of (x, y) starting from 0, or a
+1968        human-readable position like "C4".
+1969
+1970        Cells on the right are shifted. Other rows remain untouched.
+1971
+1972        Arguments:
+1973
+1974            coord -- (int, int) or str
+1975
+1976            cell -- Cell
+1977
+1978        returns the cell with x and y updated
+1979        """
+1980        if cell is None:
+1981            cell = Cell()
+1982            clone = False
+1983        if clone:
+1984            cell = cell.clone
+1985        x, y = self._translate_cell_coordinates(coord)
+1986        if x is None:
+1987            raise ValueError
+1988        if y is None:
+1989            raise ValueError
+1990        row = self._get_row2(y, clone=True)
+1991        row.y = y
+1992        row.repeated = None
+1993        cell_back = row.insert_cell(x, cell, clone=False)
+1994        self.set_row(y, row, clone=False)
+1995        # Update width if necessary
+1996        self._update_width(row)
+1997        return cell_back
+1998
+1999    def append_cell(
+2000        self,
+2001        y: int | str,
+2002        cell: Cell | None = None,
+2003        clone: bool = True,
+2004    ) -> Cell:
+2005        """Append the given cell at the "y" coordinate. Repeated cells are
+2006        accepted. If no cell is given, an empty one is created.
+2007
+2008        Position start at 0. So cell A4 is on row 3.
+2009
+2010        Other rows remain untouched.
+2011
+2012        Arguments:
+2013
+2014            y -- int or str
+2015
+2016            cell -- Cell
+2017
+2018        returns the cell with x and y updated
+2019        """
+2020        if cell is None:
+2021            cell = Cell()
+2022            clone = False
+2023        if clone:
+2024            cell = cell.clone
+2025        y = self._translate_y_from_any(y)
+2026        row = self._get_row2(y)
+2027        row.y = y
+2028        cell_back = row.append_cell(cell, clone=False)
+2029        self.set_row(y, row)
+2030        # Update width if necessary
+2031        self._update_width(row)
+2032        return cell_back
+2033
+2034    def delete_cell(self, coord: tuple | list | str) -> None:
+2035        """Delete the cell at the given coordinates, so that next cells are
+2036        shifted to the left.
+2037
+2038        Coordinates are either a 2-uplet of (x, y) starting from 0, or a
+2039        human-readable position like "C4".
+2040
+2041        Use set_value() for erasing value.
+2042
+2043        Arguments:
+2044
+2045            coord -- (int, int) or str
+2046        """
+2047        x, y = self._translate_cell_coordinates(coord)
+2048        if x is None:
+2049            raise ValueError
+2050        if y is None:
+2051            raise ValueError
+2052        # Outside the defined table
+2053        if y >= self.height:
+2054            return
+2055        # Inside the defined table
+2056        row = self._get_row2_base(y)
+2057        if row is None:
+2058            raise ValueError
+2059        row.delete_cell(x)
+2060        # self.set_row(y, row)
+2061
+2062    # Columns
+2063
+2064    def _get_columns(self) -> list:
+2065        return self.get_elements(_xpath_column)
+2066
+2067    def traverse_columns(  # noqa: C901
+2068        self,
+2069        start: int | None = None,
+2070        end: int | None = None,
+2071    ) -> Iterator[Column]:
+2072        """Yield as many column elements as expected columns in the table,
+2073        i.e. expand repetitions by returning the same column as many times as
+2074        necessary.
+2075
+2076            Arguments:
+2077
+2078                start -- int
+2079
+2080                end -- int
+2081
+2082        Copies are returned, use set_column() to push them back.
+2083        """
+2084        idx = -1
+2085        before = -1
+2086        x = 0
+2087        if start is None and end is None:
+2088            for juska in self._cmap:
+2089                idx += 1
+2090                if idx in self._indexes["_cmap"]:
+2091                    column = self._indexes["_cmap"][idx]
+2092                else:
+2093                    column = self._get_element_idx2(_xpath_column_idx, idx)
+2094                    self._indexes["_cmap"][idx] = column
+2095                repeated = juska - before
+2096                before = juska
+2097                for _i in range(repeated or 1):
+2098                    # Return a copy without the now obsolete repetition
+2099                    column = column.clone
+2100                    column.x = x
+2101                    x += 1
+2102                    if repeated > 1:
+2103                        column.repeated = None
+2104                    yield column
+2105        else:
+2106            if start is None:
+2107                start = 0
+2108            start = max(0, start)
+2109            if end is None:
+2110                try:
+2111                    end = self._cmap[-1]
+2112                except Exception:
+2113                    end = -1
+2114            start_map = find_odf_idx(self._cmap, start)
+2115            if start_map is None:
+2116                return
+2117            if start_map > 0:
+2118                before = self._cmap[start_map - 1]
+2119            idx = start_map - 1
+2120            before = start - 1
+2121            x = start
+2122            for juska in self._cmap[start_map:]:
+2123                idx += 1
+2124                if idx in self._indexes["_cmap"]:
+2125                    column = self._indexes["_cmap"][idx]
+2126                else:
+2127                    column = self._get_element_idx2(_xpath_column_idx, idx)
+2128                    self._indexes["_cmap"][idx] = column
+2129                repeated = juska - before
+2130                before = juska
+2131                for _i in range(repeated or 1):
+2132                    if x <= end:
+2133                        column = column.clone
+2134                        column.x = x
+2135                        x += 1
+2136                        if repeated > 1 or (x == start and start > 0):
+2137                            column.repeated = None
+2138                        yield column
+2139
+2140    def get_columns(
+2141        self,
+2142        coord: tuple | list | str | None = None,
+2143        style: str | None = None,
+2144    ) -> list[Column]:
+2145        """Get the list of columns matching the criteria. Each result is a
+2146        tuple of (x, column).
+2147
+2148        Arguments:
+2149
+2150            coord -- str or tuple of int : coordinates of columns
+2151
+2152            style -- str
+2153
+2154        Return: list of columns
+2155        """
+2156        if coord:
+2157            x, _y, _z, t = self._translate_column_coordinates(coord)
+2158        else:
+2159            x = t = None
+2160        if not style:
+2161            return list(self.traverse_columns(start=x, end=t))
+2162        columns = []
+2163        for column in self.traverse_columns(start=x, end=t):
+2164            if style != column.style:
+2165                continue
+2166            columns.append(column)
+2167        return columns
+2168
+2169    def _get_column2(self, x: int) -> Column | None:
+2170        # Outside the defined table
+2171        if x >= self.width:
+2172            return Column()
+2173        # Inside the defined table
+2174        odf_idx = find_odf_idx(self._cmap, x)
+2175        if odf_idx is not None:
+2176            column = self._get_element_idx2(_xpath_column_idx, odf_idx)
+2177            if column is None:
+2178                return None
+2179            # fixme : no clone here => change doc and unit tests
+2180            return column.clone  # type: ignore
+2181            # return row
+2182        return None
+2183
+2184    def get_column(self, x: int | str) -> Column:
+2185        """Get the column at the given "x" position.
+2186
+2187        ODF columns don't contain cells, only style information.
+2188
+2189        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2190        like "C" is accepted.
+2191
+2192        A copy is returned, use set_column() to push it back.
+2193
+2194        Arguments:
+2195
+2196            x -- int or str
+2197
+2198        Return: Column
+2199        """
+2200        x = self._translate_x_from_any(x)
+2201        column = self._get_column2(x)
+2202        if column is None:
+2203            raise ValueError
+2204        column.x = x
+2205        return column
+2206
+2207    def set_column(
+2208        self,
+2209        x: int | str,
+2210        column: Column | None = None,
+2211    ) -> Column:
+2212        """Replace the column at the given "x" position.
+2213
+2214        ODF columns don't contain cells, only style information.
+2215
+2216        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2217        like "C" is accepted.
+2218
+2219        Arguments:
+2220
+2221            x -- int or str
+2222
+2223            column -- Column
+2224        """
+2225        x = self._translate_x_from_any(x)
+2226        if column is None:
+2227            column = Column()
+2228            repeated = 1
+2229        else:
+2230            repeated = column.repeated or 1
+2231        column.x = x
+2232        # Outside the defined table ?
+2233        diff = x - self.width
+2234        if diff == 0:
+2235            column_back = self.append_column(column, _repeated=repeated)
+2236        elif diff > 0:
+2237            self.append_column(Column(repeated=diff), _repeated=diff)
+2238            column_back = self.append_column(column, _repeated=repeated)
+2239        else:
+2240            # Inside the defined table
+2241            column_back = set_item_in_vault(  # type: ignore
+2242                x, column, self, _xpath_column_idx, "_cmap"
+2243            )
+2244        return column_back
+2245
+2246    def insert_column(
+2247        self,
+2248        x: int | str,
+2249        column: Column | None = None,
+2250    ) -> Column:
+2251        """Insert the column before the given "x" position. If no column is
+2252        given, an empty one is created.
+2253
+2254        ODF columns don't contain cells, only style information.
+2255
+2256        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2257        like "C" is accepted.
+2258
+2259        Arguments:
+2260
+2261            x -- int or str
+2262
+2263            column -- Column
+2264        """
+2265        if column is None:
+2266            column = Column()
+2267        x = self._translate_x_from_any(x)
+2268        diff = x - self.width
+2269        if diff < 0:
+2270            column_back = insert_item_in_vault(
+2271                x, column, self, _xpath_column_idx, "_cmap"
+2272            )
+2273        elif diff == 0:
+2274            column_back = self.append_column(column.clone)
+2275        else:
+2276            self.append_column(Column(repeated=diff), _repeated=diff)
+2277            column_back = self.append_column(column.clone)
+2278        column_back.x = x  # type: ignore
+2279        # Repetitions are accepted
+2280        repeated = column.repeated or 1
+2281        # Update width on every row
+2282        for row in self._get_rows():
+2283            if row.width > x:
+2284                row.insert_cell(x, Cell(repeated=repeated))
+2285            # Shorter rows don't need insert
+2286            # Longer rows shouldn't exist!
+2287        return column_back  # type: ignore
+2288
+2289    def append_column(
+2290        self,
+2291        column: Column | None = None,
+2292        _repeated: int | None = None,
+2293    ) -> Column:
+2294        """Append the column at the end of the table. If no column is given,
+2295        an empty one is created.
+2296
+2297        ODF columns don't contain cells, only style information.
+2298
+2299        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2300        like "C" is accepted.
+2301
+2302        Arguments:
+2303
+2304            column -- Column
+2305        """
+2306        if column is None:
+2307            column = Column()
+2308        else:
+2309            column = column.clone
+2310        if not self._cmap:
+2311            position = 0
+2312        else:
+2313            odf_idx = len(self._cmap) - 1
+2314            last_column = self._get_element_idx2(_xpath_column_idx, odf_idx)
+2315            if last_column is None:
+2316                raise ValueError
+2317            position = self.index(last_column) + 1
+2318        column.x = self.width
+2319        self.insert(column, position=position)
+2320        # Repetitions are accepted
+2321        if _repeated is None:
+2322            _repeated = column.repeated or 1
+2323        self._cmap = insert_map_once(self._cmap, len(self._cmap), _repeated)
+2324        # No need to update row widths
+2325        return column
+2326
+2327    def delete_column(self, x: int | str) -> None:
+2328        """Delete the column at the given position. ODF columns don't contain
+2329        cells, only style information.
+2330
+2331        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2332        like "C" is accepted.
+2333
+2334        Arguments:
+2335
+2336            x -- int or str
+2337        """
+2338        x = self._translate_x_from_any(x)
+2339        # Outside the defined table
+2340        if x >= self.width:
+2341            return
+2342        # Inside the defined table
+2343        delete_item_in_vault(x, self, _xpath_column_idx, "_cmap")
+2344        # Update width
+2345        width = self.width
+2346        for row in self._get_rows():
+2347            if row.width >= width:
+2348                row.delete_cell(x)
+2349
+2350    def get_column_cells(  # noqa: C901
+2351        self,
+2352        x: int | str,
+2353        style: str | None = None,
+2354        content: str | None = None,
+2355        cell_type: str | None = None,
+2356        complete: bool = False,
+2357    ) -> list[Cell | None]:
+2358        """Get the list of cells at the given position.
+2359
+2360        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2361        like "C" is accepted.
+2362
+2363        Filter by cell_type, with cell_type 'all' will retrieve cells of any
+2364        type, aka non empty cells.
+2365
+2366        If complete is True, replace missing values by None.
+2367
+2368        Arguments:
+2369
+2370            x -- int or str
+2371
+2372            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+2373                         'currency', 'percentage' or 'all'
+2374
+2375            content -- str regex
+2376
+2377            style -- str
+2378
+2379            complete -- boolean
+2380
+2381        Return: list of Cell
+2382        """
+2383        x = self._translate_x_from_any(x)
+2384        if cell_type:
+2385            cell_type = cell_type.lower().strip()
+2386        cells: list[Cell | None] = []
+2387        if not style and not content and not cell_type:
+2388            for row in self.traverse():
+2389                cells.append(row.get_cell(x, clone=True))
+2390            return cells
+2391        for row in self.traverse():
+2392            cell = row.get_cell(x, clone=True)
+2393            if cell is None:
+2394                raise ValueError
+2395            # Filter the cells by cell_type
+2396            if cell_type:
+2397                ctype = cell.type
+2398                if not ctype or not (ctype == cell_type or cell_type == "all"):
+2399                    if complete:
+2400                        cells.append(None)
+2401                    continue
+2402            # Filter the cells with the regex
+2403            if content and not cell.match(content):
+2404                if complete:
+2405                    cells.append(None)
+2406                continue
+2407            # Filter the cells with the style
+2408            if style and style != cell.style:
+2409                if complete:
+2410                    cells.append(None)
+2411                continue
+2412            cells.append(cell)
+2413        return cells
+2414
+2415    def get_column_values(
+2416        self,
+2417        x: int | str,
+2418        cell_type: str | None = None,
+2419        complete: bool = True,
+2420        get_type: bool = False,
+2421    ) -> list[Any]:
+2422        """Shortcut to get the list of Python values for the cells at the
+2423        given position.
+2424
+2425        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2426        like "C" is accepted.
+2427
+2428        Filter by cell_type, with cell_type 'all' will retrieve cells of any
+2429        type, aka non empty cells.
+2430        If cell_type and complete is True, replace missing values by None.
+2431
+2432        If get_type is True, returns a tuple (value, ODF type of value)
+2433
+2434        Arguments:
+2435
+2436            x -- int or str
+2437
+2438            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+2439                         'currency', 'percentage' or 'all'
+2440
+2441            complete -- boolean
+2442
+2443            get_type -- boolean
+2444
+2445        Return: list of Python types
+2446        """
+2447        cells = self.get_column_cells(
+2448            x, style=None, content=None, cell_type=cell_type, complete=complete
+2449        )
+2450        values: list[Any] = []
+2451        for cell in cells:
+2452            if cell is None:
+2453                if complete:
+2454                    if get_type:
+2455                        values.append((None, None))
+2456                    else:
+2457                        values.append(None)
+2458                continue
+2459            if cell_type:
+2460                ctype = cell.type
+2461                if not ctype or not (ctype == cell_type or cell_type == "all"):
+2462                    if complete:
+2463                        if get_type:
+2464                            values.append((None, None))
+2465                        else:
+2466                            values.append(None)
+2467                    continue
+2468            values.append(cell.get_value(get_type=get_type))
+2469        return values
+2470
+2471    def set_column_cells(self, x: int | str, cells: list[Cell]) -> None:
+2472        """Shortcut to set the list of cells at the given position.
+2473
+2474        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2475        like "C" is accepted.
+2476
+2477        The list must have the same length than the table height.
+2478
+2479        Arguments:
+2480
+2481            x -- int or str
+2482
+2483            cells -- list of Cell
+2484        """
+2485        height = self.height
+2486        if len(cells) != height:
+2487            raise ValueError(f"col mismatch: {height} cells expected")
+2488        cells_iterator = iter(cells)
+2489        for y, row in enumerate(self.traverse()):
+2490            row.set_cell(x, next(cells_iterator))
+2491            self.set_row(y, row)
+2492
+2493    def set_column_values(
+2494        self,
+2495        x: int | str,
+2496        values: list,
+2497        cell_type: str | None = None,
+2498        currency: str | None = None,
+2499        style: str | None = None,
+2500    ) -> None:
+2501        """Shortcut to set the list of Python values of cells at the given
+2502        position.
+2503
+2504        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2505        like "C" is accepted.
+2506
+2507        The list must have the same length than the table height.
+2508
+2509        Arguments:
+2510
+2511            x -- int or str
+2512
+2513            values -- list of Python types
+2514
+2515            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+2516                         'string' or 'time'
+2517
+2518            currency -- three-letter str
+2519
+2520            style -- str
+2521        """
+2522        cells = [
+2523            Cell(value, cell_type=cell_type, currency=currency, style=style)
+2524            for value in values
+2525        ]
+2526        self.set_column_cells(x, cells)
+2527
+2528    def is_column_empty(self, x: int | str, aggressive: bool = False) -> bool:
+2529        """Return wether every cell in the column at "x" position has no value
+2530        or the value evaluates to False (empty string), and no style.
+2531
+2532        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2533        like "C" is accepted.
+2534
+2535        If aggressive is True, empty cells with style are considered empty.
+2536
+2537        Return: bool
+2538        """
+2539        for cell in self.get_column_cells(x):
+2540            if cell is None:
+2541                continue
+2542            if not cell.is_empty(aggressive=aggressive):
+2543                return False
+2544        return True
+2545
+2546    # Named Range
+2547
+2548    def get_named_ranges(  # type: ignore
+2549        self,
+2550        table_name: str | list[str] | None = None,
+2551    ) -> list[NamedRange]:
+2552        """Returns the list of available Name Ranges of the spreadsheet. If
+2553        table_name is provided, limits the search to these tables.
+2554        Beware : named ranges are stored at the body level, thus do not call
+2555        this method on a cloned table.
+2556
+2557        Arguments:
+2558
+2559            table_names -- str or list of str, names of tables
+2560
+2561        Return : list of table_range
+2562        """
+2563        body = self.document_body
+2564        if not body:
+2565            return []
+2566        all_named_ranges = body.get_named_ranges()
+2567        if not table_name:
+2568            return all_named_ranges  # type:ignore
+2569        filter_ = []
+2570        if isinstance(table_name, str):
+2571            filter_.append(table_name)
+2572        elif isiterable(table_name):
+2573            filter_.extend(table_name)
+2574        else:
+2575            raise ValueError(
+2576                f"table_name must be string or Iterable, not {type(table_name)}"
+2577            )
+2578        return [
+2579            nr for nr in all_named_ranges if nr.table_name in filter_  # type:ignore
+2580        ]
+2581
+2582    def get_named_range(self, name: str) -> NamedRange:
+2583        """Returns the Name Ranges of the specified name. If
+2584        table_name is provided, limits the search to these tables.
+2585        Beware : named ranges are stored at the body level, thus do not call
+2586        this method on a cloned table.
+2587
+2588        Arguments:
+2589
+2590            name -- str, name of the named range object
+2591
+2592        Return : NamedRange
+2593        """
+2594        body = self.document_body
+2595        if not body:
+2596            raise ValueError("Table is not inside a document")
+2597        return body.get_named_range(name)  # type: ignore
+2598
+2599    def set_named_range(
+2600        self,
+2601        name: str,
+2602        crange: str | tuple | list,
+2603        table_name: str | None = None,
+2604        usage: str | None = None,
+2605    ) -> None:
+2606        """Create a Named Range element and insert it in the document.
+2607        Beware : named ranges are stored at the body level, thus do not call
+2608        this method on a cloned table.
+2609
+2610        Arguments:
+2611
+2612            name -- str, name of the named range
+2613
+2614            crange -- str or tuple of int, cell or area coordinate
+2615
+2616            table_name -- str, name of the table
+2617
+2618            uage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
+2619        """
+2620        body = self.document_body
+2621        if not body:
+2622            raise ValueError("Table is not inside a document")
+2623        if not name:
+2624            raise ValueError("Name required.")
+2625        if table_name is None:
+2626            table_name = self.name
+2627        named_range = NamedRange(name, crange, table_name, usage)
+2628        body.append_named_range(named_range)
+2629
+2630    def delete_named_range(self, name: str) -> None:
+2631        """Delete the Named Range of specified name from the spreadsheet.
+2632        Beware : named ranges are stored at the body level, thus do not call
+2633        this method on a cloned table.
+2634
+2635        Arguments:
+2636
+2637            name -- str
+2638        """
+2639        name = name.strip()
+2640        if not name:
+2641            raise ValueError("Name required.")
+2642        body = self.document_body
+2643        if not body:
+2644            raise ValueError("Table is not inside a document.")
+2645        body.delete_named_range(name)
+2646
+2647    #
+2648    # Cell span
+2649    #
+2650
+2651    def set_span(  # noqa: C901
+2652        self,
+2653        area: str | tuple | list,
+2654        merge: bool = False,
+2655    ) -> bool:
+2656        """Create a Cell Span : span the first cell of the area on several
+2657        columns and/or rows.
+2658        If merge is True, replace text of the cell by the concatenation of
+2659        existing text in covered cells.
+2660        Beware : if merge is True, old text is changed, if merge is False
+2661        (the default), old text in coverd cells is still present but not
+2662        displayed by most GUI.
+2663
+2664        If the area defines only one cell, the set span will do nothing.
+2665        It is not allowed to apply set span to an area whose one cell already
+2666        belongs to previous cell span.
+2667
+2668        Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
+2669        be provided as an alpha numeric value like "A1:B2' or a tuple like
+2670        (0, 0, 1, 1) or (0, 0).
+2671
+2672        Arguments:
+2673
+2674            area -- str or tuple of int, cell or area coordinate
+2675
+2676            merge -- boolean
+2677        """
+2678        # get area
+2679        digits = convert_coordinates(area)
+2680        if len(digits) == 4:
+2681            x, y, z, t = digits
+2682        else:
+2683            x, y = digits
+2684            z, t = digits
+2685        start = x, y
+2686        end = z, t
+2687        if start == end:
+2688            # one cell : do nothing
+2689            return False
+2690        if x is None:
+2691            raise ValueError
+2692        if y is None:
+2693            raise ValueError
+2694        if z is None:
+2695            raise ValueError
+2696        if t is None:
+2697            raise ValueError
+2698        # check for previous span
+2699        good = True
+2700        # Check boundaries and empty cells : need to crate non existent cells
+2701        # so don't use get_cells directly, but get_cell
+2702        cells = []
+2703        for yy in range(y, t + 1):
+2704            row_cells = []
+2705            for xx in range(x, z + 1):
+2706                row_cells.append(
+2707                    self.get_cell((xx, yy), clone=True, keep_repeated=False)
+2708                )
+2709            cells.append(row_cells)
+2710        for row in cells:
+2711            for cell in row:
+2712                if cell._is_spanned():
+2713                    good = False
+2714                    break
+2715            if not good:
+2716                break
+2717        if not good:
+2718            return False
+2719        # Check boundaries
+2720        # if z >= self.width or t >= self.height:
+2721        #    self.set_cell(coord = end)
+2722        #    print area, z, t
+2723        #    cells = self.get_cells((x, y, z, t))
+2724        #    print cells
+2725        # do it:
+2726        if merge:
+2727            val_list = []
+2728            for row in cells:
+2729                for cell in row:
+2730                    if cell.is_empty(aggressive=True):
+2731                        continue
+2732                    val = cell.get_value()
+2733                    if val is not None:
+2734                        if isinstance(val, str):
+2735                            val.strip()
+2736                        if val != "":
+2737                            val_list.append(val)
+2738                        cell.clear()
+2739            if val_list:
+2740                if len(val_list) == 1:
+2741                    cells[0][0].set_value(val_list[0])
+2742                else:
+2743                    value = " ".join([str(v) for v in val_list if v])
+2744                    cells[0][0].set_value(value)
+2745        cols = z - x + 1
+2746        cells[0][0].set_attribute("table:number-columns-spanned", str(cols))
+2747        rows = t - y + 1
+2748        cells[0][0].set_attribute("table:number-rows-spanned", str(rows))
+2749        for cell in cells[0][1:]:
+2750            cell.tag = "table:covered-table-cell"
+2751        for row in cells[1:]:
+2752            for cell in row:
+2753                cell.tag = "table:covered-table-cell"
+2754        # replace cells in table
+2755        self.set_cells(cells, coord=start, clone=False)
+2756        return True
+2757
+2758    def del_span(self, area: str | tuple | list) -> bool:
+2759        """Delete a Cell Span. 'area' is the cell coordiante of the upper left
+2760        cell of the spanned area.
+2761
+2762        Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
+2763        be provided as an alpha numeric value like "A1:B2' or a tuple like
+2764        (0, 0, 1, 1) or (0, 0). If an area is provided, the upper left cell
+2765        is used.
+2766
+2767        Arguments:
+2768
+2769            area -- str or tuple of int, cell or area coordinate
+2770        """
+2771        # get area
+2772        digits = convert_coordinates(area)
+2773        if len(digits) == 4:
+2774            x, y, _z, _t = digits
+2775        else:
+2776            x, y = digits
+2777        if x is None:
+2778            raise ValueError
+2779        if y is None:
+2780            raise ValueError
+2781        start = x, y
+2782        # check for previous span
+2783        cell0 = self.get_cell(start)
+2784        nb_cols = cell0.get_attribute_integer("table:number-columns-spanned")
+2785        if nb_cols is None:
+2786            return False
+2787        nb_rows = cell0.get_attribute_integer("table:number-rows-spanned")
+2788        if nb_rows is None:
+2789            return False
+2790        z = x + nb_cols - 1
+2791        t = y + nb_rows - 1
+2792        cells = self.get_cells((x, y, z, t))
+2793        cells[0][0].del_attribute("table:number-columns-spanned")
+2794        cells[0][0].del_attribute("table:number-rows-spanned")
+2795        for cell in cells[0][1:]:
+2796            cell.tag = "table:table-cell"
+2797        for row in cells[1:]:
+2798            for cell in row:
+2799                cell.tag = "table:table-cell"
+2800        # replace cells in table
+2801        self.set_cells(cells, coord=start, clone=False)
+2802        return True
+2803
+2804    # Utilities
+2805
+2806    def to_csv(
+2807        self,
+2808        path_or_file: str | Path | None = None,
+2809        dialect: str = "excel",
+2810    ) -> Any:
+2811        """Write the table as CSV in the file.
+2812
+2813        If the file is a string, it is opened as a local path. Else an
+2814        opened file-like is expected.
+2815
+2816        Arguments:
+2817
+2818            path_or_file -- str or file-like
+2819
+2820            dialect -- str, python csv.dialect, can be 'excel', 'unix'...
+2821        """
+2822
+2823        def write_content(csv_writer: object) -> None:
+2824            for values in self.iter_values():
+2825                line = []
+2826                for value in values:
+2827                    if value is None:
+2828                        value = ""
+2829                    if isinstance(value, str):
+2830                        value = value.strip()
+2831                    line.append(value)
+2832                csv_writer.writerow(line)  # type: ignore
+2833
+2834        out = StringIO(newline="")
+2835        csv_writer = csv.writer(out, dialect=dialect)
+2836        write_content(csv_writer)
+2837        if path_or_file is None:
+2838            return out.getvalue()
+2839        path = Path(path_or_file)
+2840        path.write_text(out.getvalue())
+2841        return None
+
+ + +

ODF table "table:table"

+
+ + +
+ +
+ + Table( name: str | None = None, width: int | None = None, height: int | None = None, protected: bool = False, protection_key: str | None = None, display: bool = True, printable: bool = True, print_ranges: list[str] | None = None, style: str | None = None, **kwargs: Any) + + + +
+ +
291    def __init__(
+292        self,
+293        name: str | None = None,
+294        width: int | None = None,
+295        height: int | None = None,
+296        protected: bool = False,
+297        protection_key: str | None = None,
+298        display: bool = True,
+299        printable: bool = True,
+300        print_ranges: list[str] | None = None,
+301        style: str | None = None,
+302        **kwargs: Any,
+303    ) -> None:
+304        """Create a table element, optionally prefilled with "height" rows of
+305        "width" cells each.
+306
+307        If the table is to be protected, a protection key must be provided,
+308        i.e. a hash value of the password.
+309
+310        If the table must not be displayed, set "display" to False.
+311
+312        If the table must not be printed, set "printable" to False. The table
+313        will not be printed when it is not displayed, whatever the value of
+314        this argument.
+315
+316        Ranges of cells to print can be provided as a list of cell ranges,
+317        e.g. ['E6:K12', 'P6:R12'] or directly as a raw string, e.g.
+318        "E6:K12 P6:R12".
+319
+320        You can access and modify the XML tree manually, but you probably want
+321        to use the API to access and alter cells. It will save you from
+322        handling repetitions and the same number of cells for each row.
+323
+324        If you use both the table API and the XML API, you are on your own for
+325        ensuiring model integrity.
+326
+327        Arguments:
+328
+329            name -- str
+330
+331            width -- int
+332
+333            height -- int
+334
+335            protected -- bool
+336
+337            protection_key -- str
+338
+339            display -- bool
+340
+341            printable -- bool
+342
+343            print_ranges -- list
+344
+345            style -- str
+346        """
+347        super().__init__(**kwargs)
+348        self._indexes = {}
+349        self._indexes["_cmap"] = {}
+350        self._indexes["_tmap"] = {}
+351        if self._do_init:
+352            self.name = name
+353            if protected:
+354                self.protected = protected
+355                self.set_protection_key = protection_key
+356            if not display:
+357                self.displayed = display
+358            if not printable:
+359                self.printable = printable
+360            if print_ranges:
+361                self.print_ranges = print_ranges
+362            if style:
+363                self.style = style
+364            # Prefill the table
+365            if width is not None or height is not None:
+366                width = width or 1
+367                height = height or 1
+368                # Column groups for style information
+369                columns = Column(repeated=width)
+370                self._append(columns)
+371                for _i in range(height):
+372                    row = Row(width)
+373                    self._append(row)
+374        self._compute_table_cache()
+
+ + +

Create a table element, optionally prefilled with "height" rows of +"width" cells each.

+ +

If the table is to be protected, a protection key must be provided, +i.e. a hash value of the password.

+ +

If the table must not be displayed, set "display" to False.

+ +

If the table must not be printed, set "printable" to False. The table +will not be printed when it is not displayed, whatever the value of +this argument.

+ +

Ranges of cells to print can be provided as a list of cell ranges, +e.g. ['E6:K12', 'P6:R12'] or directly as a raw string, e.g. +"E6:K12 P6:R12".

+ +

You can access and modify the XML tree manually, but you probably want +to use the API to access and alter cells. It will save you from +handling repetitions and the same number of cells for each row.

+ +

If you use both the table API and the XML API, you are on your own for +ensuiring model integrity.

+ +

Arguments:

+ +
name -- str
+
+width -- int
+
+height -- int
+
+protected -- bool
+
+protection_key -- str
+
+display -- bool
+
+printable -- bool
+
+print_ranges -- list
+
+style -- str
+
+
+ + +
+
+ +
+ + def + append(self, something: Element | str) -> None: + + + +
+ +
731    def append(self, something: Element | str) -> None:
+732        """Dispatch .append() call to append_row() or append_column()."""
+733        if isinstance(something, Row):
+734            self.append_row(something)
+735        elif isinstance(something, Column):
+736            self.append_column(something)
+737        else:
+738            # probably still an error
+739            self._append(something)
+
+ + +

Dispatch .append() call to append_row() or append_column().

+
+ + +
+
+ +
+ height: int + + + +
+ +
741    @property
+742    def height(self) -> int:
+743        """Get the current height of the table.
+744
+745        Return: int
+746        """
+747        try:
+748            height = self._tmap[-1] + 1
+749        except Exception:
+750            height = 0
+751        return height
+
+ + +

Get the current height of the table.

+ +

Return: int

+
+ + +
+
+ +
+ width: int + + + +
+ +
753    @property
+754    def width(self) -> int:
+755        """Get the current width of the table, measured on columns.
+756
+757        Rows may have different widths, use the Table API to ensure width
+758        consistency.
+759
+760        Return: int
+761        """
+762        # Columns are our reference for user expected width
+763
+764        try:
+765            width = self._cmap[-1] + 1
+766        except Exception:
+767            width = 0
+768
+769        # columns = self._get_columns()
+770        # repeated = self.xpath(
+771        #        'table:table-column/@table:number-columns-repeated')
+772        # unrepeated = len(columns) - len(repeated)
+773        # ws = sum(int(r) for r in repeated) + unrepeated
+774        # if w != ws:
+775        #    print "WARNING   ws", ws, "w", w
+776
+777        return width
+
+ + +

Get the current width of the table, measured on columns.

+ +

Rows may have different widths, use the Table API to ensure width +consistency.

+ +

Return: int

+
+ + +
+
+ +
+ size: tuple[int, int] + + + +
+ +
779    @property
+780    def size(self) -> tuple[int, int]:
+781        """Shortcut to get the current width and height of the table.
+782
+783        Return: (int, int)
+784        """
+785        return self.width, self.height
+
+ + +

Shortcut to get the current width and height of the table.

+ +

Return: (int, int)

+
+ + +
+
+ +
+ name: str | None + + + +
+ +
787    @property
+788    def name(self) -> str | None:
+789        """Get / set the name of the table."""
+790        return self.get_attribute_string("table:name")
+
+ + +

Get / set the name of the table.

+
+ + +
+
+ +
+ protected: bool + + + +
+ +
801    @property
+802    def protected(self) -> bool:
+803        return bool(self.get_attribute("table:protected"))
+
+ + + + +
+
+ +
+ protection_key: str | None + + + +
+ +
809    @property
+810    def protection_key(self) -> str | None:
+811        return self.get_attribute_string("table:protection-key")
+
+ + + + +
+
+ +
+ displayed: bool + + + +
+ +
817    @property
+818    def displayed(self) -> bool:
+819        return bool(self.get_attribute("table:display"))
+
+ + + + +
+
+ +
+ printable: bool + + + +
+ +
825    @property
+826    def printable(self) -> bool:
+827        printable = self.get_attribute("table:print")
+828        # Default value
+829        if printable is None:
+830            return True
+831        return bool(printable)
+
+ + + + +
+
+ +
+ print_ranges: list[str] + + + +
+ +
837    @property
+838    def print_ranges(self) -> list[str]:
+839        ranges = self.get_attribute_string("table:print-ranges")
+840        if isinstance(ranges, str):
+841            return ranges.split()
+842        return []
+
+ + + + +
+
+ +
+ style: str | None + + + +
+ +
851    @property
+852    def style(self) -> str | None:
+853        """Get / set the style of the table
+854
+855        Return: str
+856        """
+857        return self.get_attribute_string("table:style-name")
+
+ + +

Get / set the style of the table

+ +

Return: str

+
+ + +
+
+ +
+ + def + get_formatted_text(self, context: dict | None = None) -> str: + + + +
+ +
863    def get_formatted_text(self, context: dict | None = None) -> str:
+864        if context and context["rst_mode"]:
+865            return self._get_formatted_text_rst(context)
+866        return self._get_formatted_text_normal(context)
+
+ + +

This function should return a beautiful version of the text.

+
+ + +
+
+ +
+ + def + get_values( self, coord: tuple | list | str | None = None, cell_type: str | None = None, complete: bool = True, get_type: bool = False, flat: bool = False) -> list: + + + +
+ +
868    def get_values(
+869        self,
+870        coord: tuple | list | str | None = None,
+871        cell_type: str | None = None,
+872        complete: bool = True,
+873        get_type: bool = False,
+874        flat: bool = False,
+875    ) -> list:
+876        """Get a matrix of values of the table.
+877
+878        Filter by coordinates will parse the area defined by the coordinates.
+879
+880        If 'cell_type' is used and 'complete' is True (default), missing values
+881        are replaced by None.
+882        Filter by ' cell_type = "all" ' will retrieve cells of any
+883        type, aka non empty cells.
+884
+885        If 'cell_type' is None, complete is always True : with no cell type
+886        queried, get_values() returns None for each empty cell, the length
+887        each lists is equal to the width of the table.
+888
+889        If get_type is True, returns tuples (value, ODF type of value), or
+890        (None, None) for empty cells with complete True.
+891
+892        If flat is True, the methods return a single list of all the values.
+893        By default, flat is False.
+894
+895        Arguments:
+896
+897            coord -- str or tuple of int : coordinates of area
+898
+899            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+900                         'currency', 'percentage' or 'all'
+901
+902            complete -- boolean
+903
+904            get_type -- boolean
+905
+906        Return: list of lists of Python types
+907        """
+908        if coord:
+909            x, y, z, t = self._translate_table_coordinates(coord)
+910        else:
+911            x = y = z = t = None
+912        data = []
+913        for row in self.traverse(start=y, end=t):
+914            if z is None:
+915                width = self.width
+916            else:
+917                width = min(z + 1, self.width)
+918            if x is not None:
+919                width -= x
+920            values = row.get_values(
+921                (x, z),
+922                cell_type=cell_type,
+923                complete=complete,
+924                get_type=get_type,
+925            )
+926            # complete row to match request width
+927            if complete:
+928                if get_type:
+929                    values.extend([(None, None)] * (width - len(values)))
+930                else:
+931                    values.extend([None] * (width - len(values)))
+932            if flat:
+933                data.extend(values)
+934            else:
+935                data.append(values)
+936        return data
+
+ + +

Get a matrix of values of the table.

+ +

Filter by coordinates will parse the area defined by the coordinates.

+ +

If 'cell_type' is used and 'complete' is True (default), missing values +are replaced by None. +Filter by ' cell_type = "all" ' will retrieve cells of any +type, aka non empty cells.

+ +

If 'cell_type' is None, complete is always True : with no cell type +queried, get_values() returns None for each empty cell, the length +each lists is equal to the width of the table.

+ +

If get_type is True, returns tuples (value, ODF type of value), or +(None, None) for empty cells with complete True.

+ +

If flat is True, the methods return a single list of all the values. +By default, flat is False.

+ +

Arguments:

+ +
coord -- str or tuple of int : coordinates of area
+
+cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+             'currency', 'percentage' or 'all'
+
+complete -- boolean
+
+get_type -- boolean
+
+ +

Return: list of lists of Python types

+
+ + +
+
+ +
+ + def + iter_values( self, coord: tuple | list | str | None = None, cell_type: str | None = None, complete: bool = True, get_type: bool = False) -> collections.abc.Iterator[list]: + + + +
+ +
938    def iter_values(
+939        self,
+940        coord: tuple | list | str | None = None,
+941        cell_type: str | None = None,
+942        complete: bool = True,
+943        get_type: bool = False,
+944    ) -> Iterator[list]:
+945        """Iterate through lines of Python values of the table.
+946
+947        Filter by coordinates will parse the area defined by the coordinates.
+948
+949        cell_type, complete, grt_type : see get_values()
+950
+951
+952
+953        Arguments:
+954
+955            coord -- str or tuple of int : coordinates of area
+956
+957            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+958                         'currency', 'percentage' or 'all'
+959
+960            complete -- boolean
+961
+962            get_type -- boolean
+963
+964        Return: iterator of lists
+965        """
+966        if coord:
+967            x, y, z, t = self._translate_table_coordinates(coord)
+968        else:
+969            x = y = z = t = None
+970        for row in self.traverse(start=y, end=t):
+971            if z is None:
+972                width = self.width
+973            else:
+974                width = min(z + 1, self.width)
+975            if x is not None:
+976                width -= x
+977            values = row.get_values(
+978                (x, z),
+979                cell_type=cell_type,
+980                complete=complete,
+981                get_type=get_type,
+982            )
+983            # complete row to match column width
+984            if complete:
+985                if get_type:
+986                    values.extend([(None, None)] * (width - len(values)))
+987                else:
+988                    values.extend([None] * (width - len(values)))
+989            yield values
+
+ + +

Iterate through lines of Python values of the table.

+ +

Filter by coordinates will parse the area defined by the coordinates.

+ +

cell_type, complete, grt_type : see get_values()

+ +

Arguments:

+ +
coord -- str or tuple of int : coordinates of area
+
+cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+             'currency', 'percentage' or 'all'
+
+complete -- boolean
+
+get_type -- boolean
+
+ +

Return: iterator of lists

+
+ + +
+
+ +
+ + def + set_values( self, values: list, coord: tuple | list | str | None = None, style: str | None = None, cell_type: str | None = None, currency: str | None = None) -> None: + + + +
+ +
 991    def set_values(
+ 992        self,
+ 993        values: list,
+ 994        coord: tuple | list | str | None = None,
+ 995        style: str | None = None,
+ 996        cell_type: str | None = None,
+ 997        currency: str | None = None,
+ 998    ) -> None:
+ 999        """Set the value of cells in the table, from the 'coord' position
+1000        with values.
+1001
+1002        'coord' is the coordinate of the upper left cell to be modified by
+1003        values. If 'coord' is None, default to the position (0,0) ("A1").
+1004        If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
+1005        area is used as coordinate.
+1006
+1007        The table is *not* cleared before the operation, to reset the table
+1008        before setting values, use table.clear().
+1009
+1010        A list of lists is expected, with as many lists as rows, and as many
+1011        items in each sublist as cells to be setted. None values in the list
+1012        will create empty cells with no cell type (but eventually a style).
+1013
+1014        Arguments:
+1015
+1016            coord -- tuple or str
+1017
+1018            values -- list of lists of python types
+1019
+1020            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+1021                         'string' or 'time'
+1022
+1023            currency -- three-letter str
+1024
+1025            style -- str
+1026        """
+1027        if coord:
+1028            x, y = self._translate_cell_coordinates(coord)
+1029        else:
+1030            x = y = 0
+1031        if y is None:
+1032            y = 0
+1033        if x is None:
+1034            x = 0
+1035        y -= 1
+1036        for row_values in values:
+1037            y += 1
+1038            if not row_values:
+1039                continue
+1040            row = self.get_row(y, clone=True)
+1041            repeated = row.repeated or 1
+1042            if repeated >= 2:
+1043                row.repeated = None
+1044            row.set_values(
+1045                row_values,
+1046                start=x,
+1047                cell_type=cell_type,
+1048                currency=currency,
+1049                style=style,
+1050            )
+1051            self.set_row(y, row, clone=False)
+1052            self._update_width(row)
+
+ + +

Set the value of cells in the table, from the 'coord' position +with values.

+ +

'coord' is the coordinate of the upper left cell to be modified by +values. If 'coord' is None, default to the position (0,0) ("A1"). +If 'coord' is an area (e.g. "A2:B5"), the upper left position of this +area is used as coordinate.

+ +

The table is not cleared before the operation, to reset the table +before setting values, use table.clear().

+ +

A list of lists is expected, with as many lists as rows, and as many +items in each sublist as cells to be setted. None values in the list +will create empty cells with no cell type (but eventually a style).

+ +

Arguments:

+ +
coord -- tuple or str
+
+values -- list of lists of python types
+
+cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+             'string' or 'time'
+
+currency -- three-letter str
+
+style -- str
+
+
+ + +
+
+ +
+ + def + rstrip(self, aggressive: bool = False) -> None: + + + +
+ +
1054    def rstrip(self, aggressive: bool = False) -> None:
+1055        """Remove *in-place* empty rows below and empty cells at the right of
+1056        the table. Cells are empty if they contain no value or it evaluates
+1057        to False, and no style.
+1058
+1059        If aggressive is True, empty cells with style are removed too.
+1060
+1061        Argument:
+1062
+1063            aggressive -- bool
+1064        """
+1065        # Step 1: remove empty rows below the table
+1066        for row in reversed(self._get_rows()):
+1067            if row.is_empty(aggressive=aggressive):
+1068                row.parent.delete(row)  # type: ignore
+1069            else:
+1070                break
+1071        # Step 2: rstrip remaining rows
+1072        max_width = 0
+1073        for row in self._get_rows():
+1074            row.rstrip(aggressive=aggressive)
+1075            # keep count of the biggest row
+1076            max_width = max(max_width, row.width)
+1077        # raz cache of rows
+1078        self._indexes["_tmap"] = {}
+1079        # Step 3: trim columns to match max_width
+1080        columns = self._get_columns()
+1081        repeated_cols = self.xpath("table:table-column/@table:number-columns-repeated")
+1082        if not isinstance(repeated_cols, list):
+1083            raise TypeError
+1084        unrepeated = len(columns) - len(repeated_cols)
+1085        column_width = sum(int(r) for r in repeated_cols) + unrepeated  # type: ignore
+1086        diff = column_width - max_width
+1087        if diff > 0:
+1088            for column in reversed(columns):
+1089                repeated = column.repeated or 1
+1090                repeated = repeated - diff
+1091                if repeated > 0:
+1092                    column.repeated = repeated
+1093                    break
+1094                else:
+1095                    column.parent.delete(column)
+1096                    diff = -repeated
+1097                    if diff == 0:
+1098                        break
+1099        # raz cache of columns
+1100        self._indexes["_cmap"] = {}
+1101        self._compute_table_cache()
+
+ + +

Remove in-place empty rows below and empty cells at the right of +the table. Cells are empty if they contain no value or it evaluates +to False, and no style.

+ +

If aggressive is True, empty cells with style are removed too.

+ +

Argument:

+ +
aggressive -- bool
+
+
+ + +
+
+ +
+ + def + transpose(self, coord: tuple | list | str | None = None) -> None: + + + +
+ +
1103    def transpose(self, coord: tuple | list | str | None = None) -> None:  # noqa: C901
+1104        """Swap *in-place* rows and columns of the table.
+1105
+1106        If 'coord' is not None, apply transpose only to the area defined by the
+1107        coordinates. Beware, if area is not square, some cells mays be over
+1108        written during the process.
+1109
+1110        Arguments:
+1111
+1112            coord -- str or tuple of int : coordinates of area
+1113
+1114            start -- int or str
+1115        """
+1116        data = []
+1117        if coord is None:
+1118            for row in self.traverse():
+1119                data.append(list(row.traverse()))
+1120            transposed_data = zip_longest(*data)
+1121            self.clear()
+1122            # new_rows = []
+1123            for row_cells in transposed_data:
+1124                if not isiterable(row_cells):
+1125                    row_cells = (row_cells,)
+1126                row = Row()
+1127                row.extend_cells(row_cells)
+1128                self.append_row(row, clone=False)
+1129            self._compute_table_cache()
+1130        else:
+1131            x, y, z, t = self._translate_table_coordinates(coord)
+1132            if x is None:
+1133                x = 0
+1134            else:
+1135                x = min(x, self.width - 1)
+1136            if z is None:
+1137                z = self.width - 1
+1138            else:
+1139                z = min(z, self.width - 1)
+1140            if y is None:
+1141                y = 0
+1142            else:
+1143                y = min(y, self.height - 1)
+1144            if t is None:
+1145                t = self.height - 1
+1146            else:
+1147                t = min(t, self.height - 1)
+1148            for row in self.traverse(start=y, end=t):
+1149                data.append(list(row.traverse(start=x, end=z)))
+1150            transposed_data = zip_longest(*data)
+1151            # clear locally
+1152            w = z - x + 1
+1153            h = t - y + 1
+1154            if w != h:
+1155                nones = [[None] * w for i in range(h)]
+1156                self.set_values(nones, coord=(x, y, z, t))
+1157            # put transposed
+1158            filtered_data: list[tuple[Cell]] = []
+1159            for row_cells in transposed_data:
+1160                if isinstance(row_cells, (list, tuple)):
+1161                    filtered_data.append(row_cells)
+1162                else:
+1163                    filtered_data.append((row_cells,))
+1164            self.set_cells(filtered_data, (x, y, x + h - 1, y + w - 1))
+1165            self._compute_table_cache()
+
+ + +

Swap in-place rows and columns of the table.

+ +

If 'coord' is not None, apply transpose only to the area defined by the +coordinates. Beware, if area is not square, some cells mays be over +written during the process.

+ +

Arguments:

+ +
coord -- str or tuple of int : coordinates of area
+
+start -- int or str
+
+
+ + +
+
+ +
+ + def + is_empty(self, aggressive: bool = False) -> bool: + + + +
+ +
1167    def is_empty(self, aggressive: bool = False) -> bool:
+1168        """Return whether every cell in the table has no value or the value
+1169        evaluates to False (empty string), and no style.
+1170
+1171        If aggressive is True, empty cells with style are considered empty.
+1172
+1173        Arguments:
+1174
+1175            aggressive -- bool
+1176        """
+1177        return all(row.is_empty(aggressive=aggressive) for row in self._get_rows())
+
+ + +

Return whether every cell in the table has no value or the value +evaluates to False (empty string), and no style.

+ +

If aggressive is True, empty cells with style are considered empty.

+ +

Arguments:

+ +
aggressive -- bool
+
+
+ + +
+
+ +
+ + def + traverse( self, start: int | None = None, end: int | None = None) -> collections.abc.Iterator[Row]: + + + +
+ +
1186    def traverse(  # noqa: C901
+1187        self,
+1188        start: int | None = None,
+1189        end: int | None = None,
+1190    ) -> Iterator[Row]:
+1191        """Yield as many row elements as expected rows in the table, i.e.
+1192        expand repetitions by returning the same row as many times as
+1193        necessary.
+1194
+1195            Arguments:
+1196
+1197                start -- int
+1198
+1199                end -- int
+1200
+1201        Copies are returned, use set_row() to push them back.
+1202        """
+1203        idx = -1
+1204        before = -1
+1205        y = 0
+1206        if start is None and end is None:
+1207            for juska in self._tmap:
+1208                idx += 1
+1209                if idx in self._indexes["_tmap"]:
+1210                    row = self._indexes["_tmap"][idx]
+1211                else:
+1212                    row = self._get_element_idx2(_xpath_row_idx, idx)
+1213                    self._indexes["_tmap"][idx] = row
+1214                repeated = juska - before
+1215                before = juska
+1216                for _i in range(repeated or 1):
+1217                    # Return a copy without the now obsolete repetition
+1218                    row = row.clone
+1219                    row.y = y
+1220                    y += 1
+1221                    if repeated > 1:
+1222                        row.repeated = None
+1223                    yield row
+1224        else:
+1225            if start is None:
+1226                start = 0
+1227            start = max(0, start)
+1228            if end is None:
+1229                try:
+1230                    end = self._tmap[-1]
+1231                except Exception:
+1232                    end = -1
+1233            start_map = find_odf_idx(self._tmap, start)
+1234            if start_map is None:
+1235                return
+1236            if start_map > 0:
+1237                before = self._tmap[start_map - 1]
+1238            idx = start_map - 1
+1239            before = start - 1
+1240            y = start
+1241            for juska in self._tmap[start_map:]:
+1242                idx += 1
+1243                if idx in self._indexes["_tmap"]:
+1244                    row = self._indexes["_tmap"][idx]
+1245                else:
+1246                    row = self._get_element_idx2(_xpath_row_idx, idx)
+1247                    self._indexes["_tmap"][idx] = row
+1248                repeated = juska - before
+1249                before = juska
+1250                for _i in range(repeated or 1):
+1251                    if y <= end:
+1252                        row = row.clone
+1253                        row.y = y
+1254                        y += 1
+1255                        if repeated > 1 or (y == start and start > 0):
+1256                            row.repeated = None
+1257                        yield row
+
+ + +

Yield as many row elements as expected rows in the table, i.e. +expand repetitions by returning the same row as many times as +necessary.

+ +
Arguments:
+
+    start -- int
+
+    end -- int
+
+ +

Copies are returned, use set_row() to push them back.

+
+ + +
+
+ +
+ + def + get_rows( self, coord: tuple | list | str | None = None, style: str | None = None, content: str | None = None) -> list[Row]: + + + +
+ +
1259    def get_rows(
+1260        self,
+1261        coord: tuple | list | str | None = None,
+1262        style: str | None = None,
+1263        content: str | None = None,
+1264    ) -> list[Row]:
+1265        """Get the list of rows matching the criteria.
+1266
+1267        Filter by coordinates will parse the area defined by the coordinates.
+1268
+1269        Arguments:
+1270
+1271            coord -- str or tuple of int : coordinates of rows
+1272
+1273            content -- str regex
+1274
+1275            style -- str
+1276
+1277        Return: list of rows
+1278        """
+1279        if coord:
+1280            _x, y, _z, t = self._translate_table_coordinates(coord)
+1281        else:
+1282            y = t = None
+1283        # fixme : not clones ?
+1284        if not content and not style:
+1285            return list(self.traverse(start=y, end=t))
+1286        rows = []
+1287        for row in self.traverse(start=y, end=t):
+1288            if content and not row.match(content):
+1289                continue
+1290            if style and style != row.style:
+1291                continue
+1292            rows.append(row)
+1293        return rows
+
+ + +

Get the list of rows matching the criteria.

+ +

Filter by coordinates will parse the area defined by the coordinates.

+ +

Arguments:

+ +
coord -- str or tuple of int : coordinates of rows
+
+content -- str regex
+
+style -- str
+
+ +

Return: list of rows

+
+ + +
+
+ +
+ + def + get_row( self, y: int | str, clone: bool = True, create: bool = True) -> Row: + + + +
+ +
1318    def get_row(self, y: int | str, clone: bool = True, create: bool = True) -> Row:
+1319        """Get the row at the given "y" position.
+1320
+1321        Position start at 0. So cell A4 is on row 3.
+1322
+1323        A copy is returned, use set_cell() to push it back.
+1324
+1325        Arguments:
+1326
+1327            y -- int or str
+1328
+1329        Return: Row
+1330        """
+1331        # fixme : keep repeat ? maybe an option to functions : "raw=False"
+1332        y = self._translate_y_from_any(y)
+1333        row = self._get_row2(y, clone=clone, create=create)
+1334        if row is None:
+1335            raise ValueError("Row not found")
+1336        row.y = y
+1337        return row
+
+ + +

Get the row at the given "y" position.

+ +

Position start at 0. So cell A4 is on row 3.

+ +

A copy is returned, use set_cell() to push it back.

+ +

Arguments:

+ +
y -- int or str
+
+ +

Return: Row

+
+ + +
+
+ +
+ + def + set_row( self, y: int | str, row: Row | None = None, clone: bool = True) -> Row: + + + +
+ +
1339    def set_row(self, y: int | str, row: Row | None = None, clone: bool = True) -> Row:
+1340        """Replace the row at the given position with the new one. Repetions of
+1341        the old row will be adjusted.
+1342
+1343        If row is None, a new empty row is created.
+1344
+1345        Position start at 0. So cell A4 is on row 3.
+1346
+1347        Arguments:
+1348
+1349            y -- int or str
+1350
+1351            row -- Row
+1352
+1353        returns the row, with updated row.y
+1354        """
+1355        if row is None:
+1356            row = Row()
+1357            repeated = 1
+1358            clone = False
+1359        else:
+1360            repeated = row.repeated or 1
+1361        y = self._translate_y_from_any(y)
+1362        row.y = y
+1363        # Outside the defined table ?
+1364        diff = y - self.height
+1365        if diff == 0:
+1366            row_back = self.append_row(row, _repeated=repeated, clone=clone)
+1367        elif diff > 0:
+1368            self.append_row(Row(repeated=diff), _repeated=diff, clone=clone)
+1369            row_back = self.append_row(row, _repeated=repeated, clone=clone)
+1370        else:
+1371            # Inside the defined table
+1372            row_back = set_item_in_vault(  # type: ignore
+1373                y, row, self, _xpath_row_idx, "_tmap", clone=clone
+1374            )
+1375        # print self.serialize(True)
+1376        # Update width if necessary
+1377        self._update_width(row_back)
+1378        return row_back
+
+ + +

Replace the row at the given position with the new one. Repetions of +the old row will be adjusted.

+ +

If row is None, a new empty row is created.

+ +

Position start at 0. So cell A4 is on row 3.

+ +

Arguments:

+ +
y -- int or str
+
+row -- Row
+
+ +

returns the row, with updated row.y

+
+ + +
+
+ +
+ + def + insert_row( self, y: str | int, row: Row | None = None, clone: bool = True) -> Row: + + + +
+ +
1380    def insert_row(
+1381        self, y: str | int, row: Row | None = None, clone: bool = True
+1382    ) -> Row:
+1383        """Insert the row before the given "y" position. If no row is given,
+1384        an empty one is created.
+1385
+1386        Position start at 0. So cell A4 is on row 3.
+1387
+1388        If row is None, a new empty row is created.
+1389
+1390        Arguments:
+1391
+1392            y -- int or str
+1393
+1394            row -- Row
+1395
+1396        returns the row, with updated row.y
+1397        """
+1398        if row is None:
+1399            row = Row()
+1400            clone = False
+1401        y = self._translate_y_from_any(y)
+1402        diff = y - self.height
+1403        if diff < 0:
+1404            row_back = insert_item_in_vault(y, row, self, _xpath_row_idx, "_tmap")
+1405        elif diff == 0:
+1406            row_back = self.append_row(row, clone=clone)
+1407        else:
+1408            self.append_row(Row(repeated=diff), _repeated=diff, clone=False)
+1409            row_back = self.append_row(row, clone=clone)
+1410        row_back.y = y  # type: ignore
+1411        # Update width if necessary
+1412        self._update_width(row_back)  # type: ignore
+1413        return row_back  # type: ignore
+
+ + +

Insert the row before the given "y" position. If no row is given, +an empty one is created.

+ +

Position start at 0. So cell A4 is on row 3.

+ +

If row is None, a new empty row is created.

+ +

Arguments:

+ +
y -- int or str
+
+row -- Row
+
+ +

returns the row, with updated row.y

+
+ + +
+
+ +
+ + def + extend_rows(self, rows: list[Row] | None = None) -> None: + + + +
+ +
1415    def extend_rows(self, rows: list[Row] | None = None) -> None:
+1416        """Append a list of rows at the end of the table.
+1417
+1418        Arguments:
+1419
+1420            rows -- list of Row
+1421        """
+1422        if rows is None:
+1423            rows = []
+1424        self.extend(rows)
+1425        self._compute_table_cache()
+1426        # Update width if necessary
+1427        width = self.width
+1428        for row in self.traverse():
+1429            if row.width > width:
+1430                width = row.width
+1431        diff = width - self.width
+1432        if diff > 0:
+1433            self.append_column(Column(repeated=diff))
+
+ + +

Append a list of rows at the end of the table.

+ +

Arguments:

+ +
rows -- list of Row
+
+
+ + +
+
+ +
+ + def + append_row( self, row: Row | None = None, clone: bool = True, _repeated: int | None = None) -> Row: + + + +
+ +
1435    def append_row(
+1436        self,
+1437        row: Row | None = None,
+1438        clone: bool = True,
+1439        _repeated: int | None = None,
+1440    ) -> Row:
+1441        """Append the row at the end of the table. If no row is given, an
+1442        empty one is created.
+1443
+1444        Position start at 0. So cell A4 is on row 3.
+1445
+1446        Note the columns are automatically created when the first row is
+1447        inserted in an empty table. So better insert a filled row.
+1448
+1449        Arguments:
+1450
+1451            row -- Row
+1452
+1453            _repeated -- (optional), repeated value of the row
+1454
+1455        returns the row, with updated row.y
+1456        """
+1457        if row is None:
+1458            row = Row()
+1459            _repeated = 1
+1460        elif clone:
+1461            row = row.clone
+1462        # Appending a repeated row accepted
+1463        # Do not insert next to the last row because it could be in a group
+1464        self._append(row)
+1465        if _repeated is None:
+1466            _repeated = row.repeated or 1
+1467        self._tmap = insert_map_once(self._tmap, len(self._tmap), _repeated)
+1468        row.y = self.height - 1
+1469        # Initialize columns
+1470        if not self._get_columns():
+1471            repeated = row.width
+1472            self.insert(Column(repeated=repeated), position=0)
+1473            self._compute_table_cache()
+1474        # Update width if necessary
+1475        self._update_width(row)
+1476        return row
+
+ + +

Append the row at the end of the table. If no row is given, an +empty one is created.

+ +

Position start at 0. So cell A4 is on row 3.

+ +

Note the columns are automatically created when the first row is +inserted in an empty table. So better insert a filled row.

+ +

Arguments:

+ +
row -- Row
+
+_repeated -- (optional), repeated value of the row
+
+ +

returns the row, with updated row.y

+
+ + +
+
+ +
+ + def + delete_row(self, y: int | str) -> None: + + + +
+ +
1478    def delete_row(self, y: int | str) -> None:
+1479        """Delete the row at the given "y" position.
+1480
+1481        Position start at 0. So cell A4 is on row 3.
+1482
+1483        Arguments:
+1484
+1485            y -- int or str
+1486        """
+1487        y = self._translate_y_from_any(y)
+1488        # Outside the defined table
+1489        if y >= self.height:
+1490            return
+1491        # Inside the defined table
+1492        delete_item_in_vault(y, self, _xpath_row_idx, "_tmap")
+
+ + +

Delete the row at the given "y" position.

+ +

Position start at 0. So cell A4 is on row 3.

+ +

Arguments:

+ +
y -- int or str
+
+
+ + +
+
+ +
+ + def + get_row_values( self, y: int | str, cell_type: str | None = None, complete: bool = True, get_type: bool = False) -> list: + + + +
+ +
1494    def get_row_values(
+1495        self,
+1496        y: int | str,
+1497        cell_type: str | None = None,
+1498        complete: bool = True,
+1499        get_type: bool = False,
+1500    ) -> list:
+1501        """Shortcut to get the list of Python values for the cells of the row
+1502        at the given "y" position.
+1503
+1504        Position start at 0. So cell A4 is on row 3.
+1505
+1506        Filter by cell_type, with cell_type 'all' will retrieve cells of any
+1507        type, aka non empty cells.
+1508        If cell_type and complete is True, replace missing values by None.
+1509
+1510        If get_type is True, returns a tuple (value, ODF type of value)
+1511
+1512        Arguments:
+1513
+1514            y -- int, str
+1515
+1516            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+1517                         'currency', 'percentage' or 'all'
+1518
+1519            complete -- boolean
+1520
+1521            get_type -- boolean
+1522
+1523        Return: list of lists of Python types
+1524        """
+1525        values = self.get_row(y, clone=False).get_values(
+1526            cell_type=cell_type, complete=complete, get_type=get_type
+1527        )
+1528        # complete row to match column width
+1529        if complete:
+1530            if get_type:
+1531                values.extend([(None, None)] * (self.width - len(values)))
+1532            else:
+1533                values.extend([None] * (self.width - len(values)))
+1534        return values
+
+ + +

Shortcut to get the list of Python values for the cells of the row +at the given "y" position.

+ +

Position start at 0. So cell A4 is on row 3.

+ +

Filter by cell_type, with cell_type 'all' will retrieve cells of any +type, aka non empty cells. +If cell_type and complete is True, replace missing values by None.

+ +

If get_type is True, returns a tuple (value, ODF type of value)

+ +

Arguments:

+ +
y -- int, str
+
+cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+             'currency', 'percentage' or 'all'
+
+complete -- boolean
+
+get_type -- boolean
+
+ +

Return: list of lists of Python types

+
+ + +
+
+ +
+ + def + set_row_values( self, y: int | str, values: list, cell_type: str | None = None, currency: str | None = None, style: str | None = None) -> Row: + + + +
+ +
1536    def set_row_values(
+1537        self,
+1538        y: int | str,
+1539        values: list,
+1540        cell_type: str | None = None,
+1541        currency: str | None = None,
+1542        style: str | None = None,
+1543    ) -> Row:
+1544        """Shortcut to set the values of *all* cells of the row at the given
+1545        "y" position.
+1546
+1547        Position start at 0. So cell A4 is on row 3.
+1548
+1549        Arguments:
+1550
+1551            y -- int or str
+1552
+1553            values -- list of Python types
+1554
+1555            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+1556                         'string' or 'time'
+1557
+1558            currency -- three-letter str
+1559
+1560            style -- str
+1561
+1562        returns the row, with updated row.y
+1563        """
+1564        row = Row()  # needed if clones rows
+1565        row.set_values(values, style=style, cell_type=cell_type, currency=currency)
+1566        return self.set_row(y, row)  # needed if clones rows
+
+ + +

Shortcut to set the values of all cells of the row at the given +"y" position.

+ +

Position start at 0. So cell A4 is on row 3.

+ +

Arguments:

+ +
y -- int or str
+
+values -- list of Python types
+
+cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+             'string' or 'time'
+
+currency -- three-letter str
+
+style -- str
+
+ +

returns the row, with updated row.y

+
+ + +
+
+ +
+ + def + set_row_cells(self, y: int | str, cells: list | None = None) -> Row: + + + +
+ +
1568    def set_row_cells(self, y: int | str, cells: list | None = None) -> Row:
+1569        """Shortcut to set *all* the cells of the row at the given
+1570        "y" position.
+1571
+1572        Position start at 0. So cell A4 is on row 3.
+1573
+1574        Arguments:
+1575
+1576            y -- int or str
+1577
+1578            cells -- list of Python types
+1579
+1580            style -- str
+1581
+1582        returns the row, with updated row.y
+1583        """
+1584        if cells is None:
+1585            cells = []
+1586        row = Row()  # needed if clones rows
+1587        row.extend_cells(cells)
+1588        return self.set_row(y, row)  # needed if clones rows
+
+ + +

Shortcut to set all the cells of the row at the given +"y" position.

+ +

Position start at 0. So cell A4 is on row 3.

+ +

Arguments:

+ +
y -- int or str
+
+cells -- list of Python types
+
+style -- str
+
+ +

returns the row, with updated row.y

+
+ + +
+
+ +
+ + def + is_row_empty(self, y: int | str, aggressive: bool = False) -> bool: + + + +
+ +
1590    def is_row_empty(self, y: int | str, aggressive: bool = False) -> bool:
+1591        """Return wether every cell in the row at the given "y" position has
+1592        no value or the value evaluates to False (empty string), and no style.
+1593
+1594        Position start at 0. So cell A4 is on row 3.
+1595
+1596        If aggressive is True, empty cells with style are considered empty.
+1597
+1598        Arguments:
+1599
+1600            y -- int or str
+1601
+1602            aggressive -- bool
+1603        """
+1604        return self.get_row(y, clone=False).is_empty(aggressive=aggressive)
+
+ + +

Return wether every cell in the row at the given "y" position has +no value or the value evaluates to False (empty string), and no style.

+ +

Position start at 0. So cell A4 is on row 3.

+ +

If aggressive is True, empty cells with style are considered empty.

+ +

Arguments:

+ +
y -- int or str
+
+aggressive -- bool
+
+
+ + +
+
+ +
+ + def + get_cells( self, coord: tuple | list | str | None = None, cell_type: str | None = None, style: str | None = None, content: str | None = None, flat: bool = False) -> list: + + + +
+ +
1610    def get_cells(
+1611        self,
+1612        coord: tuple | list | str | None = None,
+1613        cell_type: str | None = None,
+1614        style: str | None = None,
+1615        content: str | None = None,
+1616        flat: bool = False,
+1617    ) -> list:
+1618        """Get the cells matching the criteria. If 'coord' is None,
+1619        parse the whole table, else parse the area defined by 'coord'.
+1620
+1621        Filter by  cell_type = "all"  will retrieve cells of any
+1622        type, aka non empty cells.
+1623
+1624        If flat is True (default is False), the method return a single list
+1625        of all the values, else a list of lists of cells.
+1626
+1627        if cell_type, style and content are None, get_cells() will return
+1628        the exact number of cells of the area, including empty cells.
+1629
+1630        Arguments:
+1631
+1632            coordinates -- str or tuple of int : coordinates of area
+1633
+1634            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+1635                         'currency', 'percentage' or 'all'
+1636
+1637            content -- str regex
+1638
+1639            style -- str
+1640
+1641            flat -- boolean
+1642
+1643        Return: list of tuples
+1644        """
+1645        if coord:
+1646            x, y, z, t = self._translate_table_coordinates(coord)
+1647        else:
+1648            x = y = z = t = None
+1649        if flat:
+1650            cells: list[Cell] = []
+1651            for row in self.traverse(start=y, end=t):
+1652                row_cells = row.get_cells(
+1653                    coord=(x, z),
+1654                    cell_type=cell_type,
+1655                    style=style,
+1656                    content=content,
+1657                )
+1658                cells.extend(row_cells)
+1659            return cells
+1660        else:
+1661            lcells: list[list[Cell]] = []
+1662            for row in self.traverse(start=y, end=t):
+1663                row_cells = row.get_cells(
+1664                    coord=(x, z),
+1665                    cell_type=cell_type,
+1666                    style=style,
+1667                    content=content,
+1668                )
+1669                lcells.append(row_cells)
+1670            return lcells
+
+ + +

Get the cells matching the criteria. If 'coord' is None, +parse the whole table, else parse the area defined by 'coord'.

+ +

Filter by cell_type = "all" will retrieve cells of any +type, aka non empty cells.

+ +

If flat is True (default is False), the method return a single list +of all the values, else a list of lists of cells.

+ +

if cell_type, style and content are None, get_cells() will return +the exact number of cells of the area, including empty cells.

+ +

Arguments:

+ +
coordinates -- str or tuple of int : coordinates of area
+
+cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+             'currency', 'percentage' or 'all'
+
+content -- str regex
+
+style -- str
+
+flat -- boolean
+
+ +

Return: list of tuples

+
+ + +
+
+ +
+ + def + get_cell( self, coord: tuple | list | str, clone: bool = True, keep_repeated: bool = True) -> Cell: + + + +
+ +
1672    def get_cell(
+1673        self,
+1674        coord: tuple | list | str,
+1675        clone: bool = True,
+1676        keep_repeated: bool = True,
+1677    ) -> Cell:
+1678        """Get the cell at the given coordinates.
+1679
+1680        They are either a 2-uplet of (x, y) starting from 0, or a
+1681        human-readable position like "C4".
+1682
+1683        A copy is returned, use ``set_cell`` to push it back.
+1684
+1685        Arguments:
+1686
+1687            coord -- (int, int) or str
+1688
+1689        Return: Cell
+1690        """
+1691        x, y = self._translate_cell_coordinates(coord)
+1692        if x is None:
+1693            raise ValueError
+1694        if y is None:
+1695            raise ValueError
+1696        # Outside the defined table
+1697        if y >= self.height:
+1698            cell = Cell()
+1699        else:
+1700            # Inside the defined table
+1701            row = self._get_row2_base(y)
+1702            if row is None:
+1703                raise ValueError
+1704            read_cell = row.get_cell(x, clone=clone)
+1705            if read_cell is None:
+1706                raise ValueError
+1707            cell = read_cell
+1708            if not keep_repeated:
+1709                repeated = cell.repeated or 1
+1710                if repeated >= 2:
+1711                    cell.repeated = None
+1712        cell.x = x
+1713        cell.y = y
+1714        return cell
+
+ + +

Get the cell at the given coordinates.

+ +

They are either a 2-uplet of (x, y) starting from 0, or a +human-readable position like "C4".

+ +

A copy is returned, use set_cell to push it back.

+ +

Arguments:

+ +
coord -- (int, int) or str
+
+ +

Return: Cell

+
+ + +
+
+ +
+ + def + get_value(self, coord: tuple | list | str, get_type: bool = False) -> Any: + + + +
+ +
1716    def get_value(
+1717        self,
+1718        coord: tuple | list | str,
+1719        get_type: bool = False,
+1720    ) -> Any:
+1721        """Shortcut to get the Python value of the cell at the given
+1722        coordinates.
+1723
+1724        If get_type is True, returns the tuples (value, ODF type)
+1725
+1726        coord is either a 2-uplet of (x, y) starting from 0, or a
+1727        human-readable position like "C4". If an Area is given, the upper
+1728        left position is used as coord.
+1729
+1730        Arguments:
+1731
+1732            coord -- (int, int) or str : coordinate
+1733
+1734        Return: Python type
+1735        """
+1736        x, y = self._translate_cell_coordinates(coord)
+1737        if x is None:
+1738            raise ValueError
+1739        if y is None:
+1740            raise ValueError
+1741        # Outside the defined table
+1742        if y >= self.height:
+1743            if get_type:
+1744                return (None, None)
+1745            return None
+1746        else:
+1747            # Inside the defined table
+1748            row = self._get_row2_base(y)
+1749            if row is None:
+1750                raise ValueError
+1751            cell = row._get_cell2_base(x)
+1752            if cell is None:
+1753                if get_type:
+1754                    return (None, None)
+1755                return None
+1756            return cell.get_value(get_type=get_type)
+
+ + +

Shortcut to get the Python value of the cell at the given +coordinates.

+ +

If get_type is True, returns the tuples (value, ODF type)

+ +

coord is either a 2-uplet of (x, y) starting from 0, or a +human-readable position like "C4". If an Area is given, the upper +left position is used as coord.

+ +

Arguments:

+ +
coord -- (int, int) or str : coordinate
+
+ +

Return: Python type

+
+ + +
+
+ +
+ + def + set_cell( self, coord: tuple | list | str, cell: Cell | None = None, clone: bool = True) -> Cell: + + + +
+ +
1758    def set_cell(
+1759        self,
+1760        coord: tuple | list | str,
+1761        cell: Cell | None = None,
+1762        clone: bool = True,
+1763    ) -> Cell:
+1764        """Replace a cell of the table at the given coordinates.
+1765
+1766        They are either a 2-uplet of (x, y) starting from 0, or a
+1767        human-readable position like "C4".
+1768
+1769        Arguments:
+1770
+1771            coord -- (int, int) or str : coordinate
+1772
+1773            cell -- Cell
+1774
+1775        return the cell, with x and y updated
+1776        """
+1777        if cell is None:
+1778            cell = Cell()
+1779            clone = False
+1780        x, y = self._translate_cell_coordinates(coord)
+1781        if x is None:
+1782            raise ValueError
+1783        if y is None:
+1784            raise ValueError
+1785        cell.x = x
+1786        cell.y = y
+1787        if y >= self.height:
+1788            row = Row()
+1789            cell_back = row.set_cell(x, cell, clone=clone)
+1790            self.set_row(y, row, clone=False)
+1791        else:
+1792            row_read = self._get_row2_base(y)
+1793            if row_read is None:
+1794                raise ValueError
+1795            row = row_read
+1796            row.y = y
+1797            repeated = row.repeated or 1
+1798            if repeated > 1:
+1799                row = row.clone
+1800                row.repeated = None
+1801                cell_back = row.set_cell(x, cell, clone=clone)
+1802                self.set_row(y, row, clone=False)
+1803            else:
+1804                cell_back = row.set_cell(x, cell, clone=clone)
+1805                # Update width if necessary, since we don't use set_row
+1806                self._update_width(row)
+1807        return cell_back
+
+ + +

Replace a cell of the table at the given coordinates.

+ +

They are either a 2-uplet of (x, y) starting from 0, or a +human-readable position like "C4".

+ +

Arguments:

+ +
coord -- (int, int) or str : coordinate
+
+cell -- Cell
+
+ +

return the cell, with x and y updated

+
+ + +
+
+ +
+ + def + set_cells( self, cells: list[list[Cell]] | list[tuple[Cell]], coord: tuple | list | str | None = None, clone: bool = True) -> None: + + + +
+ +
1809    def set_cells(
+1810        self,
+1811        cells: list[list[Cell]] | list[tuple[Cell]],
+1812        coord: tuple | list | str | None = None,
+1813        clone: bool = True,
+1814    ) -> None:
+1815        """Set the cells in the table, from the 'coord' position.
+1816
+1817        'coord' is the coordinate of the upper left cell to be modified by
+1818        values. If 'coord' is None, default to the position (0,0) ("A1").
+1819        If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
+1820        area is used as coordinate.
+1821
+1822        The table is *not* cleared before the operation, to reset the table
+1823        before setting cells, use table.clear().
+1824
+1825        A list of lists is expected, with as many lists as rows to be set, and
+1826        as many cell in each sublist as cells to be setted in the row.
+1827
+1828        Arguments:
+1829
+1830            cells -- list of list of cells
+1831
+1832            coord -- tuple or str
+1833
+1834            values -- list of lists of python types
+1835        """
+1836        if coord:
+1837            x, y = self._translate_cell_coordinates(coord)
+1838        else:
+1839            x = y = 0
+1840        if y is None:
+1841            y = 0
+1842        if x is None:
+1843            x = 0
+1844        y -= 1
+1845        for row_cells in cells:
+1846            y += 1
+1847            if not row_cells:
+1848                continue
+1849            row = self.get_row(y, clone=True)
+1850            repeated = row.repeated or 1
+1851            if repeated >= 2:
+1852                row.repeated = None
+1853            row.set_cells(row_cells, start=x, clone=clone)
+1854            self.set_row(y, row, clone=False)
+1855            self._update_width(row)
+
+ + +

Set the cells in the table, from the 'coord' position.

+ +

'coord' is the coordinate of the upper left cell to be modified by +values. If 'coord' is None, default to the position (0,0) ("A1"). +If 'coord' is an area (e.g. "A2:B5"), the upper left position of this +area is used as coordinate.

+ +

The table is not cleared before the operation, to reset the table +before setting cells, use table.clear().

+ +

A list of lists is expected, with as many lists as rows to be set, and +as many cell in each sublist as cells to be setted in the row.

+ +

Arguments:

+ +
cells -- list of list of cells
+
+coord -- tuple or str
+
+values -- list of lists of python types
+
+
+ + +
+
+ +
+ + def + set_value( self, coord: tuple | list | str, value: Any, cell_type: str | None = None, currency: str | None = None, style: str | None = None) -> None: + + + +
+ +
1857    def set_value(
+1858        self,
+1859        coord: tuple | list | str,
+1860        value: Any,
+1861        cell_type: str | None = None,
+1862        currency: str | None = None,
+1863        style: str | None = None,
+1864    ) -> None:
+1865        """Set the Python value of the cell at the given coordinates.
+1866
+1867        They are either a 2-uplet of (x, y) starting from 0, or a
+1868        human-readable position like "C4".
+1869
+1870        Arguments:
+1871
+1872            coord -- (int, int) or str
+1873
+1874            value -- Python type
+1875
+1876            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+1877                     'string' or 'time'
+1878
+1879            currency -- three-letter str
+1880
+1881            style -- str
+1882
+1883        """
+1884        self.set_cell(
+1885            coord,
+1886            Cell(value, cell_type=cell_type, currency=currency, style=style),
+1887            clone=False,
+1888        )
+
+ + +

Set the Python value of the cell at the given coordinates.

+ +

They are either a 2-uplet of (x, y) starting from 0, or a +human-readable position like "C4".

+ +

Arguments:

+ +
coord -- (int, int) or str
+
+value -- Python type
+
+cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+         'string' or 'time'
+
+currency -- three-letter str
+
+style -- str
+
+
+ + +
+
+ +
+ + def + set_cell_image( self, coord: tuple | list | str, image_frame: Frame, doc_type: str | None = None) -> None: + + + +
+ +
1890    def set_cell_image(
+1891        self,
+1892        coord: tuple | list | str,
+1893        image_frame: Frame,
+1894        doc_type: str | None = None,
+1895    ) -> None:
+1896        """Do all the magic to display an image in the cell at the given
+1897        coordinates.
+1898
+1899        They are either a 2-uplet of (x, y) starting from 0, or a
+1900        human-readable position like "C4".
+1901
+1902        The frame element must contain the expected image position and
+1903        dimensions.
+1904
+1905        DrawImage insertion depends on the document type, so the type must be
+1906        provided or the table element must be already attached to a document.
+1907
+1908        Arguments:
+1909
+1910            coord -- (int, int) or str
+1911
+1912            image_frame -- Frame including an image
+1913
+1914            doc_type -- 'spreadsheet' or 'text'
+1915        """
+1916        # Test document type
+1917        if doc_type is None:
+1918            body = self.document_body
+1919            if body is None:
+1920                raise ValueError("document type not found")
+1921            doc_type = {"office:spreadsheet": "spreadsheet", "office:text": "text"}.get(
+1922                body.tag
+1923            )
+1924            if doc_type is None:
+1925                raise ValueError("document type not supported for images")
+1926        # We need the end address of the image
+1927        x, y = self._translate_cell_coordinates(coord)
+1928        if x is None:
+1929            raise ValueError
+1930        if y is None:
+1931            raise ValueError
+1932        cell = self.get_cell((x, y))
+1933        image_frame = image_frame.clone  # type: ignore
+1934        # Remove any previous paragraph, frame, etc.
+1935        for child in cell.children:
+1936            cell.delete(child)
+1937        # Now it all depends on the document type
+1938        if doc_type == "spreadsheet":
+1939            image_frame.anchor_type = "char"
+1940            # The frame needs end coordinates
+1941            width, height = image_frame.size
+1942            image_frame.set_attribute("table:end-x", width)
+1943            image_frame.set_attribute("table:end-y", height)
+1944            # FIXME what happens when the address changes?
+1945            address = f"{self.name}.{digit_to_alpha(x)}{y + 1}"
+1946            image_frame.set_attribute("table:end-cell-address", address)
+1947            # The frame is directly in the cell
+1948            cell.append(image_frame)
+1949        elif doc_type == "text":
+1950            # The frame must be in a paragraph
+1951            cell.set_value("")
+1952            paragraph = cell.get_element("text:p")
+1953            if paragraph is None:
+1954                raise ValueError
+1955            paragraph.append(image_frame)
+1956        self.set_cell(coord, cell)
+
+ + +

Do all the magic to display an image in the cell at the given +coordinates.

+ +

They are either a 2-uplet of (x, y) starting from 0, or a +human-readable position like "C4".

+ +

The frame element must contain the expected image position and +dimensions.

+ +

DrawImage insertion depends on the document type, so the type must be +provided or the table element must be already attached to a document.

+ +

Arguments:

+ +
coord -- (int, int) or str
+
+image_frame -- Frame including an image
+
+doc_type -- 'spreadsheet' or 'text'
+
+
+ + +
+
+ +
+ + def + insert_cell( self, coord: tuple | list | str, cell: Cell | None = None, clone: bool = True) -> Cell: + + + +
+ +
1958    def insert_cell(
+1959        self,
+1960        coord: tuple | list | str,
+1961        cell: Cell | None = None,
+1962        clone: bool = True,
+1963    ) -> Cell:
+1964        """Insert the given cell at the given coordinates. If no cell is
+1965        given, an empty one is created.
+1966
+1967        Coordinates are either a 2-uplet of (x, y) starting from 0, or a
+1968        human-readable position like "C4".
+1969
+1970        Cells on the right are shifted. Other rows remain untouched.
+1971
+1972        Arguments:
+1973
+1974            coord -- (int, int) or str
+1975
+1976            cell -- Cell
+1977
+1978        returns the cell with x and y updated
+1979        """
+1980        if cell is None:
+1981            cell = Cell()
+1982            clone = False
+1983        if clone:
+1984            cell = cell.clone
+1985        x, y = self._translate_cell_coordinates(coord)
+1986        if x is None:
+1987            raise ValueError
+1988        if y is None:
+1989            raise ValueError
+1990        row = self._get_row2(y, clone=True)
+1991        row.y = y
+1992        row.repeated = None
+1993        cell_back = row.insert_cell(x, cell, clone=False)
+1994        self.set_row(y, row, clone=False)
+1995        # Update width if necessary
+1996        self._update_width(row)
+1997        return cell_back
+
+ + +

Insert the given cell at the given coordinates. If no cell is +given, an empty one is created.

+ +

Coordinates are either a 2-uplet of (x, y) starting from 0, or a +human-readable position like "C4".

+ +

Cells on the right are shifted. Other rows remain untouched.

+ +

Arguments:

+ +
coord -- (int, int) or str
+
+cell -- Cell
+
+ +

returns the cell with x and y updated

+
+ + +
+
+ +
+ + def + append_cell( self, y: int | str, cell: Cell | None = None, clone: bool = True) -> Cell: + + + +
+ +
1999    def append_cell(
+2000        self,
+2001        y: int | str,
+2002        cell: Cell | None = None,
+2003        clone: bool = True,
+2004    ) -> Cell:
+2005        """Append the given cell at the "y" coordinate. Repeated cells are
+2006        accepted. If no cell is given, an empty one is created.
+2007
+2008        Position start at 0. So cell A4 is on row 3.
+2009
+2010        Other rows remain untouched.
+2011
+2012        Arguments:
+2013
+2014            y -- int or str
+2015
+2016            cell -- Cell
+2017
+2018        returns the cell with x and y updated
+2019        """
+2020        if cell is None:
+2021            cell = Cell()
+2022            clone = False
+2023        if clone:
+2024            cell = cell.clone
+2025        y = self._translate_y_from_any(y)
+2026        row = self._get_row2(y)
+2027        row.y = y
+2028        cell_back = row.append_cell(cell, clone=False)
+2029        self.set_row(y, row)
+2030        # Update width if necessary
+2031        self._update_width(row)
+2032        return cell_back
+
+ + +

Append the given cell at the "y" coordinate. Repeated cells are +accepted. If no cell is given, an empty one is created.

+ +

Position start at 0. So cell A4 is on row 3.

+ +

Other rows remain untouched.

+ +

Arguments:

+ +
y -- int or str
+
+cell -- Cell
+
+ +

returns the cell with x and y updated

+
+ + +
+
+ +
+ + def + delete_cell(self, coord: tuple | list | str) -> None: + + + +
+ +
2034    def delete_cell(self, coord: tuple | list | str) -> None:
+2035        """Delete the cell at the given coordinates, so that next cells are
+2036        shifted to the left.
+2037
+2038        Coordinates are either a 2-uplet of (x, y) starting from 0, or a
+2039        human-readable position like "C4".
+2040
+2041        Use set_value() for erasing value.
+2042
+2043        Arguments:
+2044
+2045            coord -- (int, int) or str
+2046        """
+2047        x, y = self._translate_cell_coordinates(coord)
+2048        if x is None:
+2049            raise ValueError
+2050        if y is None:
+2051            raise ValueError
+2052        # Outside the defined table
+2053        if y >= self.height:
+2054            return
+2055        # Inside the defined table
+2056        row = self._get_row2_base(y)
+2057        if row is None:
+2058            raise ValueError
+2059        row.delete_cell(x)
+2060        # self.set_row(y, row)
+
+ + +

Delete the cell at the given coordinates, so that next cells are +shifted to the left.

+ +

Coordinates are either a 2-uplet of (x, y) starting from 0, or a +human-readable position like "C4".

+ +

Use set_value() for erasing value.

+ +

Arguments:

+ +
coord -- (int, int) or str
+
+
+ + +
+
+ +
+ + def + traverse_columns( self, start: int | None = None, end: int | None = None) -> collections.abc.Iterator[Column]: + + + +
+ +
2067    def traverse_columns(  # noqa: C901
+2068        self,
+2069        start: int | None = None,
+2070        end: int | None = None,
+2071    ) -> Iterator[Column]:
+2072        """Yield as many column elements as expected columns in the table,
+2073        i.e. expand repetitions by returning the same column as many times as
+2074        necessary.
+2075
+2076            Arguments:
+2077
+2078                start -- int
+2079
+2080                end -- int
+2081
+2082        Copies are returned, use set_column() to push them back.
+2083        """
+2084        idx = -1
+2085        before = -1
+2086        x = 0
+2087        if start is None and end is None:
+2088            for juska in self._cmap:
+2089                idx += 1
+2090                if idx in self._indexes["_cmap"]:
+2091                    column = self._indexes["_cmap"][idx]
+2092                else:
+2093                    column = self._get_element_idx2(_xpath_column_idx, idx)
+2094                    self._indexes["_cmap"][idx] = column
+2095                repeated = juska - before
+2096                before = juska
+2097                for _i in range(repeated or 1):
+2098                    # Return a copy without the now obsolete repetition
+2099                    column = column.clone
+2100                    column.x = x
+2101                    x += 1
+2102                    if repeated > 1:
+2103                        column.repeated = None
+2104                    yield column
+2105        else:
+2106            if start is None:
+2107                start = 0
+2108            start = max(0, start)
+2109            if end is None:
+2110                try:
+2111                    end = self._cmap[-1]
+2112                except Exception:
+2113                    end = -1
+2114            start_map = find_odf_idx(self._cmap, start)
+2115            if start_map is None:
+2116                return
+2117            if start_map > 0:
+2118                before = self._cmap[start_map - 1]
+2119            idx = start_map - 1
+2120            before = start - 1
+2121            x = start
+2122            for juska in self._cmap[start_map:]:
+2123                idx += 1
+2124                if idx in self._indexes["_cmap"]:
+2125                    column = self._indexes["_cmap"][idx]
+2126                else:
+2127                    column = self._get_element_idx2(_xpath_column_idx, idx)
+2128                    self._indexes["_cmap"][idx] = column
+2129                repeated = juska - before
+2130                before = juska
+2131                for _i in range(repeated or 1):
+2132                    if x <= end:
+2133                        column = column.clone
+2134                        column.x = x
+2135                        x += 1
+2136                        if repeated > 1 or (x == start and start > 0):
+2137                            column.repeated = None
+2138                        yield column
+
+ + +

Yield as many column elements as expected columns in the table, +i.e. expand repetitions by returning the same column as many times as +necessary.

+ +
Arguments:
+
+    start -- int
+
+    end -- int
+
+ +

Copies are returned, use set_column() to push them back.

+
+ + +
+
+ +
+ + def + get_columns( self, coord: tuple | list | str | None = None, style: str | None = None) -> list[Column]: + + + +
+ +
2140    def get_columns(
+2141        self,
+2142        coord: tuple | list | str | None = None,
+2143        style: str | None = None,
+2144    ) -> list[Column]:
+2145        """Get the list of columns matching the criteria. Each result is a
+2146        tuple of (x, column).
+2147
+2148        Arguments:
+2149
+2150            coord -- str or tuple of int : coordinates of columns
+2151
+2152            style -- str
+2153
+2154        Return: list of columns
+2155        """
+2156        if coord:
+2157            x, _y, _z, t = self._translate_column_coordinates(coord)
+2158        else:
+2159            x = t = None
+2160        if not style:
+2161            return list(self.traverse_columns(start=x, end=t))
+2162        columns = []
+2163        for column in self.traverse_columns(start=x, end=t):
+2164            if style != column.style:
+2165                continue
+2166            columns.append(column)
+2167        return columns
+
+ + +

Get the list of columns matching the criteria. Each result is a +tuple of (x, column).

+ +

Arguments:

+ +
coord -- str or tuple of int : coordinates of columns
+
+style -- str
+
+ +

Return: list of columns

+
+ + +
+
+ +
+ + def + get_column(self, x: int | str) -> Column: + + + +
+ +
2184    def get_column(self, x: int | str) -> Column:
+2185        """Get the column at the given "x" position.
+2186
+2187        ODF columns don't contain cells, only style information.
+2188
+2189        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2190        like "C" is accepted.
+2191
+2192        A copy is returned, use set_column() to push it back.
+2193
+2194        Arguments:
+2195
+2196            x -- int or str
+2197
+2198        Return: Column
+2199        """
+2200        x = self._translate_x_from_any(x)
+2201        column = self._get_column2(x)
+2202        if column is None:
+2203            raise ValueError
+2204        column.x = x
+2205        return column
+
+ + +

Get the column at the given "x" position.

+ +

ODF columns don't contain cells, only style information.

+ +

Position start at 0. So cell C4 is on column 2. Alphabetical position +like "C" is accepted.

+ +

A copy is returned, use set_column() to push it back.

+ +

Arguments:

+ +
x -- int or str
+
+ +

Return: Column

+
+ + +
+
+ +
+ + def + set_column( self, x: int | str, column: Column | None = None) -> Column: + + + +
+ +
2207    def set_column(
+2208        self,
+2209        x: int | str,
+2210        column: Column | None = None,
+2211    ) -> Column:
+2212        """Replace the column at the given "x" position.
+2213
+2214        ODF columns don't contain cells, only style information.
+2215
+2216        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2217        like "C" is accepted.
+2218
+2219        Arguments:
+2220
+2221            x -- int or str
+2222
+2223            column -- Column
+2224        """
+2225        x = self._translate_x_from_any(x)
+2226        if column is None:
+2227            column = Column()
+2228            repeated = 1
+2229        else:
+2230            repeated = column.repeated or 1
+2231        column.x = x
+2232        # Outside the defined table ?
+2233        diff = x - self.width
+2234        if diff == 0:
+2235            column_back = self.append_column(column, _repeated=repeated)
+2236        elif diff > 0:
+2237            self.append_column(Column(repeated=diff), _repeated=diff)
+2238            column_back = self.append_column(column, _repeated=repeated)
+2239        else:
+2240            # Inside the defined table
+2241            column_back = set_item_in_vault(  # type: ignore
+2242                x, column, self, _xpath_column_idx, "_cmap"
+2243            )
+2244        return column_back
+
+ + +

Replace the column at the given "x" position.

+ +

ODF columns don't contain cells, only style information.

+ +

Position start at 0. So cell C4 is on column 2. Alphabetical position +like "C" is accepted.

+ +

Arguments:

+ +
x -- int or str
+
+column -- Column
+
+
+ + +
+
+ +
+ + def + insert_column( self, x: int | str, column: Column | None = None) -> Column: + + + +
+ +
2246    def insert_column(
+2247        self,
+2248        x: int | str,
+2249        column: Column | None = None,
+2250    ) -> Column:
+2251        """Insert the column before the given "x" position. If no column is
+2252        given, an empty one is created.
+2253
+2254        ODF columns don't contain cells, only style information.
+2255
+2256        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2257        like "C" is accepted.
+2258
+2259        Arguments:
+2260
+2261            x -- int or str
+2262
+2263            column -- Column
+2264        """
+2265        if column is None:
+2266            column = Column()
+2267        x = self._translate_x_from_any(x)
+2268        diff = x - self.width
+2269        if diff < 0:
+2270            column_back = insert_item_in_vault(
+2271                x, column, self, _xpath_column_idx, "_cmap"
+2272            )
+2273        elif diff == 0:
+2274            column_back = self.append_column(column.clone)
+2275        else:
+2276            self.append_column(Column(repeated=diff), _repeated=diff)
+2277            column_back = self.append_column(column.clone)
+2278        column_back.x = x  # type: ignore
+2279        # Repetitions are accepted
+2280        repeated = column.repeated or 1
+2281        # Update width on every row
+2282        for row in self._get_rows():
+2283            if row.width > x:
+2284                row.insert_cell(x, Cell(repeated=repeated))
+2285            # Shorter rows don't need insert
+2286            # Longer rows shouldn't exist!
+2287        return column_back  # type: ignore
+
+ + +

Insert the column before the given "x" position. If no column is +given, an empty one is created.

+ +

ODF columns don't contain cells, only style information.

+ +

Position start at 0. So cell C4 is on column 2. Alphabetical position +like "C" is accepted.

+ +

Arguments:

+ +
x -- int or str
+
+column -- Column
+
+
+ + +
+
+ +
+ + def + append_column( self, column: Column | None = None, _repeated: int | None = None) -> Column: + + + +
+ +
2289    def append_column(
+2290        self,
+2291        column: Column | None = None,
+2292        _repeated: int | None = None,
+2293    ) -> Column:
+2294        """Append the column at the end of the table. If no column is given,
+2295        an empty one is created.
+2296
+2297        ODF columns don't contain cells, only style information.
+2298
+2299        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2300        like "C" is accepted.
+2301
+2302        Arguments:
+2303
+2304            column -- Column
+2305        """
+2306        if column is None:
+2307            column = Column()
+2308        else:
+2309            column = column.clone
+2310        if not self._cmap:
+2311            position = 0
+2312        else:
+2313            odf_idx = len(self._cmap) - 1
+2314            last_column = self._get_element_idx2(_xpath_column_idx, odf_idx)
+2315            if last_column is None:
+2316                raise ValueError
+2317            position = self.index(last_column) + 1
+2318        column.x = self.width
+2319        self.insert(column, position=position)
+2320        # Repetitions are accepted
+2321        if _repeated is None:
+2322            _repeated = column.repeated or 1
+2323        self._cmap = insert_map_once(self._cmap, len(self._cmap), _repeated)
+2324        # No need to update row widths
+2325        return column
+
+ + +

Append the column at the end of the table. If no column is given, +an empty one is created.

+ +

ODF columns don't contain cells, only style information.

+ +

Position start at 0. So cell C4 is on column 2. Alphabetical position +like "C" is accepted.

+ +

Arguments:

+ +
column -- Column
+
+
+ + +
+
+ +
+ + def + delete_column(self, x: int | str) -> None: + + + +
+ +
2327    def delete_column(self, x: int | str) -> None:
+2328        """Delete the column at the given position. ODF columns don't contain
+2329        cells, only style information.
+2330
+2331        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2332        like "C" is accepted.
+2333
+2334        Arguments:
+2335
+2336            x -- int or str
+2337        """
+2338        x = self._translate_x_from_any(x)
+2339        # Outside the defined table
+2340        if x >= self.width:
+2341            return
+2342        # Inside the defined table
+2343        delete_item_in_vault(x, self, _xpath_column_idx, "_cmap")
+2344        # Update width
+2345        width = self.width
+2346        for row in self._get_rows():
+2347            if row.width >= width:
+2348                row.delete_cell(x)
+
+ + +

Delete the column at the given position. ODF columns don't contain +cells, only style information.

+ +

Position start at 0. So cell C4 is on column 2. Alphabetical position +like "C" is accepted.

+ +

Arguments:

+ +
x -- int or str
+
+
+ + +
+
+ +
+ + def + get_column_cells( self, x: int | str, style: str | None = None, content: str | None = None, cell_type: str | None = None, complete: bool = False) -> list[Cell | None]: + + + +
+ +
2350    def get_column_cells(  # noqa: C901
+2351        self,
+2352        x: int | str,
+2353        style: str | None = None,
+2354        content: str | None = None,
+2355        cell_type: str | None = None,
+2356        complete: bool = False,
+2357    ) -> list[Cell | None]:
+2358        """Get the list of cells at the given position.
+2359
+2360        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2361        like "C" is accepted.
+2362
+2363        Filter by cell_type, with cell_type 'all' will retrieve cells of any
+2364        type, aka non empty cells.
+2365
+2366        If complete is True, replace missing values by None.
+2367
+2368        Arguments:
+2369
+2370            x -- int or str
+2371
+2372            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+2373                         'currency', 'percentage' or 'all'
+2374
+2375            content -- str regex
+2376
+2377            style -- str
+2378
+2379            complete -- boolean
+2380
+2381        Return: list of Cell
+2382        """
+2383        x = self._translate_x_from_any(x)
+2384        if cell_type:
+2385            cell_type = cell_type.lower().strip()
+2386        cells: list[Cell | None] = []
+2387        if not style and not content and not cell_type:
+2388            for row in self.traverse():
+2389                cells.append(row.get_cell(x, clone=True))
+2390            return cells
+2391        for row in self.traverse():
+2392            cell = row.get_cell(x, clone=True)
+2393            if cell is None:
+2394                raise ValueError
+2395            # Filter the cells by cell_type
+2396            if cell_type:
+2397                ctype = cell.type
+2398                if not ctype or not (ctype == cell_type or cell_type == "all"):
+2399                    if complete:
+2400                        cells.append(None)
+2401                    continue
+2402            # Filter the cells with the regex
+2403            if content and not cell.match(content):
+2404                if complete:
+2405                    cells.append(None)
+2406                continue
+2407            # Filter the cells with the style
+2408            if style and style != cell.style:
+2409                if complete:
+2410                    cells.append(None)
+2411                continue
+2412            cells.append(cell)
+2413        return cells
+
+ + +

Get the list of cells at the given position.

+ +

Position start at 0. So cell C4 is on column 2. Alphabetical position +like "C" is accepted.

+ +

Filter by cell_type, with cell_type 'all' will retrieve cells of any +type, aka non empty cells.

+ +

If complete is True, replace missing values by None.

+ +

Arguments:

+ +
x -- int or str
+
+cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+             'currency', 'percentage' or 'all'
+
+content -- str regex
+
+style -- str
+
+complete -- boolean
+
+ +

Return: list of Cell

+
+ + +
+
+ +
+ + def + get_column_values( self, x: int | str, cell_type: str | None = None, complete: bool = True, get_type: bool = False) -> list[typing.Any]: + + + +
+ +
2415    def get_column_values(
+2416        self,
+2417        x: int | str,
+2418        cell_type: str | None = None,
+2419        complete: bool = True,
+2420        get_type: bool = False,
+2421    ) -> list[Any]:
+2422        """Shortcut to get the list of Python values for the cells at the
+2423        given position.
+2424
+2425        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2426        like "C" is accepted.
+2427
+2428        Filter by cell_type, with cell_type 'all' will retrieve cells of any
+2429        type, aka non empty cells.
+2430        If cell_type and complete is True, replace missing values by None.
+2431
+2432        If get_type is True, returns a tuple (value, ODF type of value)
+2433
+2434        Arguments:
+2435
+2436            x -- int or str
+2437
+2438            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+2439                         'currency', 'percentage' or 'all'
+2440
+2441            complete -- boolean
+2442
+2443            get_type -- boolean
+2444
+2445        Return: list of Python types
+2446        """
+2447        cells = self.get_column_cells(
+2448            x, style=None, content=None, cell_type=cell_type, complete=complete
+2449        )
+2450        values: list[Any] = []
+2451        for cell in cells:
+2452            if cell is None:
+2453                if complete:
+2454                    if get_type:
+2455                        values.append((None, None))
+2456                    else:
+2457                        values.append(None)
+2458                continue
+2459            if cell_type:
+2460                ctype = cell.type
+2461                if not ctype or not (ctype == cell_type or cell_type == "all"):
+2462                    if complete:
+2463                        if get_type:
+2464                            values.append((None, None))
+2465                        else:
+2466                            values.append(None)
+2467                    continue
+2468            values.append(cell.get_value(get_type=get_type))
+2469        return values
+
+ + +

Shortcut to get the list of Python values for the cells at the +given position.

+ +

Position start at 0. So cell C4 is on column 2. Alphabetical position +like "C" is accepted.

+ +

Filter by cell_type, with cell_type 'all' will retrieve cells of any +type, aka non empty cells. +If cell_type and complete is True, replace missing values by None.

+ +

If get_type is True, returns a tuple (value, ODF type of value)

+ +

Arguments:

+ +
x -- int or str
+
+cell_type -- 'boolean', 'float', 'date', 'string', 'time',
+             'currency', 'percentage' or 'all'
+
+complete -- boolean
+
+get_type -- boolean
+
+ +

Return: list of Python types

+
+ + +
+
+ +
+ + def + set_column_cells(self, x: int | str, cells: list[Cell]) -> None: + + + +
+ +
2471    def set_column_cells(self, x: int | str, cells: list[Cell]) -> None:
+2472        """Shortcut to set the list of cells at the given position.
+2473
+2474        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2475        like "C" is accepted.
+2476
+2477        The list must have the same length than the table height.
+2478
+2479        Arguments:
+2480
+2481            x -- int or str
+2482
+2483            cells -- list of Cell
+2484        """
+2485        height = self.height
+2486        if len(cells) != height:
+2487            raise ValueError(f"col mismatch: {height} cells expected")
+2488        cells_iterator = iter(cells)
+2489        for y, row in enumerate(self.traverse()):
+2490            row.set_cell(x, next(cells_iterator))
+2491            self.set_row(y, row)
+
+ + +

Shortcut to set the list of cells at the given position.

+ +

Position start at 0. So cell C4 is on column 2. Alphabetical position +like "C" is accepted.

+ +

The list must have the same length than the table height.

+ +

Arguments:

+ +
x -- int or str
+
+cells -- list of Cell
+
+
+ + +
+
+ +
+ + def + set_column_values( self, x: int | str, values: list, cell_type: str | None = None, currency: str | None = None, style: str | None = None) -> None: + + + +
+ +
2493    def set_column_values(
+2494        self,
+2495        x: int | str,
+2496        values: list,
+2497        cell_type: str | None = None,
+2498        currency: str | None = None,
+2499        style: str | None = None,
+2500    ) -> None:
+2501        """Shortcut to set the list of Python values of cells at the given
+2502        position.
+2503
+2504        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2505        like "C" is accepted.
+2506
+2507        The list must have the same length than the table height.
+2508
+2509        Arguments:
+2510
+2511            x -- int or str
+2512
+2513            values -- list of Python types
+2514
+2515            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+2516                         'string' or 'time'
+2517
+2518            currency -- three-letter str
+2519
+2520            style -- str
+2521        """
+2522        cells = [
+2523            Cell(value, cell_type=cell_type, currency=currency, style=style)
+2524            for value in values
+2525        ]
+2526        self.set_column_cells(x, cells)
+
+ + +

Shortcut to set the list of Python values of cells at the given +position.

+ +

Position start at 0. So cell C4 is on column 2. Alphabetical position +like "C" is accepted.

+ +

The list must have the same length than the table height.

+ +

Arguments:

+ +
x -- int or str
+
+values -- list of Python types
+
+cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
+             'string' or 'time'
+
+currency -- three-letter str
+
+style -- str
+
+
+ + +
+
+ +
+ + def + is_column_empty(self, x: int | str, aggressive: bool = False) -> bool: + + + +
+ +
2528    def is_column_empty(self, x: int | str, aggressive: bool = False) -> bool:
+2529        """Return wether every cell in the column at "x" position has no value
+2530        or the value evaluates to False (empty string), and no style.
+2531
+2532        Position start at 0. So cell C4 is on column 2. Alphabetical position
+2533        like "C" is accepted.
+2534
+2535        If aggressive is True, empty cells with style are considered empty.
+2536
+2537        Return: bool
+2538        """
+2539        for cell in self.get_column_cells(x):
+2540            if cell is None:
+2541                continue
+2542            if not cell.is_empty(aggressive=aggressive):
+2543                return False
+2544        return True
+
+ + +

Return wether every cell in the column at "x" position has no value +or the value evaluates to False (empty string), and no style.

+ +

Position start at 0. So cell C4 is on column 2. Alphabetical position +like "C" is accepted.

+ +

If aggressive is True, empty cells with style are considered empty.

+ +

Return: bool

+
+ + +
+
+ +
+ + def + get_named_ranges( self, table_name: str | list[str] | None = None) -> list[NamedRange]: + + + +
+ +
2548    def get_named_ranges(  # type: ignore
+2549        self,
+2550        table_name: str | list[str] | None = None,
+2551    ) -> list[NamedRange]:
+2552        """Returns the list of available Name Ranges of the spreadsheet. If
+2553        table_name is provided, limits the search to these tables.
+2554        Beware : named ranges are stored at the body level, thus do not call
+2555        this method on a cloned table.
+2556
+2557        Arguments:
+2558
+2559            table_names -- str or list of str, names of tables
+2560
+2561        Return : list of table_range
+2562        """
+2563        body = self.document_body
+2564        if not body:
+2565            return []
+2566        all_named_ranges = body.get_named_ranges()
+2567        if not table_name:
+2568            return all_named_ranges  # type:ignore
+2569        filter_ = []
+2570        if isinstance(table_name, str):
+2571            filter_.append(table_name)
+2572        elif isiterable(table_name):
+2573            filter_.extend(table_name)
+2574        else:
+2575            raise ValueError(
+2576                f"table_name must be string or Iterable, not {type(table_name)}"
+2577            )
+2578        return [
+2579            nr for nr in all_named_ranges if nr.table_name in filter_  # type:ignore
+2580        ]
+
+ + +

Returns the list of available Name Ranges of the spreadsheet. If +table_name is provided, limits the search to these tables. +Beware : named ranges are stored at the body level, thus do not call +this method on a cloned table.

+ +

Arguments:

+ +
table_names -- str or list of str, names of tables
+
+ +

Return : list of table_range

+
+ + +
+
+ +
+ + def + get_named_range(self, name: str) -> NamedRange: + + + +
+ +
2582    def get_named_range(self, name: str) -> NamedRange:
+2583        """Returns the Name Ranges of the specified name. If
+2584        table_name is provided, limits the search to these tables.
+2585        Beware : named ranges are stored at the body level, thus do not call
+2586        this method on a cloned table.
+2587
+2588        Arguments:
+2589
+2590            name -- str, name of the named range object
+2591
+2592        Return : NamedRange
+2593        """
+2594        body = self.document_body
+2595        if not body:
+2596            raise ValueError("Table is not inside a document")
+2597        return body.get_named_range(name)  # type: ignore
+
+ + +

Returns the Name Ranges of the specified name. If +table_name is provided, limits the search to these tables. +Beware : named ranges are stored at the body level, thus do not call +this method on a cloned table.

+ +

Arguments:

+ +
name -- str, name of the named range object
+
+ +

Return : NamedRange

+
+ + +
+
+ +
+ + def + set_named_range( self, name: str, crange: str | tuple | list, table_name: str | None = None, usage: str | None = None) -> None: + + + +
+ +
2599    def set_named_range(
+2600        self,
+2601        name: str,
+2602        crange: str | tuple | list,
+2603        table_name: str | None = None,
+2604        usage: str | None = None,
+2605    ) -> None:
+2606        """Create a Named Range element and insert it in the document.
+2607        Beware : named ranges are stored at the body level, thus do not call
+2608        this method on a cloned table.
+2609
+2610        Arguments:
+2611
+2612            name -- str, name of the named range
+2613
+2614            crange -- str or tuple of int, cell or area coordinate
+2615
+2616            table_name -- str, name of the table
+2617
+2618            uage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
+2619        """
+2620        body = self.document_body
+2621        if not body:
+2622            raise ValueError("Table is not inside a document")
+2623        if not name:
+2624            raise ValueError("Name required.")
+2625        if table_name is None:
+2626            table_name = self.name
+2627        named_range = NamedRange(name, crange, table_name, usage)
+2628        body.append_named_range(named_range)
+
+ + +

Create a Named Range element and insert it in the document. +Beware : named ranges are stored at the body level, thus do not call +this method on a cloned table.

+ +

Arguments:

+ +
name -- str, name of the named range
+
+crange -- str or tuple of int, cell or area coordinate
+
+table_name -- str, name of the table
+
+uage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
+
+
+ + +
+
+ +
+ + def + delete_named_range(self, name: str) -> None: + + + +
+ +
2630    def delete_named_range(self, name: str) -> None:
+2631        """Delete the Named Range of specified name from the spreadsheet.
+2632        Beware : named ranges are stored at the body level, thus do not call
+2633        this method on a cloned table.
+2634
+2635        Arguments:
+2636
+2637            name -- str
+2638        """
+2639        name = name.strip()
+2640        if not name:
+2641            raise ValueError("Name required.")
+2642        body = self.document_body
+2643        if not body:
+2644            raise ValueError("Table is not inside a document.")
+2645        body.delete_named_range(name)
+
+ + +

Delete the Named Range of specified name from the spreadsheet. +Beware : named ranges are stored at the body level, thus do not call +this method on a cloned table.

+ +

Arguments:

+ +
name -- str
+
+
+ + +
+
+ +
+ + def + set_span(self, area: str | tuple | list, merge: bool = False) -> bool: + + + +
+ +
2651    def set_span(  # noqa: C901
+2652        self,
+2653        area: str | tuple | list,
+2654        merge: bool = False,
+2655    ) -> bool:
+2656        """Create a Cell Span : span the first cell of the area on several
+2657        columns and/or rows.
+2658        If merge is True, replace text of the cell by the concatenation of
+2659        existing text in covered cells.
+2660        Beware : if merge is True, old text is changed, if merge is False
+2661        (the default), old text in coverd cells is still present but not
+2662        displayed by most GUI.
+2663
+2664        If the area defines only one cell, the set span will do nothing.
+2665        It is not allowed to apply set span to an area whose one cell already
+2666        belongs to previous cell span.
+2667
+2668        Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
+2669        be provided as an alpha numeric value like "A1:B2' or a tuple like
+2670        (0, 0, 1, 1) or (0, 0).
+2671
+2672        Arguments:
+2673
+2674            area -- str or tuple of int, cell or area coordinate
+2675
+2676            merge -- boolean
+2677        """
+2678        # get area
+2679        digits = convert_coordinates(area)
+2680        if len(digits) == 4:
+2681            x, y, z, t = digits
+2682        else:
+2683            x, y = digits
+2684            z, t = digits
+2685        start = x, y
+2686        end = z, t
+2687        if start == end:
+2688            # one cell : do nothing
+2689            return False
+2690        if x is None:
+2691            raise ValueError
+2692        if y is None:
+2693            raise ValueError
+2694        if z is None:
+2695            raise ValueError
+2696        if t is None:
+2697            raise ValueError
+2698        # check for previous span
+2699        good = True
+2700        # Check boundaries and empty cells : need to crate non existent cells
+2701        # so don't use get_cells directly, but get_cell
+2702        cells = []
+2703        for yy in range(y, t + 1):
+2704            row_cells = []
+2705            for xx in range(x, z + 1):
+2706                row_cells.append(
+2707                    self.get_cell((xx, yy), clone=True, keep_repeated=False)
+2708                )
+2709            cells.append(row_cells)
+2710        for row in cells:
+2711            for cell in row:
+2712                if cell._is_spanned():
+2713                    good = False
+2714                    break
+2715            if not good:
+2716                break
+2717        if not good:
+2718            return False
+2719        # Check boundaries
+2720        # if z >= self.width or t >= self.height:
+2721        #    self.set_cell(coord = end)
+2722        #    print area, z, t
+2723        #    cells = self.get_cells((x, y, z, t))
+2724        #    print cells
+2725        # do it:
+2726        if merge:
+2727            val_list = []
+2728            for row in cells:
+2729                for cell in row:
+2730                    if cell.is_empty(aggressive=True):
+2731                        continue
+2732                    val = cell.get_value()
+2733                    if val is not None:
+2734                        if isinstance(val, str):
+2735                            val.strip()
+2736                        if val != "":
+2737                            val_list.append(val)
+2738                        cell.clear()
+2739            if val_list:
+2740                if len(val_list) == 1:
+2741                    cells[0][0].set_value(val_list[0])
+2742                else:
+2743                    value = " ".join([str(v) for v in val_list if v])
+2744                    cells[0][0].set_value(value)
+2745        cols = z - x + 1
+2746        cells[0][0].set_attribute("table:number-columns-spanned", str(cols))
+2747        rows = t - y + 1
+2748        cells[0][0].set_attribute("table:number-rows-spanned", str(rows))
+2749        for cell in cells[0][1:]:
+2750            cell.tag = "table:covered-table-cell"
+2751        for row in cells[1:]:
+2752            for cell in row:
+2753                cell.tag = "table:covered-table-cell"
+2754        # replace cells in table
+2755        self.set_cells(cells, coord=start, clone=False)
+2756        return True
+
+ + +

Create a Cell Span : span the first cell of the area on several +columns and/or rows. +If merge is True, replace text of the cell by the concatenation of +existing text in covered cells. +Beware : if merge is True, old text is changed, if merge is False +(the default), old text in coverd cells is still present but not +displayed by most GUI.

+ +

If the area defines only one cell, the set span will do nothing. +It is not allowed to apply set span to an area whose one cell already +belongs to previous cell span.

+ +

Area can be either one cell (like 'A1') or an area ('A1:B2'). It can +be provided as an alpha numeric value like "A1:B2' or a tuple like +(0, 0, 1, 1) or (0, 0).

+ +

Arguments:

+ +
area -- str or tuple of int, cell or area coordinate
+
+merge -- boolean
+
+
+ + +
+
+ +
+ + def + del_span(self, area: str | tuple | list) -> bool: + + + +
+ +
2758    def del_span(self, area: str | tuple | list) -> bool:
+2759        """Delete a Cell Span. 'area' is the cell coordiante of the upper left
+2760        cell of the spanned area.
+2761
+2762        Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
+2763        be provided as an alpha numeric value like "A1:B2' or a tuple like
+2764        (0, 0, 1, 1) or (0, 0). If an area is provided, the upper left cell
+2765        is used.
+2766
+2767        Arguments:
+2768
+2769            area -- str or tuple of int, cell or area coordinate
+2770        """
+2771        # get area
+2772        digits = convert_coordinates(area)
+2773        if len(digits) == 4:
+2774            x, y, _z, _t = digits
+2775        else:
+2776            x, y = digits
+2777        if x is None:
+2778            raise ValueError
+2779        if y is None:
+2780            raise ValueError
+2781        start = x, y
+2782        # check for previous span
+2783        cell0 = self.get_cell(start)
+2784        nb_cols = cell0.get_attribute_integer("table:number-columns-spanned")
+2785        if nb_cols is None:
+2786            return False
+2787        nb_rows = cell0.get_attribute_integer("table:number-rows-spanned")
+2788        if nb_rows is None:
+2789            return False
+2790        z = x + nb_cols - 1
+2791        t = y + nb_rows - 1
+2792        cells = self.get_cells((x, y, z, t))
+2793        cells[0][0].del_attribute("table:number-columns-spanned")
+2794        cells[0][0].del_attribute("table:number-rows-spanned")
+2795        for cell in cells[0][1:]:
+2796            cell.tag = "table:table-cell"
+2797        for row in cells[1:]:
+2798            for cell in row:
+2799                cell.tag = "table:table-cell"
+2800        # replace cells in table
+2801        self.set_cells(cells, coord=start, clone=False)
+2802        return True
+
+ + +

Delete a Cell Span. 'area' is the cell coordiante of the upper left +cell of the spanned area.

+ +

Area can be either one cell (like 'A1') or an area ('A1:B2'). It can +be provided as an alpha numeric value like "A1:B2' or a tuple like +(0, 0, 1, 1) or (0, 0). If an area is provided, the upper left cell +is used.

+ +

Arguments:

+ +
area -- str or tuple of int, cell or area coordinate
+
+
+ + +
+
+ +
+ + def + to_csv( self, path_or_file: str | pathlib.Path | None = None, dialect: str = 'excel') -> Any: + + + +
+ +
2806    def to_csv(
+2807        self,
+2808        path_or_file: str | Path | None = None,
+2809        dialect: str = "excel",
+2810    ) -> Any:
+2811        """Write the table as CSV in the file.
+2812
+2813        If the file is a string, it is opened as a local path. Else an
+2814        opened file-like is expected.
+2815
+2816        Arguments:
+2817
+2818            path_or_file -- str or file-like
+2819
+2820            dialect -- str, python csv.dialect, can be 'excel', 'unix'...
+2821        """
+2822
+2823        def write_content(csv_writer: object) -> None:
+2824            for values in self.iter_values():
+2825                line = []
+2826                for value in values:
+2827                    if value is None:
+2828                        value = ""
+2829                    if isinstance(value, str):
+2830                        value = value.strip()
+2831                    line.append(value)
+2832                csv_writer.writerow(line)  # type: ignore
+2833
+2834        out = StringIO(newline="")
+2835        csv_writer = csv.writer(out, dialect=dialect)
+2836        write_content(csv_writer)
+2837        if path_or_file is None:
+2838            return out.getvalue()
+2839        path = Path(path_or_file)
+2840        path.write_text(out.getvalue())
+2841        return None
+
+ + +

Write the table as CSV in the file.

+ +

If the file is a string, it is opened as a local path. Else an +opened file-like is expected.

+ +

Arguments:

+ +
path_or_file -- str or file-like
+
+dialect -- str, python csv.dialect, can be 'excel', 'unix'...
+
+
+ + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
get_between
+
insert
+
extend
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
append_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + Text(builtins.str): + + + +
+ +
273class Text(str):
+274    """Representation of an XML text node. Created to hide the specifics of
+275    lxml in searching text nodes using XPath.
+276
+277    Constructed like any str object but only accepts lxml text objects.
+278    """
+279
+280    # There's some black magic in inheriting from str
+281    def __init__(
+282        self,
+283        text_result: _ElementUnicodeResult | _ElementStringResult,
+284    ) -> None:
+285        self.__parent = text_result.getparent()
+286        self.__is_text = text_result.is_text
+287        self.__is_tail = text_result.is_tail
+288
+289    @property
+290    def parent(self) -> Element | None:
+291        parent = self.__parent
+292        # XXX happens just because of the unit test
+293        if parent is None:
+294            return None
+295        return Element.from_tag(tag_or_elem=parent)
+296
+297    def is_text(self) -> bool:
+298        return self.__is_text
+299
+300    def is_tail(self) -> bool:
+301        return self.__is_tail
+
+ + +

Representation of an XML text node. Created to hide the specifics of +lxml in searching text nodes using XPath.

+ +

Constructed like any str object but only accepts lxml text objects.

+
+ + +
+ +
+ + Text( text_result: lxml.etree._ElementUnicodeResult | lxml.etree._ElementStringResult) + + + +
+ +
281    def __init__(
+282        self,
+283        text_result: _ElementUnicodeResult | _ElementStringResult,
+284    ) -> None:
+285        self.__parent = text_result.getparent()
+286        self.__is_text = text_result.is_text
+287        self.__is_tail = text_result.is_tail
+
+ + + + +
+
+ +
+ parent: Element | None + + + +
+ +
289    @property
+290    def parent(self) -> Element | None:
+291        parent = self.__parent
+292        # XXX happens just because of the unit test
+293        if parent is None:
+294            return None
+295        return Element.from_tag(tag_or_elem=parent)
+
+ + + + +
+
+ +
+ + def + is_text(self) -> bool: + + + +
+ +
297    def is_text(self) -> bool:
+298        return self.__is_text
+
+ + + + +
+
+ +
+ + def + is_tail(self) -> bool: + + + +
+ +
300    def is_tail(self) -> bool:
+301        return self.__is_tail
+
+ + + + +
+
+
Inherited Members
+
+
builtins.str
+
encode
+
replace
+
split
+
rsplit
+
join
+
capitalize
+
casefold
+
title
+
center
+
count
+
expandtabs
+
find
+
partition
+
index
+
ljust
+
lower
+
lstrip
+
rfind
+
rindex
+
rjust
+
rstrip
+
rpartition
+
splitlines
+
strip
+
swapcase
+
translate
+
upper
+
startswith
+
endswith
+
removeprefix
+
removesuffix
+
isascii
+
islower
+
isupper
+
istitle
+
isspace
+
isdecimal
+
isdigit
+
isnumeric
+
isalpha
+
isalnum
+
isidentifier
+
isprintable
+
zfill
+
format
+
format_map
+
maketrans
+ +
+
+
+
+
+ +
+ + class + TextChange(odfdo.Element): + + + +
+ +
508class TextChange(Element):
+509    """The TextChange "text:change" element marks a position in an empty
+510    region where text has been deleted.
+511    """
+512
+513    _tag = "text:change"
+514
+515    def get_id(self) -> str | None:
+516        return self.get_attribute_string("text:change-id")
+517
+518    def set_id(self, idx: str) -> None:
+519        self.set_attribute("text:change-id", idx)
+520
+521    def _get_tracked_changes(self) -> Element | None:
+522        body = self.document_body
+523        if not body:
+524            raise ValueError
+525        return body.get_tracked_changes()
+526
+527    def get_changed_region(
+528        self,
+529        tracked_changes: Element | None = None,
+530    ) -> Element | None:
+531        if not tracked_changes:
+532            tracked_changes = self._get_tracked_changes()
+533        idx = self.get_id()
+534        return tracked_changes.get_changed_region(text_id=idx)  # type: ignore
+535
+536    def get_change_info(
+537        self,
+538        tracked_changes: Element | None = None,
+539    ) -> Element | None:
+540        changed_region = self.get_changed_region(tracked_changes=tracked_changes)
+541        if not changed_region:
+542            return None
+543        return changed_region.get_change_info()  # type: ignore
+544
+545    def get_change_element(
+546        self,
+547        tracked_changes: Element | None = None,
+548    ) -> Element | None:
+549        changed_region = self.get_changed_region(tracked_changes=tracked_changes)
+550        if not changed_region:
+551            return None
+552        return changed_region.get_change_element()  # type: ignore
+553
+554    def get_deleted(
+555        self,
+556        tracked_changes: Element | None = None,
+557        as_text: bool = False,
+558        no_header: bool = False,
+559        clean: bool = True,
+560    ) -> Element | None:
+561        """Shortcut to get the deleted informations stored in the
+562        TextDeletion stored in the tracked changes.
+563
+564        Return: Paragraph (or None)."
+565        """
+566        changed = self.get_change_element(tracked_changes=tracked_changes)
+567        if not changed:
+568            return None
+569        return changed.get_deleted(  # type: ignore
+570            as_text=as_text,
+571            no_header=no_header,
+572            clean=clean,
+573        )
+574
+575    def get_inserted(
+576        self,
+577        as_text: bool = False,
+578        no_header: bool = False,
+579        clean: bool = True,
+580    ) -> str | Element | list[Element] | None:
+581        """Return None."""
+582        return None
+583
+584    def get_start(self) -> TextChangeStart | None:
+585        """Return None."""
+586        return None
+587
+588    def get_end(self) -> TextChangeEnd | None:
+589        """Return None."""
+590        return None
+
+ + +

The TextChange "text:change" element marks a position in an empty +region where text has been deleted.

+
+ + +
+ +
+ + def + get_id(self) -> str | None: + + + +
+ +
515    def get_id(self) -> str | None:
+516        return self.get_attribute_string("text:change-id")
+
+ + + + +
+
+ +
+ + def + set_id(self, idx: str) -> None: + + + +
+ +
518    def set_id(self, idx: str) -> None:
+519        self.set_attribute("text:change-id", idx)
+
+ + + + +
+
+ +
+ + def + get_changed_region( self, tracked_changes: Element | None = None) -> Element | None: + + + +
+ +
527    def get_changed_region(
+528        self,
+529        tracked_changes: Element | None = None,
+530    ) -> Element | None:
+531        if not tracked_changes:
+532            tracked_changes = self._get_tracked_changes()
+533        idx = self.get_id()
+534        return tracked_changes.get_changed_region(text_id=idx)  # type: ignore
+
+ + + + +
+
+ +
+ + def + get_change_info( self, tracked_changes: Element | None = None) -> Element | None: + + + +
+ +
536    def get_change_info(
+537        self,
+538        tracked_changes: Element | None = None,
+539    ) -> Element | None:
+540        changed_region = self.get_changed_region(tracked_changes=tracked_changes)
+541        if not changed_region:
+542            return None
+543        return changed_region.get_change_info()  # type: ignore
+
+ + + + +
+
+ +
+ + def + get_change_element( self, tracked_changes: Element | None = None) -> Element | None: + + + +
+ +
545    def get_change_element(
+546        self,
+547        tracked_changes: Element | None = None,
+548    ) -> Element | None:
+549        changed_region = self.get_changed_region(tracked_changes=tracked_changes)
+550        if not changed_region:
+551            return None
+552        return changed_region.get_change_element()  # type: ignore
+
+ + + + +
+
+ +
+ + def + get_deleted( self, tracked_changes: Element | None = None, as_text: bool = False, no_header: bool = False, clean: bool = True) -> Element | None: + + + +
+ +
554    def get_deleted(
+555        self,
+556        tracked_changes: Element | None = None,
+557        as_text: bool = False,
+558        no_header: bool = False,
+559        clean: bool = True,
+560    ) -> Element | None:
+561        """Shortcut to get the deleted informations stored in the
+562        TextDeletion stored in the tracked changes.
+563
+564        Return: Paragraph (or None)."
+565        """
+566        changed = self.get_change_element(tracked_changes=tracked_changes)
+567        if not changed:
+568            return None
+569        return changed.get_deleted(  # type: ignore
+570            as_text=as_text,
+571            no_header=no_header,
+572            clean=clean,
+573        )
+
+ + +

Shortcut to get the deleted informations stored in the +TextDeletion stored in the tracked changes.

+ +

Return: Paragraph (or None)."

+
+ + +
+
+ +
+ + def + get_inserted( self, as_text: bool = False, no_header: bool = False, clean: bool = True) -> str | Element | list[Element] | None: + + + +
+ +
575    def get_inserted(
+576        self,
+577        as_text: bool = False,
+578        no_header: bool = False,
+579        clean: bool = True,
+580    ) -> str | Element | list[Element] | None:
+581        """Return None."""
+582        return None
+
+ + +

Return None.

+
+ + +
+
+ +
+ + def + get_start(self) -> TextChangeStart | None: + + + +
+ +
584    def get_start(self) -> TextChangeStart | None:
+585        """Return None."""
+586        return None
+
+ + +

Return None.

+
+ + +
+
+ +
+ + def + get_end(self) -> TextChangeEnd | None: + + + +
+ +
588    def get_end(self) -> TextChangeEnd | None:
+589        """Return None."""
+590        return None
+
+ + +

Return None.

+
+ + +
+
+
Inherited Members
+
+
Element
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + TextChangeEnd(odfdo.TextChange): + + + +
+ +
593class TextChangeEnd(TextChange):
+594    """The TextChangeEnd "text:change-end" element marks the end of a region
+595    with content where text has been inserted or the format has been
+596    changed.
+597    """
+598
+599    _tag = "text:change-end"
+600
+601    def get_start(self) -> TextChangeStart | None:
+602        """Return the corresponding annotation starting tag or None."""
+603        idx = self.get_id()
+604        parent = self.parent
+605        if parent is None:
+606            raise ValueError("Can not find end tag: no parent available.")
+607        body = self.document_body
+608        if not body:
+609            body = self.root
+610        return body.get_text_change_start(idx=idx)  # type: ignore
+611
+612    def get_end(self) -> TextChangeEnd | None:
+613        """Return self."""
+614        return self
+615
+616    def get_deleted(self, *args: Any, **kwargs: Any) -> Element | None:
+617        """Return None."""
+618        return None
+619
+620    def get_inserted(
+621        self,
+622        as_text: bool = False,
+623        no_header: bool = False,
+624        clean: bool = True,
+625    ) -> str | Element | list[Element] | None:
+626        """Return the content between text:change-start and text:change-end.
+627
+628        If no content exists (deletion tag), returns None (or '' if text flag
+629        is True).
+630        If as_text is True: returns the text content.
+631        If clean is True: suppress unwanted tags (deletions marks, ...)
+632        If no_header is True: existing text:h are changed in text:p
+633        By default: returns a list of Element, cleaned and with headers
+634
+635        Arguments:
+636
+637            as_text -- boolean
+638
+639            clean -- boolean
+640
+641            no_header -- boolean
+642
+643        Return: list or Element or text
+644        """
+645
+646        # idx = self.get_id()
+647        start = self.get_start()
+648        end = self.get_end()
+649        if end is None or start is None:
+650            if as_text:
+651                return ""
+652            return None
+653        body = self.document_body
+654        if not body:
+655            body = self.root
+656        return body.get_between(
+657            start, end, as_text=as_text, no_header=no_header, clean=clean
+658        )
+
+ + +

The TextChangeEnd "text:change-end" element marks the end of a region +with content where text has been inserted or the format has been +changed.

+
+ + +
+ +
+ + def + get_start(self) -> TextChangeStart | None: + + + +
+ +
601    def get_start(self) -> TextChangeStart | None:
+602        """Return the corresponding annotation starting tag or None."""
+603        idx = self.get_id()
+604        parent = self.parent
+605        if parent is None:
+606            raise ValueError("Can not find end tag: no parent available.")
+607        body = self.document_body
+608        if not body:
+609            body = self.root
+610        return body.get_text_change_start(idx=idx)  # type: ignore
+
+ + +

Return the corresponding annotation starting tag or None.

+
+ + +
+
+ +
+ + def + get_end(self) -> TextChangeEnd | None: + + + +
+ +
612    def get_end(self) -> TextChangeEnd | None:
+613        """Return self."""
+614        return self
+
+ + +

Return self.

+
+ + +
+
+ +
+ + def + get_deleted(self, *args: Any, **kwargs: Any) -> Element | None: + + + +
+ +
616    def get_deleted(self, *args: Any, **kwargs: Any) -> Element | None:
+617        """Return None."""
+618        return None
+
+ + +

Return None.

+
+ + +
+
+ +
+ + def + get_inserted( self, as_text: bool = False, no_header: bool = False, clean: bool = True) -> str | Element | list[Element] | None: + + + +
+ +
620    def get_inserted(
+621        self,
+622        as_text: bool = False,
+623        no_header: bool = False,
+624        clean: bool = True,
+625    ) -> str | Element | list[Element] | None:
+626        """Return the content between text:change-start and text:change-end.
+627
+628        If no content exists (deletion tag), returns None (or '' if text flag
+629        is True).
+630        If as_text is True: returns the text content.
+631        If clean is True: suppress unwanted tags (deletions marks, ...)
+632        If no_header is True: existing text:h are changed in text:p
+633        By default: returns a list of Element, cleaned and with headers
+634
+635        Arguments:
+636
+637            as_text -- boolean
+638
+639            clean -- boolean
+640
+641            no_header -- boolean
+642
+643        Return: list or Element or text
+644        """
+645
+646        # idx = self.get_id()
+647        start = self.get_start()
+648        end = self.get_end()
+649        if end is None or start is None:
+650            if as_text:
+651                return ""
+652            return None
+653        body = self.document_body
+654        if not body:
+655            body = self.root
+656        return body.get_between(
+657            start, end, as_text=as_text, no_header=no_header, clean=clean
+658        )
+
+ + +

Return the content between text:change-start and text:change-end.

+ +

If no content exists (deletion tag), returns None (or '' if text flag +is True). +If as_text is True: returns the text content. +If clean is True: suppress unwanted tags (deletions marks, ...) +If no_header is True: existing text:h are changed in text:p +By default: returns a list of Element, cleaned and with headers

+ +

Arguments:

+ +
as_text -- boolean
+
+clean -- boolean
+
+no_header -- boolean
+
+ +

Return: list or Element or text

+
+ + +
+
+
Inherited Members
+
+
Element
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+ +
+
+
+
+ +
+ + class + TextChangeStart(odfdo.TextChangeEnd): + + + +
+ +
661class TextChangeStart(TextChangeEnd):
+662    """The TextChangeStart "text:change-start" element marks the start of a
+663    region with content where text has been inserted or the format has
+664    been changed.
+665    """
+666
+667    _tag = "text:change-start"
+668
+669    def get_start(self) -> TextChangeStart:
+670        """Return self."""
+671        return self
+672
+673    def get_end(self) -> TextChangeEnd:
+674        """Return the corresponding change-end tag or None."""
+675        idx = self.get_id()
+676        parent = self.parent
+677        if parent is None:
+678            raise ValueError("Can not find end tag: no parent available.")
+679        body = self.document_body
+680        if not body:
+681            body = self.root
+682        return body.get_text_change_end(idx=idx)  # type: ignore
+683
+684    def delete(
+685        self,
+686        child: Element | None = None,
+687        keep_tail: bool = True,
+688    ) -> None:
+689        """Delete the given element from the XML tree. If no element is given,
+690        "self" is deleted. The XML library may allow to continue to use an
+691        element now "orphan" as long as you have a reference to it.
+692
+693        For TextChangeStart : delete also the end tag if exists.
+694
+695        Arguments:
+696
+697            child -- Element
+698
+699            keep_tail -- boolean (default to True), True for most usages.
+700        """
+701        if child is not None:  # act like normal delete
+702            return super().delete(child, keep_tail)
+703        idx = self.get_id()
+704        parent = self.parent
+705        if parent is None:
+706            raise ValueError("cannot delete the root element")
+707        body = self.document_body
+708        if not body:
+709            body = parent
+710        end = body.get_text_change_end(idx=idx)
+711        if end:
+712            end.delete()
+713        # act like normal delete
+714        super().delete()
+
+ + +

The TextChangeStart "text:change-start" element marks the start of a +region with content where text has been inserted or the format has +been changed.

+
+ + +
+ +
+ + def + get_start(self) -> TextChangeStart: + + + +
+ +
669    def get_start(self) -> TextChangeStart:
+670        """Return self."""
+671        return self
+
+ + +

Return self.

+
+ + +
+
+ +
+ + def + get_end(self) -> TextChangeEnd: + + + +
+ +
673    def get_end(self) -> TextChangeEnd:
+674        """Return the corresponding change-end tag or None."""
+675        idx = self.get_id()
+676        parent = self.parent
+677        if parent is None:
+678            raise ValueError("Can not find end tag: no parent available.")
+679        body = self.document_body
+680        if not body:
+681            body = self.root
+682        return body.get_text_change_end(idx=idx)  # type: ignore
+
+ + +

Return the corresponding change-end tag or None.

+
+ + +
+
+ +
+ + def + delete( self, child: Element | None = None, keep_tail: bool = True) -> None: + + + +
+ +
684    def delete(
+685        self,
+686        child: Element | None = None,
+687        keep_tail: bool = True,
+688    ) -> None:
+689        """Delete the given element from the XML tree. If no element is given,
+690        "self" is deleted. The XML library may allow to continue to use an
+691        element now "orphan" as long as you have a reference to it.
+692
+693        For TextChangeStart : delete also the end tag if exists.
+694
+695        Arguments:
+696
+697            child -- Element
+698
+699            keep_tail -- boolean (default to True), True for most usages.
+700        """
+701        if child is not None:  # act like normal delete
+702            return super().delete(child, keep_tail)
+703        idx = self.get_id()
+704        parent = self.parent
+705        if parent is None:
+706            raise ValueError("cannot delete the root element")
+707        body = self.document_body
+708        if not body:
+709            body = parent
+710        end = body.get_text_change_end(idx=idx)
+711        if end:
+712            end.delete()
+713        # act like normal delete
+714        super().delete()
+
+ + +

Delete the given element from the XML tree. If no element is given, +"self" is deleted. The XML library may allow to continue to use an +element now "orphan" as long as you have a reference to it.

+ +

For TextChangeStart : delete also the end tag if exists.

+ +

Arguments:

+ +
child -- Element
+
+keep_tail -- boolean (default to True), True for most usages.
+
+
+ + +
+
+
Inherited Members
+
+
Element
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+ + +
+
+
+
+ +
+ + class + TextChangedRegion(odfdo.Element): + + + +
+ +
358class TextChangedRegion(Element):
+359    """Each TextChangedRegion "text:changed-region" element contains a single
+360    element, one of TextInsertion, TextDeletion or TextFormatChange that
+361    corresponds to a change being tracked within the scope of the
+362    "text:tracked-changes" element that contains the "text:changed-region"
+363    instance.
+364    The xml:id attribute of the TextChangedRegion is referenced
+365    from the "text:change", "text:change-start" and "text:change-end"
+366    elements that identify where the change applies to markup in the scope of
+367    the "text:tracked-changes" element.
+368
+369    Warning : for this implementation, text:change should be referenced only
+370              once in the scope, which is different from ODF 1.2 requirement:
+371             " A "text:changed-region" can be referenced by more than one
+372             change, but the corresponding referencing change mark elements
+373             shall be of the same change type - insertion, format change or
+374             deletion. "
+375    """
+376
+377    _tag = "text:changed-region"
+378
+379    def get_change_info(self) -> Element | None:
+380        """Shortcut to get the ChangeInfo element of the change
+381        element child.
+382
+383        Return: ChangeInfo element.
+384        """
+385        return self.get_element("descendant::office:change-info")
+386
+387    def set_change_info(
+388        self,
+389        change_info: Element | None = None,
+390        creator: str | None = None,
+391        date: datetime | None = None,
+392        comments: Element | list[Element] | None = None,
+393    ) -> None:
+394        """Shortcut to set the ChangeInfo element of the sub change element.
+395        See TextInsertion.set_change_info() for details.
+396
+397        Arguments:
+398
+399             change_info -- ChangeInfo element (or None)
+400
+401             cretor -- str (or None)
+402
+403             date -- datetime (or None)
+404
+405             comments -- Paragraph or list of Paragraph elements (or None)
+406        """
+407        child = self.get_change_element()
+408        if not child:
+409            raise ValueError
+410        child.set_change_info(  # type: ignore
+411            change_info=change_info, creator=creator, date=date, comments=comments
+412        )
+413
+414    def get_change_element(self) -> Element | None:
+415        """Get the change element child. It can be either: TextInsertion,
+416        TextDeletion, or TextFormatChange as an Element object.
+417
+418        Return: Element.
+419        """
+420        request = (
+421            "descendant::text:insertion "
+422            "| descendant::text:deletion"
+423            "| descendant::text:format-change"
+424        )
+425        return self._filtered_element(request, 0)
+426
+427    def _get_text_id(self) -> str | None:
+428        return self.get_attribute_string("text:id")
+429
+430    def _set_text_id(self, text_id: str) -> None:
+431        self.set_attribute("text:id", text_id)
+432
+433    def _get_xml_id(self) -> str | None:
+434        return self.get_attribute_string("xml:id")
+435
+436    def _set_xml_id(self, xml_id: str) -> None:
+437        self.set_attribute("xml:id", xml_id)
+438
+439    def get_id(self) -> str | None:
+440        """Get the "text:id" attribute.
+441
+442        Return: str
+443        """
+444        return self._get_text_id()
+445
+446    def set_id(self, idx: str) -> None:
+447        """Set both the "text:id" and "xml:id" attributes with same value."""
+448        self._set_text_id(idx)
+449        self._set_xml_id(idx)
+
+ + +

Each TextChangedRegion "text:changed-region" element contains a single +element, one of TextInsertion, TextDeletion or TextFormatChange that +corresponds to a change being tracked within the scope of the +"text:tracked-changes" element that contains the "text:changed-region" +instance. +The xml:id attribute of the TextChangedRegion is referenced +from the "text:change", "text:change-start" and "text:change-end" +elements that identify where the change applies to markup in the scope of +the "text:tracked-changes" element.

+ +

Warning : for this implementation, text:change should be referenced only + once in the scope, which is different from ODF 1.2 requirement: + " A "text:changed-region" can be referenced by more than one + change, but the corresponding referencing change mark elements + shall be of the same change type - insertion, format change or + deletion. "

+
+ + +
+ +
+ + def + get_change_info(self) -> Element | None: + + + +
+ +
379    def get_change_info(self) -> Element | None:
+380        """Shortcut to get the ChangeInfo element of the change
+381        element child.
+382
+383        Return: ChangeInfo element.
+384        """
+385        return self.get_element("descendant::office:change-info")
+
+ + +

Shortcut to get the ChangeInfo element of the change +element child.

+ +

Return: ChangeInfo element.

+
+ + +
+
+ +
+ + def + set_change_info( self, change_info: Element | None = None, creator: str | None = None, date: datetime.datetime | None = None, comments: Element | list[Element] | None = None) -> None: + + + +
+ +
387    def set_change_info(
+388        self,
+389        change_info: Element | None = None,
+390        creator: str | None = None,
+391        date: datetime | None = None,
+392        comments: Element | list[Element] | None = None,
+393    ) -> None:
+394        """Shortcut to set the ChangeInfo element of the sub change element.
+395        See TextInsertion.set_change_info() for details.
+396
+397        Arguments:
+398
+399             change_info -- ChangeInfo element (or None)
+400
+401             cretor -- str (or None)
+402
+403             date -- datetime (or None)
+404
+405             comments -- Paragraph or list of Paragraph elements (or None)
+406        """
+407        child = self.get_change_element()
+408        if not child:
+409            raise ValueError
+410        child.set_change_info(  # type: ignore
+411            change_info=change_info, creator=creator, date=date, comments=comments
+412        )
+
+ + +

Shortcut to set the ChangeInfo element of the sub change element. +See TextInsertion.set_change_info() for details.

+ +

Arguments:

+ +
 change_info -- ChangeInfo element (or None)
+
+ cretor -- str (or None)
+
+ date -- datetime (or None)
+
+ comments -- Paragraph or list of Paragraph elements (or None)
+
+
+ + +
+
+ +
+ + def + get_change_element(self) -> Element | None: + + + +
+ +
414    def get_change_element(self) -> Element | None:
+415        """Get the change element child. It can be either: TextInsertion,
+416        TextDeletion, or TextFormatChange as an Element object.
+417
+418        Return: Element.
+419        """
+420        request = (
+421            "descendant::text:insertion "
+422            "| descendant::text:deletion"
+423            "| descendant::text:format-change"
+424        )
+425        return self._filtered_element(request, 0)
+
+ + +

Get the change element child. It can be either: TextInsertion, +TextDeletion, or TextFormatChange as an Element object.

+ +

Return: Element.

+
+ + +
+
+ +
+ + def + get_id(self) -> str | None: + + + +
+ +
439    def get_id(self) -> str | None:
+440        """Get the "text:id" attribute.
+441
+442        Return: str
+443        """
+444        return self._get_text_id()
+
+ + +

Get the "text:id" attribute.

+ +

Return: str

+
+ + +
+
+ +
+ + def + set_id(self, idx: str) -> None: + + + +
+ +
446    def set_id(self, idx: str) -> None:
+447        """Set both the "text:id" and "xml:id" attributes with same value."""
+448        self._set_text_id(idx)
+449        self._set_xml_id(idx)
+
+ + +

Set both the "text:id" and "xml:id" attributes with same value.

+
+ + +
+
+
Inherited Members
+
+
Element
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + TextDeletion(odfdo.TextInsertion): + + + +
+ +
251class TextDeletion(TextInsertion):
+252    """The TextDeletion "text:deletion" contains information that identifies
+253    the person responsible for a deletion and the date of that deletion.
+254    This information may also contain one or more Paragraph which contains
+255    a comment on the deletion. The TextDeletion element may also contain
+256    content that was deleted while change tracking was enabled. The position
+257    where the text was deleted is marked by a "text:change" element. Deleted
+258    text is contained in a paragraph element. To reconstruct the original
+259    text, the paragraph containing the deleted text is merged with its
+260    surrounding paragraph or heading element. To reconstruct the text before
+261    a deletion took place:
+262      - If the change mark is inside a paragraph, insert the content that was
+263      deleted, but remove all leading start tags up to and including the
+264      first "text:p" element and all trailing end tags up to and including
+265      the last "/text:p" or "/text:h" element. If the last trailing element
+266      is a "/text:h", change the end tag "/text:p" following this insertion
+267      to a "/text:h" element.
+268      - If the change mark is inside a heading, insert the content that was
+269      deleted, but remove all leading start tags up to and including the
+270      first "text:h" element and all trailing end tags up to and including
+271      the last "/text:h" or "/text:p" element. If the last trailing element
+272      is a "/text:p", change the end tag "/text:h" following this insertion
+273      to a "/text:p" element.
+274      - Otherwise, copy the text content of the "text:deletion" element in
+275      place of the change mark.
+276    """
+277
+278    _tag = "text:deletion"
+279
+280    def get_deleted(
+281        self,
+282        as_text: bool = False,
+283        no_header: bool = False,
+284    ) -> str | list[Element] | None:
+285        """Get the deleted informations stored in the TextDeletion.
+286        If as_text is True: returns the text content.
+287        If no_header is True: existing Heading are changed in Paragraph
+288
+289        Arguments:
+290
+291            as_text -- boolean
+292
+293            no_header -- boolean
+294
+295        Return: Paragraph and Header list
+296        """
+297        children = self.children
+298        inner = [elem for elem in children if elem.tag != "office:change-info"]
+299        if no_header:  # crude replace t:h by t:p
+300            new_inner = []
+301            for element in inner:
+302                if element.tag == "text:h":
+303                    children = element.children
+304                    text = element.text
+305                    para = Element.from_tag("text:p")
+306                    para.text = text
+307                    for child in children:
+308                        para.append(child)
+309                    new_inner.append(para)
+310                else:
+311                    new_inner.append(element)
+312            inner = new_inner
+313        if as_text:
+314            return "\n".join([elem.get_formatted_text(context=None) for elem in inner])
+315        return inner
+316
+317    def set_deleted(self, paragraph_or_list: Element | list[Element]) -> None:
+318        """Set the deleted informations stored in the TextDeletion. An
+319        actual content that was deleted is expected, embeded in a Paragraph
+320        element or Header.
+321
+322        Arguments:
+323
+324            paragraph_or_list -- Paragraph or Header element (or list)
+325        """
+326        for element in self.get_deleted():  # type: ignore
+327            self.delete(element)  # type: ignore
+328        if isinstance(paragraph_or_list, Element):
+329            paragraph_or_list = [paragraph_or_list]
+330        for element in paragraph_or_list:
+331            self.append(element)
+332
+333    def get_inserted(
+334        self,
+335        as_text: bool = False,
+336        no_header: bool = False,
+337        clean: bool = True,
+338    ) -> str | Element | list[Element] | None:
+339        """Return None."""
+340        if as_text:
+341            return ""
+342        return None
+
+ + +

The TextDeletion "text:deletion" contains information that identifies +the person responsible for a deletion and the date of that deletion. +This information may also contain one or more Paragraph which contains +a comment on the deletion. The TextDeletion element may also contain +content that was deleted while change tracking was enabled. The position +where the text was deleted is marked by a "text:change" element. Deleted +text is contained in a paragraph element. To reconstruct the original +text, the paragraph containing the deleted text is merged with its +surrounding paragraph or heading element. To reconstruct the text before +a deletion took place:

+ +
    +
  • If the change mark is inside a paragraph, insert the content that was +deleted, but remove all leading start tags up to and including the +first "text:p" element and all trailing end tags up to and including +the last "/text:p" or "/text:h" element. If the last trailing element +is a "/text:h", change the end tag "/text:p" following this insertion +to a "/text:h" element.
  • +
  • If the change mark is inside a heading, insert the content that was +deleted, but remove all leading start tags up to and including the +first "text:h" element and all trailing end tags up to and including +the last "/text:h" or "/text:p" element. If the last trailing element +is a "/text:p", change the end tag "/text:h" following this insertion +to a "/text:p" element.
  • +
  • Otherwise, copy the text content of the "text:deletion" element in +place of the change mark.
  • +
+
+ + +
+ +
+ + def + get_deleted( self, as_text: bool = False, no_header: bool = False) -> str | list[Element] | None: + + + +
+ +
280    def get_deleted(
+281        self,
+282        as_text: bool = False,
+283        no_header: bool = False,
+284    ) -> str | list[Element] | None:
+285        """Get the deleted informations stored in the TextDeletion.
+286        If as_text is True: returns the text content.
+287        If no_header is True: existing Heading are changed in Paragraph
+288
+289        Arguments:
+290
+291            as_text -- boolean
+292
+293            no_header -- boolean
+294
+295        Return: Paragraph and Header list
+296        """
+297        children = self.children
+298        inner = [elem for elem in children if elem.tag != "office:change-info"]
+299        if no_header:  # crude replace t:h by t:p
+300            new_inner = []
+301            for element in inner:
+302                if element.tag == "text:h":
+303                    children = element.children
+304                    text = element.text
+305                    para = Element.from_tag("text:p")
+306                    para.text = text
+307                    for child in children:
+308                        para.append(child)
+309                    new_inner.append(para)
+310                else:
+311                    new_inner.append(element)
+312            inner = new_inner
+313        if as_text:
+314            return "\n".join([elem.get_formatted_text(context=None) for elem in inner])
+315        return inner
+
+ + +

Get the deleted informations stored in the TextDeletion. +If as_text is True: returns the text content. +If no_header is True: existing Heading are changed in Paragraph

+ +

Arguments:

+ +
as_text -- boolean
+
+no_header -- boolean
+
+ +

Return: Paragraph and Header list

+
+ + +
+
+ +
+ + def + set_deleted( self, paragraph_or_list: Element | list[Element]) -> None: + + + +
+ +
317    def set_deleted(self, paragraph_or_list: Element | list[Element]) -> None:
+318        """Set the deleted informations stored in the TextDeletion. An
+319        actual content that was deleted is expected, embeded in a Paragraph
+320        element or Header.
+321
+322        Arguments:
+323
+324            paragraph_or_list -- Paragraph or Header element (or list)
+325        """
+326        for element in self.get_deleted():  # type: ignore
+327            self.delete(element)  # type: ignore
+328        if isinstance(paragraph_or_list, Element):
+329            paragraph_or_list = [paragraph_or_list]
+330        for element in paragraph_or_list:
+331            self.append(element)
+
+ + +

Set the deleted informations stored in the TextDeletion. An +actual content that was deleted is expected, embeded in a Paragraph +element or Header.

+ +

Arguments:

+ +
paragraph_or_list -- Paragraph or Header element (or list)
+
+
+ + +
+
+ +
+ + def + get_inserted( self, as_text: bool = False, no_header: bool = False, clean: bool = True) -> str | Element | list[Element] | None: + + + +
+ +
333    def get_inserted(
+334        self,
+335        as_text: bool = False,
+336        no_header: bool = False,
+337        clean: bool = True,
+338    ) -> str | Element | list[Element] | None:
+339        """Return None."""
+340        if as_text:
+341            return ""
+342        return None
+
+ + +

Return None.

+
+ + +
+
+
Inherited Members
+
+
Element
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+ +
+
+
+
+ +
+ + class + TextFormatChange(odfdo.TextInsertion): + + + +
+ +
345class TextFormatChange(TextInsertion):
+346    """The TextFormatChange "text:format-change" element represents any change
+347    in formatting attributes. The region where the change took place is
+348    marked by "text:change-start", "text:change-end" or "text:change"
+349    elements.
+350
+351    Note: This element does not contain formatting changes that have taken
+352    place.
+353    """
+354
+355    _tag = "text:format-change"
+
+ + +

The TextFormatChange "text:format-change" element represents any change +in formatting attributes. The region where the change took place is +marked by "text:change-start", "text:change-end" or "text:change" +elements.

+ +

Note: This element does not contain formatting changes that have taken +place.

+
+ + +
+
Inherited Members
+
+
Element
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+ +
+
+
+
+ +
+ + class + TextInsertion(odfdo.Element): + + + +
+ +
134class TextInsertion(Element):
+135    """The TextInsertion "text:insertion" element contains the information
+136    that identifies the person responsible for a change and the date of
+137    that change. This information may also contain one or more "text:p"
+138    Paragraph which contain a comment on the insertion. The
+139    TextInsertion element's parent "text:changed-region" element has an
+140    xml:id or text:id attribute, the value of which binds that parent
+141    element to the text:change-id attribute on the "text:change-start"
+142    and "text:change-end" elements.
+143    """
+144
+145    _tag = "text:insertion"
+146
+147    def get_deleted(
+148        self,
+149        as_text: bool = False,
+150        no_header: bool = False,
+151    ) -> str | list[Element] | None:
+152        """Return: None."""
+153        if as_text:
+154            return ""
+155        return None
+156
+157    def get_inserted(
+158        self,
+159        as_text: bool = False,
+160        no_header: bool = False,
+161        clean: bool = True,
+162    ) -> str | Element | list[Element] | None:
+163        """Shortcut to text:change-start.get_inserted(). Return the content
+164        between text:change-start and text:change-end.
+165
+166        If as_text is True: returns the text content.
+167        If no_header is True: existing Heading are changed in Paragraph
+168        If no_header is True: existing text:h are changed in text:p
+169        By default: returns a list of Element, cleaned and with headers
+170
+171        Arguments:
+172
+173            as_text -- boolean
+174
+175            clean -- boolean
+176
+177            no_header -- boolean
+178
+179        Return: list or Element or text
+180        """
+181        current = self.parent  # text:changed-region
+182        if not current:
+183            raise ValueError
+184        idx = current.get_id()  # type: ignore
+185        body = self.document_body
+186        if not body:
+187            body = self.root
+188        text_change = body.get_text_change_start(idx=idx)
+189        if not text_change:
+190            raise ValueError
+191        return text_change.get_inserted(  # type: ignore
+192            as_text=as_text, no_header=no_header, clean=clean
+193        )
+194
+195    def get_change_info(self) -> Element | None:
+196        """Get the ChangeInfo child of the element.
+197
+198        Return: ChangeInfo element.
+199        """
+200        return self.get_element("descendant::office:change-info")
+201
+202    def set_change_info(
+203        self,
+204        change_info: Element | None = None,
+205        creator: str | None = None,
+206        date: datetime | None = None,
+207        comments: Element | list[Element] | None = None,
+208    ) -> None:
+209        """Set the ChangeInfo element for the change element. If change_info
+210        is not provided, creator, date and comments will be used to build a
+211        suitable change info element. Default for creator is 'Unknown',
+212        default for date is current time and default for comments is no
+213        comment at all.
+214        The new change info element will replace any existant ChangeInfo.
+215
+216        Arguments:
+217
+218             change_info -- ChangeInfo element (or None)
+219
+220             cretor -- str (or None)
+221
+222             date -- datetime (or None)
+223
+224             comments -- Paragraph or list of Paragraph elements (or None)
+225        """
+226        if change_info is None:
+227            new_change_info = ChangeInfo(creator, date)
+228            if comments is not None:
+229                if isinstance(comments, Element):
+230                    # single pararagraph comment
+231                    comments_list = [comments]
+232                else:
+233                    comments_list = comments
+234                # assume iterable of Paragraph
+235                for paragraph in comments_list:
+236                    if not isinstance(paragraph, Paragraph):
+237                        raise TypeError(f"Not a Paragraph: '{paragraph!r}'")
+238                    new_change_info.insert(paragraph, xmlposition=LAST_CHILD)
+239        else:
+240            if not isinstance(change_info, ChangeInfo):
+241                raise TypeError(f"Not a ChangeInfo: '{change_info!r}'")
+242            new_change_info = change_info
+243
+244        old = self.get_change_info()
+245        if old is not None:
+246            self.replace_element(old, new_change_info)
+247        else:
+248            self.insert(new_change_info, xmlposition=FIRST_CHILD)
+
+ + +

The TextInsertion "text:insertion" element contains the information +that identifies the person responsible for a change and the date of +that change. This information may also contain one or more "text:p" +Paragraph which contain a comment on the insertion. The +TextInsertion element's parent "text:changed-region" element has an +xml:id or text:id attribute, the value of which binds that parent +element to the text:change-id attribute on the "text:change-start" +and "text:change-end" elements.

+
+ + +
+ +
+ + def + get_deleted( self, as_text: bool = False, no_header: bool = False) -> str | list[Element] | None: + + + +
+ +
147    def get_deleted(
+148        self,
+149        as_text: bool = False,
+150        no_header: bool = False,
+151    ) -> str | list[Element] | None:
+152        """Return: None."""
+153        if as_text:
+154            return ""
+155        return None
+
+ + +

Return: None.

+
+ + +
+
+ +
+ + def + get_inserted( self, as_text: bool = False, no_header: bool = False, clean: bool = True) -> str | Element | list[Element] | None: + + + +
+ +
157    def get_inserted(
+158        self,
+159        as_text: bool = False,
+160        no_header: bool = False,
+161        clean: bool = True,
+162    ) -> str | Element | list[Element] | None:
+163        """Shortcut to text:change-start.get_inserted(). Return the content
+164        between text:change-start and text:change-end.
+165
+166        If as_text is True: returns the text content.
+167        If no_header is True: existing Heading are changed in Paragraph
+168        If no_header is True: existing text:h are changed in text:p
+169        By default: returns a list of Element, cleaned and with headers
+170
+171        Arguments:
+172
+173            as_text -- boolean
+174
+175            clean -- boolean
+176
+177            no_header -- boolean
+178
+179        Return: list or Element or text
+180        """
+181        current = self.parent  # text:changed-region
+182        if not current:
+183            raise ValueError
+184        idx = current.get_id()  # type: ignore
+185        body = self.document_body
+186        if not body:
+187            body = self.root
+188        text_change = body.get_text_change_start(idx=idx)
+189        if not text_change:
+190            raise ValueError
+191        return text_change.get_inserted(  # type: ignore
+192            as_text=as_text, no_header=no_header, clean=clean
+193        )
+
+ + +

Shortcut to text:change-start.get_inserted(). Return the content +between text:change-start and text:change-end.

+ +

If as_text is True: returns the text content. +If no_header is True: existing Heading are changed in Paragraph +If no_header is True: existing text:h are changed in text:p +By default: returns a list of Element, cleaned and with headers

+ +

Arguments:

+ +
as_text -- boolean
+
+clean -- boolean
+
+no_header -- boolean
+
+ +

Return: list or Element or text

+
+ + +
+
+ +
+ + def + get_change_info(self) -> Element | None: + + + +
+ +
195    def get_change_info(self) -> Element | None:
+196        """Get the ChangeInfo child of the element.
+197
+198        Return: ChangeInfo element.
+199        """
+200        return self.get_element("descendant::office:change-info")
+
+ + +

Get the ChangeInfo child of the element.

+ +

Return: ChangeInfo element.

+
+ + +
+
+ +
+ + def + set_change_info( self, change_info: Element | None = None, creator: str | None = None, date: datetime.datetime | None = None, comments: Element | list[Element] | None = None) -> None: + + + +
+ +
202    def set_change_info(
+203        self,
+204        change_info: Element | None = None,
+205        creator: str | None = None,
+206        date: datetime | None = None,
+207        comments: Element | list[Element] | None = None,
+208    ) -> None:
+209        """Set the ChangeInfo element for the change element. If change_info
+210        is not provided, creator, date and comments will be used to build a
+211        suitable change info element. Default for creator is 'Unknown',
+212        default for date is current time and default for comments is no
+213        comment at all.
+214        The new change info element will replace any existant ChangeInfo.
+215
+216        Arguments:
+217
+218             change_info -- ChangeInfo element (or None)
+219
+220             cretor -- str (or None)
+221
+222             date -- datetime (or None)
+223
+224             comments -- Paragraph or list of Paragraph elements (or None)
+225        """
+226        if change_info is None:
+227            new_change_info = ChangeInfo(creator, date)
+228            if comments is not None:
+229                if isinstance(comments, Element):
+230                    # single pararagraph comment
+231                    comments_list = [comments]
+232                else:
+233                    comments_list = comments
+234                # assume iterable of Paragraph
+235                for paragraph in comments_list:
+236                    if not isinstance(paragraph, Paragraph):
+237                        raise TypeError(f"Not a Paragraph: '{paragraph!r}'")
+238                    new_change_info.insert(paragraph, xmlposition=LAST_CHILD)
+239        else:
+240            if not isinstance(change_info, ChangeInfo):
+241                raise TypeError(f"Not a ChangeInfo: '{change_info!r}'")
+242            new_change_info = change_info
+243
+244        old = self.get_change_info()
+245        if old is not None:
+246            self.replace_element(old, new_change_info)
+247        else:
+248            self.insert(new_change_info, xmlposition=FIRST_CHILD)
+
+ + +

Set the ChangeInfo element for the change element. If change_info +is not provided, creator, date and comments will be used to build a +suitable change info element. Default for creator is 'Unknown', +default for date is current time and default for comments is no +comment at all. +The new change info element will replace any existant ChangeInfo.

+ +

Arguments:

+ +
 change_info -- ChangeInfo element (or None)
+
+ cretor -- str (or None)
+
+ date -- datetime (or None)
+
+ comments -- Paragraph or list of Paragraph elements (or None)
+
+
+ + +
+
+
Inherited Members
+
+
Element
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + TocEntryTemplate(odfdo.Element): + + + +
+ +
467class TocEntryTemplate(Element):
+468    """ODF "text:table-of-content-entry-template"
+469
+470    Arguments:
+471
+472        style -- str
+473    """
+474
+475    _tag = "text:table-of-content-entry-template"
+476    _properties = (PropDef("style", "text:style-name"),)
+477
+478    def __init__(
+479        self,
+480        style: str | None = None,
+481        outline_level: int | None = None,
+482        **kwargs: Any,
+483    ) -> None:
+484        super().__init__(**kwargs)
+485        if self._do_init:
+486            if style:
+487                self.style = style
+488            if outline_level:
+489                self.outline_level = outline_level
+490
+491    @property
+492    def outline_level(self) -> int | None:
+493        return self.get_attribute_integer("text:outline-level")
+494
+495    @outline_level.setter
+496    def outline_level(self, level: int) -> None:
+497        self.set_attribute("text:outline-level", str(level))
+498
+499    def complete_defaults(self) -> None:
+500        self.append(Element.from_tag("text:index-entry-chapter"))
+501        self.append(Element.from_tag("text:index-entry-text"))
+502        self.append(Element.from_tag("text:index-entry-text"))
+503        ts = Element.from_tag("text:index-entry-text")
+504        ts.set_style_attribute("style:type", "right")
+505        ts.set_style_attribute("style:leader-char", ".")
+506        self.append(ts)
+507        self.append(Element.from_tag("text:index-entry-page-number"))
+
+ + +

ODF "text:table-of-content-entry-template"

+ +

Arguments:

+ +
style -- str
+
+
+ + +
+ +
+ + TocEntryTemplate( style: str | None = None, outline_level: int | None = None, **kwargs: Any) + + + +
+ +
478    def __init__(
+479        self,
+480        style: str | None = None,
+481        outline_level: int | None = None,
+482        **kwargs: Any,
+483    ) -> None:
+484        super().__init__(**kwargs)
+485        if self._do_init:
+486            if style:
+487                self.style = style
+488            if outline_level:
+489                self.outline_level = outline_level
+
+ + + + +
+
+ +
+ outline_level: int | None + + + +
+ +
491    @property
+492    def outline_level(self) -> int | None:
+493        return self.get_attribute_integer("text:outline-level")
+
+ + + + +
+
+ +
+ + def + complete_defaults(self) -> None: + + + +
+ +
499    def complete_defaults(self) -> None:
+500        self.append(Element.from_tag("text:index-entry-chapter"))
+501        self.append(Element.from_tag("text:index-entry-text"))
+502        self.append(Element.from_tag("text:index-entry-text"))
+503        ts = Element.from_tag("text:index-entry-text")
+504        ts.set_style_attribute("style:type", "right")
+505        ts.set_style_attribute("style:leader-char", ".")
+506        self.append(ts)
+507        self.append(Element.from_tag("text:index-entry-page-number"))
+
+ + + + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + TrackedChanges(odfdo.Element): + + + +
+ +
452class TrackedChanges(Element):
+453    """The TrackedChanges "text:tracked-changes" element acts as a container
+454    for TextChangedRegion elements that represent changes in a certain
+455    scope of an OpenDocument document. This scope is the element in which
+456    the TrackedChanges element occurs. Changes in this scope shall be
+457    tracked by TextChangedRegion elements contained in the
+458    TrackedChanges element in this scope. If a TrackedChanges
+459    element is absent, there are no tracked changes in the corresponding
+460    scope. In this case, all change mark elements in this scope shall be
+461    ignored.
+462    """
+463
+464    _tag = "text:tracked-changes"
+465
+466    def get_changed_regions(
+467        self,
+468        creator: str | None = None,
+469        date: datetime | None = None,
+470        content: str | None = None,
+471        role: str | None = None,
+472    ) -> list[Element]:
+473        changed_regions = self._filtered_elements(
+474            "text:changed-region",
+475            dc_creator=creator,
+476            dc_date=date,
+477            content=content,
+478        )
+479        if role is None:
+480            return changed_regions
+481        result: list[Element] = []
+482        for regien in changed_regions:
+483            changed = regien.get_change_element()  # type: ignore
+484            if not changed:
+485                continue
+486            if changed.tag.endswith(role):
+487                result.append(regien)
+488        return result
+489
+490    def get_changed_region(
+491        self,
+492        position: int = 0,
+493        text_id: str | None = None,
+494        creator: str | None = None,
+495        date: datetime | None = None,
+496        content: str | None = None,
+497    ) -> Element | None:
+498        return self._filtered_element(
+499            "text:changed-region",
+500            position,
+501            text_id=text_id,
+502            dc_creator=creator,
+503            dc_date=date,
+504            content=content,
+505        )
+
+ + +

The TrackedChanges "text:tracked-changes" element acts as a container +for TextChangedRegion elements that represent changes in a certain +scope of an OpenDocument document. This scope is the element in which +the TrackedChanges element occurs. Changes in this scope shall be +tracked by TextChangedRegion elements contained in the +TrackedChanges element in this scope. If a TrackedChanges +element is absent, there are no tracked changes in the corresponding +scope. In this case, all change mark elements in this scope shall be +ignored.

+
+ + +
+ +
+ + def + get_changed_regions( self, creator: str | None = None, date: datetime.datetime | None = None, content: str | None = None, role: str | None = None) -> list[Element]: + + + +
+ +
466    def get_changed_regions(
+467        self,
+468        creator: str | None = None,
+469        date: datetime | None = None,
+470        content: str | None = None,
+471        role: str | None = None,
+472    ) -> list[Element]:
+473        changed_regions = self._filtered_elements(
+474            "text:changed-region",
+475            dc_creator=creator,
+476            dc_date=date,
+477            content=content,
+478        )
+479        if role is None:
+480            return changed_regions
+481        result: list[Element] = []
+482        for regien in changed_regions:
+483            changed = regien.get_change_element()  # type: ignore
+484            if not changed:
+485                continue
+486            if changed.tag.endswith(role):
+487                result.append(regien)
+488        return result
+
+ + + + +
+
+ +
+ + def + get_changed_region( self, position: int = 0, text_id: str | None = None, creator: str | None = None, date: datetime.datetime | None = None, content: str | None = None) -> Element | None: + + + +
+ +
490    def get_changed_region(
+491        self,
+492        position: int = 0,
+493        text_id: str | None = None,
+494        creator: str | None = None,
+495        date: datetime | None = None,
+496        content: str | None = None,
+497    ) -> Element | None:
+498        return self._filtered_element(
+499            "text:changed-region",
+500            position,
+501            text_id=text_id,
+502            dc_creator=creator,
+503            dc_date=date,
+504            content=content,
+505        )
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + UserDefined(odfdo.ElementTyped): + + + +
+ +
212class UserDefined(ElementTyped):
+213    """Return a user defined field "text:user-defined". If the current
+214    document is provided, try to extract the content of the meta user defined
+215    field of same name.
+216
+217    Arguments:
+218
+219        name -- str, name of the user defined field
+220
+221        value -- python typed value, value of the field
+222
+223        value_type -- str, office:value-type known type
+224
+225        text -- str
+226
+227        style -- str
+228
+229        from_document -- ODF document
+230    """
+231
+232    _tag = "text:user-defined"
+233    _properties = (
+234        PropDef("name", "text:name"),
+235        PropDef("style", "style:data-style-name"),
+236    )
+237
+238    def __init__(
+239        self,
+240        name: str = "",
+241        value: Any = None,
+242        value_type: str | None = None,
+243        text: str | None = None,
+244        style: str | None = None,
+245        from_document: Document | None = None,
+246        **kwargs: Any,
+247    ) -> None:
+248        super().__init__(**kwargs)
+249        if self._do_init:
+250            if name:
+251                self.name = name
+252            if style:
+253                self.style = style
+254            if from_document is not None:
+255                meta_infos = from_document.meta
+256                content = meta_infos.get_user_defined_metadata_of_name(name)
+257                if content is not None:
+258                    value = content.get("value", None)
+259                    value_type = content.get("value_type", None)
+260                    text = content.get("text", None)
+261            text = self.set_value_and_type(
+262                value=value, value_type=value_type, text=text
+263            )
+264            self.text = text  # type: ignore
+
+ + +

Return a user defined field "text:user-defined". If the current +document is provided, try to extract the content of the meta user defined +field of same name.

+ +

Arguments:

+ +
name -- str, name of the user defined field
+
+value -- python typed value, value of the field
+
+value_type -- str, office:value-type known type
+
+text -- str
+
+style -- str
+
+from_document -- ODF document
+
+
+ + +
+ +
+ + UserDefined( name: str = '', value: Any = None, value_type: str | None = None, text: str | None = None, style: str | None = None, from_document: Document | None = None, **kwargs: Any) + + + +
+ +
238    def __init__(
+239        self,
+240        name: str = "",
+241        value: Any = None,
+242        value_type: str | None = None,
+243        text: str | None = None,
+244        style: str | None = None,
+245        from_document: Document | None = None,
+246        **kwargs: Any,
+247    ) -> None:
+248        super().__init__(**kwargs)
+249        if self._do_init:
+250            if name:
+251                self.name = name
+252            if style:
+253                self.style = style
+254            if from_document is not None:
+255                meta_infos = from_document.meta
+256                content = meta_infos.get_user_defined_metadata_of_name(name)
+257                if content is not None:
+258                    value = content.get("value", None)
+259                    value_type = content.get("value_type", None)
+260                    text = content.get("text", None)
+261            text = self.set_value_and_type(
+262                value=value, value_type=value_type, text=text
+263            )
+264            self.text = text  # type: ignore
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+ +
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + UserFieldDecl(odfdo.ElementTyped): + + + +
+ +
146class UserFieldDecl(ElementTyped):
+147    _tag = "text:user-field-decl"
+148    _properties = (PropDef("name", "text:name"),)
+149
+150    def __init__(
+151        self,
+152        name: str | None = None,
+153        value: Any = None,
+154        value_type: str | None = None,
+155        **kwargs: Any,
+156    ) -> None:
+157        super().__init__(**kwargs)
+158        if self._do_init:
+159            if name:
+160                self.name = name
+161            self.set_value_and_type(value=value, value_type=value_type)
+162
+163    def set_value(self, value: Any) -> None:
+164        name = self.get_attribute("text:name")
+165        self.clear()
+166        self.set_value_and_type(value=value)
+167        self.set_attribute("text:name", name)
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + UserFieldDecl( name: str | None = None, value: Any = None, value_type: str | None = None, **kwargs: Any) + + + +
+ +
150    def __init__(
+151        self,
+152        name: str | None = None,
+153        value: Any = None,
+154        value_type: str | None = None,
+155        **kwargs: Any,
+156    ) -> None:
+157        super().__init__(**kwargs)
+158        if self._do_init:
+159            if name:
+160                self.name = name
+161            self.set_value_and_type(value=value, value_type=value_type)
+
+ + + + +
+
+ +
+ + def + set_value(self, value: Any) -> None: + + + +
+ +
163    def set_value(self, value: Any) -> None:
+164        name = self.get_attribute("text:name")
+165        self.clear()
+166        self.set_value_and_type(value=value)
+167        self.set_attribute("text:name", name)
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+ +
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + UserFieldDecls(odfdo.Element): + + + +
+ +
142class UserFieldDecls(Element):
+143    _tag = "text:user-field-decls"
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+
Inherited Members
+
+
Element
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + UserFieldGet(odfdo.ElementTyped): + + + +
+ +
173class UserFieldGet(ElementTyped):
+174    _tag = "text:user-field-get"
+175    _properties = (
+176        PropDef("name", "text:name"),
+177        PropDef("style", "style:data-style-name"),
+178    )
+179
+180    def __init__(
+181        self,
+182        name: str | None = None,
+183        value: Any = None,
+184        value_type: str | None = None,
+185        text: str | None = None,
+186        style: str | None = None,
+187        **kwargs: Any,
+188    ) -> None:
+189        super().__init__(**kwargs)
+190        if self._do_init:
+191            if name:
+192                self.name = name
+193            text = self.set_value_and_type(
+194                value=value, value_type=value_type, text=text
+195            )
+196            self.text = text  # type: ignore
+197
+198            if style:
+199                self.style = style
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + UserFieldGet( name: str | None = None, value: Any = None, value_type: str | None = None, text: str | None = None, style: str | None = None, **kwargs: Any) + + + +
+ +
180    def __init__(
+181        self,
+182        name: str | None = None,
+183        value: Any = None,
+184        value_type: str | None = None,
+185        text: str | None = None,
+186        style: str | None = None,
+187        **kwargs: Any,
+188    ) -> None:
+189        super().__init__(**kwargs)
+190        if self._do_init:
+191            if name:
+192                self.name = name
+193            text = self.set_value_and_type(
+194                value=value, value_type=value_type, text=text
+195            )
+196            self.text = text  # type: ignore
+197
+198            if style:
+199                self.style = style
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+ +
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + UserFieldInput(odfdo.UserFieldGet): + + + +
+ +
205class UserFieldInput(UserFieldGet):
+206    _tag = "text:user-field-input"
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+ + +
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarChapter(odfdo.Element): + + + +
+ +
376class VarChapter(Element):
+377    _tag = "text:chapter"
+378    _properties = (
+379        PropDef("display", "text:display"),
+380        PropDef("outline_level", "text:outline-level"),
+381    )
+382    DISPLAY_VALUE_CHOICE = {  # noqa: RUF012
+383        "number",
+384        "name",
+385        "number-and-name",
+386        "plain-number",
+387        "plain-number-and-name",
+388    }
+389
+390    def __init__(
+391        self,
+392        display: str | None = "name",
+393        outline_level: str | None = None,
+394        **kwargs: Any,
+395    ) -> None:
+396        """display can be: 'number', 'name', 'number-and-name', 'plain-number' or
+397        'plain-number-and-name'
+398        """
+399        super().__init__(**kwargs)
+400        if self._do_init:
+401            if display not in VarChapter.DISPLAY_VALUE_CHOICE:
+402                raise ValueError("unknown display value: %s" % display)
+403            self.display = display
+404            if outline_level is not None:
+405                self.outline_level = outline_level
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + VarChapter( display: str | None = 'name', outline_level: str | None = None, **kwargs: Any) + + + +
+ +
390    def __init__(
+391        self,
+392        display: str | None = "name",
+393        outline_level: str | None = None,
+394        **kwargs: Any,
+395    ) -> None:
+396        """display can be: 'number', 'name', 'number-and-name', 'plain-number' or
+397        'plain-number-and-name'
+398        """
+399        super().__init__(**kwargs)
+400        if self._do_init:
+401            if display not in VarChapter.DISPLAY_VALUE_CHOICE:
+402                raise ValueError("unknown display value: %s" % display)
+403            self.display = display
+404            if outline_level is not None:
+405                self.outline_level = outline_level
+
+ + +

display can be: 'number', 'name', 'number-and-name', 'plain-number' or +'plain-number-and-name'

+
+ + +
+
+
+ DISPLAY_VALUE_CHOICE = +{'name', 'plain-number-and-name', 'plain-number', 'number', 'number-and-name'} + + +
+ + + + +
+
+ +
+ display: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ outline_level: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarCreationDate(odfdo.Element): + + + +
+ +
456class VarCreationDate(Element):
+457    _tag = "text:creation-date"
+458    _properties = (
+459        PropDef("fixed", "text:fixed"),
+460        PropDef("data_style", "style:data-style-name"),
+461    )
+462
+463    def __init__(
+464        self,
+465        fixed: bool = False,
+466        data_style: str | None = None,
+467        **kwargs: Any,
+468    ) -> None:
+469        super().__init__(**kwargs)
+470        if self._do_init:
+471            if fixed:
+472                self.fixed = True
+473            if data_style:
+474                self.data_style = data_style
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + VarCreationDate(fixed: bool = False, data_style: str | None = None, **kwargs: Any) + + + +
+ +
463    def __init__(
+464        self,
+465        fixed: bool = False,
+466        data_style: str | None = None,
+467        **kwargs: Any,
+468    ) -> None:
+469        super().__init__(**kwargs)
+470        if self._do_init:
+471            if fixed:
+472                self.fixed = True
+473            if data_style:
+474                self.data_style = data_style
+
+ + + + +
+
+ +
+ fixed: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ data_style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarCreationTime(odfdo.Element): + + + +
+ +
480class VarCreationTime(Element):
+481    _tag = "text:creation-time"
+482    _properties = (
+483        PropDef("fixed", "text:fixed"),
+484        PropDef("data_style", "style:data-style-name"),
+485    )
+486
+487    def __init__(
+488        self,
+489        fixed: bool = False,
+490        data_style: str | None = None,
+491        **kwargs: Any,
+492    ) -> None:
+493        super().__init__(**kwargs)
+494        if self._do_init:
+495            if fixed:
+496                self.fixed = True
+497            if data_style:
+498                self.data_style = data_style
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + VarCreationTime(fixed: bool = False, data_style: str | None = None, **kwargs: Any) + + + +
+ +
487    def __init__(
+488        self,
+489        fixed: bool = False,
+490        data_style: str | None = None,
+491        **kwargs: Any,
+492    ) -> None:
+493        super().__init__(**kwargs)
+494        if self._do_init:
+495            if fixed:
+496                self.fixed = True
+497            if data_style:
+498                self.data_style = data_style
+
+ + + + +
+
+ +
+ fixed: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ data_style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarDate(odfdo.Element): + + + +
+ +
305class VarDate(Element):
+306    _tag = "text:date"
+307    _properties = (
+308        PropDef("date", "text:date-value"),
+309        PropDef("fixed", "text:fixed"),
+310        PropDef("data_style", "style:data-style-name"),
+311        PropDef("date_adjust", "text:date-adjust"),
+312    )
+313
+314    def __init__(
+315        self,
+316        date: datetime | None = None,
+317        fixed: bool = False,
+318        data_style: str | None = None,
+319        text: str | None = None,
+320        date_adjust: timedelta | None = None,
+321        **kwargs: Any,
+322    ) -> None:
+323        super().__init__(**kwargs)
+324        if self._do_init:
+325            if date:
+326                self.date = DateTime.encode(date)
+327            if fixed:
+328                self.fixed = True
+329            if data_style is not None:
+330                self.data_style = data_style
+331            if text is None and date is not None:
+332                text = Date.encode(date)
+333            self.text = text  # type: ignore
+334            if date_adjust is not None:
+335                self.date_adjust = Duration.encode(date_adjust)
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + VarDate( date: datetime.datetime | None = None, fixed: bool = False, data_style: str | None = None, text: str | None = None, date_adjust: datetime.timedelta | None = None, **kwargs: Any) + + + +
+ +
314    def __init__(
+315        self,
+316        date: datetime | None = None,
+317        fixed: bool = False,
+318        data_style: str | None = None,
+319        text: str | None = None,
+320        date_adjust: timedelta | None = None,
+321        **kwargs: Any,
+322    ) -> None:
+323        super().__init__(**kwargs)
+324        if self._do_init:
+325            if date:
+326                self.date = DateTime.encode(date)
+327            if fixed:
+328                self.fixed = True
+329            if data_style is not None:
+330                self.data_style = data_style
+331            if text is None and date is not None:
+332                text = Date.encode(date)
+333            self.text = text  # type: ignore
+334            if date_adjust is not None:
+335                self.date_adjust = Duration.encode(date_adjust)
+
+ + + + +
+
+ +
+ date: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ fixed: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ data_style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ date_adjust: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarDecl(odfdo.Element): + + + +
+ +
40class VarDecl(Element):
+41    _tag = "text:variable-decl"
+42    _properties = (
+43        PropDef("name", "text:name"),
+44        PropDef("value_type", "office:value-type"),
+45    )
+46
+47    def __init__(
+48        self,
+49        name: str | None = None,
+50        value_type: str | None = None,
+51        **kwargs: Any,
+52    ) -> None:
+53        super().__init__(**kwargs)
+54        if self._do_init:
+55            if name:
+56                self.name = name
+57            if value_type:
+58                self.value_type = value_type
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + VarDecl( name: str | None = None, value_type: str | None = None, **kwargs: Any) + + + +
+ +
47    def __init__(
+48        self,
+49        name: str | None = None,
+50        value_type: str | None = None,
+51        **kwargs: Any,
+52    ) -> None:
+53        super().__init__(**kwargs)
+54        if self._do_init:
+55            if name:
+56                self.name = name
+57            if value_type:
+58                self.value_type = value_type
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ value_type: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarDecls(odfdo.Element): + + + +
+ +
36class VarDecls(Element):
+37    _tag = "text:variable-decls"
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+
Inherited Members
+
+
Element
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarDescription(odfdo.VarInitialCreator): + + + +
+ +
504class VarDescription(VarInitialCreator):
+505    _tag = "text:description"
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ fixed: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+ +
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarFileName(odfdo.Element): + + + +
+ +
411class VarFileName(Element):
+412    _tag = "text:file-name"
+413    _properties = (
+414        PropDef("display", "text:display"),
+415        PropDef("fixed", "text:fixed"),
+416    )
+417    DISPLAY_VALUE_CHOICE = {  # noqa: RUF012
+418        "full",
+419        "path",
+420        "name",
+421        "name-and-extension",
+422    }
+423
+424    def __init__(
+425        self,
+426        display: str | None = "full",
+427        fixed: bool = False,
+428        **kwargs: Any,
+429    ) -> None:
+430        """display can be: 'full', 'path', 'name' or 'name-and-extension'"""
+431        super().__init__(**kwargs)
+432        if self._do_init:
+433            if display not in VarFileName.DISPLAY_VALUE_CHOICE:
+434                raise ValueError("unknown display value: %s" % display)
+435            self.display = display
+436            if fixed:
+437                self.fixed = True
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + VarFileName(display: str | None = 'full', fixed: bool = False, **kwargs: Any) + + + +
+ +
424    def __init__(
+425        self,
+426        display: str | None = "full",
+427        fixed: bool = False,
+428        **kwargs: Any,
+429    ) -> None:
+430        """display can be: 'full', 'path', 'name' or 'name-and-extension'"""
+431        super().__init__(**kwargs)
+432        if self._do_init:
+433            if display not in VarFileName.DISPLAY_VALUE_CHOICE:
+434                raise ValueError("unknown display value: %s" % display)
+435            self.display = display
+436            if fixed:
+437                self.fixed = True
+
+ + +

display can be: 'full', 'path', 'name' or 'name-and-extension'

+
+ + +
+
+
+ DISPLAY_VALUE_CHOICE = +{'name', 'name-and-extension', 'full', 'path'} + + +
+ + + + +
+
+ +
+ display: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ fixed: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarGet(odfdo.ElementTyped): + + + +
+ +
111class VarGet(ElementTyped):
+112    _tag = "text:variable-get"
+113    _properties = (
+114        PropDef("name", "text:name"),
+115        PropDef("style", "style:data-style-name"),
+116    )
+117
+118    def __init__(
+119        self,
+120        name: str | None = None,
+121        value: Any = None,
+122        value_type: str | None = None,
+123        text: str | None = None,
+124        style: str | None = None,
+125        **kwargs: Any,
+126    ) -> None:
+127        super().__init__(**kwargs)
+128        if self._do_init:
+129            if name:
+130                self.name = name
+131            if style:
+132                self.style = style
+133            text = self.set_value_and_type(
+134                value=value, value_type=value_type, text=text
+135            )
+136            self.text = text  # type: ignore
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + VarGet( name: str | None = None, value: Any = None, value_type: str | None = None, text: str | None = None, style: str | None = None, **kwargs: Any) + + + +
+ +
118    def __init__(
+119        self,
+120        name: str | None = None,
+121        value: Any = None,
+122        value_type: str | None = None,
+123        text: str | None = None,
+124        style: str | None = None,
+125        **kwargs: Any,
+126    ) -> None:
+127        super().__init__(**kwargs)
+128        if self._do_init:
+129            if name:
+130                self.name = name
+131            if style:
+132                self.style = style
+133            text = self.set_value_and_type(
+134                value=value, value_type=value_type, text=text
+135            )
+136            self.text = text  # type: ignore
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+ +
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarInitialCreator(odfdo.Element): + + + +
+ +
443class VarInitialCreator(Element):
+444    _tag = "text:initial-creator"
+445    _properties = (PropDef("fixed", "text:fixed"),)
+446
+447    def __init__(self, fixed: bool = False, **kwargs: Any) -> None:
+448        super().__init__(**kwargs)
+449        if self._do_init and fixed:
+450            self.fixed = True
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + VarInitialCreator(fixed: bool = False, **kwargs: Any) + + + +
+ +
447    def __init__(self, fixed: bool = False, **kwargs: Any) -> None:
+448        super().__init__(**kwargs)
+449        if self._do_init and fixed:
+450            self.fixed = True
+
+ + + + +
+
+ +
+ fixed: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarKeywords(odfdo.VarInitialCreator): + + + +
+ +
525class VarKeywords(VarInitialCreator):
+526    _tag = "text:keywords"
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ fixed: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+ +
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarPageCount(odfdo.Element): + + + +
+ +
301class VarPageCount(Element):
+302    _tag = "text:page-count"
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+
Inherited Members
+
+
Element
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarPageNumber(odfdo.Element): + + + +
+ +
270class VarPageNumber(Element):
+271    """
+272    select_page -- string in ('previous', 'current', 'next')
+273
+274    page_adjust -- int (to add or subtract to the page number)
+275    """
+276
+277    _tag = "text:page-number"
+278    _properties = (
+279        PropDef("select_page", "text:select-page"),
+280        PropDef("page_adjust", "text:page-adjust"),
+281    )
+282
+283    def __init__(
+284        self,
+285        select_page: str | None = None,
+286        page_adjust: str | None = None,
+287        **kwargs: Any,
+288    ) -> None:
+289        super().__init__(**kwargs)
+290        if self._do_init:
+291            if select_page is None:
+292                select_page = "current"
+293            self.select_page = select_page
+294            if page_adjust is not None:
+295                self.page_adjust = page_adjust
+
+ + +

select_page -- string in ('previous', 'current', 'next')

+ +

page_adjust -- int (to add or subtract to the page number)

+
+ + +
+ +
+ + VarPageNumber( select_page: str | None = None, page_adjust: str | None = None, **kwargs: Any) + + + +
+ +
283    def __init__(
+284        self,
+285        select_page: str | None = None,
+286        page_adjust: str | None = None,
+287        **kwargs: Any,
+288    ) -> None:
+289        super().__init__(**kwargs)
+290        if self._do_init:
+291            if select_page is None:
+292                select_page = "current"
+293            self.select_page = select_page
+294            if page_adjust is not None:
+295                self.page_adjust = page_adjust
+
+ + + + +
+
+ +
+ select_page: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ page_adjust: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarSet(odfdo.ElementTyped): + + + +
+ +
 64class VarSet(ElementTyped):
+ 65    _tag = "text:variable-set"
+ 66    _properties = (
+ 67        PropDef("name", "text:name"),
+ 68        PropDef("style", "style:data-style-name"),
+ 69        PropDef("display", "text:display"),
+ 70    )
+ 71
+ 72    def __init__(
+ 73        self,
+ 74        name: str | None = None,
+ 75        value: Any = None,
+ 76        value_type: str | None = None,
+ 77        display: str | bool = False,
+ 78        text: str | None = None,
+ 79        style: str | None = None,
+ 80        **kwargs: Any,
+ 81    ) -> None:
+ 82        super().__init__(**kwargs)
+ 83        if self._do_init:
+ 84            if name:
+ 85                self.name = name
+ 86            if style:
+ 87                self.style = style
+ 88            text = self.set_value_and_type(
+ 89                value=value, value_type=value_type, text=text
+ 90            )
+ 91            if not display:
+ 92                self.display = "none"
+ 93            else:
+ 94                self.text = text  # type: ignore
+ 95
+ 96    def set_value(self, value: Any) -> None:
+ 97        name = self.get_attribute("text:name")
+ 98        display = self.get_attribute("text:display")
+ 99        self.clear()
+100        text = self.set_value_and_type(value=value)
+101        self.set_attribute("text:name", name)
+102        if display is not None:
+103            self.set_attribute("text:display", display)
+104        if isinstance(text, str):
+105            self.text = text
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + VarSet( name: str | None = None, value: Any = None, value_type: str | None = None, display: str | bool = False, text: str | None = None, style: str | None = None, **kwargs: Any) + + + +
+ +
72    def __init__(
+73        self,
+74        name: str | None = None,
+75        value: Any = None,
+76        value_type: str | None = None,
+77        display: str | bool = False,
+78        text: str | None = None,
+79        style: str | None = None,
+80        **kwargs: Any,
+81    ) -> None:
+82        super().__init__(**kwargs)
+83        if self._do_init:
+84            if name:
+85                self.name = name
+86            if style:
+87                self.style = style
+88            text = self.set_value_and_type(
+89                value=value, value_type=value_type, text=text
+90            )
+91            if not display:
+92                self.display = "none"
+93            else:
+94                self.text = text  # type: ignore
+
+ + + + +
+
+ +
+ + def + set_value(self, value: Any) -> None: + + + +
+ +
 96    def set_value(self, value: Any) -> None:
+ 97        name = self.get_attribute("text:name")
+ 98        display = self.get_attribute("text:display")
+ 99        self.clear()
+100        text = self.set_value_and_type(value=value)
+101        self.set_attribute("text:name", name)
+102        if display is not None:
+103            self.set_attribute("text:display", display)
+104        if isinstance(text, str):
+105            self.text = text
+
+ + + + +
+
+ +
+ name: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ display: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+ +
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarSubject(odfdo.VarInitialCreator): + + + +
+ +
518class VarSubject(VarInitialCreator):
+519    _tag = "text:subject"
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ fixed: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+ +
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarTime(odfdo.Element): + + + +
+ +
341class VarTime(Element):
+342    _tag = "text:time"
+343    _properties = (
+344        PropDef("time", "text:time-value"),
+345        PropDef("fixed", "text:fixed"),
+346        PropDef("data_style", "style:data-style-name"),
+347        PropDef("time_adjust", "text:time-adjust"),
+348    )
+349
+350    def __init__(
+351        self,
+352        time: datetime,
+353        fixed: bool = False,
+354        data_style: str | None = None,
+355        text: str | None = None,
+356        time_adjust: timedelta | None = None,
+357        **kwargs: Any,
+358    ) -> None:
+359        super().__init__(**kwargs)
+360        if self._do_init:
+361            self.time = DateTime.encode(time)
+362            if fixed:
+363                self.fixed = True
+364            if data_style is not None:
+365                self.data_style = data_style
+366            if text is None:
+367                text = time.strftime("%H:%M:%S")
+368            self.text = text
+369            if time_adjust is not None:
+370                self.date_adjust = Duration.encode(time_adjust)
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ + VarTime( time: datetime.datetime, fixed: bool = False, data_style: str | None = None, text: str | None = None, time_adjust: datetime.timedelta | None = None, **kwargs: Any) + + + +
+ +
350    def __init__(
+351        self,
+352        time: datetime,
+353        fixed: bool = False,
+354        data_style: str | None = None,
+355        text: str | None = None,
+356        time_adjust: timedelta | None = None,
+357        **kwargs: Any,
+358    ) -> None:
+359        super().__init__(**kwargs)
+360        if self._do_init:
+361            self.time = DateTime.encode(time)
+362            if fixed:
+363                self.fixed = True
+364            if data_style is not None:
+365                self.data_style = data_style
+366            if text is None:
+367                text = time.strftime("%H:%M:%S")
+368            self.text = text
+369            if time_adjust is not None:
+370                self.date_adjust = Duration.encode(time_adjust)
+
+ + + + +
+
+ +
+ time: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ fixed: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ data_style: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+ +
+ time_adjust: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + VarTitle(odfdo.VarInitialCreator): + + + +
+ +
511class VarTitle(VarInitialCreator):
+512    _tag = "text:title"
+
+ + +

Super class of all ODF classes.

+ +

Representation of an XML element. Abstraction of the XML library behind.

+
+ + +
+ +
+ fixed: str | bool | None + + + +
+ +
394        def getter(self: Element) -> str | bool | None:
+395            try:
+396                if family and self.family != family:  # type: ignore
+397                    return None
+398            except AttributeError:
+399                return None
+400            value = self.__element.get(name)
+401            if value is None:
+402                return None
+403            elif value in ("true", "false"):
+404                return Boolean.decode(value)
+405            return str(value)
+
+ + + + +
+
+
Inherited Members
+
+ +
Element
+
from_tag
+
from_tag_for_clone
+
make_etree_element
+
tag
+
elements_repeated_sequence
+
get_elements
+
get_element
+
attributes
+
get_attribute
+
get_attribute_integer
+
get_attribute_string
+
set_attribute
+
set_style_attribute
+
del_attribute
+
text
+
text_recursive
+
tail
+
search
+
match
+
replace
+
root
+
parent
+
is_bound
+
children
+
index
+
text_content
+
is_empty
+
get_between
+
insert
+
extend
+
append
+
delete
+
replace_element
+
strip_elements
+
strip_tags
+
xpath
+
clear
+
clone
+
serialize
+
document_body
+
get_formatted_text
+
get_styled_elements
+
dc_creator
+
dc_date
+
svg_title
+
svg_description
+
get_sections
+
get_section
+
get_paragraphs
+
get_paragraph
+
get_spans
+
get_span
+
get_headers
+
get_header
+
get_lists
+
get_list
+
get_frames
+
get_frame
+
get_images
+
get_image
+
get_tables
+
get_table
+
get_named_ranges
+
get_named_range
+
append_named_range
+
delete_named_range
+
get_notes
+
get_note
+
get_annotations
+
get_annotation
+
get_annotation_ends
+
get_annotation_end
+
get_office_names
+
get_variable_decls
+
get_variable_decl_list
+
get_variable_decl
+
get_variable_sets
+
get_variable_set
+
get_variable_set_value
+
get_user_field_decls
+
get_user_field_decl_list
+
get_user_field_decl
+
get_user_field_value
+
get_user_defined_list
+
get_user_defined
+
get_user_defined_value
+
get_draw_pages
+
get_draw_page
+ + +
get_bookmarks
+
get_bookmark
+
get_bookmark_starts
+
get_bookmark_start
+
get_bookmark_ends
+
get_bookmark_end
+
get_reference_marks_single
+
get_reference_mark_single
+
get_reference_mark_starts
+
get_reference_mark_start
+
get_reference_mark_ends
+
get_reference_mark_end
+
get_reference_marks
+
get_reference_mark
+
get_references
+
get_draw_groups
+
get_draw_group
+
get_draw_lines
+
get_draw_line
+
get_draw_rectangles
+
get_draw_rectangle
+
get_draw_ellipses
+
get_draw_ellipse
+
get_draw_connectors
+
get_draw_connector
+
get_orphan_draw_connectors
+
get_tracked_changes
+
get_changes_ids
+
get_text_change_deletions
+
get_text_change_deletion
+
get_text_change_starts
+
get_text_change_start
+
get_text_change_ends
+
get_text_change_end
+
get_text_changes
+
get_text_change
+
get_tocs
+
get_toc
+
get_styles
+
get_style
+ +
+
+
+
+
+ +
+ + class + XmlPart: + + + +
+ +
 37class XmlPart:
+ 38    """Representation of an XML part.
+ 39
+ 40    Abstraction of the XML library behind.
+ 41    """
+ 42
+ 43    def __init__(self, part_name: str, container: Container) -> None:
+ 44        self.part_name = part_name
+ 45        self.container = container
+ 46
+ 47        # Internal state
+ 48        self.__tree: _ElementTree | None = None
+ 49        self.__root: Element | None = None
+ 50
+ 51    def _get_tree(self) -> _ElementTree:
+ 52        if self.__tree is None:
+ 53            part = self.container.get_part(self.part_name)
+ 54            self.__tree = parse(BytesIO(part))  # type: ignore
+ 55        return self.__tree
+ 56
+ 57    def __repr__(self) -> str:
+ 58        return f"<{self.__class__.__name__} part_name={self.part_name}>"
+ 59
+ 60    # Public API
+ 61
+ 62    @property
+ 63    def root(self) -> Element:
+ 64        if self.__root is None:
+ 65            tree = self._get_tree()
+ 66            self.__root = Element.from_tag(tree.getroot())
+ 67        return self.__root
+ 68
+ 69    def get_elements(self, xpath_query: str) -> list[Element | Text]:
+ 70        root = self.root
+ 71        return root.xpath(xpath_query)
+ 72
+ 73    def get_element(self, xpath_query: str) -> Any:
+ 74        result = self.get_elements(xpath_query)
+ 75        if not result:
+ 76            return None
+ 77        return result[0]
+ 78
+ 79    def delete_element(self, child: Element) -> None:
+ 80        child.delete()
+ 81
+ 82    def xpath(self, xpath_query: str) -> list[Element | Text]:
+ 83        """Apply XPath query to the XML part. Return list of Element or
+ 84        Text instances translated from the nodes found.
+ 85        """
+ 86        root = self.root
+ 87        return root.xpath(xpath_query)
+ 88
+ 89    @property
+ 90    def clone(self) -> XmlPart:
+ 91        clone = object.__new__(self.__class__)
+ 92        for name in self.__dict__:
+ 93            if name == "container":
+ 94                setattr(clone, name, self.container.clone)
+ 95            elif name in ("_XmlPart__tree",):
+ 96                setattr(clone, name, None)
+ 97            else:
+ 98                value = getattr(self, name)
+ 99                value = deepcopy(value)
+100                setattr(clone, name, value)
+101        return clone
+102
+103    def serialize(self, pretty: bool = False) -> bytes:
+104        tree = self._get_tree()
+105        # Lxml declaration is too exotic to me
+106        data = [b'<?xml version="1.0" encoding="UTF-8"?>']
+107        bytes_tree = tostring(tree, pretty_print=pretty, encoding="utf-8")
+108        # Lxml with pretty_print is adding a empty line
+109        if pretty:
+110            bytes_tree = bytes_tree.strip()
+111        data.append(bytes_tree)
+112        return b"\n".join(data)
+
+ + +

Representation of an XML part.

+ +

Abstraction of the XML library behind.

+
+ + +
+ +
+ + XmlPart(part_name: str, container: Container) + + + +
+ +
43    def __init__(self, part_name: str, container: Container) -> None:
+44        self.part_name = part_name
+45        self.container = container
+46
+47        # Internal state
+48        self.__tree: _ElementTree | None = None
+49        self.__root: Element | None = None
+
+ + + + +
+
+
+ part_name + + +
+ + + + +
+
+
+ container + + +
+ + + + +
+
+ +
+ root: Element + + + +
+ +
62    @property
+63    def root(self) -> Element:
+64        if self.__root is None:
+65            tree = self._get_tree()
+66            self.__root = Element.from_tag(tree.getroot())
+67        return self.__root
+
+ + + + +
+
+ +
+ + def + get_elements( self, xpath_query: str) -> list[Element | Text]: + + + +
+ +
69    def get_elements(self, xpath_query: str) -> list[Element | Text]:
+70        root = self.root
+71        return root.xpath(xpath_query)
+
+ + + + +
+
+ +
+ + def + get_element(self, xpath_query: str) -> Any: + + + +
+ +
73    def get_element(self, xpath_query: str) -> Any:
+74        result = self.get_elements(xpath_query)
+75        if not result:
+76            return None
+77        return result[0]
+
+ + + + +
+
+ +
+ + def + delete_element(self, child: Element) -> None: + + + +
+ +
79    def delete_element(self, child: Element) -> None:
+80        child.delete()
+
+ + + + +
+
+ +
+ + def + xpath( self, xpath_query: str) -> list[Element | Text]: + + + +
+ +
82    def xpath(self, xpath_query: str) -> list[Element | Text]:
+83        """Apply XPath query to the XML part. Return list of Element or
+84        Text instances translated from the nodes found.
+85        """
+86        root = self.root
+87        return root.xpath(xpath_query)
+
+ + +

Apply XPath query to the XML part. Return list of Element or +Text instances translated from the nodes found.

+
+ + +
+
+ +
+ clone: XmlPart + + + +
+ +
 89    @property
+ 90    def clone(self) -> XmlPart:
+ 91        clone = object.__new__(self.__class__)
+ 92        for name in self.__dict__:
+ 93            if name == "container":
+ 94                setattr(clone, name, self.container.clone)
+ 95            elif name in ("_XmlPart__tree",):
+ 96                setattr(clone, name, None)
+ 97            else:
+ 98                value = getattr(self, name)
+ 99                value = deepcopy(value)
+100                setattr(clone, name, value)
+101        return clone
+
+ + + + +
+
+ +
+ + def + serialize(self, pretty: bool = False) -> bytes: + + + +
+ +
103    def serialize(self, pretty: bool = False) -> bytes:
+104        tree = self._get_tree()
+105        # Lxml declaration is too exotic to me
+106        data = [b'<?xml version="1.0" encoding="UTF-8"?>']
+107        bytes_tree = tostring(tree, pretty_print=pretty, encoding="utf-8")
+108        # Lxml with pretty_print is adding a empty line
+109        if pretty:
+110            bytes_tree = bytes_tree.strip()
+111        data.append(bytes_tree)
+112        return b"\n".join(data)
+
+ + + + +
+
+
+
+ __version__ = +'3.7.1' + + +
+ + + + +
+
+ +
+ + def + create_table_cell_style( border: str | None = None, border_top: str | None = None, border_bottom: str | None = None, border_left: str | None = None, border_right: str | None = None, padding: str | None = None, padding_top: str | None = None, padding_bottom: str | None = None, padding_left: str | None = None, padding_right: str | None = None, background_color: str | tuple | None = None, shadow: str | None = None, color: str | tuple | None = None) -> Style: + + + +
+ +
236def create_table_cell_style(
+237    border: str | None = None,
+238    border_top: str | None = None,
+239    border_bottom: str | None = None,
+240    border_left: str | None = None,
+241    border_right: str | None = None,
+242    padding: str | None = None,
+243    padding_top: str | None = None,
+244    padding_bottom: str | None = None,
+245    padding_left: str | None = None,
+246    padding_right: str | None = None,
+247    background_color: str | tuple | None = None,
+248    shadow: str | None = None,
+249    color: str | tuple | None = None,
+250) -> Style:
+251    """Return a cell style.
+252
+253    The borders arguments must be some style attribute strings or None, see the
+254    method 'make_table_cell_border_string' to generate them.
+255    If the 'border' argument as the value 'default', the default style
+256    "0.06pt solid #000000" is used for the 4 borders.
+257    If any value is used for border, it is used for the 4 borders, else any of
+258    the 4 borders can be specified by it's own string. If all the border,
+259    border_top, border_bottom, ... arguments are None, an empty border is used
+260    (ODF value is fo:border="none").
+261
+262    Padding arguments are string specifying a length (e.g. "0.5mm")". If
+263    'padding' is provided, it is used for the 4 sides, else any of
+264    the 4 sides padding can be specified by it's own string. Default padding is
+265    no padding.
+266
+267    Arguments:
+268
+269        border -- str, style string for borders on four sides
+270
+271        border_top -- str, style string for top if no 'border' argument
+272
+273        border_bottom -- str, style string for bottom if no 'border' argument
+274
+275        border_left -- str, style string for left if no 'border' argument
+276
+277        border_right -- str, style string for right if no 'border' argument
+278
+279        padding -- str, style string for padding on four sides
+280
+281        padding_top -- str, style string for top if no 'padding' argument
+282
+283        padding_bottom -- str, style string for bottom if no 'padding' argument
+284
+285        padding_left -- str, style string for left if no 'padding' argument
+286
+287        padding_right -- str, style string for right if no 'padding' argument
+288
+289        background_color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
+290
+291        shadow -- str, e.g. "#808080 0.176cm 0.176cm"
+292
+293        color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
+294
+295    Return : Style
+296    """
+297    if border == "default":
+298        border = make_table_cell_border_string()  # default border
+299    if border is not None:
+300        # use the border value for 4 sides.
+301        border_bottom = border_top = border_left = border_right = None
+302    if (
+303        border is None
+304        and border_bottom is None
+305        and border_top is None
+306        and border_left is None
+307        and border_right is None
+308    ):
+309        border = "none"
+310    if padding is not None:
+311        # use the padding value for 4 sides.
+312        padding_bottom = padding_top = padding_left = padding_right = None
+313    if color:
+314        color_string = _make_color_string(color)
+315    if background_color:
+316        bgcolor_string = _make_color_string(background_color)
+317    else:
+318        bgcolor_string = None
+319    cell_style = Style(
+320        "table-cell",
+321        area="table-cell",
+322        border=border,
+323        border_top=border_top,
+324        border_bottom=border_bottom,
+325        border_left=border_left,
+326        border_right=border_right,
+327        padding=padding,
+328        padding_top=padding_top,
+329        padding_bottom=padding_bottom,
+330        padding_left=padding_left,
+331        padding_right=padding_right,
+332        background_color=bgcolor_string,
+333        shadow=shadow,
+334    )
+335    if color:
+336        cell_style.set_properties(area="text", color=color_string)
+337    return cell_style
+
+ + +

Return a cell style.

+ +

The borders arguments must be some style attribute strings or None, see the +method 'make_table_cell_border_string' to generate them. +If the 'border' argument as the value 'default', the default style +"0.06pt solid #000000" is used for the 4 borders. +If any value is used for border, it is used for the 4 borders, else any of +the 4 borders can be specified by it's own string. If all the border, +border_top, border_bottom, ... arguments are None, an empty border is used +(ODF value is fo:border="none").

+ +

Padding arguments are string specifying a length (e.g. "0.5mm")". If +'padding' is provided, it is used for the 4 sides, else any of +the 4 sides padding can be specified by it's own string. Default padding is +no padding.

+ +

Arguments:

+ +
border -- str, style string for borders on four sides
+
+border_top -- str, style string for top if no 'border' argument
+
+border_bottom -- str, style string for bottom if no 'border' argument
+
+border_left -- str, style string for left if no 'border' argument
+
+border_right -- str, style string for right if no 'border' argument
+
+padding -- str, style string for padding on four sides
+
+padding_top -- str, style string for top if no 'padding' argument
+
+padding_bottom -- str, style string for bottom if no 'padding' argument
+
+padding_left -- str, style string for left if no 'padding' argument
+
+padding_right -- str, style string for right if no 'padding' argument
+
+background_color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
+
+shadow -- str, e.g. "#808080 0.176cm 0.176cm"
+
+color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
+
+ +

Return : Style

+
+ + +
+
+ +
+ + def + default_boolean_style() -> Element: + + + +
+ +
1155def default_boolean_style() -> Element:
+1156    return Element.from_tag(
+1157        """<number:boolean-style style:name="lpod-default-boolean-style">
+1158           <number:boolean/>
+1159           </number:boolean-style>"""
+1160    )
+
+ + + + +
+
+ +
+ + def + default_currency_style() -> Element: + + + +
+ +
1163def default_currency_style() -> Element:
+1164    return Element.from_tag(
+1165        """<number:currency-style style:name="lpod-default-currency-style">
+1166            <number:text>-</number:text>
+1167            <number:number number:decimal-places="2"
+1168             number:min-integer-digits="1"
+1169             number:grouping="true"/>
+1170            <number:text> </number:text>
+1171            <number:currency-symbol
+1172             number:language="fr"
+1173             number:country="FR">€</number:currency-symbol>
+1174           </number:currency-style>"""
+1175    )
+
+ + + + +
+
+ +
+ + def + default_date_style() -> Element: + + + +
+ +
1142def default_date_style() -> Element:
+1143    return Element.from_tag(
+1144        """
+1145           <number:date-style style:name="lpod-default-date-style">
+1146           <number:year number:style="long"/>
+1147           <number:text>-</number:text>
+1148           <number:month number:style="long"/>
+1149           <number:text>-</number:text>
+1150           <number:day number:style="long"/>
+1151           </number:date-style>"""
+1152    )
+
+ + + + +
+
+ +
+ + def + default_frame_position_style( name: str = 'FramePosition', horizontal_pos: str = 'from-left', vertical_pos: str = 'from-top', horizontal_rel: str = 'paragraph', vertical_rel: str = 'paragraph') -> Style: + + + +
+ +
42def default_frame_position_style(
+43    name: str = "FramePosition",
+44    horizontal_pos: str = "from-left",
+45    vertical_pos: str = "from-top",
+46    horizontal_rel: str = "paragraph",
+47    vertical_rel: str = "paragraph",
+48) -> Style:
+49    """Helper style for positioning frames in desktop applications that need
+50    it.
+51
+52    Default arguments should be enough.
+53
+54    Use the returned Style as the frame style or build a new graphic style
+55    with this style as the parent.
+56    """
+57    return Style(
+58        family="graphic",
+59        name=name,
+60        horizontal_pos=horizontal_pos,
+61        horizontal_rel=horizontal_rel,
+62        vertical_pos=vertical_pos,
+63        vertical_rel=vertical_rel,
+64    )
+
+ + +

Helper style for positioning frames in desktop applications that need +it.

+ +

Default arguments should be enough.

+ +

Use the returned Style as the frame style or build a new graphic style +with this style as the parent.

+
+ + +
+
+ +
+ + def + default_number_style() -> Element: + + + +
+ +
1110def default_number_style() -> Element:
+1111    return Element.from_tag(
+1112        """<number:number-style style:name="lpod-default-number-style">
+1113           <number:number number:decimal-places="2"
+1114            number:min-integer-digits="1"/>
+1115           </number:number-style>"""
+1116    )
+
+ + + + +
+
+ +
+ + def + default_percentage_style() -> Element: + + + +
+ +
1119def default_percentage_style() -> Element:
+1120    return Element.from_tag(
+1121        """<number:percentage-style
+1122            style:name="lpod-default-percentage-style">
+1123           <number:number number:decimal-places="2"
+1124            number:min-integer-digits="1"/>
+1125           <number:text>%</number:text>
+1126           </number:percentage-style>"""
+1127    )
+
+ + + + +
+
+ +
+ + def + default_time_style() -> Element: + + + +
+ +
1130def default_time_style() -> Element:
+1131    return Element.from_tag(
+1132        """<number:time-style style:name="lpod-default-time-style">
+1133           <number:hours number:style="long"/>
+1134           <number:text>:</number:text>
+1135           <number:minutes number:style="long"/>
+1136           <number:text>:</number:text>
+1137           <number:seconds number:style="long"/>
+1138           </number:time-style>"""
+1139    )
+
+ + + + +
+
+ +
+ + def + default_toc_level_style(level: int) -> Style: + + + +
+ +
150def default_toc_level_style(level: int) -> Style:
+151    """Generate an automatic default style for the given TOC level."""
+152    tab_stop = TabStopStyle(style_type="right", leader_style="dotted", leader_text=".")
+153    position = 17.5 - (0.5 * level)
+154    tab_stop.style_position = f"{position}cm"
+155    tab_stops = Element.from_tag("style:tab-stops")
+156    tab_stops.append(tab_stop)
+157    properties = Element.from_tag("style:paragraph-properties")
+158    properties.append(tab_stops)
+159    toc_style_level = Style(
+160        family="paragraph",
+161        name=_toc_entry_style_name(level),
+162        parent=f"Contents_20_{level}",
+163    )
+164    toc_style_level.append(properties)
+165    return toc_style_level
+
+ + +

Generate an automatic default style for the given TOC level.

+
+ + +
+
+ +
+ + def + hex2rgb(color: str) -> tuple[int, int, int]: + + + +
+ +
120def hex2rgb(color: str) -> tuple[int, int, int]:
+121    """Turns a "#RRGGBB" hexadecimal color representation into a (R, G, B)
+122    tuple.
+123    Arguments:
+124
+125        color -- str
+126
+127    Return: tuple
+128    """
+129    code = color[1:]
+130    if not (len(color) == 7 and color[0] == "#" and code.isalnum()):
+131        raise ValueError('"%s" is not a valid color' % color)
+132    red = int(code[:2], 16)
+133    green = int(code[2:4], 16)
+134    blue = int(code[4:6], 16)
+135    return (red, green, blue)
+
+ + +

Turns a "#RRGGBB" hexadecimal color representation into a (R, G, B) +tuple. +Arguments:

+ +
color -- str
+
+ +

Return: tuple

+
+ + +
+
+ +
+ + def + make_table_cell_border_string( thick: str | float | int | None = None, line: str | None = None, color: str | tuple | None = None) -> str: + + + +
+ +
216def make_table_cell_border_string(
+217    thick: str | float | int | None = None,
+218    line: str | None = None,
+219    color: str | tuple | None = None,
+220) -> str:
+221    """Returns a string for style:table-cell-properties fo:border,
+222    with default : "0.06pt solid #000000"
+223
+224        thick -- str or float or int
+225        line -- str
+226        color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
+227
+228    Returns : str
+229    """
+230    thick_string = _make_thick_string(thick)
+231    line_string = _make_line_string(line)
+232    color_string = _make_color_string(color)
+233    return " ".join((thick_string, line_string, color_string))
+
+ + +

Returns a string for style:table-cell-properties fo:border, +with default : "0.06pt solid #000000"

+ +
thick -- str or float or int
+line -- str
+color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
+
+ +

Returns : str

+
+ + +
+
+ +
+ + def + rgb2hex(color: str | tuple[int, int, int]) -> str: + + + +
+ +
138def rgb2hex(color: str | tuple[int, int, int]) -> str:
+139    """Turns a color name or a (R, G, B) color tuple into a "#RRGGBB"
+140    hexadecimal representation.
+141    Arguments:
+142
+143        color -- str or tuple
+144
+145    Return: str
+146
+147    Examples::
+148
+149        >>> rgb2hex('yellow')
+150        '#FFFF00'
+151        >>> rgb2hex((238, 130, 238))
+152        '#EE82EE'
+153    """
+154    if isinstance(color, str):
+155        try:
+156            code = CSS3_COLORMAP[color.lower()]
+157        except KeyError as e:
+158            raise KeyError(f'Color "{color}" is unknown') from e
+159    elif isinstance(color, tuple):
+160        if len(color) != 3:
+161            raise ValueError("Color must be a 3-tuple")
+162        code = color
+163    else:
+164        raise TypeError("Invalid color")
+165    for channel in code:
+166        if channel < 0 or channel > 255:
+167            raise ValueError("Color code must be between 0 and 255")
+168    return f"#{code[0]:02X}{code[1]:02X}{code[2]:02X}"
+
+ + +

Turns a color name or a (R, G, B) color tuple into a "#RRGGBB" +hexadecimal representation. +Arguments:

+ +
color -- str or tuple
+
+ +

Return: str

+ +

Examples::

+ +
>>> rgb2hex('yellow')
+'#FFFF00'
+>>> rgb2hex((238, 130, 238))
+'#EE82EE'
+
+
+ + +
+
+ + \ No newline at end of file diff --git a/doc/paragraph.html b/doc/paragraph.html deleted file mode 100644 index c0594bd..0000000 --- a/doc/paragraph.html +++ /dev/null @@ -1,3405 +0,0 @@ - - - - - - -odfdo.paragraph API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.paragraph

-
-
-

Paragraph class for "text:p", Span class for "text:span".

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Paragraph class for "text:p", Span class for "text:span".
-"""
-from __future__ import annotations
-
-import re
-from collections.abc import Callable
-from datetime import datetime
-from functools import wraps  # for keeping trace of docstring with decorators
-from typing import Any
-
-from .bookmark import Bookmark, BookmarkEnd, BookmarkStart
-from .element import FIRST_CHILD, NEXT_SIBLING, Element, PropDef, register_element_class
-from .link import Link
-from .note import Annotation, AnnotationEnd, Note
-from .paragraph_base import LineBreak, ParagraphBase, Spacer, Tab
-from .reference import Reference, ReferenceMark, ReferenceMarkEnd, ReferenceMarkStart
-
-__all__ = [
-    "LineBreak",
-    "PageBreak",
-    "Paragraph",
-    "Spacer",
-    "Span",
-    "Tab",
-]
-
-
-def _by_regex_offset(method: Callable) -> Callable:  # noqa: C901
-    @wraps(method)
-    def wrapper(element: Element, *args: Any, **kwargs: Any) -> None:  # noqa: C901
-        """Insert the result of method(element, ...) at the place matching the
-        regex OR the positional arguments offset and length.
-
-        Arguments:
-
-            method -- wrapped method
-
-            element -- self
-
-            regex -- str, regular expression
-
-            offset -- int
-
-            length -- int
-        """
-        offset = kwargs.get("offset", None)
-        regex = kwargs.get("regex", None)
-        if offset:
-            length = kwargs.get("length", 0)
-            counted = 0
-            for text in element.xpath("//text()"):
-                if len(text) + counted <= offset:  # type: ignore
-                    counted += len(text)  # type: ignore
-                    continue
-                if length > 0:
-                    length = min(length, len(text))  # type: ignore
-                else:
-                    length = len(text)  # type: ignore
-                # Static information about the text node
-                container = text.parent
-                if container is None:
-                    continue
-                upper = container.parent
-                is_text = text.is_text()  # type: ignore
-                start = offset - counted
-                end = start + length
-                # Do not use the text node as it changes at each loop
-                if is_text:
-                    text_str = container.text or ""
-                else:
-                    text_str = container.tail or ""
-                before = text_str[:start]
-                match = text_str[start:end]
-                tail = text_str[end:]
-                result = method(element, match, tail, *args, **kwargs)
-                if is_text:
-                    container.text = before
-                    # Insert as first child
-                    container.insert(result, position=0)
-                else:
-                    container.tail = before
-                    # Insert as next sibling
-                    if upper:
-                        index = upper.index(container)
-                        upper.insert(result, position=index + 1)
-                return
-        if regex:
-            pattern = re.compile(regex)
-            for text in element.xpath("descendant::text()"):
-                # Static information about the text node
-                container = text.parent
-                if container is None:
-                    continue
-                upper = container.parent
-                is_text = text.is_text()  # type: ignore
-                # Group positions are calculated and static, so apply in
-                # reverse order to preserve positions
-                for group in reversed(list(pattern.finditer(text))):
-                    start, end = group.span()
-                    # Do not use the text node as it changes at each loop
-                    if is_text:
-                        text_str = container.text or ""
-                    else:
-                        text_str = container.tail or ""
-                    before = text_str[:start]
-                    match = text_str[start:end]
-                    tail = text_str[end:]
-                    result = method(element, match, tail, *args, **kwargs)
-                    if is_text:
-                        container.text = before
-                        # Insert as first child
-                        container.insert(result, position=0)
-                    else:
-                        container.tail = before
-                        # Insert as next sibling
-                        if upper:
-                            index = upper.index(container)
-                            upper.insert(result, position=index + 1)
-
-    return wrapper
-
-
-class Paragraph(ParagraphBase):
-    """Specialised element for paragraphs "text:p". The "text:p" element
-    represents a paragraph, which is the basic unit of text in an OpenDocument
-    file.
-    """
-
-    _tag = "text:p"
-
-    def __init__(
-        self,
-        text_or_element: str | Element | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ):
-        """Create a paragraph element of the given style containing the optional
-        given text.
-
-        Arguments:
-
-            text -- str or Element
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if isinstance(text_or_element, Element):
-                self.append(text_or_element)
-            else:
-                self.text = text_or_element  # type:ignore
-            if style is not None:
-                self.style = style
-
-    def insert_note(
-        self,
-        note_element: Note | None = None,
-        after: str | Element | None = None,
-        note_class: str = "footnote",
-        note_id: str | None = None,
-        citation: str | None = None,
-        body: str | None = None,
-    ) -> None:
-        if note_element is None:
-            note_element = Note(
-                note_class=note_class, note_id=note_id, citation=citation, body=body
-            )
-        else:
-            # XXX clone or modify the argument?
-            if note_class:
-                note_element.note_class = note_class
-            if note_id:
-                note_element.note_id = note_id
-            if citation:
-                note_element.citation = citation
-            if body:
-                note_element.note_body = body
-        note_element.check_validity()
-        if isinstance(after, str):
-            self._insert(note_element, after=after, main_text=True)
-        elif isinstance(after, Element):
-            after.insert(note_element, FIRST_CHILD)
-        else:
-            self.insert(note_element, FIRST_CHILD)
-
-    def insert_annotation(  # noqa: C901
-        self,
-        annotation_element: Annotation | None = None,
-        before: str | None = None,
-        after: str | Element | None = None,
-        position: int | tuple = 0,
-        content: str | Element | None = None,
-        body: str | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-    ) -> Annotation:
-        """Insert an annotation, at the position defined by the regex (before,
-        after, content) or by positionnal argument (position). If content is
-        provided, the annotation covers the full content regex. Else, the
-        annotation is positionned either 'before' or 'after' provided regex.
-
-        If content is an odf element (ie: paragraph, span, ...), the full inner
-        content is covered by the annotation (of the position just after if
-        content is a single empty tag).
-
-        If content/before or after exists (regex) and return a group of matching
-        positions, the position value is the index of matching place to use.
-
-        annotation_element can contain a previously created annotation, else
-        the annotation is created from the body, creator and optional date
-        (current date by default).
-
-        Arguments:
-
-            annotation_element -- Annotation or None
-
-            before -- str regular expression or None
-
-            after -- str regular expression or Element or None
-
-            content -- str regular expression or None, or Element
-
-            position -- int or tuple of int
-
-            body -- str or Element
-
-            creator -- str
-
-            date -- datetime
-        """
-
-        if annotation_element is None:
-            annotation_element = Annotation(
-                text_or_element=body, creator=creator, date=date, parent=self
-            )
-        else:
-            # XXX clone or modify the argument?
-            if body:
-                annotation_element.note_body = body
-            if creator:
-                annotation_element.dc_creator = creator
-            if date:
-                annotation_element.dc_date = date
-        annotation_element.check_validity()
-
-        # special case: content is an odf element (ie: a paragraph)
-        if isinstance(content, Element):
-            if content.is_empty():
-                content.insert(annotation_element, xmlposition=NEXT_SIBLING)
-                return annotation_element
-            content.insert(annotation_element, start=True)
-            annotation_end = AnnotationEnd(annotation_element)
-            content.append(annotation_end)
-            return annotation_element
-
-        # special case
-        if isinstance(after, Element):
-            after.insert(annotation_element, FIRST_CHILD)
-            return annotation_element
-
-        # With "content" => automatically insert a "start" and an "end"
-        # bookmark
-        if (
-            before is None
-            and after is None
-            and content is not None
-            and isinstance(position, int)
-        ):
-            # Start tag
-            self._insert(
-                annotation_element, before=content, position=position, main_text=True
-            )
-            # End tag
-            annotation_end = AnnotationEnd(annotation_element)
-            self._insert(
-                annotation_end, after=content, position=position, main_text=True
-            )
-            return annotation_element
-
-        # With "(int, int)" =>  automatically insert a "start" and an "end"
-        # bookmark
-        if (
-            before is None
-            and after is None
-            and content is None
-            and isinstance(position, tuple)
-        ):
-            # Start
-            self._insert(annotation_element, position=position[0], main_text=True)
-            # End
-            annotation_end = AnnotationEnd(annotation_element)
-            self._insert(annotation_end, position=position[1], main_text=True)
-            return annotation_element
-
-        # Without "content" nor "position"
-        if content is not None or not isinstance(position, int):
-            raise ValueError("Bad arguments")
-
-        # Insert
-        self._insert(
-            annotation_element,
-            before=before,
-            after=after,
-            position=position,
-            main_text=True,
-        )
-        return annotation_element
-
-    def insert_annotation_end(
-        self,
-        annotation_element: Annotation,
-        before: str | None = None,
-        after: str | None = None,
-        position: int = 0,
-    ) -> AnnotationEnd:
-        """Insert an annotation end tag for an existing annotation. If some end
-        tag already exists, replace it. Annotation end tag is set at the
-        position defined by the regex (before or after).
-
-        If content/before or after (regex) returns a group of matching
-        positions, the position value is the index of matching place to use.
-
-        Arguments:
-
-            annotation_element -- Annotation (mandatory)
-
-            before -- str regular expression or None
-
-            after -- str regular expression or None
-
-            position -- int
-        """
-
-        if annotation_element is None:
-            raise ValueError
-        if not isinstance(annotation_element, Annotation):
-            raise TypeError("Not a <office:annotation> Annotation")
-
-        # remove existing end tag
-        name = annotation_element.name
-        existing_end_tag = self.get_annotation_end(name=name)
-        if existing_end_tag:
-            existing_end_tag.delete()
-
-        # create the end tag
-        end_tag = AnnotationEnd(annotation_element)
-
-        # Insert
-        self._insert(
-            end_tag, before=before, after=after, position=position, main_text=True
-        )
-        return end_tag
-
-    def set_reference_mark(
-        self,
-        name: str,
-        before: str | None = None,
-        after: str | None = None,
-        position: int = 0,
-        content: str | Element | None = None,
-    ) -> Element:
-        """Insert a reference mark, at the position defined by the regex
-        (before, after, content) or by positionnal argument (position). If
-        content is provided, the annotation covers the full range content regex
-        (instances of ReferenceMarkStart and ReferenceMarkEnd are
-        created). Else, an instance of ReferenceMark is positionned either
-        'before' or 'after' provided regex.
-
-        If content is an ODF Element (ie: Paragraph, Span, ...), the full inner
-        content is referenced (of the position just after if content is a single
-        empty tag).
-
-        If content/before or after exists (regex) and return a group of matching
-        positions, the position value is the index of matching place to use.
-
-        Name is mandatory and shall be unique in the document for the preference
-        mark range.
-
-        Arguments:
-
-            name -- str
-
-            before -- str regular expression or None
-
-            after -- str regular expression or None,
-
-            content -- str regular expression or None, or Element
-
-            position -- int or tuple of int
-
-        Return: the created ReferenceMark or ReferenceMarkStart
-        """
-        # special case: content is an odf element (ie: a paragraph)
-        if isinstance(content, Element):
-            if content.is_empty():
-                reference = ReferenceMark(name)
-                content.insert(reference, xmlposition=NEXT_SIBLING)
-                return reference
-            reference_start = ReferenceMarkStart(name)
-            content.insert(reference_start, start=True)
-            reference_end = ReferenceMarkEnd(name)
-            content.append(reference_end)
-            return reference_start
-
-        # With "content" => automatically insert a "start" and an "end"
-        # reference
-        if (
-            before is None
-            and after is None
-            and content is not None
-            and isinstance(position, int)
-        ):
-            # Start tag
-            reference_start = ReferenceMarkStart(name)
-            self._insert(
-                reference_start, before=content, position=position, main_text=True
-            )
-            # End tag
-            reference_end = ReferenceMarkEnd(name)
-            self._insert(
-                reference_end, after=content, position=position, main_text=True
-            )
-            return reference_start
-
-        # With "(int, int)" =>  automatically insert a "start" and an "end"
-        if (
-            before is None
-            and after is None
-            and content is None
-            and isinstance(position, tuple)
-        ):
-            # Start
-            reference_start = ReferenceMarkStart(name)
-            self._insert(reference_start, position=position[0], main_text=True)
-            # End
-            reference_end = ReferenceMarkEnd(name)
-            self._insert(reference_end, position=position[1], main_text=True)
-            return reference_start
-
-        # Without "content" nor "position"
-        if content is not None or not isinstance(position, int):
-            raise ValueError("bad arguments")
-
-        # Insert a positional reference mark
-        reference = ReferenceMark(name)
-        self._insert(
-            reference,
-            before=before,
-            after=after,
-            position=position,
-            main_text=True,
-        )
-        return reference
-
-    def set_reference_mark_end(
-        self,
-        reference_mark: Element,
-        before: str | None = None,
-        after: str | None = None,
-        position: int = 0,
-    ) -> ReferenceMarkEnd:
-        """Insert/move a ReferenceMarkEnd for an existing reference mark. If
-        some end tag already exists, replace it. Reference tag is set at the
-        position defined by the regex (before or after).
-
-        If content/before or after (regex) returns a group of matching
-        positions, the position value is the index of matching place to use.
-
-        Arguments:
-
-            reference_mark -- ReferenceMark or ReferenceMarkStart (mandatory)
-
-            before -- str regular expression or None
-
-            after -- str regular expression or None
-
-            position -- int
-        """
-        if not isinstance(reference_mark, (ReferenceMark, ReferenceMarkStart)):
-            raise TypeError("Not a ReferenceMark or ReferenceMarkStart")
-        name = reference_mark.name
-        if isinstance(reference_mark, ReferenceMark):
-            # change it to a range reference:
-            reference_mark.tag = ReferenceMarkStart._tag
-
-        existing_end_tag = self.get_reference_mark_end(name=name)
-        if existing_end_tag:
-            existing_end_tag.delete()
-
-        # create the end tag
-        end_tag = ReferenceMarkEnd(name)
-
-        # Insert
-        self._insert(
-            end_tag, before=before, after=after, position=position, main_text=True
-        )
-        return end_tag
-
-    def insert_variable(self, variable_element: Element, after: str | None) -> None:
-        self._insert(variable_element, after=after, main_text=True)
-
-    @_by_regex_offset
-    def set_span(
-        self,
-        match: str,
-        tail: str,
-        style: str,
-        regex: str | None = None,
-        offset: int | None = None,
-        length: int = 0,
-    ) -> Span:
-        """
-        set_span(style, regex=None, offset=None, length=0)
-        Apply the given style to text content matching the regex OR the
-        positional arguments offset and length.
-
-        (match, tail: provided by regex decorator)
-
-        Arguments:
-
-            style -- str
-
-            regex -- str regular expression
-
-            offset -- int
-
-            length -- int
-        """
-        span = Span(match, style=style)
-        span.tail = tail
-        return span
-
-    def remove_spans(self, keep_heading: bool = True) -> Element | list:
-        """Send back a copy of the element, without span styles.
-        If keep_heading is True (default), the first level heading style is left
-        unchanged.
-        """
-        strip = (Span._tag,)
-        if keep_heading:
-            protect = ("text:h",)
-        else:
-            protect = None
-        return self.strip_tags(strip=strip, protect=protect)
-
-    def remove_span(self, spans: Element | list[Element]) -> Element | list:
-        """Send back a copy of the element, the spans (not a clone) removed.
-
-        Arguments:
-
-            spans -- Element or list of Element
-        """
-        return self.strip_elements(spans)
-
-    @_by_regex_offset
-    def set_link(
-        self,
-        match: str,
-        tail: str,
-        url: str,
-        regex: str | None = None,
-        offset: int | None = None,
-        length: int = 0,
-    ) -> Element:
-        """
-        set_link(url, regex=None, offset=None, length=0)
-        Make a link to the provided url from text content matching the regex
-        OR the positional arguments offset and length.
-
-        (match, tail: provided by regex decorator)
-
-        Arguments:
-
-            url -- str
-
-            regex -- str regular expression
-
-            offset -- int
-
-            length -- int
-        """
-        link = Link(url, text=match)
-        link.tail = tail
-        return link
-
-    def remove_links(self) -> Element | list:
-        """Send back a copy of the element, without links tags."""
-        strip = (Link._tag,)
-        return self.strip_tags(strip=strip)
-
-    def remove_link(self, links: Link | list[Link]) -> Element | list:
-        """Send back a copy of the element (not a clone), with the sub links
-           removed.
-
-        Arguments:
-
-            links -- Link or list of Link
-        """
-        return self.strip_elements(links)
-
-    def insert_reference(
-        self,
-        name: str,
-        ref_format: str = "",
-        before: str | None = None,
-        after: str | Element | None = None,
-        position: int = 0,
-        display: str | None = None,
-    ) -> None:
-        """Create and insert a reference to a content marked by a reference
-        mark. The Reference element ("text:reference-ref") represents a
-        field that references a "text:reference-mark-start" or
-        "text:reference-mark" element. Its "text:reference-format" attribute
-        specifies what is displayed from the referenced element. Default is
-        'page'. Actual content is not automatically updated except for the 'text'
-        format.
-
-        name is mandatory and should represent an existing reference mark of the
-        document.
-
-        ref_format is the argument for format reference (default is 'page').
-
-        The reference is inserted the position defined by the regex (before /
-        after), or by positionnal argument (position). If 'display' is provided,
-        it will be used as the text value for the reference.
-
-        If after is an ODF Element, the reference is inserted as first child of
-        this element.
-
-        Arguments:
-
-            name -- str
-
-            ref_format -- one of : 'chapter', 'direction', 'page', 'text',
-                                    'caption', 'category-and-value', 'value',
-                                    'number', 'number-all-superior',
-                                    'number-no-superior'
-
-            before -- str regular expression or None
-
-            after -- str regular expression or odf element or None
-
-            position -- int
-
-            display -- str or None
-        """
-        reference = Reference(name, ref_format)
-        if display is None and ref_format == "text":
-            # get reference content
-            body = self.document_body
-            if not body:
-                body = self.root
-            mark = body.get_reference_mark(name=name)
-            if mark:
-                display = mark.referenced_text  # type: ignore
-        if not display:
-            display = " "
-        reference.text = display
-        if isinstance(after, Element):
-            after.insert(reference, FIRST_CHILD)
-        else:
-            self._insert(
-                reference, before=before, after=after, position=position, main_text=True
-            )
-
-    def set_bookmark(
-        self,
-        name: str,
-        before: str | None = None,
-        after: str | None = None,
-        position: int | tuple = 0,
-        role: str | None = None,
-        content: str | None = None,
-    ) -> Element | tuple[Element, Element]:
-        """Insert a bookmark before or after the characters in the text which
-        match the regex before/after. When the regex matches more of one part
-        of the text, position can be set to choose which part must be used.
-        If before and after are None, we use only position that is the number
-        of characters.
-
-        So, by default, this function inserts a bookmark before the first
-        character of the content. Role can be None, "start" or "end", we
-        insert respectively a position bookmark a bookmark-start or a
-        bookmark-end.
-
-        If content is not None these 2 calls are equivalent:
-
-          paragraph.set_bookmark("bookmark", content="xyz")
-
-        and:
-
-          paragraph.set_bookmark("bookmark", before="xyz", role="start")
-          paragraph.set_bookmark("bookmark", after="xyz", role="end")
-
-
-        If position is a 2-tuple, these 2 calls are equivalent:
-
-          paragraph.set_bookmark("bookmark", position=(10, 20))
-
-        and:
-
-          paragraph.set_bookmark("bookmark", position=10, role="start")
-          paragraph.set_bookmark("bookmark", position=20, role="end")
-
-
-        Arguments:
-
-            name -- str
-
-            before -- str regex
-
-            after -- str regex
-
-            position -- int or (int, int)
-
-            role -- None, "start" or "end"
-
-            content -- str regex
-        """
-        # With "content" => automatically insert a "start" and an "end"
-        # bookmark
-        if (
-            before is None
-            and after is None
-            and role is None
-            and content is not None
-            and isinstance(position, int)
-        ):
-            # Start
-            start = BookmarkStart(name)
-            self._insert(start, before=content, position=position, main_text=True)
-            # End
-            end = BookmarkEnd(name)
-            self._insert(end, after=content, position=position, main_text=True)
-            return start, end
-
-        # With "(int, int)" =>  automatically insert a "start" and an "end"
-        # bookmark
-        if (
-            before is None
-            and after is None
-            and role is None
-            and content is None
-            and isinstance(position, tuple)
-        ):
-            # Start
-            start = BookmarkStart(name)
-            self._insert(start, position=position[0], main_text=True)
-            # End
-            end = BookmarkEnd(name)
-            self._insert(end, position=position[1], main_text=True)
-            return start, end
-
-        # Without "content" nor "position"
-        if content is not None or not isinstance(position, int):
-            raise ValueError("bad arguments")
-
-        # Role
-        if role is None:
-            bookmark: Element = Bookmark(name)
-        elif role == "start":
-            bookmark = BookmarkStart(name)
-        elif role == "end":
-            bookmark = BookmarkEnd(name)
-        else:
-            raise ValueError("bad arguments")
-
-        # Insert
-        self._insert(
-            bookmark, before=before, after=after, position=position, main_text=True
-        )
-
-        return bookmark
-
-
-class Span(Paragraph):
-    """Create a span element "text:span" of the given style containing the optional
-    given text.
-    """
-
-    _tag = "text:span"
-    _properties = (
-        PropDef("style", "text:style-name"),
-        PropDef("class_names", "text:class-names"),
-    )
-
-    def __init__(
-        self,
-        text: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """
-        Arguments:
-
-            text -- str
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if text:
-                self.text = text
-            if style:
-                self.style = style
-
-
-def PageBreak() -> Paragraph:
-    """Return an empty paragraph with a manual page break.
-
-    Using this function requires to register the page break style with:
-        document.add_page_break_style()
-    """
-    return Paragraph("", style="odfdopagebreak")
-
-
-Span._define_attribut_property()
-
-register_element_class(Span)
-register_element_class(Paragraph)
-
-
-
-
-
-
-
-

Functions

-
-
-def PageBreak() ‑> Paragraph -
-
-

Return an empty paragraph with a manual page break.

-

Using this function requires to register the page break style with: -document.add_page_break_style()

-
- -Expand source code - -
def PageBreak() -> Paragraph:
-    """Return an empty paragraph with a manual page break.
-
-    Using this function requires to register the page break style with:
-        document.add_page_break_style()
-    """
-    return Paragraph("", style="odfdopagebreak")
-
-
-
-
-
-

Classes

-
-
-class LineBreak -(**kwargs: Any) -
-
-

This element represents a line break "text:line-break"

-
- -Expand source code - -
class LineBreak(Element):
-    """This element represents a line break "text:line-break" """
-
-    _tag = "text:line-break"
-
-    def __init__(self, **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-
-

Ancestors

- -

Inherited members

- -
-
-class Paragraph -(text_or_element: str | Element | None = None, style: str | None = None, **kwargs: Any) -
-
-

Specialised element for paragraphs "text:p". The "text:p" element -represents a paragraph, which is the basic unit of text in an OpenDocument -file.

-

Create a paragraph element of the given style containing the optional -given text.

-

Arguments

-

text – str or Element

-

style – str

-
- -Expand source code - -
class Paragraph(ParagraphBase):
-    """Specialised element for paragraphs "text:p". The "text:p" element
-    represents a paragraph, which is the basic unit of text in an OpenDocument
-    file.
-    """
-
-    _tag = "text:p"
-
-    def __init__(
-        self,
-        text_or_element: str | Element | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ):
-        """Create a paragraph element of the given style containing the optional
-        given text.
-
-        Arguments:
-
-            text -- str or Element
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if isinstance(text_or_element, Element):
-                self.append(text_or_element)
-            else:
-                self.text = text_or_element  # type:ignore
-            if style is not None:
-                self.style = style
-
-    def insert_note(
-        self,
-        note_element: Note | None = None,
-        after: str | Element | None = None,
-        note_class: str = "footnote",
-        note_id: str | None = None,
-        citation: str | None = None,
-        body: str | None = None,
-    ) -> None:
-        if note_element is None:
-            note_element = Note(
-                note_class=note_class, note_id=note_id, citation=citation, body=body
-            )
-        else:
-            # XXX clone or modify the argument?
-            if note_class:
-                note_element.note_class = note_class
-            if note_id:
-                note_element.note_id = note_id
-            if citation:
-                note_element.citation = citation
-            if body:
-                note_element.note_body = body
-        note_element.check_validity()
-        if isinstance(after, str):
-            self._insert(note_element, after=after, main_text=True)
-        elif isinstance(after, Element):
-            after.insert(note_element, FIRST_CHILD)
-        else:
-            self.insert(note_element, FIRST_CHILD)
-
-    def insert_annotation(  # noqa: C901
-        self,
-        annotation_element: Annotation | None = None,
-        before: str | None = None,
-        after: str | Element | None = None,
-        position: int | tuple = 0,
-        content: str | Element | None = None,
-        body: str | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-    ) -> Annotation:
-        """Insert an annotation, at the position defined by the regex (before,
-        after, content) or by positionnal argument (position). If content is
-        provided, the annotation covers the full content regex. Else, the
-        annotation is positionned either 'before' or 'after' provided regex.
-
-        If content is an odf element (ie: paragraph, span, ...), the full inner
-        content is covered by the annotation (of the position just after if
-        content is a single empty tag).
-
-        If content/before or after exists (regex) and return a group of matching
-        positions, the position value is the index of matching place to use.
-
-        annotation_element can contain a previously created annotation, else
-        the annotation is created from the body, creator and optional date
-        (current date by default).
-
-        Arguments:
-
-            annotation_element -- Annotation or None
-
-            before -- str regular expression or None
-
-            after -- str regular expression or Element or None
-
-            content -- str regular expression or None, or Element
-
-            position -- int or tuple of int
-
-            body -- str or Element
-
-            creator -- str
-
-            date -- datetime
-        """
-
-        if annotation_element is None:
-            annotation_element = Annotation(
-                text_or_element=body, creator=creator, date=date, parent=self
-            )
-        else:
-            # XXX clone or modify the argument?
-            if body:
-                annotation_element.note_body = body
-            if creator:
-                annotation_element.dc_creator = creator
-            if date:
-                annotation_element.dc_date = date
-        annotation_element.check_validity()
-
-        # special case: content is an odf element (ie: a paragraph)
-        if isinstance(content, Element):
-            if content.is_empty():
-                content.insert(annotation_element, xmlposition=NEXT_SIBLING)
-                return annotation_element
-            content.insert(annotation_element, start=True)
-            annotation_end = AnnotationEnd(annotation_element)
-            content.append(annotation_end)
-            return annotation_element
-
-        # special case
-        if isinstance(after, Element):
-            after.insert(annotation_element, FIRST_CHILD)
-            return annotation_element
-
-        # With "content" => automatically insert a "start" and an "end"
-        # bookmark
-        if (
-            before is None
-            and after is None
-            and content is not None
-            and isinstance(position, int)
-        ):
-            # Start tag
-            self._insert(
-                annotation_element, before=content, position=position, main_text=True
-            )
-            # End tag
-            annotation_end = AnnotationEnd(annotation_element)
-            self._insert(
-                annotation_end, after=content, position=position, main_text=True
-            )
-            return annotation_element
-
-        # With "(int, int)" =>  automatically insert a "start" and an "end"
-        # bookmark
-        if (
-            before is None
-            and after is None
-            and content is None
-            and isinstance(position, tuple)
-        ):
-            # Start
-            self._insert(annotation_element, position=position[0], main_text=True)
-            # End
-            annotation_end = AnnotationEnd(annotation_element)
-            self._insert(annotation_end, position=position[1], main_text=True)
-            return annotation_element
-
-        # Without "content" nor "position"
-        if content is not None or not isinstance(position, int):
-            raise ValueError("Bad arguments")
-
-        # Insert
-        self._insert(
-            annotation_element,
-            before=before,
-            after=after,
-            position=position,
-            main_text=True,
-        )
-        return annotation_element
-
-    def insert_annotation_end(
-        self,
-        annotation_element: Annotation,
-        before: str | None = None,
-        after: str | None = None,
-        position: int = 0,
-    ) -> AnnotationEnd:
-        """Insert an annotation end tag for an existing annotation. If some end
-        tag already exists, replace it. Annotation end tag is set at the
-        position defined by the regex (before or after).
-
-        If content/before or after (regex) returns a group of matching
-        positions, the position value is the index of matching place to use.
-
-        Arguments:
-
-            annotation_element -- Annotation (mandatory)
-
-            before -- str regular expression or None
-
-            after -- str regular expression or None
-
-            position -- int
-        """
-
-        if annotation_element is None:
-            raise ValueError
-        if not isinstance(annotation_element, Annotation):
-            raise TypeError("Not a <office:annotation> Annotation")
-
-        # remove existing end tag
-        name = annotation_element.name
-        existing_end_tag = self.get_annotation_end(name=name)
-        if existing_end_tag:
-            existing_end_tag.delete()
-
-        # create the end tag
-        end_tag = AnnotationEnd(annotation_element)
-
-        # Insert
-        self._insert(
-            end_tag, before=before, after=after, position=position, main_text=True
-        )
-        return end_tag
-
-    def set_reference_mark(
-        self,
-        name: str,
-        before: str | None = None,
-        after: str | None = None,
-        position: int = 0,
-        content: str | Element | None = None,
-    ) -> Element:
-        """Insert a reference mark, at the position defined by the regex
-        (before, after, content) or by positionnal argument (position). If
-        content is provided, the annotation covers the full range content regex
-        (instances of ReferenceMarkStart and ReferenceMarkEnd are
-        created). Else, an instance of ReferenceMark is positionned either
-        'before' or 'after' provided regex.
-
-        If content is an ODF Element (ie: Paragraph, Span, ...), the full inner
-        content is referenced (of the position just after if content is a single
-        empty tag).
-
-        If content/before or after exists (regex) and return a group of matching
-        positions, the position value is the index of matching place to use.
-
-        Name is mandatory and shall be unique in the document for the preference
-        mark range.
-
-        Arguments:
-
-            name -- str
-
-            before -- str regular expression or None
-
-            after -- str regular expression or None,
-
-            content -- str regular expression or None, or Element
-
-            position -- int or tuple of int
-
-        Return: the created ReferenceMark or ReferenceMarkStart
-        """
-        # special case: content is an odf element (ie: a paragraph)
-        if isinstance(content, Element):
-            if content.is_empty():
-                reference = ReferenceMark(name)
-                content.insert(reference, xmlposition=NEXT_SIBLING)
-                return reference
-            reference_start = ReferenceMarkStart(name)
-            content.insert(reference_start, start=True)
-            reference_end = ReferenceMarkEnd(name)
-            content.append(reference_end)
-            return reference_start
-
-        # With "content" => automatically insert a "start" and an "end"
-        # reference
-        if (
-            before is None
-            and after is None
-            and content is not None
-            and isinstance(position, int)
-        ):
-            # Start tag
-            reference_start = ReferenceMarkStart(name)
-            self._insert(
-                reference_start, before=content, position=position, main_text=True
-            )
-            # End tag
-            reference_end = ReferenceMarkEnd(name)
-            self._insert(
-                reference_end, after=content, position=position, main_text=True
-            )
-            return reference_start
-
-        # With "(int, int)" =>  automatically insert a "start" and an "end"
-        if (
-            before is None
-            and after is None
-            and content is None
-            and isinstance(position, tuple)
-        ):
-            # Start
-            reference_start = ReferenceMarkStart(name)
-            self._insert(reference_start, position=position[0], main_text=True)
-            # End
-            reference_end = ReferenceMarkEnd(name)
-            self._insert(reference_end, position=position[1], main_text=True)
-            return reference_start
-
-        # Without "content" nor "position"
-        if content is not None or not isinstance(position, int):
-            raise ValueError("bad arguments")
-
-        # Insert a positional reference mark
-        reference = ReferenceMark(name)
-        self._insert(
-            reference,
-            before=before,
-            after=after,
-            position=position,
-            main_text=True,
-        )
-        return reference
-
-    def set_reference_mark_end(
-        self,
-        reference_mark: Element,
-        before: str | None = None,
-        after: str | None = None,
-        position: int = 0,
-    ) -> ReferenceMarkEnd:
-        """Insert/move a ReferenceMarkEnd for an existing reference mark. If
-        some end tag already exists, replace it. Reference tag is set at the
-        position defined by the regex (before or after).
-
-        If content/before or after (regex) returns a group of matching
-        positions, the position value is the index of matching place to use.
-
-        Arguments:
-
-            reference_mark -- ReferenceMark or ReferenceMarkStart (mandatory)
-
-            before -- str regular expression or None
-
-            after -- str regular expression or None
-
-            position -- int
-        """
-        if not isinstance(reference_mark, (ReferenceMark, ReferenceMarkStart)):
-            raise TypeError("Not a ReferenceMark or ReferenceMarkStart")
-        name = reference_mark.name
-        if isinstance(reference_mark, ReferenceMark):
-            # change it to a range reference:
-            reference_mark.tag = ReferenceMarkStart._tag
-
-        existing_end_tag = self.get_reference_mark_end(name=name)
-        if existing_end_tag:
-            existing_end_tag.delete()
-
-        # create the end tag
-        end_tag = ReferenceMarkEnd(name)
-
-        # Insert
-        self._insert(
-            end_tag, before=before, after=after, position=position, main_text=True
-        )
-        return end_tag
-
-    def insert_variable(self, variable_element: Element, after: str | None) -> None:
-        self._insert(variable_element, after=after, main_text=True)
-
-    @_by_regex_offset
-    def set_span(
-        self,
-        match: str,
-        tail: str,
-        style: str,
-        regex: str | None = None,
-        offset: int | None = None,
-        length: int = 0,
-    ) -> Span:
-        """
-        set_span(style, regex=None, offset=None, length=0)
-        Apply the given style to text content matching the regex OR the
-        positional arguments offset and length.
-
-        (match, tail: provided by regex decorator)
-
-        Arguments:
-
-            style -- str
-
-            regex -- str regular expression
-
-            offset -- int
-
-            length -- int
-        """
-        span = Span(match, style=style)
-        span.tail = tail
-        return span
-
-    def remove_spans(self, keep_heading: bool = True) -> Element | list:
-        """Send back a copy of the element, without span styles.
-        If keep_heading is True (default), the first level heading style is left
-        unchanged.
-        """
-        strip = (Span._tag,)
-        if keep_heading:
-            protect = ("text:h",)
-        else:
-            protect = None
-        return self.strip_tags(strip=strip, protect=protect)
-
-    def remove_span(self, spans: Element | list[Element]) -> Element | list:
-        """Send back a copy of the element, the spans (not a clone) removed.
-
-        Arguments:
-
-            spans -- Element or list of Element
-        """
-        return self.strip_elements(spans)
-
-    @_by_regex_offset
-    def set_link(
-        self,
-        match: str,
-        tail: str,
-        url: str,
-        regex: str | None = None,
-        offset: int | None = None,
-        length: int = 0,
-    ) -> Element:
-        """
-        set_link(url, regex=None, offset=None, length=0)
-        Make a link to the provided url from text content matching the regex
-        OR the positional arguments offset and length.
-
-        (match, tail: provided by regex decorator)
-
-        Arguments:
-
-            url -- str
-
-            regex -- str regular expression
-
-            offset -- int
-
-            length -- int
-        """
-        link = Link(url, text=match)
-        link.tail = tail
-        return link
-
-    def remove_links(self) -> Element | list:
-        """Send back a copy of the element, without links tags."""
-        strip = (Link._tag,)
-        return self.strip_tags(strip=strip)
-
-    def remove_link(self, links: Link | list[Link]) -> Element | list:
-        """Send back a copy of the element (not a clone), with the sub links
-           removed.
-
-        Arguments:
-
-            links -- Link or list of Link
-        """
-        return self.strip_elements(links)
-
-    def insert_reference(
-        self,
-        name: str,
-        ref_format: str = "",
-        before: str | None = None,
-        after: str | Element | None = None,
-        position: int = 0,
-        display: str | None = None,
-    ) -> None:
-        """Create and insert a reference to a content marked by a reference
-        mark. The Reference element ("text:reference-ref") represents a
-        field that references a "text:reference-mark-start" or
-        "text:reference-mark" element. Its "text:reference-format" attribute
-        specifies what is displayed from the referenced element. Default is
-        'page'. Actual content is not automatically updated except for the 'text'
-        format.
-
-        name is mandatory and should represent an existing reference mark of the
-        document.
-
-        ref_format is the argument for format reference (default is 'page').
-
-        The reference is inserted the position defined by the regex (before /
-        after), or by positionnal argument (position). If 'display' is provided,
-        it will be used as the text value for the reference.
-
-        If after is an ODF Element, the reference is inserted as first child of
-        this element.
-
-        Arguments:
-
-            name -- str
-
-            ref_format -- one of : 'chapter', 'direction', 'page', 'text',
-                                    'caption', 'category-and-value', 'value',
-                                    'number', 'number-all-superior',
-                                    'number-no-superior'
-
-            before -- str regular expression or None
-
-            after -- str regular expression or odf element or None
-
-            position -- int
-
-            display -- str or None
-        """
-        reference = Reference(name, ref_format)
-        if display is None and ref_format == "text":
-            # get reference content
-            body = self.document_body
-            if not body:
-                body = self.root
-            mark = body.get_reference_mark(name=name)
-            if mark:
-                display = mark.referenced_text  # type: ignore
-        if not display:
-            display = " "
-        reference.text = display
-        if isinstance(after, Element):
-            after.insert(reference, FIRST_CHILD)
-        else:
-            self._insert(
-                reference, before=before, after=after, position=position, main_text=True
-            )
-
-    def set_bookmark(
-        self,
-        name: str,
-        before: str | None = None,
-        after: str | None = None,
-        position: int | tuple = 0,
-        role: str | None = None,
-        content: str | None = None,
-    ) -> Element | tuple[Element, Element]:
-        """Insert a bookmark before or after the characters in the text which
-        match the regex before/after. When the regex matches more of one part
-        of the text, position can be set to choose which part must be used.
-        If before and after are None, we use only position that is the number
-        of characters.
-
-        So, by default, this function inserts a bookmark before the first
-        character of the content. Role can be None, "start" or "end", we
-        insert respectively a position bookmark a bookmark-start or a
-        bookmark-end.
-
-        If content is not None these 2 calls are equivalent:
-
-          paragraph.set_bookmark("bookmark", content="xyz")
-
-        and:
-
-          paragraph.set_bookmark("bookmark", before="xyz", role="start")
-          paragraph.set_bookmark("bookmark", after="xyz", role="end")
-
-
-        If position is a 2-tuple, these 2 calls are equivalent:
-
-          paragraph.set_bookmark("bookmark", position=(10, 20))
-
-        and:
-
-          paragraph.set_bookmark("bookmark", position=10, role="start")
-          paragraph.set_bookmark("bookmark", position=20, role="end")
-
-
-        Arguments:
-
-            name -- str
-
-            before -- str regex
-
-            after -- str regex
-
-            position -- int or (int, int)
-
-            role -- None, "start" or "end"
-
-            content -- str regex
-        """
-        # With "content" => automatically insert a "start" and an "end"
-        # bookmark
-        if (
-            before is None
-            and after is None
-            and role is None
-            and content is not None
-            and isinstance(position, int)
-        ):
-            # Start
-            start = BookmarkStart(name)
-            self._insert(start, before=content, position=position, main_text=True)
-            # End
-            end = BookmarkEnd(name)
-            self._insert(end, after=content, position=position, main_text=True)
-            return start, end
-
-        # With "(int, int)" =>  automatically insert a "start" and an "end"
-        # bookmark
-        if (
-            before is None
-            and after is None
-            and role is None
-            and content is None
-            and isinstance(position, tuple)
-        ):
-            # Start
-            start = BookmarkStart(name)
-            self._insert(start, position=position[0], main_text=True)
-            # End
-            end = BookmarkEnd(name)
-            self._insert(end, position=position[1], main_text=True)
-            return start, end
-
-        # Without "content" nor "position"
-        if content is not None or not isinstance(position, int):
-            raise ValueError("bad arguments")
-
-        # Role
-        if role is None:
-            bookmark: Element = Bookmark(name)
-        elif role == "start":
-            bookmark = BookmarkStart(name)
-        elif role == "end":
-            bookmark = BookmarkEnd(name)
-        else:
-            raise ValueError("bad arguments")
-
-        # Insert
-        self._insert(
-            bookmark, before=before, after=after, position=position, main_text=True
-        )
-
-        return bookmark
-
-

Ancestors

- -

Subclasses

- -

Methods

-
-
-def insert_annotation(self, annotation_element: Annotation | None = None, before: str | None = None, after: str | Element | None = None, position: int | tuple = 0, content: str | Element | None = None, body: str | None = None, creator: str | None = None, date: datetime | None = None) ‑> Annotation -
-
-

Insert an annotation, at the position defined by the regex (before, -after, content) or by positionnal argument (position). If content is -provided, the annotation covers the full content regex. Else, the -annotation is positionned either 'before' or 'after' provided regex.

-

If content is an odf element (ie: paragraph, span, …), the full inner -content is covered by the annotation (of the position just after if -content is a single empty tag).

-

If content/before or after exists (regex) and return a group of matching -positions, the position value is the index of matching place to use.

-

annotation_element can contain a previously created annotation, else -the annotation is created from the body, creator and optional date -(current date by default).

-

Arguments

-

annotation_element – Annotation or None

-

before – str regular expression or None

-

after – str regular expression or Element or None

-

content – str regular expression or None, or Element

-

position – int or tuple of int

-

body – str or Element

-

creator – str

-

date – datetime

-
- -Expand source code - -
def insert_annotation(  # noqa: C901
-    self,
-    annotation_element: Annotation | None = None,
-    before: str | None = None,
-    after: str | Element | None = None,
-    position: int | tuple = 0,
-    content: str | Element | None = None,
-    body: str | None = None,
-    creator: str | None = None,
-    date: datetime | None = None,
-) -> Annotation:
-    """Insert an annotation, at the position defined by the regex (before,
-    after, content) or by positionnal argument (position). If content is
-    provided, the annotation covers the full content regex. Else, the
-    annotation is positionned either 'before' or 'after' provided regex.
-
-    If content is an odf element (ie: paragraph, span, ...), the full inner
-    content is covered by the annotation (of the position just after if
-    content is a single empty tag).
-
-    If content/before or after exists (regex) and return a group of matching
-    positions, the position value is the index of matching place to use.
-
-    annotation_element can contain a previously created annotation, else
-    the annotation is created from the body, creator and optional date
-    (current date by default).
-
-    Arguments:
-
-        annotation_element -- Annotation or None
-
-        before -- str regular expression or None
-
-        after -- str regular expression or Element or None
-
-        content -- str regular expression or None, or Element
-
-        position -- int or tuple of int
-
-        body -- str or Element
-
-        creator -- str
-
-        date -- datetime
-    """
-
-    if annotation_element is None:
-        annotation_element = Annotation(
-            text_or_element=body, creator=creator, date=date, parent=self
-        )
-    else:
-        # XXX clone or modify the argument?
-        if body:
-            annotation_element.note_body = body
-        if creator:
-            annotation_element.dc_creator = creator
-        if date:
-            annotation_element.dc_date = date
-    annotation_element.check_validity()
-
-    # special case: content is an odf element (ie: a paragraph)
-    if isinstance(content, Element):
-        if content.is_empty():
-            content.insert(annotation_element, xmlposition=NEXT_SIBLING)
-            return annotation_element
-        content.insert(annotation_element, start=True)
-        annotation_end = AnnotationEnd(annotation_element)
-        content.append(annotation_end)
-        return annotation_element
-
-    # special case
-    if isinstance(after, Element):
-        after.insert(annotation_element, FIRST_CHILD)
-        return annotation_element
-
-    # With "content" => automatically insert a "start" and an "end"
-    # bookmark
-    if (
-        before is None
-        and after is None
-        and content is not None
-        and isinstance(position, int)
-    ):
-        # Start tag
-        self._insert(
-            annotation_element, before=content, position=position, main_text=True
-        )
-        # End tag
-        annotation_end = AnnotationEnd(annotation_element)
-        self._insert(
-            annotation_end, after=content, position=position, main_text=True
-        )
-        return annotation_element
-
-    # With "(int, int)" =>  automatically insert a "start" and an "end"
-    # bookmark
-    if (
-        before is None
-        and after is None
-        and content is None
-        and isinstance(position, tuple)
-    ):
-        # Start
-        self._insert(annotation_element, position=position[0], main_text=True)
-        # End
-        annotation_end = AnnotationEnd(annotation_element)
-        self._insert(annotation_end, position=position[1], main_text=True)
-        return annotation_element
-
-    # Without "content" nor "position"
-    if content is not None or not isinstance(position, int):
-        raise ValueError("Bad arguments")
-
-    # Insert
-    self._insert(
-        annotation_element,
-        before=before,
-        after=after,
-        position=position,
-        main_text=True,
-    )
-    return annotation_element
-
-
-
-def insert_annotation_end(self, annotation_element: Annotation, before: str | None = None, after: str | None = None, position: int = 0) ‑> AnnotationEnd -
-
-

Insert an annotation end tag for an existing annotation. If some end -tag already exists, replace it. Annotation end tag is set at the -position defined by the regex (before or after).

-

If content/before or after (regex) returns a group of matching -positions, the position value is the index of matching place to use.

-

Arguments

-

annotation_element – Annotation (mandatory)

-

before – str regular expression or None

-

after – str regular expression or None

-

position – int

-
- -Expand source code - -
def insert_annotation_end(
-    self,
-    annotation_element: Annotation,
-    before: str | None = None,
-    after: str | None = None,
-    position: int = 0,
-) -> AnnotationEnd:
-    """Insert an annotation end tag for an existing annotation. If some end
-    tag already exists, replace it. Annotation end tag is set at the
-    position defined by the regex (before or after).
-
-    If content/before or after (regex) returns a group of matching
-    positions, the position value is the index of matching place to use.
-
-    Arguments:
-
-        annotation_element -- Annotation (mandatory)
-
-        before -- str regular expression or None
-
-        after -- str regular expression or None
-
-        position -- int
-    """
-
-    if annotation_element is None:
-        raise ValueError
-    if not isinstance(annotation_element, Annotation):
-        raise TypeError("Not a <office:annotation> Annotation")
-
-    # remove existing end tag
-    name = annotation_element.name
-    existing_end_tag = self.get_annotation_end(name=name)
-    if existing_end_tag:
-        existing_end_tag.delete()
-
-    # create the end tag
-    end_tag = AnnotationEnd(annotation_element)
-
-    # Insert
-    self._insert(
-        end_tag, before=before, after=after, position=position, main_text=True
-    )
-    return end_tag
-
-
-
-def insert_note(self, note_element: Note | None = None, after: str | Element | None = None, note_class: str = 'footnote', note_id: str | None = None, citation: str | None = None, body: str | None = None) ‑> None -
-
-
-
- -Expand source code - -
def insert_note(
-    self,
-    note_element: Note | None = None,
-    after: str | Element | None = None,
-    note_class: str = "footnote",
-    note_id: str | None = None,
-    citation: str | None = None,
-    body: str | None = None,
-) -> None:
-    if note_element is None:
-        note_element = Note(
-            note_class=note_class, note_id=note_id, citation=citation, body=body
-        )
-    else:
-        # XXX clone or modify the argument?
-        if note_class:
-            note_element.note_class = note_class
-        if note_id:
-            note_element.note_id = note_id
-        if citation:
-            note_element.citation = citation
-        if body:
-            note_element.note_body = body
-    note_element.check_validity()
-    if isinstance(after, str):
-        self._insert(note_element, after=after, main_text=True)
-    elif isinstance(after, Element):
-        after.insert(note_element, FIRST_CHILD)
-    else:
-        self.insert(note_element, FIRST_CHILD)
-
-
-
-def insert_reference(self, name: str, ref_format: str = '', before: str | None = None, after: str | Element | None = None, position: int = 0, display: str | None = None) ‑> None -
-
-

Create and insert a reference to a content marked by a reference -mark. The Reference element ("text:reference-ref") represents a -field that references a "text:reference-mark-start" or -"text:reference-mark" element. Its "text:reference-format" attribute -specifies what is displayed from the referenced element. Default is -'page'. Actual content is not automatically updated except for the 'text' -format.

-

name is mandatory and should represent an existing reference mark of the -document.

-

ref_format is the argument for format reference (default is 'page').

-

The reference is inserted the position defined by the regex (before / -after), or by positionnal argument (position). If 'display' is provided, -it will be used as the text value for the reference.

-

If after is an ODF Element, the reference is inserted as first child of -this element.

-

Arguments

-

name – str

-

ref_format – one of : 'chapter', 'direction', 'page', 'text', -'caption', 'category-and-value', 'value', -'number', 'number-all-superior', -'number-no-superior'

-

before – str regular expression or None

-

after – str regular expression or odf element or None

-

position – int

-

display – str or None

-
- -Expand source code - -
def insert_reference(
-    self,
-    name: str,
-    ref_format: str = "",
-    before: str | None = None,
-    after: str | Element | None = None,
-    position: int = 0,
-    display: str | None = None,
-) -> None:
-    """Create and insert a reference to a content marked by a reference
-    mark. The Reference element ("text:reference-ref") represents a
-    field that references a "text:reference-mark-start" or
-    "text:reference-mark" element. Its "text:reference-format" attribute
-    specifies what is displayed from the referenced element. Default is
-    'page'. Actual content is not automatically updated except for the 'text'
-    format.
-
-    name is mandatory and should represent an existing reference mark of the
-    document.
-
-    ref_format is the argument for format reference (default is 'page').
-
-    The reference is inserted the position defined by the regex (before /
-    after), or by positionnal argument (position). If 'display' is provided,
-    it will be used as the text value for the reference.
-
-    If after is an ODF Element, the reference is inserted as first child of
-    this element.
-
-    Arguments:
-
-        name -- str
-
-        ref_format -- one of : 'chapter', 'direction', 'page', 'text',
-                                'caption', 'category-and-value', 'value',
-                                'number', 'number-all-superior',
-                                'number-no-superior'
-
-        before -- str regular expression or None
-
-        after -- str regular expression or odf element or None
-
-        position -- int
-
-        display -- str or None
-    """
-    reference = Reference(name, ref_format)
-    if display is None and ref_format == "text":
-        # get reference content
-        body = self.document_body
-        if not body:
-            body = self.root
-        mark = body.get_reference_mark(name=name)
-        if mark:
-            display = mark.referenced_text  # type: ignore
-    if not display:
-        display = " "
-    reference.text = display
-    if isinstance(after, Element):
-        after.insert(reference, FIRST_CHILD)
-    else:
-        self._insert(
-            reference, before=before, after=after, position=position, main_text=True
-        )
-
-
-
-def insert_variable(self, variable_element: Element, after: str | None) ‑> None -
-
-
-
- -Expand source code - -
def insert_variable(self, variable_element: Element, after: str | None) -> None:
-    self._insert(variable_element, after=after, main_text=True)
-
-
- -
-

Send back a copy of the element (not a clone), with the sub links -removed.

-

Arguments

-

links – Link or list of Link

-
- -Expand source code - -
def remove_link(self, links: Link | list[Link]) -> Element | list:
-    """Send back a copy of the element (not a clone), with the sub links
-       removed.
-
-    Arguments:
-
-        links -- Link or list of Link
-    """
-    return self.strip_elements(links)
-
-
- -
-

Send back a copy of the element, without links tags.

-
- -Expand source code - -
def remove_links(self) -> Element | list:
-    """Send back a copy of the element, without links tags."""
-    strip = (Link._tag,)
-    return self.strip_tags(strip=strip)
-
-
-
-def remove_span(self, spans: Element | list[Element]) ‑> Element | list -
-
-

Send back a copy of the element, the spans (not a clone) removed.

-

Arguments

-

spans – Element or list of Element

-
- -Expand source code - -
def remove_span(self, spans: Element | list[Element]) -> Element | list:
-    """Send back a copy of the element, the spans (not a clone) removed.
-
-    Arguments:
-
-        spans -- Element or list of Element
-    """
-    return self.strip_elements(spans)
-
-
-
-def remove_spans(self, keep_heading: bool = True) ‑> Element | list -
-
-

Send back a copy of the element, without span styles. -If keep_heading is True (default), the first level heading style is left -unchanged.

-
- -Expand source code - -
def remove_spans(self, keep_heading: bool = True) -> Element | list:
-    """Send back a copy of the element, without span styles.
-    If keep_heading is True (default), the first level heading style is left
-    unchanged.
-    """
-    strip = (Span._tag,)
-    if keep_heading:
-        protect = ("text:h",)
-    else:
-        protect = None
-    return self.strip_tags(strip=strip, protect=protect)
-
-
-
-def set_bookmark(self, name: str, before: str | None = None, after: str | None = None, position: int | tuple = 0, role: str | None = None, content: str | None = None) ‑> Element | tuple[ElementElement] -
-
-

Insert a bookmark before or after the characters in the text which -match the regex before/after. When the regex matches more of one part -of the text, position can be set to choose which part must be used. -If before and after are None, we use only position that is the number -of characters.

-

So, by default, this function inserts a bookmark before the first -character of the content. Role can be None, "start" or "end", we -insert respectively a position bookmark a bookmark-start or a -bookmark-end.

-

If content is not None these 2 calls are equivalent:

-

paragraph.set_bookmark("bookmark", content="xyz")

-

and:

-

paragraph.set_bookmark("bookmark", before="xyz", role="start") -paragraph.set_bookmark("bookmark", after="xyz", role="end")

-

If position is a 2-tuple, these 2 calls are equivalent:

-

paragraph.set_bookmark("bookmark", position=(10, 20))

-

and:

-

paragraph.set_bookmark("bookmark", position=10, role="start") -paragraph.set_bookmark("bookmark", position=20, role="end")

-

Arguments

-

name – str

-

before – str regex

-

after – str regex

-

position – int or (int, int)

-

role – None, "start" or "end"

-

content – str regex

-
- -Expand source code - -
def set_bookmark(
-    self,
-    name: str,
-    before: str | None = None,
-    after: str | None = None,
-    position: int | tuple = 0,
-    role: str | None = None,
-    content: str | None = None,
-) -> Element | tuple[Element, Element]:
-    """Insert a bookmark before or after the characters in the text which
-    match the regex before/after. When the regex matches more of one part
-    of the text, position can be set to choose which part must be used.
-    If before and after are None, we use only position that is the number
-    of characters.
-
-    So, by default, this function inserts a bookmark before the first
-    character of the content. Role can be None, "start" or "end", we
-    insert respectively a position bookmark a bookmark-start or a
-    bookmark-end.
-
-    If content is not None these 2 calls are equivalent:
-
-      paragraph.set_bookmark("bookmark", content="xyz")
-
-    and:
-
-      paragraph.set_bookmark("bookmark", before="xyz", role="start")
-      paragraph.set_bookmark("bookmark", after="xyz", role="end")
-
-
-    If position is a 2-tuple, these 2 calls are equivalent:
-
-      paragraph.set_bookmark("bookmark", position=(10, 20))
-
-    and:
-
-      paragraph.set_bookmark("bookmark", position=10, role="start")
-      paragraph.set_bookmark("bookmark", position=20, role="end")
-
-
-    Arguments:
-
-        name -- str
-
-        before -- str regex
-
-        after -- str regex
-
-        position -- int or (int, int)
-
-        role -- None, "start" or "end"
-
-        content -- str regex
-    """
-    # With "content" => automatically insert a "start" and an "end"
-    # bookmark
-    if (
-        before is None
-        and after is None
-        and role is None
-        and content is not None
-        and isinstance(position, int)
-    ):
-        # Start
-        start = BookmarkStart(name)
-        self._insert(start, before=content, position=position, main_text=True)
-        # End
-        end = BookmarkEnd(name)
-        self._insert(end, after=content, position=position, main_text=True)
-        return start, end
-
-    # With "(int, int)" =>  automatically insert a "start" and an "end"
-    # bookmark
-    if (
-        before is None
-        and after is None
-        and role is None
-        and content is None
-        and isinstance(position, tuple)
-    ):
-        # Start
-        start = BookmarkStart(name)
-        self._insert(start, position=position[0], main_text=True)
-        # End
-        end = BookmarkEnd(name)
-        self._insert(end, position=position[1], main_text=True)
-        return start, end
-
-    # Without "content" nor "position"
-    if content is not None or not isinstance(position, int):
-        raise ValueError("bad arguments")
-
-    # Role
-    if role is None:
-        bookmark: Element = Bookmark(name)
-    elif role == "start":
-        bookmark = BookmarkStart(name)
-    elif role == "end":
-        bookmark = BookmarkEnd(name)
-    else:
-        raise ValueError("bad arguments")
-
-    # Insert
-    self._insert(
-        bookmark, before=before, after=after, position=position, main_text=True
-    )
-
-    return bookmark
-
-
- -
-

set_link(url, regex=None, offset=None, length=0) -Make a link to the provided url from text content matching the regex -OR the positional arguments offset and length.

-

(match, tail: provided by regex decorator)

-

Arguments

-

url – str

-

regex – str regular expression

-

offset – int

-

length – int

-
- -Expand source code - -
@_by_regex_offset
-def set_link(
-    self,
-    match: str,
-    tail: str,
-    url: str,
-    regex: str | None = None,
-    offset: int | None = None,
-    length: int = 0,
-) -> Element:
-    """
-    set_link(url, regex=None, offset=None, length=0)
-    Make a link to the provided url from text content matching the regex
-    OR the positional arguments offset and length.
-
-    (match, tail: provided by regex decorator)
-
-    Arguments:
-
-        url -- str
-
-        regex -- str regular expression
-
-        offset -- int
-
-        length -- int
-    """
-    link = Link(url, text=match)
-    link.tail = tail
-    return link
-
-
-
-def set_reference_mark(self, name: str, before: str | None = None, after: str | None = None, position: int = 0, content: str | Element | None = None) ‑> Element -
-
-

Insert a reference mark, at the position defined by the regex -(before, after, content) or by positionnal argument (position). If -content is provided, the annotation covers the full range content regex -(instances of ReferenceMarkStart and ReferenceMarkEnd are -created). Else, an instance of ReferenceMark is positionned either -'before' or 'after' provided regex.

-

If content is an ODF Element (ie: Paragraph, Span, …), the full inner -content is referenced (of the position just after if content is a single -empty tag).

-

If content/before or after exists (regex) and return a group of matching -positions, the position value is the index of matching place to use.

-

Name is mandatory and shall be unique in the document for the preference -mark range.

-

Arguments

-

name – str

-

before – str regular expression or None

-

after – str regular expression or None,

-

content – str regular expression or None, or Element

-

position – int or tuple of int

-

Return: the created ReferenceMark or ReferenceMarkStart

-
- -Expand source code - -
def set_reference_mark(
-    self,
-    name: str,
-    before: str | None = None,
-    after: str | None = None,
-    position: int = 0,
-    content: str | Element | None = None,
-) -> Element:
-    """Insert a reference mark, at the position defined by the regex
-    (before, after, content) or by positionnal argument (position). If
-    content is provided, the annotation covers the full range content regex
-    (instances of ReferenceMarkStart and ReferenceMarkEnd are
-    created). Else, an instance of ReferenceMark is positionned either
-    'before' or 'after' provided regex.
-
-    If content is an ODF Element (ie: Paragraph, Span, ...), the full inner
-    content is referenced (of the position just after if content is a single
-    empty tag).
-
-    If content/before or after exists (regex) and return a group of matching
-    positions, the position value is the index of matching place to use.
-
-    Name is mandatory and shall be unique in the document for the preference
-    mark range.
-
-    Arguments:
-
-        name -- str
-
-        before -- str regular expression or None
-
-        after -- str regular expression or None,
-
-        content -- str regular expression or None, or Element
-
-        position -- int or tuple of int
-
-    Return: the created ReferenceMark or ReferenceMarkStart
-    """
-    # special case: content is an odf element (ie: a paragraph)
-    if isinstance(content, Element):
-        if content.is_empty():
-            reference = ReferenceMark(name)
-            content.insert(reference, xmlposition=NEXT_SIBLING)
-            return reference
-        reference_start = ReferenceMarkStart(name)
-        content.insert(reference_start, start=True)
-        reference_end = ReferenceMarkEnd(name)
-        content.append(reference_end)
-        return reference_start
-
-    # With "content" => automatically insert a "start" and an "end"
-    # reference
-    if (
-        before is None
-        and after is None
-        and content is not None
-        and isinstance(position, int)
-    ):
-        # Start tag
-        reference_start = ReferenceMarkStart(name)
-        self._insert(
-            reference_start, before=content, position=position, main_text=True
-        )
-        # End tag
-        reference_end = ReferenceMarkEnd(name)
-        self._insert(
-            reference_end, after=content, position=position, main_text=True
-        )
-        return reference_start
-
-    # With "(int, int)" =>  automatically insert a "start" and an "end"
-    if (
-        before is None
-        and after is None
-        and content is None
-        and isinstance(position, tuple)
-    ):
-        # Start
-        reference_start = ReferenceMarkStart(name)
-        self._insert(reference_start, position=position[0], main_text=True)
-        # End
-        reference_end = ReferenceMarkEnd(name)
-        self._insert(reference_end, position=position[1], main_text=True)
-        return reference_start
-
-    # Without "content" nor "position"
-    if content is not None or not isinstance(position, int):
-        raise ValueError("bad arguments")
-
-    # Insert a positional reference mark
-    reference = ReferenceMark(name)
-    self._insert(
-        reference,
-        before=before,
-        after=after,
-        position=position,
-        main_text=True,
-    )
-    return reference
-
-
-
-def set_reference_mark_end(self, reference_mark: Element, before: str | None = None, after: str | None = None, position: int = 0) ‑> ReferenceMarkEnd -
-
-

Insert/move a ReferenceMarkEnd for an existing reference mark. If -some end tag already exists, replace it. Reference tag is set at the -position defined by the regex (before or after).

-

If content/before or after (regex) returns a group of matching -positions, the position value is the index of matching place to use.

-

Arguments

-

reference_mark – ReferenceMark or ReferenceMarkStart (mandatory)

-

before – str regular expression or None

-

after – str regular expression or None

-

position – int

-
- -Expand source code - -
def set_reference_mark_end(
-    self,
-    reference_mark: Element,
-    before: str | None = None,
-    after: str | None = None,
-    position: int = 0,
-) -> ReferenceMarkEnd:
-    """Insert/move a ReferenceMarkEnd for an existing reference mark. If
-    some end tag already exists, replace it. Reference tag is set at the
-    position defined by the regex (before or after).
-
-    If content/before or after (regex) returns a group of matching
-    positions, the position value is the index of matching place to use.
-
-    Arguments:
-
-        reference_mark -- ReferenceMark or ReferenceMarkStart (mandatory)
-
-        before -- str regular expression or None
-
-        after -- str regular expression or None
-
-        position -- int
-    """
-    if not isinstance(reference_mark, (ReferenceMark, ReferenceMarkStart)):
-        raise TypeError("Not a ReferenceMark or ReferenceMarkStart")
-    name = reference_mark.name
-    if isinstance(reference_mark, ReferenceMark):
-        # change it to a range reference:
-        reference_mark.tag = ReferenceMarkStart._tag
-
-    existing_end_tag = self.get_reference_mark_end(name=name)
-    if existing_end_tag:
-        existing_end_tag.delete()
-
-    # create the end tag
-    end_tag = ReferenceMarkEnd(name)
-
-    # Insert
-    self._insert(
-        end_tag, before=before, after=after, position=position, main_text=True
-    )
-    return end_tag
-
-
-
-def set_span(self, match: str, tail: str, style: str, regex: str | None = None, offset: int | None = None, length: int = 0) ‑> Span -
-
-

set_span(style, regex=None, offset=None, length=0) -Apply the given style to text content matching the regex OR the -positional arguments offset and length.

-

(match, tail: provided by regex decorator)

-

Arguments

-

style – str

-

regex – str regular expression

-

offset – int

-

length – int

-
- -Expand source code - -
@_by_regex_offset
-def set_span(
-    self,
-    match: str,
-    tail: str,
-    style: str,
-    regex: str | None = None,
-    offset: int | None = None,
-    length: int = 0,
-) -> Span:
-    """
-    set_span(style, regex=None, offset=None, length=0)
-    Apply the given style to text content matching the regex OR the
-    positional arguments offset and length.
-
-    (match, tail: provided by regex decorator)
-
-    Arguments:
-
-        style -- str
-
-        regex -- str regular expression
-
-        offset -- int
-
-        length -- int
-    """
-    span = Span(match, style=style)
-    span.tail = tail
-    return span
-
-
-
-

Inherited members

- -
-
-class Spacer -(number: int = 1, **kwargs: Any) -
-
-

This element shall be used to represent the second and all following “ “ -(U+0020, SPACE) characters in a sequence of “ “ (U+0020, SPACE) characters. -Note: It is not an error if the character preceding the element is not a -white space character, but it is good practice to use this element only for -the second and all following SPACE characters in a sequence.

-

Arguments

-

number – int

-
- -Expand source code - -
class Spacer(Element):
-    """This element shall be used to represent the second and all following “ “
-    (U+0020, SPACE) characters in a sequence of “ “ (U+0020, SPACE) characters.
-    Note: It is not an error if the character preceding the element is not a
-    white space character, but it is good practice to use this element only for
-    the second and all following SPACE characters in a sequence.
-    """
-
-    _tag = "text:s"
-    _properties: tuple[PropDef, ...] = (PropDef("number", "text:c"),)
-
-    def __init__(self, number: int = 1, **kwargs: Any):
-        """
-        Arguments:
-
-            number -- int
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.number = str(number)
-
-

Ancestors

- -

Instance variables

-
-
var number : str | bool | None
-
-

Get/set the attribute text:c

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class Span -(text: str | None = None, style: str | None = None, **kwargs: Any) -
-
-

Create a span element "text:span" of the given style containing the optional -given text.

-

Arguments

-

text – str

-

style – str

-
- -Expand source code - -
class Span(Paragraph):
-    """Create a span element "text:span" of the given style containing the optional
-    given text.
-    """
-
-    _tag = "text:span"
-    _properties = (
-        PropDef("style", "text:style-name"),
-        PropDef("class_names", "text:class-names"),
-    )
-
-    def __init__(
-        self,
-        text: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """
-        Arguments:
-
-            text -- str
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if text:
-                self.text = text
-            if style:
-                self.style = style
-
-

Ancestors

- -

Instance variables

-
-
var class_names : str | bool | None
-
-

Get/set the attribute text:class-names

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class Tab -(position: int | None = None, **kwargs: Any) -
-
-

This element represents the [UNICODE] tab character (HORIZONTAL -TABULATION, U+0009).

-

The position attribute contains the number of the tab-stop to which -a tab character refers. The position 0 marks the start margin of a -paragraph. Note: The position attribute is only a hint to help non-layout -oriented consumers to determine the tab/tab-stop association. Layout -oriented consumers should determine the tab positions based on the style -information

-

Arguments

-

position – int

-
- -Expand source code - -
class Tab(Element):
-    """This element represents the [UNICODE] tab character (HORIZONTAL
-    TABULATION, U+0009).
-
-    The position attribute contains the number of the tab-stop to which
-    a tab character refers. The position 0 marks the start margin of a
-    paragraph. Note: The position attribute is only a hint to help non-layout
-    oriented consumers to determine the tab/tab-stop association. Layout
-    oriented consumers should determine the tab positions based on the style
-    information
-    """
-
-    _tag = "text:tab"
-    _properties: tuple[PropDef, ...] = (PropDef("position", "text:tab-ref"),)
-
-    def __init__(self, position: int | None = None, **kwargs: Any) -> None:
-        """
-        Arguments:
-
-            position -- int
-        """
-        super().__init__(**kwargs)
-        if self._do_init and position is not None and position >= 0:
-            self.position = str(position)
-
-

Ancestors

- -

Instance variables

-
-
var position : str | bool | None
-
-

Get/set the attribute text:tab-ref

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/paragraph_base.html b/doc/paragraph_base.html deleted file mode 100644 index bc5533d..0000000 --- a/doc/paragraph_base.html +++ /dev/null @@ -1,1162 +0,0 @@ - - - - - - -odfdo.paragraph_base API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.paragraph_base

-
-
-

Base class ParagraphBase and Spacer "text:s", Tab "text:tab", LineBreak -"text:line-break".

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Base class ParagraphBase and Spacer "text:s", Tab "text:tab", LineBreak
-"text:line-break".
-"""
-from __future__ import annotations
-
-import re
-from typing import Any
-
-from .element import Element, PropDef, Text, register_element_class
-from .utils import to_str
-
-_rsplitter = re.compile("(\n|\t|  +)")
-_rspace = re.compile("^  +$")
-
-
-def _get_formatted_text(  # noqa: C901
-    element: Element,
-    context: dict | None = None,
-    with_text: bool = True,
-) -> str:
-    if context is None:
-        context = {}
-    document = context.get("document", None)
-    rst_mode = context.get("rst_mode", False)
-
-    result: list[str] = []
-    objects: list[Element | Text] = []
-    if with_text:
-        objects = element.xpath("*|text()")
-    else:
-        objects = [x for x in element.children]  # noqa: C416
-    for obj in objects:
-        if isinstance(obj, Text):
-            result.append(obj)
-            continue
-        tag = obj.tag
-        # Good tags with text
-        if tag in ("text:a", "text:p"):
-            result.append(_get_formatted_text(obj, context, with_text=True))
-            continue
-        # Try to convert some styles in rst_mode
-        if tag == "text:span":
-            text = _get_formatted_text(obj, context, with_text=True)
-            if not rst_mode:
-                result.append(text)
-                continue
-            if not text.strip():
-                result.append(text)
-                continue
-            if hasattr(obj, "style"):
-                style = obj.style
-            else:
-                style = None
-            if not style:
-                result.append(text)
-                continue
-            if document:
-                style = document.get_style("text", style)
-                properties = style.get_properties()
-            else:
-                properties = None
-            if properties is None:
-                result.append(text)
-                continue
-            # Compute before, text and after
-            before = ""
-            for c in text:
-                if c.isspace():
-                    before += c
-                else:
-                    break
-            after = ""
-            for c in reversed(text):
-                if c.isspace():
-                    after = c + after
-                else:
-                    break
-            text = text.strip()
-            # Bold ?
-            if properties.get("fo:font-weight") == "bold":
-                result.append(before)
-                result.append("**")
-                result.append(text)
-                result.append("**")
-                result.append(after)
-                continue
-            # Italic ?
-            if properties.get("fo:font-style") == "italic":
-                result.append(before)
-                result.append("*")
-                result.append(text)
-                result.append("*")
-                result.append(after)
-                continue
-            # Unknown style, ...
-            result.append(before)
-            result.append(text)
-            result.append(after)
-            continue
-        # Footnote or endnote
-        if tag == "text:note":
-            note_class = obj.note_class  # type:ignore
-            container = {
-                "footnote": context["footnotes"],
-                "endnote": context["endnotes"],
-            }[note_class]
-            citation = obj.citation  # type:ignore
-            if not citation:
-                # Would only happen with hand-made documents
-                citation = len(container)
-            body = obj.note_body  # type:ignore
-            container.append((citation, body))
-            if rst_mode:
-                marker = {"footnote": " [#]_ ", "endnote": " [*]_ "}[note_class]
-            else:
-                marker = {"footnote": "[{citation}]", "endnote": "({citation})"}[
-                    note_class
-                ]
-            result.append(marker.format(citation=citation))
-            continue
-        # Annotations
-        if tag == "office:annotation":
-            context["annotations"].append(obj.note_body)  # type:ignore
-            if rst_mode:
-                result.append(" [#]_ ")
-            else:
-                result.append("[*]")
-            continue
-        # Tabulation
-        if tag == "text:tab":
-            result.append("\t")
-            continue
-        # Line break
-        if tag == "text:line-break":
-            if rst_mode:
-                result.append("\n|")
-            else:
-                result.append("\n")
-            continue
-        # other cases:
-        result.append(obj.get_formatted_text(context))
-    return "".join(result)
-
-
-class Spacer(Element):
-    """This element shall be used to represent the second and all following “ “
-    (U+0020, SPACE) characters in a sequence of “ “ (U+0020, SPACE) characters.
-    Note: It is not an error if the character preceding the element is not a
-    white space character, but it is good practice to use this element only for
-    the second and all following SPACE characters in a sequence.
-    """
-
-    _tag = "text:s"
-    _properties: tuple[PropDef, ...] = (PropDef("number", "text:c"),)
-
-    def __init__(self, number: int = 1, **kwargs: Any):
-        """
-        Arguments:
-
-            number -- int
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.number = str(number)
-
-
-Spacer._define_attribut_property()
-
-
-class Tab(Element):
-    """This element represents the [UNICODE] tab character (HORIZONTAL
-    TABULATION, U+0009).
-
-    The position attribute contains the number of the tab-stop to which
-    a tab character refers. The position 0 marks the start margin of a
-    paragraph. Note: The position attribute is only a hint to help non-layout
-    oriented consumers to determine the tab/tab-stop association. Layout
-    oriented consumers should determine the tab positions based on the style
-    information
-    """
-
-    _tag = "text:tab"
-    _properties: tuple[PropDef, ...] = (PropDef("position", "text:tab-ref"),)
-
-    def __init__(self, position: int | None = None, **kwargs: Any) -> None:
-        """
-        Arguments:
-
-            position -- int
-        """
-        super().__init__(**kwargs)
-        if self._do_init and position is not None and position >= 0:
-            self.position = str(position)
-
-
-Tab._define_attribut_property()
-
-
-class LineBreak(Element):
-    """This element represents a line break "text:line-break" """
-
-    _tag = "text:line-break"
-
-    def __init__(self, **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-
-
-class ParagraphBase(Element):
-    """Base class for Paragraph like classes."""
-
-    _tag = "text:p-odfdo-notodf"
-    _properties: tuple[PropDef, ...] = (PropDef("style", "text:style-name"),)
-
-    def __init__(self, **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-
-    def get_formatted_text(
-        self,
-        context: dict | None = None,
-        simple: bool = False,
-    ) -> str:
-        if not context:
-            context = {
-                "document": None,
-                "footnotes": [],
-                "endnotes": [],
-                "annotations": [],
-                "rst_mode": False,
-                "img_counter": 0,
-                "images": [],
-                "no_img_level": 0,
-            }
-        content = _get_formatted_text(self, context, with_text=True)
-        if simple:
-            return content
-        else:
-            return content + "\n\n"
-
-    def append_plain_text(self, text: str = "") -> None:
-        """Append plain text to the paragraph, replacing <CR>, <TAB>
-        and multiple spaces by ODF corresponding tags.
-        """
-        text = to_str(text)
-        blocs = _rsplitter.split(text)
-        for b in blocs:
-            if not b:
-                continue
-            if b == "\n":
-                self.append(LineBreak())
-                continue
-            if b == "\t":
-                self.append(Tab())
-                continue
-            if _rspace.match(b):
-                # follow ODF standard : n spaces => one space + spacer(n-1)
-                self.append(" ")
-                self.append(Spacer(len(b) - 1))
-                continue
-            # standard piece of text:
-            self.append(b)
-
-
-ParagraphBase._define_attribut_property()
-
-register_element_class(Spacer)
-register_element_class(Tab)
-register_element_class(LineBreak)
-register_element_class(ParagraphBase)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class LineBreak -(**kwargs: Any) -
-
-

This element represents a line break "text:line-break"

-
- -Expand source code - -
class LineBreak(Element):
-    """This element represents a line break "text:line-break" """
-
-    _tag = "text:line-break"
-
-    def __init__(self, **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-
-

Ancestors

- -

Inherited members

- -
-
-class ParagraphBase -(**kwargs: Any) -
-
-

Base class for Paragraph like classes.

-
- -Expand source code - -
class ParagraphBase(Element):
-    """Base class for Paragraph like classes."""
-
-    _tag = "text:p-odfdo-notodf"
-    _properties: tuple[PropDef, ...] = (PropDef("style", "text:style-name"),)
-
-    def __init__(self, **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-
-    def get_formatted_text(
-        self,
-        context: dict | None = None,
-        simple: bool = False,
-    ) -> str:
-        if not context:
-            context = {
-                "document": None,
-                "footnotes": [],
-                "endnotes": [],
-                "annotations": [],
-                "rst_mode": False,
-                "img_counter": 0,
-                "images": [],
-                "no_img_level": 0,
-            }
-        content = _get_formatted_text(self, context, with_text=True)
-        if simple:
-            return content
-        else:
-            return content + "\n\n"
-
-    def append_plain_text(self, text: str = "") -> None:
-        """Append plain text to the paragraph, replacing <CR>, <TAB>
-        and multiple spaces by ODF corresponding tags.
-        """
-        text = to_str(text)
-        blocs = _rsplitter.split(text)
-        for b in blocs:
-            if not b:
-                continue
-            if b == "\n":
-                self.append(LineBreak())
-                continue
-            if b == "\t":
-                self.append(Tab())
-                continue
-            if _rspace.match(b):
-                # follow ODF standard : n spaces => one space + spacer(n-1)
-                self.append(" ")
-                self.append(Spacer(len(b) - 1))
-                continue
-            # standard piece of text:
-            self.append(b)
-
-

Ancestors

- -

Subclasses

- -

Instance variables

-
-
var style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def append_plain_text(self, text: str = '') ‑> None -
-
-

Append plain text to the paragraph, replacing , -and multiple spaces by ODF corresponding tags.

-
- -Expand source code - -
def append_plain_text(self, text: str = "") -> None:
-    """Append plain text to the paragraph, replacing <CR>, <TAB>
-    and multiple spaces by ODF corresponding tags.
-    """
-    text = to_str(text)
-    blocs = _rsplitter.split(text)
-    for b in blocs:
-        if not b:
-            continue
-        if b == "\n":
-            self.append(LineBreak())
-            continue
-        if b == "\t":
-            self.append(Tab())
-            continue
-        if _rspace.match(b):
-            # follow ODF standard : n spaces => one space + spacer(n-1)
-            self.append(" ")
-            self.append(Spacer(len(b) - 1))
-            continue
-        # standard piece of text:
-        self.append(b)
-
-
-
-

Inherited members

- -
-
-class Spacer -(number: int = 1, **kwargs: Any) -
-
-

This element shall be used to represent the second and all following “ “ -(U+0020, SPACE) characters in a sequence of “ “ (U+0020, SPACE) characters. -Note: It is not an error if the character preceding the element is not a -white space character, but it is good practice to use this element only for -the second and all following SPACE characters in a sequence.

-

Arguments

-

number – int

-
- -Expand source code - -
class Spacer(Element):
-    """This element shall be used to represent the second and all following “ “
-    (U+0020, SPACE) characters in a sequence of “ “ (U+0020, SPACE) characters.
-    Note: It is not an error if the character preceding the element is not a
-    white space character, but it is good practice to use this element only for
-    the second and all following SPACE characters in a sequence.
-    """
-
-    _tag = "text:s"
-    _properties: tuple[PropDef, ...] = (PropDef("number", "text:c"),)
-
-    def __init__(self, number: int = 1, **kwargs: Any):
-        """
-        Arguments:
-
-            number -- int
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.number = str(number)
-
-

Ancestors

- -

Instance variables

-
-
var number : str | bool | None
-
-

Get/set the attribute text:c

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class Tab -(position: int | None = None, **kwargs: Any) -
-
-

This element represents the [UNICODE] tab character (HORIZONTAL -TABULATION, U+0009).

-

The position attribute contains the number of the tab-stop to which -a tab character refers. The position 0 marks the start margin of a -paragraph. Note: The position attribute is only a hint to help non-layout -oriented consumers to determine the tab/tab-stop association. Layout -oriented consumers should determine the tab positions based on the style -information

-

Arguments

-

position – int

-
- -Expand source code - -
class Tab(Element):
-    """This element represents the [UNICODE] tab character (HORIZONTAL
-    TABULATION, U+0009).
-
-    The position attribute contains the number of the tab-stop to which
-    a tab character refers. The position 0 marks the start margin of a
-    paragraph. Note: The position attribute is only a hint to help non-layout
-    oriented consumers to determine the tab/tab-stop association. Layout
-    oriented consumers should determine the tab positions based on the style
-    information
-    """
-
-    _tag = "text:tab"
-    _properties: tuple[PropDef, ...] = (PropDef("position", "text:tab-ref"),)
-
-    def __init__(self, position: int | None = None, **kwargs: Any) -> None:
-        """
-        Arguments:
-
-            position -- int
-        """
-        super().__init__(**kwargs)
-        if self._do_init and position is not None and position >= 0:
-            self.position = str(position)
-
-

Ancestors

- -

Instance variables

-
-
var position : str | bool | None
-
-

Get/set the attribute text:tab-ref

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/reference.html b/doc/reference.html deleted file mode 100644 index f4dc79c..0000000 --- a/doc/reference.html +++ /dev/null @@ -1,1808 +0,0 @@ - - - - - - -odfdo.reference API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.reference

-
-
-

Reference related classes for "text:reference-…" tags.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Reference related classes for "text:reference-..." tags.
-"""
-from __future__ import annotations
-
-from typing import Any
-
-from .element import Element, PropDef, register_element_class
-
-
-def _get_referenced(
-    body: Element,
-    start: Element,
-    end: Element,
-    no_header: bool,
-    clean: bool,
-    as_xml: bool,
-    as_list: bool,
-) -> Element | list | str | None:
-    """Retrieve data from body between some start and end."""
-    if body is None or start is None or end is None:
-        return None
-    content_list = body.get_between(
-        start, end, as_text=False, no_header=no_header, clean=clean
-    )
-    if as_list:
-        return content_list
-    referenced = Element.from_tag("office:text")
-    if isinstance(content_list, list):
-        for chunk in content_list:
-            referenced.append(chunk)
-    if as_xml:
-        return referenced.serialize()
-    else:
-        return referenced
-
-
-class Reference(Element):
-    """A reference to a content marked by a reference mark.
-    The odf_reference element ("text:reference-ref") represents a field that
-    references a "text:reference-mark-start" or "text:reference-mark" element.
-    Its text:reference-format attribute specifies what is displayed from the
-    referenced element. Default is 'page'
-    Actual content is not updated except for the 'text' format by the
-    update() method.
-
-
-    Creation of references can be tricky, consider using this method:
-        odfdo.paragraph.insert_reference()
-
-    Values for text:reference-format :
-        The defined values for the text:reference-format attribute supported by
-        all reference fields are:
-          - 'chapter': displays the number of the chapter in which the
-            referenced item appears.
-          - 'direction': displays whether the referenced item is above or
-            below the reference field.
-          - 'page': displays the number of the page on which the referenced
-            item appears.
-          - 'text': displays the text of the referenced item.
-        Additional defined values for the text:reference-format attribute
-        supported by references to sequence fields are:
-          - 'caption': displays the caption in which the sequence is used.
-          - 'category-and-value': displays the name and value of the sequence.
-          - 'value': displays the value of the sequence.
-
-        References to bookmarks and other references support additional values,
-        which display the list label of the referenced item. If the referenced
-        item is contained in a list or a numbered paragraph, the list label is
-        the formatted number of the paragraph which contains the referenced
-        item. If the referenced item is not contained in a list or numbered
-        paragraph, the list label is empty, and the referenced field therefore
-        displays nothing. If the referenced bookmark or reference contains more
-        than one paragraph, the list label of the paragraph at which the
-        bookmark or reference starts is taken.
-
-        Additional defined values for the text:reference-format attribute
-        supported by all references to bookmark's or other reference fields
-        are:
-          - 'number': displays the list label of the referenced item. [...]
-          - 'number-all-superior': displays the list label of the referenced
-            item and adds the contents of all list labels of superior levels
-            in front of it. [...]
-          - 'number-no-superior': displays the contents of the list label of
-            the referenced item.
-    """
-
-    _tag = "text:reference-ref"
-    _properties = (PropDef("name", "text:ref-name"),)
-    format_allowed = (
-        "chapter",
-        "direction",
-        "page",
-        "text",
-        "caption",
-        "category-and-value",
-        "value",
-        "number",
-        "number-all-superior",
-        "number-no-superior",
-    )
-
-    def __init__(self, name: str = "", ref_format: str = "", **kwargs: Any) -> None:
-        """Create a reference to a content marked by a reference mark. An
-        actual reference mark with the provided name should exist.
-
-        Consider using: odfdo.paragraph.insert_reference()
-
-        The text:ref-name attribute identifies a "text:reference-mark" or
-        "text:referencemark-start" element by the value of that element's
-        text:name attribute.
-        If ref_format is 'text', the current text content of the reference_mark
-        is retrieved.
-
-        Arguments:
-
-            name -- str : name of the reference mark
-
-            ref_format -- str : format of the field. Default is 'page', allowed
-                            values are 'chapter', 'direction', 'page', 'text',
-                            'caption', 'category-and-value', 'value', 'number',
-                            'number-all-superior', 'number-no-superior'.
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-            self.ref_format = ref_format
-
-    @property
-    def ref_format(self) -> str | None:
-        reference = self.get_attribute("text:reference-format")
-        if isinstance(reference, str):
-            return reference
-        return None
-
-    @ref_format.setter
-    def ref_format(self, ref_format: str) -> None:
-        """Set the text:reference-format attribute.
-
-        Arguments:
-
-            ref_format -- str
-        """
-        if not ref_format or ref_format not in self.format_allowed:
-            ref_format = "page"
-        self.set_attribute("text:reference-format", ref_format)
-
-    def update(self) -> None:
-        """Update the content of the reference text field. Currently only
-        'text' format is implemented. Other values, for example the 'page' text
-        field, may need to be refreshed through a visual ODF parser.
-        """
-        ref_format = self.ref_format
-        if ref_format != "text":
-            # only 'text' is implemented
-            return None
-        body = self.document_body
-        if not body:
-            body = self.root
-        name = self.name
-        reference = body.get_reference_mark(name=name)
-        if not reference:
-            return None
-        # we know it is a ReferenceMarkStart:
-        self.text = reference.referenced_text()  # type: ignore
-
-
-Reference._define_attribut_property()
-
-
-class ReferenceMark(Element):
-    """A point reference.
-    A point reference marks a position in text and is represented by a single
-    "text:reference-mark" element.
-    """
-
-    _tag = "text:reference-mark"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        """A point reference. A point reference marks a position in text and is
-        represented by a single "text:reference-mark" element.
-        Consider using the wrapper: odfdo.paragraph.set_reference_mark()
-
-        Arguments:
-
-            name -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-
-ReferenceMark._define_attribut_property()
-
-
-class ReferenceMarkEnd(Element):
-    """The "text:reference-mark-end" element represents the end of a range
-    reference.
-    """
-
-    _tag = "text:reference-mark-end"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        """The "text:reference-mark-end" element represent the end of a range
-        reference.
-        Consider using the wrappers: odfdo.paragraph.set_reference_mark() and
-        odfdo.paragraph.set_reference_mark_end()
-
-        Arguments:
-
-            name -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-    def referenced_text(self) -> str:
-        """Return the text between reference-mark-start and reference-mark-end."""
-        name = self.name
-        request = (
-            f"//text()"
-            f"[preceding::text:reference-mark-start[@text:name='{name}'] "
-            f"and following::text:reference-mark-end[@text:name='{name}']]"
-        )
-        result = " ".join(str(x) for x in self.xpath(request))
-        return result
-
-
-ReferenceMarkEnd._define_attribut_property()
-
-
-class ReferenceMarkStart(Element):
-    """The "text:reference-mark-start" element represents the start of a
-    range reference.
-    """
-
-    _tag = "text:reference-mark-start"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        """The "text:reference-mark-start" element represent the start of a range
-        reference.
-        Consider using the wrapper: odfdo.paragraph.set_reference_mark()
-
-        Arguments:
-
-            name -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-    def referenced_text(self) -> str:
-        """Return the text between reference-mark-start and reference-mark-end."""
-        name = self.name
-        request = (
-            f"//text()"
-            f"[preceding::text:reference-mark-start[@text:name='{name}'] "
-            f"and following::text:reference-mark-end[@text:name='{name}']]"
-        )
-        result = " ".join(str(x) for x in self.xpath(request))
-        return result
-
-    def get_referenced(
-        self,
-        no_header: bool = False,
-        clean: bool = True,
-        as_xml: bool = False,
-        as_list: bool = False,
-    ) -> Element | list | str | None:
-        """Return the document content between the start and end tags of the
-        reference. The content returned by this method can spread over several
-        headers and paragraphs.
-        By default, the content is returned as an "office:text" odf element.
-
-
-        Arguments:
-
-            no_header -- boolean (default to False), translate existing headers
-                         tags "text:h" into paragraphs "text:p".
-
-            clean -- boolean (default to True), suppress unwanted tags. Striped
-                     tags are : 'text:change', 'text:change-start',
-                     'text:change-end', 'text:reference-mark',
-                     'text:reference-mark-start', 'text:reference-mark-end'.
-
-            as_xml -- boolean (default to False), format the returned content as
-                      a XML string (serialization).
-
-            as_list -- boolean (default to False), do not embed the returned
-                       content in a "office:text'" element, instead simply
-                       return a raw list of odf elements.
-        """
-        name = self.name
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Reference need some upper document part")
-        body = self.document_body
-        if not body:
-            body = parent
-        end = body.get_reference_mark_end(name=name)
-        if end is None:
-            raise ValueError("No reference-end found")
-        start = self
-        return _get_referenced(body, start, end, no_header, clean, as_xml, as_list)
-
-    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-        """Delete the given element from the XML tree. If no element is given,
-        "self" is deleted. The XML library may allow to continue to use an
-        element now "orphan" as long as you have a reference to it.
-
-        For odf_reference_mark_start : delete the reference-end tag if exists.
-
-        Arguments:
-
-            child -- Element
-
-            keep_tail -- boolean (default to True), True for most usages.
-        """
-        if child is not None:  # act like normal delete
-            return super().delete(child, keep_tail)
-        name = self.name
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can't delete the root element")
-        body = self.document_body
-        if not body:
-            body = parent
-        end = body.get_reference_mark_end(name=name)
-        if end:
-            end.delete()
-        # act like normal delete
-        return super().delete()
-
-
-ReferenceMarkStart._define_attribut_property()
-
-
-def strip_references(element: Element) -> Element | list:
-    """Remove all the 'text:reference-ref' tags of the element, keeping inner
-    sub elements (for example the referenced value if format is 'text').
-    Nota : using the .delete() on the reference mark will delete inner content.
-    """
-    strip = ("text:reference-ref",)
-    return element.strip_tags(strip)
-
-
-def remove_all_reference_marks(element: Element) -> Element | list:
-    """Remove all the 'text:reference-mark', 'text:reference-mark-start', and
-    'text:reference-mark-end' tags of the element, keeping inner sub elements.
-    Nota : using the .delete() on the reference mark will delete inner content.
-    """
-    strip = (
-        "text:reference-mark",
-        "text:reference-mark-start",
-        "text:reference-mark-end",
-    )
-    return element.strip_tags(strip)
-
-
-def remove_reference_mark(
-    element: Element,
-    position: int = 0,
-    name: str | None = None,
-) -> None:
-    """Remove the 'text:reference-mark', 'text:reference-mark-start', and
-    'text:reference-mark-end' tags of the element, identified by name or
-    position, keeping inner sub elements.
-    Nota : using the .delete() on the reference mark will delete inner content.
-    """
-    start = element.get_reference_mark(position=position, name=name)
-    end = element.get_reference_mark_end(position=position, name=name)
-    target = []
-    if start:
-        target.append(start)
-    if end:
-        target.append(end)
-    element.strip_elements(target)
-
-
-register_element_class(Reference)
-register_element_class(ReferenceMark)
-register_element_class(ReferenceMarkStart)
-register_element_class(ReferenceMarkEnd)
-
-
-
-
-
-
-
-

Functions

-
-
-def remove_all_reference_marks(element: Element) ‑> Element | list -
-
-

Remove all the 'text:reference-mark', 'text:reference-mark-start', and -'text:reference-mark-end' tags of the element, keeping inner sub elements. -Nota : using the .delete() on the reference mark will delete inner content.

-
- -Expand source code - -
def remove_all_reference_marks(element: Element) -> Element | list:
-    """Remove all the 'text:reference-mark', 'text:reference-mark-start', and
-    'text:reference-mark-end' tags of the element, keeping inner sub elements.
-    Nota : using the .delete() on the reference mark will delete inner content.
-    """
-    strip = (
-        "text:reference-mark",
-        "text:reference-mark-start",
-        "text:reference-mark-end",
-    )
-    return element.strip_tags(strip)
-
-
-
-def remove_reference_mark(element: Element, position: int = 0, name: str | None = None) ‑> None -
-
-

Remove the 'text:reference-mark', 'text:reference-mark-start', and -'text:reference-mark-end' tags of the element, identified by name or -position, keeping inner sub elements. -Nota : using the .delete() on the reference mark will delete inner content.

-
- -Expand source code - -
def remove_reference_mark(
-    element: Element,
-    position: int = 0,
-    name: str | None = None,
-) -> None:
-    """Remove the 'text:reference-mark', 'text:reference-mark-start', and
-    'text:reference-mark-end' tags of the element, identified by name or
-    position, keeping inner sub elements.
-    Nota : using the .delete() on the reference mark will delete inner content.
-    """
-    start = element.get_reference_mark(position=position, name=name)
-    end = element.get_reference_mark_end(position=position, name=name)
-    target = []
-    if start:
-        target.append(start)
-    if end:
-        target.append(end)
-    element.strip_elements(target)
-
-
-
-def strip_references(element: Element) ‑> Element | list -
-
-

Remove all the 'text:reference-ref' tags of the element, keeping inner -sub elements (for example the referenced value if format is 'text'). -Nota : using the .delete() on the reference mark will delete inner content.

-
- -Expand source code - -
def strip_references(element: Element) -> Element | list:
-    """Remove all the 'text:reference-ref' tags of the element, keeping inner
-    sub elements (for example the referenced value if format is 'text').
-    Nota : using the .delete() on the reference mark will delete inner content.
-    """
-    strip = ("text:reference-ref",)
-    return element.strip_tags(strip)
-
-
-
-
-
-

Classes

-
-
-class Reference -(name: str = '', ref_format: str = '', **kwargs: Any) -
-
-

A reference to a content marked by a reference mark. -The odf_reference element ("text:reference-ref") represents a field that -references a "text:reference-mark-start" or "text:reference-mark" element. -Its text:reference-format attribute specifies what is displayed from the -referenced element. Default is 'page' -Actual content is not updated except for the 'text' format by the -update() method.

-

Creation of references can be tricky, consider using this method: -odfdo.paragraph.insert_reference()

-

Values for text:reference-format : -The defined values for the text:reference-format attribute supported by -all reference fields are: -- 'chapter': displays the number of the chapter in which the -referenced item appears. -- 'direction': displays whether the referenced item is above or -below the reference field. -- 'page': displays the number of the page on which the referenced -item appears. -- 'text': displays the text of the referenced item. -Additional defined values for the text:reference-format attribute -supported by references to sequence fields are: -- 'caption': displays the caption in which the sequence is used. -- 'category-and-value': displays the name and value of the sequence. -- 'value': displays the value of the sequence.

-
References to bookmarks and other references support additional values,
-which display the list label of the referenced item. If the referenced
-item is contained in a list or a numbered paragraph, the list label is
-the formatted number of the paragraph which contains the referenced
-item. If the referenced item is not contained in a list or numbered
-paragraph, the list label is empty, and the referenced field therefore
-displays nothing. If the referenced bookmark or reference contains more
-than one paragraph, the list label of the paragraph at which the
-bookmark or reference starts is taken.
-
-Additional defined values for the text:reference-format attribute
-supported by all references to bookmark's or other reference fields
-are:
-  - 'number': displays the list label of the referenced item. [...]
-  - 'number-all-superior': displays the list label of the referenced
-    item and adds the contents of all list labels of superior levels
-    in front of it. [...]
-  - 'number-no-superior': displays the contents of the list label of
-    the referenced item.
-
-

Create a reference to a content marked by a reference mark. An -actual reference mark with the provided name should exist.

-

Consider using: odfdo.paragraph.insert_reference()

-

The text:ref-name attribute identifies a "text:reference-mark" or -"text:referencemark-start" element by the value of that element's -text:name attribute. -If ref_format is 'text', the current text content of the reference_mark -is retrieved.

-

Arguments

-

name – str : name of the reference mark

-

ref_format – str : format of the field. Default is 'page', allowed -values are 'chapter', 'direction', 'page', 'text', -'caption', 'category-and-value', 'value', 'number', -'number-all-superior', 'number-no-superior'.

-
- -Expand source code - -
class Reference(Element):
-    """A reference to a content marked by a reference mark.
-    The odf_reference element ("text:reference-ref") represents a field that
-    references a "text:reference-mark-start" or "text:reference-mark" element.
-    Its text:reference-format attribute specifies what is displayed from the
-    referenced element. Default is 'page'
-    Actual content is not updated except for the 'text' format by the
-    update() method.
-
-
-    Creation of references can be tricky, consider using this method:
-        odfdo.paragraph.insert_reference()
-
-    Values for text:reference-format :
-        The defined values for the text:reference-format attribute supported by
-        all reference fields are:
-          - 'chapter': displays the number of the chapter in which the
-            referenced item appears.
-          - 'direction': displays whether the referenced item is above or
-            below the reference field.
-          - 'page': displays the number of the page on which the referenced
-            item appears.
-          - 'text': displays the text of the referenced item.
-        Additional defined values for the text:reference-format attribute
-        supported by references to sequence fields are:
-          - 'caption': displays the caption in which the sequence is used.
-          - 'category-and-value': displays the name and value of the sequence.
-          - 'value': displays the value of the sequence.
-
-        References to bookmarks and other references support additional values,
-        which display the list label of the referenced item. If the referenced
-        item is contained in a list or a numbered paragraph, the list label is
-        the formatted number of the paragraph which contains the referenced
-        item. If the referenced item is not contained in a list or numbered
-        paragraph, the list label is empty, and the referenced field therefore
-        displays nothing. If the referenced bookmark or reference contains more
-        than one paragraph, the list label of the paragraph at which the
-        bookmark or reference starts is taken.
-
-        Additional defined values for the text:reference-format attribute
-        supported by all references to bookmark's or other reference fields
-        are:
-          - 'number': displays the list label of the referenced item. [...]
-          - 'number-all-superior': displays the list label of the referenced
-            item and adds the contents of all list labels of superior levels
-            in front of it. [...]
-          - 'number-no-superior': displays the contents of the list label of
-            the referenced item.
-    """
-
-    _tag = "text:reference-ref"
-    _properties = (PropDef("name", "text:ref-name"),)
-    format_allowed = (
-        "chapter",
-        "direction",
-        "page",
-        "text",
-        "caption",
-        "category-and-value",
-        "value",
-        "number",
-        "number-all-superior",
-        "number-no-superior",
-    )
-
-    def __init__(self, name: str = "", ref_format: str = "", **kwargs: Any) -> None:
-        """Create a reference to a content marked by a reference mark. An
-        actual reference mark with the provided name should exist.
-
-        Consider using: odfdo.paragraph.insert_reference()
-
-        The text:ref-name attribute identifies a "text:reference-mark" or
-        "text:referencemark-start" element by the value of that element's
-        text:name attribute.
-        If ref_format is 'text', the current text content of the reference_mark
-        is retrieved.
-
-        Arguments:
-
-            name -- str : name of the reference mark
-
-            ref_format -- str : format of the field. Default is 'page', allowed
-                            values are 'chapter', 'direction', 'page', 'text',
-                            'caption', 'category-and-value', 'value', 'number',
-                            'number-all-superior', 'number-no-superior'.
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-            self.ref_format = ref_format
-
-    @property
-    def ref_format(self) -> str | None:
-        reference = self.get_attribute("text:reference-format")
-        if isinstance(reference, str):
-            return reference
-        return None
-
-    @ref_format.setter
-    def ref_format(self, ref_format: str) -> None:
-        """Set the text:reference-format attribute.
-
-        Arguments:
-
-            ref_format -- str
-        """
-        if not ref_format or ref_format not in self.format_allowed:
-            ref_format = "page"
-        self.set_attribute("text:reference-format", ref_format)
-
-    def update(self) -> None:
-        """Update the content of the reference text field. Currently only
-        'text' format is implemented. Other values, for example the 'page' text
-        field, may need to be refreshed through a visual ODF parser.
-        """
-        ref_format = self.ref_format
-        if ref_format != "text":
-            # only 'text' is implemented
-            return None
-        body = self.document_body
-        if not body:
-            body = self.root
-        name = self.name
-        reference = body.get_reference_mark(name=name)
-        if not reference:
-            return None
-        # we know it is a ReferenceMarkStart:
-        self.text = reference.referenced_text()  # type: ignore
-
-

Ancestors

- -

Class variables

-
-
var format_allowed
-
-
-
-
-

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:ref-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var ref_format : str | None
-
-
-
- -Expand source code - -
@property
-def ref_format(self) -> str | None:
-    reference = self.get_attribute("text:reference-format")
-    if isinstance(reference, str):
-        return reference
-    return None
-
-
-
-

Methods

-
-
-def update(self) ‑> None -
-
-

Update the content of the reference text field. Currently only -'text' format is implemented. Other values, for example the 'page' text -field, may need to be refreshed through a visual ODF parser.

-
- -Expand source code - -
def update(self) -> None:
-    """Update the content of the reference text field. Currently only
-    'text' format is implemented. Other values, for example the 'page' text
-    field, may need to be refreshed through a visual ODF parser.
-    """
-    ref_format = self.ref_format
-    if ref_format != "text":
-        # only 'text' is implemented
-        return None
-    body = self.document_body
-    if not body:
-        body = self.root
-    name = self.name
-    reference = body.get_reference_mark(name=name)
-    if not reference:
-        return None
-    # we know it is a ReferenceMarkStart:
-    self.text = reference.referenced_text()  # type: ignore
-
-
-
-

Inherited members

- -
-
-class ReferenceMark -(name: str = '', **kwargs: Any) -
-
-

A point reference. -A point reference marks a position in text and is represented by a single -"text:reference-mark" element.

-

A point reference. A point reference marks a position in text and is -represented by a single "text:reference-mark" element. -Consider using the wrapper: odfdo.paragraph.set_reference_mark()

-

Arguments

-

name – str

-
- -Expand source code - -
class ReferenceMark(Element):
-    """A point reference.
-    A point reference marks a position in text and is represented by a single
-    "text:reference-mark" element.
-    """
-
-    _tag = "text:reference-mark"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        """A point reference. A point reference marks a position in text and is
-        represented by a single "text:reference-mark" element.
-        Consider using the wrapper: odfdo.paragraph.set_reference_mark()
-
-        Arguments:
-
-            name -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class ReferenceMarkEnd -(name: str = '', **kwargs: Any) -
-
-

The "text:reference-mark-end" element represents the end of a range -reference.

-

The "text:reference-mark-end" element represent the end of a range -reference. -Consider using the wrappers: odfdo.paragraph.set_reference_mark() and -odfdo.paragraph.set_reference_mark_end()

-

Arguments

-

name – str

-
- -Expand source code - -
class ReferenceMarkEnd(Element):
-    """The "text:reference-mark-end" element represents the end of a range
-    reference.
-    """
-
-    _tag = "text:reference-mark-end"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        """The "text:reference-mark-end" element represent the end of a range
-        reference.
-        Consider using the wrappers: odfdo.paragraph.set_reference_mark() and
-        odfdo.paragraph.set_reference_mark_end()
-
-        Arguments:
-
-            name -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-    def referenced_text(self) -> str:
-        """Return the text between reference-mark-start and reference-mark-end."""
-        name = self.name
-        request = (
-            f"//text()"
-            f"[preceding::text:reference-mark-start[@text:name='{name}'] "
-            f"and following::text:reference-mark-end[@text:name='{name}']]"
-        )
-        result = " ".join(str(x) for x in self.xpath(request))
-        return result
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def referenced_text(self) ‑> str -
-
-

Return the text between reference-mark-start and reference-mark-end.

-
- -Expand source code - -
def referenced_text(self) -> str:
-    """Return the text between reference-mark-start and reference-mark-end."""
-    name = self.name
-    request = (
-        f"//text()"
-        f"[preceding::text:reference-mark-start[@text:name='{name}'] "
-        f"and following::text:reference-mark-end[@text:name='{name}']]"
-    )
-    result = " ".join(str(x) for x in self.xpath(request))
-    return result
-
-
-
-

Inherited members

- -
-
-class ReferenceMarkStart -(name: str = '', **kwargs: Any) -
-
-

The "text:reference-mark-start" element represents the start of a -range reference.

-

The "text:reference-mark-start" element represent the start of a range -reference. -Consider using the wrapper: odfdo.paragraph.set_reference_mark()

-

Arguments

-

name – str

-
- -Expand source code - -
class ReferenceMarkStart(Element):
-    """The "text:reference-mark-start" element represents the start of a
-    range reference.
-    """
-
-    _tag = "text:reference-mark-start"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(self, name: str = "", **kwargs: Any) -> None:
-        """The "text:reference-mark-start" element represent the start of a range
-        reference.
-        Consider using the wrapper: odfdo.paragraph.set_reference_mark()
-
-        Arguments:
-
-            name -- str
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.name = name
-
-    def referenced_text(self) -> str:
-        """Return the text between reference-mark-start and reference-mark-end."""
-        name = self.name
-        request = (
-            f"//text()"
-            f"[preceding::text:reference-mark-start[@text:name='{name}'] "
-            f"and following::text:reference-mark-end[@text:name='{name}']]"
-        )
-        result = " ".join(str(x) for x in self.xpath(request))
-        return result
-
-    def get_referenced(
-        self,
-        no_header: bool = False,
-        clean: bool = True,
-        as_xml: bool = False,
-        as_list: bool = False,
-    ) -> Element | list | str | None:
-        """Return the document content between the start and end tags of the
-        reference. The content returned by this method can spread over several
-        headers and paragraphs.
-        By default, the content is returned as an "office:text" odf element.
-
-
-        Arguments:
-
-            no_header -- boolean (default to False), translate existing headers
-                         tags "text:h" into paragraphs "text:p".
-
-            clean -- boolean (default to True), suppress unwanted tags. Striped
-                     tags are : 'text:change', 'text:change-start',
-                     'text:change-end', 'text:reference-mark',
-                     'text:reference-mark-start', 'text:reference-mark-end'.
-
-            as_xml -- boolean (default to False), format the returned content as
-                      a XML string (serialization).
-
-            as_list -- boolean (default to False), do not embed the returned
-                       content in a "office:text'" element, instead simply
-                       return a raw list of odf elements.
-        """
-        name = self.name
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Reference need some upper document part")
-        body = self.document_body
-        if not body:
-            body = parent
-        end = body.get_reference_mark_end(name=name)
-        if end is None:
-            raise ValueError("No reference-end found")
-        start = self
-        return _get_referenced(body, start, end, no_header, clean, as_xml, as_list)
-
-    def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-        """Delete the given element from the XML tree. If no element is given,
-        "self" is deleted. The XML library may allow to continue to use an
-        element now "orphan" as long as you have a reference to it.
-
-        For odf_reference_mark_start : delete the reference-end tag if exists.
-
-        Arguments:
-
-            child -- Element
-
-            keep_tail -- boolean (default to True), True for most usages.
-        """
-        if child is not None:  # act like normal delete
-            return super().delete(child, keep_tail)
-        name = self.name
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can't delete the root element")
-        body = self.document_body
-        if not body:
-            body = parent
-        end = body.get_reference_mark_end(name=name)
-        if end:
-            end.delete()
-        # act like normal delete
-        return super().delete()
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def delete(self, child: Element | None = None, keep_tail: bool = True) ‑> None -
-
-

Delete the given element from the XML tree. If no element is given, -"self" is deleted. The XML library may allow to continue to use an -element now "orphan" as long as you have a reference to it.

-

For odf_reference_mark_start : delete the reference-end tag if exists.

-

Arguments

-

child – Element

-

keep_tail – boolean (default to True), True for most usages.

-
- -Expand source code - -
def delete(self, child: Element | None = None, keep_tail: bool = True) -> None:
-    """Delete the given element from the XML tree. If no element is given,
-    "self" is deleted. The XML library may allow to continue to use an
-    element now "orphan" as long as you have a reference to it.
-
-    For odf_reference_mark_start : delete the reference-end tag if exists.
-
-    Arguments:
-
-        child -- Element
-
-        keep_tail -- boolean (default to True), True for most usages.
-    """
-    if child is not None:  # act like normal delete
-        return super().delete(child, keep_tail)
-    name = self.name
-    parent = self.parent
-    if parent is None:
-        raise ValueError("Can't delete the root element")
-    body = self.document_body
-    if not body:
-        body = parent
-    end = body.get_reference_mark_end(name=name)
-    if end:
-        end.delete()
-    # act like normal delete
-    return super().delete()
-
-
-
-def get_referenced(self, no_header: bool = False, clean: bool = True, as_xml: bool = False, as_list: bool = False) ‑> Element | list | str | None -
-
-

Return the document content between the start and end tags of the -reference. The content returned by this method can spread over several -headers and paragraphs. -By default, the content is returned as an "office:text" odf element.

-

Arguments

-

no_header – boolean (default to False), translate existing headers -tags "text:h" into paragraphs "text:p".

-

clean – boolean (default to True), suppress unwanted tags. Striped -tags are : 'text:change', 'text:change-start', -'text:change-end', 'text:reference-mark', -'text:reference-mark-start', 'text:reference-mark-end'.

-

as_xml – boolean (default to False), format the returned content as -a XML string (serialization).

-

as_list – boolean (default to False), do not embed the returned -content in a "office:text'" element, instead simply -return a raw list of odf elements.

-
- -Expand source code - -
def get_referenced(
-    self,
-    no_header: bool = False,
-    clean: bool = True,
-    as_xml: bool = False,
-    as_list: bool = False,
-) -> Element | list | str | None:
-    """Return the document content between the start and end tags of the
-    reference. The content returned by this method can spread over several
-    headers and paragraphs.
-    By default, the content is returned as an "office:text" odf element.
-
-
-    Arguments:
-
-        no_header -- boolean (default to False), translate existing headers
-                     tags "text:h" into paragraphs "text:p".
-
-        clean -- boolean (default to True), suppress unwanted tags. Striped
-                 tags are : 'text:change', 'text:change-start',
-                 'text:change-end', 'text:reference-mark',
-                 'text:reference-mark-start', 'text:reference-mark-end'.
-
-        as_xml -- boolean (default to False), format the returned content as
-                  a XML string (serialization).
-
-        as_list -- boolean (default to False), do not embed the returned
-                   content in a "office:text'" element, instead simply
-                   return a raw list of odf elements.
-    """
-    name = self.name
-    parent = self.parent
-    if parent is None:
-        raise ValueError("Reference need some upper document part")
-    body = self.document_body
-    if not body:
-        body = parent
-    end = body.get_reference_mark_end(name=name)
-    if end is None:
-        raise ValueError("No reference-end found")
-    start = self
-    return _get_referenced(body, start, end, no_header, clean, as_xml, as_list)
-
-
-
-def referenced_text(self) ‑> str -
-
-

Return the text between reference-mark-start and reference-mark-end.

-
- -Expand source code - -
def referenced_text(self) -> str:
-    """Return the text between reference-mark-start and reference-mark-end."""
-    name = self.name
-    request = (
-        f"//text()"
-        f"[preceding::text:reference-mark-start[@text:name='{name}'] "
-        f"and following::text:reference-mark-end[@text:name='{name}']]"
-    )
-    result = " ".join(str(x) for x in self.xpath(request))
-    return result
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/row.html b/doc/row.html deleted file mode 100644 index c666de3..0000000 --- a/doc/row.html +++ /dev/null @@ -1,2608 +0,0 @@ - - - - - - -odfdo.row API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.row

-
-
-

Table class for "table:table" and HeaderRows, Cell, Row, Column, -NamedRange related classes.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2012 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Table class for "table:table" and HeaderRows, Cell, Row, Column,
-NamedRange related classes.
-"""
-from __future__ import annotations
-
-import contextlib
-from collections.abc import Iterable, Iterator
-from typing import Any
-
-from .cell import Cell
-from .element import Element, register_element_class, xpath_compile
-from .utils import (
-    convert_coordinates,
-    delete_item_in_vault,
-    find_odf_idx,
-    increment,
-    insert_item_in_vault,
-    insert_map_once,
-    make_cache_map,
-    set_item_in_vault,
-    translate_from_any,
-)
-
-_xpath_cell = xpath_compile("(table:table-cell|table:covered-table-cell)")
-_xpath_cell_idx = xpath_compile("(table:table-cell|table:covered-table-cell)[$idx]")
-
-
-class Row(Element):
-    """ODF table row "table:table-row" """
-
-    _tag = "table:table-row"
-    _caching = True
-    _append = Element.append
-
-    def __init__(
-        self,
-        width: int | None = None,
-        repeated: int | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """create a Row, optionally filled with "width" number of cells.
-
-        Rows contain cells, their number determine the number of columns.
-
-        You don't generally have to create rows by hand, use the Table API.
-
-        Arguments:
-
-            width -- int
-
-            repeated -- int
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        self.y = None
-        if not hasattr(self, "_indexes"):
-            self._indexes = {}
-            self._indexes["_rmap"] = {}
-        if not hasattr(self, "_rmap"):
-            self._compute_row_cache()
-            if not hasattr(self, "_tmap"):
-                self._tmap = []
-                self._cmap = []
-        if self._do_init:
-            if width is not None:
-                for _i in range(width):
-                    self.append(Cell())  # type:ignore
-            if repeated:
-                self.repeated = repeated
-            if style is not None:
-                self.style = style
-            self._compute_row_cache()
-
-    def _get_cells(self) -> list[Element]:
-        return self.get_elements(_xpath_cell)
-
-    def _translate_row_coordinates(
-        self,
-        coord: tuple | list | str,
-    ) -> tuple[int | None, int | None]:
-        xyzt = convert_coordinates(coord)
-        if len(xyzt) == 2:
-            x, z = xyzt
-        else:
-            x, _, z, __ = xyzt
-        if x and x < 0:
-            x = increment(x, self.width)
-        if z and z < 0:
-            z = increment(z, self.width)
-        return (x, z)
-
-    def _compute_row_cache(self) -> None:
-        idx_repeated_seq = self.elements_repeated_sequence(
-            _xpath_cell, "table:number-columns-repeated"
-        )
-        self._rmap = make_cache_map(idx_repeated_seq)
-
-    # Public API
-
-    @property
-    def clone(self) -> Row:
-        clone = Element.clone.fget(self)  # type: ignore
-        clone.y = self.y
-        if hasattr(self, "_tmap"):
-            if hasattr(self, "_rmap"):
-                clone._rmap = self._rmap[:]
-            clone._tmap = self._tmap[:]
-            clone._cmap = self._cmap[:]
-        return clone
-
-    def _set_repeated(self, repeated: int | None) -> None:
-        """Internal only. Set the numnber of times the row is repeated, or
-        None to delete it. Without changing cache.
-
-        Arguments:
-
-            repeated -- int
-        """
-        if repeated is None or repeated < 2:
-            with contextlib.suppress(KeyError):
-                self.del_attribute("table:number-rows-repeated")
-            return
-        self.set_attribute("table:number-rows-repeated", str(repeated))
-
-    @property
-    def repeated(self) -> int | None:
-        """Get / set the number of times the row is repeated.
-
-        Always None when using the table API.
-
-        Return: int or None
-        """
-        repeated = self.get_attribute("table:number-rows-repeated")
-        if repeated is None:
-            return None
-        return int(repeated)
-
-    @repeated.setter
-    def repeated(self, repeated: int | None) -> None:
-        self._set_repeated(repeated)
-        # update cache
-        current: Element = self
-        while True:
-            # look for Table, parent may be group of rows
-            upper = current.parent
-            if not upper:
-                # lonely row
-                return
-            # parent may be group of rows, not table
-            if isinstance(upper, Element) and upper._tag == "table:table":
-                break
-            current = upper
-        # fixme : need to optimize this
-        if isinstance(upper, Element) and upper._tag == "table:table":
-            upper._compute_table_cache()
-            if hasattr(self, "_tmap"):
-                del self._tmap[:]
-                self._tmap.extend(upper._tmap)
-            else:
-                self._tmap = upper._tmap
-
-    @property
-    def style(self) -> str | None:
-        """Get /set the style of the row itself.
-
-        Return: str
-        """
-        return self.get_attribute("table:style-name")  # type: ignore
-
-    @style.setter
-    def style(self, style: str | Element) -> None:
-        self.set_style_attribute("table:style-name", style)
-
-    @property
-    def width(self) -> int:
-        """Get the number of expected cells in the row, i.e. addition
-        repetitions.
-
-        Return: int
-        """
-        try:
-            value = self._rmap[-1] + 1
-        except Exception:
-            value = 0
-        return value
-
-    def _translate_x_from_any(self, x: str | int) -> int:
-        return translate_from_any(x, self.width, 0)
-
-    def traverse(  # noqa: C901
-        self,
-        start: int | None = None,
-        end: int | None = None,
-    ) -> Iterator[Cell]:
-        """Yield as many cell elements as expected cells in the row, i.e.
-        expand repetitions by returning the same cell as many times as
-        necessary.
-
-            Arguments:
-
-                start -- int
-
-                end -- int
-
-        Copies are returned, use set_cell() to push them back.
-        """
-        idx = -1
-        before = -1
-        x = 0
-        cell: Cell
-        if start is None and end is None:
-            for juska in self._rmap:
-                idx += 1
-                if idx in self._indexes["_rmap"]:
-                    cell = self._indexes["_rmap"][idx]
-                else:
-                    cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
-                    if not isinstance(cell, Cell):
-                        raise TypeError(f"Not a cell: {cell!r}")
-                    self._indexes["_rmap"][idx] = cell
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    # Return a copy without the now obsolete repetition
-                    if cell is None:
-                        cell = Cell()
-                    else:
-                        cell = cell.clone
-                        if repeated > 1:
-                            cell.repeated = None
-                    cell.y = self.y
-                    cell.x = x
-                    x += 1
-                    yield cell
-        else:
-            if start is None:
-                start = 0
-            start = max(0, start)
-            if end is None:
-                try:
-                    end = self._rmap[-1]
-                except Exception:
-                    end = -1
-            start_map = find_odf_idx(self._rmap, start)
-            if start_map is None:
-                return
-            if start_map > 0:
-                before = self._rmap[start_map - 1]
-            idx = start_map - 1
-            before = start - 1
-            x = start
-            for juska in self._rmap[start_map:]:
-                idx += 1
-                if idx in self._indexes["_rmap"]:
-                    cell = self._indexes["_rmap"][idx]
-                else:
-                    cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
-                    if not isinstance(cell, Cell):
-                        raise TypeError(f"Not a cell: {cell!r}")
-                    self._indexes["_rmap"][idx] = cell
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    if x <= end:
-                        if cell is None:
-                            cell = Cell()
-                        else:
-                            cell = cell.clone
-                            if repeated > 1 or (x == start and start > 0):
-                                cell.repeated = None
-                        cell.y = self.y
-                        cell.x = x
-                        x += 1
-                        yield cell
-
-    def get_cells(
-        self,
-        coord: str | tuple | None = None,
-        style: str | None = None,
-        content: str | None = None,
-        cell_type: str | None = None,
-    ) -> list[Cell]:
-        """Get the list of cells matching the criteria.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-
-        Filter by coordinates will retrieve the amount of cells defined by
-        'coord', minus the other filters.
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            content -- str regex
-
-            style -- str
-
-        Return: list of Cell
-        """
-        # fixme : not clones ?
-        if coord:
-            x, z = self._translate_row_coordinates(coord)
-        else:
-            x = None
-            z = None
-        if cell_type:
-            cell_type = cell_type.lower().strip()
-        cells: list[Cell] = []
-        for cell in self.traverse(start=x, end=z):
-            # Filter the cells by cell_type
-            if cell_type:
-                ctype = cell.type
-                if not ctype or not (ctype == cell_type or cell_type == "all"):
-                    continue
-            # Filter the cells with the regex
-            if content and not cell.match(content):
-                continue
-            # Filter the cells with the style
-            if style and style != cell.style:
-                continue
-            cells.append(cell)
-        return cells
-
-    def _get_cell2(self, x: int, clone: bool = True) -> Cell | None:
-        if x >= self.width:
-            return Cell()
-        if clone:
-            return self._get_cell2_base(x).clone  # type: ignore
-        else:
-            return self._get_cell2_base(x)
-
-    def _get_cell2_base(self, x: int) -> Cell | None:
-        idx = find_odf_idx(self._rmap, x)
-        cell: Cell
-        if idx is not None:
-            if idx in self._indexes["_rmap"]:
-                cell = self._indexes["_rmap"][idx]
-            else:
-                cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
-                self._indexes["_rmap"][idx] = cell
-            return cell
-        return None
-
-    def get_cell(self, x: int, clone: bool = True) -> Cell | None:
-        """Get the cell at position "x" starting from 0. Alphabetical
-        positions like "D" are accepted.
-
-        A  copy is returned, use set_cell() to push it back.
-
-        Arguments:
-
-            x -- int or str
-
-        Return: Cell | None
-        """
-        x = self._translate_x_from_any(x)
-        cell = self._get_cell2(x, clone=clone)
-        if not cell:
-            return None
-        cell.y = self.y
-        cell.x = x
-        return cell
-
-    def get_value(
-        self,
-        x: int | str,
-        get_type: bool = False,
-    ) -> Any | tuple[Any, str]:
-        """Shortcut to get the value of the cell at position "x".
-        If get_type is True, returns the tuples (value, ODF type).
-
-        If the cell is empty, returns None or (None, None)
-
-        See get_cell() and Cell.get_value().
-        """
-        if get_type:
-            x = self._translate_x_from_any(x)
-            cell = self._get_cell2_base(x)
-            if cell is None:
-                return (None, None)
-            return cell.get_value(get_type=get_type)
-        x = self._translate_x_from_any(x)
-        cell = self._get_cell2_base(x)
-        if cell is None:
-            return None
-        return cell.get_value()
-
-    def set_cell(
-        self,
-        x: int | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Push the cell back in the row at position "x" starting from 0.
-        Alphabetical positions like "D" are accepted.
-
-        Arguments:
-
-            x -- int or str
-
-        returns the cell with x and y updated
-        """
-        cell_back: Cell
-        if cell is None:
-            cell = Cell()
-            repeated = 1
-            clone = False
-        else:
-            repeated = cell.repeated or 1
-        x = self._translate_x_from_any(x)
-        # Outside the defined row
-        diff = x - self.width
-        if diff == 0:
-            cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
-        elif diff > 0:
-            self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
-            cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
-        else:
-            # Inside the defined row
-            set_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap", clone=clone)
-            cell.x = x
-            cell.y = self.y
-            cell_back = cell
-        return cell_back
-
-    def set_value(
-        self,
-        x: int | str,
-        value: Any,
-        style: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-    ) -> None:
-        """Shortcut to set the value of the cell at position "x".
-
-        Arguments:
-
-            x -- int or str
-
-            value -- Python type
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                     'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-
-        See get_cell() and Cell.get_value().
-        """
-        self.set_cell(
-            x,
-            Cell(value, style=style, cell_type=cell_type, currency=currency),
-            clone=False,
-        )
-
-    def insert_cell(
-        self,
-        x: int | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Insert the given cell at position "x" starting from 0. If no cell
-        is given, an empty one is created.
-
-        Alphabetical positions like "D" are accepted.
-
-        Do not use when working on a table, use Table.insert_cell().
-
-        Arguments:
-
-            x -- int or str
-
-            cell -- Cell
-
-        returns the cell with x and y updated
-        """
-        cell_back: Cell
-        if cell is None:
-            cell = Cell()
-        x = self._translate_x_from_any(x)
-        # Outside the defined row
-        diff = x - self.width
-        if diff < 0:
-            insert_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap")
-            cell.x = x
-            cell.y = self.y
-            cell_back = cell
-        elif diff == 0:
-            cell_back = self.append_cell(cell, clone=clone)
-        else:
-            self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
-            cell_back = self.append_cell(cell, clone=clone)
-        return cell_back
-
-    def extend_cells(self, cells: Iterable[Cell] | None = None) -> None:
-        if cells is None:
-            cells = []
-        self.extend(cells)
-        self._compute_row_cache()
-
-    def append_cell(
-        self,
-        cell: Cell | None = None,
-        clone: bool = True,
-        _repeated: int | None = None,
-    ) -> Cell:
-        """Append the given cell at the end of the row. Repeated cells are
-        accepted. If no cell is given, an empty one is created.
-
-        Do not use when working on a table, use Table.append_cell().
-
-        Arguments:
-
-            cell -- Cell
-
-            _repeated -- (optional), repeated value of the row
-
-        returns the cell with x and y updated
-        """
-        if cell is None:
-            cell = Cell()
-            clone = False
-        if clone:
-            cell = cell.clone
-        self._append(cell)
-        if _repeated is None:
-            _repeated = cell.repeated or 1
-        self._rmap = insert_map_once(self._rmap, len(self._rmap), _repeated)
-        cell.x = self.width - 1
-        cell.y = self.y
-        return cell
-
-    # fix for unit test and typos
-    append = append_cell  # type: ignore
-
-    def delete_cell(self, x: int | str) -> None:
-        """Delete the cell at the given position "x" starting from 0.
-        Alphabetical positions like "D" are accepted.
-
-        Cells on the right will be shifted to the left. In a table, other
-        rows remain unaffected.
-
-        Arguments:
-
-            x -- int or str
-        """
-        x = self._translate_x_from_any(x)
-        if x >= self.width:
-            return
-        delete_item_in_vault(x, self, _xpath_cell_idx, "_rmap")
-
-    def get_values(
-        self,
-        coord: str | tuple | None = None,
-        cell_type: str | None = None,
-        complete: bool = False,
-        get_type: bool = False,
-    ) -> list[Any | tuple[Any, Any]]:
-        """Shortcut to get the cell values in this row.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-        If cell_type is used and complete is True, missing values are
-        replaced by None.
-        If cell_type is None, complete is always True : with no cell type
-        queried, get_values() returns None for each empty cell, the length
-        of the list is equal to the length of the row (depending on
-        coordinates use).
-
-        If get_type is True, returns a tuple (value, ODF type of value), or
-        (None, None) for empty cells if complete is True.
-
-        Filter by coordinates will retrieve the amount of cells defined by
-        coordinates with None for empty cells, except when using cell_type.
-
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates in row
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: list of Python types, or list of tuples.
-        """
-        if coord:
-            x, z = self._translate_row_coordinates(coord)
-        else:
-            x = None
-            z = None
-        if cell_type:
-            cell_type = cell_type.lower().strip()
-            values: list[Any | tuple[Any, Any]] = []
-            for cell in self.traverse(start=x, end=z):
-                # Filter the cells by cell_type
-                ctype = cell.type
-                if not ctype or not (ctype == cell_type or cell_type == "all"):
-                    if complete:
-                        if get_type:
-                            values.append((None, None))
-                        else:
-                            values.append(None)
-                    continue
-                values.append(cell.get_value(get_type=get_type))
-            return values
-        else:
-            return [
-                cell.get_value(get_type=get_type)
-                for cell in self.traverse(start=x, end=z)
-            ]
-
-    def set_cells(
-        self,
-        cells: list[Cell] | tuple[Cell] | None = None,
-        start: int | str = 0,
-        clone: bool = True,
-    ) -> None:
-        """Set the cells in the row, from the 'start' column.
-        This method does not clear the row, use row.clear() before to start
-        with an empty row.
-
-        Arguments:
-
-            cells -- list of cells
-
-            start -- int or str
-        """
-        if cells is None:
-            cells = []
-        if start is None:
-            start = 0
-        else:
-            start = self._translate_x_from_any(start)
-        if start == 0 and clone is False and (len(cells) >= self.width):
-            self.clear()
-            self.extend_cells(cells)
-        else:
-            x = start
-            for cell in cells:
-                self.set_cell(x, cell, clone=clone)
-                if cell:
-                    x += cell.repeated or 1
-                else:
-                    x += 1
-
-    def set_values(
-        self,
-        values: list[Any],
-        start: int | str = 0,
-        style: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-    ) -> None:
-        """Shortcut to set the value of cells in the row, from the 'start'
-        column vith values.
-        This method does not clear the row, use row.clear() before to start
-        with an empty row.
-
-        Arguments:
-
-            values -- list of Python types
-
-            start -- int or str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency' or 'percentage'
-
-            currency -- three-letter str
-
-            style -- cell style
-        """
-        # fixme : if values n, n+ are same, use repeat
-        if start is None:
-            start = 0
-        else:
-            start = self._translate_x_from_any(start)
-        if start == 0 and (len(values) >= self.width):
-            self.clear()
-            cells = [
-                Cell(value, style=style, cell_type=cell_type, currency=currency)
-                for value in values
-            ]
-            self.extend_cells(cells)
-        else:
-            x = start
-            for value in values:
-                self.set_cell(
-                    x,
-                    Cell(value, style=style, cell_type=cell_type, currency=currency),
-                    clone=False,
-                )
-                x += 1
-
-    def rstrip(self, aggressive: bool = False) -> None:
-        """Remove *in-place* empty cells at the right of the row. An empty
-        cell has no value but can have style. If "aggressive" is True, style
-        is ignored.
-
-        Arguments:
-
-            aggressive -- bool
-        """
-        for cell in reversed(self._get_cells()):
-            if not cell.is_empty(aggressive=aggressive):  # type: ignore
-                break
-            self.delete(cell)
-        self._compute_row_cache()
-        self._indexes["_rmap"] = {}
-
-    def is_empty(self, aggressive: bool = False) -> bool:
-        """Return whether every cell in the row has no value or the value
-        evaluates to False (empty string), and no style.
-
-        If aggressive is True, empty cells with style are considered empty.
-
-        Arguments:
-
-            aggressive -- bool
-
-        Return: bool
-        """
-        return all(cell.is_empty(aggressive=aggressive) for cell in self._get_cells())  # type: ignore
-
-
-register_element_class(Row)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class Row -(width: int | None = None, repeated: int | None = None, style: str | None = None, **kwargs: Any) -
-
-

ODF table row "table:table-row"

-

create a Row, optionally filled with "width" number of cells.

-

Rows contain cells, their number determine the number of columns.

-

You don't generally have to create rows by hand, use the Table API.

-

Arguments

-

width – int

-

repeated – int

-

style – str

-
- -Expand source code - -
class Row(Element):
-    """ODF table row "table:table-row" """
-
-    _tag = "table:table-row"
-    _caching = True
-    _append = Element.append
-
-    def __init__(
-        self,
-        width: int | None = None,
-        repeated: int | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """create a Row, optionally filled with "width" number of cells.
-
-        Rows contain cells, their number determine the number of columns.
-
-        You don't generally have to create rows by hand, use the Table API.
-
-        Arguments:
-
-            width -- int
-
-            repeated -- int
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        self.y = None
-        if not hasattr(self, "_indexes"):
-            self._indexes = {}
-            self._indexes["_rmap"] = {}
-        if not hasattr(self, "_rmap"):
-            self._compute_row_cache()
-            if not hasattr(self, "_tmap"):
-                self._tmap = []
-                self._cmap = []
-        if self._do_init:
-            if width is not None:
-                for _i in range(width):
-                    self.append(Cell())  # type:ignore
-            if repeated:
-                self.repeated = repeated
-            if style is not None:
-                self.style = style
-            self._compute_row_cache()
-
-    def _get_cells(self) -> list[Element]:
-        return self.get_elements(_xpath_cell)
-
-    def _translate_row_coordinates(
-        self,
-        coord: tuple | list | str,
-    ) -> tuple[int | None, int | None]:
-        xyzt = convert_coordinates(coord)
-        if len(xyzt) == 2:
-            x, z = xyzt
-        else:
-            x, _, z, __ = xyzt
-        if x and x < 0:
-            x = increment(x, self.width)
-        if z and z < 0:
-            z = increment(z, self.width)
-        return (x, z)
-
-    def _compute_row_cache(self) -> None:
-        idx_repeated_seq = self.elements_repeated_sequence(
-            _xpath_cell, "table:number-columns-repeated"
-        )
-        self._rmap = make_cache_map(idx_repeated_seq)
-
-    # Public API
-
-    @property
-    def clone(self) -> Row:
-        clone = Element.clone.fget(self)  # type: ignore
-        clone.y = self.y
-        if hasattr(self, "_tmap"):
-            if hasattr(self, "_rmap"):
-                clone._rmap = self._rmap[:]
-            clone._tmap = self._tmap[:]
-            clone._cmap = self._cmap[:]
-        return clone
-
-    def _set_repeated(self, repeated: int | None) -> None:
-        """Internal only. Set the numnber of times the row is repeated, or
-        None to delete it. Without changing cache.
-
-        Arguments:
-
-            repeated -- int
-        """
-        if repeated is None or repeated < 2:
-            with contextlib.suppress(KeyError):
-                self.del_attribute("table:number-rows-repeated")
-            return
-        self.set_attribute("table:number-rows-repeated", str(repeated))
-
-    @property
-    def repeated(self) -> int | None:
-        """Get / set the number of times the row is repeated.
-
-        Always None when using the table API.
-
-        Return: int or None
-        """
-        repeated = self.get_attribute("table:number-rows-repeated")
-        if repeated is None:
-            return None
-        return int(repeated)
-
-    @repeated.setter
-    def repeated(self, repeated: int | None) -> None:
-        self._set_repeated(repeated)
-        # update cache
-        current: Element = self
-        while True:
-            # look for Table, parent may be group of rows
-            upper = current.parent
-            if not upper:
-                # lonely row
-                return
-            # parent may be group of rows, not table
-            if isinstance(upper, Element) and upper._tag == "table:table":
-                break
-            current = upper
-        # fixme : need to optimize this
-        if isinstance(upper, Element) and upper._tag == "table:table":
-            upper._compute_table_cache()
-            if hasattr(self, "_tmap"):
-                del self._tmap[:]
-                self._tmap.extend(upper._tmap)
-            else:
-                self._tmap = upper._tmap
-
-    @property
-    def style(self) -> str | None:
-        """Get /set the style of the row itself.
-
-        Return: str
-        """
-        return self.get_attribute("table:style-name")  # type: ignore
-
-    @style.setter
-    def style(self, style: str | Element) -> None:
-        self.set_style_attribute("table:style-name", style)
-
-    @property
-    def width(self) -> int:
-        """Get the number of expected cells in the row, i.e. addition
-        repetitions.
-
-        Return: int
-        """
-        try:
-            value = self._rmap[-1] + 1
-        except Exception:
-            value = 0
-        return value
-
-    def _translate_x_from_any(self, x: str | int) -> int:
-        return translate_from_any(x, self.width, 0)
-
-    def traverse(  # noqa: C901
-        self,
-        start: int | None = None,
-        end: int | None = None,
-    ) -> Iterator[Cell]:
-        """Yield as many cell elements as expected cells in the row, i.e.
-        expand repetitions by returning the same cell as many times as
-        necessary.
-
-            Arguments:
-
-                start -- int
-
-                end -- int
-
-        Copies are returned, use set_cell() to push them back.
-        """
-        idx = -1
-        before = -1
-        x = 0
-        cell: Cell
-        if start is None and end is None:
-            for juska in self._rmap:
-                idx += 1
-                if idx in self._indexes["_rmap"]:
-                    cell = self._indexes["_rmap"][idx]
-                else:
-                    cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
-                    if not isinstance(cell, Cell):
-                        raise TypeError(f"Not a cell: {cell!r}")
-                    self._indexes["_rmap"][idx] = cell
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    # Return a copy without the now obsolete repetition
-                    if cell is None:
-                        cell = Cell()
-                    else:
-                        cell = cell.clone
-                        if repeated > 1:
-                            cell.repeated = None
-                    cell.y = self.y
-                    cell.x = x
-                    x += 1
-                    yield cell
-        else:
-            if start is None:
-                start = 0
-            start = max(0, start)
-            if end is None:
-                try:
-                    end = self._rmap[-1]
-                except Exception:
-                    end = -1
-            start_map = find_odf_idx(self._rmap, start)
-            if start_map is None:
-                return
-            if start_map > 0:
-                before = self._rmap[start_map - 1]
-            idx = start_map - 1
-            before = start - 1
-            x = start
-            for juska in self._rmap[start_map:]:
-                idx += 1
-                if idx in self._indexes["_rmap"]:
-                    cell = self._indexes["_rmap"][idx]
-                else:
-                    cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
-                    if not isinstance(cell, Cell):
-                        raise TypeError(f"Not a cell: {cell!r}")
-                    self._indexes["_rmap"][idx] = cell
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    if x <= end:
-                        if cell is None:
-                            cell = Cell()
-                        else:
-                            cell = cell.clone
-                            if repeated > 1 or (x == start and start > 0):
-                                cell.repeated = None
-                        cell.y = self.y
-                        cell.x = x
-                        x += 1
-                        yield cell
-
-    def get_cells(
-        self,
-        coord: str | tuple | None = None,
-        style: str | None = None,
-        content: str | None = None,
-        cell_type: str | None = None,
-    ) -> list[Cell]:
-        """Get the list of cells matching the criteria.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-
-        Filter by coordinates will retrieve the amount of cells defined by
-        'coord', minus the other filters.
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            content -- str regex
-
-            style -- str
-
-        Return: list of Cell
-        """
-        # fixme : not clones ?
-        if coord:
-            x, z = self._translate_row_coordinates(coord)
-        else:
-            x = None
-            z = None
-        if cell_type:
-            cell_type = cell_type.lower().strip()
-        cells: list[Cell] = []
-        for cell in self.traverse(start=x, end=z):
-            # Filter the cells by cell_type
-            if cell_type:
-                ctype = cell.type
-                if not ctype or not (ctype == cell_type or cell_type == "all"):
-                    continue
-            # Filter the cells with the regex
-            if content and not cell.match(content):
-                continue
-            # Filter the cells with the style
-            if style and style != cell.style:
-                continue
-            cells.append(cell)
-        return cells
-
-    def _get_cell2(self, x: int, clone: bool = True) -> Cell | None:
-        if x >= self.width:
-            return Cell()
-        if clone:
-            return self._get_cell2_base(x).clone  # type: ignore
-        else:
-            return self._get_cell2_base(x)
-
-    def _get_cell2_base(self, x: int) -> Cell | None:
-        idx = find_odf_idx(self._rmap, x)
-        cell: Cell
-        if idx is not None:
-            if idx in self._indexes["_rmap"]:
-                cell = self._indexes["_rmap"][idx]
-            else:
-                cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
-                self._indexes["_rmap"][idx] = cell
-            return cell
-        return None
-
-    def get_cell(self, x: int, clone: bool = True) -> Cell | None:
-        """Get the cell at position "x" starting from 0. Alphabetical
-        positions like "D" are accepted.
-
-        A  copy is returned, use set_cell() to push it back.
-
-        Arguments:
-
-            x -- int or str
-
-        Return: Cell | None
-        """
-        x = self._translate_x_from_any(x)
-        cell = self._get_cell2(x, clone=clone)
-        if not cell:
-            return None
-        cell.y = self.y
-        cell.x = x
-        return cell
-
-    def get_value(
-        self,
-        x: int | str,
-        get_type: bool = False,
-    ) -> Any | tuple[Any, str]:
-        """Shortcut to get the value of the cell at position "x".
-        If get_type is True, returns the tuples (value, ODF type).
-
-        If the cell is empty, returns None or (None, None)
-
-        See get_cell() and Cell.get_value().
-        """
-        if get_type:
-            x = self._translate_x_from_any(x)
-            cell = self._get_cell2_base(x)
-            if cell is None:
-                return (None, None)
-            return cell.get_value(get_type=get_type)
-        x = self._translate_x_from_any(x)
-        cell = self._get_cell2_base(x)
-        if cell is None:
-            return None
-        return cell.get_value()
-
-    def set_cell(
-        self,
-        x: int | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Push the cell back in the row at position "x" starting from 0.
-        Alphabetical positions like "D" are accepted.
-
-        Arguments:
-
-            x -- int or str
-
-        returns the cell with x and y updated
-        """
-        cell_back: Cell
-        if cell is None:
-            cell = Cell()
-            repeated = 1
-            clone = False
-        else:
-            repeated = cell.repeated or 1
-        x = self._translate_x_from_any(x)
-        # Outside the defined row
-        diff = x - self.width
-        if diff == 0:
-            cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
-        elif diff > 0:
-            self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
-            cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
-        else:
-            # Inside the defined row
-            set_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap", clone=clone)
-            cell.x = x
-            cell.y = self.y
-            cell_back = cell
-        return cell_back
-
-    def set_value(
-        self,
-        x: int | str,
-        value: Any,
-        style: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-    ) -> None:
-        """Shortcut to set the value of the cell at position "x".
-
-        Arguments:
-
-            x -- int or str
-
-            value -- Python type
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                     'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-
-        See get_cell() and Cell.get_value().
-        """
-        self.set_cell(
-            x,
-            Cell(value, style=style, cell_type=cell_type, currency=currency),
-            clone=False,
-        )
-
-    def insert_cell(
-        self,
-        x: int | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Insert the given cell at position "x" starting from 0. If no cell
-        is given, an empty one is created.
-
-        Alphabetical positions like "D" are accepted.
-
-        Do not use when working on a table, use Table.insert_cell().
-
-        Arguments:
-
-            x -- int or str
-
-            cell -- Cell
-
-        returns the cell with x and y updated
-        """
-        cell_back: Cell
-        if cell is None:
-            cell = Cell()
-        x = self._translate_x_from_any(x)
-        # Outside the defined row
-        diff = x - self.width
-        if diff < 0:
-            insert_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap")
-            cell.x = x
-            cell.y = self.y
-            cell_back = cell
-        elif diff == 0:
-            cell_back = self.append_cell(cell, clone=clone)
-        else:
-            self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
-            cell_back = self.append_cell(cell, clone=clone)
-        return cell_back
-
-    def extend_cells(self, cells: Iterable[Cell] | None = None) -> None:
-        if cells is None:
-            cells = []
-        self.extend(cells)
-        self._compute_row_cache()
-
-    def append_cell(
-        self,
-        cell: Cell | None = None,
-        clone: bool = True,
-        _repeated: int | None = None,
-    ) -> Cell:
-        """Append the given cell at the end of the row. Repeated cells are
-        accepted. If no cell is given, an empty one is created.
-
-        Do not use when working on a table, use Table.append_cell().
-
-        Arguments:
-
-            cell -- Cell
-
-            _repeated -- (optional), repeated value of the row
-
-        returns the cell with x and y updated
-        """
-        if cell is None:
-            cell = Cell()
-            clone = False
-        if clone:
-            cell = cell.clone
-        self._append(cell)
-        if _repeated is None:
-            _repeated = cell.repeated or 1
-        self._rmap = insert_map_once(self._rmap, len(self._rmap), _repeated)
-        cell.x = self.width - 1
-        cell.y = self.y
-        return cell
-
-    # fix for unit test and typos
-    append = append_cell  # type: ignore
-
-    def delete_cell(self, x: int | str) -> None:
-        """Delete the cell at the given position "x" starting from 0.
-        Alphabetical positions like "D" are accepted.
-
-        Cells on the right will be shifted to the left. In a table, other
-        rows remain unaffected.
-
-        Arguments:
-
-            x -- int or str
-        """
-        x = self._translate_x_from_any(x)
-        if x >= self.width:
-            return
-        delete_item_in_vault(x, self, _xpath_cell_idx, "_rmap")
-
-    def get_values(
-        self,
-        coord: str | tuple | None = None,
-        cell_type: str | None = None,
-        complete: bool = False,
-        get_type: bool = False,
-    ) -> list[Any | tuple[Any, Any]]:
-        """Shortcut to get the cell values in this row.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-        If cell_type is used and complete is True, missing values are
-        replaced by None.
-        If cell_type is None, complete is always True : with no cell type
-        queried, get_values() returns None for each empty cell, the length
-        of the list is equal to the length of the row (depending on
-        coordinates use).
-
-        If get_type is True, returns a tuple (value, ODF type of value), or
-        (None, None) for empty cells if complete is True.
-
-        Filter by coordinates will retrieve the amount of cells defined by
-        coordinates with None for empty cells, except when using cell_type.
-
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates in row
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: list of Python types, or list of tuples.
-        """
-        if coord:
-            x, z = self._translate_row_coordinates(coord)
-        else:
-            x = None
-            z = None
-        if cell_type:
-            cell_type = cell_type.lower().strip()
-            values: list[Any | tuple[Any, Any]] = []
-            for cell in self.traverse(start=x, end=z):
-                # Filter the cells by cell_type
-                ctype = cell.type
-                if not ctype or not (ctype == cell_type or cell_type == "all"):
-                    if complete:
-                        if get_type:
-                            values.append((None, None))
-                        else:
-                            values.append(None)
-                    continue
-                values.append(cell.get_value(get_type=get_type))
-            return values
-        else:
-            return [
-                cell.get_value(get_type=get_type)
-                for cell in self.traverse(start=x, end=z)
-            ]
-
-    def set_cells(
-        self,
-        cells: list[Cell] | tuple[Cell] | None = None,
-        start: int | str = 0,
-        clone: bool = True,
-    ) -> None:
-        """Set the cells in the row, from the 'start' column.
-        This method does not clear the row, use row.clear() before to start
-        with an empty row.
-
-        Arguments:
-
-            cells -- list of cells
-
-            start -- int or str
-        """
-        if cells is None:
-            cells = []
-        if start is None:
-            start = 0
-        else:
-            start = self._translate_x_from_any(start)
-        if start == 0 and clone is False and (len(cells) >= self.width):
-            self.clear()
-            self.extend_cells(cells)
-        else:
-            x = start
-            for cell in cells:
-                self.set_cell(x, cell, clone=clone)
-                if cell:
-                    x += cell.repeated or 1
-                else:
-                    x += 1
-
-    def set_values(
-        self,
-        values: list[Any],
-        start: int | str = 0,
-        style: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-    ) -> None:
-        """Shortcut to set the value of cells in the row, from the 'start'
-        column vith values.
-        This method does not clear the row, use row.clear() before to start
-        with an empty row.
-
-        Arguments:
-
-            values -- list of Python types
-
-            start -- int or str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency' or 'percentage'
-
-            currency -- three-letter str
-
-            style -- cell style
-        """
-        # fixme : if values n, n+ are same, use repeat
-        if start is None:
-            start = 0
-        else:
-            start = self._translate_x_from_any(start)
-        if start == 0 and (len(values) >= self.width):
-            self.clear()
-            cells = [
-                Cell(value, style=style, cell_type=cell_type, currency=currency)
-                for value in values
-            ]
-            self.extend_cells(cells)
-        else:
-            x = start
-            for value in values:
-                self.set_cell(
-                    x,
-                    Cell(value, style=style, cell_type=cell_type, currency=currency),
-                    clone=False,
-                )
-                x += 1
-
-    def rstrip(self, aggressive: bool = False) -> None:
-        """Remove *in-place* empty cells at the right of the row. An empty
-        cell has no value but can have style. If "aggressive" is True, style
-        is ignored.
-
-        Arguments:
-
-            aggressive -- bool
-        """
-        for cell in reversed(self._get_cells()):
-            if not cell.is_empty(aggressive=aggressive):  # type: ignore
-                break
-            self.delete(cell)
-        self._compute_row_cache()
-        self._indexes["_rmap"] = {}
-
-    def is_empty(self, aggressive: bool = False) -> bool:
-        """Return whether every cell in the row has no value or the value
-        evaluates to False (empty string), and no style.
-
-        If aggressive is True, empty cells with style are considered empty.
-
-        Arguments:
-
-            aggressive -- bool
-
-        Return: bool
-        """
-        return all(cell.is_empty(aggressive=aggressive) for cell in self._get_cells())  # type: ignore
-
-

Ancestors

- -

Instance variables

-
-
var cloneRow
-
-
-
- -Expand source code - -
@property
-def clone(self) -> Row:
-    clone = Element.clone.fget(self)  # type: ignore
-    clone.y = self.y
-    if hasattr(self, "_tmap"):
-        if hasattr(self, "_rmap"):
-            clone._rmap = self._rmap[:]
-        clone._tmap = self._tmap[:]
-        clone._cmap = self._cmap[:]
-    return clone
-
-
-
var repeated : int | None
-
-

Get / set the number of times the row is repeated.

-

Always None when using the table API.

-

Return: int or None

-
- -Expand source code - -
@property
-def repeated(self) -> int | None:
-    """Get / set the number of times the row is repeated.
-
-    Always None when using the table API.
-
-    Return: int or None
-    """
-    repeated = self.get_attribute("table:number-rows-repeated")
-    if repeated is None:
-        return None
-    return int(repeated)
-
-
-
var style : str | None
-
-

Get /set the style of the row itself.

-

Return: str

-
- -Expand source code - -
@property
-def style(self) -> str | None:
-    """Get /set the style of the row itself.
-
-    Return: str
-    """
-    return self.get_attribute("table:style-name")  # type: ignore
-
-
-
var width : int
-
-

Get the number of expected cells in the row, i.e. addition -repetitions.

-

Return: int

-
- -Expand source code - -
@property
-def width(self) -> int:
-    """Get the number of expected cells in the row, i.e. addition
-    repetitions.
-
-    Return: int
-    """
-    try:
-        value = self._rmap[-1] + 1
-    except Exception:
-        value = 0
-    return value
-
-
-
-

Methods

-
-
-def append(self, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Append the given cell at the end of the row. Repeated cells are -accepted. If no cell is given, an empty one is created.

-

Do not use when working on a table, use Table.append_cell().

-

Arguments

-

cell – Cell

-

_repeated – (optional), repeated value of the row

-

returns the cell with x and y updated

-
- -Expand source code - -
def append_cell(
-    self,
-    cell: Cell | None = None,
-    clone: bool = True,
-    _repeated: int | None = None,
-) -> Cell:
-    """Append the given cell at the end of the row. Repeated cells are
-    accepted. If no cell is given, an empty one is created.
-
-    Do not use when working on a table, use Table.append_cell().
-
-    Arguments:
-
-        cell -- Cell
-
-        _repeated -- (optional), repeated value of the row
-
-    returns the cell with x and y updated
-    """
-    if cell is None:
-        cell = Cell()
-        clone = False
-    if clone:
-        cell = cell.clone
-    self._append(cell)
-    if _repeated is None:
-        _repeated = cell.repeated or 1
-    self._rmap = insert_map_once(self._rmap, len(self._rmap), _repeated)
-    cell.x = self.width - 1
-    cell.y = self.y
-    return cell
-
-
-
-def append_cell(self, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Append the given cell at the end of the row. Repeated cells are -accepted. If no cell is given, an empty one is created.

-

Do not use when working on a table, use Table.append_cell().

-

Arguments

-

cell – Cell

-

_repeated – (optional), repeated value of the row

-

returns the cell with x and y updated

-
- -Expand source code - -
def append_cell(
-    self,
-    cell: Cell | None = None,
-    clone: bool = True,
-    _repeated: int | None = None,
-) -> Cell:
-    """Append the given cell at the end of the row. Repeated cells are
-    accepted. If no cell is given, an empty one is created.
-
-    Do not use when working on a table, use Table.append_cell().
-
-    Arguments:
-
-        cell -- Cell
-
-        _repeated -- (optional), repeated value of the row
-
-    returns the cell with x and y updated
-    """
-    if cell is None:
-        cell = Cell()
-        clone = False
-    if clone:
-        cell = cell.clone
-    self._append(cell)
-    if _repeated is None:
-        _repeated = cell.repeated or 1
-    self._rmap = insert_map_once(self._rmap, len(self._rmap), _repeated)
-    cell.x = self.width - 1
-    cell.y = self.y
-    return cell
-
-
-
-def delete_cell(self, x: int | str) ‑> None -
-
-

Delete the cell at the given position "x" starting from 0. -Alphabetical positions like "D" are accepted.

-

Cells on the right will be shifted to the left. In a table, other -rows remain unaffected.

-

Arguments

-

x – int or str

-
- -Expand source code - -
def delete_cell(self, x: int | str) -> None:
-    """Delete the cell at the given position "x" starting from 0.
-    Alphabetical positions like "D" are accepted.
-
-    Cells on the right will be shifted to the left. In a table, other
-    rows remain unaffected.
-
-    Arguments:
-
-        x -- int or str
-    """
-    x = self._translate_x_from_any(x)
-    if x >= self.width:
-        return
-    delete_item_in_vault(x, self, _xpath_cell_idx, "_rmap")
-
-
-
-def extend_cells(self, cells: Iterable[Cell] | None = None) ‑> None -
-
-
-
- -Expand source code - -
def extend_cells(self, cells: Iterable[Cell] | None = None) -> None:
-    if cells is None:
-        cells = []
-    self.extend(cells)
-    self._compute_row_cache()
-
-
-
-def get_cell(self, x: int, clone: bool = True) ‑> Cell | None -
-
-

Get the cell at position "x" starting from 0. Alphabetical -positions like "D" are accepted.

-

A -copy is returned, use set_cell() to push it back.

-

Arguments

-

x – int or str

-

Return: Cell | None

-
- -Expand source code - -
def get_cell(self, x: int, clone: bool = True) -> Cell | None:
-    """Get the cell at position "x" starting from 0. Alphabetical
-    positions like "D" are accepted.
-
-    A  copy is returned, use set_cell() to push it back.
-
-    Arguments:
-
-        x -- int or str
-
-    Return: Cell | None
-    """
-    x = self._translate_x_from_any(x)
-    cell = self._get_cell2(x, clone=clone)
-    if not cell:
-        return None
-    cell.y = self.y
-    cell.x = x
-    return cell
-
-
-
-def get_cells(self, coord: str | tuple | None = None, style: str | None = None, content: str | None = None, cell_type: str | None = None) ‑> list[Cell] -
-
-

Get the list of cells matching the criteria.

-

Filter by cell_type, with cell_type 'all' will retrieve cells of any -type, aka non empty cells.

-

Filter by coordinates will retrieve the amount of cells defined by -'coord', minus the other filters.

-

Arguments

-

coord – str or tuple of int : coordinates

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

content – str regex

-

style – str

-

Return: list of Cell

-
- -Expand source code - -
def get_cells(
-    self,
-    coord: str | tuple | None = None,
-    style: str | None = None,
-    content: str | None = None,
-    cell_type: str | None = None,
-) -> list[Cell]:
-    """Get the list of cells matching the criteria.
-
-    Filter by cell_type, with cell_type 'all' will retrieve cells of any
-    type, aka non empty cells.
-
-    Filter by coordinates will retrieve the amount of cells defined by
-    'coord', minus the other filters.
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        content -- str regex
-
-        style -- str
-
-    Return: list of Cell
-    """
-    # fixme : not clones ?
-    if coord:
-        x, z = self._translate_row_coordinates(coord)
-    else:
-        x = None
-        z = None
-    if cell_type:
-        cell_type = cell_type.lower().strip()
-    cells: list[Cell] = []
-    for cell in self.traverse(start=x, end=z):
-        # Filter the cells by cell_type
-        if cell_type:
-            ctype = cell.type
-            if not ctype or not (ctype == cell_type or cell_type == "all"):
-                continue
-        # Filter the cells with the regex
-        if content and not cell.match(content):
-            continue
-        # Filter the cells with the style
-        if style and style != cell.style:
-            continue
-        cells.append(cell)
-    return cells
-
-
-
-def get_value(self, x: int | str, get_type: bool = False) ‑> typing.Any | tuple[typing.Any, str] -
-
-

Shortcut to get the value of the cell at position "x". -If get_type is True, returns the tuples (value, ODF type).

-

If the cell is empty, returns None or (None, None)

-

See get_cell() and Cell.get_value().

-
- -Expand source code - -
def get_value(
-    self,
-    x: int | str,
-    get_type: bool = False,
-) -> Any | tuple[Any, str]:
-    """Shortcut to get the value of the cell at position "x".
-    If get_type is True, returns the tuples (value, ODF type).
-
-    If the cell is empty, returns None or (None, None)
-
-    See get_cell() and Cell.get_value().
-    """
-    if get_type:
-        x = self._translate_x_from_any(x)
-        cell = self._get_cell2_base(x)
-        if cell is None:
-            return (None, None)
-        return cell.get_value(get_type=get_type)
-    x = self._translate_x_from_any(x)
-    cell = self._get_cell2_base(x)
-    if cell is None:
-        return None
-    return cell.get_value()
-
-
-
-def get_values(self, coord: str | tuple | None = None, cell_type: str | None = None, complete: bool = False, get_type: bool = False) ‑> list[typing.Any | tuple[typing.Any, typing.Any]] -
-
-

Shortcut to get the cell values in this row.

-

Filter by cell_type, with cell_type 'all' will retrieve cells of any -type, aka non empty cells. -If cell_type is used and complete is True, missing values are -replaced by None. -If cell_type is None, complete is always True : with no cell type -queried, get_values() returns None for each empty cell, the length -of the list is equal to the length of the row (depending on -coordinates use).

-

If get_type is True, returns a tuple (value, ODF type of value), or -(None, None) for empty cells if complete is True.

-

Filter by coordinates will retrieve the amount of cells defined by -coordinates with None for empty cells, except when using cell_type.

-

Arguments

-

coord – str or tuple of int : coordinates in row

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

complete – boolean

-

get_type – boolean

-

Return: list of Python types, or list of tuples.

-
- -Expand source code - -
def get_values(
-    self,
-    coord: str | tuple | None = None,
-    cell_type: str | None = None,
-    complete: bool = False,
-    get_type: bool = False,
-) -> list[Any | tuple[Any, Any]]:
-    """Shortcut to get the cell values in this row.
-
-    Filter by cell_type, with cell_type 'all' will retrieve cells of any
-    type, aka non empty cells.
-    If cell_type is used and complete is True, missing values are
-    replaced by None.
-    If cell_type is None, complete is always True : with no cell type
-    queried, get_values() returns None for each empty cell, the length
-    of the list is equal to the length of the row (depending on
-    coordinates use).
-
-    If get_type is True, returns a tuple (value, ODF type of value), or
-    (None, None) for empty cells if complete is True.
-
-    Filter by coordinates will retrieve the amount of cells defined by
-    coordinates with None for empty cells, except when using cell_type.
-
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates in row
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        complete -- boolean
-
-        get_type -- boolean
-
-    Return: list of Python types, or list of tuples.
-    """
-    if coord:
-        x, z = self._translate_row_coordinates(coord)
-    else:
-        x = None
-        z = None
-    if cell_type:
-        cell_type = cell_type.lower().strip()
-        values: list[Any | tuple[Any, Any]] = []
-        for cell in self.traverse(start=x, end=z):
-            # Filter the cells by cell_type
-            ctype = cell.type
-            if not ctype or not (ctype == cell_type or cell_type == "all"):
-                if complete:
-                    if get_type:
-                        values.append((None, None))
-                    else:
-                        values.append(None)
-                continue
-            values.append(cell.get_value(get_type=get_type))
-        return values
-    else:
-        return [
-            cell.get_value(get_type=get_type)
-            for cell in self.traverse(start=x, end=z)
-        ]
-
-
-
-def insert_cell(self, x: int | str, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Insert the given cell at position "x" starting from 0. If no cell -is given, an empty one is created.

-

Alphabetical positions like "D" are accepted.

-

Do not use when working on a table, use Table.insert_cell().

-

Arguments

-

x – int or str

-

cell – Cell

-

returns the cell with x and y updated

-
- -Expand source code - -
def insert_cell(
-    self,
-    x: int | str,
-    cell: Cell | None = None,
-    clone: bool = True,
-) -> Cell:
-    """Insert the given cell at position "x" starting from 0. If no cell
-    is given, an empty one is created.
-
-    Alphabetical positions like "D" are accepted.
-
-    Do not use when working on a table, use Table.insert_cell().
-
-    Arguments:
-
-        x -- int or str
-
-        cell -- Cell
-
-    returns the cell with x and y updated
-    """
-    cell_back: Cell
-    if cell is None:
-        cell = Cell()
-    x = self._translate_x_from_any(x)
-    # Outside the defined row
-    diff = x - self.width
-    if diff < 0:
-        insert_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap")
-        cell.x = x
-        cell.y = self.y
-        cell_back = cell
-    elif diff == 0:
-        cell_back = self.append_cell(cell, clone=clone)
-    else:
-        self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
-        cell_back = self.append_cell(cell, clone=clone)
-    return cell_back
-
-
-
-def is_empty(self, aggressive: bool = False) ‑> bool -
-
-

Return whether every cell in the row has no value or the value -evaluates to False (empty string), and no style.

-

If aggressive is True, empty cells with style are considered empty.

-

Arguments

-

aggressive – bool

-

Return: bool

-
- -Expand source code - -
def is_empty(self, aggressive: bool = False) -> bool:
-    """Return whether every cell in the row has no value or the value
-    evaluates to False (empty string), and no style.
-
-    If aggressive is True, empty cells with style are considered empty.
-
-    Arguments:
-
-        aggressive -- bool
-
-    Return: bool
-    """
-    return all(cell.is_empty(aggressive=aggressive) for cell in self._get_cells())  # type: ignore
-
-
-
-def rstrip(self, aggressive: bool = False) ‑> None -
-
-

Remove in-place empty cells at the right of the row. An empty -cell has no value but can have style. If "aggressive" is True, style -is ignored.

-

Arguments

-

aggressive – bool

-
- -Expand source code - -
def rstrip(self, aggressive: bool = False) -> None:
-    """Remove *in-place* empty cells at the right of the row. An empty
-    cell has no value but can have style. If "aggressive" is True, style
-    is ignored.
-
-    Arguments:
-
-        aggressive -- bool
-    """
-    for cell in reversed(self._get_cells()):
-        if not cell.is_empty(aggressive=aggressive):  # type: ignore
-            break
-        self.delete(cell)
-    self._compute_row_cache()
-    self._indexes["_rmap"] = {}
-
-
-
-def set_cell(self, x: int | str, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Push the cell back in the row at position "x" starting from 0. -Alphabetical positions like "D" are accepted.

-

Arguments

-

x – int or str

-

returns the cell with x and y updated

-
- -Expand source code - -
def set_cell(
-    self,
-    x: int | str,
-    cell: Cell | None = None,
-    clone: bool = True,
-) -> Cell:
-    """Push the cell back in the row at position "x" starting from 0.
-    Alphabetical positions like "D" are accepted.
-
-    Arguments:
-
-        x -- int or str
-
-    returns the cell with x and y updated
-    """
-    cell_back: Cell
-    if cell is None:
-        cell = Cell()
-        repeated = 1
-        clone = False
-    else:
-        repeated = cell.repeated or 1
-    x = self._translate_x_from_any(x)
-    # Outside the defined row
-    diff = x - self.width
-    if diff == 0:
-        cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
-    elif diff > 0:
-        self.append_cell(Cell(repeated=diff), _repeated=diff, clone=False)
-        cell_back = self.append_cell(cell, _repeated=repeated, clone=clone)
-    else:
-        # Inside the defined row
-        set_item_in_vault(x, cell, self, _xpath_cell_idx, "_rmap", clone=clone)
-        cell.x = x
-        cell.y = self.y
-        cell_back = cell
-    return cell_back
-
-
-
-def set_cells(self, cells: list[Cell] | tuple[Cell] | None = None, start: int | str = 0, clone: bool = True) ‑> None -
-
-

Set the cells in the row, from the 'start' column. -This method does not clear the row, use row.clear() before to start -with an empty row.

-

Arguments

-

cells – list of cells

-

start – int or str

-
- -Expand source code - -
def set_cells(
-    self,
-    cells: list[Cell] | tuple[Cell] | None = None,
-    start: int | str = 0,
-    clone: bool = True,
-) -> None:
-    """Set the cells in the row, from the 'start' column.
-    This method does not clear the row, use row.clear() before to start
-    with an empty row.
-
-    Arguments:
-
-        cells -- list of cells
-
-        start -- int or str
-    """
-    if cells is None:
-        cells = []
-    if start is None:
-        start = 0
-    else:
-        start = self._translate_x_from_any(start)
-    if start == 0 and clone is False and (len(cells) >= self.width):
-        self.clear()
-        self.extend_cells(cells)
-    else:
-        x = start
-        for cell in cells:
-            self.set_cell(x, cell, clone=clone)
-            if cell:
-                x += cell.repeated or 1
-            else:
-                x += 1
-
-
-
-def set_value(self, x: int | str, value: Any, style: str | None = None, cell_type: str | None = None, currency: str | None = None) ‑> None -
-
-

Shortcut to set the value of the cell at position "x".

-

Arguments

-

x – int or str

-

value – Python type

-

cell_type – 'boolean', 'currency', 'date', 'float', 'percentage', -'string' or 'time'

-

currency – three-letter str

-

style – str

-

See get_cell() and Cell.get_value().

-
- -Expand source code - -
def set_value(
-    self,
-    x: int | str,
-    value: Any,
-    style: str | None = None,
-    cell_type: str | None = None,
-    currency: str | None = None,
-) -> None:
-    """Shortcut to set the value of the cell at position "x".
-
-    Arguments:
-
-        x -- int or str
-
-        value -- Python type
-
-        cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                 'string' or 'time'
-
-        currency -- three-letter str
-
-        style -- str
-
-    See get_cell() and Cell.get_value().
-    """
-    self.set_cell(
-        x,
-        Cell(value, style=style, cell_type=cell_type, currency=currency),
-        clone=False,
-    )
-
-
-
-def set_values(self, values: list[Any], start: int | str = 0, style: str | None = None, cell_type: str | None = None, currency: str | None = None) ‑> None -
-
-

Shortcut to set the value of cells in the row, from the 'start' -column vith values. -This method does not clear the row, use row.clear() before to start -with an empty row.

-

Arguments

-

values – list of Python types

-

start – int or str

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency' or 'percentage'

-

currency – three-letter str

-

style – cell style

-
- -Expand source code - -
def set_values(
-    self,
-    values: list[Any],
-    start: int | str = 0,
-    style: str | None = None,
-    cell_type: str | None = None,
-    currency: str | None = None,
-) -> None:
-    """Shortcut to set the value of cells in the row, from the 'start'
-    column vith values.
-    This method does not clear the row, use row.clear() before to start
-    with an empty row.
-
-    Arguments:
-
-        values -- list of Python types
-
-        start -- int or str
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency' or 'percentage'
-
-        currency -- three-letter str
-
-        style -- cell style
-    """
-    # fixme : if values n, n+ are same, use repeat
-    if start is None:
-        start = 0
-    else:
-        start = self._translate_x_from_any(start)
-    if start == 0 and (len(values) >= self.width):
-        self.clear()
-        cells = [
-            Cell(value, style=style, cell_type=cell_type, currency=currency)
-            for value in values
-        ]
-        self.extend_cells(cells)
-    else:
-        x = start
-        for value in values:
-            self.set_cell(
-                x,
-                Cell(value, style=style, cell_type=cell_type, currency=currency),
-                clone=False,
-            )
-            x += 1
-
-
-
-def traverse(self, start: int | None = None, end: int | None = None) ‑> collections.abc.Iterator[Cell] -
-
-

Yield as many cell elements as expected cells in the row, i.e. -expand repetitions by returning the same cell as many times as -necessary.

-
Arguments:
-
-    start -- int
-
-    end -- int
-
-

Copies are returned, use set_cell() to push them back.

-
- -Expand source code - -
def traverse(  # noqa: C901
-    self,
-    start: int | None = None,
-    end: int | None = None,
-) -> Iterator[Cell]:
-    """Yield as many cell elements as expected cells in the row, i.e.
-    expand repetitions by returning the same cell as many times as
-    necessary.
-
-        Arguments:
-
-            start -- int
-
-            end -- int
-
-    Copies are returned, use set_cell() to push them back.
-    """
-    idx = -1
-    before = -1
-    x = 0
-    cell: Cell
-    if start is None and end is None:
-        for juska in self._rmap:
-            idx += 1
-            if idx in self._indexes["_rmap"]:
-                cell = self._indexes["_rmap"][idx]
-            else:
-                cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
-                if not isinstance(cell, Cell):
-                    raise TypeError(f"Not a cell: {cell!r}")
-                self._indexes["_rmap"][idx] = cell
-            repeated = juska - before
-            before = juska
-            for _i in range(repeated or 1):
-                # Return a copy without the now obsolete repetition
-                if cell is None:
-                    cell = Cell()
-                else:
-                    cell = cell.clone
-                    if repeated > 1:
-                        cell.repeated = None
-                cell.y = self.y
-                cell.x = x
-                x += 1
-                yield cell
-    else:
-        if start is None:
-            start = 0
-        start = max(0, start)
-        if end is None:
-            try:
-                end = self._rmap[-1]
-            except Exception:
-                end = -1
-        start_map = find_odf_idx(self._rmap, start)
-        if start_map is None:
-            return
-        if start_map > 0:
-            before = self._rmap[start_map - 1]
-        idx = start_map - 1
-        before = start - 1
-        x = start
-        for juska in self._rmap[start_map:]:
-            idx += 1
-            if idx in self._indexes["_rmap"]:
-                cell = self._indexes["_rmap"][idx]
-            else:
-                cell = self._get_element_idx2(_xpath_cell_idx, idx)  # type: ignore
-                if not isinstance(cell, Cell):
-                    raise TypeError(f"Not a cell: {cell!r}")
-                self._indexes["_rmap"][idx] = cell
-            repeated = juska - before
-            before = juska
-            for _i in range(repeated or 1):
-                if x <= end:
-                    if cell is None:
-                        cell = Cell()
-                    else:
-                        cell = cell.clone
-                        if repeated > 1 or (x == start and start > 0):
-                            cell.repeated = None
-                    cell.y = self.y
-                    cell.x = x
-                    x += 1
-                    yield cell
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/scripts/diff.html b/doc/scripts/diff.html deleted file mode 100644 index 60ddcec..0000000 --- a/doc/scripts/diff.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - -odfdo.scripts.diff API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.scripts.diff

-
-
-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-from __future__ import annotations
-
-import sys
-from difflib import ndiff, unified_diff
-from optparse import OptionParser
-from os import stat
-from time import ctime
-
-from odfdo import Document, __version__
-
-
-def main() -> None:
-    usage = "%prog <doc1.odt> <doc2.odt>"
-    description = "Show a diff between doc1.odt and doc2.odt"
-    parser = OptionParser(usage, version=__version__, description=description)
-
-    # --ndiff
-    parser.add_option(
-        "-n",
-        "--ndiff",
-        action="store_true",
-        default=False,
-        help='use a contextual "ndiff" format to show the output',
-    )
-
-    # Parse !
-    options, args = parser.parse_args()
-
-    if len(args) != 2:
-        parser.print_help()
-        sys.exit(1)
-
-    path0 = args[0]
-    path1 = args[1]
-    try:
-        print_diff(path0, path1, options.ndiff)
-    except Exception as e:
-        parser.print_help()
-        print()
-        print(repr(e))
-        sys.exit(1)
-
-
-def print_diff(path0: str, path1: str, ndiff: bool) -> None:
-    # Open the 2 documents, diff only for ODT
-    doc0 = Document(path0)
-    doc1 = Document(path1)
-    if doc0.get_type() != "text" or doc1.get_type() != "text":
-        raise ValueError("Requires documents of type text.")
-    if ndiff:
-        print(make_ndiff(doc0, doc1))
-    else:
-        print(make_diff(doc0, doc1, path0, path1))
-
-
-def make_ndiff(doc0: Document, doc1: Document) -> str:
-    # Convert in text before the diff
-    text0 = doc0.get_formatted_text(True).splitlines(True)
-    text1 = doc1.get_formatted_text(True).splitlines(True)
-    # Make the diff !
-    return "".join(ndiff(text0, text1, None, None))
-
-
-def make_diff(doc0: Document, doc1: Document, path0: str, path1: str) -> str:
-    # Convert in text before the diff
-    text0 = doc0.get_formatted_text(True).splitlines(True)
-    text1 = doc1.get_formatted_text(True).splitlines(True)
-    # Make the diff !
-    fromdate = ctime(stat(path0).st_mtime)
-    todate = ctime(stat(path1).st_mtime)
-    return "".join(unified_diff(text0, text1, path0, path1, fromdate, todate))
-
-
-if __name__ == "__main__":  # pragma: no cover
-    main()
-
-
-
-
-
-
-
-

Functions

-
-
-def main() ‑> None -
-
-
-
- -Expand source code - -
def main() -> None:
-    usage = "%prog <doc1.odt> <doc2.odt>"
-    description = "Show a diff between doc1.odt and doc2.odt"
-    parser = OptionParser(usage, version=__version__, description=description)
-
-    # --ndiff
-    parser.add_option(
-        "-n",
-        "--ndiff",
-        action="store_true",
-        default=False,
-        help='use a contextual "ndiff" format to show the output',
-    )
-
-    # Parse !
-    options, args = parser.parse_args()
-
-    if len(args) != 2:
-        parser.print_help()
-        sys.exit(1)
-
-    path0 = args[0]
-    path1 = args[1]
-    try:
-        print_diff(path0, path1, options.ndiff)
-    except Exception as e:
-        parser.print_help()
-        print()
-        print(repr(e))
-        sys.exit(1)
-
-
-
-def make_diff(doc0: Document, doc1: Document, path0: str, path1: str) ‑> str -
-
-
-
- -Expand source code - -
def make_diff(doc0: Document, doc1: Document, path0: str, path1: str) -> str:
-    # Convert in text before the diff
-    text0 = doc0.get_formatted_text(True).splitlines(True)
-    text1 = doc1.get_formatted_text(True).splitlines(True)
-    # Make the diff !
-    fromdate = ctime(stat(path0).st_mtime)
-    todate = ctime(stat(path1).st_mtime)
-    return "".join(unified_diff(text0, text1, path0, path1, fromdate, todate))
-
-
-
-def make_ndiff(doc0: Document, doc1: Document) ‑> str -
-
-
-
- -Expand source code - -
def make_ndiff(doc0: Document, doc1: Document) -> str:
-    # Convert in text before the diff
-    text0 = doc0.get_formatted_text(True).splitlines(True)
-    text1 = doc1.get_formatted_text(True).splitlines(True)
-    # Make the diff !
-    return "".join(ndiff(text0, text1, None, None))
-
-
-
-def print_diff(path0: str, path1: str, ndiff: bool) ‑> None -
-
-
-
- -Expand source code - -
def print_diff(path0: str, path1: str, ndiff: bool) -> None:
-    # Open the 2 documents, diff only for ODT
-    doc0 = Document(path0)
-    doc1 = Document(path1)
-    if doc0.get_type() != "text" or doc1.get_type() != "text":
-        raise ValueError("Requires documents of type text.")
-    if ndiff:
-        print(make_ndiff(doc0, doc1))
-    else:
-        print(make_diff(doc0, doc1, path0, path1))
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/scripts/folder.html b/doc/scripts/folder.html deleted file mode 100644 index 866ced4..0000000 --- a/doc/scripts/folder.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - -odfdo.scripts.folder API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.scripts.folder

-
-
-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-from __future__ import annotations
-
-import sys
-from optparse import OptionParser
-from pathlib import Path
-
-from odfdo import Document, __version__
-
-
-def main() -> None:
-    usage = "%prog <input file_or_folder>"
-    description = "Convert standard ODF file to folder, and reverse."
-    parser = OptionParser(usage, version=__version__, description=description)
-
-    # Parse !
-    options, args = parser.parse_args()
-
-    try:
-        convert_folder(args[0])
-    except Exception as e:
-        parser.print_help()
-        print()
-        print(repr(e))
-        sys.exit(1)
-
-
-def convert_folder(path_str: str) -> None:
-    path = Path(path_str)
-    if path.is_file():
-        out_packaging = "folder"
-    elif path.is_dir():
-        out_packaging = "zip"
-    else:
-        raise ValueError(f"Not a file or folder: {path}")
-    document = Document(path)
-    document.save(packaging=out_packaging, pretty=True)
-
-
-if __name__ == "__main__":  # pragma: no cover
-    main()
-
-
-
-
-
-
-
-

Functions

-
-
-def convert_folder(path_str: str) ‑> None -
-
-
-
- -Expand source code - -
def convert_folder(path_str: str) -> None:
-    path = Path(path_str)
-    if path.is_file():
-        out_packaging = "folder"
-    elif path.is_dir():
-        out_packaging = "zip"
-    else:
-        raise ValueError(f"Not a file or folder: {path}")
-    document = Document(path)
-    document.save(packaging=out_packaging, pretty=True)
-
-
-
-def main() ‑> None -
-
-
-
- -Expand source code - -
def main() -> None:
-    usage = "%prog <input file_or_folder>"
-    description = "Convert standard ODF file to folder, and reverse."
-    parser = OptionParser(usage, version=__version__, description=description)
-
-    # Parse !
-    options, args = parser.parse_args()
-
-    try:
-        convert_folder(args[0])
-    except Exception as e:
-        parser.print_help()
-        print()
-        print(repr(e))
-        sys.exit(1)
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/scripts/headers.html b/doc/scripts/headers.html deleted file mode 100644 index 5fbc3af..0000000 --- a/doc/scripts/headers.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - -odfdo.scripts.headers API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.scripts.headers

-
-
-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-from __future__ import annotations
-
-import io
-import selectors
-import sys
-from argparse import ArgumentParser, Namespace
-
-from odfdo import Document, Header, __version__
-
-PROG = "odfdo-headers"
-STDIN_TIMEOUT = 0.5
-
-
-def configure_parser() -> ArgumentParser:
-    description = "Print the headers of the document."
-    parser = ArgumentParser(prog=PROG, description=description)
-    parser.add_argument(
-        "-d",
-        "--depth",
-        action="store",
-        dest="depth",
-        type=int,
-        default=999,
-        required=False,
-        help="depth of headers hierarchy to print",
-    )
-    parser.add_argument(
-        "--version",
-        action="version",
-        version=f"{PROG} v{__version__}",
-    )
-    parser.add_argument(
-        "document",
-        nargs="?",
-        default=None,
-        action="store",
-        help="input document. if not present, read from stdin",
-    )
-    return parser
-
-
-def error(message: str) -> str:
-    return f"{PROG}: error: {message}"
-
-
-def detect_stdin_timeout() -> None:
-    selector = selectors.DefaultSelector()
-    selector.register(sys.stdin, selectors.EVENT_READ)
-    something = selector.select(timeout=STDIN_TIMEOUT)
-    if not something:
-        raise SystemExit(error("timeout reading from stdin"))
-    selector.close()
-
-
-def read_document(input_path: str | None) -> Document:
-    if input_path:
-        return Document(input_path)
-    detect_stdin_timeout()
-    content = io.BytesIO(sys.stdin.buffer.read())
-    document = Document(content)
-    content.close()
-    return document
-
-
-def header_numbering(
-    header: Header,
-    level_indexes: dict[int, int],
-    depth: int,
-) -> str | None:
-    level = header.get_attribute_integer("text:outline-level") or 0
-    if level is None or level > depth:
-        return None
-    numbers: list[int] = []
-    # before hedaer level
-    for idx in range(1, level):
-        numbers.append(level_indexes.setdefault(idx, 1))
-    # header level
-    index = level_indexes.get(level, 0) + 1
-    level_indexes[level] = index
-    numbers.append(index)
-    # after header level
-    idx = level + 1
-    while idx in level_indexes:
-        del level_indexes[idx]
-        idx += 1
-    return ".".join(str(x) for x in numbers) + "."
-
-
-def headers_document(document: Document, depth: int) -> None:
-    body = document.body
-    level_indexes: dict[int, int] = {}
-    for header in body.get_headers():
-        number_str = header_numbering(header, level_indexes, depth)
-        if number_str is None:
-            continue
-        print(f"{number_str} {header}")
-
-
-def headers(args: Namespace) -> None:
-    document = read_document(args.document)
-    depth = args.depth
-    headers_document(document, depth)
-
-
-def main() -> int:
-    parser = configure_parser()
-    args = parser.parse_args()
-    try:
-        headers(args)
-    except Exception:
-        parser.print_help()
-        print()
-        raise
-    return 0
-
-
-if __name__ == "__main__":  # pragma: no cover
-    raise SystemExit(main())
-
-
-
-
-
-
-
-

Functions

-
-
-def configure_parser() ‑> argparse.ArgumentParser -
-
-
-
- -Expand source code - -
def configure_parser() -> ArgumentParser:
-    description = "Print the headers of the document."
-    parser = ArgumentParser(prog=PROG, description=description)
-    parser.add_argument(
-        "-d",
-        "--depth",
-        action="store",
-        dest="depth",
-        type=int,
-        default=999,
-        required=False,
-        help="depth of headers hierarchy to print",
-    )
-    parser.add_argument(
-        "--version",
-        action="version",
-        version=f"{PROG} v{__version__}",
-    )
-    parser.add_argument(
-        "document",
-        nargs="?",
-        default=None,
-        action="store",
-        help="input document. if not present, read from stdin",
-    )
-    return parser
-
-
-
-def detect_stdin_timeout() ‑> None -
-
-
-
- -Expand source code - -
def detect_stdin_timeout() -> None:
-    selector = selectors.DefaultSelector()
-    selector.register(sys.stdin, selectors.EVENT_READ)
-    something = selector.select(timeout=STDIN_TIMEOUT)
-    if not something:
-        raise SystemExit(error("timeout reading from stdin"))
-    selector.close()
-
-
-
-def error(message: str) ‑> str -
-
-
-
- -Expand source code - -
def error(message: str) -> str:
-    return f"{PROG}: error: {message}"
-
-
-
-def header_numbering(header: Header, level_indexes: dict[int, int], depth: int) ‑> str | None -
-
-
-
- -Expand source code - -
def header_numbering(
-    header: Header,
-    level_indexes: dict[int, int],
-    depth: int,
-) -> str | None:
-    level = header.get_attribute_integer("text:outline-level") or 0
-    if level is None or level > depth:
-        return None
-    numbers: list[int] = []
-    # before hedaer level
-    for idx in range(1, level):
-        numbers.append(level_indexes.setdefault(idx, 1))
-    # header level
-    index = level_indexes.get(level, 0) + 1
-    level_indexes[level] = index
-    numbers.append(index)
-    # after header level
-    idx = level + 1
-    while idx in level_indexes:
-        del level_indexes[idx]
-        idx += 1
-    return ".".join(str(x) for x in numbers) + "."
-
-
-
-def headers(args: Namespace) ‑> None -
-
-
-
- -Expand source code - -
def headers(args: Namespace) -> None:
-    document = read_document(args.document)
-    depth = args.depth
-    headers_document(document, depth)
-
-
-
-def headers_document(document: Document, depth: int) ‑> None -
-
-
-
- -Expand source code - -
def headers_document(document: Document, depth: int) -> None:
-    body = document.body
-    level_indexes: dict[int, int] = {}
-    for header in body.get_headers():
-        number_str = header_numbering(header, level_indexes, depth)
-        if number_str is None:
-            continue
-        print(f"{number_str} {header}")
-
-
-
-def main() ‑> int -
-
-
-
- -Expand source code - -
def main() -> int:
-    parser = configure_parser()
-    args = parser.parse_args()
-    try:
-        headers(args)
-    except Exception:
-        parser.print_help()
-        print()
-        raise
-    return 0
-
-
-
-def read_document(input_path: str | None) ‑> Document -
-
-
-
- -Expand source code - -
def read_document(input_path: str | None) -> Document:
-    if input_path:
-        return Document(input_path)
-    detect_stdin_timeout()
-    content = io.BytesIO(sys.stdin.buffer.read())
-    document = Document(content)
-    content.close()
-    return document
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/scripts/highlight.html b/doc/scripts/highlight.html deleted file mode 100644 index 19045fb..0000000 --- a/doc/scripts/highlight.html +++ /dev/null @@ -1,577 +0,0 @@ - - - - - - -odfdo.scripts.highlight API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.scripts.highlight

-
-
-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-from __future__ import annotations
-
-import io
-import selectors
-import sys
-from argparse import ArgumentParser, Namespace
-from itertools import chain
-
-from odfdo import Document, Style, __version__
-from odfdo.style import _make_color_string
-
-PROG = "odfdo-highlight"
-STDIN_TIMEOUT = 0.5
-
-
-def configure_parser() -> ArgumentParser:
-    description = "Search and highlight text in ODF file using regex pattern."
-    parser = ArgumentParser(prog=PROG, description=description)
-
-    parser.add_argument(
-        "-i",
-        "--input",
-        action="store",
-        dest="input_file",
-        metavar="INPUT",
-        required=False,
-        help="input file. if option not present, read from stdin",
-    )
-
-    parser.add_argument(
-        "-o",
-        "--output",
-        action="store",
-        dest="output_file",
-        metavar="OUTPUT",
-        required=False,
-        help="output file. if option not present, write to stdout",
-    )
-
-    parser.add_argument(
-        "-a",
-        "--italic",
-        action="store_true",
-        dest="italic",
-        help="use italic font",
-    )
-
-    parser.add_argument(
-        "-b",
-        "--bold",
-        action="store_true",
-        dest="bold",
-        help="use bold font",
-    )
-
-    parser.add_argument(
-        "-c",
-        "--color",
-        action="store",
-        default="",
-        dest="color",
-        required=False,
-        help="font color",
-    )
-    parser.add_argument(
-        "-g",
-        "--background",
-        action="store",
-        default="",
-        dest="background",
-        required=False,
-        help="font background color",
-    )
-    parser.add_argument(
-        "--version",
-        action="version",
-        version=f"{PROG} v{__version__}",
-    )
-    parser.add_argument(
-        "pattern",
-        action="store",
-        help="search pattern (regular expression)",
-    )
-    return parser
-
-
-def error(message: str) -> str:
-    return f"{PROG}: error: {message}"
-
-
-def check_args(args: Namespace) -> None:
-    if not any((args.italic, args.bold, args.color, args.background)):
-        raise SystemExit(error("at least some style argument is required"))
-
-
-def detect_stdin_timeout() -> None:
-    selector = selectors.DefaultSelector()
-    selector.register(sys.stdin, selectors.EVENT_READ)
-    something = selector.select(timeout=STDIN_TIMEOUT)
-    if not something:
-        raise SystemExit(error("timeout reading from stdin"))
-    selector.close()
-
-
-def read_document(input_path: str | None) -> Document:
-    if input_path:
-        return Document(input_path)
-    detect_stdin_timeout()
-    content = io.BytesIO(sys.stdin.buffer.read())
-    document = Document(content)
-    content.close()
-    return document
-
-
-def save_document(document: Document, output_path: str | None) -> None:
-    if output_path:
-        return document.save(output_path)
-    with io.BytesIO() as content:
-        document.save(content)
-        content.seek(0)
-        sys.stdout.buffer.write(content.read())
-
-
-def make_style(document: Document, args: Namespace) -> str:
-    def _display_name() -> str:
-        parts = ["odfdo", "highlight"]
-        if args.color:
-            parts.append(args.color.lower())
-        if args.background:
-            parts.append(args.background.lower())
-        if args.italic:
-            parts.append("italic")
-        if args.bold:
-            parts.append("bold")
-        return " ".join(parts)
-
-    display_name = _display_name()
-    name = display_name.replace(" ", "_20_")
-    if document.get_style("text", name):
-        # style already in the document
-        return name
-
-    if args.color:
-        color = _make_color_string(args.color)
-    else:
-        color = None
-    if args.background:
-        background = _make_color_string(args.background)
-    else:
-        background = None
-
-    style = Style(
-        family="text",
-        name=name,
-        display_name=display_name,
-        italic=args.italic,
-        bold=args.bold,
-        color=color,
-        background_color=background,
-    )
-    document.insert_style(style, automatic=True)
-    return name
-
-
-def apply_style(document: Document, style_name: str, pattern: str) -> None:
-    body = document.body
-    for paragraph in chain(
-        body.get_paragraphs(content=pattern), body.get_headers(content=pattern)
-    ):
-        if paragraph.parent.tag in ("text:index-title", "text:index-body"):
-            continue
-        paragraph.set_span(style=style_name, regex=pattern)
-
-
-def highlight_document(document: Document, args: Namespace) -> None:
-    style_name = make_style(document, args)
-    apply_style(document, style_name, args.pattern)
-
-
-def highlight(args: Namespace) -> None:
-    document = read_document(args.input_file)
-    highlight_document(document, args)
-    save_document(document, args.output_file)
-
-
-def main() -> int:
-    parser = configure_parser()
-    args = parser.parse_args()
-    check_args(args)
-    try:
-        highlight(args)
-    except Exception:
-        parser.print_help()
-        print()
-        raise
-    return 0
-
-
-if __name__ == "__main__":  # pragma: no cover
-    raise SystemExit(main())
-
-
-
-
-
-
-
-

Functions

-
-
-def apply_style(document: Document, style_name: str, pattern: str) ‑> None -
-
-
-
- -Expand source code - -
def apply_style(document: Document, style_name: str, pattern: str) -> None:
-    body = document.body
-    for paragraph in chain(
-        body.get_paragraphs(content=pattern), body.get_headers(content=pattern)
-    ):
-        if paragraph.parent.tag in ("text:index-title", "text:index-body"):
-            continue
-        paragraph.set_span(style=style_name, regex=pattern)
-
-
-
-def check_args(args: Namespace) ‑> None -
-
-
-
- -Expand source code - -
def check_args(args: Namespace) -> None:
-    if not any((args.italic, args.bold, args.color, args.background)):
-        raise SystemExit(error("at least some style argument is required"))
-
-
-
-def configure_parser() ‑> argparse.ArgumentParser -
-
-
-
- -Expand source code - -
def configure_parser() -> ArgumentParser:
-    description = "Search and highlight text in ODF file using regex pattern."
-    parser = ArgumentParser(prog=PROG, description=description)
-
-    parser.add_argument(
-        "-i",
-        "--input",
-        action="store",
-        dest="input_file",
-        metavar="INPUT",
-        required=False,
-        help="input file. if option not present, read from stdin",
-    )
-
-    parser.add_argument(
-        "-o",
-        "--output",
-        action="store",
-        dest="output_file",
-        metavar="OUTPUT",
-        required=False,
-        help="output file. if option not present, write to stdout",
-    )
-
-    parser.add_argument(
-        "-a",
-        "--italic",
-        action="store_true",
-        dest="italic",
-        help="use italic font",
-    )
-
-    parser.add_argument(
-        "-b",
-        "--bold",
-        action="store_true",
-        dest="bold",
-        help="use bold font",
-    )
-
-    parser.add_argument(
-        "-c",
-        "--color",
-        action="store",
-        default="",
-        dest="color",
-        required=False,
-        help="font color",
-    )
-    parser.add_argument(
-        "-g",
-        "--background",
-        action="store",
-        default="",
-        dest="background",
-        required=False,
-        help="font background color",
-    )
-    parser.add_argument(
-        "--version",
-        action="version",
-        version=f"{PROG} v{__version__}",
-    )
-    parser.add_argument(
-        "pattern",
-        action="store",
-        help="search pattern (regular expression)",
-    )
-    return parser
-
-
-
-def detect_stdin_timeout() ‑> None -
-
-
-
- -Expand source code - -
def detect_stdin_timeout() -> None:
-    selector = selectors.DefaultSelector()
-    selector.register(sys.stdin, selectors.EVENT_READ)
-    something = selector.select(timeout=STDIN_TIMEOUT)
-    if not something:
-        raise SystemExit(error("timeout reading from stdin"))
-    selector.close()
-
-
-
-def error(message: str) ‑> str -
-
-
-
- -Expand source code - -
def error(message: str) -> str:
-    return f"{PROG}: error: {message}"
-
-
-
-def highlight(args: Namespace) ‑> None -
-
-
-
- -Expand source code - -
def highlight(args: Namespace) -> None:
-    document = read_document(args.input_file)
-    highlight_document(document, args)
-    save_document(document, args.output_file)
-
-
-
-def highlight_document(document: Document, args: Namespace) ‑> None -
-
-
-
- -Expand source code - -
def highlight_document(document: Document, args: Namespace) -> None:
-    style_name = make_style(document, args)
-    apply_style(document, style_name, args.pattern)
-
-
-
-def main() ‑> int -
-
-
-
- -Expand source code - -
def main() -> int:
-    parser = configure_parser()
-    args = parser.parse_args()
-    check_args(args)
-    try:
-        highlight(args)
-    except Exception:
-        parser.print_help()
-        print()
-        raise
-    return 0
-
-
-
-def make_style(document: Document, args: Namespace) ‑> str -
-
-
-
- -Expand source code - -
def make_style(document: Document, args: Namespace) -> str:
-    def _display_name() -> str:
-        parts = ["odfdo", "highlight"]
-        if args.color:
-            parts.append(args.color.lower())
-        if args.background:
-            parts.append(args.background.lower())
-        if args.italic:
-            parts.append("italic")
-        if args.bold:
-            parts.append("bold")
-        return " ".join(parts)
-
-    display_name = _display_name()
-    name = display_name.replace(" ", "_20_")
-    if document.get_style("text", name):
-        # style already in the document
-        return name
-
-    if args.color:
-        color = _make_color_string(args.color)
-    else:
-        color = None
-    if args.background:
-        background = _make_color_string(args.background)
-    else:
-        background = None
-
-    style = Style(
-        family="text",
-        name=name,
-        display_name=display_name,
-        italic=args.italic,
-        bold=args.bold,
-        color=color,
-        background_color=background,
-    )
-    document.insert_style(style, automatic=True)
-    return name
-
-
-
-def read_document(input_path: str | None) ‑> Document -
-
-
-
- -Expand source code - -
def read_document(input_path: str | None) -> Document:
-    if input_path:
-        return Document(input_path)
-    detect_stdin_timeout()
-    content = io.BytesIO(sys.stdin.buffer.read())
-    document = Document(content)
-    content.close()
-    return document
-
-
-
-def save_document(document: Document, output_path: str | None) ‑> None -
-
-
-
- -Expand source code - -
def save_document(document: Document, output_path: str | None) -> None:
-    if output_path:
-        return document.save(output_path)
-    with io.BytesIO() as content:
-        document.save(content)
-        content.seek(0)
-        sys.stdout.buffer.write(content.read())
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/scripts/index.html b/doc/scripts/index.html deleted file mode 100644 index c1137e7..0000000 --- a/doc/scripts/index.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - -odfdo.scripts API documentation - - - - - - - - - - - -
- - -
- - - \ No newline at end of file diff --git a/doc/scripts/replace.html b/doc/scripts/replace.html deleted file mode 100644 index 2903a87..0000000 --- a/doc/scripts/replace.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - -odfdo.scripts.replace API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.scripts.replace

-
-
-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-from __future__ import annotations
-
-import io
-import selectors
-import sys
-from optparse import OptionParser
-
-from odfdo import Document, __version__
-
-STDIN_TIMEOUT = 0.5
-
-
-def configure_parser() -> OptionParser:
-    usage = "%prog [-i <file in>] [-o <file out>] pattern replacement"
-    description = "Search and replace text in ODF file using regex pattern"
-    parser = OptionParser(usage, version=__version__, description=description)
-
-    parser.add_option(
-        "-i",
-        "--input",
-        action="store",
-        type="string",
-        dest="input_file",
-        nargs=1,
-        help="input file. if option not present, read from stdin.",
-    )
-
-    parser.add_option(
-        "-o",
-        "--output",
-        action="store",
-        type="string",
-        dest="output_file",
-        nargs=1,
-        help="output file. if option not present, write to stdout.",
-    )
-    return parser
-
-
-def main() -> None:
-    parser = configure_parser()
-    options, args = parser.parse_args()
-
-    if len(args) != 2:
-        parser.print_help()
-        print("Two arguments are required (pattern, replacement).")
-        raise SystemExit(1)
-
-    try:
-        search_replace(args[0], args[1], options.input_file, options.output_file)
-    except Exception:
-        parser.print_help()
-        print()
-        raise
-
-
-def detect_stdin_timeout() -> None:
-    selector = selectors.DefaultSelector()
-    selector.register(sys.stdin, selectors.EVENT_READ)
-    something = selector.select(timeout=STDIN_TIMEOUT)
-    if not something:
-        raise ValueError("Timeout reading from stdin")
-    selector.close()
-
-
-def read_document(input_path: str | None) -> Document:
-    if input_path:
-        return Document(input_path)
-    detect_stdin_timeout()
-    content = io.BytesIO(sys.stdin.buffer.read())
-    document = Document(content)
-    content.close()
-    return document
-
-
-def save_document(document: Document, output_path: str | None) -> None:
-    if output_path:
-        return document.save(output_path)
-    with io.BytesIO() as content:
-        document.save(content)
-        content.seek(0)
-        sys.stdout.buffer.write(content.read())
-
-
-def search_replace(
-    pattern: str,
-    replacement: str,
-    input_path: str | None,
-    output_path: str | None,
-) -> None:
-    document = read_document(input_path)
-    body = document.body
-    body.replace(pattern, replacement)
-    save_document(document, output_path)
-
-
-if __name__ == "__main__":  # pragma: no cover
-    main()
-
-
-
-
-
-
-
-

Functions

-
-
-def configure_parser() ‑> optparse.OptionParser -
-
-
-
- -Expand source code - -
def configure_parser() -> OptionParser:
-    usage = "%prog [-i <file in>] [-o <file out>] pattern replacement"
-    description = "Search and replace text in ODF file using regex pattern"
-    parser = OptionParser(usage, version=__version__, description=description)
-
-    parser.add_option(
-        "-i",
-        "--input",
-        action="store",
-        type="string",
-        dest="input_file",
-        nargs=1,
-        help="input file. if option not present, read from stdin.",
-    )
-
-    parser.add_option(
-        "-o",
-        "--output",
-        action="store",
-        type="string",
-        dest="output_file",
-        nargs=1,
-        help="output file. if option not present, write to stdout.",
-    )
-    return parser
-
-
-
-def detect_stdin_timeout() ‑> None -
-
-
-
- -Expand source code - -
def detect_stdin_timeout() -> None:
-    selector = selectors.DefaultSelector()
-    selector.register(sys.stdin, selectors.EVENT_READ)
-    something = selector.select(timeout=STDIN_TIMEOUT)
-    if not something:
-        raise ValueError("Timeout reading from stdin")
-    selector.close()
-
-
-
-def main() ‑> None -
-
-
-
- -Expand source code - -
def main() -> None:
-    parser = configure_parser()
-    options, args = parser.parse_args()
-
-    if len(args) != 2:
-        parser.print_help()
-        print("Two arguments are required (pattern, replacement).")
-        raise SystemExit(1)
-
-    try:
-        search_replace(args[0], args[1], options.input_file, options.output_file)
-    except Exception:
-        parser.print_help()
-        print()
-        raise
-
-
-
-def read_document(input_path: str | None) ‑> Document -
-
-
-
- -Expand source code - -
def read_document(input_path: str | None) -> Document:
-    if input_path:
-        return Document(input_path)
-    detect_stdin_timeout()
-    content = io.BytesIO(sys.stdin.buffer.read())
-    document = Document(content)
-    content.close()
-    return document
-
-
-
-def save_document(document: Document, output_path: str | None) ‑> None -
-
-
-
- -Expand source code - -
def save_document(document: Document, output_path: str | None) -> None:
-    if output_path:
-        return document.save(output_path)
-    with io.BytesIO() as content:
-        document.save(content)
-        content.seek(0)
-        sys.stdout.buffer.write(content.read())
-
-
-
-def search_replace(pattern: str, replacement: str, input_path: str | None, output_path: str | None) ‑> None -
-
-
-
- -Expand source code - -
def search_replace(
-    pattern: str,
-    replacement: str,
-    input_path: str | None,
-    output_path: str | None,
-) -> None:
-    document = read_document(input_path)
-    body = document.body
-    body.replace(pattern, replacement)
-    save_document(document, output_path)
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/scripts/show.html b/doc/scripts/show.html deleted file mode 100644 index a25283d..0000000 --- a/doc/scripts/show.html +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - -odfdo.scripts.show API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.scripts.show

-
-
-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-#          David Versmisse <david.versmisse@itaapy.com>
-from __future__ import annotations
-
-from optparse import OptionParser, Values
-from pathlib import Path
-from shutil import rmtree
-
-from odfdo import Document, __version__
-from odfdo.scriptutils import check_target_directory, printerr
-
-
-def clean_filename(name: str) -> str:
-    allowed_characters = {".", "-", "@"}
-    result = []
-    for char in name:
-        if char in allowed_characters or char.isalnum():
-            result.append(char)
-        else:
-            result.append("\t")
-    return "_".join("".join(result).split())
-
-
-def dump_pictures(document: Document, target: str | Path) -> None:
-    for part_name in document.get_parts():
-        if not part_name.startswith("Pictures/"):
-            continue
-        path = Path(target, "Pictures")
-        if not path.exists():
-            path.mkdir(parents=False, exist_ok=False)
-        data = document.get_part(part_name)
-        path = Path(target, part_name)
-        path.write_bytes(data)  # type: ignore
-
-
-def spreadsheet_to_stdout(document: Document) -> None:
-    body = document.body
-    for table in body.get_tables():
-        table.rstrip(aggressive=True)  # type: ignore
-        print(table.to_csv(None))  # type: ignore
-
-
-def spreadsheet_to_csv(document: Document, output: Path) -> None:
-    body = document.body
-    for table in body.get_tables():
-        name = table.name  # type: ignore
-        filename = clean_filename(name) + ".csv"
-        print(filename)
-        table.rstrip(aggressive=True)  # type: ignore
-        table.to_csv(output / filename)  # type: ignore
-
-
-def show_output(
-    container_url: str,
-    options: Values,
-    doc: Document,
-    doc_type: str,
-) -> None:
-    output = Path(options.output)
-    check_target_directory(str(output))
-    if output.exists():
-        rmtree(output)  # pragma: no cover
-    output.mkdir(parents=True, exist_ok=True)
-    (output / "meta.txt").write_text(doc.get_formated_meta())
-    (output / "styles.txt").write_text(doc.show_styles())
-    dump_pictures(doc, output)
-
-    if doc_type in {"text", "text-template", "presentation", "presentation-template"}:
-        (output / "content.rst").write_text(
-            doc.get_formatted_text(rst_mode=options.rst)
-        )
-    elif doc_type in {"spreadsheet", "spreadsheet-template"}:
-        print(doc)
-        print(doc.path)
-        print(doc.body)
-        spreadsheet_to_csv(doc, output)
-    else:
-        printerr(f"The OpenDocument format '{doc_type}' is not supported yet.")
-        raise SystemExit(1)
-
-
-def show(container_url: str, options: Values) -> None:
-    try:
-        doc = Document(container_url)
-    except Exception as e:
-        print(repr(e))
-        raise SystemExit(1) from None
-    doc_type = doc.get_type()
-    # Test it! XXX for TEXT only
-    # if doc_type == 'text':
-    #    result = test_document(document)
-    #    if result is not True:
-    #        print('This file is malformed: %s' % result)
-    #        print('Please use lpod-clean.py to fix it')
-    #        exit(1)
-    if options.output:
-        return show_output(container_url, options, doc, doc_type)
-    if options.meta:
-        print(doc.get_formated_meta())
-    if options.styles:
-        print(doc.show_styles())
-    if doc_type in {"text", "text-template", "presentation", "presentation-template"}:
-        if not options.no_content:
-            print(doc.get_formatted_text(rst_mode=options.rst))
-    elif doc_type in {"spreadsheet", "spreadsheet-template"}:
-        if not options.no_content:
-            spreadsheet_to_stdout(doc)
-    else:
-        printerr(f"The OpenDocument format '{doc_type}' is not supported yet.")
-        raise SystemExit(1)
-
-
-def main() -> None:
-    # Options initialisation
-    usage = (
-        "%prog [--styles] [--meta] [--no-content] [--rst] <file>\n"
-        "       %prog -o <DIR> [--rst] <file>"
-    )
-    description = (
-        "Dump text from an OpenDocument file to the standard "
-        "output, optionally styles and meta (and the Pictures/* "
-        'in "-o <DIR>" mode)'
-    )
-    parser = OptionParser(usage, version=__version__, description=description)
-    # --meta
-    parser.add_option(
-        "-m",
-        "--meta",
-        action="store_true",
-        default=False,
-        help="dump metadata to stdout",
-    )
-    # --styles
-    parser.add_option(
-        "-s",
-        "--styles",
-        action="store_true",
-        default=False,
-        help="dump styles to stdout",
-    )
-    # --no-content
-    parser.add_option(
-        "-n",
-        "--no-content",
-        action="store_true",
-        default=False,
-        help="do not dump content to stdout",
-    )
-    # --rst
-    parser.add_option(
-        "-r",
-        "--rst",
-        action="store_true",
-        default=False,
-        help="dump the content file with a reST syntax",
-    )
-    parser.add_option(
-        "-o",
-        "--output",
-        metavar="DIR",
-        help="dump the output into DIR",
-    )
-    # Parse !
-    options, args = parser.parse_args()
-    # Container
-    if len(args) != 1:
-        parser.print_help()
-        raise SystemExit(1)
-    container_url = args[0]
-    show(container_url, options)
-
-
-if __name__ == "__main__":  # pragma: no cover
-    main()
-
-
-
-
-
-
-
-

Functions

-
-
-def clean_filename(name: str) ‑> str -
-
-
-
- -Expand source code - -
def clean_filename(name: str) -> str:
-    allowed_characters = {".", "-", "@"}
-    result = []
-    for char in name:
-        if char in allowed_characters or char.isalnum():
-            result.append(char)
-        else:
-            result.append("\t")
-    return "_".join("".join(result).split())
-
-
-
-def dump_pictures(document: Document, target: str | Path) ‑> None -
-
-
-
- -Expand source code - -
def dump_pictures(document: Document, target: str | Path) -> None:
-    for part_name in document.get_parts():
-        if not part_name.startswith("Pictures/"):
-            continue
-        path = Path(target, "Pictures")
-        if not path.exists():
-            path.mkdir(parents=False, exist_ok=False)
-        data = document.get_part(part_name)
-        path = Path(target, part_name)
-        path.write_bytes(data)  # type: ignore
-
-
-
-def main() ‑> None -
-
-
-
- -Expand source code - -
def main() -> None:
-    # Options initialisation
-    usage = (
-        "%prog [--styles] [--meta] [--no-content] [--rst] <file>\n"
-        "       %prog -o <DIR> [--rst] <file>"
-    )
-    description = (
-        "Dump text from an OpenDocument file to the standard "
-        "output, optionally styles and meta (and the Pictures/* "
-        'in "-o <DIR>" mode)'
-    )
-    parser = OptionParser(usage, version=__version__, description=description)
-    # --meta
-    parser.add_option(
-        "-m",
-        "--meta",
-        action="store_true",
-        default=False,
-        help="dump metadata to stdout",
-    )
-    # --styles
-    parser.add_option(
-        "-s",
-        "--styles",
-        action="store_true",
-        default=False,
-        help="dump styles to stdout",
-    )
-    # --no-content
-    parser.add_option(
-        "-n",
-        "--no-content",
-        action="store_true",
-        default=False,
-        help="do not dump content to stdout",
-    )
-    # --rst
-    parser.add_option(
-        "-r",
-        "--rst",
-        action="store_true",
-        default=False,
-        help="dump the content file with a reST syntax",
-    )
-    parser.add_option(
-        "-o",
-        "--output",
-        metavar="DIR",
-        help="dump the output into DIR",
-    )
-    # Parse !
-    options, args = parser.parse_args()
-    # Container
-    if len(args) != 1:
-        parser.print_help()
-        raise SystemExit(1)
-    container_url = args[0]
-    show(container_url, options)
-
-
-
-def show(container_url: str, options: Values) ‑> None -
-
-
-
- -Expand source code - -
def show(container_url: str, options: Values) -> None:
-    try:
-        doc = Document(container_url)
-    except Exception as e:
-        print(repr(e))
-        raise SystemExit(1) from None
-    doc_type = doc.get_type()
-    # Test it! XXX for TEXT only
-    # if doc_type == 'text':
-    #    result = test_document(document)
-    #    if result is not True:
-    #        print('This file is malformed: %s' % result)
-    #        print('Please use lpod-clean.py to fix it')
-    #        exit(1)
-    if options.output:
-        return show_output(container_url, options, doc, doc_type)
-    if options.meta:
-        print(doc.get_formated_meta())
-    if options.styles:
-        print(doc.show_styles())
-    if doc_type in {"text", "text-template", "presentation", "presentation-template"}:
-        if not options.no_content:
-            print(doc.get_formatted_text(rst_mode=options.rst))
-    elif doc_type in {"spreadsheet", "spreadsheet-template"}:
-        if not options.no_content:
-            spreadsheet_to_stdout(doc)
-    else:
-        printerr(f"The OpenDocument format '{doc_type}' is not supported yet.")
-        raise SystemExit(1)
-
-
-
-def show_output(container_url: str, options: Values, doc: Document, doc_type: str) ‑> None -
-
-
-
- -Expand source code - -
def show_output(
-    container_url: str,
-    options: Values,
-    doc: Document,
-    doc_type: str,
-) -> None:
-    output = Path(options.output)
-    check_target_directory(str(output))
-    if output.exists():
-        rmtree(output)  # pragma: no cover
-    output.mkdir(parents=True, exist_ok=True)
-    (output / "meta.txt").write_text(doc.get_formated_meta())
-    (output / "styles.txt").write_text(doc.show_styles())
-    dump_pictures(doc, output)
-
-    if doc_type in {"text", "text-template", "presentation", "presentation-template"}:
-        (output / "content.rst").write_text(
-            doc.get_formatted_text(rst_mode=options.rst)
-        )
-    elif doc_type in {"spreadsheet", "spreadsheet-template"}:
-        print(doc)
-        print(doc.path)
-        print(doc.body)
-        spreadsheet_to_csv(doc, output)
-    else:
-        printerr(f"The OpenDocument format '{doc_type}' is not supported yet.")
-        raise SystemExit(1)
-
-
-
-def spreadsheet_to_csv(document: Document, output: Path) ‑> None -
-
-
-
- -Expand source code - -
def spreadsheet_to_csv(document: Document, output: Path) -> None:
-    body = document.body
-    for table in body.get_tables():
-        name = table.name  # type: ignore
-        filename = clean_filename(name) + ".csv"
-        print(filename)
-        table.rstrip(aggressive=True)  # type: ignore
-        table.to_csv(output / filename)  # type: ignore
-
-
-
-def spreadsheet_to_stdout(document: Document) ‑> None -
-
-
-
- -Expand source code - -
def spreadsheet_to_stdout(document: Document) -> None:
-    body = document.body
-    for table in body.get_tables():
-        table.rstrip(aggressive=True)  # type: ignore
-        print(table.to_csv(None))  # type: ignore
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/scripts/styles.html b/doc/scripts/styles.html deleted file mode 100644 index b1266d3..0000000 --- a/doc/scripts/styles.html +++ /dev/null @@ -1,521 +0,0 @@ - - - - - - -odfdo.scripts.styles API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.scripts.styles

-
-
-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-from __future__ import annotations
-
-import sys
-from io import BytesIO
-from optparse import OptionParser, Values
-from pathlib import Path
-
-from odfdo import Document, __version__
-from odfdo.scriptutils import check_target_file, printerr, printinfo
-
-
-def show_styles(
-    document: Document,
-    target: str | Path | None = None,
-    automatic: bool = True,
-    common: bool = True,
-    properties: bool = False,
-) -> None:
-    """Show the different styles of a document and their properties."""
-    styles_content = document.show_styles(
-        automatic=automatic,
-        common=common,
-        properties=properties,
-    )
-    # Print the output
-    if target is None:
-        print(styles_content, end="")
-        return
-    Path(target).write_text(styles_content)
-
-
-def delete_styles(
-    document: Document,
-    target: str | Path,
-    pretty: bool = True,
-) -> None:
-    number_deleted = document.delete_styles()
-    document.save(target=target, pretty=pretty)
-    printinfo(f"{number_deleted} styles removed (0 error, 0 warning).")
-    if isinstance(target, BytesIO):
-        sys.stdout.buffer.write(target.getvalue())
-
-
-# def find_presentation_list_style(body):
-#     for frame in body.get_frames(presentation_class="outline"):
-#         first_list = frame.get_list()
-#         if first_list is not None:
-#             return first_list.get_style()
-#     return None
-
-
-def merge_presentation_styles(document: Document, source: Document) -> None:
-    # Apply master page found
-    raise NotImplementedError("merge_presentation_styles")  # pragma: no cover
-    # source_body = source.body
-    # first_page = source_body.get_draw_page()
-    # master_page_name = first_page.master_page
-    # print(master_page_name)
-    # first_master_page = document.get_style("master-page", master_page_name)
-    # printinfo(f"master page used: {first_master_page.display_name}")
-    # body = document.body
-
-    # for page in body.get_draw_pages():
-    #     page.set_style_attribute(first_page.get_style())
-    #     page.set_master_page(first_page.get_master_page())
-    #     page.set_presentation_page_layout(first_page.get_presentation_page_layout())
-    # Adjust layout -- will obviously work only if content is separated from
-
-    # style: use of master pages, layout, etc.
-    # for presentation_class in ODF_CLASSES:
-    #     first_frame = source_body.get_frame(presentation_class=presentation_class)
-    #     if first_frame is None:
-    #         continue
-    #     # Mimic frame style
-    #     position = first_frame.get_position()
-    #     size = first_frame.size
-    #     style = first_frame.style
-    #     presentation_style = first_frame.get_presentation_style()
-    #     for page in body.get_draw_pages():
-    #         for frame in page.get_frames(presentation_class=presentation_class):
-    #             frame.position = position
-    #             frame.size = size
-    #             frame.set_style_attribute(style)
-    #             frame.set_presentation_style(presentation_style)
-    #     # Mimic list style (XXX only first level)
-    #     if presentation_class == "outline":
-    #         list_style = find_presentation_list_style(source_body)
-    #         for page in body.get_draw_pages():
-    #             for frame in page.get_frames(presentation_class="outline"):
-    #                 for lst in frame.get_lists():
-    #                     lst.set_style_attribute(list_style)
-
-
-def merge_styles(
-    document: Document,
-    from_file: str | Path,
-    target: str | Path | None = None,
-    pretty: bool = True,
-) -> None:
-    source = Document(from_file)
-    document.delete_styles()
-    document.merge_styles_from(source)
-    # doc_type = document.get_type()
-    # Enhance Presentation merge
-    # if doc_type in {"presentation", "presentation-template"}:
-    #     printinfo("merging presentation styles...")
-    #     merge_presentation_styles(document, source)
-    document.save(target=target, pretty=pretty)
-    printinfo("Done (0 error, 0 warning).")
-
-
-def style_tools(container_url: str, options: Values) -> None:
-    doc = Document(container_url)
-
-    if options.delete:
-        target = options.output
-        if target is None:
-            printerr("Will not delete in-place: output file needed or '-' for stdout")
-            sys.exit(1)
-        elif target == "-":
-            target = BytesIO()
-        else:
-            check_target_file(target)
-        delete_styles(doc, target)
-    elif options.merge:
-        merge_styles(doc, options.merge, target=options.output)
-    else:
-        automatic = options.automatic
-        common = options.common
-        if not automatic ^ common:
-            automatic, common = True, True
-        show_styles(
-            doc,
-            options.output,
-            automatic=automatic,
-            common=common,
-            properties=options.properties,
-        )
-
-
-def main() -> None:
-    # Options initialisation
-    usage = "%prog [options] <file>"
-    description = "A command line interface to manipulate styles of OpenDocument files."
-    parser = OptionParser(usage, version=__version__, description=description)
-    # --automatic
-    parser.add_option(
-        "-a",
-        "--automatic",
-        action="store_true",
-        default=False,
-        help="show automatic styles only",
-    )
-    # --common
-    parser.add_option(
-        "-c",
-        "--common",
-        action="store_true",
-        default=False,
-        help="show common styles only",
-    )
-    # --properties
-    parser.add_option(
-        "-p", "--properties", action="store_true", help="show properties of styles"
-    )
-    # --delete
-    msg = "return a copy with all styles (except default) deleted from <file>"
-    parser.add_option("-d", "--delete", action="store_true", help=msg)
-    # --merge
-    msg = (
-        "copy styles from FILE to <file>. Any style with the same "
-        "name will be replaced."
-    )
-    parser.add_option(
-        "-m", "--merge-styles-from", dest="merge", metavar="FILE", help=msg
-    )
-    parser.add_option(
-        "-o",
-        "--output",
-        metavar="FILE",
-        help="dump the output into FILE",
-    )
-    # Parse options
-    options, args = parser.parse_args()
-    if len(args) != 1:
-        parser.print_help()
-        raise SystemExit(1)
-
-    container_url = args[0]
-    try:
-        style_tools(container_url, options)
-    except Exception as e:
-        print(repr(e))
-        raise SystemExit(1) from None
-
-
-if __name__ == "__main__":  # pragma: no cover
-    main()
-
-
-
-
-
-
-
-

Functions

-
-
-def delete_styles(document: Document, target: str | Path, pretty: bool = True) ‑> None -
-
-
-
- -Expand source code - -
def delete_styles(
-    document: Document,
-    target: str | Path,
-    pretty: bool = True,
-) -> None:
-    number_deleted = document.delete_styles()
-    document.save(target=target, pretty=pretty)
-    printinfo(f"{number_deleted} styles removed (0 error, 0 warning).")
-    if isinstance(target, BytesIO):
-        sys.stdout.buffer.write(target.getvalue())
-
-
-
-def main() ‑> None -
-
-
-
- -Expand source code - -
def main() -> None:
-    # Options initialisation
-    usage = "%prog [options] <file>"
-    description = "A command line interface to manipulate styles of OpenDocument files."
-    parser = OptionParser(usage, version=__version__, description=description)
-    # --automatic
-    parser.add_option(
-        "-a",
-        "--automatic",
-        action="store_true",
-        default=False,
-        help="show automatic styles only",
-    )
-    # --common
-    parser.add_option(
-        "-c",
-        "--common",
-        action="store_true",
-        default=False,
-        help="show common styles only",
-    )
-    # --properties
-    parser.add_option(
-        "-p", "--properties", action="store_true", help="show properties of styles"
-    )
-    # --delete
-    msg = "return a copy with all styles (except default) deleted from <file>"
-    parser.add_option("-d", "--delete", action="store_true", help=msg)
-    # --merge
-    msg = (
-        "copy styles from FILE to <file>. Any style with the same "
-        "name will be replaced."
-    )
-    parser.add_option(
-        "-m", "--merge-styles-from", dest="merge", metavar="FILE", help=msg
-    )
-    parser.add_option(
-        "-o",
-        "--output",
-        metavar="FILE",
-        help="dump the output into FILE",
-    )
-    # Parse options
-    options, args = parser.parse_args()
-    if len(args) != 1:
-        parser.print_help()
-        raise SystemExit(1)
-
-    container_url = args[0]
-    try:
-        style_tools(container_url, options)
-    except Exception as e:
-        print(repr(e))
-        raise SystemExit(1) from None
-
-
-
-def merge_presentation_styles(document: Document, source: Document) ‑> None -
-
-
-
- -Expand source code - -
def merge_presentation_styles(document: Document, source: Document) -> None:
-    # Apply master page found
-    raise NotImplementedError("merge_presentation_styles")  # pragma: no cover
-    # source_body = source.body
-    # first_page = source_body.get_draw_page()
-    # master_page_name = first_page.master_page
-    # print(master_page_name)
-    # first_master_page = document.get_style("master-page", master_page_name)
-    # printinfo(f"master page used: {first_master_page.display_name}")
-    # body = document.body
-
-    # for page in body.get_draw_pages():
-    #     page.set_style_attribute(first_page.get_style())
-    #     page.set_master_page(first_page.get_master_page())
-    #     page.set_presentation_page_layout(first_page.get_presentation_page_layout())
-    # Adjust layout -- will obviously work only if content is separated from
-
-    # style: use of master pages, layout, etc.
-    # for presentation_class in ODF_CLASSES:
-    #     first_frame = source_body.get_frame(presentation_class=presentation_class)
-    #     if first_frame is None:
-    #         continue
-    #     # Mimic frame style
-    #     position = first_frame.get_position()
-    #     size = first_frame.size
-    #     style = first_frame.style
-    #     presentation_style = first_frame.get_presentation_style()
-    #     for page in body.get_draw_pages():
-    #         for frame in page.get_frames(presentation_class=presentation_class):
-    #             frame.position = position
-    #             frame.size = size
-    #             frame.set_style_attribute(style)
-    #             frame.set_presentation_style(presentation_style)
-    #     # Mimic list style (XXX only first level)
-    #     if presentation_class == "outline":
-    #         list_style = find_presentation_list_style(source_body)
-    #         for page in body.get_draw_pages():
-    #             for frame in page.get_frames(presentation_class="outline"):
-    #                 for lst in frame.get_lists():
-    #                     lst.set_style_attribute(list_style)
-
-
-
-def merge_styles(document: Document, from_file: str | Path, target: str | Path | None = None, pretty: bool = True) ‑> None -
-
-
-
- -Expand source code - -
def merge_styles(
-    document: Document,
-    from_file: str | Path,
-    target: str | Path | None = None,
-    pretty: bool = True,
-) -> None:
-    source = Document(from_file)
-    document.delete_styles()
-    document.merge_styles_from(source)
-    # doc_type = document.get_type()
-    # Enhance Presentation merge
-    # if doc_type in {"presentation", "presentation-template"}:
-    #     printinfo("merging presentation styles...")
-    #     merge_presentation_styles(document, source)
-    document.save(target=target, pretty=pretty)
-    printinfo("Done (0 error, 0 warning).")
-
-
-
-def show_styles(document: Document, target: str | Path | None = None, automatic: bool = True, common: bool = True, properties: bool = False) ‑> None -
-
-

Show the different styles of a document and their properties.

-
- -Expand source code - -
def show_styles(
-    document: Document,
-    target: str | Path | None = None,
-    automatic: bool = True,
-    common: bool = True,
-    properties: bool = False,
-) -> None:
-    """Show the different styles of a document and their properties."""
-    styles_content = document.show_styles(
-        automatic=automatic,
-        common=common,
-        properties=properties,
-    )
-    # Print the output
-    if target is None:
-        print(styles_content, end="")
-        return
-    Path(target).write_text(styles_content)
-
-
-
-def style_tools(container_url: str, options: Values) ‑> None -
-
-
-
- -Expand source code - -
def style_tools(container_url: str, options: Values) -> None:
-    doc = Document(container_url)
-
-    if options.delete:
-        target = options.output
-        if target is None:
-            printerr("Will not delete in-place: output file needed or '-' for stdout")
-            sys.exit(1)
-        elif target == "-":
-            target = BytesIO()
-        else:
-            check_target_file(target)
-        delete_styles(doc, target)
-    elif options.merge:
-        merge_styles(doc, options.merge, target=options.output)
-    else:
-        automatic = options.automatic
-        common = options.common
-        if not automatic ^ common:
-            automatic, common = True, True
-        show_styles(
-            doc,
-            options.output,
-            automatic=automatic,
-            common=common,
-            properties=options.properties,
-        )
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/scriptutils.html b/doc/scriptutils.html deleted file mode 100644 index e8f1b01..0000000 --- a/doc/scriptutils.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - -odfdo.scriptutils API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.scriptutils

-
-
-

Utilities shared by the scripts.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-"""Utilities shared by the scripts.
-"""
-from __future__ import annotations
-
-from os.path import exists
-from sys import stderr, stdin
-from typing import Any
-
-
-def check_target_file(path: str, kind: str = "file") -> None:
-    if exists(path):
-        message = f'The {kind} "{path}" exists, overwrite it? [y/n]'
-        stderr.write(message)
-        stderr.flush()
-        line = stdin.readline()
-        line = line.strip().lower()
-        if line != "y":
-            stderr.write("Operation aborted\n")
-            stderr.flush()
-            raise SystemExit(0)
-
-
-def check_target_directory(path: str) -> None:
-    return check_target_file(path, kind="directory")
-
-
-def printinfo(*args: Any, **kwargs: Any) -> None:
-    indent = kwargs.get("indent", 0)
-    if indent:
-        stderr.write(" " * indent)
-    output = " ".join(str(arg) for arg in args)
-    print(output, file=stderr, **kwargs)
-
-
-def printwarn(*args: Any, **kwargs: Any) -> None:
-    printinfo("Warning:", *args, **kwargs)
-
-
-def printerr(*args: Any, **kwargs: Any) -> None:
-    printinfo("Error:", *args, **kwargs)
-
-
-
-
-
-
-
-

Functions

-
-
-def check_target_directory(path: str) ‑> None -
-
-
-
- -Expand source code - -
def check_target_directory(path: str) -> None:
-    return check_target_file(path, kind="directory")
-
-
-
-def check_target_file(path: str, kind: str = 'file') ‑> None -
-
-
-
- -Expand source code - -
def check_target_file(path: str, kind: str = "file") -> None:
-    if exists(path):
-        message = f'The {kind} "{path}" exists, overwrite it? [y/n]'
-        stderr.write(message)
-        stderr.flush()
-        line = stdin.readline()
-        line = line.strip().lower()
-        if line != "y":
-            stderr.write("Operation aborted\n")
-            stderr.flush()
-            raise SystemExit(0)
-
-
-
-def printerr(*args: Any, **kwargs: Any) ‑> None -
-
-
-
- -Expand source code - -
def printerr(*args: Any, **kwargs: Any) -> None:
-    printinfo("Error:", *args, **kwargs)
-
-
-
-def printinfo(*args: Any, **kwargs: Any) ‑> None -
-
-
-
- -Expand source code - -
def printinfo(*args: Any, **kwargs: Any) -> None:
-    indent = kwargs.get("indent", 0)
-    if indent:
-        stderr.write(" " * indent)
-    output = " ".join(str(arg) for arg in args)
-    print(output, file=stderr, **kwargs)
-
-
-
-def printwarn(*args: Any, **kwargs: Any) ‑> None -
-
-
-
- -Expand source code - -
def printwarn(*args: Any, **kwargs: Any) -> None:
-    printinfo("Warning:", *args, **kwargs)
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/search.js b/doc/search.js new file mode 100644 index 0000000..0cbab9b --- /dev/null +++ b/doc/search.js @@ -0,0 +1,46 @@ +window.pdocSearch = (function(){ +/** elasticlunr - http://weixsong.github.io * Copyright (C) 2017 Oliver Nightingale * Copyright (C) 2017 Wei Song * MIT Licensed */!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];e="string"==typeof e?{any:e}:JSON.parse(JSON.stringify(e));var i=null;null!=n&&(i=JSON.stringify(n));for(var o=new t.Configuration(i,this.getFields()).get(),r={},s=Object.keys(e),u=0;u0&&t.push(e);for(var i in n)"docs"!==i&&"df"!==i&&this.expandToken(e+i,t,n[i]);return t},t.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},t.Configuration=function(e,n){var e=e||"";if(void 0==n||null==n)throw new Error("fields should not be null");this.config={};var i;try{i=JSON.parse(e),this.buildUserConfig(i,n)}catch(o){t.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(n)}},t.Configuration.prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},t.Configuration.prototype.buildUserConfig=function(e,n){var i="OR",o=!1;if(this.reset(),"bool"in e&&(i=e.bool||i),"expand"in e&&(o=e.expand||o),"fields"in e)for(var r in e.fields)if(n.indexOf(r)>-1){var s=e.fields[r],u=o;void 0!=s.expand&&(u=s.expand),this.config[r]={boost:s.boost||0===s.boost?s.boost:1,bool:s.bool||i,expand:u}}else t.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(i,o,n)},t.Configuration.prototype.addAllFields2UserConfig=function(e,t,n){n.forEach(function(n){this.config[n]={boost:1,bool:e,expand:t}},this)},t.Configuration.prototype.get=function(){return this.config},t.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){var e,t;for(e=0;e1;){if(r===e)return o;e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},lunr.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:e>r?o+1:void 0},lunr.SortedSet.prototype.intersect=function(e){for(var t=new lunr.SortedSet,n=0,i=0,o=this.length,r=e.length,s=this.elements,u=e.elements;;){if(n>o-1||i>r-1)break;s[n]!==u[i]?s[n]u[i]&&i++:(t.add(s[n]),n++,i++)}return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();oodfdo\n\n

Python library for OpenDocument format (ODF)

\n\n

\"logo\"

\n\n

odfdo is a Python3 library implementing the ISO/IEC 26300 OpenDocument Format\nstandard.

\n\n

Project:\n https://github.com/jdum/odfdo

\n\n

Author:\n jerome.dumonteil@gmail.com

\n\n

License:\n Apache License, Version 2.0

\n\n

odfdo is a derivative work of the former lpod-python project.

\n\n

Installation

\n\n

Installation from Pypi (recommended):

\n\n
\n
pip install odfdo\n
\n
\n\n

Installation from sources (requiring setuptools):

\n\n
\n
pip install .\n
\n
\n\n

After installation from sources, you can check everything is working (some requirements: pytest, Pillow, ...):

\n\n
\n
pytest\n
\n
\n\n

The tests should run for a few seconds or minutes and issue no error.

\n\n

Usage

\n\n
from odfdo import Document, Paragraph\n\ndoc = Document('text')\ndoc.body.append(Paragraph(\"Hello world!\"))\ndoc.save(\"hello.odt\")\n
\n\n

tl;dr

\n\n

'Intended Audience :: Developers'

\n\n

Documentation

\n\n

There is no detailed documentation or tutorial, but:

\n\n
    \n
  • the recipes folder contains more than 50 working sample scripts,
  • \n
  • the doc folder contains an auto generated documentation.
  • \n
\n\n

When installing odfdo, a few scripts are installed:

\n\n
    \n
  • odfdo-diff: show a diff between two .odt document.
  • \n
  • odfdo-folder: convert standard ODF file to folder and files, and reverse.
  • \n
  • odfdo-show: dump text from an ODF file to the standard output, and optionally styles and meta informations.
  • \n
  • odfdo-styles: command line interface tool to manipulate styles of ODF files.
  • \n
  • odfdo-replace: find a pattern (regex) in an ODF file and replace by some string.
  • \n
  • odfdo-highlight: highlight the text matching a pattern (regex) in an ODF file.
  • \n
  • odfdo-headers: print the headers of an ODF file.
  • \n
\n\n

About styles: the best way to apply style is by merging styles from a template\ndocument into your generated document (See odfdo-styles script).\nStyles are a complex matter in ODF, so trying to generate styles programmatically\nis not recommended.

\n\n

Limitations

\n\n

odfdo is intended to facilitate the generation of ODF documents,\nnevertheless a basic knowledge of the ODF format is necessary.

\n\n

ODF document rendering can vary greatly from software to software. Especially the\n\"styles\" of the document allow an adaptation of the rendering for a particular\nsoftware.

\n\n

The best (only ?) way to apply style is by merging styles from a template\ndocument into your generated document.

\n\n

Related project

\n\n

I you work on .ods files (spreadsheet), you may be interested by these scripts that\nuse this library to parse/generate .ods files:\nhttps://github.com/jdum/odsgenerator and https://github.com/jdum/odsparsator

\n\n

Changes from former lpod library

\n\n

lpod-python was written in 2009-2010 as a Python 2.x library,\nsee: https://github.com/lpod/lpod-python

\n\n

odfdo is an adaptation of this former project. odfdo main changes from lpod:

\n\n
    \n
  • odfdo requires Python version 3.9 to 3.12. For Python 3.6 to 3.8 see previous releases.
  • \n
  • API change: more pythonic.
  • \n
  • include recipes.
  • \n
  • use Apache 2.0 license.
  • \n
\n"}, "odfdo.AnimPar": {"fullname": "odfdo.AnimPar", "modulename": "odfdo", "qualname": "AnimPar", "kind": "class", "doc": "

A container for SMIL Presentation Animations.

\n\n

Arguments:

\n\n
presentation_node_type -- default, on-click, with-previous,\n                          after-previous, timing-root, main-sequence\n                          and interactive-sequence\n\nsmil_begin -- indefinite, 10s, [id].click, [id].begin\n
\n", "bases": "odfdo.element.Element"}, "odfdo.AnimPar.__init__": {"fullname": "odfdo.AnimPar.__init__", "modulename": "odfdo", "qualname": "AnimPar.__init__", "kind": "function", "doc": "

\n", "signature": "(\tpresentation_node_type: str | None = None,\tsmil_begin: str | None = None,\t**kwargs: Any)"}, "odfdo.AnimPar.presentation_node_type": {"fullname": "odfdo.AnimPar.presentation_node_type", "modulename": "odfdo", "qualname": "AnimPar.presentation_node_type", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.AnimPar.smil_begin": {"fullname": "odfdo.AnimPar.smil_begin", "modulename": "odfdo", "qualname": "AnimPar.smil_begin", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.AnimSeq": {"fullname": "odfdo.AnimSeq", "modulename": "odfdo", "qualname": "AnimSeq", "kind": "class", "doc": "

TA container for SMIL Presentation Animations. Animations\ninside this block are executed after the slide has executed its initial\ntransition.

\n\n

Arguments:

\n\n
presentation_node_type -- default, on-click, with-previous,\n                          after-previous, timing-root, main-sequence\n                          and interactive-sequence\n
\n", "bases": "odfdo.element.Element"}, "odfdo.AnimSeq.__init__": {"fullname": "odfdo.AnimSeq.__init__", "modulename": "odfdo", "qualname": "AnimSeq.__init__", "kind": "function", "doc": "

\n", "signature": "(presentation_node_type: str | None = None, **kwargs: Any)"}, "odfdo.AnimSeq.presentation_node_type": {"fullname": "odfdo.AnimSeq.presentation_node_type", "modulename": "odfdo", "qualname": "AnimSeq.presentation_node_type", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.AnimTransFilter": {"fullname": "odfdo.AnimTransFilter", "modulename": "odfdo", "qualname": "AnimTransFilter", "kind": "class", "doc": "

Class to make a beautiful transition between two frames.

\n\n

Arguments:\n smil_dur -- XXX complete me

\n\n

smil_type and smil_subtype -- see http://www.w3.org/TR/SMIL20/\n smil-transitions.html#TransitionEffects-Appendix\n to get a list of all types/subtypes

\n\n

smil_direction -- forward, reverse

\n\n

smil_fadeColor -- forward, reverse

\n\n

smil_mode -- in, out

\n", "bases": "odfdo.element.Element"}, "odfdo.AnimTransFilter.__init__": {"fullname": "odfdo.AnimTransFilter.__init__", "modulename": "odfdo", "qualname": "AnimTransFilter.__init__", "kind": "function", "doc": "

\n", "signature": "(\tsmil_dur: str | None = None,\tsmil_type: str | None = None,\tsmil_subtype: str | None = None,\tsmil_direction: str | None = None,\tsmil_fadeColor: str | None = None,\tsmil_mode: str | None = None,\t**kwargs: Any)"}, "odfdo.AnimTransFilter.smil_dur": {"fullname": "odfdo.AnimTransFilter.smil_dur", "modulename": "odfdo", "qualname": "AnimTransFilter.smil_dur", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.AnimTransFilter.smil_type": {"fullname": "odfdo.AnimTransFilter.smil_type", "modulename": "odfdo", "qualname": "AnimTransFilter.smil_type", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.AnimTransFilter.smil_subtype": {"fullname": "odfdo.AnimTransFilter.smil_subtype", "modulename": "odfdo", "qualname": "AnimTransFilter.smil_subtype", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.AnimTransFilter.smil_direction": {"fullname": "odfdo.AnimTransFilter.smil_direction", "modulename": "odfdo", "qualname": "AnimTransFilter.smil_direction", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.AnimTransFilter.smil_fadeColor": {"fullname": "odfdo.AnimTransFilter.smil_fadeColor", "modulename": "odfdo", "qualname": "AnimTransFilter.smil_fadeColor", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.AnimTransFilter.smil_mode": {"fullname": "odfdo.AnimTransFilter.smil_mode", "modulename": "odfdo", "qualname": "AnimTransFilter.smil_mode", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Annotation": {"fullname": "odfdo.Annotation", "modulename": "odfdo", "qualname": "Annotation", "kind": "class", "doc": "

Annotation element credited to the given creator with the\ngiven text, optionally dated (current date by default).\nIf name not provided and some parent is provided, the name is\nautogenerated.

\n\n

Arguments:

\n\n
text -- str or odf_element\n\ncreator -- str\n\ndate -- datetime\n\nname -- str\n\nparent -- Element\n
\n", "bases": "odfdo.element.Element"}, "odfdo.Annotation.__init__": {"fullname": "odfdo.Annotation.__init__", "modulename": "odfdo", "qualname": "Annotation.__init__", "kind": "function", "doc": "

\n", "signature": "(\ttext_or_element: odfdo.element.Element | str | None = None,\tcreator: str | None = None,\tdate: datetime.datetime | None = None,\tname: str | None = None,\tparent: odfdo.element.Element | None = None,\t**kwargs: Any)"}, "odfdo.Annotation.note_body": {"fullname": "odfdo.Annotation.note_body", "modulename": "odfdo", "qualname": "Annotation.note_body", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "odfdo.Annotation.start": {"fullname": "odfdo.Annotation.start", "modulename": "odfdo", "qualname": "Annotation.start", "kind": "variable", "doc": "

Return self.

\n", "annotation": ": odfdo.element.Element"}, "odfdo.Annotation.end": {"fullname": "odfdo.Annotation.end", "modulename": "odfdo", "qualname": "Annotation.end", "kind": "variable", "doc": "

Return the corresponding annotation-end tag or None.

\n", "annotation": ": odfdo.element.Element | None"}, "odfdo.Annotation.get_annotated": {"fullname": "odfdo.Annotation.get_annotated", "modulename": "odfdo", "qualname": "Annotation.get_annotated", "kind": "function", "doc": "

Returns the annotated content from an annotation.

\n\n

If no content exists (single position annotation or annotation-end not\nfound), returns [] (or \"\" if text flag is True).\nIf as_text is True: returns the text content.\nIf clean is True: suppress unwanted tags (deletions marks, ...)\nIf no_header is True: existing text:h are changed in text:p\nBy default: returns a list of odf_element, cleaned and without headers.

\n\n

Arguments:

\n\n
as_text -- boolean\n\nclean -- boolean\n\nno_header -- boolean\n
\n\n

Return: list or Element or text or None

\n", "signature": "(\tself,\tas_text: bool = False,\tno_header: bool = True,\tclean: bool = True) -> odfdo.element.Element | list | str | None:", "funcdef": "def"}, "odfdo.Annotation.delete": {"fullname": "odfdo.Annotation.delete", "modulename": "odfdo", "qualname": "Annotation.delete", "kind": "function", "doc": "

Delete the given element from the XML tree. If no element is given,\n\"self\" is deleted. The XML library may allow to continue to use an\nelement now \"orphan\" as long as you have a reference to it.

\n\n

For Annotation : delete the annotation-end tag if exists.

\n\n

Arguments:

\n\n
child -- Element or None\n
\n", "signature": "(\tself,\tchild: odfdo.element.Element | None = None,\tkeep_tail: bool = True) -> None:", "funcdef": "def"}, "odfdo.Annotation.check_validity": {"fullname": "odfdo.Annotation.check_validity", "modulename": "odfdo", "qualname": "Annotation.check_validity", "kind": "function", "doc": "

\n", "signature": "(self) -> None:", "funcdef": "def"}, "odfdo.Annotation.name": {"fullname": "odfdo.Annotation.name", "modulename": "odfdo", "qualname": "Annotation.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Annotation.note_id": {"fullname": "odfdo.Annotation.note_id", "modulename": "odfdo", "qualname": "Annotation.note_id", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.AnnotationEnd": {"fullname": "odfdo.AnnotationEnd", "modulename": "odfdo", "qualname": "AnnotationEnd", "kind": "class", "doc": "

AnnotationEnd: the \"office:annotation-end\" element may be used to\ndefine the end of a text range of document content that spans element\nboundaries. In that case, an \"office:annotation\" element shall precede\nthe \"office:annotation-end\" element. Both elements shall have the same\nvalue for their office:name attribute. The \"office:annotation-end\" element\nshall be preceded by an \"office:annotation\" element that has the same\nvalue for its office:name attribute as the \"office:annotation-end\"\nelement. An \"office:annotation-end\" element without a preceding\n\"office:annotation\" element that has the same name assigned is ignored.

\n", "bases": "odfdo.element.Element"}, "odfdo.AnnotationEnd.__init__": {"fullname": "odfdo.AnnotationEnd.__init__", "modulename": "odfdo", "qualname": "AnnotationEnd.__init__", "kind": "function", "doc": "

Initialize an AnnotationEnd element. Either annotation or name must be\nprovided to have proper reference for the annotation-end.

\n\n

Arguments:

\n\n
annotation -- odf_annotation element\n\nname -- str\n
\n", "signature": "(\tannotation: odfdo.element.Element | None = None,\tname: str | None = None,\t**kwargs: Any)"}, "odfdo.AnnotationEnd.start": {"fullname": "odfdo.AnnotationEnd.start", "modulename": "odfdo", "qualname": "AnnotationEnd.start", "kind": "variable", "doc": "

Return the corresponding annotation starting tag or None.

\n", "annotation": ": odfdo.element.Element | None"}, "odfdo.AnnotationEnd.end": {"fullname": "odfdo.AnnotationEnd.end", "modulename": "odfdo", "qualname": "AnnotationEnd.end", "kind": "variable", "doc": "

Return self.

\n", "annotation": ": odfdo.element.Element"}, "odfdo.AnnotationEnd.name": {"fullname": "odfdo.AnnotationEnd.name", "modulename": "odfdo", "qualname": "AnnotationEnd.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.BackgroundImage": {"fullname": "odfdo.BackgroundImage", "modulename": "odfdo", "qualname": "BackgroundImage", "kind": "class", "doc": "

Style class for all these tags:

\n\n

'style:style'\n'number:date-style',\n'number:number-style',\n'number:percentage-style',\n'number:time-style'\n'style:font-face',\n'style:master-page',\n'style:page-layout',\n'style:presentation-page-layout',\n'text:list-style',\n'text:outline-style',\n'style:tab-stops',\n...

\n", "bases": "odfdo.style.Style, odfdo.image.DrawImage"}, "odfdo.BackgroundImage.__init__": {"fullname": "odfdo.BackgroundImage.__init__", "modulename": "odfdo", "qualname": "BackgroundImage.__init__", "kind": "function", "doc": "

Create a style of the given family. The name is not mandatory at this\npoint but will become required when inserting in a document as a common\nstyle.

\n\n

The display name is the name the user sees in an office application.

\n\n

The parent_style is the name of the style this style will inherit from.

\n\n

To set properties, pass them as keyword arguments. The area properties\napply to is optional and defaults to the family.

\n\n

Arguments:

\n\n
family -- 'paragraph', 'text', 'section', 'table', 'table-column',\n          'table-row', 'table-cell', 'table-page', 'chart',\n          'drawing-page', 'graphic', 'presentation',\n          'control', 'ruby', 'list', 'number', 'page-layout'\n          'font-face', or 'master-page'\n\nname -- str\n\ndisplay_name -- str\n\nparent_style -- str\n\narea -- str\n
\n\n

'text' Properties:

\n\n
italic -- bool\n\nbold -- bool\n
\n\n

'paragraph' Properties:

\n\n
master_page -- str\n
\n\n

'master-page' Properties:

\n\n
page_layout -- str\n\nnext_style -- str\n
\n\n

'table-cell' Properties:

\n\n
border, border_top, border_right, border_bottom, border_left -- str,\ne.g. \"0.002cm solid #000000\" or 'none'\n\npadding, padding_top, padding_right, padding_bottom, padding_left -- str,\ne.g. \"0.002cm\" or 'none'\n\nshadow -- str, e.g. \"#808080 0.176cm 0.176cm\"\n
\n\n

'table-row' Properties:

\n\n
height -- str, e.g. '5cm'\n\nuse_optimal_height -- bool\n
\n\n

'table-column' Properties:

\n\n
width -- str, e.g. '5cm'\n\nbreak_before -- 'page', 'column' or 'auto'\n\nbreak_after -- 'page', 'column' or 'auto'\n
\n", "signature": "(\tname: str | None = None,\tdisplay_name: str | None = None,\tposition: str | None = None,\trepeat: str | None = None,\topacity: str | None = None,\tfilter: str | None = None,\t**kwargs: Any)"}, "odfdo.BackgroundImage.name": {"fullname": "odfdo.BackgroundImage.name", "modulename": "odfdo", "qualname": "BackgroundImage.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.BackgroundImage.display_name": {"fullname": "odfdo.BackgroundImage.display_name", "modulename": "odfdo", "qualname": "BackgroundImage.display_name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.BackgroundImage.svg_font_family": {"fullname": "odfdo.BackgroundImage.svg_font_family", "modulename": "odfdo", "qualname": "BackgroundImage.svg_font_family", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.BackgroundImage.font_family_generic": {"fullname": "odfdo.BackgroundImage.font_family_generic", "modulename": "odfdo", "qualname": "BackgroundImage.font_family_generic", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.BackgroundImage.font_pitch": {"fullname": "odfdo.BackgroundImage.font_pitch", "modulename": "odfdo", "qualname": "BackgroundImage.font_pitch", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.BackgroundImage.position": {"fullname": "odfdo.BackgroundImage.position", "modulename": "odfdo", "qualname": "BackgroundImage.position", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.BackgroundImage.repeat": {"fullname": "odfdo.BackgroundImage.repeat", "modulename": "odfdo", "qualname": "BackgroundImage.repeat", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.BackgroundImage.opacity": {"fullname": "odfdo.BackgroundImage.opacity", "modulename": "odfdo", "qualname": "BackgroundImage.opacity", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.BackgroundImage.filter": {"fullname": "odfdo.BackgroundImage.filter", "modulename": "odfdo", "qualname": "BackgroundImage.filter", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.BackgroundImage.text_style": {"fullname": "odfdo.BackgroundImage.text_style", "modulename": "odfdo", "qualname": "BackgroundImage.text_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Bookmark": {"fullname": "odfdo.Bookmark", "modulename": "odfdo", "qualname": "Bookmark", "kind": "class", "doc": "

Bookmark class for ODF \"text:bookmark\"

\n\n

Arguments:

\n\n
name -- str\n
\n", "bases": "odfdo.element.Element"}, "odfdo.Bookmark.__init__": {"fullname": "odfdo.Bookmark.__init__", "modulename": "odfdo", "qualname": "Bookmark.__init__", "kind": "function", "doc": "

\n", "signature": "(name: str = '', **kwargs: Any)"}, "odfdo.Bookmark.name": {"fullname": "odfdo.Bookmark.name", "modulename": "odfdo", "qualname": "Bookmark.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.BookmarkEnd": {"fullname": "odfdo.BookmarkEnd", "modulename": "odfdo", "qualname": "BookmarkEnd", "kind": "class", "doc": "

BookmarkEnd class for ODF \"text:bookmark-end\"

\n\n

Arguments:

\n\n
name -- str\n
\n", "bases": "odfdo.element.Element"}, "odfdo.BookmarkEnd.__init__": {"fullname": "odfdo.BookmarkEnd.__init__", "modulename": "odfdo", "qualname": "BookmarkEnd.__init__", "kind": "function", "doc": "

\n", "signature": "(name: str = '', **kwargs: Any)"}, "odfdo.BookmarkEnd.name": {"fullname": "odfdo.BookmarkEnd.name", "modulename": "odfdo", "qualname": "BookmarkEnd.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.BookmarkStart": {"fullname": "odfdo.BookmarkStart", "modulename": "odfdo", "qualname": "BookmarkStart", "kind": "class", "doc": "

BookmarkStart class for ODF \"text:bookmark-start\"

\n\n

Arguments:

\n\n
name -- str\n
\n", "bases": "odfdo.element.Element"}, "odfdo.BookmarkStart.__init__": {"fullname": "odfdo.BookmarkStart.__init__", "modulename": "odfdo", "qualname": "BookmarkStart.__init__", "kind": "function", "doc": "

\n", "signature": "(name: str = '', **kwargs: Any)"}, "odfdo.BookmarkStart.name": {"fullname": "odfdo.BookmarkStart.name", "modulename": "odfdo", "qualname": "BookmarkStart.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Cell": {"fullname": "odfdo.Cell", "modulename": "odfdo", "qualname": "Cell", "kind": "class", "doc": "

\"table:table-cell\" table cell element.

\n", "bases": "odfdo.element_typed.ElementTyped"}, "odfdo.Cell.__init__": {"fullname": "odfdo.Cell.__init__", "modulename": "odfdo", "qualname": "Cell.__init__", "kind": "function", "doc": "

Create a cell element containing the given value. The textual\nrepresentation is automatically formatted but can be provided. Cell\ntype can be deduced as well, unless the number is a percentage or\ncurrency. If cell type is \"currency\", the currency must be given.\nThe cell can be repeated on the given number of columns.

\n\n

Arguments:

\n\n
value -- bool, int, float, Decimal, date, datetime, str,\n         timedelta\n\ntext -- str\n\ncell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',\n             'string' or 'time'\n\ncurrency -- three-letter str\n\nrepeated -- int\n\nstyle -- str\n
\n", "signature": "(\tvalue: Any = None,\ttext: str | None = None,\tcell_type: str | None = None,\tcurrency: str | None = None,\tformula: str | None = None,\trepeated: int | None = None,\tstyle: str | None = None,\t**kwargs: Any)"}, "odfdo.Cell.x": {"fullname": "odfdo.Cell.x", "modulename": "odfdo", "qualname": "Cell.x", "kind": "variable", "doc": "

\n"}, "odfdo.Cell.y": {"fullname": "odfdo.Cell.y", "modulename": "odfdo", "qualname": "Cell.y", "kind": "variable", "doc": "

\n"}, "odfdo.Cell.clone": {"fullname": "odfdo.Cell.clone", "modulename": "odfdo", "qualname": "Cell.clone", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.cell.Cell"}, "odfdo.Cell.value": {"fullname": "odfdo.Cell.value", "modulename": "odfdo", "qualname": "Cell.value", "kind": "variable", "doc": "

Set / get the value of the cell. The type is read from the\n'office:value-type' attribute of the cell. When setting the value,\nthe type of the value will determine the new value_type of the cell.

\n\n

Warning: use this method for boolean, float or string only.

\n", "annotation": ": str | bool | int | float | decimal.Decimal | datetime.date | datetime.datetime | datetime.timedelta | None"}, "odfdo.Cell.float": {"fullname": "odfdo.Cell.float", "modulename": "odfdo", "qualname": "Cell.float", "kind": "variable", "doc": "

Set / get the value of the cell as a float (or 0.0).

\n", "annotation": ": float"}, "odfdo.Cell.string": {"fullname": "odfdo.Cell.string", "modulename": "odfdo", "qualname": "Cell.string", "kind": "variable", "doc": "

Set / get the value of the cell as a string (or '').

\n", "annotation": ": str"}, "odfdo.Cell.set_value": {"fullname": "odfdo.Cell.set_value", "modulename": "odfdo", "qualname": "Cell.set_value", "kind": "function", "doc": "

Set the cell state from the Python value type.

\n\n

Text is how the cell is displayed. Cell type is guessed,\nunless provided.

\n\n

For monetary values, provide the name of the currency.

\n\n

Arguments:

\n\n
value -- Python type\n\ntext -- str\n\ncell_type -- 'boolean', 'float', 'date', 'string', 'time',\n            'currency' or 'percentage'\n\ncurrency -- str\n
\n", "signature": "(\tself,\tvalue: str | bytes | float | int | decimal.Decimal | bool | datetime.datetime | datetime.date | datetime.timedelta | None,\ttext: str | None = None,\tcell_type: str | None = None,\tcurrency: str | None = None,\tformula: str | None = None) -> None:", "funcdef": "def"}, "odfdo.Cell.type": {"fullname": "odfdo.Cell.type", "modulename": "odfdo", "qualname": "Cell.type", "kind": "variable", "doc": "

Get / set the type of the cell: boolean, float, date, string\nor time.

\n\n

Return: str | None

\n", "annotation": ": str | None"}, "odfdo.Cell.currency": {"fullname": "odfdo.Cell.currency", "modulename": "odfdo", "qualname": "Cell.currency", "kind": "variable", "doc": "

Get / set the currency used for monetary values.

\n\n

Return: str | None

\n", "annotation": ": str | None"}, "odfdo.Cell.repeated": {"fullname": "odfdo.Cell.repeated", "modulename": "odfdo", "qualname": "Cell.repeated", "kind": "variable", "doc": "

Get / set the number of times the cell is repeated.

\n\n

Always None when using the table API.

\n\n

Return: int or None

\n", "annotation": ": int | None"}, "odfdo.Cell.style": {"fullname": "odfdo.Cell.style", "modulename": "odfdo", "qualname": "Cell.style", "kind": "variable", "doc": "

Get / set the style of the cell itself.

\n\n

Return: str | None

\n", "annotation": ": str | None"}, "odfdo.Cell.formula": {"fullname": "odfdo.Cell.formula", "modulename": "odfdo", "qualname": "Cell.formula", "kind": "variable", "doc": "

Get / set the formula of the cell, or None if undefined.

\n\n

The formula is not interpreted in any way.

\n\n

Return: str | None

\n", "annotation": ": str | None"}, "odfdo.Cell.is_empty": {"fullname": "odfdo.Cell.is_empty", "modulename": "odfdo", "qualname": "Cell.is_empty", "kind": "function", "doc": "

Check if the element is empty : no text, no children, no tail.

\n\n

Return: Boolean

\n", "signature": "(self, aggressive: bool = False) -> bool:", "funcdef": "def"}, "odfdo.ChangeInfo": {"fullname": "odfdo.ChangeInfo", "modulename": "odfdo", "qualname": "ChangeInfo", "kind": "class", "doc": "

The \"office:change-info\" element represents who made a change and when.\nIt may also contain a comment (one or more Paragrah \"text:p\" elements)\non the change.

\n\n

The comments available in the ChangeInfo are available through:

\n\n
    \n
  • get_paragraphs and get_paragraph methods for actual Paragraph.
  • \n
  • get_comments for a plain text version
  • \n
\n\n

Arguments:

\n\n
 creator -- str (or None)\n\n date -- datetime (or None)\n
\n", "bases": "odfdo.element.Element"}, "odfdo.ChangeInfo.__init__": {"fullname": "odfdo.ChangeInfo.__init__", "modulename": "odfdo", "qualname": "ChangeInfo.__init__", "kind": "function", "doc": "

\n", "signature": "(\tcreator: str | None = None,\tdate: datetime.datetime | None = None,\t**kwargs: Any)"}, "odfdo.ChangeInfo.set_dc_creator": {"fullname": "odfdo.ChangeInfo.set_dc_creator", "modulename": "odfdo", "qualname": "ChangeInfo.set_dc_creator", "kind": "function", "doc": "

Set the creator of the change. Default for creator is 'Unknown'.

\n\n

Arguments:

\n\n
creator -- str (or None)\n
\n", "signature": "(self, creator: str | None = None) -> None:", "funcdef": "def"}, "odfdo.ChangeInfo.set_dc_date": {"fullname": "odfdo.ChangeInfo.set_dc_date", "modulename": "odfdo", "qualname": "ChangeInfo.set_dc_date", "kind": "function", "doc": "

Set the date of the change. If date is None, use current time.

\n\n

Arguments:

\n\n
date -- datetime (or None)\n
\n", "signature": "(self, date: datetime.datetime | None = None) -> None:", "funcdef": "def"}, "odfdo.ChangeInfo.get_comments": {"fullname": "odfdo.ChangeInfo.get_comments", "modulename": "odfdo", "qualname": "ChangeInfo.get_comments", "kind": "function", "doc": "

Get text content of the comments. If joined is True (default), the\ntext of different paragraphs is concatenated, else a list of strings,\none per paragraph, is returned.

\n\n

Arguments:

\n\n
joined -- boolean (default is True)\n
\n\n

Return: str or list of str.

\n", "signature": "(self, joined: bool = True) -> str | list[str]:", "funcdef": "def"}, "odfdo.ChangeInfo.set_comments": {"fullname": "odfdo.ChangeInfo.set_comments", "modulename": "odfdo", "qualname": "ChangeInfo.set_comments", "kind": "function", "doc": "

Set the text content of the comments. If replace is True (default),\nthe new text replace old comments, else it is added at the end.

\n\n

Arguments:

\n\n
text -- str\n\nreplace -- boolean\n
\n", "signature": "(self, text: str = '', replace: bool = True) -> None:", "funcdef": "def"}, "odfdo.Column": {"fullname": "odfdo.Column", "modulename": "odfdo", "qualname": "Column", "kind": "class", "doc": "

ODF table column \"table:table-column\"

\n", "bases": "odfdo.element.Element"}, "odfdo.Column.__init__": {"fullname": "odfdo.Column.__init__", "modulename": "odfdo", "qualname": "Column.__init__", "kind": "function", "doc": "

Create a column group element of the optionally given style. Cell\nstyle can be set for the whole column. If the properties apply to\nseveral columns, give the number of repeated columns.

\n\n

Columns don't contain cells, just style information.

\n\n

You don't generally have to create columns by hand, use the Table API.

\n\n

Arguments:

\n\n
default_cell_style -- str\n\nrepeated -- int\n\nstyle -- str\n
\n", "signature": "(\tdefault_cell_style: str | None = None,\trepeated: int | None = None,\tstyle: str | None = None,\t**kwargs: Any)"}, "odfdo.Column.x": {"fullname": "odfdo.Column.x", "modulename": "odfdo", "qualname": "Column.x", "kind": "variable", "doc": "

\n"}, "odfdo.Column.clone": {"fullname": "odfdo.Column.clone", "modulename": "odfdo", "qualname": "Column.clone", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.table.Column"}, "odfdo.Column.get_default_cell_style": {"fullname": "odfdo.Column.get_default_cell_style", "modulename": "odfdo", "qualname": "Column.get_default_cell_style", "kind": "function", "doc": "

\n", "signature": "(self) -> str | None:", "funcdef": "def"}, "odfdo.Column.set_default_cell_style": {"fullname": "odfdo.Column.set_default_cell_style", "modulename": "odfdo", "qualname": "Column.set_default_cell_style", "kind": "function", "doc": "

\n", "signature": "(self, style: odfdo.element.Element | str) -> None:", "funcdef": "def"}, "odfdo.Column.repeated": {"fullname": "odfdo.Column.repeated", "modulename": "odfdo", "qualname": "Column.repeated", "kind": "variable", "doc": "

Get /set the number of times the column is repeated.

\n\n

Always None when using the table API.

\n\n

Return: int or None

\n", "annotation": ": int | None"}, "odfdo.Column.style": {"fullname": "odfdo.Column.style", "modulename": "odfdo", "qualname": "Column.style", "kind": "variable", "doc": "

Get /set the style of the column itself.

\n\n

Return: str

\n", "annotation": ": str | None"}, "odfdo.ConnectorShape": {"fullname": "odfdo.ConnectorShape", "modulename": "odfdo", "qualname": "ConnectorShape", "kind": "class", "doc": "

Create a Connector shape.

\n\n

Arguments:

\n\n
style -- str\n\ntext_style -- str\n\ndraw_id -- str\n\nlayer -- str\n\nconnected_shapes -- (shape, shape)\n\nglue_points -- (point, point)\n\np1 -- (str, str)\n\np2 -- (str, str)\n
\n", "bases": "odfdo.shapes.ShapeBase"}, "odfdo.ConnectorShape.__init__": {"fullname": "odfdo.ConnectorShape.__init__", "modulename": "odfdo", "qualname": "ConnectorShape.__init__", "kind": "function", "doc": "

\n", "signature": "(\tstyle: str | None = None,\ttext_style: str | None = None,\tdraw_id: str | None = None,\tlayer: str | None = None,\tconnected_shapes: tuple | None = None,\tglue_points: tuple | None = None,\tp1: tuple | None = None,\tp2: tuple | None = None,\t**kwargs: Any)"}, "odfdo.ConnectorShape.start_shape": {"fullname": "odfdo.ConnectorShape.start_shape", "modulename": "odfdo", "qualname": "ConnectorShape.start_shape", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.ConnectorShape.end_shape": {"fullname": "odfdo.ConnectorShape.end_shape", "modulename": "odfdo", "qualname": "ConnectorShape.end_shape", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.ConnectorShape.start_glue_point": {"fullname": "odfdo.ConnectorShape.start_glue_point", "modulename": "odfdo", "qualname": "ConnectorShape.start_glue_point", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.ConnectorShape.end_glue_point": {"fullname": "odfdo.ConnectorShape.end_glue_point", "modulename": "odfdo", "qualname": "ConnectorShape.end_glue_point", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.ConnectorShape.x1": {"fullname": "odfdo.ConnectorShape.x1", "modulename": "odfdo", "qualname": "ConnectorShape.x1", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.ConnectorShape.y1": {"fullname": "odfdo.ConnectorShape.y1", "modulename": "odfdo", "qualname": "ConnectorShape.y1", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.ConnectorShape.x2": {"fullname": "odfdo.ConnectorShape.x2", "modulename": "odfdo", "qualname": "ConnectorShape.x2", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.ConnectorShape.y2": {"fullname": "odfdo.ConnectorShape.y2", "modulename": "odfdo", "qualname": "ConnectorShape.y2", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Container": {"fullname": "odfdo.Container", "modulename": "odfdo", "qualname": "Container", "kind": "class", "doc": "

Representation of the ODF file.

\n"}, "odfdo.Container.__init__": {"fullname": "odfdo.Container.__init__", "modulename": "odfdo", "qualname": "Container.__init__", "kind": "function", "doc": "

\n", "signature": "(path: pathlib.Path | str | _io.BytesIO | None = None)"}, "odfdo.Container.path": {"fullname": "odfdo.Container.path", "modulename": "odfdo", "qualname": "Container.path", "kind": "variable", "doc": "

\n", "annotation": ": pathlib.Path | None"}, "odfdo.Container.open": {"fullname": "odfdo.Container.open", "modulename": "odfdo", "qualname": "Container.open", "kind": "function", "doc": "

Load the content of an ODF file.

\n", "signature": "(self, path_or_file: pathlib.Path | str | _io.BytesIO) -> None:", "funcdef": "def"}, "odfdo.Container.get_parts": {"fullname": "odfdo.Container.get_parts", "modulename": "odfdo", "qualname": "Container.get_parts", "kind": "function", "doc": "

Get the list of members.

\n", "signature": "(self) -> list[str]:", "funcdef": "def"}, "odfdo.Container.get_part": {"fullname": "odfdo.Container.get_part", "modulename": "odfdo", "qualname": "Container.get_part", "kind": "function", "doc": "

Get the bytes of a part of the ODF.

\n", "signature": "(self, path: str) -> str | bytes | None:", "funcdef": "def"}, "odfdo.Container.mimetype": {"fullname": "odfdo.Container.mimetype", "modulename": "odfdo", "qualname": "Container.mimetype", "kind": "variable", "doc": "

Return str value of mimetype of the document.

\n", "annotation": ": str"}, "odfdo.Container.set_part": {"fullname": "odfdo.Container.set_part", "modulename": "odfdo", "qualname": "Container.set_part", "kind": "function", "doc": "

Replace or add a new part.

\n", "signature": "(self, path: str, data: bytes) -> None:", "funcdef": "def"}, "odfdo.Container.del_part": {"fullname": "odfdo.Container.del_part", "modulename": "odfdo", "qualname": "Container.del_part", "kind": "function", "doc": "

Mark a part for deletion.

\n", "signature": "(self, path: str) -> None:", "funcdef": "def"}, "odfdo.Container.clone": {"fullname": "odfdo.Container.clone", "modulename": "odfdo", "qualname": "Container.clone", "kind": "variable", "doc": "

Make a copy of this container with no path.

\n", "annotation": ": odfdo.container.Container"}, "odfdo.Container.save": {"fullname": "odfdo.Container.save", "modulename": "odfdo", "qualname": "Container.save", "kind": "function", "doc": "

Save the container to the given target, a path or a file-like\nobject.

\n\n

Package the output document in the same format than current document,\nunless \"packaging\" is different.

\n\n

Arguments:

\n\n
target -- str or file-like or Path\n\npackaging -- 'zip', or for debugging purpose 'folder'\n\nbackup -- boolean\n
\n", "signature": "(\tself,\ttarget: str | pathlib.Path | _io.BytesIO | None,\tpackaging: str | None = None,\tbackup: bool = False) -> None:", "funcdef": "def"}, "odfdo.Content": {"fullname": "odfdo.Content", "modulename": "odfdo", "qualname": "Content", "kind": "class", "doc": "

Representation of an XML part.

\n\n

Abstraction of the XML library behind.

\n", "bases": "odfdo.xmlpart.XmlPart"}, "odfdo.Content.body": {"fullname": "odfdo.Content.body", "modulename": "odfdo", "qualname": "Content.body", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.element.Element"}, "odfdo.Content.get_styles": {"fullname": "odfdo.Content.get_styles", "modulename": "odfdo", "qualname": "Content.get_styles", "kind": "function", "doc": "

Return the list of styles in the Content part, optionally limited\nto the given family.

\n\n

Arguments:

\n\n
family -- str or None\n
\n\n

Return: list of Style

\n", "signature": "(self, family: str | None = None) -> list[odfdo.style.Style]:", "funcdef": "def"}, "odfdo.Content.get_style": {"fullname": "odfdo.Content.get_style", "modulename": "odfdo", "qualname": "Content.get_style", "kind": "function", "doc": "

Return the style uniquely identified by the name/family pair. If\nthe argument is already a style object, it will return it.

\n\n

If the name is None, the default style is fetched.

\n\n

If the name is not the internal name but the name you gave in the\ndesktop application, use display_name instead.

\n\n

Arguments:

\n\n
family -- 'paragraph', 'text', 'graphic', 'table', 'list',\n          'number'\n\nname_or_element -- str or Style\n\ndisplay_name -- str\n
\n\n

Return: Style or None if not found

\n", "signature": "(\tself,\tfamily: str,\tname_or_element: str | odfdo.element.Element | None = None,\tdisplay_name: str | None = None) -> odfdo.style.Style | None:", "funcdef": "def"}, "odfdo.Document": {"fullname": "odfdo.Document", "modulename": "odfdo", "qualname": "Document", "kind": "class", "doc": "

Abstraction of the ODF document.

\n\n

To create a new Document, several possibilities:

\n\n
- Document() or Document(\"text\") -> an \"empty\" document of type text\n- Document(\"spreadsheet\") -> an \"empty\" document of type spreadsheet\n- Document(\"presentation\") -> an \"empty\" document of type presentation\n- Document(\"drawing\") -> an \"empty\" document of type drawing\n\nMeaning of \u201cempty\u201d: these documents are copies of the default\ntemplates documents provided with this library, which, as templates,\nare not really empty. It may be useful to clear the newly created\ndocument: document.body.clear(), or adjust meta informations like\ndescription or default language: document.meta.set_language('fr-FR')\n
\n\n

If the argument is not a known template type, or is a Path,\nDocument(file) will load the content of the ODF file.

\n\n

To explicitly create a document from a custom template, use the\nDocument.new(path) method whose argument is the path to the template file.

\n"}, "odfdo.Document.__init__": {"fullname": "odfdo.Document.__init__", "modulename": "odfdo", "qualname": "Document.__init__", "kind": "function", "doc": "

\n", "signature": "(\ttarget: str | bytes | pathlib.Path | odfdo.container.Container | _io.BytesIO | None = 'text')"}, "odfdo.Document.container": {"fullname": "odfdo.Document.container", "modulename": "odfdo", "qualname": "Document.container", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.container.Container | None"}, "odfdo.Document.new": {"fullname": "odfdo.Document.new", "modulename": "odfdo", "qualname": "Document.new", "kind": "function", "doc": "

Create a Document from a template.

\n\n

The template argument is expected to be the path to a ODF template.

\n\n

Arguments:

\n\n
template -- str or Path or file-like (io.BytesIO)\n
\n\n

Return : ODF document -- Document

\n", "signature": "(\tcls,\ttemplate: str | pathlib.Path | _io.BytesIO = 'text') -> odfdo.document.Document:", "funcdef": "def"}, "odfdo.Document.path": {"fullname": "odfdo.Document.path", "modulename": "odfdo", "qualname": "Document.path", "kind": "variable", "doc": "

Shortcut to Document.Container.path.

\n", "annotation": ": pathlib.Path | None"}, "odfdo.Document.get_parts": {"fullname": "odfdo.Document.get_parts", "modulename": "odfdo", "qualname": "Document.get_parts", "kind": "function", "doc": "

Return available part names with path inside the archive, e.g.\n['content.xml', ..., 'Pictures/100000000000032000000258912EB1C3.jpg']

\n", "signature": "(self) -> list[str]:", "funcdef": "def"}, "odfdo.Document.get_part": {"fullname": "odfdo.Document.get_part", "modulename": "odfdo", "qualname": "Document.get_part", "kind": "function", "doc": "

Return the bytes of the given part. The path is relative to the\narchive, e.g. \"Pictures/1003200258912EB1C3.jpg\".

\n\n

'content', 'meta', 'settings', 'styles' and 'manifest' are shortcuts\nto the real path, e.g. content.xml, and return a dedicated object with\nits own API.

\n\n

path formated as URI, so always use '/' separator

\n", "signature": "(self, path: str) -> odfdo.xmlpart.XmlPart | str | bytes | None:", "funcdef": "def"}, "odfdo.Document.set_part": {"fullname": "odfdo.Document.set_part", "modulename": "odfdo", "qualname": "Document.set_part", "kind": "function", "doc": "

Set the bytes of the given part. The path is relative to the\narchive, e.g. \"Pictures/1003200258912EB1C3.jpg\".

\n\n

path formated as URI, so always use '/' separator

\n", "signature": "(self, path: str, data: bytes) -> None:", "funcdef": "def"}, "odfdo.Document.del_part": {"fullname": "odfdo.Document.del_part", "modulename": "odfdo", "qualname": "Document.del_part", "kind": "function", "doc": "

Mark a part for deletion. The path is relative to the archive,\ne.g. \"Pictures/1003200258912EB1C3.jpg\"

\n", "signature": "(self, path: str) -> None:", "funcdef": "def"}, "odfdo.Document.mimetype": {"fullname": "odfdo.Document.mimetype", "modulename": "odfdo", "qualname": "Document.mimetype", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "odfdo.Document.get_type": {"fullname": "odfdo.Document.get_type", "modulename": "odfdo", "qualname": "Document.get_type", "kind": "function", "doc": "

Get the ODF type (also called class) of this document.

\n\n

Return: 'chart', 'database', 'formula', 'graphics',\n 'graphics-template', 'image', 'presentation',\n 'presentation-template', 'spreadsheet', 'spreadsheet-template',\n 'text', 'text-master', 'text-template' or 'text-web'

\n", "signature": "(self) -> str:", "funcdef": "def"}, "odfdo.Document.body": {"fullname": "odfdo.Document.body", "modulename": "odfdo", "qualname": "Document.body", "kind": "variable", "doc": "

Return the body element of the content part, where actual content\nis stored.

\n", "annotation": ": odfdo.element.Element"}, "odfdo.Document.meta": {"fullname": "odfdo.Document.meta", "modulename": "odfdo", "qualname": "Document.meta", "kind": "variable", "doc": "

Return the meta part (meta.xml) of the document, where meta data\nare stored.

\n", "annotation": ": odfdo.meta.Meta"}, "odfdo.Document.manifest": {"fullname": "odfdo.Document.manifest", "modulename": "odfdo", "qualname": "Document.manifest", "kind": "variable", "doc": "

Return the manifest part (manifest.xml) of the document.

\n", "annotation": ": odfdo.manifest.Manifest"}, "odfdo.Document.get_formatted_text": {"fullname": "odfdo.Document.get_formatted_text", "modulename": "odfdo", "qualname": "Document.get_formatted_text", "kind": "function", "doc": "

Return content as text, with some formatting.

\n", "signature": "(self, rst_mode: bool = False) -> str:", "funcdef": "def"}, "odfdo.Document.get_formated_meta": {"fullname": "odfdo.Document.get_formated_meta", "modulename": "odfdo", "qualname": "Document.get_formated_meta", "kind": "function", "doc": "

Return meta informations as text, with some formatting.

\n", "signature": "(self) -> str:", "funcdef": "def"}, "odfdo.Document.add_file": {"fullname": "odfdo.Document.add_file", "modulename": "odfdo", "qualname": "Document.add_file", "kind": "function", "doc": "

Insert a file from a path or a file-like object in the container.

\n\n

Return the full path to reference in the content.

\n\n

Arguments:

\n\n
path_or_file -- str or Path or file-like\n
\n\n

Return: str (URI)

\n", "signature": "(self, path_or_file: str | pathlib.Path) -> str:", "funcdef": "def"}, "odfdo.Document.clone": {"fullname": "odfdo.Document.clone", "modulename": "odfdo", "qualname": "Document.clone", "kind": "variable", "doc": "

Return an exact copy of the document.

\n\n

Return: Document

\n", "annotation": ": odfdo.document.Document"}, "odfdo.Document.save": {"fullname": "odfdo.Document.save", "modulename": "odfdo", "qualname": "Document.save", "kind": "function", "doc": "

Save the document, at the same place it was opened or at the given\ntarget path. Target can also be a file-like object. It can be saved\nas a Zip file (default) or as files in a folder (for debugging\npurpose). XML parts can be pretty printed.

\n\n

Arguments:

\n\n
target -- str or file-like object\n\npackaging -- 'zip' or 'folder'\n\npretty -- bool\n\nbackup -- bool\n
\n", "signature": "(\tself,\ttarget: str | pathlib.Path | _io.BytesIO | None = None,\tpackaging: str = 'zip',\tpretty: bool = False,\tbackup: bool = False) -> None:", "funcdef": "def"}, "odfdo.Document.content": {"fullname": "odfdo.Document.content", "modulename": "odfdo", "qualname": "Document.content", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.content.Content"}, "odfdo.Document.styles": {"fullname": "odfdo.Document.styles", "modulename": "odfdo", "qualname": "Document.styles", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.styles.Styles"}, "odfdo.Document.get_styles": {"fullname": "odfdo.Document.get_styles", "modulename": "odfdo", "qualname": "Document.get_styles", "kind": "function", "doc": "

\n", "signature": "(\tself,\tfamily: str | bytes = '',\tautomatic: bool = False) -> list[odfdo.style.Style | odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Document.get_style": {"fullname": "odfdo.Document.get_style", "modulename": "odfdo", "qualname": "Document.get_style", "kind": "function", "doc": "

Return the style uniquely identified by the name/family pair. If\nthe argument is already a style object, it will return it.

\n\n

If the name is None, the default style is fetched.

\n\n

If the name is not the internal name but the name you gave in a\ndesktop application, use display_name instead.

\n\n

Arguments:

\n\n
family -- 'paragraph', 'text',  'graphic', 'table', 'list',\n          'number', 'page-layout', 'master-page'\n\nname -- str or Element or None\n\ndisplay_name -- str\n
\n\n

Return: Style or None if not found.

\n", "signature": "(\tself,\tfamily: str,\tname_or_element: str | odfdo.style.Style | None = None,\tdisplay_name: str | None = None) -> odfdo.style.Style | None:", "funcdef": "def"}, "odfdo.Document.insert_style": {"fullname": "odfdo.Document.insert_style", "modulename": "odfdo", "qualname": "Document.insert_style", "kind": "function", "doc": "

Insert the given style object in the document, as required by the\nstyle family and type.

\n\n

The style is expected to be a common style with a name. In case it\nwas created with no name, the given can be set on the fly.

\n\n

If automatic is True, the style will be inserted as an automatic\nstyle.

\n\n

If default is True, the style will be inserted as a default style and\nwould replace any existing default style of the same family. Any name\nor display name would be ignored.

\n\n

Automatic and default arguments are mutually exclusive.

\n\n

All styles can't be used as default styles. Default styles are\nallowed for the following families: paragraph, text, section, table,\ntable-column, table-row, table-cell, table-page, chart, drawing-page,\ngraphic, presentation, control and ruby.

\n\n

Arguments:

\n\n
style -- Style or str\n\nname -- str\n\nautomatic -- bool\n\ndefault -- bool\n
\n\n

Return : style name -- str

\n", "signature": "(\tself,\tstyle: odfdo.style.Style | str,\tname: str = '',\tautomatic: bool = False,\tdefault: bool = False) -> Any:", "funcdef": "def"}, "odfdo.Document.get_styled_elements": {"fullname": "odfdo.Document.get_styled_elements", "modulename": "odfdo", "qualname": "Document.get_styled_elements", "kind": "function", "doc": "

Brute-force to find paragraphs, tables, etc. using the given style\nname (or all by default).

\n\n

Arguments:

\n\n
name -- str\n
\n\n

Return: list

\n", "signature": "(self, name: str = '') -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Document.show_styles": {"fullname": "odfdo.Document.show_styles", "modulename": "odfdo", "qualname": "Document.show_styles", "kind": "function", "doc": "

\n", "signature": "(\tself,\tautomatic: bool = True,\tcommon: bool = True,\tproperties: bool = False) -> str:", "funcdef": "def"}, "odfdo.Document.delete_styles": {"fullname": "odfdo.Document.delete_styles", "modulename": "odfdo", "qualname": "Document.delete_styles", "kind": "function", "doc": "

Remove all style information from content and all styles.

\n\n

Return: number of deleted styles

\n", "signature": "(self) -> int:", "funcdef": "def"}, "odfdo.Document.merge_styles_from": {"fullname": "odfdo.Document.merge_styles_from", "modulename": "odfdo", "qualname": "Document.merge_styles_from", "kind": "function", "doc": "

Copy all the styles of a document into ourself.

\n\n

Styles with the same type and name will be replaced, so only unique\nstyles will be preserved.

\n", "signature": "(self, document: odfdo.document.Document) -> None:", "funcdef": "def"}, "odfdo.Document.add_page_break_style": {"fullname": "odfdo.Document.add_page_break_style", "modulename": "odfdo", "qualname": "Document.add_page_break_style", "kind": "function", "doc": "

Ensure that the document contains the style required for a manual page break.

\n\n

Then a manual page break can be added to the document with:\n from paragraph import PageBreak\n ...\n document.body.append(PageBreak())

\n\n

Note: this style uses the property 'fo:break-after', another\npossibility could be the property 'fo:break-before'

\n", "signature": "(self) -> None:", "funcdef": "def"}, "odfdo.DrawFillImage": {"fullname": "odfdo.DrawFillImage", "modulename": "odfdo", "qualname": "DrawFillImage", "kind": "class", "doc": "

The \"draw:image\" element represents an image. An image can be\neither:

\n\n
    \n
  • A link to an external resource or
  • \n
  • Embedded in the document (Not implemented in this version)
  • \n
\n\n

Warning: image elements must be stored in a frame \"draw:frame\",\nsee Frame().

\n", "bases": "odfdo.image.DrawImage"}, "odfdo.DrawFillImage.__init__": {"fullname": "odfdo.DrawFillImage.__init__", "modulename": "odfdo", "qualname": "DrawFillImage.__init__", "kind": "function", "doc": "

The \"draw:fill-image\" element specifies a link to a bitmap\nresource. Fill image are not available as automatic styles.\nThe \"draw:fill-image\" element is usable within the following element:\n\"office:styles\"

\n\n

Arguments:

\n\n
name -- str\n\ndisplay_name -- str\n\nheight -- str\n\nwidth -- str\n
\n", "signature": "(\tname: str | None = None,\tdisplay_name: str | None = None,\theight: str | None = None,\twidth: str | None = None,\t**kwargs: Any)"}, "odfdo.DrawFillImage.display_name": {"fullname": "odfdo.DrawFillImage.display_name", "modulename": "odfdo", "qualname": "DrawFillImage.display_name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawFillImage.name": {"fullname": "odfdo.DrawFillImage.name", "modulename": "odfdo", "qualname": "DrawFillImage.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawFillImage.height": {"fullname": "odfdo.DrawFillImage.height", "modulename": "odfdo", "qualname": "DrawFillImage.height", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawFillImage.width": {"fullname": "odfdo.DrawFillImage.width", "modulename": "odfdo", "qualname": "DrawFillImage.width", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup": {"fullname": "odfdo.DrawGroup", "modulename": "odfdo", "qualname": "DrawGroup", "kind": "class", "doc": "

The DrawGroup \"draw:g\" element represents a group of drawing shapes.

\n\n

Warning: implementation is currently minimal.

\n\n

Drawing shapes contained by a \"draw:g\" element that is itself\ncontained by a \"draw:a\" element, act as hyperlinks using the\nxlink:href attribute of the containing \"draw:a\" element. If the\nincluded drawing shapes are themselves contained within \"draw:a\"\nelements, then the xlink:href attributes of those \"draw:a\" elements\nact as the hyperlink information for the shapes they contain.

\n\n

The \"draw:g\" element has the following attributes: draw:caption-id,\ndraw:class-names, draw:id, draw:name, draw:style-name, draw:z-index,\npresentation:class-names, presentation:style-name, svg:y,\ntable:end-cell-address, table:end-x, table:end-y,\ntable:table-background, text:anchor-page-number, text:anchor-type,\nand xml:id.

\n\n

The \"draw:g\" element has the following child elements: \"dr3d:scene\",\n\"draw:a\", \"draw:caption\", \"draw:circle\", \"draw:connector\",\n\"draw:control\", \"draw:custom-shape\", \"draw:ellipse\", \"draw:frame\",\n\"draw:g\", \"draw:glue-point\", \"draw:line\", \"draw:measure\",\n\"draw:page-thumbnail\", \"draw:path\", \"draw:polygon\", \"draw:polyline\",\n\"draw:rect\", \"draw:regular-polygon\", \"office:event-listeners\",\n\"svg:desc\" and \"svg:title\".

\n", "bases": "odfdo.element.Element, odfdo.frame.AnchorMix, odfdo.frame.ZMix, odfdo.frame.PosMix"}, "odfdo.DrawGroup.__init__": {"fullname": "odfdo.DrawGroup.__init__", "modulename": "odfdo", "qualname": "DrawGroup.__init__", "kind": "function", "doc": "

\n", "signature": "(\tname: str | None = None,\tdraw_id: str | None = None,\tstyle: str | None = None,\tposition: tuple | None = None,\tz_index: int = 0,\tanchor_type: str | None = None,\tanchor_page: int | None = None,\tpresentation_style: str | None = None,\t**kwargs: Any)"}, "odfdo.DrawGroup.draw_id": {"fullname": "odfdo.DrawGroup.draw_id", "modulename": "odfdo", "qualname": "DrawGroup.draw_id", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup.caption_id": {"fullname": "odfdo.DrawGroup.caption_id", "modulename": "odfdo", "qualname": "DrawGroup.caption_id", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup.draw_class_names": {"fullname": "odfdo.DrawGroup.draw_class_names", "modulename": "odfdo", "qualname": "DrawGroup.draw_class_names", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup.name": {"fullname": "odfdo.DrawGroup.name", "modulename": "odfdo", "qualname": "DrawGroup.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup.style": {"fullname": "odfdo.DrawGroup.style", "modulename": "odfdo", "qualname": "DrawGroup.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup.presentation_class_names": {"fullname": "odfdo.DrawGroup.presentation_class_names", "modulename": "odfdo", "qualname": "DrawGroup.presentation_class_names", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup.presentation_style": {"fullname": "odfdo.DrawGroup.presentation_style", "modulename": "odfdo", "qualname": "DrawGroup.presentation_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup.table_end_cell": {"fullname": "odfdo.DrawGroup.table_end_cell", "modulename": "odfdo", "qualname": "DrawGroup.table_end_cell", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup.table_end_x": {"fullname": "odfdo.DrawGroup.table_end_x", "modulename": "odfdo", "qualname": "DrawGroup.table_end_x", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup.table_end_y": {"fullname": "odfdo.DrawGroup.table_end_y", "modulename": "odfdo", "qualname": "DrawGroup.table_end_y", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup.table_background": {"fullname": "odfdo.DrawGroup.table_background", "modulename": "odfdo", "qualname": "DrawGroup.table_background", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup.xml_id": {"fullname": "odfdo.DrawGroup.xml_id", "modulename": "odfdo", "qualname": "DrawGroup.xml_id", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup.pos_x": {"fullname": "odfdo.DrawGroup.pos_x", "modulename": "odfdo", "qualname": "DrawGroup.pos_x", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawGroup.pos_y": {"fullname": "odfdo.DrawGroup.pos_y", "modulename": "odfdo", "qualname": "DrawGroup.pos_y", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawImage": {"fullname": "odfdo.DrawImage", "modulename": "odfdo", "qualname": "DrawImage", "kind": "class", "doc": "

The \"draw:image\" element represents an image. An image can be\neither:

\n\n
    \n
  • A link to an external resource or
  • \n
  • Embedded in the document (Not implemented in this version)
  • \n
\n\n

Warning: image elements must be stored in a frame \"draw:frame\",\nsee Frame().

\n", "bases": "odfdo.element.Element"}, "odfdo.DrawImage.__init__": {"fullname": "odfdo.DrawImage.__init__", "modulename": "odfdo", "qualname": "DrawImage.__init__", "kind": "function", "doc": "

Initialisation of an DrawImage.

\n\n

Arguments:

\n\n
url -- str\n\ntype -- str\n\nshow -- str\n\nactuate -- str\n\nfilter_name -- str\n
\n", "signature": "(\turl: str = '',\txlink_type: str = 'simple',\tshow: str = 'embed',\tactuate: str = 'onLoad',\tfilter_name: str | None = None,\t**kwargs: Any)"}, "odfdo.DrawImage.url": {"fullname": "odfdo.DrawImage.url", "modulename": "odfdo", "qualname": "DrawImage.url", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawImage.type": {"fullname": "odfdo.DrawImage.type", "modulename": "odfdo", "qualname": "DrawImage.type", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawImage.show": {"fullname": "odfdo.DrawImage.show", "modulename": "odfdo", "qualname": "DrawImage.show", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawImage.actuate": {"fullname": "odfdo.DrawImage.actuate", "modulename": "odfdo", "qualname": "DrawImage.actuate", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawImage.filter_name": {"fullname": "odfdo.DrawImage.filter_name", "modulename": "odfdo", "qualname": "DrawImage.filter_name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawPage": {"fullname": "odfdo.DrawPage", "modulename": "odfdo", "qualname": "DrawPage", "kind": "class", "doc": "

ODF draw page \"draw:page\", for pages of presentation and drawings.

\n", "bases": "odfdo.element.Element"}, "odfdo.DrawPage.__init__": {"fullname": "odfdo.DrawPage.__init__", "modulename": "odfdo", "qualname": "DrawPage.__init__", "kind": "function", "doc": "

Arguments:

\n\n
draw_id -- str\n\nname -- str\n\nmaster_page -- str\n\npresentation_page_layout -- str\n\nstyle -- str\n
\n", "signature": "(\tdraw_id: str | None = None,\tname: str | None = None,\tmaster_page: str | None = None,\tpresentation_page_layout: str | None = None,\tstyle: str | None = None,\t**kwargs: Any)"}, "odfdo.DrawPage.set_transition": {"fullname": "odfdo.DrawPage.set_transition", "modulename": "odfdo", "qualname": "DrawPage.set_transition", "kind": "function", "doc": "

\n", "signature": "(\tself,\tsmil_type: str,\tsubtype: str | None = None,\tdur: str = '2s') -> None:", "funcdef": "def"}, "odfdo.DrawPage.get_shapes": {"fullname": "odfdo.DrawPage.get_shapes", "modulename": "odfdo", "qualname": "DrawPage.get_shapes", "kind": "function", "doc": "

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.DrawPage.get_formatted_text": {"fullname": "odfdo.DrawPage.get_formatted_text", "modulename": "odfdo", "qualname": "DrawPage.get_formatted_text", "kind": "function", "doc": "

This function should return a beautiful version of the text.

\n", "signature": "(self, context: dict | None = None) -> str:", "funcdef": "def"}, "odfdo.DrawPage.name": {"fullname": "odfdo.DrawPage.name", "modulename": "odfdo", "qualname": "DrawPage.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawPage.draw_id": {"fullname": "odfdo.DrawPage.draw_id", "modulename": "odfdo", "qualname": "DrawPage.draw_id", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawPage.master_page": {"fullname": "odfdo.DrawPage.master_page", "modulename": "odfdo", "qualname": "DrawPage.master_page", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawPage.presentation_page_layout": {"fullname": "odfdo.DrawPage.presentation_page_layout", "modulename": "odfdo", "qualname": "DrawPage.presentation_page_layout", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.DrawPage.style": {"fullname": "odfdo.DrawPage.style", "modulename": "odfdo", "qualname": "DrawPage.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Element": {"fullname": "odfdo.Element", "modulename": "odfdo", "qualname": "Element", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.utils.cached_element.CachedElement"}, "odfdo.Element.__init__": {"fullname": "odfdo.Element.__init__", "modulename": "odfdo", "qualname": "Element.__init__", "kind": "function", "doc": "

\n", "signature": "(**kwargs: Any)"}, "odfdo.Element.from_tag": {"fullname": "odfdo.Element.from_tag", "modulename": "odfdo", "qualname": "Element.from_tag", "kind": "function", "doc": "

Element class and subclass factory.

\n\n

Turn an lxml Element or ODF string tag into an ODF XML Element\nof the relevant class.

\n\n

Arguments:

\n\n
tag_or_elem -- ODF str tag or lxml.Element\n
\n\n

Return: Element (or subclass) instance

\n", "signature": "(cls, tag_or_elem: str | lxml.etree._Element) -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.Element.from_tag_for_clone": {"fullname": "odfdo.Element.from_tag_for_clone", "modulename": "odfdo", "qualname": "Element.from_tag_for_clone", "kind": "function", "doc": "

\n", "signature": "(\tcls: type,\ttree_element: lxml.etree._Element,\tcache: tuple | None) -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.Element.make_etree_element": {"fullname": "odfdo.Element.make_etree_element", "modulename": "odfdo", "qualname": "Element.make_etree_element", "kind": "function", "doc": "

\n", "signature": "(tag: str) -> lxml.etree._Element:", "funcdef": "def"}, "odfdo.Element.tag": {"fullname": "odfdo.Element.tag", "modulename": "odfdo", "qualname": "Element.tag", "kind": "variable", "doc": "

Get/set the underlying xml tag with the given qualified name.

\n\n

Warning: direct change of tag does not change the element class.

\n\n

Arguments:

\n\n
qname -- str (e.g. \"text:span\")\n
\n", "annotation": ": str"}, "odfdo.Element.elements_repeated_sequence": {"fullname": "odfdo.Element.elements_repeated_sequence", "modulename": "odfdo", "qualname": "Element.elements_repeated_sequence", "kind": "function", "doc": "

Utility method for table module.

\n", "signature": "(\tself,\txpath_instance: lxml.etree.XPath,\tname: str) -> list[tuple[int, int]]:", "funcdef": "def"}, "odfdo.Element.get_elements": {"fullname": "odfdo.Element.get_elements", "modulename": "odfdo", "qualname": "Element.get_elements", "kind": "function", "doc": "

\n", "signature": "(self, xpath_query: lxml.etree.XPath | str) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_element": {"fullname": "odfdo.Element.get_element", "modulename": "odfdo", "qualname": "Element.get_element", "kind": "function", "doc": "

\n", "signature": "(\tself,\txpath_query: lxml.etree.XPath | str) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.attributes": {"fullname": "odfdo.Element.attributes", "modulename": "odfdo", "qualname": "Element.attributes", "kind": "variable", "doc": "

\n", "annotation": ": dict[str, str]"}, "odfdo.Element.get_attribute": {"fullname": "odfdo.Element.get_attribute", "modulename": "odfdo", "qualname": "Element.get_attribute", "kind": "function", "doc": "

Return the attribute value as type str | bool | None.

\n", "signature": "(self, name: str) -> str | bool | None:", "funcdef": "def"}, "odfdo.Element.get_attribute_integer": {"fullname": "odfdo.Element.get_attribute_integer", "modulename": "odfdo", "qualname": "Element.get_attribute_integer", "kind": "function", "doc": "

Return either the attribute as type int, or None.

\n", "signature": "(self, name: str) -> int | None:", "funcdef": "def"}, "odfdo.Element.get_attribute_string": {"fullname": "odfdo.Element.get_attribute_string", "modulename": "odfdo", "qualname": "Element.get_attribute_string", "kind": "function", "doc": "

Return either the attribute as type str, or None.

\n", "signature": "(self, name: str) -> str | None:", "funcdef": "def"}, "odfdo.Element.set_attribute": {"fullname": "odfdo.Element.set_attribute", "modulename": "odfdo", "qualname": "Element.set_attribute", "kind": "function", "doc": "

\n", "signature": "(self, name: str, value: bool | str | None) -> None:", "funcdef": "def"}, "odfdo.Element.set_style_attribute": {"fullname": "odfdo.Element.set_style_attribute", "modulename": "odfdo", "qualname": "Element.set_style_attribute", "kind": "function", "doc": "

Shortcut to accept a style object as a value.

\n", "signature": "(self, name: str, value: odfdo.element.Element | str) -> None:", "funcdef": "def"}, "odfdo.Element.del_attribute": {"fullname": "odfdo.Element.del_attribute", "modulename": "odfdo", "qualname": "Element.del_attribute", "kind": "function", "doc": "

\n", "signature": "(self, name: str) -> None:", "funcdef": "def"}, "odfdo.Element.text": {"fullname": "odfdo.Element.text", "modulename": "odfdo", "qualname": "Element.text", "kind": "variable", "doc": "

Get / set the text content of the element.

\n", "annotation": ": str"}, "odfdo.Element.text_recursive": {"fullname": "odfdo.Element.text_recursive", "modulename": "odfdo", "qualname": "Element.text_recursive", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "odfdo.Element.tail": {"fullname": "odfdo.Element.tail", "modulename": "odfdo", "qualname": "Element.tail", "kind": "variable", "doc": "

Get / set the text immediately following the element.

\n", "annotation": ": str | None"}, "odfdo.Element.search": {"fullname": "odfdo.Element.search", "modulename": "odfdo", "qualname": "Element.search", "kind": "function", "doc": "

Return the first position of the pattern in the text content of\nthe element, or None if not found.

\n\n

Python regular expression syntax applies.

\n\n

Arguments:

\n\n
pattern -- str\n
\n\n

Return: int or None

\n", "signature": "(self, pattern: str) -> int | None:", "funcdef": "def"}, "odfdo.Element.match": {"fullname": "odfdo.Element.match", "modulename": "odfdo", "qualname": "Element.match", "kind": "function", "doc": "

return True if the pattern is found one or more times anywhere in\nthe text content of the element.

\n\n

Python regular expression syntax applies.

\n\n

Arguments:

\n\n
pattern -- str\n
\n\n

Return: bool

\n", "signature": "(self, pattern: str) -> bool:", "funcdef": "def"}, "odfdo.Element.replace": {"fullname": "odfdo.Element.replace", "modulename": "odfdo", "qualname": "Element.replace", "kind": "function", "doc": "

Replace the pattern with the given text, or delete if text is an\nempty string, and return the number of replacements. By default, only\nreturn the number of occurences that would be replaced.

\n\n

It cannot replace patterns found across several element, like a word\nsplit into two consecutive spans.

\n\n

Python regular expression syntax applies.

\n\n

Arguments:

\n\n
pattern -- str\n\nnew -- str\n
\n\n

Return: int

\n", "signature": "(self, pattern: str, new: str | None = None) -> int:", "funcdef": "def"}, "odfdo.Element.root": {"fullname": "odfdo.Element.root", "modulename": "odfdo", "qualname": "Element.root", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.element.Element"}, "odfdo.Element.parent": {"fullname": "odfdo.Element.parent", "modulename": "odfdo", "qualname": "Element.parent", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.element.Element | None"}, "odfdo.Element.is_bound": {"fullname": "odfdo.Element.is_bound", "modulename": "odfdo", "qualname": "Element.is_bound", "kind": "variable", "doc": "

\n", "annotation": ": bool"}, "odfdo.Element.children": {"fullname": "odfdo.Element.children", "modulename": "odfdo", "qualname": "Element.children", "kind": "variable", "doc": "

\n", "annotation": ": list[odfdo.element.Element]"}, "odfdo.Element.index": {"fullname": "odfdo.Element.index", "modulename": "odfdo", "qualname": "Element.index", "kind": "function", "doc": "

Return the position of the child in this element.

\n\n

Inspired by lxml

\n", "signature": "(self, child: odfdo.element.Element) -> int:", "funcdef": "def"}, "odfdo.Element.text_content": {"fullname": "odfdo.Element.text_content", "modulename": "odfdo", "qualname": "Element.text_content", "kind": "variable", "doc": "

Get / set the text of the embedded paragraph, including embeded\nannotations, cells...

\n\n

Set create a paragraph if missing

\n", "annotation": ": str"}, "odfdo.Element.is_empty": {"fullname": "odfdo.Element.is_empty", "modulename": "odfdo", "qualname": "Element.is_empty", "kind": "function", "doc": "

Check if the element is empty : no text, no children, no tail.

\n\n

Return: Boolean

\n", "signature": "(self) -> bool:", "funcdef": "def"}, "odfdo.Element.get_between": {"fullname": "odfdo.Element.get_between", "modulename": "odfdo", "qualname": "Element.get_between", "kind": "function", "doc": "

Returns elements between tag1 and tag2, tag1 and tag2 shall\nbe unique and having an id attribute.\n(WARN: buggy if tag1/tag2 defines a malformed odf xml.)\nIf as_text is True: returns the text content.\nIf clean is True: suppress unwanted tags (deletions marks, ...)\nIf no_header is True: existing text:h are changed in text:p\nBy default: returns a list of Element, cleaned and without headers.

\n\n

Implementation and standard retrictions:\nOnly text:h and text:p sould be 'cut' by an insert tag, so inner parts\nof insert tags are:

\n\n
- any text:h, text:p or sub tag of these\n\n- some text, part of a parent text:h or text:p\n
\n\n

Arguments:

\n\n
tag1 -- Element\n\ntag2 -- Element\n\nas_text -- boolean\n\nclean -- boolean\n\nno_header -- boolean\n
\n\n

Return: list of odf_paragraph or odf_header

\n", "signature": "(\tself,\ttag1: odfdo.element.Element,\ttag2: odfdo.element.Element,\tas_text: bool = False,\tclean: bool = True,\tno_header: bool = True) -> list | odfdo.element.Element | str:", "funcdef": "def"}, "odfdo.Element.insert": {"fullname": "odfdo.Element.insert", "modulename": "odfdo", "qualname": "Element.insert", "kind": "function", "doc": "

Insert an element relatively to ourself.

\n\n

Insert either using DOM vocabulary or by numeric position.\nIf text start is True, insert the element before any existing text.

\n\n

Position start at 0.

\n\n

Arguments:

\n\n
element -- Element\n\nxmlposition -- FIRST_CHILD, LAST_CHILD, NEXT_SIBLING\n               or PREV_SIBLING\n\nstart -- Boolean\n\nposition -- int\n
\n", "signature": "(\tself,\telement: odfdo.element.Element,\txmlposition: int | None = None,\tposition: int | None = None,\tstart: bool = False) -> None:", "funcdef": "def"}, "odfdo.Element.extend": {"fullname": "odfdo.Element.extend", "modulename": "odfdo", "qualname": "Element.extend", "kind": "function", "doc": "

Fast append elements at the end of ourself using extend.

\n", "signature": "(\tself,\todf_elements: collections.abc.Iterable[odfdo.element.Element]) -> None:", "funcdef": "def"}, "odfdo.Element.append": {"fullname": "odfdo.Element.append", "modulename": "odfdo", "qualname": "Element.append", "kind": "function", "doc": "

Insert element or text in the last position.

\n", "signature": "(self, str_or_element: str | odfdo.element.Element) -> None:", "funcdef": "def"}, "odfdo.Element.delete": {"fullname": "odfdo.Element.delete", "modulename": "odfdo", "qualname": "Element.delete", "kind": "function", "doc": "

Delete the given element from the XML tree. If no element is given,\n\"self\" is deleted. The XML library may allow to continue to use an\nelement now \"orphan\" as long as you have a reference to it.

\n\n

if keep_tail is True (default), the tail text is not erased.

\n\n

Arguments:

\n\n
child -- Element\n\nkeep_tail -- boolean (default to True), True for most usages.\n
\n", "signature": "(\tself,\tchild: odfdo.element.Element | None = None,\tkeep_tail: bool = True) -> None:", "funcdef": "def"}, "odfdo.Element.replace_element": {"fullname": "odfdo.Element.replace_element", "modulename": "odfdo", "qualname": "Element.replace_element", "kind": "function", "doc": "

Replaces in place a sub element with the element passed as second\nargument.

\n\n

Warning : no clone for old element.

\n", "signature": "(\tself,\told_element: odfdo.element.Element,\tnew_element: odfdo.element.Element) -> None:", "funcdef": "def"}, "odfdo.Element.strip_elements": {"fullname": "odfdo.Element.strip_elements", "modulename": "odfdo", "qualname": "Element.strip_elements", "kind": "function", "doc": "

Remove the tags of provided elements, keeping inner childs and text.

\n\n

Return : the striped element.

\n\n

Warning : no clone in sub_elements list.

\n\n

Arguments:

\n\n
sub_elements -- Element or list of Element\n
\n", "signature": "(\tself,\tsub_elements: odfdo.element.Element | collections.abc.Iterable[odfdo.element.Element]) -> odfdo.element.Element | list:", "funcdef": "def"}, "odfdo.Element.strip_tags": {"fullname": "odfdo.Element.strip_tags", "modulename": "odfdo", "qualname": "Element.strip_tags", "kind": "function", "doc": "

Remove the tags listed in strip, recursively, keeping inner childs\nand text. Tags listed in protect stop the removal one level depth. If\nthe first level element is stripped, default is used to embed the\ncontent in the default element. If default is None and first level is\nstriped, a list of text and children is returned. Return : the striped\nelement.

\n\n

strip_tags should be used by on purpose methods (strip_span ...)\n(Method name taken from lxml).

\n\n

Arguments:

\n\n
strip -- iterable list of str odf tags, or None\n\nprotect -- iterable list of str odf tags, or None\n\ndefault -- str odf tag, or None\n
\n\n

Return:

\n\n
Element.\n
\n", "signature": "(\tself,\tstrip: collections.abc.Iterable[str] | None = None,\tprotect: collections.abc.Iterable[str] | None = None,\tdefault: str | None = 'text:p') -> odfdo.element.Element | list:", "funcdef": "def"}, "odfdo.Element.xpath": {"fullname": "odfdo.Element.xpath", "modulename": "odfdo", "qualname": "Element.xpath", "kind": "function", "doc": "

Apply XPath query to the element and its subtree. Return list of\nElement or Text instances translated from the nodes found.

\n", "signature": "(\tself,\txpath_query: str) -> list[odfdo.element.Element | odfdo.element.Text]:", "funcdef": "def"}, "odfdo.Element.clear": {"fullname": "odfdo.Element.clear", "modulename": "odfdo", "qualname": "Element.clear", "kind": "function", "doc": "

Remove text, children and attributes from the element.

\n", "signature": "(self) -> None:", "funcdef": "def"}, "odfdo.Element.clone": {"fullname": "odfdo.Element.clone", "modulename": "odfdo", "qualname": "Element.clone", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.element.Element"}, "odfdo.Element.serialize": {"fullname": "odfdo.Element.serialize", "modulename": "odfdo", "qualname": "Element.serialize", "kind": "function", "doc": "

Return text serialization of XML element.

\n", "signature": "(self, pretty: bool = False, with_ns: bool = False) -> str:", "funcdef": "def"}, "odfdo.Element.document_body": {"fullname": "odfdo.Element.document_body", "modulename": "odfdo", "qualname": "Element.document_body", "kind": "variable", "doc": "

Return the document body : 'office:body'

\n", "annotation": ": odfdo.element.Element | None"}, "odfdo.Element.get_formatted_text": {"fullname": "odfdo.Element.get_formatted_text", "modulename": "odfdo", "qualname": "Element.get_formatted_text", "kind": "function", "doc": "

This function should return a beautiful version of the text.

\n", "signature": "(self, context: dict | None = None) -> str:", "funcdef": "def"}, "odfdo.Element.get_styled_elements": {"fullname": "odfdo.Element.get_styled_elements", "modulename": "odfdo", "qualname": "Element.get_styled_elements", "kind": "function", "doc": "

Brute-force to find paragraphs, tables, etc. using the given style\nname (or all by default).

\n\n

Arguments:

\n\n
name -- str\n
\n\n

Return: list

\n", "signature": "(self, name: str = '') -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.dc_creator": {"fullname": "odfdo.Element.dc_creator", "modulename": "odfdo", "qualname": "Element.dc_creator", "kind": "variable", "doc": "

Get dc:creator value.

\n\n

Return: str (or None if inexistant)

\n", "annotation": ": str | None"}, "odfdo.Element.dc_date": {"fullname": "odfdo.Element.dc_date", "modulename": "odfdo", "qualname": "Element.dc_date", "kind": "variable", "doc": "

Get the dc:date value.

\n\n

Return: datetime (or None if inexistant)

\n", "annotation": ": datetime.datetime | None"}, "odfdo.Element.svg_title": {"fullname": "odfdo.Element.svg_title", "modulename": "odfdo", "qualname": "Element.svg_title", "kind": "variable", "doc": "

\n", "annotation": ": str | None"}, "odfdo.Element.svg_description": {"fullname": "odfdo.Element.svg_description", "modulename": "odfdo", "qualname": "Element.svg_description", "kind": "variable", "doc": "

\n", "annotation": ": str | None"}, "odfdo.Element.get_sections": {"fullname": "odfdo.Element.get_sections", "modulename": "odfdo", "qualname": "Element.get_sections", "kind": "function", "doc": "

Return all the sections that match the criteria.

\n\n

Arguments:

\n\n
style -- str\n\ncontent -- str regex\n
\n\n

Return: list of Element

\n", "signature": "(\tself,\tstyle: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_section": {"fullname": "odfdo.Element.get_section", "modulename": "odfdo", "qualname": "Element.get_section", "kind": "function", "doc": "

Return the section that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\ncontent -- str regex\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_paragraphs": {"fullname": "odfdo.Element.get_paragraphs", "modulename": "odfdo", "qualname": "Element.get_paragraphs", "kind": "function", "doc": "

Return all the paragraphs that match the criteria.

\n\n

Arguments:

\n\n
style -- str\n\ncontent -- str regex\n
\n\n

Return: list of Paragraph

\n", "signature": "(\tself,\tstyle: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_paragraph": {"fullname": "odfdo.Element.get_paragraph", "modulename": "odfdo", "qualname": "Element.get_paragraph", "kind": "function", "doc": "

Return the paragraph that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\ncontent -- str regex\n
\n\n

Return: Paragraph or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_spans": {"fullname": "odfdo.Element.get_spans", "modulename": "odfdo", "qualname": "Element.get_spans", "kind": "function", "doc": "

Return all the spans that match the criteria.

\n\n

Arguments:

\n\n
style -- str\n\ncontent -- str regex\n
\n\n

Return: list of Span

\n", "signature": "(\tself,\tstyle: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_span": {"fullname": "odfdo.Element.get_span", "modulename": "odfdo", "qualname": "Element.get_span", "kind": "function", "doc": "

Return the span that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\ncontent -- str regex\n
\n\n

Return: Span or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_headers": {"fullname": "odfdo.Element.get_headers", "modulename": "odfdo", "qualname": "Element.get_headers", "kind": "function", "doc": "

Return all the Headers that match the criteria.

\n\n

Arguments:

\n\n
style -- str\n\ncontent -- str regex\n
\n\n

Return: list of Header

\n", "signature": "(\tself,\tstyle: str | None = None,\toutline_level: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_header": {"fullname": "odfdo.Element.get_header", "modulename": "odfdo", "qualname": "Element.get_header", "kind": "function", "doc": "

Return the Header that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\ncontent -- str regex\n
\n\n

Return: Header or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\toutline_level: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_lists": {"fullname": "odfdo.Element.get_lists", "modulename": "odfdo", "qualname": "Element.get_lists", "kind": "function", "doc": "

Return all the lists that match the criteria.

\n\n

Arguments:

\n\n
style -- str\n\ncontent -- str regex\n
\n\n

Return: list of List

\n", "signature": "(\tself,\tstyle: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_list": {"fullname": "odfdo.Element.get_list", "modulename": "odfdo", "qualname": "Element.get_list", "kind": "function", "doc": "

Return the list that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\ncontent -- str regex\n
\n\n

Return: List or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_frames": {"fullname": "odfdo.Element.get_frames", "modulename": "odfdo", "qualname": "Element.get_frames", "kind": "function", "doc": "

Return all the frames that match the criteria.

\n\n

Arguments:

\n\n
presentation_class -- str\n\nstyle -- str\n\ntitle -- str regex\n\ndescription -- str regex\n\ncontent -- str regex\n
\n\n

Return: list of Frame

\n", "signature": "(\tself,\tpresentation_class: str | None = None,\tstyle: str | None = None,\ttitle: str | None = None,\tdescription: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_frame": {"fullname": "odfdo.Element.get_frame", "modulename": "odfdo", "qualname": "Element.get_frame", "kind": "function", "doc": "

Return the section that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n\npresentation_class -- str\n\ntitle -- str regex\n\ndescription -- str regex\n\ncontent -- str regex\n
\n\n

Return: Frame or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None,\tpresentation_class: str | None = None,\ttitle: str | None = None,\tdescription: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_images": {"fullname": "odfdo.Element.get_images", "modulename": "odfdo", "qualname": "Element.get_images", "kind": "function", "doc": "

Return all the images matching the criteria.

\n\n

Arguments:

\n\n
style -- str\n\nurl -- str regex\n\ncontent -- str regex\n
\n\n

Return: list of Element

\n", "signature": "(\tself,\tstyle: str | None = None,\turl: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_image": {"fullname": "odfdo.Element.get_image", "modulename": "odfdo", "qualname": "Element.get_image", "kind": "function", "doc": "

Return the image matching the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n\nurl -- str regex\n\ncontent -- str regex\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None,\turl: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_tables": {"fullname": "odfdo.Element.get_tables", "modulename": "odfdo", "qualname": "Element.get_tables", "kind": "function", "doc": "

Return all the tables that match the criteria.

\n\n

Arguments:

\n\n
style -- str\n\ncontent -- str regex\n
\n\n

Return: list of Table

\n", "signature": "(\tself,\tstyle: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_table": {"fullname": "odfdo.Element.get_table", "modulename": "odfdo", "qualname": "Element.get_table", "kind": "function", "doc": "

Return the table that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n\ncontent -- str regex\n
\n\n

Return: Table or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_named_ranges": {"fullname": "odfdo.Element.get_named_ranges", "modulename": "odfdo", "qualname": "Element.get_named_ranges", "kind": "function", "doc": "

Return all the tables named ranges.

\n\n

Return: list of odf_named_range

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_named_range": {"fullname": "odfdo.Element.get_named_range", "modulename": "odfdo", "qualname": "Element.get_named_range", "kind": "function", "doc": "

Return the named range of specified name, or None if not found.

\n\n

Arguments:

\n\n
name -- str\n
\n\n

Return: NamedRange

\n", "signature": "(self, name: str) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.append_named_range": {"fullname": "odfdo.Element.append_named_range", "modulename": "odfdo", "qualname": "Element.append_named_range", "kind": "function", "doc": "

Append the named range to the spreadsheet, replacing existing named\nrange of same name if any.

\n\n

Arguments:

\n\n
named_range --  NamedRange\n
\n", "signature": "(self, named_range: odfdo.element.Element) -> None:", "funcdef": "def"}, "odfdo.Element.delete_named_range": {"fullname": "odfdo.Element.delete_named_range", "modulename": "odfdo", "qualname": "Element.delete_named_range", "kind": "function", "doc": "

Delete the Named Range of specified name from the spreadsheet.

\n\n

Arguments:

\n\n
name -- str\n
\n", "signature": "(self, name: str) -> None:", "funcdef": "def"}, "odfdo.Element.get_notes": {"fullname": "odfdo.Element.get_notes", "modulename": "odfdo", "qualname": "Element.get_notes", "kind": "function", "doc": "

Return all the notes that match the criteria.

\n\n

Arguments:

\n\n
note_class -- 'footnote' or 'endnote'\n\ncontent -- str regex\n
\n\n

Return: list of Note

\n", "signature": "(\tself,\tnote_class: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_note": {"fullname": "odfdo.Element.get_note", "modulename": "odfdo", "qualname": "Element.get_note", "kind": "function", "doc": "

Return the note that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nnote_id -- str\n\nnote_class -- 'footnote' or 'endnote'\n\ncontent -- str regex\n
\n\n

Return: Note or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tnote_id: str | None = None,\tnote_class: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_annotations": {"fullname": "odfdo.Element.get_annotations", "modulename": "odfdo", "qualname": "Element.get_annotations", "kind": "function", "doc": "

Return all the annotations that match the criteria.

\n\n

Arguments:

\n\n
creator -- str\n\nstart_date -- datetime instance\n\nend_date --  datetime instance\n\ncontent -- str regex\n
\n\n

Return: list of Annotation

\n", "signature": "(\tself,\tcreator: str | None = None,\tstart_date: datetime.datetime | None = None,\tend_date: datetime.datetime | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_annotation": {"fullname": "odfdo.Element.get_annotation", "modulename": "odfdo", "qualname": "Element.get_annotation", "kind": "function", "doc": "

Return the annotation that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\ncreator -- str\n\nstart_date -- datetime instance\n\nend_date -- datetime instance\n\ncontent -- str regex\n\nname -- str\n
\n\n

Return: Annotation or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tcreator: str | None = None,\tstart_date: datetime.datetime | None = None,\tend_date: datetime.datetime | None = None,\tcontent: str | None = None,\tname: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_annotation_ends": {"fullname": "odfdo.Element.get_annotation_ends", "modulename": "odfdo", "qualname": "Element.get_annotation_ends", "kind": "function", "doc": "

Return all the annotation ends.

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_annotation_end": {"fullname": "odfdo.Element.get_annotation_end", "modulename": "odfdo", "qualname": "Element.get_annotation_end", "kind": "function", "doc": "

Return the annotation end that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_office_names": {"fullname": "odfdo.Element.get_office_names", "modulename": "odfdo", "qualname": "Element.get_office_names", "kind": "function", "doc": "

Return all the used office:name tags values of the element.

\n\n

Return: list of unique str

\n", "signature": "(self) -> list[str]:", "funcdef": "def"}, "odfdo.Element.get_variable_decls": {"fullname": "odfdo.Element.get_variable_decls", "modulename": "odfdo", "qualname": "Element.get_variable_decls", "kind": "function", "doc": "

Return the container for variable declarations. Created if not\nfound.

\n\n

Return: Element

\n", "signature": "(self) -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.Element.get_variable_decl_list": {"fullname": "odfdo.Element.get_variable_decl_list", "modulename": "odfdo", "qualname": "Element.get_variable_decl_list", "kind": "function", "doc": "

Return all the variable declarations.

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_variable_decl": {"fullname": "odfdo.Element.get_variable_decl", "modulename": "odfdo", "qualname": "Element.get_variable_decl", "kind": "function", "doc": "

return the variable declaration for the given name.

\n\n

Arguments:

\n\n
name -- str\n\nposition -- int\n
\n\n

return: Element or none if not found

\n", "signature": "(self, name: str, position: int = 0) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_variable_sets": {"fullname": "odfdo.Element.get_variable_sets", "modulename": "odfdo", "qualname": "Element.get_variable_sets", "kind": "function", "doc": "

Return all the variable sets that match the criteria.

\n\n

Arguments:

\n\n
name -- str\n
\n\n

Return: list of Element

\n", "signature": "(self, name: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_variable_set": {"fullname": "odfdo.Element.get_variable_set", "modulename": "odfdo", "qualname": "Element.get_variable_set", "kind": "function", "doc": "

Return the variable set for the given name (last one by default).

\n\n

Arguments:

\n\n
name -- str\n\nposition -- int\n
\n\n

Return: Element or None if not found

\n", "signature": "(self, name: str, position: int = -1) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_variable_set_value": {"fullname": "odfdo.Element.get_variable_set_value", "modulename": "odfdo", "qualname": "Element.get_variable_set_value", "kind": "function", "doc": "

Return the last value of the given variable name.

\n\n

Arguments:

\n\n
name -- str\n\nvalue_type -- 'boolean', 'currency', 'date', 'float',\n              'percentage', 'string', 'time' or automatic\n
\n\n

Return: most appropriate Python type

\n", "signature": "(\tself,\tname: str,\tvalue_type: str | None = None) -> bool | str | int | float | decimal.Decimal | datetime.datetime | datetime.timedelta | None:", "funcdef": "def"}, "odfdo.Element.get_user_field_decls": {"fullname": "odfdo.Element.get_user_field_decls", "modulename": "odfdo", "qualname": "Element.get_user_field_decls", "kind": "function", "doc": "

Return the container for user field declarations. Created if not\nfound.

\n\n

Return: Element

\n", "signature": "(self) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_user_field_decl_list": {"fullname": "odfdo.Element.get_user_field_decl_list", "modulename": "odfdo", "qualname": "Element.get_user_field_decl_list", "kind": "function", "doc": "

Return all the user field declarations.

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_user_field_decl": {"fullname": "odfdo.Element.get_user_field_decl", "modulename": "odfdo", "qualname": "Element.get_user_field_decl", "kind": "function", "doc": "

return the user field declaration for the given name.

\n\n

return: Element or none if not found

\n", "signature": "(self, name: str, position: int = 0) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_user_field_value": {"fullname": "odfdo.Element.get_user_field_value", "modulename": "odfdo", "qualname": "Element.get_user_field_value", "kind": "function", "doc": "

Return the value of the given user field name.

\n\n

Arguments:

\n\n
name -- str\n\nvalue_type -- 'boolean', 'currency', 'date', 'float',\n              'percentage', 'string', 'time' or automatic\n
\n\n

Return: most appropriate Python type

\n", "signature": "(\tself,\tname: str,\tvalue_type: str | None = None) -> bool | str | int | float | decimal.Decimal | datetime.datetime | datetime.timedelta | None:", "funcdef": "def"}, "odfdo.Element.get_user_defined_list": {"fullname": "odfdo.Element.get_user_defined_list", "modulename": "odfdo", "qualname": "Element.get_user_defined_list", "kind": "function", "doc": "

Return all the user defined field declarations.

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_user_defined": {"fullname": "odfdo.Element.get_user_defined", "modulename": "odfdo", "qualname": "Element.get_user_defined", "kind": "function", "doc": "

return the user defined declaration for the given name.

\n\n

return: Element or none if not found

\n", "signature": "(self, name: str, position: int = 0) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_user_defined_value": {"fullname": "odfdo.Element.get_user_defined_value", "modulename": "odfdo", "qualname": "Element.get_user_defined_value", "kind": "function", "doc": "

Return the value of the given user defined field name.

\n\n

Arguments:

\n\n
name -- str\n\nvalue_type -- 'boolean', 'date', 'float',\n              'string', 'time' or automatic\n
\n\n

Return: most appropriate Python type

\n", "signature": "(\tself,\tname: str,\tvalue_type: str | None = None) -> bool | str | int | float | decimal.Decimal | datetime.datetime | datetime.timedelta | None:", "funcdef": "def"}, "odfdo.Element.get_draw_pages": {"fullname": "odfdo.Element.get_draw_pages", "modulename": "odfdo", "qualname": "Element.get_draw_pages", "kind": "function", "doc": "

Return all the draw pages that match the criteria.

\n\n

Arguments:

\n\n
style -- str\n\ncontent -- str regex\n
\n\n

Return: list of DrawPage

\n", "signature": "(\tself,\tstyle: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_draw_page": {"fullname": "odfdo.Element.get_draw_page", "modulename": "odfdo", "qualname": "Element.get_draw_page", "kind": "function", "doc": "

Return the draw page that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n\ncontent -- str regex\n
\n\n

Return: DrawPage or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_links": {"fullname": "odfdo.Element.get_links", "modulename": "odfdo", "qualname": "Element.get_links", "kind": "function", "doc": "

Return all the links that match the criteria.

\n\n

Arguments:

\n\n
name -- str\n\ntitle -- str\n\nurl -- str regex\n\ncontent -- str regex\n
\n\n

Return: list of Element

\n", "signature": "(\tself,\tname: str | None = None,\ttitle: str | None = None,\turl: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_link": {"fullname": "odfdo.Element.get_link", "modulename": "odfdo", "qualname": "Element.get_link", "kind": "function", "doc": "

Return the link that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n\ntitle -- str\n\nurl -- str regex\n\ncontent -- str regex\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None,\ttitle: str | None = None,\turl: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_bookmarks": {"fullname": "odfdo.Element.get_bookmarks", "modulename": "odfdo", "qualname": "Element.get_bookmarks", "kind": "function", "doc": "

Return all the bookmarks.

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_bookmark": {"fullname": "odfdo.Element.get_bookmark", "modulename": "odfdo", "qualname": "Element.get_bookmark", "kind": "function", "doc": "

Return the bookmark that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n
\n\n

Return: Bookmark or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_bookmark_starts": {"fullname": "odfdo.Element.get_bookmark_starts", "modulename": "odfdo", "qualname": "Element.get_bookmark_starts", "kind": "function", "doc": "

Return all the bookmark starts.

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_bookmark_start": {"fullname": "odfdo.Element.get_bookmark_start", "modulename": "odfdo", "qualname": "Element.get_bookmark_start", "kind": "function", "doc": "

Return the bookmark start that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_bookmark_ends": {"fullname": "odfdo.Element.get_bookmark_ends", "modulename": "odfdo", "qualname": "Element.get_bookmark_ends", "kind": "function", "doc": "

Return all the bookmark ends.

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_bookmark_end": {"fullname": "odfdo.Element.get_bookmark_end", "modulename": "odfdo", "qualname": "Element.get_bookmark_end", "kind": "function", "doc": "

Return the bookmark end that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_reference_marks_single": {"fullname": "odfdo.Element.get_reference_marks_single", "modulename": "odfdo", "qualname": "Element.get_reference_marks_single", "kind": "function", "doc": "

Return all the reference marks. Search only the tags\ntext:reference-mark.\nConsider using : get_reference_marks()

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_reference_mark_single": {"fullname": "odfdo.Element.get_reference_mark_single", "modulename": "odfdo", "qualname": "Element.get_reference_mark_single", "kind": "function", "doc": "

Return the reference mark that matches the criteria. Search only the\ntags text:reference-mark.\nConsider using : get_reference_mark()

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_reference_mark_starts": {"fullname": "odfdo.Element.get_reference_mark_starts", "modulename": "odfdo", "qualname": "Element.get_reference_mark_starts", "kind": "function", "doc": "

Return all the reference mark starts. Search only the tags\ntext:reference-mark-start.\nConsider using : get_reference_marks()

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_reference_mark_start": {"fullname": "odfdo.Element.get_reference_mark_start", "modulename": "odfdo", "qualname": "Element.get_reference_mark_start", "kind": "function", "doc": "

Return the reference mark start that matches the criteria. Search\nonly the tags text:reference-mark-start.\nConsider using : get_reference_mark()

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_reference_mark_ends": {"fullname": "odfdo.Element.get_reference_mark_ends", "modulename": "odfdo", "qualname": "Element.get_reference_mark_ends", "kind": "function", "doc": "

Return all the reference mark ends. Search only the tags\ntext:reference-mark-end.\nConsider using : get_reference_marks()

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_reference_mark_end": {"fullname": "odfdo.Element.get_reference_mark_end", "modulename": "odfdo", "qualname": "Element.get_reference_mark_end", "kind": "function", "doc": "

Return the reference mark end that matches the criteria. Search only\nthe tags text:reference-mark-end.\nConsider using : get_reference_marks()

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_reference_marks": {"fullname": "odfdo.Element.get_reference_marks", "modulename": "odfdo", "qualname": "Element.get_reference_marks", "kind": "function", "doc": "

Return all the reference marks, either single position reference\n(text:reference-mark) or start of range reference\n(text:reference-mark-start).

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_reference_mark": {"fullname": "odfdo.Element.get_reference_mark", "modulename": "odfdo", "qualname": "Element.get_reference_mark", "kind": "function", "doc": "

Return the reference mark that match the criteria. Either single\nposition reference mark (text:reference-mark) or start of range\nreference (text:reference-mark-start).

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_references": {"fullname": "odfdo.Element.get_references", "modulename": "odfdo", "qualname": "Element.get_references", "kind": "function", "doc": "

Return all the references (text:reference-ref). If name is\nprovided, returns the references of that name.

\n\n

Return: list of Element

\n\n

Arguments:

\n\n
name -- str or None\n
\n", "signature": "(self, name: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_draw_groups": {"fullname": "odfdo.Element.get_draw_groups", "modulename": "odfdo", "qualname": "Element.get_draw_groups", "kind": "function", "doc": "

\n", "signature": "(\tself,\ttitle: str | None = None,\tdescription: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_draw_group": {"fullname": "odfdo.Element.get_draw_group", "modulename": "odfdo", "qualname": "Element.get_draw_group", "kind": "function", "doc": "

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None,\ttitle: str | None = None,\tdescription: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_draw_lines": {"fullname": "odfdo.Element.get_draw_lines", "modulename": "odfdo", "qualname": "Element.get_draw_lines", "kind": "function", "doc": "

Return all the draw lines that match the criteria.

\n\n

Arguments:

\n\n
draw_style -- str\n\ndraw_text_style -- str\n\ncontent -- str regex\n
\n\n

Return: list of odf_shape

\n", "signature": "(\tself,\tdraw_style: str | None = None,\tdraw_text_style: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_draw_line": {"fullname": "odfdo.Element.get_draw_line", "modulename": "odfdo", "qualname": "Element.get_draw_line", "kind": "function", "doc": "

Return the draw line that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nid -- str\n\ncontent -- str regex\n
\n\n

Return: odf_shape or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tid: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_draw_rectangles": {"fullname": "odfdo.Element.get_draw_rectangles", "modulename": "odfdo", "qualname": "Element.get_draw_rectangles", "kind": "function", "doc": "

Return all the draw rectangles that match the criteria.

\n\n

Arguments:

\n\n
draw_style -- str\n\ndraw_text_style -- str\n\ncontent -- str regex\n
\n\n

Return: list of odf_shape

\n", "signature": "(\tself,\tdraw_style: str | None = None,\tdraw_text_style: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_draw_rectangle": {"fullname": "odfdo.Element.get_draw_rectangle", "modulename": "odfdo", "qualname": "Element.get_draw_rectangle", "kind": "function", "doc": "

Return the draw rectangle that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nid -- str\n\ncontent -- str regex\n
\n\n

Return: odf_shape or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tid: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_draw_ellipses": {"fullname": "odfdo.Element.get_draw_ellipses", "modulename": "odfdo", "qualname": "Element.get_draw_ellipses", "kind": "function", "doc": "

Return all the draw ellipses that match the criteria.

\n\n

Arguments:

\n\n
draw_style -- str\n\ndraw_text_style -- str\n\ncontent -- str regex\n
\n\n

Return: list of odf_shape

\n", "signature": "(\tself,\tdraw_style: str | None = None,\tdraw_text_style: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_draw_ellipse": {"fullname": "odfdo.Element.get_draw_ellipse", "modulename": "odfdo", "qualname": "Element.get_draw_ellipse", "kind": "function", "doc": "

Return the draw ellipse that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nid -- str\n\ncontent -- str regex\n
\n\n

Return: odf_shape or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tid: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_draw_connectors": {"fullname": "odfdo.Element.get_draw_connectors", "modulename": "odfdo", "qualname": "Element.get_draw_connectors", "kind": "function", "doc": "

Return all the draw connectors that match the criteria.

\n\n

Arguments:

\n\n
draw_style -- str\n\ndraw_text_style -- str\n\ncontent -- str regex\n
\n\n

Return: list of odf_shape

\n", "signature": "(\tself,\tdraw_style: str | None = None,\tdraw_text_style: str | None = None,\tcontent: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_draw_connector": {"fullname": "odfdo.Element.get_draw_connector", "modulename": "odfdo", "qualname": "Element.get_draw_connector", "kind": "function", "doc": "

Return the draw connector that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nid -- str\n\ncontent -- str regex\n
\n\n

Return: odf_shape or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tid: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_orphan_draw_connectors": {"fullname": "odfdo.Element.get_orphan_draw_connectors", "modulename": "odfdo", "qualname": "Element.get_orphan_draw_connectors", "kind": "function", "doc": "

Return a list of connectors which don't have any shape connected\nto them.

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_tracked_changes": {"fullname": "odfdo.Element.get_tracked_changes", "modulename": "odfdo", "qualname": "Element.get_tracked_changes", "kind": "function", "doc": "

Return the tracked-changes part in the text body.

\n", "signature": "(self) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_changes_ids": {"fullname": "odfdo.Element.get_changes_ids", "modulename": "odfdo", "qualname": "Element.get_changes_ids", "kind": "function", "doc": "

Return a list of ids that refers to a change region in the tracked\nchanges list.

\n", "signature": "(self) -> list[odfdo.element.Element | odfdo.element.Text]:", "funcdef": "def"}, "odfdo.Element.get_text_change_deletions": {"fullname": "odfdo.Element.get_text_change_deletions", "modulename": "odfdo", "qualname": "Element.get_text_change_deletions", "kind": "function", "doc": "

Return all the text changes of deletion kind: the tags text:change.\nConsider using : get_text_changes()

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_text_change_deletion": {"fullname": "odfdo.Element.get_text_change_deletion", "modulename": "odfdo", "qualname": "Element.get_text_change_deletion", "kind": "function", "doc": "

Return the text change of deletion kind that matches the criteria.\nSearch only for the tags text:change.\nConsider using : get_text_change()

\n\n

Arguments:

\n\n
position -- int\n\nidx -- str\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tidx: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_text_change_starts": {"fullname": "odfdo.Element.get_text_change_starts", "modulename": "odfdo", "qualname": "Element.get_text_change_starts", "kind": "function", "doc": "

Return all the text change-start. Search only for the tags\ntext:change-start.\nConsider using : get_text_changes()

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_text_change_start": {"fullname": "odfdo.Element.get_text_change_start", "modulename": "odfdo", "qualname": "Element.get_text_change_start", "kind": "function", "doc": "

Return the text change-start that matches the criteria. Search\nonly the tags text:change-start.\nConsider using : get_text_change()

\n\n

Arguments:

\n\n
position -- int\n\nidx -- str\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tidx: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_text_change_ends": {"fullname": "odfdo.Element.get_text_change_ends", "modulename": "odfdo", "qualname": "Element.get_text_change_ends", "kind": "function", "doc": "

Return all the text change-end. Search only the tags\ntext:change-end.\nConsider using : get_text_changes()

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_text_change_end": {"fullname": "odfdo.Element.get_text_change_end", "modulename": "odfdo", "qualname": "Element.get_text_change_end", "kind": "function", "doc": "

Return the text change-end that matches the criteria. Search only\nthe tags text:change-end.\nConsider using : get_text_change()

\n\n

Arguments:

\n\n
position -- int\n\nidx -- str\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tidx: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_text_changes": {"fullname": "odfdo.Element.get_text_changes", "modulename": "odfdo", "qualname": "Element.get_text_changes", "kind": "function", "doc": "

Return all the text changes, either single deletion\n(text:change) or start of range of changes (text:change-start).

\n\n

Return: list of Element

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_text_change": {"fullname": "odfdo.Element.get_text_change", "modulename": "odfdo", "qualname": "Element.get_text_change", "kind": "function", "doc": "

Return the text change that matches the criteria. Either single\ndeletion (text:change) or start of range of changes (text:change-start).\nposition : index of the element to retrieve if several matches, default\nis 0.\nidx : change-id of the element.

\n\n

Arguments:

\n\n
position -- int\n\nidx -- str\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tidx: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_tocs": {"fullname": "odfdo.Element.get_tocs", "modulename": "odfdo", "qualname": "Element.get_tocs", "kind": "function", "doc": "

Return all the tables of contents.

\n\n

Return: list of odf_toc

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_toc": {"fullname": "odfdo.Element.get_toc", "modulename": "odfdo", "qualname": "Element.get_toc", "kind": "function", "doc": "

Return the table of contents that matches the criteria.

\n\n

Arguments:

\n\n
position -- int\n\ncontent -- str regex\n
\n\n

Return: odf_toc or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Element.get_styles": {"fullname": "odfdo.Element.get_styles", "modulename": "odfdo", "qualname": "Element.get_styles", "kind": "function", "doc": "

\n", "signature": "(self, family: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Element.get_style": {"fullname": "odfdo.Element.get_style", "modulename": "odfdo", "qualname": "Element.get_style", "kind": "function", "doc": "

Return the style uniquely identified by the family/name pair. If\nthe argument is already a style object, it will return it.

\n\n

If the name is not the internal name but the name you gave in the\ndesktop application, use display_name instead.

\n\n

Arguments:

\n\n
family -- 'paragraph', 'text', 'graphic', 'table', 'list',\n          'number'\n\nname_or_element -- str or Style\n\ndisplay_name -- str\n
\n\n

Return: odf_style or None if not found

\n", "signature": "(\tself,\tfamily: str,\tname_or_element: str | odfdo.element.Element | None = None,\tdisplay_name: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.ElementTyped": {"fullname": "odfdo.ElementTyped", "modulename": "odfdo", "qualname": "ElementTyped", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element.Element"}, "odfdo.ElementTyped.set_value_and_type": {"fullname": "odfdo.ElementTyped.set_value_and_type", "modulename": "odfdo", "qualname": "ElementTyped.set_value_and_type", "kind": "function", "doc": "

\n", "signature": "(\tself,\tvalue: Any,\tvalue_type: str | None = None,\ttext: str | None = None,\tcurrency: str | None = None) -> str | None:", "funcdef": "def"}, "odfdo.ElementTyped.get_value": {"fullname": "odfdo.ElementTyped.get_value", "modulename": "odfdo", "qualname": "ElementTyped.get_value", "kind": "function", "doc": "

Return Python typed value.

\n\n

Only for \"with office:value-type\" elements, not for meta fields.

\n", "signature": "(\tself,\tvalue_type: str | None = None,\ttry_get_text: bool = True,\tget_type: bool = False) -> typing.Any | tuple[typing.Any, str]:", "funcdef": "def"}, "odfdo.EllipseShape": {"fullname": "odfdo.EllipseShape", "modulename": "odfdo", "qualname": "EllipseShape", "kind": "class", "doc": "

Create a ellipse shape.

\n\n

Arguments:

\n\n
style -- str\n\ntext_style -- str\n\ndraw_id -- str\n\nlayer -- str\n\nposition -- (str, str)\n\nsize -- (str, str)\n
\n", "bases": "odfdo.shapes.ShapeBase"}, "odfdo.EllipseShape.__init__": {"fullname": "odfdo.EllipseShape.__init__", "modulename": "odfdo", "qualname": "EllipseShape.__init__", "kind": "function", "doc": "

\n", "signature": "(\tstyle: str | None = None,\ttext_style: str | None = None,\tdraw_id: str | None = None,\tlayer: str | None = None,\tposition: tuple | None = None,\tsize: tuple | None = None,\t**kwargs: Any)"}, "odfdo.FIRST_CHILD": {"fullname": "odfdo.FIRST_CHILD", "modulename": "odfdo", "qualname": "FIRST_CHILD", "kind": "variable", "doc": "

\n", "default_value": "0"}, "odfdo.Frame": {"fullname": "odfdo.Frame", "modulename": "odfdo", "qualname": "Frame", "kind": "class", "doc": "

ODF Frame \"draw:frame\"

\n\n

Frames are not useful by themselves. You should consider calling\nFrame.image_frame() or Frame.text_frame directly.

\n", "bases": "odfdo.element.Element, odfdo.frame.AnchorMix, odfdo.frame.PosMix, odfdo.frame.ZMix, odfdo.frame.SizeMix"}, "odfdo.Frame.__init__": {"fullname": "odfdo.Frame.__init__", "modulename": "odfdo", "qualname": "Frame.__init__", "kind": "function", "doc": "

Create a frame element of the given size. Position is relative to the\ncontext the frame is inserted in. If positioned by page, give the page\nnumber and the x, y position.

\n\n

Size is a (width, height) tuple and position is a (left, top) tuple; items\nare strings including the unit, e.g. ('10cm', '15cm').

\n\n

Frames are not useful by themselves. You should consider calling:\n Frame.image_frame()\nor\n Frame.text_frame()

\n\n

Arguments:

\n\n
name -- str\n\ndraw_id -- str\n\nstyle -- str\n\nposition -- (str, str)\n\nsize -- (str, str)\n\nz_index -- int (default 0)\n\npresentation_class -- str\n\nanchor_type -- 'page', 'frame', 'paragraph', 'char' or 'as-char'\n\nanchor_page -- int, page number is anchor_type is 'page'\n\nlayer -- str\n\npresentation_style -- str\n
\n", "signature": "(\tname: str | None = None,\tdraw_id: str | None = None,\tstyle: str | None = None,\tposition: tuple | None = None,\tsize: tuple = ('1cm', '1cm'),\tz_index: int = 0,\tpresentation_class: str | None = None,\tanchor_type: str | None = None,\tanchor_page: int | None = None,\tlayer: str | None = None,\tpresentation_style: str | None = None,\t**kwargs: Any)"}, "odfdo.Frame.image_frame": {"fullname": "odfdo.Frame.image_frame", "modulename": "odfdo", "qualname": "Frame.image_frame", "kind": "function", "doc": "

Create a ready-to-use image, since image must be embedded in a\nframe.

\n\n

The optionnal text will appear above the image.

\n\n

Arguments:

\n\n
image -- DrawImage or str, DrawImage element or URL of the image\n\ntext -- str, text for the image\n\nSee Frame() initialization for the other arguments\n
\n\n

Return: Frame

\n", "signature": "(\tcls,\timage: odfdo.element.Element | str,\ttext: str | None = None,\tname: str | None = None,\tdraw_id: str | None = None,\tstyle: str | None = None,\tposition: tuple | None = None,\tsize: tuple = ('1cm', '1cm'),\tz_index: int = 0,\tpresentation_class: str | None = None,\tanchor_type: str | None = None,\tanchor_page: int | None = None,\tlayer: str | None = None,\tpresentation_style: str | None = None,\t**kwargs: Any) -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.Frame.text_frame": {"fullname": "odfdo.Frame.text_frame", "modulename": "odfdo", "qualname": "Frame.text_frame", "kind": "function", "doc": "

Create a ready-to-use text box, since text box must be embedded in\na frame.

\n\n

The optionnal text will appear above the image.

\n\n

Arguments:

\n\n
text_or_element -- str or Element, or list of them, text content\n                   of the text box.\n\ntext_style -- str, name of the style for the text\n\nSee Frame() initialization for the other arguments\n
\n\n

Return: Frame

\n", "signature": "(\tcls,\ttext_or_element: collections.abc.Iterable[odfdo.element.Element] | odfdo.element.Element | str,\ttext_style: str | None = None,\tname: str | None = None,\tdraw_id: str | None = None,\tstyle: str | None = None,\tposition: tuple | None = None,\tsize: tuple = ('1cm', '1cm'),\tz_index: int = 0,\tpresentation_class: str | None = None,\tanchor_type: str | None = None,\tanchor_page: int | None = None,\tlayer: str | None = None,\tpresentation_style: str | None = None,\t**kwargs: Any) -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.Frame.text_content": {"fullname": "odfdo.Frame.text_content", "modulename": "odfdo", "qualname": "Frame.text_content", "kind": "variable", "doc": "

Get / set the text of the embedded paragraph, including embeded\nannotations, cells...

\n\n

Set create a paragraph if missing

\n", "annotation": ": str"}, "odfdo.Frame.get_image": {"fullname": "odfdo.Frame.get_image", "modulename": "odfdo", "qualname": "Frame.get_image", "kind": "function", "doc": "

Return the image matching the criteria.

\n\n

Arguments:

\n\n
position -- int\n\nname -- str\n\nurl -- str regex\n\ncontent -- str regex\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tname: str | None = None,\turl: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Frame.set_image": {"fullname": "odfdo.Frame.set_image", "modulename": "odfdo", "qualname": "Frame.set_image", "kind": "function", "doc": "

\n", "signature": "(\tself,\turl_or_element: odfdo.element.Element | str) -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.Frame.get_text_box": {"fullname": "odfdo.Frame.get_text_box", "modulename": "odfdo", "qualname": "Frame.get_text_box", "kind": "function", "doc": "

\n", "signature": "(self) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Frame.set_text_box": {"fullname": "odfdo.Frame.set_text_box", "modulename": "odfdo", "qualname": "Frame.set_text_box", "kind": "function", "doc": "

\n", "signature": "(\tself,\ttext_or_element: collections.abc.Iterable[odfdo.element.Element | str] | odfdo.element.Element | str,\ttext_style: str | None = None) -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.Frame.get_formatted_text": {"fullname": "odfdo.Frame.get_formatted_text", "modulename": "odfdo", "qualname": "Frame.get_formatted_text", "kind": "function", "doc": "

This function should return a beautiful version of the text.

\n", "signature": "(self, context: dict | None = None) -> str:", "funcdef": "def"}, "odfdo.Frame.name": {"fullname": "odfdo.Frame.name", "modulename": "odfdo", "qualname": "Frame.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Frame.draw_id": {"fullname": "odfdo.Frame.draw_id", "modulename": "odfdo", "qualname": "Frame.draw_id", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Frame.width": {"fullname": "odfdo.Frame.width", "modulename": "odfdo", "qualname": "Frame.width", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Frame.height": {"fullname": "odfdo.Frame.height", "modulename": "odfdo", "qualname": "Frame.height", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Frame.style": {"fullname": "odfdo.Frame.style", "modulename": "odfdo", "qualname": "Frame.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Frame.pos_x": {"fullname": "odfdo.Frame.pos_x", "modulename": "odfdo", "qualname": "Frame.pos_x", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Frame.pos_y": {"fullname": "odfdo.Frame.pos_y", "modulename": "odfdo", "qualname": "Frame.pos_y", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Frame.presentation_class": {"fullname": "odfdo.Frame.presentation_class", "modulename": "odfdo", "qualname": "Frame.presentation_class", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Frame.layer": {"fullname": "odfdo.Frame.layer", "modulename": "odfdo", "qualname": "Frame.layer", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Frame.presentation_style": {"fullname": "odfdo.Frame.presentation_style", "modulename": "odfdo", "qualname": "Frame.presentation_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Header": {"fullname": "odfdo.Header", "modulename": "odfdo", "qualname": "Header", "kind": "class", "doc": "

Specialised paragraph for headings \"text:h\".

\n", "bases": "odfdo.paragraph.Paragraph"}, "odfdo.Header.__init__": {"fullname": "odfdo.Header.__init__", "modulename": "odfdo", "qualname": "Header.__init__", "kind": "function", "doc": "

Create a header element of the given style and level, containing the\noptional given text.

\n\n

Level count begins at 1.

\n\n

Arguments:

\n\n
level -- int\n\ntext -- str\n\nrestart_numbering -- bool\n\nstart_value -- int\n\nstyle -- str\n
\n", "signature": "(\tlevel: int = 1,\ttext: str | None = None,\trestart_numbering: bool = False,\tstart_value: int | None = None,\tsuppress_numbering: bool = False,\tstyle: str | None = None,\t**kwargs: Any)"}, "odfdo.Header.get_formatted_text": {"fullname": "odfdo.Header.get_formatted_text", "modulename": "odfdo", "qualname": "Header.get_formatted_text", "kind": "function", "doc": "

This function should return a beautiful version of the text.

\n", "signature": "(self, context: dict | None = None, simple: bool = False) -> str:", "funcdef": "def"}, "odfdo.Header.level": {"fullname": "odfdo.Header.level", "modulename": "odfdo", "qualname": "Header.level", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Header.restart_numbering": {"fullname": "odfdo.Header.restart_numbering", "modulename": "odfdo", "qualname": "Header.restart_numbering", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Header.start_value": {"fullname": "odfdo.Header.start_value", "modulename": "odfdo", "qualname": "Header.start_value", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Header.suppress_numbering": {"fullname": "odfdo.Header.suppress_numbering", "modulename": "odfdo", "qualname": "Header.suppress_numbering", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.HeaderRows": {"fullname": "odfdo.HeaderRows", "modulename": "odfdo", "qualname": "HeaderRows", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element.Element"}, "odfdo.IndexTitle": {"fullname": "odfdo.IndexTitle", "modulename": "odfdo", "qualname": "IndexTitle", "kind": "class", "doc": "

The \"text:index-title\" element contains the title of an index.

\n\n

The element has the following attributes:\ntext:name, text:protected, text:protection-key,\ntext:protection-key-digest-algorithm, text:style-name, xml:id.

\n\n

The actual title is stored in a child element

\n", "bases": "odfdo.element.Element"}, "odfdo.IndexTitle.__init__": {"fullname": "odfdo.IndexTitle.__init__", "modulename": "odfdo", "qualname": "IndexTitle.__init__", "kind": "function", "doc": "

\n", "signature": "(\tname: str | None = None,\tstyle: str | None = None,\ttitle_text: str | None = None,\ttitle_text_style: str | None = None,\txml_id: str | None = None,\t**kwargs: Any)"}, "odfdo.IndexTitle.set_title_text": {"fullname": "odfdo.IndexTitle.set_title_text", "modulename": "odfdo", "qualname": "IndexTitle.set_title_text", "kind": "function", "doc": "

\n", "signature": "(self, title_text: str, title_text_style: str | None = None) -> None:", "funcdef": "def"}, "odfdo.IndexTitle.name": {"fullname": "odfdo.IndexTitle.name", "modulename": "odfdo", "qualname": "IndexTitle.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.IndexTitle.style": {"fullname": "odfdo.IndexTitle.style", "modulename": "odfdo", "qualname": "IndexTitle.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.IndexTitle.xml_id": {"fullname": "odfdo.IndexTitle.xml_id", "modulename": "odfdo", "qualname": "IndexTitle.xml_id", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.IndexTitle.protected": {"fullname": "odfdo.IndexTitle.protected", "modulename": "odfdo", "qualname": "IndexTitle.protected", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.IndexTitle.protection_key": {"fullname": "odfdo.IndexTitle.protection_key", "modulename": "odfdo", "qualname": "IndexTitle.protection_key", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"fullname": "odfdo.IndexTitle.protection_key_digest_algorithm", "modulename": "odfdo", "qualname": "IndexTitle.protection_key_digest_algorithm", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.IndexTitleTemplate": {"fullname": "odfdo.IndexTitleTemplate", "modulename": "odfdo", "qualname": "IndexTitleTemplate", "kind": "class", "doc": "

ODF \"text:index-title-template\"

\n\n

Arguments:

\n\n
style -- str\n
\n", "bases": "odfdo.element.Element"}, "odfdo.IndexTitleTemplate.__init__": {"fullname": "odfdo.IndexTitleTemplate.__init__", "modulename": "odfdo", "qualname": "IndexTitleTemplate.__init__", "kind": "function", "doc": "

\n", "signature": "(style: str | None = None, **kwargs: Any)"}, "odfdo.IndexTitleTemplate.style": {"fullname": "odfdo.IndexTitleTemplate.style", "modulename": "odfdo", "qualname": "IndexTitleTemplate.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.LAST_CHILD": {"fullname": "odfdo.LAST_CHILD", "modulename": "odfdo", "qualname": "LAST_CHILD", "kind": "variable", "doc": "

\n", "default_value": "1"}, "odfdo.LineBreak": {"fullname": "odfdo.LineBreak", "modulename": "odfdo", "qualname": "LineBreak", "kind": "class", "doc": "

This element represents a line break \"text:line-break\"

\n", "bases": "odfdo.element.Element"}, "odfdo.LineBreak.__init__": {"fullname": "odfdo.LineBreak.__init__", "modulename": "odfdo", "qualname": "LineBreak.__init__", "kind": "function", "doc": "

\n", "signature": "(**kwargs: Any)"}, "odfdo.LineShape": {"fullname": "odfdo.LineShape", "modulename": "odfdo", "qualname": "LineShape", "kind": "class", "doc": "

Create a line shape.

\n\n

Arguments:

\n\n
style -- str\n\ntext_style -- str\n\ndraw_id -- str\n\nlayer -- str\n\np1 -- (str, str)\n\np2 -- (str, str)\n
\n", "bases": "odfdo.shapes.ShapeBase"}, "odfdo.LineShape.__init__": {"fullname": "odfdo.LineShape.__init__", "modulename": "odfdo", "qualname": "LineShape.__init__", "kind": "function", "doc": "

\n", "signature": "(\tstyle: str | None = None,\ttext_style: str | None = None,\tdraw_id: str | None = None,\tlayer: str | None = None,\tp1: tuple | None = None,\tp2: tuple | None = None,\t**kwargs: Any)"}, "odfdo.LineShape.x1": {"fullname": "odfdo.LineShape.x1", "modulename": "odfdo", "qualname": "LineShape.x1", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.LineShape.y1": {"fullname": "odfdo.LineShape.y1", "modulename": "odfdo", "qualname": "LineShape.y1", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.LineShape.x2": {"fullname": "odfdo.LineShape.x2", "modulename": "odfdo", "qualname": "LineShape.x2", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.LineShape.y2": {"fullname": "odfdo.LineShape.y2", "modulename": "odfdo", "qualname": "LineShape.y2", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Link": {"fullname": "odfdo.Link", "modulename": "odfdo", "qualname": "Link", "kind": "class", "doc": "

Link class, \"text:a\" ODF element.

\n", "bases": "odfdo.paragraph_base.ParagraphBase"}, "odfdo.Link.__init__": {"fullname": "odfdo.Link.__init__", "modulename": "odfdo", "qualname": "Link.__init__", "kind": "function", "doc": "

Arguments:

\n\n
url -- str\n\nname -- str\n\ntitle -- str\n\ntext -- str\n\ntarget_frame -- '_self', '_blank', '_parent', '_top'\n\nstyle -- str\n\nvisited_style -- str\n
\n", "signature": "(\turl: str | None = '',\tname: str | None = None,\ttitle: str | None = None,\ttext: str | None = None,\ttarget_frame: str | None = None,\tstyle: str | None = None,\tvisited_style: str | None = None,\t**kwargs: Any)"}, "odfdo.Link.url": {"fullname": "odfdo.Link.url", "modulename": "odfdo", "qualname": "Link.url", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Link.name": {"fullname": "odfdo.Link.name", "modulename": "odfdo", "qualname": "Link.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Link.title": {"fullname": "odfdo.Link.title", "modulename": "odfdo", "qualname": "Link.title", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Link.target_frame": {"fullname": "odfdo.Link.target_frame", "modulename": "odfdo", "qualname": "Link.target_frame", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Link.show": {"fullname": "odfdo.Link.show", "modulename": "odfdo", "qualname": "Link.show", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Link.visited_style": {"fullname": "odfdo.Link.visited_style", "modulename": "odfdo", "qualname": "Link.visited_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Link.style": {"fullname": "odfdo.Link.style", "modulename": "odfdo", "qualname": "Link.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.List": {"fullname": "odfdo.List", "modulename": "odfdo", "qualname": "List", "kind": "class", "doc": "

ODF List \"text:list\".

\n", "bases": "odfdo.element.Element"}, "odfdo.List.__init__": {"fullname": "odfdo.List.__init__", "modulename": "odfdo", "qualname": "List.__init__", "kind": "function", "doc": "

Create a list element, optionaly loading the list by a list of\nitem (str or elements).

\n\n

The list_content argument is just a shortcut for the most common case.\nTo create more complex lists, first create an empty list, and fill it\nafterwards.

\n\n

Arguments:

\n\n
list_content -- str or Element, or a list of str or Element\n\nstyle -- str\n
\n", "signature": "(\tlist_content: str | odfdo.element.Element | collections.abc.Iterable[str | odfdo.element.Element] | None = None,\tstyle: str | None = None,\t**kwargs: Any)"}, "odfdo.List.get_items": {"fullname": "odfdo.List.get_items", "modulename": "odfdo", "qualname": "List.get_items", "kind": "function", "doc": "

Return all the list items that match the criteria.

\n\n

Arguments:

\n\n
style -- str\n\ncontent -- str regex\n
\n\n

Return: list of Element

\n", "signature": "(self, content: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.List.get_item": {"fullname": "odfdo.List.get_item", "modulename": "odfdo", "qualname": "List.get_item", "kind": "function", "doc": "

Return the list item that matches the criteria. In nested lists,\nreturn the list item that really contains that content.

\n\n

Arguments:

\n\n
position -- int\n\ncontent -- str regex\n
\n\n

Return: Element or None if not found

\n", "signature": "(\tself,\tposition: int = 0,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.List.set_list_header": {"fullname": "odfdo.List.set_list_header", "modulename": "odfdo", "qualname": "List.set_list_header", "kind": "function", "doc": "

\n", "signature": "(\tself,\ttext_or_element: str | odfdo.element.Element | collections.abc.Iterable[str | odfdo.element.Element]) -> None:", "funcdef": "def"}, "odfdo.List.insert_item": {"fullname": "odfdo.List.insert_item", "modulename": "odfdo", "qualname": "List.insert_item", "kind": "function", "doc": "

\n", "signature": "(\tself,\titem: odfdo.list.ListItem | str | odfdo.element.Element | None,\tposition: int | None = None,\tbefore: odfdo.element.Element | None = None,\tafter: odfdo.element.Element | None = None) -> None:", "funcdef": "def"}, "odfdo.List.append_item": {"fullname": "odfdo.List.append_item", "modulename": "odfdo", "qualname": "List.append_item", "kind": "function", "doc": "

\n", "signature": "(\tself,\titem: odfdo.list.ListItem | str | odfdo.element.Element | None) -> None:", "funcdef": "def"}, "odfdo.List.get_formatted_text": {"fullname": "odfdo.List.get_formatted_text", "modulename": "odfdo", "qualname": "List.get_formatted_text", "kind": "function", "doc": "

This function should return a beautiful version of the text.

\n", "signature": "(self, context: dict | None = None) -> str:", "funcdef": "def"}, "odfdo.List.style": {"fullname": "odfdo.List.style", "modulename": "odfdo", "qualname": "List.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.ListItem": {"fullname": "odfdo.ListItem", "modulename": "odfdo", "qualname": "ListItem", "kind": "class", "doc": "

ODF element \"text:list-item\", item of a List.

\n", "bases": "odfdo.element.Element"}, "odfdo.ListItem.__init__": {"fullname": "odfdo.ListItem.__init__", "modulename": "odfdo", "qualname": "ListItem.__init__", "kind": "function", "doc": "

Create a list item element, optionaly passing at creation time a\nstring or Element as content.

\n\n

Arguments:

\n\n
text_or_element -- str or ODF Element\n
\n", "signature": "(\ttext_or_element: str | odfdo.element.Element | None = None,\t**kwargs: Any)"}, "odfdo.Manifest": {"fullname": "odfdo.Manifest", "modulename": "odfdo", "qualname": "Manifest", "kind": "class", "doc": "

Representation of an XML part.

\n\n

Abstraction of the XML library behind.

\n", "bases": "odfdo.xmlpart.XmlPart"}, "odfdo.Manifest.get_paths": {"fullname": "odfdo.Manifest.get_paths", "modulename": "odfdo", "qualname": "Manifest.get_paths", "kind": "function", "doc": "

Return the list of full paths in the manifest.

\n\n

Return: list of str

\n", "signature": "(self) -> list[odfdo.element.Element | odfdo.element.Text]:", "funcdef": "def"}, "odfdo.Manifest.get_path_medias": {"fullname": "odfdo.Manifest.get_path_medias", "modulename": "odfdo", "qualname": "Manifest.get_path_medias", "kind": "function", "doc": "

Return the list of (full_path, media_type) pairs in the manifest.

\n\n

Return: list of str tuples

\n", "signature": "(self) -> list[tuple]:", "funcdef": "def"}, "odfdo.Manifest.get_media_type": {"fullname": "odfdo.Manifest.get_media_type", "modulename": "odfdo", "qualname": "Manifest.get_media_type", "kind": "function", "doc": "

Get the media type of an existing path.

\n\n

Return: str

\n", "signature": "(self, full_path: str) -> str | None:", "funcdef": "def"}, "odfdo.Manifest.set_media_type": {"fullname": "odfdo.Manifest.set_media_type", "modulename": "odfdo", "qualname": "Manifest.set_media_type", "kind": "function", "doc": "

Set the media type of an existing path.

\n\n

Arguments:

\n\n
full_path -- str\n\nmedia_type -- str\n
\n", "signature": "(self, full_path: str, media_type: str) -> None:", "funcdef": "def"}, "odfdo.Manifest.make_file_entry": {"fullname": "odfdo.Manifest.make_file_entry", "modulename": "odfdo", "qualname": "Manifest.make_file_entry", "kind": "function", "doc": "

\n", "signature": "(full_path: str, media_type: str) -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.Manifest.add_full_path": {"fullname": "odfdo.Manifest.add_full_path", "modulename": "odfdo", "qualname": "Manifest.add_full_path", "kind": "function", "doc": "

\n", "signature": "(self, full_path: str, media_type: str = '') -> None:", "funcdef": "def"}, "odfdo.Manifest.del_full_path": {"fullname": "odfdo.Manifest.del_full_path", "modulename": "odfdo", "qualname": "Manifest.del_full_path", "kind": "function", "doc": "

\n", "signature": "(self, full_path: str) -> None:", "funcdef": "def"}, "odfdo.Meta": {"fullname": "odfdo.Meta", "modulename": "odfdo", "qualname": "Meta", "kind": "class", "doc": "

Representation of an XML part.

\n\n

Abstraction of the XML library behind.

\n", "bases": "odfdo.xmlpart.XmlPart"}, "odfdo.Meta.__init__": {"fullname": "odfdo.Meta.__init__", "modulename": "odfdo", "qualname": "Meta.__init__", "kind": "function", "doc": "

\n", "signature": "(*args: Any, **kwargs: Any)"}, "odfdo.Meta.get_meta_body": {"fullname": "odfdo.Meta.get_meta_body", "modulename": "odfdo", "qualname": "Meta.get_meta_body", "kind": "function", "doc": "

\n", "signature": "(self) -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.Meta.get_title": {"fullname": "odfdo.Meta.get_title", "modulename": "odfdo", "qualname": "Meta.get_title", "kind": "function", "doc": "

Get the title of the document.

\n\n

This is not the first heading but the title metadata.

\n\n

Return: str (or None if inexistant)

\n", "signature": "(self) -> str | None:", "funcdef": "def"}, "odfdo.Meta.set_title": {"fullname": "odfdo.Meta.set_title", "modulename": "odfdo", "qualname": "Meta.set_title", "kind": "function", "doc": "

Set the title of the document.

\n\n

This is not the first heading but the title metadata.

\n\n

Arguments:

\n\n
title -- str\n
\n", "signature": "(self, title: str) -> None:", "funcdef": "def"}, "odfdo.Meta.get_description": {"fullname": "odfdo.Meta.get_description", "modulename": "odfdo", "qualname": "Meta.get_description", "kind": "function", "doc": "

Get the description of the document. Also known as comments.

\n\n

Return: str (or None if inexistant)

\n", "signature": "(self) -> str | None:", "funcdef": "def"}, "odfdo.Meta.get_comments": {"fullname": "odfdo.Meta.get_comments", "modulename": "odfdo", "qualname": "Meta.get_comments", "kind": "function", "doc": "

Get the description of the document. Also known as comments.

\n\n

Return: str (or None if inexistant)

\n", "signature": "(self) -> str | None:", "funcdef": "def"}, "odfdo.Meta.set_description": {"fullname": "odfdo.Meta.set_description", "modulename": "odfdo", "qualname": "Meta.set_description", "kind": "function", "doc": "

Set the description of the document. Also known as comments.

\n\n

Arguments:

\n\n
description -- str\n
\n", "signature": "(self, description: str) -> None:", "funcdef": "def"}, "odfdo.Meta.set_comments": {"fullname": "odfdo.Meta.set_comments", "modulename": "odfdo", "qualname": "Meta.set_comments", "kind": "function", "doc": "

Set the description of the document. Also known as comments.

\n\n

Arguments:

\n\n
description -- str\n
\n", "signature": "(self, description: str) -> None:", "funcdef": "def"}, "odfdo.Meta.get_subject": {"fullname": "odfdo.Meta.get_subject", "modulename": "odfdo", "qualname": "Meta.get_subject", "kind": "function", "doc": "

Get the subject of the document.

\n\n

Return: str (or None if inexistant)

\n", "signature": "(self) -> str | None:", "funcdef": "def"}, "odfdo.Meta.set_subject": {"fullname": "odfdo.Meta.set_subject", "modulename": "odfdo", "qualname": "Meta.set_subject", "kind": "function", "doc": "

Set the subject of the document.

\n\n

Arguments:

\n\n
subject -- str\n
\n", "signature": "(self, subject: str) -> None:", "funcdef": "def"}, "odfdo.Meta.get_language": {"fullname": "odfdo.Meta.get_language", "modulename": "odfdo", "qualname": "Meta.get_language", "kind": "function", "doc": "

Get the language code of the document.

\n\n

Return: str (or None if inexistant)

\n\n

Example::

\n\n
>>> document.meta.get_language()\nfr-FR\n
\n", "signature": "(self) -> str | None:", "funcdef": "def"}, "odfdo.Meta.set_language": {"fullname": "odfdo.Meta.set_language", "modulename": "odfdo", "qualname": "Meta.set_language", "kind": "function", "doc": "

Set the language code of the document.

\n\n

Arguments:

\n\n
language -- str\n
\n\n

Example::

\n\n
>>> document.meta.set_language('fr-FR')\n
\n", "signature": "(self, language: str) -> None:", "funcdef": "def"}, "odfdo.Meta.get_modification_date": {"fullname": "odfdo.Meta.get_modification_date", "modulename": "odfdo", "qualname": "Meta.get_modification_date", "kind": "function", "doc": "

Get the last modified date of the document.

\n\n

Return: datetime (or None if inexistant)

\n", "signature": "(self) -> datetime.datetime | None:", "funcdef": "def"}, "odfdo.Meta.set_modification_date": {"fullname": "odfdo.Meta.set_modification_date", "modulename": "odfdo", "qualname": "Meta.set_modification_date", "kind": "function", "doc": "

Set the last modified date of the document.

\n\n

Arguments:

\n\n
date -- datetime\n
\n", "signature": "(self, date: datetime.datetime) -> None:", "funcdef": "def"}, "odfdo.Meta.get_creation_date": {"fullname": "odfdo.Meta.get_creation_date", "modulename": "odfdo", "qualname": "Meta.get_creation_date", "kind": "function", "doc": "

Get the creation date of the document.

\n\n

Return: datetime (or None if inexistant)

\n", "signature": "(self) -> datetime.datetime | None:", "funcdef": "def"}, "odfdo.Meta.set_creation_date": {"fullname": "odfdo.Meta.set_creation_date", "modulename": "odfdo", "qualname": "Meta.set_creation_date", "kind": "function", "doc": "

Set the creation date of the document.

\n\n

Arguments:

\n\n
date -- datetime\n
\n", "signature": "(self, date: datetime.datetime) -> None:", "funcdef": "def"}, "odfdo.Meta.get_initial_creator": {"fullname": "odfdo.Meta.get_initial_creator", "modulename": "odfdo", "qualname": "Meta.get_initial_creator", "kind": "function", "doc": "

Get the first creator of the document.

\n\n

Return: str (or None if inexistant)

\n\n

Example::

\n\n
>>> document.meta.get_initial_creator()\nUnknown\n
\n", "signature": "(self) -> str | None:", "funcdef": "def"}, "odfdo.Meta.set_initial_creator": {"fullname": "odfdo.Meta.set_initial_creator", "modulename": "odfdo", "qualname": "Meta.set_initial_creator", "kind": "function", "doc": "

Set the first creator of the document.

\n\n

Arguments:

\n\n
creator -- str\n
\n\n

Example::

\n\n
>>> document.meta.set_initial_creator(\"Plato\")\n
\n", "signature": "(self, creator: str) -> None:", "funcdef": "def"}, "odfdo.Meta.get_creator": {"fullname": "odfdo.Meta.get_creator", "modulename": "odfdo", "qualname": "Meta.get_creator", "kind": "function", "doc": "

Get the creator of the document.

\n\n

Return: str (or None if inexistant)

\n\n

Example::

\n\n
>>> document.meta.get_creator()\nUnknown\n
\n", "signature": "(self) -> str | None:", "funcdef": "def"}, "odfdo.Meta.set_creator": {"fullname": "odfdo.Meta.set_creator", "modulename": "odfdo", "qualname": "Meta.set_creator", "kind": "function", "doc": "

Set the creator of the document.

\n\n

Arguments:

\n\n
creator -- str\n
\n\n

Example::

\n\n
>>> document.meta.set_creator(\"Plato\")\n
\n", "signature": "(self, creator: str) -> None:", "funcdef": "def"}, "odfdo.Meta.get_keywords": {"fullname": "odfdo.Meta.get_keywords", "modulename": "odfdo", "qualname": "Meta.get_keywords", "kind": "function", "doc": "

Get the keywords of the document. Return the field as-is, without\nany assumption on the keyword separator.

\n\n

Return: str (or None if inexistant)

\n", "signature": "(self) -> str | None:", "funcdef": "def"}, "odfdo.Meta.set_keywords": {"fullname": "odfdo.Meta.set_keywords", "modulename": "odfdo", "qualname": "Meta.set_keywords", "kind": "function", "doc": "

Set the keywords of the document. Although the name is plural, a\nstr string is required, so join your list first.

\n\n

Arguments:

\n\n
keywords -- str\n
\n", "signature": "(self, keywords: str) -> None:", "funcdef": "def"}, "odfdo.Meta.get_editing_duration": {"fullname": "odfdo.Meta.get_editing_duration", "modulename": "odfdo", "qualname": "Meta.get_editing_duration", "kind": "function", "doc": "

Get the time the document was edited, as reported by the\ngenerator.

\n\n

Return: timedelta (or None if inexistant)

\n", "signature": "(self) -> datetime.timedelta | None:", "funcdef": "def"}, "odfdo.Meta.set_editing_duration": {"fullname": "odfdo.Meta.set_editing_duration", "modulename": "odfdo", "qualname": "Meta.set_editing_duration", "kind": "function", "doc": "

Set the time the document was edited.

\n\n

Arguments:

\n\n
duration -- timedelta\n
\n", "signature": "(self, duration: datetime.timedelta) -> None:", "funcdef": "def"}, "odfdo.Meta.get_editing_cycles": {"fullname": "odfdo.Meta.get_editing_cycles", "modulename": "odfdo", "qualname": "Meta.get_editing_cycles", "kind": "function", "doc": "

Get the number of times the document was edited, as reported by\nthe generator.

\n\n

Return: int (or None if inexistant)

\n", "signature": "(self) -> int | None:", "funcdef": "def"}, "odfdo.Meta.set_editing_cycles": {"fullname": "odfdo.Meta.set_editing_cycles", "modulename": "odfdo", "qualname": "Meta.set_editing_cycles", "kind": "function", "doc": "

Set the number of times the document was edited.

\n\n

Arguments:

\n\n
cycles -- int\n
\n", "signature": "(self, cycles: int) -> None:", "funcdef": "def"}, "odfdo.Meta.get_generator": {"fullname": "odfdo.Meta.get_generator", "modulename": "odfdo", "qualname": "Meta.get_generator", "kind": "function", "doc": "

Get the signature of the software that generated this document.

\n\n

Return: str (or None if inexistant)

\n\n

Example::

\n\n
>>> document.meta.get_generator()\nKOffice/2.0.0\n
\n", "signature": "(self) -> str | None:", "funcdef": "def"}, "odfdo.Meta.set_generator": {"fullname": "odfdo.Meta.set_generator", "modulename": "odfdo", "qualname": "Meta.set_generator", "kind": "function", "doc": "

Set the signature of the software that generated this document.

\n\n

Arguments:

\n\n
generator -- str\n
\n\n

Example::

\n\n
>>> document.meta.set_generator(\"Odfdo experiment\")\n
\n", "signature": "(self, generator: str) -> None:", "funcdef": "def"}, "odfdo.Meta.set_generator_default": {"fullname": "odfdo.Meta.set_generator_default", "modulename": "odfdo", "qualname": "Meta.set_generator_default", "kind": "function", "doc": "

Set the signature of the software that generated this document\nto ourself.

\n\n

Example::

\n\n
>>> document.meta.set_generator_default()\n
\n", "signature": "(self) -> None:", "funcdef": "def"}, "odfdo.Meta.get_statistic": {"fullname": "odfdo.Meta.get_statistic", "modulename": "odfdo", "qualname": "Meta.get_statistic", "kind": "function", "doc": "

Get the statistic from the software that generated this document.

\n\n

Return: dict (or None if inexistant)

\n\n

Example::

\n\n
>>> document.get_statistic():\n{'meta:table-count': 1,\n 'meta:image-count': 2,\n 'meta:object-count': 3,\n 'meta:page-count': 4,\n 'meta:paragraph-count': 5,\n 'meta:word-count': 6,\n 'meta:character-count': 7}\n
\n", "signature": "(self) -> dict[str, int] | None:", "funcdef": "def"}, "odfdo.Meta.set_statistic": {"fullname": "odfdo.Meta.set_statistic", "modulename": "odfdo", "qualname": "Meta.set_statistic", "kind": "function", "doc": "

Set the statistic for the documents: number of words, paragraphs,\netc.

\n\n

Arguments:

\n\n
statistic -- dict\n
\n\n

Example::

\n\n
>>> statistic = {'meta:table-count': 1,\n                 'meta:image-count': 2,\n                 'meta:object-count': 3,\n                 'meta:page-count': 4,\n                 'meta:paragraph-count': 5,\n                 'meta:word-count': 6,\n                 'meta:character-count': 7}\n>>> document.meta.set_statistic(statistic)\n
\n", "signature": "(self, statistic: dict[str, int]) -> None:", "funcdef": "def"}, "odfdo.Meta.get_user_defined_metadata": {"fullname": "odfdo.Meta.get_user_defined_metadata", "modulename": "odfdo", "qualname": "Meta.get_user_defined_metadata", "kind": "function", "doc": "

Return a dict of str/value mapping.

\n\n

Value types can be: Decimal, date, time, boolean or str.

\n", "signature": "(self) -> dict[str, typing.Any]:", "funcdef": "def"}, "odfdo.Meta.get_user_defined_metadata_of_name": {"fullname": "odfdo.Meta.get_user_defined_metadata_of_name", "modulename": "odfdo", "qualname": "Meta.get_user_defined_metadata_of_name", "kind": "function", "doc": "

Return the content of the user defined metadata of that name.\nReturn None if no name matchs or a dic of fields.

\n\n

Arguments:

\n\n
name -- string, name (meta:name content)\n
\n", "signature": "(self, keyname: str) -> dict[str, typing.Any] | None:", "funcdef": "def"}, "odfdo.Meta.set_user_defined_metadata": {"fullname": "odfdo.Meta.set_user_defined_metadata", "modulename": "odfdo", "qualname": "Meta.set_user_defined_metadata", "kind": "function", "doc": "

\n", "signature": "(self, name: str, value: Any) -> None:", "funcdef": "def"}, "odfdo.NEXT_SIBLING": {"fullname": "odfdo.NEXT_SIBLING", "modulename": "odfdo", "qualname": "NEXT_SIBLING", "kind": "variable", "doc": "

\n", "default_value": "2"}, "odfdo.NamedRange": {"fullname": "odfdo.NamedRange", "modulename": "odfdo", "qualname": "NamedRange", "kind": "class", "doc": "

ODF Named Range \"table:named-range\". Identifies inside the spreadsheet\na range of cells of a table by a name and the name of the table.

\n\n

Name Ranges have the following attributes:

\n\n
name -- name of the named range\n\ntable_name -- name of the table\n\nstart -- first cell of the named range, tuple (x, y)\n\nend -- last cell of the named range, tuple (x, y)\n\ncrange -- range of the named range, tuple (x, y, z, t)\n\nusage -- None or str, usage of the named range.\n
\n", "bases": "odfdo.element.Element"}, "odfdo.NamedRange.__init__": {"fullname": "odfdo.NamedRange.__init__", "modulename": "odfdo", "qualname": "NamedRange.__init__", "kind": "function", "doc": "

Create a Named Range element. 'name' must contains only letters, digits\n and '_', and must not be like a coordinate as 'A1'. 'table_name' must be\n a correct table name (no \"'\" or \"/\" in it).

\n\n

Arguments:

\n\n
 name -- str, name of the named range\n\n crange -- str or tuple of int, cell or area coordinate\n\n table_name -- str, name of the table\n\n usage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'\n
\n", "signature": "(\tname: str | None = None,\tcrange: str | tuple | list | None = None,\ttable_name: str | None = None,\tusage: str | None = None,\t**kwargs: Any)"}, "odfdo.NamedRange.usage": {"fullname": "odfdo.NamedRange.usage", "modulename": "odfdo", "qualname": "NamedRange.usage", "kind": "variable", "doc": "

\n"}, "odfdo.NamedRange.table_name": {"fullname": "odfdo.NamedRange.table_name", "modulename": "odfdo", "qualname": "NamedRange.table_name", "kind": "variable", "doc": "

\n"}, "odfdo.NamedRange.set_usage": {"fullname": "odfdo.NamedRange.set_usage", "modulename": "odfdo", "qualname": "NamedRange.set_usage", "kind": "function", "doc": "

Set the usage of the Named Range. Usage can be None (default) or one\nof :\n 'print-range'\n 'filter'\n 'repeat-column'\n 'repeat-row'

\n\n

Arguments:

\n\n
usage -- None or str\n
\n", "signature": "(self, usage: str | None = None) -> None:", "funcdef": "def"}, "odfdo.NamedRange.name": {"fullname": "odfdo.NamedRange.name", "modulename": "odfdo", "qualname": "NamedRange.name", "kind": "variable", "doc": "

Get / set the name of the table.

\n", "annotation": ": str | None"}, "odfdo.NamedRange.set_table_name": {"fullname": "odfdo.NamedRange.set_table_name", "modulename": "odfdo", "qualname": "NamedRange.set_table_name", "kind": "function", "doc": "

Set the name of the table of the Named Range. The name is mandatory.

\n\n

Arguments:

\n\n
name -- str\n
\n", "signature": "(self, name: str) -> None:", "funcdef": "def"}, "odfdo.NamedRange.set_range": {"fullname": "odfdo.NamedRange.set_range", "modulename": "odfdo", "qualname": "NamedRange.set_range", "kind": "function", "doc": "

Set the range of the named range. Range can be either one cell\n(like 'A1') or an area ('A1:B2'). It can be provided as an alpha numeric\nvalue like \"A1:B2' or a tuple like (0, 0, 1, 1) or (0, 0).

\n\n

Arguments:

\n\n
crange -- str or tuple of int, cell or area coordinate\n
\n", "signature": "(self, crange: str | tuple | list) -> None:", "funcdef": "def"}, "odfdo.NamedRange.get_values": {"fullname": "odfdo.NamedRange.get_values", "modulename": "odfdo", "qualname": "NamedRange.get_values", "kind": "function", "doc": "

Shortcut to retrieve the values of the cells of the named range. See\ntable.get_values() for the arguments description and return format.

\n", "signature": "(\tself,\tcell_type: str | None = None,\tcomplete: bool = True,\tget_type: bool = False,\tflat: bool = False) -> list:", "funcdef": "def"}, "odfdo.NamedRange.get_value": {"fullname": "odfdo.NamedRange.get_value", "modulename": "odfdo", "qualname": "NamedRange.get_value", "kind": "function", "doc": "

Shortcut to retrieve the value of the first cell of the named range.\nSee table.get_value() for the arguments description and return format.

\n", "signature": "(self, get_type: bool = False) -> Any:", "funcdef": "def"}, "odfdo.NamedRange.set_values": {"fullname": "odfdo.NamedRange.set_values", "modulename": "odfdo", "qualname": "NamedRange.set_values", "kind": "function", "doc": "

Shortcut to set the values of the cells of the named range.\nSee table.set_values() for the arguments description.

\n", "signature": "(\tself,\tvalues: list,\tstyle: str | None = None,\tcell_type: str | None = None,\tcurrency: str | None = None) -> None:", "funcdef": "def"}, "odfdo.NamedRange.set_value": {"fullname": "odfdo.NamedRange.set_value", "modulename": "odfdo", "qualname": "NamedRange.set_value", "kind": "function", "doc": "

Shortcut to set the value of the first cell of the named range.\nSee table.set_value() for the arguments description.

\n", "signature": "(\tself,\tvalue: Any,\tcell_type: str | None = None,\tcurrency: str | None = None,\tstyle: str | None = None) -> None:", "funcdef": "def"}, "odfdo.Note": {"fullname": "odfdo.Note", "modulename": "odfdo", "qualname": "Note", "kind": "class", "doc": "

Either a footnote or a endnote element with the given text,\noptionally referencing it using the given note_id.

\n\n

Arguments:

\n\n
note_class -- 'footnote' or 'endnote'\n\nnote_id -- str\n\ncitation -- str\n\nbody -- str or Element\n
\n", "bases": "odfdo.element.Element"}, "odfdo.Note.__init__": {"fullname": "odfdo.Note.__init__", "modulename": "odfdo", "qualname": "Note.__init__", "kind": "function", "doc": "

\n", "signature": "(\tnote_class: str = 'footnote',\tnote_id: str | None = None,\tcitation: str | None = None,\tbody: str | None = None,\t**kwargs: Any)"}, "odfdo.Note.citation": {"fullname": "odfdo.Note.citation", "modulename": "odfdo", "qualname": "Note.citation", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "odfdo.Note.note_body": {"fullname": "odfdo.Note.note_body", "modulename": "odfdo", "qualname": "Note.note_body", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "odfdo.Note.check_validity": {"fullname": "odfdo.Note.check_validity", "modulename": "odfdo", "qualname": "Note.check_validity", "kind": "function", "doc": "

\n", "signature": "(self) -> None:", "funcdef": "def"}, "odfdo.Note.note_class": {"fullname": "odfdo.Note.note_class", "modulename": "odfdo", "qualname": "Note.note_class", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Note.note_id": {"fullname": "odfdo.Note.note_id", "modulename": "odfdo", "qualname": "Note.note_id", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.PREV_SIBLING": {"fullname": "odfdo.PREV_SIBLING", "modulename": "odfdo", "qualname": "PREV_SIBLING", "kind": "variable", "doc": "

\n", "default_value": "3"}, "odfdo.Paragraph": {"fullname": "odfdo.Paragraph", "modulename": "odfdo", "qualname": "Paragraph", "kind": "class", "doc": "

Specialised element for paragraphs \"text:p\". The \"text:p\" element\nrepresents a paragraph, which is the basic unit of text in an OpenDocument\nfile.

\n", "bases": "odfdo.paragraph_base.ParagraphBase"}, "odfdo.Paragraph.__init__": {"fullname": "odfdo.Paragraph.__init__", "modulename": "odfdo", "qualname": "Paragraph.__init__", "kind": "function", "doc": "

Create a paragraph element of the given style containing the optional\ngiven text.

\n\n

Arguments:

\n\n
text -- str or Element\n\nstyle -- str\n
\n", "signature": "(\ttext_or_element: str | odfdo.element.Element | None = None,\tstyle: str | None = None,\t**kwargs: Any)"}, "odfdo.Paragraph.insert_note": {"fullname": "odfdo.Paragraph.insert_note", "modulename": "odfdo", "qualname": "Paragraph.insert_note", "kind": "function", "doc": "

\n", "signature": "(\tself,\tnote_element: odfdo.note.Note | None = None,\tafter: str | odfdo.element.Element | None = None,\tnote_class: str = 'footnote',\tnote_id: str | None = None,\tcitation: str | None = None,\tbody: str | None = None) -> None:", "funcdef": "def"}, "odfdo.Paragraph.insert_annotation": {"fullname": "odfdo.Paragraph.insert_annotation", "modulename": "odfdo", "qualname": "Paragraph.insert_annotation", "kind": "function", "doc": "

Insert an annotation, at the position defined by the regex (before,\nafter, content) or by positionnal argument (position). If content is\nprovided, the annotation covers the full content regex. Else, the\nannotation is positionned either 'before' or 'after' provided regex.

\n\n

If content is an odf element (ie: paragraph, span, ...), the full inner\ncontent is covered by the annotation (of the position just after if\ncontent is a single empty tag).

\n\n

If content/before or after exists (regex) and return a group of matching\npositions, the position value is the index of matching place to use.

\n\n

annotation_element can contain a previously created annotation, else\nthe annotation is created from the body, creator and optional date\n(current date by default).

\n\n

Arguments:

\n\n
annotation_element -- Annotation or None\n\nbefore -- str regular expression or None\n\nafter -- str regular expression or Element or None\n\ncontent -- str regular expression or None, or Element\n\nposition -- int or tuple of int\n\nbody -- str or Element\n\ncreator -- str\n\ndate -- datetime\n
\n", "signature": "(\tself,\tannotation_element: odfdo.note.Annotation | None = None,\tbefore: str | None = None,\tafter: str | odfdo.element.Element | None = None,\tposition: int | tuple = 0,\tcontent: str | odfdo.element.Element | None = None,\tbody: str | None = None,\tcreator: str | None = None,\tdate: datetime.datetime | None = None) -> odfdo.note.Annotation:", "funcdef": "def"}, "odfdo.Paragraph.insert_annotation_end": {"fullname": "odfdo.Paragraph.insert_annotation_end", "modulename": "odfdo", "qualname": "Paragraph.insert_annotation_end", "kind": "function", "doc": "

Insert an annotation end tag for an existing annotation. If some end\ntag already exists, replace it. Annotation end tag is set at the\nposition defined by the regex (before or after).

\n\n

If content/before or after (regex) returns a group of matching\npositions, the position value is the index of matching place to use.

\n\n

Arguments:

\n\n
annotation_element -- Annotation (mandatory)\n\nbefore -- str regular expression or None\n\nafter -- str regular expression or None\n\nposition -- int\n
\n", "signature": "(\tself,\tannotation_element: odfdo.note.Annotation,\tbefore: str | None = None,\tafter: str | None = None,\tposition: int = 0) -> odfdo.note.AnnotationEnd:", "funcdef": "def"}, "odfdo.Paragraph.set_reference_mark": {"fullname": "odfdo.Paragraph.set_reference_mark", "modulename": "odfdo", "qualname": "Paragraph.set_reference_mark", "kind": "function", "doc": "

Insert a reference mark, at the position defined by the regex\n(before, after, content) or by positionnal argument (position). If\ncontent is provided, the annotation covers the full range content regex\n(instances of ReferenceMarkStart and ReferenceMarkEnd are\ncreated). Else, an instance of ReferenceMark is positionned either\n'before' or 'after' provided regex.

\n\n

If content is an ODF Element (ie: Paragraph, Span, ...), the full inner\ncontent is referenced (of the position just after if content is a single\nempty tag).

\n\n

If content/before or after exists (regex) and return a group of matching\npositions, the position value is the index of matching place to use.

\n\n

Name is mandatory and shall be unique in the document for the preference\nmark range.

\n\n

Arguments:

\n\n
name -- str\n\nbefore -- str regular expression or None\n\nafter -- str regular expression or None,\n\ncontent -- str regular expression or None, or Element\n\nposition -- int or tuple of int\n
\n\n

Return: the created ReferenceMark or ReferenceMarkStart

\n", "signature": "(\tself,\tname: str,\tbefore: str | None = None,\tafter: str | None = None,\tposition: int = 0,\tcontent: str | odfdo.element.Element | None = None) -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.Paragraph.set_reference_mark_end": {"fullname": "odfdo.Paragraph.set_reference_mark_end", "modulename": "odfdo", "qualname": "Paragraph.set_reference_mark_end", "kind": "function", "doc": "

Insert/move a ReferenceMarkEnd for an existing reference mark. If\nsome end tag already exists, replace it. Reference tag is set at the\nposition defined by the regex (before or after).

\n\n

If content/before or after (regex) returns a group of matching\npositions, the position value is the index of matching place to use.

\n\n

Arguments:

\n\n
reference_mark -- ReferenceMark or ReferenceMarkStart (mandatory)\n\nbefore -- str regular expression or None\n\nafter -- str regular expression or None\n\nposition -- int\n
\n", "signature": "(\tself,\treference_mark: odfdo.element.Element,\tbefore: str | None = None,\tafter: str | None = None,\tposition: int = 0) -> odfdo.reference.ReferenceMarkEnd:", "funcdef": "def"}, "odfdo.Paragraph.insert_variable": {"fullname": "odfdo.Paragraph.insert_variable", "modulename": "odfdo", "qualname": "Paragraph.insert_variable", "kind": "function", "doc": "

\n", "signature": "(self, variable_element: odfdo.element.Element, after: str | None) -> None:", "funcdef": "def"}, "odfdo.Paragraph.set_span": {"fullname": "odfdo.Paragraph.set_span", "modulename": "odfdo", "qualname": "Paragraph.set_span", "kind": "function", "doc": "

set_span(style, regex=None, offset=None, length=0)\nApply the given style to text content matching the regex OR the\npositional arguments offset and length.

\n\n

(match, tail: provided by regex decorator)

\n\n

Arguments:

\n\n
style -- str\n\nregex -- str regular expression\n\noffset -- int\n\nlength -- int\n
\n", "signature": "(\tself,\tmatch: str,\ttail: str,\tstyle: str,\tregex: str | None = None,\toffset: int | None = None,\tlength: int = 0) -> odfdo.paragraph.Span:", "funcdef": "def"}, "odfdo.Paragraph.remove_spans": {"fullname": "odfdo.Paragraph.remove_spans", "modulename": "odfdo", "qualname": "Paragraph.remove_spans", "kind": "function", "doc": "

Send back a copy of the element, without span styles.\nIf keep_heading is True (default), the first level heading style is left\nunchanged.

\n", "signature": "(self, keep_heading: bool = True) -> odfdo.element.Element | list:", "funcdef": "def"}, "odfdo.Paragraph.remove_span": {"fullname": "odfdo.Paragraph.remove_span", "modulename": "odfdo", "qualname": "Paragraph.remove_span", "kind": "function", "doc": "

Send back a copy of the element, the spans (not a clone) removed.

\n\n

Arguments:

\n\n
spans -- Element or list of Element\n
\n", "signature": "(\tself,\tspans: odfdo.element.Element | list[odfdo.element.Element]) -> odfdo.element.Element | list:", "funcdef": "def"}, "odfdo.Paragraph.set_link": {"fullname": "odfdo.Paragraph.set_link", "modulename": "odfdo", "qualname": "Paragraph.set_link", "kind": "function", "doc": "

set_link(url, regex=None, offset=None, length=0)\nMake a link to the provided url from text content matching the regex\nOR the positional arguments offset and length.

\n\n

(match, tail: provided by regex decorator)

\n\n

Arguments:

\n\n
url -- str\n\nregex -- str regular expression\n\noffset -- int\n\nlength -- int\n
\n", "signature": "(\tself,\tmatch: str,\ttail: str,\turl: str,\tregex: str | None = None,\toffset: int | None = None,\tlength: int = 0) -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.Paragraph.remove_links": {"fullname": "odfdo.Paragraph.remove_links", "modulename": "odfdo", "qualname": "Paragraph.remove_links", "kind": "function", "doc": "

Send back a copy of the element, without links tags.

\n", "signature": "(self) -> odfdo.element.Element | list:", "funcdef": "def"}, "odfdo.Paragraph.remove_link": {"fullname": "odfdo.Paragraph.remove_link", "modulename": "odfdo", "qualname": "Paragraph.remove_link", "kind": "function", "doc": "

Send back a copy of the element (not a clone), with the sub links\n removed.

\n\n

Arguments:

\n\n
links -- Link or list of Link\n
\n", "signature": "(\tself,\tlinks: odfdo.link.Link | list[odfdo.link.Link]) -> odfdo.element.Element | list:", "funcdef": "def"}, "odfdo.Paragraph.insert_reference": {"fullname": "odfdo.Paragraph.insert_reference", "modulename": "odfdo", "qualname": "Paragraph.insert_reference", "kind": "function", "doc": "

Create and insert a reference to a content marked by a reference\nmark. The Reference element (\"text:reference-ref\") represents a\nfield that references a \"text:reference-mark-start\" or\n\"text:reference-mark\" element. Its \"text:reference-format\" attribute\nspecifies what is displayed from the referenced element. Default is\n'page'. Actual content is not automatically updated except for the 'text'\nformat.

\n\n

name is mandatory and should represent an existing reference mark of the\ndocument.

\n\n

ref_format is the argument for format reference (default is 'page').

\n\n

The reference is inserted the position defined by the regex (before /\nafter), or by positionnal argument (position). If 'display' is provided,\nit will be used as the text value for the reference.

\n\n

If after is an ODF Element, the reference is inserted as first child of\nthis element.

\n\n

Arguments:

\n\n
name -- str\n\nref_format -- one of : 'chapter', 'direction', 'page', 'text',\n                        'caption', 'category-and-value', 'value',\n                        'number', 'number-all-superior',\n                        'number-no-superior'\n\nbefore -- str regular expression or None\n\nafter -- str regular expression or odf element or None\n\nposition -- int\n\ndisplay -- str or None\n
\n", "signature": "(\tself,\tname: str,\tref_format: str = '',\tbefore: str | None = None,\tafter: str | odfdo.element.Element | None = None,\tposition: int = 0,\tdisplay: str | None = None) -> None:", "funcdef": "def"}, "odfdo.Paragraph.set_bookmark": {"fullname": "odfdo.Paragraph.set_bookmark", "modulename": "odfdo", "qualname": "Paragraph.set_bookmark", "kind": "function", "doc": "

Insert a bookmark before or after the characters in the text which\nmatch the regex before/after. When the regex matches more of one part\nof the text, position can be set to choose which part must be used.\nIf before and after are None, we use only position that is the number\nof characters.

\n\n

So, by default, this function inserts a bookmark before the first\ncharacter of the content. Role can be None, \"start\" or \"end\", we\ninsert respectively a position bookmark a bookmark-start or a\nbookmark-end.

\n\n

If content is not None these 2 calls are equivalent:

\n\n

paragraph.set_bookmark(\"bookmark\", content=\"xyz\")

\n\n

and:

\n\n

paragraph.set_bookmark(\"bookmark\", before=\"xyz\", role=\"start\")\n paragraph.set_bookmark(\"bookmark\", after=\"xyz\", role=\"end\")

\n\n

If position is a 2-tuple, these 2 calls are equivalent:

\n\n

paragraph.set_bookmark(\"bookmark\", position=(10, 20))

\n\n

and:

\n\n

paragraph.set_bookmark(\"bookmark\", position=10, role=\"start\")\n paragraph.set_bookmark(\"bookmark\", position=20, role=\"end\")

\n\n

Arguments:

\n\n
name -- str\n\nbefore -- str regex\n\nafter -- str regex\n\nposition -- int or (int, int)\n\nrole -- None, \"start\" or \"end\"\n\ncontent -- str regex\n
\n", "signature": "(\tself,\tname: str,\tbefore: str | None = None,\tafter: str | None = None,\tposition: int | tuple = 0,\trole: str | None = None,\tcontent: str | None = None) -> odfdo.element.Element | tuple[odfdo.element.Element, odfdo.element.Element]:", "funcdef": "def"}, "odfdo.PageBreak": {"fullname": "odfdo.PageBreak", "modulename": "odfdo", "qualname": "PageBreak", "kind": "function", "doc": "

Return an empty paragraph with a manual page break.

\n\n

Using this function requires to register the page break style with:\n document.add_page_break_style()

\n", "signature": "() -> odfdo.paragraph.Paragraph:", "funcdef": "def"}, "odfdo.RectangleShape": {"fullname": "odfdo.RectangleShape", "modulename": "odfdo", "qualname": "RectangleShape", "kind": "class", "doc": "

Create a rectangle shape.

\n\n

Arguments:

\n\n
style -- str\n\ntext_style -- str\n\ndraw_id -- str\n\nlayer -- str\n\nposition -- (str, str)\n\nsize -- (str, str)\n
\n", "bases": "odfdo.shapes.ShapeBase"}, "odfdo.RectangleShape.__init__": {"fullname": "odfdo.RectangleShape.__init__", "modulename": "odfdo", "qualname": "RectangleShape.__init__", "kind": "function", "doc": "

\n", "signature": "(\tstyle: str | None = None,\ttext_style: str | None = None,\tdraw_id: str | None = None,\tlayer: str | None = None,\tposition: tuple | None = None,\tsize: tuple | None = None,\t**kwargs: Any)"}, "odfdo.Reference": {"fullname": "odfdo.Reference", "modulename": "odfdo", "qualname": "Reference", "kind": "class", "doc": "

A reference to a content marked by a reference mark.\nThe odf_reference element (\"text:reference-ref\") represents a field that\nreferences a \"text:reference-mark-start\" or \"text:reference-mark\" element.\nIts text:reference-format attribute specifies what is displayed from the\nreferenced element. Default is 'page'\nActual content is not updated except for the 'text' format by the\nupdate() method.

\n\n

Creation of references can be tricky, consider using this method:\n odfdo.paragraph.insert_reference()

\n\n

Values for text:reference-format :\n The defined values for the text:reference-format attribute supported by\n all reference fields are:\n - 'chapter': displays the number of the chapter in which the\n referenced item appears.\n - 'direction': displays whether the referenced item is above or\n below the reference field.\n - 'page': displays the number of the page on which the referenced\n item appears.\n - 'text': displays the text of the referenced item.\n Additional defined values for the text:reference-format attribute\n supported by references to sequence fields are:\n - 'caption': displays the caption in which the sequence is used.\n - 'category-and-value': displays the name and value of the sequence.\n - 'value': displays the value of the sequence.

\n\n
References to bookmarks and other references support additional values,\nwhich display the list label of the referenced item. If the referenced\nitem is contained in a list or a numbered paragraph, the list label is\nthe formatted number of the paragraph which contains the referenced\nitem. If the referenced item is not contained in a list or numbered\nparagraph, the list label is empty, and the referenced field therefore\ndisplays nothing. If the referenced bookmark or reference contains more\nthan one paragraph, the list label of the paragraph at which the\nbookmark or reference starts is taken.\n\nAdditional defined values for the text:reference-format attribute\nsupported by all references to bookmark's or other reference fields\nare:\n  - 'number': displays the list label of the referenced item. [...]\n  - 'number-all-superior': displays the list label of the referenced\n    item and adds the contents of all list labels of superior levels\n    in front of it. [...]\n  - 'number-no-superior': displays the contents of the list label of\n    the referenced item.\n
\n", "bases": "odfdo.element.Element"}, "odfdo.Reference.__init__": {"fullname": "odfdo.Reference.__init__", "modulename": "odfdo", "qualname": "Reference.__init__", "kind": "function", "doc": "

Create a reference to a content marked by a reference mark. An\nactual reference mark with the provided name should exist.

\n\n

Consider using: odfdo.paragraph.insert_reference()

\n\n

The text:ref-name attribute identifies a \"text:reference-mark\" or\n\"text:referencemark-start\" element by the value of that element's\ntext:name attribute.\nIf ref_format is 'text', the current text content of the reference_mark\nis retrieved.

\n\n

Arguments:

\n\n
name -- str : name of the reference mark\n\nref_format -- str : format of the field. Default is 'page', allowed\n                values are 'chapter', 'direction', 'page', 'text',\n                'caption', 'category-and-value', 'value', 'number',\n                'number-all-superior', 'number-no-superior'.\n
\n", "signature": "(name: str = '', ref_format: str = '', **kwargs: Any)"}, "odfdo.Reference.format_allowed": {"fullname": "odfdo.Reference.format_allowed", "modulename": "odfdo", "qualname": "Reference.format_allowed", "kind": "variable", "doc": "

\n", "default_value": "('chapter', 'direction', 'page', 'text', 'caption', 'category-and-value', 'value', 'number', 'number-all-superior', 'number-no-superior')"}, "odfdo.Reference.ref_format": {"fullname": "odfdo.Reference.ref_format", "modulename": "odfdo", "qualname": "Reference.ref_format", "kind": "variable", "doc": "

Set the text:reference-format attribute.

\n\n

Arguments:

\n\n
ref_format -- str\n
\n", "annotation": ": str | None"}, "odfdo.Reference.update": {"fullname": "odfdo.Reference.update", "modulename": "odfdo", "qualname": "Reference.update", "kind": "function", "doc": "

Update the content of the reference text field. Currently only\n'text' format is implemented. Other values, for example the 'page' text\nfield, may need to be refreshed through a visual ODF parser.

\n", "signature": "(self) -> None:", "funcdef": "def"}, "odfdo.Reference.name": {"fullname": "odfdo.Reference.name", "modulename": "odfdo", "qualname": "Reference.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.ReferenceMark": {"fullname": "odfdo.ReferenceMark", "modulename": "odfdo", "qualname": "ReferenceMark", "kind": "class", "doc": "

A point reference.\nA point reference marks a position in text and is represented by a single\n\"text:reference-mark\" element.

\n", "bases": "odfdo.element.Element"}, "odfdo.ReferenceMark.__init__": {"fullname": "odfdo.ReferenceMark.__init__", "modulename": "odfdo", "qualname": "ReferenceMark.__init__", "kind": "function", "doc": "

A point reference. A point reference marks a position in text and is\nrepresented by a single \"text:reference-mark\" element.\nConsider using the wrapper: odfdo.paragraph.set_reference_mark()

\n\n

Arguments:

\n\n
name -- str\n
\n", "signature": "(name: str = '', **kwargs: Any)"}, "odfdo.ReferenceMark.name": {"fullname": "odfdo.ReferenceMark.name", "modulename": "odfdo", "qualname": "ReferenceMark.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.ReferenceMarkEnd": {"fullname": "odfdo.ReferenceMarkEnd", "modulename": "odfdo", "qualname": "ReferenceMarkEnd", "kind": "class", "doc": "

The \"text:reference-mark-end\" element represents the end of a range\nreference.

\n", "bases": "odfdo.element.Element"}, "odfdo.ReferenceMarkEnd.__init__": {"fullname": "odfdo.ReferenceMarkEnd.__init__", "modulename": "odfdo", "qualname": "ReferenceMarkEnd.__init__", "kind": "function", "doc": "

The \"text:reference-mark-end\" element represent the end of a range\nreference.\nConsider using the wrappers: odfdo.paragraph.set_reference_mark() and\nodfdo.paragraph.set_reference_mark_end()

\n\n

Arguments:

\n\n
name -- str\n
\n", "signature": "(name: str = '', **kwargs: Any)"}, "odfdo.ReferenceMarkEnd.referenced_text": {"fullname": "odfdo.ReferenceMarkEnd.referenced_text", "modulename": "odfdo", "qualname": "ReferenceMarkEnd.referenced_text", "kind": "function", "doc": "

Return the text between reference-mark-start and reference-mark-end.

\n", "signature": "(self) -> str:", "funcdef": "def"}, "odfdo.ReferenceMarkEnd.name": {"fullname": "odfdo.ReferenceMarkEnd.name", "modulename": "odfdo", "qualname": "ReferenceMarkEnd.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.ReferenceMarkStart": {"fullname": "odfdo.ReferenceMarkStart", "modulename": "odfdo", "qualname": "ReferenceMarkStart", "kind": "class", "doc": "

The \"text:reference-mark-start\" element represents the start of a\nrange reference.

\n", "bases": "odfdo.element.Element"}, "odfdo.ReferenceMarkStart.__init__": {"fullname": "odfdo.ReferenceMarkStart.__init__", "modulename": "odfdo", "qualname": "ReferenceMarkStart.__init__", "kind": "function", "doc": "

The \"text:reference-mark-start\" element represent the start of a range\nreference.\nConsider using the wrapper: odfdo.paragraph.set_reference_mark()

\n\n

Arguments:

\n\n
name -- str\n
\n", "signature": "(name: str = '', **kwargs: Any)"}, "odfdo.ReferenceMarkStart.referenced_text": {"fullname": "odfdo.ReferenceMarkStart.referenced_text", "modulename": "odfdo", "qualname": "ReferenceMarkStart.referenced_text", "kind": "function", "doc": "

Return the text between reference-mark-start and reference-mark-end.

\n", "signature": "(self) -> str:", "funcdef": "def"}, "odfdo.ReferenceMarkStart.get_referenced": {"fullname": "odfdo.ReferenceMarkStart.get_referenced", "modulename": "odfdo", "qualname": "ReferenceMarkStart.get_referenced", "kind": "function", "doc": "

Return the document content between the start and end tags of the\nreference. The content returned by this method can spread over several\nheaders and paragraphs.\nBy default, the content is returned as an \"office:text\" odf element.

\n\n

Arguments:

\n\n
no_header -- boolean (default to False), translate existing headers\n             tags \"text:h\" into paragraphs \"text:p\".\n\nclean -- boolean (default to True), suppress unwanted tags. Striped\n         tags are : 'text:change', 'text:change-start',\n         'text:change-end', 'text:reference-mark',\n         'text:reference-mark-start', 'text:reference-mark-end'.\n\nas_xml -- boolean (default to False), format the returned content as\n          a XML string (serialization).\n\nas_list -- boolean (default to False), do not embed the returned\n           content in a \"office:text'\" element, instead simply\n           return a raw list of odf elements.\n
\n", "signature": "(\tself,\tno_header: bool = False,\tclean: bool = True,\tas_xml: bool = False,\tas_list: bool = False) -> odfdo.element.Element | list | str | None:", "funcdef": "def"}, "odfdo.ReferenceMarkStart.delete": {"fullname": "odfdo.ReferenceMarkStart.delete", "modulename": "odfdo", "qualname": "ReferenceMarkStart.delete", "kind": "function", "doc": "

Delete the given element from the XML tree. If no element is given,\n\"self\" is deleted. The XML library may allow to continue to use an\nelement now \"orphan\" as long as you have a reference to it.

\n\n

For odf_reference_mark_start : delete the reference-end tag if exists.

\n\n

Arguments:

\n\n
child -- Element\n\nkeep_tail -- boolean (default to True), True for most usages.\n
\n", "signature": "(\tself,\tchild: odfdo.element.Element | None = None,\tkeep_tail: bool = True) -> None:", "funcdef": "def"}, "odfdo.ReferenceMarkStart.name": {"fullname": "odfdo.ReferenceMarkStart.name", "modulename": "odfdo", "qualname": "ReferenceMarkStart.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Row": {"fullname": "odfdo.Row", "modulename": "odfdo", "qualname": "Row", "kind": "class", "doc": "

ODF table row \"table:table-row\"

\n", "bases": "odfdo.element.Element"}, "odfdo.Row.__init__": {"fullname": "odfdo.Row.__init__", "modulename": "odfdo", "qualname": "Row.__init__", "kind": "function", "doc": "

create a Row, optionally filled with \"width\" number of cells.

\n\n

Rows contain cells, their number determine the number of columns.

\n\n

You don't generally have to create rows by hand, use the Table API.

\n\n

Arguments:

\n\n
width -- int\n\nrepeated -- int\n\nstyle -- str\n
\n", "signature": "(\twidth: int | None = None,\trepeated: int | None = None,\tstyle: str | None = None,\t**kwargs: Any)"}, "odfdo.Row.y": {"fullname": "odfdo.Row.y", "modulename": "odfdo", "qualname": "Row.y", "kind": "variable", "doc": "

\n"}, "odfdo.Row.clone": {"fullname": "odfdo.Row.clone", "modulename": "odfdo", "qualname": "Row.clone", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.row.Row"}, "odfdo.Row.repeated": {"fullname": "odfdo.Row.repeated", "modulename": "odfdo", "qualname": "Row.repeated", "kind": "variable", "doc": "

Get / set the number of times the row is repeated.

\n\n

Always None when using the table API.

\n\n

Return: int or None

\n", "annotation": ": int | None"}, "odfdo.Row.style": {"fullname": "odfdo.Row.style", "modulename": "odfdo", "qualname": "Row.style", "kind": "variable", "doc": "

Get /set the style of the row itself.

\n\n

Return: str

\n", "annotation": ": str | None"}, "odfdo.Row.width": {"fullname": "odfdo.Row.width", "modulename": "odfdo", "qualname": "Row.width", "kind": "variable", "doc": "

Get the number of expected cells in the row, i.e. addition\nrepetitions.

\n\n

Return: int

\n", "annotation": ": int"}, "odfdo.Row.traverse": {"fullname": "odfdo.Row.traverse", "modulename": "odfdo", "qualname": "Row.traverse", "kind": "function", "doc": "

Yield as many cell elements as expected cells in the row, i.e.\nexpand repetitions by returning the same cell as many times as\nnecessary.

\n\n
Arguments:\n\n    start -- int\n\n    end -- int\n
\n\n

Copies are returned, use set_cell() to push them back.

\n", "signature": "(\tself,\tstart: int | None = None,\tend: int | None = None) -> collections.abc.Iterator[odfdo.cell.Cell]:", "funcdef": "def"}, "odfdo.Row.get_cells": {"fullname": "odfdo.Row.get_cells", "modulename": "odfdo", "qualname": "Row.get_cells", "kind": "function", "doc": "

Get the list of cells matching the criteria.

\n\n

Filter by cell_type, with cell_type 'all' will retrieve cells of any\ntype, aka non empty cells.

\n\n

Filter by coordinates will retrieve the amount of cells defined by\n'coord', minus the other filters.

\n\n

Arguments:

\n\n
coord -- str or tuple of int : coordinates\n\ncell_type -- 'boolean', 'float', 'date', 'string', 'time',\n             'currency', 'percentage' or 'all'\n\ncontent -- str regex\n\nstyle -- str\n
\n\n

Return: list of Cell

\n", "signature": "(\tself,\tcoord: str | tuple | None = None,\tstyle: str | None = None,\tcontent: str | None = None,\tcell_type: str | None = None) -> list[odfdo.cell.Cell]:", "funcdef": "def"}, "odfdo.Row.get_cell": {"fullname": "odfdo.Row.get_cell", "modulename": "odfdo", "qualname": "Row.get_cell", "kind": "function", "doc": "

Get the cell at position \"x\" starting from 0. Alphabetical\npositions like \"D\" are accepted.

\n\n

A copy is returned, use set_cell() to push it back.

\n\n

Arguments:

\n\n
x -- int or str\n
\n\n

Return: Cell | None

\n", "signature": "(self, x: int, clone: bool = True) -> odfdo.cell.Cell | None:", "funcdef": "def"}, "odfdo.Row.get_value": {"fullname": "odfdo.Row.get_value", "modulename": "odfdo", "qualname": "Row.get_value", "kind": "function", "doc": "

Shortcut to get the value of the cell at position \"x\".\nIf get_type is True, returns the tuples (value, ODF type).

\n\n

If the cell is empty, returns None or (None, None)

\n\n

See get_cell() and Cell.get_value().

\n", "signature": "(\tself,\tx: int | str,\tget_type: bool = False) -> typing.Any | tuple[typing.Any, str]:", "funcdef": "def"}, "odfdo.Row.set_cell": {"fullname": "odfdo.Row.set_cell", "modulename": "odfdo", "qualname": "Row.set_cell", "kind": "function", "doc": "

Push the cell back in the row at position \"x\" starting from 0.\nAlphabetical positions like \"D\" are accepted.

\n\n

Arguments:

\n\n
x -- int or str\n
\n\n

returns the cell with x and y updated

\n", "signature": "(\tself,\tx: int | str,\tcell: odfdo.cell.Cell | None = None,\tclone: bool = True) -> odfdo.cell.Cell:", "funcdef": "def"}, "odfdo.Row.set_value": {"fullname": "odfdo.Row.set_value", "modulename": "odfdo", "qualname": "Row.set_value", "kind": "function", "doc": "

Shortcut to set the value of the cell at position \"x\".

\n\n

Arguments:

\n\n
x -- int or str\n\nvalue -- Python type\n\ncell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',\n         'string' or 'time'\n\ncurrency -- three-letter str\n\nstyle -- str\n
\n\n

See get_cell() and Cell.get_value().

\n", "signature": "(\tself,\tx: int | str,\tvalue: Any,\tstyle: str | None = None,\tcell_type: str | None = None,\tcurrency: str | None = None) -> None:", "funcdef": "def"}, "odfdo.Row.insert_cell": {"fullname": "odfdo.Row.insert_cell", "modulename": "odfdo", "qualname": "Row.insert_cell", "kind": "function", "doc": "

Insert the given cell at position \"x\" starting from 0. If no cell\nis given, an empty one is created.

\n\n

Alphabetical positions like \"D\" are accepted.

\n\n

Do not use when working on a table, use Table.insert_cell().

\n\n

Arguments:

\n\n
x -- int or str\n\ncell -- Cell\n
\n\n

returns the cell with x and y updated

\n", "signature": "(\tself,\tx: int | str,\tcell: odfdo.cell.Cell | None = None,\tclone: bool = True) -> odfdo.cell.Cell:", "funcdef": "def"}, "odfdo.Row.extend_cells": {"fullname": "odfdo.Row.extend_cells", "modulename": "odfdo", "qualname": "Row.extend_cells", "kind": "function", "doc": "

\n", "signature": "(\tself,\tcells: collections.abc.Iterable[odfdo.cell.Cell] | None = None) -> None:", "funcdef": "def"}, "odfdo.Row.append_cell": {"fullname": "odfdo.Row.append_cell", "modulename": "odfdo", "qualname": "Row.append_cell", "kind": "function", "doc": "

Append the given cell at the end of the row. Repeated cells are\naccepted. If no cell is given, an empty one is created.

\n\n

Do not use when working on a table, use Table.append_cell().

\n\n

Arguments:

\n\n
cell -- Cell\n\n_repeated -- (optional), repeated value of the row\n
\n\n

returns the cell with x and y updated

\n", "signature": "(\tself,\tcell: odfdo.cell.Cell | None = None,\tclone: bool = True,\t_repeated: int | None = None) -> odfdo.cell.Cell:", "funcdef": "def"}, "odfdo.Row.append": {"fullname": "odfdo.Row.append", "modulename": "odfdo", "qualname": "Row.append", "kind": "function", "doc": "

Append the given cell at the end of the row. Repeated cells are\naccepted. If no cell is given, an empty one is created.

\n\n

Do not use when working on a table, use Table.append_cell().

\n\n

Arguments:

\n\n
cell -- Cell\n\n_repeated -- (optional), repeated value of the row\n
\n\n

returns the cell with x and y updated

\n", "signature": "(\tself,\tcell: odfdo.cell.Cell | None = None,\tclone: bool = True,\t_repeated: int | None = None) -> odfdo.cell.Cell:", "funcdef": "def"}, "odfdo.Row.delete_cell": {"fullname": "odfdo.Row.delete_cell", "modulename": "odfdo", "qualname": "Row.delete_cell", "kind": "function", "doc": "

Delete the cell at the given position \"x\" starting from 0.\nAlphabetical positions like \"D\" are accepted.

\n\n

Cells on the right will be shifted to the left. In a table, other\nrows remain unaffected.

\n\n

Arguments:

\n\n
x -- int or str\n
\n", "signature": "(self, x: int | str) -> None:", "funcdef": "def"}, "odfdo.Row.get_values": {"fullname": "odfdo.Row.get_values", "modulename": "odfdo", "qualname": "Row.get_values", "kind": "function", "doc": "

Shortcut to get the cell values in this row.

\n\n

Filter by cell_type, with cell_type 'all' will retrieve cells of any\ntype, aka non empty cells.\nIf cell_type is used and complete is True, missing values are\nreplaced by None.\nIf cell_type is None, complete is always True : with no cell type\nqueried, get_values() returns None for each empty cell, the length\nof the list is equal to the length of the row (depending on\ncoordinates use).

\n\n

If get_type is True, returns a tuple (value, ODF type of value), or\n(None, None) for empty cells if complete is True.

\n\n

Filter by coordinates will retrieve the amount of cells defined by\ncoordinates with None for empty cells, except when using cell_type.

\n\n

Arguments:

\n\n
coord -- str or tuple of int : coordinates in row\n\ncell_type -- 'boolean', 'float', 'date', 'string', 'time',\n             'currency', 'percentage' or 'all'\n\ncomplete -- boolean\n\nget_type -- boolean\n
\n\n

Return: list of Python types, or list of tuples.

\n", "signature": "(\tself,\tcoord: str | tuple | None = None,\tcell_type: str | None = None,\tcomplete: bool = False,\tget_type: bool = False) -> list[typing.Any | tuple[typing.Any, typing.Any]]:", "funcdef": "def"}, "odfdo.Row.set_cells": {"fullname": "odfdo.Row.set_cells", "modulename": "odfdo", "qualname": "Row.set_cells", "kind": "function", "doc": "

Set the cells in the row, from the 'start' column.\nThis method does not clear the row, use row.clear() before to start\nwith an empty row.

\n\n

Arguments:

\n\n
cells -- list of cells\n\nstart -- int or str\n
\n", "signature": "(\tself,\tcells: list[odfdo.cell.Cell] | tuple[odfdo.cell.Cell] | None = None,\tstart: int | str = 0,\tclone: bool = True) -> None:", "funcdef": "def"}, "odfdo.Row.set_values": {"fullname": "odfdo.Row.set_values", "modulename": "odfdo", "qualname": "Row.set_values", "kind": "function", "doc": "

Shortcut to set the value of cells in the row, from the 'start'\ncolumn vith values.\nThis method does not clear the row, use row.clear() before to start\nwith an empty row.

\n\n

Arguments:

\n\n
values -- list of Python types\n\nstart -- int or str\n\ncell_type -- 'boolean', 'float', 'date', 'string', 'time',\n             'currency' or 'percentage'\n\ncurrency -- three-letter str\n\nstyle -- cell style\n
\n", "signature": "(\tself,\tvalues: list[typing.Any],\tstart: int | str = 0,\tstyle: str | None = None,\tcell_type: str | None = None,\tcurrency: str | None = None) -> None:", "funcdef": "def"}, "odfdo.Row.rstrip": {"fullname": "odfdo.Row.rstrip", "modulename": "odfdo", "qualname": "Row.rstrip", "kind": "function", "doc": "

Remove in-place empty cells at the right of the row. An empty\ncell has no value but can have style. If \"aggressive\" is True, style\nis ignored.

\n\n

Arguments:

\n\n
aggressive -- bool\n
\n", "signature": "(self, aggressive: bool = False) -> None:", "funcdef": "def"}, "odfdo.Row.is_empty": {"fullname": "odfdo.Row.is_empty", "modulename": "odfdo", "qualname": "Row.is_empty", "kind": "function", "doc": "

Return whether every cell in the row has no value or the value\nevaluates to False (empty string), and no style.

\n\n

If aggressive is True, empty cells with style are considered empty.

\n\n

Arguments:

\n\n
aggressive -- bool\n
\n\n

Return: bool

\n", "signature": "(self, aggressive: bool = False) -> bool:", "funcdef": "def"}, "odfdo.RowGroup": {"fullname": "odfdo.RowGroup", "modulename": "odfdo", "qualname": "RowGroup", "kind": "class", "doc": "

\"table:table-row-group\" group rows with common properties.

\n", "bases": "odfdo.element.Element"}, "odfdo.RowGroup.__init__": {"fullname": "odfdo.RowGroup.__init__", "modulename": "odfdo", "qualname": "RowGroup.__init__", "kind": "function", "doc": "

Create a group of rows, optionnaly filled with \"height\" number of\nrows, of \"width\" cells each.

\n\n

Row group bear style information applied to a series of rows.

\n\n

Arguments:

\n\n
height -- int\n\nwidth -- int\n
\n", "signature": "(height: int | None = None, width: int | None = None, **kwargs: Any)"}, "odfdo.Section": {"fullname": "odfdo.Section", "modulename": "odfdo", "qualname": "Section", "kind": "class", "doc": "

ODF section \"text:section\"

\n\n

Arguments:

\n\n
style -- str\n\nname -- str\n
\n", "bases": "odfdo.element.Element"}, "odfdo.Section.__init__": {"fullname": "odfdo.Section.__init__", "modulename": "odfdo", "qualname": "Section.__init__", "kind": "function", "doc": "

\n", "signature": "(style: str | None = None, name: str | None = None, **kwargs: Any)"}, "odfdo.Section.get_formatted_text": {"fullname": "odfdo.Section.get_formatted_text", "modulename": "odfdo", "qualname": "Section.get_formatted_text", "kind": "function", "doc": "

This function should return a beautiful version of the text.

\n", "signature": "(self, context: dict | None = None) -> str:", "funcdef": "def"}, "odfdo.Section.style": {"fullname": "odfdo.Section.style", "modulename": "odfdo", "qualname": "Section.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Section.name": {"fullname": "odfdo.Section.name", "modulename": "odfdo", "qualname": "Section.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Spacer": {"fullname": "odfdo.Spacer", "modulename": "odfdo", "qualname": "Spacer", "kind": "class", "doc": "

This element shall be used to represent the second and all following \u201c \u201c\n(U+0020, SPACE) characters in a sequence of \u201c \u201c (U+0020, SPACE) characters.\nNote: It is not an error if the character preceding the element is not a\nwhite space character, but it is good practice to use this element only for\nthe second and all following SPACE characters in a sequence.

\n", "bases": "odfdo.element.Element"}, "odfdo.Spacer.__init__": {"fullname": "odfdo.Spacer.__init__", "modulename": "odfdo", "qualname": "Spacer.__init__", "kind": "function", "doc": "

Arguments:

\n\n
number -- int\n
\n", "signature": "(number: int = 1, **kwargs: Any)"}, "odfdo.Spacer.number": {"fullname": "odfdo.Spacer.number", "modulename": "odfdo", "qualname": "Spacer.number", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Span": {"fullname": "odfdo.Span", "modulename": "odfdo", "qualname": "Span", "kind": "class", "doc": "

Create a span element \"text:span\" of the given style containing the optional\ngiven text.

\n", "bases": "odfdo.paragraph.Paragraph"}, "odfdo.Span.__init__": {"fullname": "odfdo.Span.__init__", "modulename": "odfdo", "qualname": "Span.__init__", "kind": "function", "doc": "

Arguments:

\n\n
text -- str\n\nstyle -- str\n
\n", "signature": "(text: str | None = None, style: str | None = None, **kwargs: Any)"}, "odfdo.Span.style": {"fullname": "odfdo.Span.style", "modulename": "odfdo", "qualname": "Span.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Span.class_names": {"fullname": "odfdo.Span.class_names", "modulename": "odfdo", "qualname": "Span.class_names", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style": {"fullname": "odfdo.Style", "modulename": "odfdo", "qualname": "Style", "kind": "class", "doc": "

Style class for all these tags:

\n\n

'style:style'\n'number:date-style',\n'number:number-style',\n'number:percentage-style',\n'number:time-style'\n'style:font-face',\n'style:master-page',\n'style:page-layout',\n'style:presentation-page-layout',\n'text:list-style',\n'text:outline-style',\n'style:tab-stops',\n...

\n", "bases": "odfdo.element.Element"}, "odfdo.Style.__init__": {"fullname": "odfdo.Style.__init__", "modulename": "odfdo", "qualname": "Style.__init__", "kind": "function", "doc": "

Create a style of the given family. The name is not mandatory at this\npoint but will become required when inserting in a document as a common\nstyle.

\n\n

The display name is the name the user sees in an office application.

\n\n

The parent_style is the name of the style this style will inherit from.

\n\n

To set properties, pass them as keyword arguments. The area properties\napply to is optional and defaults to the family.

\n\n

Arguments:

\n\n
family -- 'paragraph', 'text', 'section', 'table', 'table-column',\n          'table-row', 'table-cell', 'table-page', 'chart',\n          'drawing-page', 'graphic', 'presentation',\n          'control', 'ruby', 'list', 'number', 'page-layout'\n          'font-face', or 'master-page'\n\nname -- str\n\ndisplay_name -- str\n\nparent_style -- str\n\narea -- str\n
\n\n

'text' Properties:

\n\n
italic -- bool\n\nbold -- bool\n
\n\n

'paragraph' Properties:

\n\n
master_page -- str\n
\n\n

'master-page' Properties:

\n\n
page_layout -- str\n\nnext_style -- str\n
\n\n

'table-cell' Properties:

\n\n
border, border_top, border_right, border_bottom, border_left -- str,\ne.g. \"0.002cm solid #000000\" or 'none'\n\npadding, padding_top, padding_right, padding_bottom, padding_left -- str,\ne.g. \"0.002cm\" or 'none'\n\nshadow -- str, e.g. \"#808080 0.176cm 0.176cm\"\n
\n\n

'table-row' Properties:

\n\n
height -- str, e.g. '5cm'\n\nuse_optimal_height -- bool\n
\n\n

'table-column' Properties:

\n\n
width -- str, e.g. '5cm'\n\nbreak_before -- 'page', 'column' or 'auto'\n\nbreak_after -- 'page', 'column' or 'auto'\n
\n", "signature": "(\tfamily: str | None = None,\tname: str | None = None,\tdisplay_name: str | None = None,\tparent_style: str | None = None,\tarea: str | None = None,\tcolor: str | tuple | None = None,\tbackground_color: str | tuple | None = None,\titalic: bool = False,\tbold: bool = False,\tmaster_page: str | None = None,\tpage_layout: str | None = None,\tnext_style: str | None = None,\tdata_style: str | None = None,\tborder: str | None = None,\tborder_top: str | None = None,\tborder_right: str | None = None,\tborder_bottom: str | None = None,\tborder_left: str | None = None,\tpadding: str | None = None,\tpadding_top: str | None = None,\tpadding_bottom: str | None = None,\tpadding_left: str | None = None,\tpadding_right: str | None = None,\tshadow: str | None = None,\theight: str | None = None,\tuse_optimal_height: bool = False,\twidth: str | None = None,\tbreak_before: str | None = None,\tbreak_after: str | None = None,\tmin_height: str | None = None,\tfont_name: str | None = None,\tfont_family: str | None = None,\tfont_family_generic: str | None = None,\tfont_pitch: str = 'variable',\t**kwargs: Any)"}, "odfdo.Style.family": {"fullname": "odfdo.Style.family", "modulename": "odfdo", "qualname": "Style.family", "kind": "variable", "doc": "

\n", "annotation": ": str | None"}, "odfdo.Style.get_properties": {"fullname": "odfdo.Style.get_properties", "modulename": "odfdo", "qualname": "Style.get_properties", "kind": "function", "doc": "

Get the mapping of all properties of this style. By default the\nproperties of the same family, e.g. a paragraph style and its\nparagraph properties. Specify the area to get the text properties of\na paragraph style for example.

\n\n

Arguments:

\n\n
area -- str\n
\n\n

Return: dict

\n", "signature": "(self, area: str | None = None) -> dict[str, str | dict] | None:", "funcdef": "def"}, "odfdo.Style.set_properties": {"fullname": "odfdo.Style.set_properties", "modulename": "odfdo", "qualname": "Style.set_properties", "kind": "function", "doc": "

Set the properties of the \"area\" type of this style. Properties\nare given either as a dict or as named arguments (or both). The area\nis identical to the style family by default. If the properties\nelement is missing, it is created.

\n\n

Instead of properties, you can pass a style with properties of the\nsame area. These will be copied.

\n\n

Arguments:

\n\n
properties -- dict\n\nstyle -- Style\n\narea -- 'paragraph', 'text'...\n
\n", "signature": "(\tself,\tproperties: dict[str, str | dict] | None = None,\tstyle: odfdo.style.Style | None = None,\tarea: str | None = None,\t**kwargs: Any) -> None:", "funcdef": "def"}, "odfdo.Style.del_properties": {"fullname": "odfdo.Style.del_properties", "modulename": "odfdo", "qualname": "Style.del_properties", "kind": "function", "doc": "

Delete the given properties, either by list argument or\npositional argument (or both). Remove only from the given area,\nidentical to the style family by default.

\n\n

Arguments:

\n\n
properties -- list\n\narea -- str\n
\n", "signature": "(\tself,\tproperties: list[str] | None = None,\tarea: str | None = None) -> None:", "funcdef": "def"}, "odfdo.Style.set_background": {"fullname": "odfdo.Style.set_background", "modulename": "odfdo", "qualname": "Style.set_background", "kind": "function", "doc": "

Set the background color of a text style, or the background color\nor image of a paragraph style or page layout.

\n\n

With no argument, remove any existing background.

\n\n

The position is one or two of 'center', 'left', 'right', 'top' or\n'bottom'.

\n\n

The repeat is 'no-repeat', 'repeat' or 'stretch'.

\n\n

The opacity is a percentage integer (not a string with the '%s' sign)

\n\n

The filter is an application-specific filter name defined elsewhere.

\n\n

Though this method is defined on the base style class, it will raise\nan error if the style type is not compatible.

\n\n

Arguments:

\n\n
color -- '#rrggbb'\n\nurl -- str\n\nposition -- str\n\nrepeat -- str\n\nopacity -- int\n\nfilter -- str\n
\n", "signature": "(\tself,\tcolor: str | None = None,\turl: str | None = None,\tposition: str | None = 'center',\trepeat: str | None = None,\topacity: str | None = None,\tfilter: str | None = None) -> None:", "funcdef": "def"}, "odfdo.Style.get_level_style": {"fullname": "odfdo.Style.get_level_style", "modulename": "odfdo", "qualname": "Style.get_level_style", "kind": "function", "doc": "

\n", "signature": "(self, level: int) -> odfdo.style.Style | None:", "funcdef": "def"}, "odfdo.Style.set_level_style": {"fullname": "odfdo.Style.set_level_style", "modulename": "odfdo", "qualname": "Style.set_level_style", "kind": "function", "doc": "

Arguments:

\n\n
level -- int\n\nnum_format (for number) -- int\n\nbullet_char (for bullet) -- str\n\nurl (for image) -- str\n\ndisplay_levels -- int\n\nprefix -- str\n\nsuffix -- str\n\nstart_value -- int\n\nstyle -- str\n\nclone -- List Style\n
\n\n

Return:\n level_style created

\n", "signature": "(\tself,\tlevel: int,\tnum_format: str | None = None,\tbullet_char: str | None = None,\turl: str | None = None,\tdisplay_levels: int | None = None,\tprefix: str | None = None,\tsuffix: str | None = None,\tstart_value: int | None = None,\tstyle: str | None = None,\tclone: odfdo.style.Style | None = None) -> odfdo.style.Style | None:", "funcdef": "def"}, "odfdo.Style.get_header_style": {"fullname": "odfdo.Style.get_header_style", "modulename": "odfdo", "qualname": "Style.get_header_style", "kind": "function", "doc": "

\n", "signature": "(self) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Style.set_header_style": {"fullname": "odfdo.Style.set_header_style", "modulename": "odfdo", "qualname": "Style.set_header_style", "kind": "function", "doc": "

\n", "signature": "(self, new_style: odfdo.style.Style) -> None:", "funcdef": "def"}, "odfdo.Style.get_footer_style": {"fullname": "odfdo.Style.get_footer_style", "modulename": "odfdo", "qualname": "Style.get_footer_style", "kind": "function", "doc": "

\n", "signature": "(self) -> odfdo.style.Style | None:", "funcdef": "def"}, "odfdo.Style.set_footer_style": {"fullname": "odfdo.Style.set_footer_style", "modulename": "odfdo", "qualname": "Style.set_footer_style", "kind": "function", "doc": "

\n", "signature": "(self, new_style: odfdo.style.Style) -> None:", "funcdef": "def"}, "odfdo.Style.get_page_header": {"fullname": "odfdo.Style.get_page_header", "modulename": "odfdo", "qualname": "Style.get_page_header", "kind": "function", "doc": "

Get the element that contains the header contents.

\n\n

If None, no header was set.

\n", "signature": "(self) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Style.set_page_header": {"fullname": "odfdo.Style.set_page_header", "modulename": "odfdo", "qualname": "Style.set_page_header", "kind": "function", "doc": "

Create or replace the header by the given content. It can already\nbe a complete header.

\n\n

If you only want to update the existing header, get it and use the\nAPI.

\n\n

Arguments:

\n\n
text_or_element -- str or Element or a list of them\n
\n", "signature": "(\tself,\ttext_or_element: str | odfdo.element.Element | list[odfdo.element.Element | str]) -> None:", "funcdef": "def"}, "odfdo.Style.get_page_footer": {"fullname": "odfdo.Style.get_page_footer", "modulename": "odfdo", "qualname": "Style.get_page_footer", "kind": "function", "doc": "

Get the element that contains the footer contents.

\n\n

If None, no footer was set.

\n", "signature": "(self) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.Style.set_page_footer": {"fullname": "odfdo.Style.set_page_footer", "modulename": "odfdo", "qualname": "Style.set_page_footer", "kind": "function", "doc": "

Create or replace the footer by the given content. It can already\nbe a complete footer.

\n\n

If you only want to update the existing footer, get it and use the\nAPI.

\n\n

Arguments:

\n\n
text_or_element -- str or Element or a list of them\n
\n", "signature": "(\tself,\ttext_or_element: str | odfdo.element.Element | list[odfdo.element.Element | str]) -> None:", "funcdef": "def"}, "odfdo.Style.set_font": {"fullname": "odfdo.Style.set_font", "modulename": "odfdo", "qualname": "Style.set_font", "kind": "function", "doc": "

\n", "signature": "(\tself,\tname: str,\tfamily: str | None = None,\tfamily_generic: str | None = None,\tpitch: str = 'variable') -> None:", "funcdef": "def"}, "odfdo.Style.page_layout": {"fullname": "odfdo.Style.page_layout", "modulename": "odfdo", "qualname": "Style.page_layout", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style.next_style": {"fullname": "odfdo.Style.next_style", "modulename": "odfdo", "qualname": "Style.next_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style.name": {"fullname": "odfdo.Style.name", "modulename": "odfdo", "qualname": "Style.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style.parent_style": {"fullname": "odfdo.Style.parent_style", "modulename": "odfdo", "qualname": "Style.parent_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style.display_name": {"fullname": "odfdo.Style.display_name", "modulename": "odfdo", "qualname": "Style.display_name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style.svg_font_family": {"fullname": "odfdo.Style.svg_font_family", "modulename": "odfdo", "qualname": "Style.svg_font_family", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style.font_family_generic": {"fullname": "odfdo.Style.font_family_generic", "modulename": "odfdo", "qualname": "Style.font_family_generic", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style.font_pitch": {"fullname": "odfdo.Style.font_pitch", "modulename": "odfdo", "qualname": "Style.font_pitch", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style.text_style": {"fullname": "odfdo.Style.text_style", "modulename": "odfdo", "qualname": "Style.text_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style.master_page": {"fullname": "odfdo.Style.master_page", "modulename": "odfdo", "qualname": "Style.master_page", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style.style_type": {"fullname": "odfdo.Style.style_type", "modulename": "odfdo", "qualname": "Style.style_type", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style.leader_style": {"fullname": "odfdo.Style.leader_style", "modulename": "odfdo", "qualname": "Style.leader_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style.leader_text": {"fullname": "odfdo.Style.leader_text", "modulename": "odfdo", "qualname": "Style.leader_text", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Style.style_position": {"fullname": "odfdo.Style.style_position", "modulename": "odfdo", "qualname": "Style.style_position", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Styles": {"fullname": "odfdo.Styles", "modulename": "odfdo", "qualname": "Styles", "kind": "class", "doc": "

Representation of an XML part.

\n\n

Abstraction of the XML library behind.

\n", "bases": "odfdo.xmlpart.XmlPart"}, "odfdo.Styles.get_styles": {"fullname": "odfdo.Styles.get_styles", "modulename": "odfdo", "qualname": "Styles.get_styles", "kind": "function", "doc": "

Return the list of styles in the Content part, optionally limited\nto the given family, optionaly limited to automatic styles.

\n\n

Arguments:

\n\n
family -- str\n\nautomatic -- bool\n
\n\n

Return: list of Style

\n", "signature": "(\tself,\tfamily: str = '',\tautomatic: bool = False) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Styles.get_style": {"fullname": "odfdo.Styles.get_style", "modulename": "odfdo", "qualname": "Styles.get_style", "kind": "function", "doc": "

Return the style uniquely identified by the name/family pair. If\nthe argument is already a style object, it will return it.

\n\n

If the name is None, the default style is fetched.

\n\n

If the name is not the internal name but the name you gave in the\ndesktop application, use display_name instead.

\n\n

Arguments:

\n\n
family -- 'paragraph', 'text',  'graphic', 'table', 'list',\n          'number', 'page-layout', 'master-page'\n\nname_or_element -- str, odf_style or None\n\ndisplay_name -- str or None\n
\n\n

Return: odf_style or None if not found

\n", "signature": "(\tself,\tfamily: str,\tname_or_element: str | odfdo.style.Style | None = None,\tdisplay_name: str | None = None) -> odfdo.style.Style | None:", "funcdef": "def"}, "odfdo.Styles.get_master_pages": {"fullname": "odfdo.Styles.get_master_pages", "modulename": "odfdo", "qualname": "Styles.get_master_pages", "kind": "function", "doc": "

\n", "signature": "(self) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.Styles.get_master_page": {"fullname": "odfdo.Styles.get_master_page", "modulename": "odfdo", "qualname": "Styles.get_master_page", "kind": "function", "doc": "

\n", "signature": "(self, position: int = 0) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.TOC": {"fullname": "odfdo.TOC", "modulename": "odfdo", "qualname": "TOC", "kind": "class", "doc": "

Table of content.\nThe \"text:table-of-content\" element represents a table of contents for a\ndocument. The items that can be listed in a table of contents are:

\n\n
    \n
  • Headings (as defined by the outline structure of the document), up to\na selected level.
  • \n
  • Table of contents index marks.
  • \n
  • Paragraphs formatted with specified paragraph styles.
  • \n
\n\n

Implementation:\nDefault parameters are what most people use: protected from manual\nmodifications and not limited in title levels.

\n\n

The name is mandatory and derived automatically from the title if not\ngiven. Provide one in case of a conflict with other TOCs in the same\ndocument.

\n\n

The \"text:table-of-content\" element has the following attributes:\ntext:name, text:protected, text:protection-key,\ntext:protection-key-digest-algorithm, text:style-name and xml:id.

\n\n

Arguments:

\n\n
title -- str\n\nname -- str\n\nprotected -- bool\n\noutline_level -- int\n\nstyle -- str\n\ntitle_style -- str\n\nentry_style -- str\n
\n", "bases": "odfdo.element.Element"}, "odfdo.TOC.__init__": {"fullname": "odfdo.TOC.__init__", "modulename": "odfdo", "qualname": "TOC.__init__", "kind": "function", "doc": "

\n", "signature": "(\ttitle: str = 'Table of Contents',\tname: str | None = None,\tprotected: bool = True,\toutline_level: int = 0,\tstyle: str | None = None,\ttitle_style: str = 'Contents_20_Heading',\tentry_style: str = 'Contents_20_%d',\t**kwargs: Any)"}, "odfdo.TOC.create_toc_source": {"fullname": "odfdo.TOC.create_toc_source", "modulename": "odfdo", "qualname": "TOC.create_toc_source", "kind": "function", "doc": "

\n", "signature": "(\ttitle: str,\toutline_level: int,\ttitle_style: str,\tentry_style: str) -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.TOC.get_formatted_text": {"fullname": "odfdo.TOC.get_formatted_text", "modulename": "odfdo", "qualname": "TOC.get_formatted_text", "kind": "function", "doc": "

This function should return a beautiful version of the text.

\n", "signature": "(self, context: dict | None = None) -> str:", "funcdef": "def"}, "odfdo.TOC.outline_level": {"fullname": "odfdo.TOC.outline_level", "modulename": "odfdo", "qualname": "TOC.outline_level", "kind": "variable", "doc": "

\n", "annotation": ": int | None"}, "odfdo.TOC.body": {"fullname": "odfdo.TOC.body", "modulename": "odfdo", "qualname": "TOC.body", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.element.Element | None"}, "odfdo.TOC.get_title": {"fullname": "odfdo.TOC.get_title", "modulename": "odfdo", "qualname": "TOC.get_title", "kind": "function", "doc": "

\n", "signature": "(self) -> str:", "funcdef": "def"}, "odfdo.TOC.set_toc_title": {"fullname": "odfdo.TOC.set_toc_title", "modulename": "odfdo", "qualname": "TOC.set_toc_title", "kind": "function", "doc": "

\n", "signature": "(\tself,\ttitle: str,\tstyle: str | None = None,\ttext_style: str | None = None) -> None:", "funcdef": "def"}, "odfdo.TOC.fill": {"fullname": "odfdo.TOC.fill", "modulename": "odfdo", "qualname": "TOC.fill", "kind": "function", "doc": "

Fill the TOC with the titles found in the document. A TOC is not\ncontextual so it will catch all titles before and after its insertion.\nIf the TOC is not attached to a document, attach it beforehand or\nprovide one as argument.

\n\n

For having a pretty TOC, let use_default_styles by default.

\n\n

Arguments:

\n\n
document -- Document\n\nuse_default_styles -- bool\n
\n", "signature": "(\tself,\tdocument: odfdo.document.Document | None = None,\tuse_default_styles: bool = True) -> None:", "funcdef": "def"}, "odfdo.TOC.name": {"fullname": "odfdo.TOC.name", "modulename": "odfdo", "qualname": "TOC.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TOC.style": {"fullname": "odfdo.TOC.style", "modulename": "odfdo", "qualname": "TOC.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TOC.xml_id": {"fullname": "odfdo.TOC.xml_id", "modulename": "odfdo", "qualname": "TOC.xml_id", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TOC.protected": {"fullname": "odfdo.TOC.protected", "modulename": "odfdo", "qualname": "TOC.protected", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TOC.protection_key": {"fullname": "odfdo.TOC.protection_key", "modulename": "odfdo", "qualname": "TOC.protection_key", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TOC.protection_key_digest_algorithm": {"fullname": "odfdo.TOC.protection_key_digest_algorithm", "modulename": "odfdo", "qualname": "TOC.protection_key_digest_algorithm", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Tab": {"fullname": "odfdo.Tab", "modulename": "odfdo", "qualname": "Tab", "kind": "class", "doc": "

This element represents the [UNICODE] tab character (HORIZONTAL\nTABULATION, U+0009).

\n\n

The position attribute contains the number of the tab-stop to which\na tab character refers. The position 0 marks the start margin of a\nparagraph. Note: The position attribute is only a hint to help non-layout\noriented consumers to determine the tab/tab-stop association. Layout\noriented consumers should determine the tab positions based on the style\ninformation

\n", "bases": "odfdo.element.Element"}, "odfdo.Tab.__init__": {"fullname": "odfdo.Tab.__init__", "modulename": "odfdo", "qualname": "Tab.__init__", "kind": "function", "doc": "

Arguments:

\n\n
position -- int\n
\n", "signature": "(position: int | None = None, **kwargs: Any)"}, "odfdo.Tab.position": {"fullname": "odfdo.Tab.position", "modulename": "odfdo", "qualname": "Tab.position", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TabStopStyle": {"fullname": "odfdo.TabStopStyle", "modulename": "odfdo", "qualname": "TabStopStyle", "kind": "class", "doc": "

ODF \"style:tab-stop\"\nBase style for a TOC entryBase style for a TOC entry

\n", "bases": "odfdo.element.Element"}, "odfdo.TabStopStyle.__init__": {"fullname": "odfdo.TabStopStyle.__init__", "modulename": "odfdo", "qualname": "TabStopStyle.__init__", "kind": "function", "doc": "

\n", "signature": "(\tstyle_char: str | None = None,\tleader_color: str | None = None,\tleader_style: str | None = None,\tleader_text: str | None = None,\tleader_text_style: str | None = None,\tleader_type: str | None = None,\tleader_width: str | None = None,\tstyle_position: str | None = None,\tstyle_type: str | None = None,\t**kwargs: Any)"}, "odfdo.TabStopStyle.style_char": {"fullname": "odfdo.TabStopStyle.style_char", "modulename": "odfdo", "qualname": "TabStopStyle.style_char", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TabStopStyle.leader_color": {"fullname": "odfdo.TabStopStyle.leader_color", "modulename": "odfdo", "qualname": "TabStopStyle.leader_color", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TabStopStyle.leader_style": {"fullname": "odfdo.TabStopStyle.leader_style", "modulename": "odfdo", "qualname": "TabStopStyle.leader_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TabStopStyle.leader_text": {"fullname": "odfdo.TabStopStyle.leader_text", "modulename": "odfdo", "qualname": "TabStopStyle.leader_text", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TabStopStyle.leader_text_style": {"fullname": "odfdo.TabStopStyle.leader_text_style", "modulename": "odfdo", "qualname": "TabStopStyle.leader_text_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TabStopStyle.leader_type": {"fullname": "odfdo.TabStopStyle.leader_type", "modulename": "odfdo", "qualname": "TabStopStyle.leader_type", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TabStopStyle.leader_width": {"fullname": "odfdo.TabStopStyle.leader_width", "modulename": "odfdo", "qualname": "TabStopStyle.leader_width", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TabStopStyle.style_position": {"fullname": "odfdo.TabStopStyle.style_position", "modulename": "odfdo", "qualname": "TabStopStyle.style_position", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TabStopStyle.style_type": {"fullname": "odfdo.TabStopStyle.style_type", "modulename": "odfdo", "qualname": "TabStopStyle.style_type", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.Table": {"fullname": "odfdo.Table", "modulename": "odfdo", "qualname": "Table", "kind": "class", "doc": "

ODF table \"table:table\"

\n", "bases": "odfdo.element.Element"}, "odfdo.Table.__init__": {"fullname": "odfdo.Table.__init__", "modulename": "odfdo", "qualname": "Table.__init__", "kind": "function", "doc": "

Create a table element, optionally prefilled with \"height\" rows of\n\"width\" cells each.

\n\n

If the table is to be protected, a protection key must be provided,\ni.e. a hash value of the password.

\n\n

If the table must not be displayed, set \"display\" to False.

\n\n

If the table must not be printed, set \"printable\" to False. The table\nwill not be printed when it is not displayed, whatever the value of\nthis argument.

\n\n

Ranges of cells to print can be provided as a list of cell ranges,\ne.g. ['E6:K12', 'P6:R12'] or directly as a raw string, e.g.\n\"E6:K12 P6:R12\".

\n\n

You can access and modify the XML tree manually, but you probably want\nto use the API to access and alter cells. It will save you from\nhandling repetitions and the same number of cells for each row.

\n\n

If you use both the table API and the XML API, you are on your own for\nensuiring model integrity.

\n\n

Arguments:

\n\n
name -- str\n\nwidth -- int\n\nheight -- int\n\nprotected -- bool\n\nprotection_key -- str\n\ndisplay -- bool\n\nprintable -- bool\n\nprint_ranges -- list\n\nstyle -- str\n
\n", "signature": "(\tname: str | None = None,\twidth: int | None = None,\theight: int | None = None,\tprotected: bool = False,\tprotection_key: str | None = None,\tdisplay: bool = True,\tprintable: bool = True,\tprint_ranges: list[str] | None = None,\tstyle: str | None = None,\t**kwargs: Any)"}, "odfdo.Table.append": {"fullname": "odfdo.Table.append", "modulename": "odfdo", "qualname": "Table.append", "kind": "function", "doc": "

Dispatch .append() call to append_row() or append_column().

\n", "signature": "(self, something: odfdo.element.Element | str) -> None:", "funcdef": "def"}, "odfdo.Table.height": {"fullname": "odfdo.Table.height", "modulename": "odfdo", "qualname": "Table.height", "kind": "variable", "doc": "

Get the current height of the table.

\n\n

Return: int

\n", "annotation": ": int"}, "odfdo.Table.width": {"fullname": "odfdo.Table.width", "modulename": "odfdo", "qualname": "Table.width", "kind": "variable", "doc": "

Get the current width of the table, measured on columns.

\n\n

Rows may have different widths, use the Table API to ensure width\nconsistency.

\n\n

Return: int

\n", "annotation": ": int"}, "odfdo.Table.size": {"fullname": "odfdo.Table.size", "modulename": "odfdo", "qualname": "Table.size", "kind": "variable", "doc": "

Shortcut to get the current width and height of the table.

\n\n

Return: (int, int)

\n", "annotation": ": tuple[int, int]"}, "odfdo.Table.name": {"fullname": "odfdo.Table.name", "modulename": "odfdo", "qualname": "Table.name", "kind": "variable", "doc": "

Get / set the name of the table.

\n", "annotation": ": str | None"}, "odfdo.Table.protected": {"fullname": "odfdo.Table.protected", "modulename": "odfdo", "qualname": "Table.protected", "kind": "variable", "doc": "

\n", "annotation": ": bool"}, "odfdo.Table.protection_key": {"fullname": "odfdo.Table.protection_key", "modulename": "odfdo", "qualname": "Table.protection_key", "kind": "variable", "doc": "

\n", "annotation": ": str | None"}, "odfdo.Table.displayed": {"fullname": "odfdo.Table.displayed", "modulename": "odfdo", "qualname": "Table.displayed", "kind": "variable", "doc": "

\n", "annotation": ": bool"}, "odfdo.Table.printable": {"fullname": "odfdo.Table.printable", "modulename": "odfdo", "qualname": "Table.printable", "kind": "variable", "doc": "

\n", "annotation": ": bool"}, "odfdo.Table.print_ranges": {"fullname": "odfdo.Table.print_ranges", "modulename": "odfdo", "qualname": "Table.print_ranges", "kind": "variable", "doc": "

\n", "annotation": ": list[str]"}, "odfdo.Table.style": {"fullname": "odfdo.Table.style", "modulename": "odfdo", "qualname": "Table.style", "kind": "variable", "doc": "

Get / set the style of the table

\n\n

Return: str

\n", "annotation": ": str | None"}, "odfdo.Table.get_formatted_text": {"fullname": "odfdo.Table.get_formatted_text", "modulename": "odfdo", "qualname": "Table.get_formatted_text", "kind": "function", "doc": "

This function should return a beautiful version of the text.

\n", "signature": "(self, context: dict | None = None) -> str:", "funcdef": "def"}, "odfdo.Table.get_values": {"fullname": "odfdo.Table.get_values", "modulename": "odfdo", "qualname": "Table.get_values", "kind": "function", "doc": "

Get a matrix of values of the table.

\n\n

Filter by coordinates will parse the area defined by the coordinates.

\n\n

If 'cell_type' is used and 'complete' is True (default), missing values\nare replaced by None.\nFilter by ' cell_type = \"all\" ' will retrieve cells of any\ntype, aka non empty cells.

\n\n

If 'cell_type' is None, complete is always True : with no cell type\nqueried, get_values() returns None for each empty cell, the length\neach lists is equal to the width of the table.

\n\n

If get_type is True, returns tuples (value, ODF type of value), or\n(None, None) for empty cells with complete True.

\n\n

If flat is True, the methods return a single list of all the values.\nBy default, flat is False.

\n\n

Arguments:

\n\n
coord -- str or tuple of int : coordinates of area\n\ncell_type -- 'boolean', 'float', 'date', 'string', 'time',\n             'currency', 'percentage' or 'all'\n\ncomplete -- boolean\n\nget_type -- boolean\n
\n\n

Return: list of lists of Python types

\n", "signature": "(\tself,\tcoord: tuple | list | str | None = None,\tcell_type: str | None = None,\tcomplete: bool = True,\tget_type: bool = False,\tflat: bool = False) -> list:", "funcdef": "def"}, "odfdo.Table.iter_values": {"fullname": "odfdo.Table.iter_values", "modulename": "odfdo", "qualname": "Table.iter_values", "kind": "function", "doc": "

Iterate through lines of Python values of the table.

\n\n

Filter by coordinates will parse the area defined by the coordinates.

\n\n

cell_type, complete, grt_type : see get_values()

\n\n

Arguments:

\n\n
coord -- str or tuple of int : coordinates of area\n\ncell_type -- 'boolean', 'float', 'date', 'string', 'time',\n             'currency', 'percentage' or 'all'\n\ncomplete -- boolean\n\nget_type -- boolean\n
\n\n

Return: iterator of lists

\n", "signature": "(\tself,\tcoord: tuple | list | str | None = None,\tcell_type: str | None = None,\tcomplete: bool = True,\tget_type: bool = False) -> collections.abc.Iterator[list]:", "funcdef": "def"}, "odfdo.Table.set_values": {"fullname": "odfdo.Table.set_values", "modulename": "odfdo", "qualname": "Table.set_values", "kind": "function", "doc": "

Set the value of cells in the table, from the 'coord' position\nwith values.

\n\n

'coord' is the coordinate of the upper left cell to be modified by\nvalues. If 'coord' is None, default to the position (0,0) (\"A1\").\nIf 'coord' is an area (e.g. \"A2:B5\"), the upper left position of this\narea is used as coordinate.

\n\n

The table is not cleared before the operation, to reset the table\nbefore setting values, use table.clear().

\n\n

A list of lists is expected, with as many lists as rows, and as many\nitems in each sublist as cells to be setted. None values in the list\nwill create empty cells with no cell type (but eventually a style).

\n\n

Arguments:

\n\n
coord -- tuple or str\n\nvalues -- list of lists of python types\n\ncell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',\n             'string' or 'time'\n\ncurrency -- three-letter str\n\nstyle -- str\n
\n", "signature": "(\tself,\tvalues: list,\tcoord: tuple | list | str | None = None,\tstyle: str | None = None,\tcell_type: str | None = None,\tcurrency: str | None = None) -> None:", "funcdef": "def"}, "odfdo.Table.rstrip": {"fullname": "odfdo.Table.rstrip", "modulename": "odfdo", "qualname": "Table.rstrip", "kind": "function", "doc": "

Remove in-place empty rows below and empty cells at the right of\nthe table. Cells are empty if they contain no value or it evaluates\nto False, and no style.

\n\n

If aggressive is True, empty cells with style are removed too.

\n\n

Argument:

\n\n
aggressive -- bool\n
\n", "signature": "(self, aggressive: bool = False) -> None:", "funcdef": "def"}, "odfdo.Table.transpose": {"fullname": "odfdo.Table.transpose", "modulename": "odfdo", "qualname": "Table.transpose", "kind": "function", "doc": "

Swap in-place rows and columns of the table.

\n\n

If 'coord' is not None, apply transpose only to the area defined by the\ncoordinates. Beware, if area is not square, some cells mays be over\nwritten during the process.

\n\n

Arguments:

\n\n
coord -- str or tuple of int : coordinates of area\n\nstart -- int or str\n
\n", "signature": "(self, coord: tuple | list | str | None = None) -> None:", "funcdef": "def"}, "odfdo.Table.is_empty": {"fullname": "odfdo.Table.is_empty", "modulename": "odfdo", "qualname": "Table.is_empty", "kind": "function", "doc": "

Return whether every cell in the table has no value or the value\nevaluates to False (empty string), and no style.

\n\n

If aggressive is True, empty cells with style are considered empty.

\n\n

Arguments:

\n\n
aggressive -- bool\n
\n", "signature": "(self, aggressive: bool = False) -> bool:", "funcdef": "def"}, "odfdo.Table.traverse": {"fullname": "odfdo.Table.traverse", "modulename": "odfdo", "qualname": "Table.traverse", "kind": "function", "doc": "

Yield as many row elements as expected rows in the table, i.e.\nexpand repetitions by returning the same row as many times as\nnecessary.

\n\n
Arguments:\n\n    start -- int\n\n    end -- int\n
\n\n

Copies are returned, use set_row() to push them back.

\n", "signature": "(\tself,\tstart: int | None = None,\tend: int | None = None) -> collections.abc.Iterator[odfdo.row.Row]:", "funcdef": "def"}, "odfdo.Table.get_rows": {"fullname": "odfdo.Table.get_rows", "modulename": "odfdo", "qualname": "Table.get_rows", "kind": "function", "doc": "

Get the list of rows matching the criteria.

\n\n

Filter by coordinates will parse the area defined by the coordinates.

\n\n

Arguments:

\n\n
coord -- str or tuple of int : coordinates of rows\n\ncontent -- str regex\n\nstyle -- str\n
\n\n

Return: list of rows

\n", "signature": "(\tself,\tcoord: tuple | list | str | None = None,\tstyle: str | None = None,\tcontent: str | None = None) -> list[odfdo.row.Row]:", "funcdef": "def"}, "odfdo.Table.get_row": {"fullname": "odfdo.Table.get_row", "modulename": "odfdo", "qualname": "Table.get_row", "kind": "function", "doc": "

Get the row at the given \"y\" position.

\n\n

Position start at 0. So cell A4 is on row 3.

\n\n

A copy is returned, use set_cell() to push it back.

\n\n

Arguments:

\n\n
y -- int or str\n
\n\n

Return: Row

\n", "signature": "(\tself,\ty: int | str,\tclone: bool = True,\tcreate: bool = True) -> odfdo.row.Row:", "funcdef": "def"}, "odfdo.Table.set_row": {"fullname": "odfdo.Table.set_row", "modulename": "odfdo", "qualname": "Table.set_row", "kind": "function", "doc": "

Replace the row at the given position with the new one. Repetions of\nthe old row will be adjusted.

\n\n

If row is None, a new empty row is created.

\n\n

Position start at 0. So cell A4 is on row 3.

\n\n

Arguments:

\n\n
y -- int or str\n\nrow -- Row\n
\n\n

returns the row, with updated row.y

\n", "signature": "(\tself,\ty: int | str,\trow: odfdo.row.Row | None = None,\tclone: bool = True) -> odfdo.row.Row:", "funcdef": "def"}, "odfdo.Table.insert_row": {"fullname": "odfdo.Table.insert_row", "modulename": "odfdo", "qualname": "Table.insert_row", "kind": "function", "doc": "

Insert the row before the given \"y\" position. If no row is given,\nan empty one is created.

\n\n

Position start at 0. So cell A4 is on row 3.

\n\n

If row is None, a new empty row is created.

\n\n

Arguments:

\n\n
y -- int or str\n\nrow -- Row\n
\n\n

returns the row, with updated row.y

\n", "signature": "(\tself,\ty: str | int,\trow: odfdo.row.Row | None = None,\tclone: bool = True) -> odfdo.row.Row:", "funcdef": "def"}, "odfdo.Table.extend_rows": {"fullname": "odfdo.Table.extend_rows", "modulename": "odfdo", "qualname": "Table.extend_rows", "kind": "function", "doc": "

Append a list of rows at the end of the table.

\n\n

Arguments:

\n\n
rows -- list of Row\n
\n", "signature": "(self, rows: list[odfdo.row.Row] | None = None) -> None:", "funcdef": "def"}, "odfdo.Table.append_row": {"fullname": "odfdo.Table.append_row", "modulename": "odfdo", "qualname": "Table.append_row", "kind": "function", "doc": "

Append the row at the end of the table. If no row is given, an\nempty one is created.

\n\n

Position start at 0. So cell A4 is on row 3.

\n\n

Note the columns are automatically created when the first row is\ninserted in an empty table. So better insert a filled row.

\n\n

Arguments:

\n\n
row -- Row\n\n_repeated -- (optional), repeated value of the row\n
\n\n

returns the row, with updated row.y

\n", "signature": "(\tself,\trow: odfdo.row.Row | None = None,\tclone: bool = True,\t_repeated: int | None = None) -> odfdo.row.Row:", "funcdef": "def"}, "odfdo.Table.delete_row": {"fullname": "odfdo.Table.delete_row", "modulename": "odfdo", "qualname": "Table.delete_row", "kind": "function", "doc": "

Delete the row at the given \"y\" position.

\n\n

Position start at 0. So cell A4 is on row 3.

\n\n

Arguments:

\n\n
y -- int or str\n
\n", "signature": "(self, y: int | str) -> None:", "funcdef": "def"}, "odfdo.Table.get_row_values": {"fullname": "odfdo.Table.get_row_values", "modulename": "odfdo", "qualname": "Table.get_row_values", "kind": "function", "doc": "

Shortcut to get the list of Python values for the cells of the row\nat the given \"y\" position.

\n\n

Position start at 0. So cell A4 is on row 3.

\n\n

Filter by cell_type, with cell_type 'all' will retrieve cells of any\ntype, aka non empty cells.\nIf cell_type and complete is True, replace missing values by None.

\n\n

If get_type is True, returns a tuple (value, ODF type of value)

\n\n

Arguments:

\n\n
y -- int, str\n\ncell_type -- 'boolean', 'float', 'date', 'string', 'time',\n             'currency', 'percentage' or 'all'\n\ncomplete -- boolean\n\nget_type -- boolean\n
\n\n

Return: list of lists of Python types

\n", "signature": "(\tself,\ty: int | str,\tcell_type: str | None = None,\tcomplete: bool = True,\tget_type: bool = False) -> list:", "funcdef": "def"}, "odfdo.Table.set_row_values": {"fullname": "odfdo.Table.set_row_values", "modulename": "odfdo", "qualname": "Table.set_row_values", "kind": "function", "doc": "

Shortcut to set the values of all cells of the row at the given\n\"y\" position.

\n\n

Position start at 0. So cell A4 is on row 3.

\n\n

Arguments:

\n\n
y -- int or str\n\nvalues -- list of Python types\n\ncell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',\n             'string' or 'time'\n\ncurrency -- three-letter str\n\nstyle -- str\n
\n\n

returns the row, with updated row.y

\n", "signature": "(\tself,\ty: int | str,\tvalues: list,\tcell_type: str | None = None,\tcurrency: str | None = None,\tstyle: str | None = None) -> odfdo.row.Row:", "funcdef": "def"}, "odfdo.Table.set_row_cells": {"fullname": "odfdo.Table.set_row_cells", "modulename": "odfdo", "qualname": "Table.set_row_cells", "kind": "function", "doc": "

Shortcut to set all the cells of the row at the given\n\"y\" position.

\n\n

Position start at 0. So cell A4 is on row 3.

\n\n

Arguments:

\n\n
y -- int or str\n\ncells -- list of Python types\n\nstyle -- str\n
\n\n

returns the row, with updated row.y

\n", "signature": "(self, y: int | str, cells: list | None = None) -> odfdo.row.Row:", "funcdef": "def"}, "odfdo.Table.is_row_empty": {"fullname": "odfdo.Table.is_row_empty", "modulename": "odfdo", "qualname": "Table.is_row_empty", "kind": "function", "doc": "

Return wether every cell in the row at the given \"y\" position has\nno value or the value evaluates to False (empty string), and no style.

\n\n

Position start at 0. So cell A4 is on row 3.

\n\n

If aggressive is True, empty cells with style are considered empty.

\n\n

Arguments:

\n\n
y -- int or str\n\naggressive -- bool\n
\n", "signature": "(self, y: int | str, aggressive: bool = False) -> bool:", "funcdef": "def"}, "odfdo.Table.get_cells": {"fullname": "odfdo.Table.get_cells", "modulename": "odfdo", "qualname": "Table.get_cells", "kind": "function", "doc": "

Get the cells matching the criteria. If 'coord' is None,\nparse the whole table, else parse the area defined by 'coord'.

\n\n

Filter by cell_type = \"all\" will retrieve cells of any\ntype, aka non empty cells.

\n\n

If flat is True (default is False), the method return a single list\nof all the values, else a list of lists of cells.

\n\n

if cell_type, style and content are None, get_cells() will return\nthe exact number of cells of the area, including empty cells.

\n\n

Arguments:

\n\n
coordinates -- str or tuple of int : coordinates of area\n\ncell_type -- 'boolean', 'float', 'date', 'string', 'time',\n             'currency', 'percentage' or 'all'\n\ncontent -- str regex\n\nstyle -- str\n\nflat -- boolean\n
\n\n

Return: list of tuples

\n", "signature": "(\tself,\tcoord: tuple | list | str | None = None,\tcell_type: str | None = None,\tstyle: str | None = None,\tcontent: str | None = None,\tflat: bool = False) -> list:", "funcdef": "def"}, "odfdo.Table.get_cell": {"fullname": "odfdo.Table.get_cell", "modulename": "odfdo", "qualname": "Table.get_cell", "kind": "function", "doc": "

Get the cell at the given coordinates.

\n\n

They are either a 2-uplet of (x, y) starting from 0, or a\nhuman-readable position like \"C4\".

\n\n

A copy is returned, use set_cell to push it back.

\n\n

Arguments:

\n\n
coord -- (int, int) or str\n
\n\n

Return: Cell

\n", "signature": "(\tself,\tcoord: tuple | list | str,\tclone: bool = True,\tkeep_repeated: bool = True) -> odfdo.cell.Cell:", "funcdef": "def"}, "odfdo.Table.get_value": {"fullname": "odfdo.Table.get_value", "modulename": "odfdo", "qualname": "Table.get_value", "kind": "function", "doc": "

Shortcut to get the Python value of the cell at the given\ncoordinates.

\n\n

If get_type is True, returns the tuples (value, ODF type)

\n\n

coord is either a 2-uplet of (x, y) starting from 0, or a\nhuman-readable position like \"C4\". If an Area is given, the upper\nleft position is used as coord.

\n\n

Arguments:

\n\n
coord -- (int, int) or str : coordinate\n
\n\n

Return: Python type

\n", "signature": "(self, coord: tuple | list | str, get_type: bool = False) -> Any:", "funcdef": "def"}, "odfdo.Table.set_cell": {"fullname": "odfdo.Table.set_cell", "modulename": "odfdo", "qualname": "Table.set_cell", "kind": "function", "doc": "

Replace a cell of the table at the given coordinates.

\n\n

They are either a 2-uplet of (x, y) starting from 0, or a\nhuman-readable position like \"C4\".

\n\n

Arguments:

\n\n
coord -- (int, int) or str : coordinate\n\ncell -- Cell\n
\n\n

return the cell, with x and y updated

\n", "signature": "(\tself,\tcoord: tuple | list | str,\tcell: odfdo.cell.Cell | None = None,\tclone: bool = True) -> odfdo.cell.Cell:", "funcdef": "def"}, "odfdo.Table.set_cells": {"fullname": "odfdo.Table.set_cells", "modulename": "odfdo", "qualname": "Table.set_cells", "kind": "function", "doc": "

Set the cells in the table, from the 'coord' position.

\n\n

'coord' is the coordinate of the upper left cell to be modified by\nvalues. If 'coord' is None, default to the position (0,0) (\"A1\").\nIf 'coord' is an area (e.g. \"A2:B5\"), the upper left position of this\narea is used as coordinate.

\n\n

The table is not cleared before the operation, to reset the table\nbefore setting cells, use table.clear().

\n\n

A list of lists is expected, with as many lists as rows to be set, and\nas many cell in each sublist as cells to be setted in the row.

\n\n

Arguments:

\n\n
cells -- list of list of cells\n\ncoord -- tuple or str\n\nvalues -- list of lists of python types\n
\n", "signature": "(\tself,\tcells: list[list[odfdo.cell.Cell]] | list[tuple[odfdo.cell.Cell]],\tcoord: tuple | list | str | None = None,\tclone: bool = True) -> None:", "funcdef": "def"}, "odfdo.Table.set_value": {"fullname": "odfdo.Table.set_value", "modulename": "odfdo", "qualname": "Table.set_value", "kind": "function", "doc": "

Set the Python value of the cell at the given coordinates.

\n\n

They are either a 2-uplet of (x, y) starting from 0, or a\nhuman-readable position like \"C4\".

\n\n

Arguments:

\n\n
coord -- (int, int) or str\n\nvalue -- Python type\n\ncell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',\n         'string' or 'time'\n\ncurrency -- three-letter str\n\nstyle -- str\n
\n", "signature": "(\tself,\tcoord: tuple | list | str,\tvalue: Any,\tcell_type: str | None = None,\tcurrency: str | None = None,\tstyle: str | None = None) -> None:", "funcdef": "def"}, "odfdo.Table.set_cell_image": {"fullname": "odfdo.Table.set_cell_image", "modulename": "odfdo", "qualname": "Table.set_cell_image", "kind": "function", "doc": "

Do all the magic to display an image in the cell at the given\ncoordinates.

\n\n

They are either a 2-uplet of (x, y) starting from 0, or a\nhuman-readable position like \"C4\".

\n\n

The frame element must contain the expected image position and\ndimensions.

\n\n

DrawImage insertion depends on the document type, so the type must be\nprovided or the table element must be already attached to a document.

\n\n

Arguments:

\n\n
coord -- (int, int) or str\n\nimage_frame -- Frame including an image\n\ndoc_type -- 'spreadsheet' or 'text'\n
\n", "signature": "(\tself,\tcoord: tuple | list | str,\timage_frame: odfdo.frame.Frame,\tdoc_type: str | None = None) -> None:", "funcdef": "def"}, "odfdo.Table.insert_cell": {"fullname": "odfdo.Table.insert_cell", "modulename": "odfdo", "qualname": "Table.insert_cell", "kind": "function", "doc": "

Insert the given cell at the given coordinates. If no cell is\ngiven, an empty one is created.

\n\n

Coordinates are either a 2-uplet of (x, y) starting from 0, or a\nhuman-readable position like \"C4\".

\n\n

Cells on the right are shifted. Other rows remain untouched.

\n\n

Arguments:

\n\n
coord -- (int, int) or str\n\ncell -- Cell\n
\n\n

returns the cell with x and y updated

\n", "signature": "(\tself,\tcoord: tuple | list | str,\tcell: odfdo.cell.Cell | None = None,\tclone: bool = True) -> odfdo.cell.Cell:", "funcdef": "def"}, "odfdo.Table.append_cell": {"fullname": "odfdo.Table.append_cell", "modulename": "odfdo", "qualname": "Table.append_cell", "kind": "function", "doc": "

Append the given cell at the \"y\" coordinate. Repeated cells are\naccepted. If no cell is given, an empty one is created.

\n\n

Position start at 0. So cell A4 is on row 3.

\n\n

Other rows remain untouched.

\n\n

Arguments:

\n\n
y -- int or str\n\ncell -- Cell\n
\n\n

returns the cell with x and y updated

\n", "signature": "(\tself,\ty: int | str,\tcell: odfdo.cell.Cell | None = None,\tclone: bool = True) -> odfdo.cell.Cell:", "funcdef": "def"}, "odfdo.Table.delete_cell": {"fullname": "odfdo.Table.delete_cell", "modulename": "odfdo", "qualname": "Table.delete_cell", "kind": "function", "doc": "

Delete the cell at the given coordinates, so that next cells are\nshifted to the left.

\n\n

Coordinates are either a 2-uplet of (x, y) starting from 0, or a\nhuman-readable position like \"C4\".

\n\n

Use set_value() for erasing value.

\n\n

Arguments:

\n\n
coord -- (int, int) or str\n
\n", "signature": "(self, coord: tuple | list | str) -> None:", "funcdef": "def"}, "odfdo.Table.traverse_columns": {"fullname": "odfdo.Table.traverse_columns", "modulename": "odfdo", "qualname": "Table.traverse_columns", "kind": "function", "doc": "

Yield as many column elements as expected columns in the table,\ni.e. expand repetitions by returning the same column as many times as\nnecessary.

\n\n
Arguments:\n\n    start -- int\n\n    end -- int\n
\n\n

Copies are returned, use set_column() to push them back.

\n", "signature": "(\tself,\tstart: int | None = None,\tend: int | None = None) -> collections.abc.Iterator[odfdo.table.Column]:", "funcdef": "def"}, "odfdo.Table.get_columns": {"fullname": "odfdo.Table.get_columns", "modulename": "odfdo", "qualname": "Table.get_columns", "kind": "function", "doc": "

Get the list of columns matching the criteria. Each result is a\ntuple of (x, column).

\n\n

Arguments:

\n\n
coord -- str or tuple of int : coordinates of columns\n\nstyle -- str\n
\n\n

Return: list of columns

\n", "signature": "(\tself,\tcoord: tuple | list | str | None = None,\tstyle: str | None = None) -> list[odfdo.table.Column]:", "funcdef": "def"}, "odfdo.Table.get_column": {"fullname": "odfdo.Table.get_column", "modulename": "odfdo", "qualname": "Table.get_column", "kind": "function", "doc": "

Get the column at the given \"x\" position.

\n\n

ODF columns don't contain cells, only style information.

\n\n

Position start at 0. So cell C4 is on column 2. Alphabetical position\nlike \"C\" is accepted.

\n\n

A copy is returned, use set_column() to push it back.

\n\n

Arguments:

\n\n
x -- int or str\n
\n\n

Return: Column

\n", "signature": "(self, x: int | str) -> odfdo.table.Column:", "funcdef": "def"}, "odfdo.Table.set_column": {"fullname": "odfdo.Table.set_column", "modulename": "odfdo", "qualname": "Table.set_column", "kind": "function", "doc": "

Replace the column at the given \"x\" position.

\n\n

ODF columns don't contain cells, only style information.

\n\n

Position start at 0. So cell C4 is on column 2. Alphabetical position\nlike \"C\" is accepted.

\n\n

Arguments:

\n\n
x -- int or str\n\ncolumn -- Column\n
\n", "signature": "(\tself,\tx: int | str,\tcolumn: odfdo.table.Column | None = None) -> odfdo.table.Column:", "funcdef": "def"}, "odfdo.Table.insert_column": {"fullname": "odfdo.Table.insert_column", "modulename": "odfdo", "qualname": "Table.insert_column", "kind": "function", "doc": "

Insert the column before the given \"x\" position. If no column is\ngiven, an empty one is created.

\n\n

ODF columns don't contain cells, only style information.

\n\n

Position start at 0. So cell C4 is on column 2. Alphabetical position\nlike \"C\" is accepted.

\n\n

Arguments:

\n\n
x -- int or str\n\ncolumn -- Column\n
\n", "signature": "(\tself,\tx: int | str,\tcolumn: odfdo.table.Column | None = None) -> odfdo.table.Column:", "funcdef": "def"}, "odfdo.Table.append_column": {"fullname": "odfdo.Table.append_column", "modulename": "odfdo", "qualname": "Table.append_column", "kind": "function", "doc": "

Append the column at the end of the table. If no column is given,\nan empty one is created.

\n\n

ODF columns don't contain cells, only style information.

\n\n

Position start at 0. So cell C4 is on column 2. Alphabetical position\nlike \"C\" is accepted.

\n\n

Arguments:

\n\n
column -- Column\n
\n", "signature": "(\tself,\tcolumn: odfdo.table.Column | None = None,\t_repeated: int | None = None) -> odfdo.table.Column:", "funcdef": "def"}, "odfdo.Table.delete_column": {"fullname": "odfdo.Table.delete_column", "modulename": "odfdo", "qualname": "Table.delete_column", "kind": "function", "doc": "

Delete the column at the given position. ODF columns don't contain\ncells, only style information.

\n\n

Position start at 0. So cell C4 is on column 2. Alphabetical position\nlike \"C\" is accepted.

\n\n

Arguments:

\n\n
x -- int or str\n
\n", "signature": "(self, x: int | str) -> None:", "funcdef": "def"}, "odfdo.Table.get_column_cells": {"fullname": "odfdo.Table.get_column_cells", "modulename": "odfdo", "qualname": "Table.get_column_cells", "kind": "function", "doc": "

Get the list of cells at the given position.

\n\n

Position start at 0. So cell C4 is on column 2. Alphabetical position\nlike \"C\" is accepted.

\n\n

Filter by cell_type, with cell_type 'all' will retrieve cells of any\ntype, aka non empty cells.

\n\n

If complete is True, replace missing values by None.

\n\n

Arguments:

\n\n
x -- int or str\n\ncell_type -- 'boolean', 'float', 'date', 'string', 'time',\n             'currency', 'percentage' or 'all'\n\ncontent -- str regex\n\nstyle -- str\n\ncomplete -- boolean\n
\n\n

Return: list of Cell

\n", "signature": "(\tself,\tx: int | str,\tstyle: str | None = None,\tcontent: str | None = None,\tcell_type: str | None = None,\tcomplete: bool = False) -> list[odfdo.cell.Cell | None]:", "funcdef": "def"}, "odfdo.Table.get_column_values": {"fullname": "odfdo.Table.get_column_values", "modulename": "odfdo", "qualname": "Table.get_column_values", "kind": "function", "doc": "

Shortcut to get the list of Python values for the cells at the\ngiven position.

\n\n

Position start at 0. So cell C4 is on column 2. Alphabetical position\nlike \"C\" is accepted.

\n\n

Filter by cell_type, with cell_type 'all' will retrieve cells of any\ntype, aka non empty cells.\nIf cell_type and complete is True, replace missing values by None.

\n\n

If get_type is True, returns a tuple (value, ODF type of value)

\n\n

Arguments:

\n\n
x -- int or str\n\ncell_type -- 'boolean', 'float', 'date', 'string', 'time',\n             'currency', 'percentage' or 'all'\n\ncomplete -- boolean\n\nget_type -- boolean\n
\n\n

Return: list of Python types

\n", "signature": "(\tself,\tx: int | str,\tcell_type: str | None = None,\tcomplete: bool = True,\tget_type: bool = False) -> list[typing.Any]:", "funcdef": "def"}, "odfdo.Table.set_column_cells": {"fullname": "odfdo.Table.set_column_cells", "modulename": "odfdo", "qualname": "Table.set_column_cells", "kind": "function", "doc": "

Shortcut to set the list of cells at the given position.

\n\n

Position start at 0. So cell C4 is on column 2. Alphabetical position\nlike \"C\" is accepted.

\n\n

The list must have the same length than the table height.

\n\n

Arguments:

\n\n
x -- int or str\n\ncells -- list of Cell\n
\n", "signature": "(self, x: int | str, cells: list[odfdo.cell.Cell]) -> None:", "funcdef": "def"}, "odfdo.Table.set_column_values": {"fullname": "odfdo.Table.set_column_values", "modulename": "odfdo", "qualname": "Table.set_column_values", "kind": "function", "doc": "

Shortcut to set the list of Python values of cells at the given\nposition.

\n\n

Position start at 0. So cell C4 is on column 2. Alphabetical position\nlike \"C\" is accepted.

\n\n

The list must have the same length than the table height.

\n\n

Arguments:

\n\n
x -- int or str\n\nvalues -- list of Python types\n\ncell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',\n             'string' or 'time'\n\ncurrency -- three-letter str\n\nstyle -- str\n
\n", "signature": "(\tself,\tx: int | str,\tvalues: list,\tcell_type: str | None = None,\tcurrency: str | None = None,\tstyle: str | None = None) -> None:", "funcdef": "def"}, "odfdo.Table.is_column_empty": {"fullname": "odfdo.Table.is_column_empty", "modulename": "odfdo", "qualname": "Table.is_column_empty", "kind": "function", "doc": "

Return wether every cell in the column at \"x\" position has no value\nor the value evaluates to False (empty string), and no style.

\n\n

Position start at 0. So cell C4 is on column 2. Alphabetical position\nlike \"C\" is accepted.

\n\n

If aggressive is True, empty cells with style are considered empty.

\n\n

Return: bool

\n", "signature": "(self, x: int | str, aggressive: bool = False) -> bool:", "funcdef": "def"}, "odfdo.Table.get_named_ranges": {"fullname": "odfdo.Table.get_named_ranges", "modulename": "odfdo", "qualname": "Table.get_named_ranges", "kind": "function", "doc": "

Returns the list of available Name Ranges of the spreadsheet. If\ntable_name is provided, limits the search to these tables.\nBeware : named ranges are stored at the body level, thus do not call\nthis method on a cloned table.

\n\n

Arguments:

\n\n
table_names -- str or list of str, names of tables\n
\n\n

Return : list of table_range

\n", "signature": "(\tself,\ttable_name: str | list[str] | None = None) -> list[odfdo.table.NamedRange]:", "funcdef": "def"}, "odfdo.Table.get_named_range": {"fullname": "odfdo.Table.get_named_range", "modulename": "odfdo", "qualname": "Table.get_named_range", "kind": "function", "doc": "

Returns the Name Ranges of the specified name. If\ntable_name is provided, limits the search to these tables.\nBeware : named ranges are stored at the body level, thus do not call\nthis method on a cloned table.

\n\n

Arguments:

\n\n
name -- str, name of the named range object\n
\n\n

Return : NamedRange

\n", "signature": "(self, name: str) -> odfdo.table.NamedRange:", "funcdef": "def"}, "odfdo.Table.set_named_range": {"fullname": "odfdo.Table.set_named_range", "modulename": "odfdo", "qualname": "Table.set_named_range", "kind": "function", "doc": "

Create a Named Range element and insert it in the document.\nBeware : named ranges are stored at the body level, thus do not call\nthis method on a cloned table.

\n\n

Arguments:

\n\n
name -- str, name of the named range\n\ncrange -- str or tuple of int, cell or area coordinate\n\ntable_name -- str, name of the table\n\nuage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'\n
\n", "signature": "(\tself,\tname: str,\tcrange: str | tuple | list,\ttable_name: str | None = None,\tusage: str | None = None) -> None:", "funcdef": "def"}, "odfdo.Table.delete_named_range": {"fullname": "odfdo.Table.delete_named_range", "modulename": "odfdo", "qualname": "Table.delete_named_range", "kind": "function", "doc": "

Delete the Named Range of specified name from the spreadsheet.\nBeware : named ranges are stored at the body level, thus do not call\nthis method on a cloned table.

\n\n

Arguments:

\n\n
name -- str\n
\n", "signature": "(self, name: str) -> None:", "funcdef": "def"}, "odfdo.Table.set_span": {"fullname": "odfdo.Table.set_span", "modulename": "odfdo", "qualname": "Table.set_span", "kind": "function", "doc": "

Create a Cell Span : span the first cell of the area on several\ncolumns and/or rows.\nIf merge is True, replace text of the cell by the concatenation of\nexisting text in covered cells.\nBeware : if merge is True, old text is changed, if merge is False\n(the default), old text in coverd cells is still present but not\ndisplayed by most GUI.

\n\n

If the area defines only one cell, the set span will do nothing.\nIt is not allowed to apply set span to an area whose one cell already\nbelongs to previous cell span.

\n\n

Area can be either one cell (like 'A1') or an area ('A1:B2'). It can\nbe provided as an alpha numeric value like \"A1:B2' or a tuple like\n(0, 0, 1, 1) or (0, 0).

\n\n

Arguments:

\n\n
area -- str or tuple of int, cell or area coordinate\n\nmerge -- boolean\n
\n", "signature": "(self, area: str | tuple | list, merge: bool = False) -> bool:", "funcdef": "def"}, "odfdo.Table.del_span": {"fullname": "odfdo.Table.del_span", "modulename": "odfdo", "qualname": "Table.del_span", "kind": "function", "doc": "

Delete a Cell Span. 'area' is the cell coordiante of the upper left\ncell of the spanned area.

\n\n

Area can be either one cell (like 'A1') or an area ('A1:B2'). It can\nbe provided as an alpha numeric value like \"A1:B2' or a tuple like\n(0, 0, 1, 1) or (0, 0). If an area is provided, the upper left cell\nis used.

\n\n

Arguments:

\n\n
area -- str or tuple of int, cell or area coordinate\n
\n", "signature": "(self, area: str | tuple | list) -> bool:", "funcdef": "def"}, "odfdo.Table.to_csv": {"fullname": "odfdo.Table.to_csv", "modulename": "odfdo", "qualname": "Table.to_csv", "kind": "function", "doc": "

Write the table as CSV in the file.

\n\n

If the file is a string, it is opened as a local path. Else an\nopened file-like is expected.

\n\n

Arguments:

\n\n
path_or_file -- str or file-like\n\ndialect -- str, python csv.dialect, can be 'excel', 'unix'...\n
\n", "signature": "(\tself,\tpath_or_file: str | pathlib.Path | None = None,\tdialect: str = 'excel') -> Any:", "funcdef": "def"}, "odfdo.Text": {"fullname": "odfdo.Text", "modulename": "odfdo", "qualname": "Text", "kind": "class", "doc": "

Representation of an XML text node. Created to hide the specifics of\nlxml in searching text nodes using XPath.

\n\n

Constructed like any str object but only accepts lxml text objects.

\n", "bases": "builtins.str"}, "odfdo.Text.__init__": {"fullname": "odfdo.Text.__init__", "modulename": "odfdo", "qualname": "Text.__init__", "kind": "function", "doc": "

\n", "signature": "(\ttext_result: lxml.etree._ElementUnicodeResult | lxml.etree._ElementStringResult)"}, "odfdo.Text.parent": {"fullname": "odfdo.Text.parent", "modulename": "odfdo", "qualname": "Text.parent", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.element.Element | None"}, "odfdo.Text.is_text": {"fullname": "odfdo.Text.is_text", "modulename": "odfdo", "qualname": "Text.is_text", "kind": "function", "doc": "

\n", "signature": "(self) -> bool:", "funcdef": "def"}, "odfdo.Text.is_tail": {"fullname": "odfdo.Text.is_tail", "modulename": "odfdo", "qualname": "Text.is_tail", "kind": "function", "doc": "

\n", "signature": "(self) -> bool:", "funcdef": "def"}, "odfdo.TextChange": {"fullname": "odfdo.TextChange", "modulename": "odfdo", "qualname": "TextChange", "kind": "class", "doc": "

The TextChange \"text:change\" element marks a position in an empty\nregion where text has been deleted.

\n", "bases": "odfdo.element.Element"}, "odfdo.TextChange.get_id": {"fullname": "odfdo.TextChange.get_id", "modulename": "odfdo", "qualname": "TextChange.get_id", "kind": "function", "doc": "

\n", "signature": "(self) -> str | None:", "funcdef": "def"}, "odfdo.TextChange.set_id": {"fullname": "odfdo.TextChange.set_id", "modulename": "odfdo", "qualname": "TextChange.set_id", "kind": "function", "doc": "

\n", "signature": "(self, idx: str) -> None:", "funcdef": "def"}, "odfdo.TextChange.get_changed_region": {"fullname": "odfdo.TextChange.get_changed_region", "modulename": "odfdo", "qualname": "TextChange.get_changed_region", "kind": "function", "doc": "

\n", "signature": "(\tself,\ttracked_changes: odfdo.element.Element | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.TextChange.get_change_info": {"fullname": "odfdo.TextChange.get_change_info", "modulename": "odfdo", "qualname": "TextChange.get_change_info", "kind": "function", "doc": "

\n", "signature": "(\tself,\ttracked_changes: odfdo.element.Element | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.TextChange.get_change_element": {"fullname": "odfdo.TextChange.get_change_element", "modulename": "odfdo", "qualname": "TextChange.get_change_element", "kind": "function", "doc": "

\n", "signature": "(\tself,\ttracked_changes: odfdo.element.Element | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.TextChange.get_deleted": {"fullname": "odfdo.TextChange.get_deleted", "modulename": "odfdo", "qualname": "TextChange.get_deleted", "kind": "function", "doc": "

Shortcut to get the deleted informations stored in the\nTextDeletion stored in the tracked changes.

\n\n

Return: Paragraph (or None).\"

\n", "signature": "(\tself,\ttracked_changes: odfdo.element.Element | None = None,\tas_text: bool = False,\tno_header: bool = False,\tclean: bool = True) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.TextChange.get_inserted": {"fullname": "odfdo.TextChange.get_inserted", "modulename": "odfdo", "qualname": "TextChange.get_inserted", "kind": "function", "doc": "

Return None.

\n", "signature": "(\tself,\tas_text: bool = False,\tno_header: bool = False,\tclean: bool = True) -> str | odfdo.element.Element | list[odfdo.element.Element] | None:", "funcdef": "def"}, "odfdo.TextChange.get_start": {"fullname": "odfdo.TextChange.get_start", "modulename": "odfdo", "qualname": "TextChange.get_start", "kind": "function", "doc": "

Return None.

\n", "signature": "(self) -> odfdo.tracked_changes.TextChangeStart | None:", "funcdef": "def"}, "odfdo.TextChange.get_end": {"fullname": "odfdo.TextChange.get_end", "modulename": "odfdo", "qualname": "TextChange.get_end", "kind": "function", "doc": "

Return None.

\n", "signature": "(self) -> odfdo.tracked_changes.TextChangeEnd | None:", "funcdef": "def"}, "odfdo.TextChangeEnd": {"fullname": "odfdo.TextChangeEnd", "modulename": "odfdo", "qualname": "TextChangeEnd", "kind": "class", "doc": "

The TextChangeEnd \"text:change-end\" element marks the end of a region\nwith content where text has been inserted or the format has been\nchanged.

\n", "bases": "odfdo.tracked_changes.TextChange"}, "odfdo.TextChangeEnd.get_start": {"fullname": "odfdo.TextChangeEnd.get_start", "modulename": "odfdo", "qualname": "TextChangeEnd.get_start", "kind": "function", "doc": "

Return the corresponding annotation starting tag or None.

\n", "signature": "(self) -> odfdo.tracked_changes.TextChangeStart | None:", "funcdef": "def"}, "odfdo.TextChangeEnd.get_end": {"fullname": "odfdo.TextChangeEnd.get_end", "modulename": "odfdo", "qualname": "TextChangeEnd.get_end", "kind": "function", "doc": "

Return self.

\n", "signature": "(self) -> odfdo.tracked_changes.TextChangeEnd | None:", "funcdef": "def"}, "odfdo.TextChangeEnd.get_deleted": {"fullname": "odfdo.TextChangeEnd.get_deleted", "modulename": "odfdo", "qualname": "TextChangeEnd.get_deleted", "kind": "function", "doc": "

Return None.

\n", "signature": "(self, *args: Any, **kwargs: Any) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.TextChangeEnd.get_inserted": {"fullname": "odfdo.TextChangeEnd.get_inserted", "modulename": "odfdo", "qualname": "TextChangeEnd.get_inserted", "kind": "function", "doc": "

Return the content between text:change-start and text:change-end.

\n\n

If no content exists (deletion tag), returns None (or '' if text flag\nis True).\nIf as_text is True: returns the text content.\nIf clean is True: suppress unwanted tags (deletions marks, ...)\nIf no_header is True: existing text:h are changed in text:p\nBy default: returns a list of Element, cleaned and with headers

\n\n

Arguments:

\n\n
as_text -- boolean\n\nclean -- boolean\n\nno_header -- boolean\n
\n\n

Return: list or Element or text

\n", "signature": "(\tself,\tas_text: bool = False,\tno_header: bool = False,\tclean: bool = True) -> str | odfdo.element.Element | list[odfdo.element.Element] | None:", "funcdef": "def"}, "odfdo.TextChangeStart": {"fullname": "odfdo.TextChangeStart", "modulename": "odfdo", "qualname": "TextChangeStart", "kind": "class", "doc": "

The TextChangeStart \"text:change-start\" element marks the start of a\nregion with content where text has been inserted or the format has\nbeen changed.

\n", "bases": "odfdo.tracked_changes.TextChangeEnd"}, "odfdo.TextChangeStart.get_start": {"fullname": "odfdo.TextChangeStart.get_start", "modulename": "odfdo", "qualname": "TextChangeStart.get_start", "kind": "function", "doc": "

Return self.

\n", "signature": "(self) -> odfdo.tracked_changes.TextChangeStart:", "funcdef": "def"}, "odfdo.TextChangeStart.get_end": {"fullname": "odfdo.TextChangeStart.get_end", "modulename": "odfdo", "qualname": "TextChangeStart.get_end", "kind": "function", "doc": "

Return the corresponding change-end tag or None.

\n", "signature": "(self) -> odfdo.tracked_changes.TextChangeEnd:", "funcdef": "def"}, "odfdo.TextChangeStart.delete": {"fullname": "odfdo.TextChangeStart.delete", "modulename": "odfdo", "qualname": "TextChangeStart.delete", "kind": "function", "doc": "

Delete the given element from the XML tree. If no element is given,\n\"self\" is deleted. The XML library may allow to continue to use an\nelement now \"orphan\" as long as you have a reference to it.

\n\n

For TextChangeStart : delete also the end tag if exists.

\n\n

Arguments:

\n\n
child -- Element\n\nkeep_tail -- boolean (default to True), True for most usages.\n
\n", "signature": "(\tself,\tchild: odfdo.element.Element | None = None,\tkeep_tail: bool = True) -> None:", "funcdef": "def"}, "odfdo.TextChangedRegion": {"fullname": "odfdo.TextChangedRegion", "modulename": "odfdo", "qualname": "TextChangedRegion", "kind": "class", "doc": "

Each TextChangedRegion \"text:changed-region\" element contains a single\nelement, one of TextInsertion, TextDeletion or TextFormatChange that\ncorresponds to a change being tracked within the scope of the\n\"text:tracked-changes\" element that contains the \"text:changed-region\"\ninstance.\nThe xml:id attribute of the TextChangedRegion is referenced\nfrom the \"text:change\", \"text:change-start\" and \"text:change-end\"\nelements that identify where the change applies to markup in the scope of\nthe \"text:tracked-changes\" element.

\n\n

Warning : for this implementation, text:change should be referenced only\n once in the scope, which is different from ODF 1.2 requirement:\n \" A \"text:changed-region\" can be referenced by more than one\n change, but the corresponding referencing change mark elements\n shall be of the same change type - insertion, format change or\n deletion. \"

\n", "bases": "odfdo.element.Element"}, "odfdo.TextChangedRegion.get_change_info": {"fullname": "odfdo.TextChangedRegion.get_change_info", "modulename": "odfdo", "qualname": "TextChangedRegion.get_change_info", "kind": "function", "doc": "

Shortcut to get the ChangeInfo element of the change\nelement child.

\n\n

Return: ChangeInfo element.

\n", "signature": "(self) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.TextChangedRegion.set_change_info": {"fullname": "odfdo.TextChangedRegion.set_change_info", "modulename": "odfdo", "qualname": "TextChangedRegion.set_change_info", "kind": "function", "doc": "

Shortcut to set the ChangeInfo element of the sub change element.\nSee TextInsertion.set_change_info() for details.

\n\n

Arguments:

\n\n
 change_info -- ChangeInfo element (or None)\n\n cretor -- str (or None)\n\n date -- datetime (or None)\n\n comments -- Paragraph or list of Paragraph elements (or None)\n
\n", "signature": "(\tself,\tchange_info: odfdo.element.Element | None = None,\tcreator: str | None = None,\tdate: datetime.datetime | None = None,\tcomments: odfdo.element.Element | list[odfdo.element.Element] | None = None) -> None:", "funcdef": "def"}, "odfdo.TextChangedRegion.get_change_element": {"fullname": "odfdo.TextChangedRegion.get_change_element", "modulename": "odfdo", "qualname": "TextChangedRegion.get_change_element", "kind": "function", "doc": "

Get the change element child. It can be either: TextInsertion,\nTextDeletion, or TextFormatChange as an Element object.

\n\n

Return: Element.

\n", "signature": "(self) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.TextChangedRegion.get_id": {"fullname": "odfdo.TextChangedRegion.get_id", "modulename": "odfdo", "qualname": "TextChangedRegion.get_id", "kind": "function", "doc": "

Get the \"text:id\" attribute.

\n\n

Return: str

\n", "signature": "(self) -> str | None:", "funcdef": "def"}, "odfdo.TextChangedRegion.set_id": {"fullname": "odfdo.TextChangedRegion.set_id", "modulename": "odfdo", "qualname": "TextChangedRegion.set_id", "kind": "function", "doc": "

Set both the \"text:id\" and \"xml:id\" attributes with same value.

\n", "signature": "(self, idx: str) -> None:", "funcdef": "def"}, "odfdo.TextDeletion": {"fullname": "odfdo.TextDeletion", "modulename": "odfdo", "qualname": "TextDeletion", "kind": "class", "doc": "

The TextDeletion \"text:deletion\" contains information that identifies\nthe person responsible for a deletion and the date of that deletion.\nThis information may also contain one or more Paragraph which contains\na comment on the deletion. The TextDeletion element may also contain\ncontent that was deleted while change tracking was enabled. The position\nwhere the text was deleted is marked by a \"text:change\" element. Deleted\ntext is contained in a paragraph element. To reconstruct the original\ntext, the paragraph containing the deleted text is merged with its\nsurrounding paragraph or heading element. To reconstruct the text before\na deletion took place:

\n\n
    \n
  • If the change mark is inside a paragraph, insert the content that was\ndeleted, but remove all leading start tags up to and including the\nfirst \"text:p\" element and all trailing end tags up to and including\nthe last \"/text:p\" or \"/text:h\" element. If the last trailing element\nis a \"/text:h\", change the end tag \"/text:p\" following this insertion\nto a \"/text:h\" element.
  • \n
  • If the change mark is inside a heading, insert the content that was\ndeleted, but remove all leading start tags up to and including the\nfirst \"text:h\" element and all trailing end tags up to and including\nthe last \"/text:h\" or \"/text:p\" element. If the last trailing element\nis a \"/text:p\", change the end tag \"/text:h\" following this insertion\nto a \"/text:p\" element.
  • \n
  • Otherwise, copy the text content of the \"text:deletion\" element in\nplace of the change mark.
  • \n
\n", "bases": "odfdo.tracked_changes.TextInsertion"}, "odfdo.TextDeletion.get_deleted": {"fullname": "odfdo.TextDeletion.get_deleted", "modulename": "odfdo", "qualname": "TextDeletion.get_deleted", "kind": "function", "doc": "

Get the deleted informations stored in the TextDeletion.\nIf as_text is True: returns the text content.\nIf no_header is True: existing Heading are changed in Paragraph

\n\n

Arguments:

\n\n
as_text -- boolean\n\nno_header -- boolean\n
\n\n

Return: Paragraph and Header list

\n", "signature": "(\tself,\tas_text: bool = False,\tno_header: bool = False) -> str | list[odfdo.element.Element] | None:", "funcdef": "def"}, "odfdo.TextDeletion.set_deleted": {"fullname": "odfdo.TextDeletion.set_deleted", "modulename": "odfdo", "qualname": "TextDeletion.set_deleted", "kind": "function", "doc": "

Set the deleted informations stored in the TextDeletion. An\nactual content that was deleted is expected, embeded in a Paragraph\nelement or Header.

\n\n

Arguments:

\n\n
paragraph_or_list -- Paragraph or Header element (or list)\n
\n", "signature": "(\tself,\tparagraph_or_list: odfdo.element.Element | list[odfdo.element.Element]) -> None:", "funcdef": "def"}, "odfdo.TextDeletion.get_inserted": {"fullname": "odfdo.TextDeletion.get_inserted", "modulename": "odfdo", "qualname": "TextDeletion.get_inserted", "kind": "function", "doc": "

Return None.

\n", "signature": "(\tself,\tas_text: bool = False,\tno_header: bool = False,\tclean: bool = True) -> str | odfdo.element.Element | list[odfdo.element.Element] | None:", "funcdef": "def"}, "odfdo.TextFormatChange": {"fullname": "odfdo.TextFormatChange", "modulename": "odfdo", "qualname": "TextFormatChange", "kind": "class", "doc": "

The TextFormatChange \"text:format-change\" element represents any change\nin formatting attributes. The region where the change took place is\nmarked by \"text:change-start\", \"text:change-end\" or \"text:change\"\nelements.

\n\n

Note: This element does not contain formatting changes that have taken\nplace.

\n", "bases": "odfdo.tracked_changes.TextInsertion"}, "odfdo.TextInsertion": {"fullname": "odfdo.TextInsertion", "modulename": "odfdo", "qualname": "TextInsertion", "kind": "class", "doc": "

The TextInsertion \"text:insertion\" element contains the information\nthat identifies the person responsible for a change and the date of\nthat change. This information may also contain one or more \"text:p\"\nParagraph which contain a comment on the insertion. The\nTextInsertion element's parent \"text:changed-region\" element has an\nxml:id or text:id attribute, the value of which binds that parent\nelement to the text:change-id attribute on the \"text:change-start\"\nand \"text:change-end\" elements.

\n", "bases": "odfdo.element.Element"}, "odfdo.TextInsertion.get_deleted": {"fullname": "odfdo.TextInsertion.get_deleted", "modulename": "odfdo", "qualname": "TextInsertion.get_deleted", "kind": "function", "doc": "

Return: None.

\n", "signature": "(\tself,\tas_text: bool = False,\tno_header: bool = False) -> str | list[odfdo.element.Element] | None:", "funcdef": "def"}, "odfdo.TextInsertion.get_inserted": {"fullname": "odfdo.TextInsertion.get_inserted", "modulename": "odfdo", "qualname": "TextInsertion.get_inserted", "kind": "function", "doc": "

Shortcut to text:change-start.get_inserted(). Return the content\nbetween text:change-start and text:change-end.

\n\n

If as_text is True: returns the text content.\nIf no_header is True: existing Heading are changed in Paragraph\nIf no_header is True: existing text:h are changed in text:p\nBy default: returns a list of Element, cleaned and with headers

\n\n

Arguments:

\n\n
as_text -- boolean\n\nclean -- boolean\n\nno_header -- boolean\n
\n\n

Return: list or Element or text

\n", "signature": "(\tself,\tas_text: bool = False,\tno_header: bool = False,\tclean: bool = True) -> str | odfdo.element.Element | list[odfdo.element.Element] | None:", "funcdef": "def"}, "odfdo.TextInsertion.get_change_info": {"fullname": "odfdo.TextInsertion.get_change_info", "modulename": "odfdo", "qualname": "TextInsertion.get_change_info", "kind": "function", "doc": "

Get the ChangeInfo child of the element.

\n\n

Return: ChangeInfo element.

\n", "signature": "(self) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.TextInsertion.set_change_info": {"fullname": "odfdo.TextInsertion.set_change_info", "modulename": "odfdo", "qualname": "TextInsertion.set_change_info", "kind": "function", "doc": "

Set the ChangeInfo element for the change element. If change_info\nis not provided, creator, date and comments will be used to build a\nsuitable change info element. Default for creator is 'Unknown',\ndefault for date is current time and default for comments is no\ncomment at all.\nThe new change info element will replace any existant ChangeInfo.

\n\n

Arguments:

\n\n
 change_info -- ChangeInfo element (or None)\n\n cretor -- str (or None)\n\n date -- datetime (or None)\n\n comments -- Paragraph or list of Paragraph elements (or None)\n
\n", "signature": "(\tself,\tchange_info: odfdo.element.Element | None = None,\tcreator: str | None = None,\tdate: datetime.datetime | None = None,\tcomments: odfdo.element.Element | list[odfdo.element.Element] | None = None) -> None:", "funcdef": "def"}, "odfdo.TocEntryTemplate": {"fullname": "odfdo.TocEntryTemplate", "modulename": "odfdo", "qualname": "TocEntryTemplate", "kind": "class", "doc": "

ODF \"text:table-of-content-entry-template\"

\n\n

Arguments:

\n\n
style -- str\n
\n", "bases": "odfdo.element.Element"}, "odfdo.TocEntryTemplate.__init__": {"fullname": "odfdo.TocEntryTemplate.__init__", "modulename": "odfdo", "qualname": "TocEntryTemplate.__init__", "kind": "function", "doc": "

\n", "signature": "(\tstyle: str | None = None,\toutline_level: int | None = None,\t**kwargs: Any)"}, "odfdo.TocEntryTemplate.outline_level": {"fullname": "odfdo.TocEntryTemplate.outline_level", "modulename": "odfdo", "qualname": "TocEntryTemplate.outline_level", "kind": "variable", "doc": "

\n", "annotation": ": int | None"}, "odfdo.TocEntryTemplate.complete_defaults": {"fullname": "odfdo.TocEntryTemplate.complete_defaults", "modulename": "odfdo", "qualname": "TocEntryTemplate.complete_defaults", "kind": "function", "doc": "

\n", "signature": "(self) -> None:", "funcdef": "def"}, "odfdo.TocEntryTemplate.style": {"fullname": "odfdo.TocEntryTemplate.style", "modulename": "odfdo", "qualname": "TocEntryTemplate.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.TrackedChanges": {"fullname": "odfdo.TrackedChanges", "modulename": "odfdo", "qualname": "TrackedChanges", "kind": "class", "doc": "

The TrackedChanges \"text:tracked-changes\" element acts as a container\nfor TextChangedRegion elements that represent changes in a certain\nscope of an OpenDocument document. This scope is the element in which\nthe TrackedChanges element occurs. Changes in this scope shall be\ntracked by TextChangedRegion elements contained in the\nTrackedChanges element in this scope. If a TrackedChanges\nelement is absent, there are no tracked changes in the corresponding\nscope. In this case, all change mark elements in this scope shall be\nignored.

\n", "bases": "odfdo.element.Element"}, "odfdo.TrackedChanges.get_changed_regions": {"fullname": "odfdo.TrackedChanges.get_changed_regions", "modulename": "odfdo", "qualname": "TrackedChanges.get_changed_regions", "kind": "function", "doc": "

\n", "signature": "(\tself,\tcreator: str | None = None,\tdate: datetime.datetime | None = None,\tcontent: str | None = None,\trole: str | None = None) -> list[odfdo.element.Element]:", "funcdef": "def"}, "odfdo.TrackedChanges.get_changed_region": {"fullname": "odfdo.TrackedChanges.get_changed_region", "modulename": "odfdo", "qualname": "TrackedChanges.get_changed_region", "kind": "function", "doc": "

\n", "signature": "(\tself,\tposition: int = 0,\ttext_id: str | None = None,\tcreator: str | None = None,\tdate: datetime.datetime | None = None,\tcontent: str | None = None) -> odfdo.element.Element | None:", "funcdef": "def"}, "odfdo.UserDefined": {"fullname": "odfdo.UserDefined", "modulename": "odfdo", "qualname": "UserDefined", "kind": "class", "doc": "

Return a user defined field \"text:user-defined\". If the current\ndocument is provided, try to extract the content of the meta user defined\nfield of same name.

\n\n

Arguments:

\n\n
name -- str, name of the user defined field\n\nvalue -- python typed value, value of the field\n\nvalue_type -- str, office:value-type known type\n\ntext -- str\n\nstyle -- str\n\nfrom_document -- ODF document\n
\n", "bases": "odfdo.element_typed.ElementTyped"}, "odfdo.UserDefined.__init__": {"fullname": "odfdo.UserDefined.__init__", "modulename": "odfdo", "qualname": "UserDefined.__init__", "kind": "function", "doc": "

\n", "signature": "(\tname: str = '',\tvalue: Any = None,\tvalue_type: str | None = None,\ttext: str | None = None,\tstyle: str | None = None,\tfrom_document: odfdo.document.Document | None = None,\t**kwargs: Any)"}, "odfdo.UserDefined.name": {"fullname": "odfdo.UserDefined.name", "modulename": "odfdo", "qualname": "UserDefined.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.UserDefined.style": {"fullname": "odfdo.UserDefined.style", "modulename": "odfdo", "qualname": "UserDefined.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.UserFieldDecl": {"fullname": "odfdo.UserFieldDecl", "modulename": "odfdo", "qualname": "UserFieldDecl", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element_typed.ElementTyped"}, "odfdo.UserFieldDecl.__init__": {"fullname": "odfdo.UserFieldDecl.__init__", "modulename": "odfdo", "qualname": "UserFieldDecl.__init__", "kind": "function", "doc": "

\n", "signature": "(\tname: str | None = None,\tvalue: Any = None,\tvalue_type: str | None = None,\t**kwargs: Any)"}, "odfdo.UserFieldDecl.set_value": {"fullname": "odfdo.UserFieldDecl.set_value", "modulename": "odfdo", "qualname": "UserFieldDecl.set_value", "kind": "function", "doc": "

\n", "signature": "(self, value: Any) -> None:", "funcdef": "def"}, "odfdo.UserFieldDecl.name": {"fullname": "odfdo.UserFieldDecl.name", "modulename": "odfdo", "qualname": "UserFieldDecl.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.UserFieldDecls": {"fullname": "odfdo.UserFieldDecls", "modulename": "odfdo", "qualname": "UserFieldDecls", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element.Element"}, "odfdo.UserFieldGet": {"fullname": "odfdo.UserFieldGet", "modulename": "odfdo", "qualname": "UserFieldGet", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element_typed.ElementTyped"}, "odfdo.UserFieldGet.__init__": {"fullname": "odfdo.UserFieldGet.__init__", "modulename": "odfdo", "qualname": "UserFieldGet.__init__", "kind": "function", "doc": "

\n", "signature": "(\tname: str | None = None,\tvalue: Any = None,\tvalue_type: str | None = None,\ttext: str | None = None,\tstyle: str | None = None,\t**kwargs: Any)"}, "odfdo.UserFieldGet.name": {"fullname": "odfdo.UserFieldGet.name", "modulename": "odfdo", "qualname": "UserFieldGet.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.UserFieldGet.style": {"fullname": "odfdo.UserFieldGet.style", "modulename": "odfdo", "qualname": "UserFieldGet.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.UserFieldInput": {"fullname": "odfdo.UserFieldInput", "modulename": "odfdo", "qualname": "UserFieldInput", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.variable.UserFieldGet"}, "odfdo.UserFieldInput.name": {"fullname": "odfdo.UserFieldInput.name", "modulename": "odfdo", "qualname": "UserFieldInput.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.UserFieldInput.style": {"fullname": "odfdo.UserFieldInput.style", "modulename": "odfdo", "qualname": "UserFieldInput.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarChapter": {"fullname": "odfdo.VarChapter", "modulename": "odfdo", "qualname": "VarChapter", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element.Element"}, "odfdo.VarChapter.__init__": {"fullname": "odfdo.VarChapter.__init__", "modulename": "odfdo", "qualname": "VarChapter.__init__", "kind": "function", "doc": "

display can be: 'number', 'name', 'number-and-name', 'plain-number' or\n'plain-number-and-name'

\n", "signature": "(\tdisplay: str | None = 'name',\toutline_level: str | None = None,\t**kwargs: Any)"}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"fullname": "odfdo.VarChapter.DISPLAY_VALUE_CHOICE", "modulename": "odfdo", "qualname": "VarChapter.DISPLAY_VALUE_CHOICE", "kind": "variable", "doc": "

\n", "default_value": "{'name', 'plain-number-and-name', 'plain-number', 'number', 'number-and-name'}"}, "odfdo.VarChapter.display": {"fullname": "odfdo.VarChapter.display", "modulename": "odfdo", "qualname": "VarChapter.display", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarChapter.outline_level": {"fullname": "odfdo.VarChapter.outline_level", "modulename": "odfdo", "qualname": "VarChapter.outline_level", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarCreationDate": {"fullname": "odfdo.VarCreationDate", "modulename": "odfdo", "qualname": "VarCreationDate", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element.Element"}, "odfdo.VarCreationDate.__init__": {"fullname": "odfdo.VarCreationDate.__init__", "modulename": "odfdo", "qualname": "VarCreationDate.__init__", "kind": "function", "doc": "

\n", "signature": "(fixed: bool = False, data_style: str | None = None, **kwargs: Any)"}, "odfdo.VarCreationDate.fixed": {"fullname": "odfdo.VarCreationDate.fixed", "modulename": "odfdo", "qualname": "VarCreationDate.fixed", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarCreationDate.data_style": {"fullname": "odfdo.VarCreationDate.data_style", "modulename": "odfdo", "qualname": "VarCreationDate.data_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarCreationTime": {"fullname": "odfdo.VarCreationTime", "modulename": "odfdo", "qualname": "VarCreationTime", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element.Element"}, "odfdo.VarCreationTime.__init__": {"fullname": "odfdo.VarCreationTime.__init__", "modulename": "odfdo", "qualname": "VarCreationTime.__init__", "kind": "function", "doc": "

\n", "signature": "(fixed: bool = False, data_style: str | None = None, **kwargs: Any)"}, "odfdo.VarCreationTime.fixed": {"fullname": "odfdo.VarCreationTime.fixed", "modulename": "odfdo", "qualname": "VarCreationTime.fixed", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarCreationTime.data_style": {"fullname": "odfdo.VarCreationTime.data_style", "modulename": "odfdo", "qualname": "VarCreationTime.data_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarDate": {"fullname": "odfdo.VarDate", "modulename": "odfdo", "qualname": "VarDate", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element.Element"}, "odfdo.VarDate.__init__": {"fullname": "odfdo.VarDate.__init__", "modulename": "odfdo", "qualname": "VarDate.__init__", "kind": "function", "doc": "

\n", "signature": "(\tdate: datetime.datetime | None = None,\tfixed: bool = False,\tdata_style: str | None = None,\ttext: str | None = None,\tdate_adjust: datetime.timedelta | None = None,\t**kwargs: Any)"}, "odfdo.VarDate.date": {"fullname": "odfdo.VarDate.date", "modulename": "odfdo", "qualname": "VarDate.date", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarDate.fixed": {"fullname": "odfdo.VarDate.fixed", "modulename": "odfdo", "qualname": "VarDate.fixed", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarDate.data_style": {"fullname": "odfdo.VarDate.data_style", "modulename": "odfdo", "qualname": "VarDate.data_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarDate.date_adjust": {"fullname": "odfdo.VarDate.date_adjust", "modulename": "odfdo", "qualname": "VarDate.date_adjust", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarDecl": {"fullname": "odfdo.VarDecl", "modulename": "odfdo", "qualname": "VarDecl", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element.Element"}, "odfdo.VarDecl.__init__": {"fullname": "odfdo.VarDecl.__init__", "modulename": "odfdo", "qualname": "VarDecl.__init__", "kind": "function", "doc": "

\n", "signature": "(\tname: str | None = None,\tvalue_type: str | None = None,\t**kwargs: Any)"}, "odfdo.VarDecl.name": {"fullname": "odfdo.VarDecl.name", "modulename": "odfdo", "qualname": "VarDecl.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarDecl.value_type": {"fullname": "odfdo.VarDecl.value_type", "modulename": "odfdo", "qualname": "VarDecl.value_type", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarDecls": {"fullname": "odfdo.VarDecls", "modulename": "odfdo", "qualname": "VarDecls", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element.Element"}, "odfdo.VarDescription": {"fullname": "odfdo.VarDescription", "modulename": "odfdo", "qualname": "VarDescription", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.variable.VarInitialCreator"}, "odfdo.VarDescription.fixed": {"fullname": "odfdo.VarDescription.fixed", "modulename": "odfdo", "qualname": "VarDescription.fixed", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarFileName": {"fullname": "odfdo.VarFileName", "modulename": "odfdo", "qualname": "VarFileName", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element.Element"}, "odfdo.VarFileName.__init__": {"fullname": "odfdo.VarFileName.__init__", "modulename": "odfdo", "qualname": "VarFileName.__init__", "kind": "function", "doc": "

display can be: 'full', 'path', 'name' or 'name-and-extension'

\n", "signature": "(display: str | None = 'full', fixed: bool = False, **kwargs: Any)"}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"fullname": "odfdo.VarFileName.DISPLAY_VALUE_CHOICE", "modulename": "odfdo", "qualname": "VarFileName.DISPLAY_VALUE_CHOICE", "kind": "variable", "doc": "

\n", "default_value": "{'name', 'name-and-extension', 'full', 'path'}"}, "odfdo.VarFileName.display": {"fullname": "odfdo.VarFileName.display", "modulename": "odfdo", "qualname": "VarFileName.display", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarFileName.fixed": {"fullname": "odfdo.VarFileName.fixed", "modulename": "odfdo", "qualname": "VarFileName.fixed", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarGet": {"fullname": "odfdo.VarGet", "modulename": "odfdo", "qualname": "VarGet", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element_typed.ElementTyped"}, "odfdo.VarGet.__init__": {"fullname": "odfdo.VarGet.__init__", "modulename": "odfdo", "qualname": "VarGet.__init__", "kind": "function", "doc": "

\n", "signature": "(\tname: str | None = None,\tvalue: Any = None,\tvalue_type: str | None = None,\ttext: str | None = None,\tstyle: str | None = None,\t**kwargs: Any)"}, "odfdo.VarGet.name": {"fullname": "odfdo.VarGet.name", "modulename": "odfdo", "qualname": "VarGet.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarGet.style": {"fullname": "odfdo.VarGet.style", "modulename": "odfdo", "qualname": "VarGet.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarInitialCreator": {"fullname": "odfdo.VarInitialCreator", "modulename": "odfdo", "qualname": "VarInitialCreator", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element.Element"}, "odfdo.VarInitialCreator.__init__": {"fullname": "odfdo.VarInitialCreator.__init__", "modulename": "odfdo", "qualname": "VarInitialCreator.__init__", "kind": "function", "doc": "

\n", "signature": "(fixed: bool = False, **kwargs: Any)"}, "odfdo.VarInitialCreator.fixed": {"fullname": "odfdo.VarInitialCreator.fixed", "modulename": "odfdo", "qualname": "VarInitialCreator.fixed", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarKeywords": {"fullname": "odfdo.VarKeywords", "modulename": "odfdo", "qualname": "VarKeywords", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.variable.VarInitialCreator"}, "odfdo.VarKeywords.fixed": {"fullname": "odfdo.VarKeywords.fixed", "modulename": "odfdo", "qualname": "VarKeywords.fixed", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarPageCount": {"fullname": "odfdo.VarPageCount", "modulename": "odfdo", "qualname": "VarPageCount", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element.Element"}, "odfdo.VarPageNumber": {"fullname": "odfdo.VarPageNumber", "modulename": "odfdo", "qualname": "VarPageNumber", "kind": "class", "doc": "

select_page -- string in ('previous', 'current', 'next')

\n\n

page_adjust -- int (to add or subtract to the page number)

\n", "bases": "odfdo.element.Element"}, "odfdo.VarPageNumber.__init__": {"fullname": "odfdo.VarPageNumber.__init__", "modulename": "odfdo", "qualname": "VarPageNumber.__init__", "kind": "function", "doc": "

\n", "signature": "(\tselect_page: str | None = None,\tpage_adjust: str | None = None,\t**kwargs: Any)"}, "odfdo.VarPageNumber.select_page": {"fullname": "odfdo.VarPageNumber.select_page", "modulename": "odfdo", "qualname": "VarPageNumber.select_page", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarPageNumber.page_adjust": {"fullname": "odfdo.VarPageNumber.page_adjust", "modulename": "odfdo", "qualname": "VarPageNumber.page_adjust", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarSet": {"fullname": "odfdo.VarSet", "modulename": "odfdo", "qualname": "VarSet", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element_typed.ElementTyped"}, "odfdo.VarSet.__init__": {"fullname": "odfdo.VarSet.__init__", "modulename": "odfdo", "qualname": "VarSet.__init__", "kind": "function", "doc": "

\n", "signature": "(\tname: str | None = None,\tvalue: Any = None,\tvalue_type: str | None = None,\tdisplay: str | bool = False,\ttext: str | None = None,\tstyle: str | None = None,\t**kwargs: Any)"}, "odfdo.VarSet.set_value": {"fullname": "odfdo.VarSet.set_value", "modulename": "odfdo", "qualname": "VarSet.set_value", "kind": "function", "doc": "

\n", "signature": "(self, value: Any) -> None:", "funcdef": "def"}, "odfdo.VarSet.name": {"fullname": "odfdo.VarSet.name", "modulename": "odfdo", "qualname": "VarSet.name", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarSet.style": {"fullname": "odfdo.VarSet.style", "modulename": "odfdo", "qualname": "VarSet.style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarSet.display": {"fullname": "odfdo.VarSet.display", "modulename": "odfdo", "qualname": "VarSet.display", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarSubject": {"fullname": "odfdo.VarSubject", "modulename": "odfdo", "qualname": "VarSubject", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.variable.VarInitialCreator"}, "odfdo.VarSubject.fixed": {"fullname": "odfdo.VarSubject.fixed", "modulename": "odfdo", "qualname": "VarSubject.fixed", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarTime": {"fullname": "odfdo.VarTime", "modulename": "odfdo", "qualname": "VarTime", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.element.Element"}, "odfdo.VarTime.__init__": {"fullname": "odfdo.VarTime.__init__", "modulename": "odfdo", "qualname": "VarTime.__init__", "kind": "function", "doc": "

\n", "signature": "(\ttime: datetime.datetime,\tfixed: bool = False,\tdata_style: str | None = None,\ttext: str | None = None,\ttime_adjust: datetime.timedelta | None = None,\t**kwargs: Any)"}, "odfdo.VarTime.time": {"fullname": "odfdo.VarTime.time", "modulename": "odfdo", "qualname": "VarTime.time", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarTime.fixed": {"fullname": "odfdo.VarTime.fixed", "modulename": "odfdo", "qualname": "VarTime.fixed", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarTime.data_style": {"fullname": "odfdo.VarTime.data_style", "modulename": "odfdo", "qualname": "VarTime.data_style", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarTime.time_adjust": {"fullname": "odfdo.VarTime.time_adjust", "modulename": "odfdo", "qualname": "VarTime.time_adjust", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.VarTitle": {"fullname": "odfdo.VarTitle", "modulename": "odfdo", "qualname": "VarTitle", "kind": "class", "doc": "

Super class of all ODF classes.

\n\n

Representation of an XML element. Abstraction of the XML library behind.

\n", "bases": "odfdo.variable.VarInitialCreator"}, "odfdo.VarTitle.fixed": {"fullname": "odfdo.VarTitle.fixed", "modulename": "odfdo", "qualname": "VarTitle.fixed", "kind": "variable", "doc": "

\n", "annotation": ": str | bool | None"}, "odfdo.XmlPart": {"fullname": "odfdo.XmlPart", "modulename": "odfdo", "qualname": "XmlPart", "kind": "class", "doc": "

Representation of an XML part.

\n\n

Abstraction of the XML library behind.

\n"}, "odfdo.XmlPart.__init__": {"fullname": "odfdo.XmlPart.__init__", "modulename": "odfdo", "qualname": "XmlPart.__init__", "kind": "function", "doc": "

\n", "signature": "(part_name: str, container: odfdo.container.Container)"}, "odfdo.XmlPart.part_name": {"fullname": "odfdo.XmlPart.part_name", "modulename": "odfdo", "qualname": "XmlPart.part_name", "kind": "variable", "doc": "

\n"}, "odfdo.XmlPart.container": {"fullname": "odfdo.XmlPart.container", "modulename": "odfdo", "qualname": "XmlPart.container", "kind": "variable", "doc": "

\n"}, "odfdo.XmlPart.root": {"fullname": "odfdo.XmlPart.root", "modulename": "odfdo", "qualname": "XmlPart.root", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.element.Element"}, "odfdo.XmlPart.get_elements": {"fullname": "odfdo.XmlPart.get_elements", "modulename": "odfdo", "qualname": "XmlPart.get_elements", "kind": "function", "doc": "

\n", "signature": "(\tself,\txpath_query: str) -> list[odfdo.element.Element | odfdo.element.Text]:", "funcdef": "def"}, "odfdo.XmlPart.get_element": {"fullname": "odfdo.XmlPart.get_element", "modulename": "odfdo", "qualname": "XmlPart.get_element", "kind": "function", "doc": "

\n", "signature": "(self, xpath_query: str) -> Any:", "funcdef": "def"}, "odfdo.XmlPart.delete_element": {"fullname": "odfdo.XmlPart.delete_element", "modulename": "odfdo", "qualname": "XmlPart.delete_element", "kind": "function", "doc": "

\n", "signature": "(self, child: odfdo.element.Element) -> None:", "funcdef": "def"}, "odfdo.XmlPart.xpath": {"fullname": "odfdo.XmlPart.xpath", "modulename": "odfdo", "qualname": "XmlPart.xpath", "kind": "function", "doc": "

Apply XPath query to the XML part. Return list of Element or\nText instances translated from the nodes found.

\n", "signature": "(\tself,\txpath_query: str) -> list[odfdo.element.Element | odfdo.element.Text]:", "funcdef": "def"}, "odfdo.XmlPart.clone": {"fullname": "odfdo.XmlPart.clone", "modulename": "odfdo", "qualname": "XmlPart.clone", "kind": "variable", "doc": "

\n", "annotation": ": odfdo.xmlpart.XmlPart"}, "odfdo.XmlPart.serialize": {"fullname": "odfdo.XmlPart.serialize", "modulename": "odfdo", "qualname": "XmlPart.serialize", "kind": "function", "doc": "

\n", "signature": "(self, pretty: bool = False) -> bytes:", "funcdef": "def"}, "odfdo.create_table_cell_style": {"fullname": "odfdo.create_table_cell_style", "modulename": "odfdo", "qualname": "create_table_cell_style", "kind": "function", "doc": "

Return a cell style.

\n\n

The borders arguments must be some style attribute strings or None, see the\nmethod 'make_table_cell_border_string' to generate them.\nIf the 'border' argument as the value 'default', the default style\n\"0.06pt solid #000000\" is used for the 4 borders.\nIf any value is used for border, it is used for the 4 borders, else any of\nthe 4 borders can be specified by it's own string. If all the border,\nborder_top, border_bottom, ... arguments are None, an empty border is used\n(ODF value is fo:border=\"none\").

\n\n

Padding arguments are string specifying a length (e.g. \"0.5mm\")\". If\n'padding' is provided, it is used for the 4 sides, else any of\nthe 4 sides padding can be specified by it's own string. Default padding is\nno padding.

\n\n

Arguments:

\n\n
border -- str, style string for borders on four sides\n\nborder_top -- str, style string for top if no 'border' argument\n\nborder_bottom -- str, style string for bottom if no 'border' argument\n\nborder_left -- str, style string for left if no 'border' argument\n\nborder_right -- str, style string for right if no 'border' argument\n\npadding -- str, style string for padding on four sides\n\npadding_top -- str, style string for top if no 'padding' argument\n\npadding_bottom -- str, style string for bottom if no 'padding' argument\n\npadding_left -- str, style string for left if no 'padding' argument\n\npadding_right -- str, style string for right if no 'padding' argument\n\nbackground_color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'\n\nshadow -- str, e.g. \"#808080 0.176cm 0.176cm\"\n\ncolor -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'\n
\n\n

Return : Style

\n", "signature": "(\tborder: str | None = None,\tborder_top: str | None = None,\tborder_bottom: str | None = None,\tborder_left: str | None = None,\tborder_right: str | None = None,\tpadding: str | None = None,\tpadding_top: str | None = None,\tpadding_bottom: str | None = None,\tpadding_left: str | None = None,\tpadding_right: str | None = None,\tbackground_color: str | tuple | None = None,\tshadow: str | None = None,\tcolor: str | tuple | None = None) -> odfdo.style.Style:", "funcdef": "def"}, "odfdo.default_boolean_style": {"fullname": "odfdo.default_boolean_style", "modulename": "odfdo", "qualname": "default_boolean_style", "kind": "function", "doc": "

\n", "signature": "() -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.default_currency_style": {"fullname": "odfdo.default_currency_style", "modulename": "odfdo", "qualname": "default_currency_style", "kind": "function", "doc": "

\n", "signature": "() -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.default_date_style": {"fullname": "odfdo.default_date_style", "modulename": "odfdo", "qualname": "default_date_style", "kind": "function", "doc": "

\n", "signature": "() -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.default_frame_position_style": {"fullname": "odfdo.default_frame_position_style", "modulename": "odfdo", "qualname": "default_frame_position_style", "kind": "function", "doc": "

Helper style for positioning frames in desktop applications that need\nit.

\n\n

Default arguments should be enough.

\n\n

Use the returned Style as the frame style or build a new graphic style\nwith this style as the parent.

\n", "signature": "(\tname: str = 'FramePosition',\thorizontal_pos: str = 'from-left',\tvertical_pos: str = 'from-top',\thorizontal_rel: str = 'paragraph',\tvertical_rel: str = 'paragraph') -> odfdo.style.Style:", "funcdef": "def"}, "odfdo.default_number_style": {"fullname": "odfdo.default_number_style", "modulename": "odfdo", "qualname": "default_number_style", "kind": "function", "doc": "

\n", "signature": "() -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.default_percentage_style": {"fullname": "odfdo.default_percentage_style", "modulename": "odfdo", "qualname": "default_percentage_style", "kind": "function", "doc": "

\n", "signature": "() -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.default_time_style": {"fullname": "odfdo.default_time_style", "modulename": "odfdo", "qualname": "default_time_style", "kind": "function", "doc": "

\n", "signature": "() -> odfdo.element.Element:", "funcdef": "def"}, "odfdo.default_toc_level_style": {"fullname": "odfdo.default_toc_level_style", "modulename": "odfdo", "qualname": "default_toc_level_style", "kind": "function", "doc": "

Generate an automatic default style for the given TOC level.

\n", "signature": "(level: int) -> odfdo.style.Style:", "funcdef": "def"}, "odfdo.hex2rgb": {"fullname": "odfdo.hex2rgb", "modulename": "odfdo", "qualname": "hex2rgb", "kind": "function", "doc": "

Turns a \"#RRGGBB\" hexadecimal color representation into a (R, G, B)\ntuple.\nArguments:

\n\n
color -- str\n
\n\n

Return: tuple

\n", "signature": "(color: str) -> tuple[int, int, int]:", "funcdef": "def"}, "odfdo.make_table_cell_border_string": {"fullname": "odfdo.make_table_cell_border_string", "modulename": "odfdo", "qualname": "make_table_cell_border_string", "kind": "function", "doc": "

Returns a string for style:table-cell-properties fo:border,\nwith default : \"0.06pt solid #000000\"

\n\n
thick -- str or float or int\nline -- str\ncolor -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'\n
\n\n

Returns : str

\n", "signature": "(\tthick: str | float | int | None = None,\tline: str | None = None,\tcolor: str | tuple | None = None) -> str:", "funcdef": "def"}, "odfdo.rgb2hex": {"fullname": "odfdo.rgb2hex", "modulename": "odfdo", "qualname": "rgb2hex", "kind": "function", "doc": "

Turns a color name or a (R, G, B) color tuple into a \"#RRGGBB\"\nhexadecimal representation.\nArguments:

\n\n
color -- str or tuple\n
\n\n

Return: str

\n\n

Examples::

\n\n
>>> rgb2hex('yellow')\n'#FFFF00'\n>>> rgb2hex((238, 130, 238))\n'#EE82EE'\n
\n", "signature": "(color: str | tuple[int, int, int]) -> str:", "funcdef": "def"}}, "docInfo": {"odfdo": {"qualname": 0, "fullname": 1, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 664}, "odfdo.AnimPar": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 42}, "odfdo.AnimPar.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 68, "bases": 0, "doc": 3}, "odfdo.AnimPar.presentation_node_type": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.AnimPar.smil_begin": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.AnimSeq": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 48}, "odfdo.AnimSeq.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 41, "bases": 0, "doc": 3}, "odfdo.AnimSeq.presentation_node_type": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.AnimTransFilter": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 62}, "odfdo.AnimTransFilter.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 167, "bases": 0, "doc": 3}, "odfdo.AnimTransFilter.smil_dur": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.AnimTransFilter.smil_type": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.AnimTransFilter.smil_subtype": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.AnimTransFilter.smil_direction": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.AnimTransFilter.smil_fadeColor": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.AnimTransFilter.smil_mode": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Annotation": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 54}, "odfdo.Annotation.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 170, "bases": 0, "doc": 3}, "odfdo.Annotation.note_body": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Annotation.start": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 5}, "odfdo.Annotation.end": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "odfdo.Annotation.get_annotated": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 99, "bases": 0, "doc": 100}, "odfdo.Annotation.delete": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 68, "bases": 0, "doc": 66}, "odfdo.Annotation.check_validity": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 3}, "odfdo.Annotation.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Annotation.note_id": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.AnnotationEnd": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 91}, "odfdo.AnnotationEnd.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 75, "bases": 0, "doc": 36}, "odfdo.AnnotationEnd.start": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "odfdo.AnnotationEnd.end": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 5}, "odfdo.AnnotationEnd.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.BackgroundImage": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 6, "doc": 36}, "odfdo.BackgroundImage.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 162, "bases": 0, "doc": 280}, "odfdo.BackgroundImage.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.BackgroundImage.display_name": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.BackgroundImage.svg_font_family": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.BackgroundImage.font_family_generic": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.BackgroundImage.font_pitch": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.BackgroundImage.position": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.BackgroundImage.repeat": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.BackgroundImage.opacity": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.BackgroundImage.filter": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.BackgroundImage.text_style": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Bookmark": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 18}, "odfdo.Bookmark.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 36, "bases": 0, "doc": 3}, "odfdo.Bookmark.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.BookmarkEnd": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 19}, "odfdo.BookmarkEnd.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 36, "bases": 0, "doc": 3}, "odfdo.BookmarkEnd.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.BookmarkStart": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 19}, "odfdo.BookmarkStart.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 36, "bases": 0, "doc": 3}, "odfdo.BookmarkStart.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Cell": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 4, "doc": 9}, "odfdo.Cell.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 180, "bases": 0, "doc": 94}, "odfdo.Cell.x": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Cell.y": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Cell.clone": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Cell.value": {"qualname": 2, "fullname": 3, "annotation": 22, "default_value": 0, "signature": 0, "bases": 0, "doc": 54}, "odfdo.Cell.float": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 17}, "odfdo.Cell.string": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 15}, "odfdo.Cell.set_value": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 197, "bases": 0, "doc": 65}, "odfdo.Cell.type": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 23}, "odfdo.Cell.currency": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 18}, "odfdo.Cell.repeated": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 30}, "odfdo.Cell.style": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 18}, "odfdo.Cell.formula": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 32}, "odfdo.Cell.is_empty": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 20}, "odfdo.ChangeInfo": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 82}, "odfdo.ChangeInfo.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 70, "bases": 0, "doc": 3}, "odfdo.ChangeInfo.set_dc_creator": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 26}, "odfdo.ChangeInfo.set_dc_date": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 42, "bases": 0, "doc": 28}, "odfdo.ChangeInfo.get_comments": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 43, "bases": 0, "doc": 53}, "odfdo.ChangeInfo.set_comments": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 51, "bases": 0, "doc": 40}, "odfdo.Column": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 8}, "odfdo.Column.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 91, "bases": 0, "doc": 79}, "odfdo.Column.x": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Column.clone": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Column.get_default_cell_style": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 3}, "odfdo.Column.set_default_cell_style": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 40, "bases": 0, "doc": 3}, "odfdo.Column.repeated": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 29}, "odfdo.Column.style": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 15}, "odfdo.ConnectorShape": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 39}, "odfdo.ConnectorShape.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 213, "bases": 0, "doc": 3}, "odfdo.ConnectorShape.start_shape": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.ConnectorShape.end_shape": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.ConnectorShape.start_glue_point": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.ConnectorShape.end_glue_point": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.ConnectorShape.x1": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.ConnectorShape.y1": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.ConnectorShape.x2": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.ConnectorShape.y2": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Container": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "odfdo.Container.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 50, "bases": 0, "doc": 3}, "odfdo.Container.path": {"qualname": 2, "fullname": 3, "annotation": 5, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Container.open": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 49, "bases": 0, "doc": 10}, "odfdo.Container.get_parts": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 8}, "odfdo.Container.get_part": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 36, "bases": 0, "doc": 12}, "odfdo.Container.mimetype": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "odfdo.Container.set_part": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 34, "bases": 0, "doc": 9}, "odfdo.Container.del_part": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 8}, "odfdo.Container.clone": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 12}, "odfdo.Container.save": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 97, "bases": 0, "doc": 59}, "odfdo.Content": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 17}, "odfdo.Content.body": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Content.get_styles": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 53, "bases": 0, "doc": 36}, "odfdo.Content.get_style": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 109, "bases": 0, "doc": 94}, "odfdo.Document": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 165}, "odfdo.Document.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 77, "bases": 0, "doc": 3}, "odfdo.Document.container": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Document.new": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 70, "bases": 0, "doc": 49}, "odfdo.Document.path": {"qualname": 2, "fullname": 3, "annotation": 5, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "odfdo.Document.get_parts": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 19}, "odfdo.Document.get_part": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 52, "bases": 0, "doc": 61}, "odfdo.Document.set_part": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 34, "bases": 0, "doc": 32}, "odfdo.Document.del_part": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 19}, "odfdo.Document.mimetype": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Document.get_type": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 38}, "odfdo.Document.body": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 16}, "odfdo.Document.meta": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 17}, "odfdo.Document.manifest": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 12}, "odfdo.Document.get_formatted_text": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 32, "bases": 0, "doc": 10}, "odfdo.Document.get_formated_meta": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 11}, "odfdo.Document.add_file": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 52}, "odfdo.Document.clone": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 14}, "odfdo.Document.save": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 120, "bases": 0, "doc": 73}, "odfdo.Document.content": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Document.styles": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Document.get_styles": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 92, "bases": 0, "doc": 3}, "odfdo.Document.get_style": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 109, "bases": 0, "doc": 99}, "odfdo.Document.insert_style": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 99, "bases": 0, "doc": 176}, "odfdo.Document.get_styled_elements": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 50, "bases": 0, "doc": 33}, "odfdo.Document.show_styles": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 69, "bases": 0, "doc": 3}, "odfdo.Document.delete_styles": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 19}, "odfdo.Document.merge_styles_from": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 34, "bases": 0, "doc": 32}, "odfdo.Document.add_page_break_style": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 58}, "odfdo.DrawFillImage": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 53}, "odfdo.DrawFillImage.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 114, "bases": 0, "doc": 50}, "odfdo.DrawFillImage.display_name": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawFillImage.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawFillImage.height": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawFillImage.width": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 12, "doc": 160}, "odfdo.DrawGroup.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 208, "bases": 0, "doc": 3}, "odfdo.DrawGroup.draw_id": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup.caption_id": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup.draw_class_names": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup.presentation_class_names": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup.presentation_style": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup.table_end_cell": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup.table_end_x": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup.table_end_y": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup.table_background": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup.xml_id": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup.pos_x": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawGroup.pos_y": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawImage": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 53}, "odfdo.DrawImage.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 130, "bases": 0, "doc": 26}, "odfdo.DrawImage.url": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawImage.type": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawImage.show": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawImage.actuate": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawImage.filter_name": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawPage": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 13}, "odfdo.DrawPage.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 141, "bases": 0, "doc": 22}, "odfdo.DrawPage.set_transition": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 3}, "odfdo.DrawPage.get_shapes": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 3}, "odfdo.DrawPage.get_formatted_text": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 13}, "odfdo.DrawPage.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawPage.draw_id": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawPage.master_page": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawPage.presentation_page_layout": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.DrawPage.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Element": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 5, "doc": 23}, "odfdo.Element.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 16, "bases": 0, "doc": 3}, "odfdo.Element.from_tag": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 53, "bases": 0, "doc": 52}, "odfdo.Element.from_tag_for_clone": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 70, "bases": 0, "doc": 3}, "odfdo.Element.make_etree_element": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 3}, "odfdo.Element.tag": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 40}, "odfdo.Element.elements_repeated_sequence": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 64, "bases": 0, "doc": 8}, "odfdo.Element.get_elements": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 57, "bases": 0, "doc": 3}, "odfdo.Element.get_element": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 59, "bases": 0, "doc": 3}, "odfdo.Element.attributes": {"qualname": 2, "fullname": 3, "annotation": 3, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Element.get_attribute": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 36, "bases": 0, "doc": 14}, "odfdo.Element.get_attribute_integer": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 12}, "odfdo.Element.get_attribute_string": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 12}, "odfdo.Element.set_attribute": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 46, "bases": 0, "doc": 3}, "odfdo.Element.set_style_attribute": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 50, "bases": 0, "doc": 12}, "odfdo.Element.del_attribute": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 3}, "odfdo.Element.text": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 12}, "odfdo.Element.text_recursive": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Element.tail": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 12}, "odfdo.Element.search": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 46}, "odfdo.Element.match": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 44}, "odfdo.Element.replace": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 47, "bases": 0, "doc": 79}, "odfdo.Element.root": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Element.parent": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Element.is_bound": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Element.children": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Element.index": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 34, "bases": 0, "doc": 17}, "odfdo.Element.text_content": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 24}, "odfdo.Element.is_empty": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 20}, "odfdo.Element.get_between": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 135, "bases": 0, "doc": 146}, "odfdo.Element.insert": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 102, "bases": 0, "doc": 64}, "odfdo.Element.extend": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 53, "bases": 0, "doc": 13}, "odfdo.Element.append": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 42, "bases": 0, "doc": 11}, "odfdo.Element.delete": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 68, "bases": 0, "doc": 76}, "odfdo.Element.replace_element": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 59, "bases": 0, "doc": 26}, "odfdo.Element.strip_elements": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 85, "bases": 0, "doc": 48}, "odfdo.Element.strip_tags": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 139, "bases": 0, "doc": 125}, "odfdo.Element.xpath": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 59, "bases": 0, "doc": 24}, "odfdo.Element.clear": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 11}, "odfdo.Element.clone": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Element.serialize": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 49, "bases": 0, "doc": 9}, "odfdo.Element.document_body": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 9}, "odfdo.Element.get_formatted_text": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 13}, "odfdo.Element.get_styled_elements": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 50, "bases": 0, "doc": 33}, "odfdo.Element.dc_creator": {"qualname": 3, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 15}, "odfdo.Element.dc_date": {"qualname": 3, "fullname": 4, "annotation": 5, "default_value": 0, "signature": 0, "bases": 0, "doc": 16}, "odfdo.Element.svg_title": {"qualname": 3, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Element.svg_description": {"qualname": 3, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Element.get_sections": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 79, "bases": 0, "doc": 30}, "odfdo.Element.get_section": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 32}, "odfdo.Element.get_paragraphs": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 79, "bases": 0, "doc": 30}, "odfdo.Element.get_paragraph": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 32}, "odfdo.Element.get_spans": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 79, "bases": 0, "doc": 30}, "odfdo.Element.get_span": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 32}, "odfdo.Element.get_headers": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 104, "bases": 0, "doc": 30}, "odfdo.Element.get_header": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 98, "bases": 0, "doc": 32}, "odfdo.Element.get_lists": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 79, "bases": 0, "doc": 30}, "odfdo.Element.get_list": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 32}, "odfdo.Element.get_frames": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 152, "bases": 0, "doc": 39}, "odfdo.Element.get_frame": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 170, "bases": 0, "doc": 43}, "odfdo.Element.get_images": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 103, "bases": 0, "doc": 32}, "odfdo.Element.get_image": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 121, "bases": 0, "doc": 36}, "odfdo.Element.get_tables": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 79, "bases": 0, "doc": 30}, "odfdo.Element.get_table": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 97, "bases": 0, "doc": 34}, "odfdo.Element.get_named_ranges": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 17}, "odfdo.Element.get_named_range": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 40, "bases": 0, "doc": 29}, "odfdo.Element.append_named_range": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 35, "bases": 0, "doc": 30}, "odfdo.Element.delete_named_range": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 23}, "odfdo.Element.get_notes": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 80, "bases": 0, "doc": 33}, "odfdo.Element.get_note": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 123, "bases": 0, "doc": 40}, "odfdo.Element.get_annotations": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 139, "bases": 0, "doc": 38}, "odfdo.Element.get_annotation": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 181, "bases": 0, "doc": 44}, "odfdo.Element.get_annotation_ends": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 14}, "odfdo.Element.get_annotation_end": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 32}, "odfdo.Element.get_office_names": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 20}, "odfdo.Element.get_variable_decls": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 17}, "odfdo.Element.get_variable_decl_list": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 14}, "odfdo.Element.get_variable_decl": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 57, "bases": 0, "doc": 32}, "odfdo.Element.get_variable_sets": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 53, "bases": 0, "doc": 28}, "odfdo.Element.get_variable_set": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 60, "bases": 0, "doc": 36}, "odfdo.Element.get_variable_set_value": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 108, "bases": 0, "doc": 40}, "odfdo.Element.get_user_field_decls": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 18}, "odfdo.Element.get_user_field_decl_list": {"qualname": 6, "fullname": 7, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 15}, "odfdo.Element.get_user_field_decl": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 57, "bases": 0, "doc": 21}, "odfdo.Element.get_user_field_value": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 108, "bases": 0, "doc": 40}, "odfdo.Element.get_user_defined_list": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 16}, "odfdo.Element.get_user_defined": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 57, "bases": 0, "doc": 21}, "odfdo.Element.get_user_defined_value": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 108, "bases": 0, "doc": 39}, "odfdo.Element.get_draw_pages": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 79, "bases": 0, "doc": 31}, "odfdo.Element.get_draw_page": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 97, "bases": 0, "doc": 35}, "odfdo.Element.get_links": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 127, "bases": 0, "doc": 35}, "odfdo.Element.get_link": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 145, "bases": 0, "doc": 39}, "odfdo.Element.get_bookmarks": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 13}, "odfdo.Element.get_bookmark": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 31}, "odfdo.Element.get_bookmark_starts": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 14}, "odfdo.Element.get_bookmark_start": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 32}, "odfdo.Element.get_bookmark_ends": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 14}, "odfdo.Element.get_bookmark_end": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 32}, "odfdo.Element.get_reference_marks_single": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 26}, "odfdo.Element.get_reference_mark_single": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 44}, "odfdo.Element.get_reference_mark_starts": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 28}, "odfdo.Element.get_reference_mark_start": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 46}, "odfdo.Element.get_reference_mark_ends": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 28}, "odfdo.Element.get_reference_mark_end": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 46}, "odfdo.Element.get_reference_marks": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 28}, "odfdo.Element.get_reference_mark": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 47}, "odfdo.Element.get_references": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 53, "bases": 0, "doc": 37}, "odfdo.Element.get_draw_groups": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 103, "bases": 0, "doc": 3}, "odfdo.Element.get_draw_group": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 145, "bases": 0, "doc": 3}, "odfdo.Element.get_draw_lines": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 106, "bases": 0, "doc": 37}, "odfdo.Element.get_draw_line": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 97, "bases": 0, "doc": 36}, "odfdo.Element.get_draw_rectangles": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 106, "bases": 0, "doc": 37}, "odfdo.Element.get_draw_rectangle": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 97, "bases": 0, "doc": 36}, "odfdo.Element.get_draw_ellipses": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 106, "bases": 0, "doc": 37}, "odfdo.Element.get_draw_ellipse": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 97, "bases": 0, "doc": 36}, "odfdo.Element.get_draw_connectors": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 106, "bases": 0, "doc": 37}, "odfdo.Element.get_draw_connector": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 97, "bases": 0, "doc": 36}, "odfdo.Element.get_orphan_draw_connectors": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 17}, "odfdo.Element.get_tracked_changes": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 12}, "odfdo.Element.get_changes_ids": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 46, "bases": 0, "doc": 19}, "odfdo.Element.get_text_change_deletions": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 26}, "odfdo.Element.get_text_change_deletion": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 47}, "odfdo.Element.get_text_change_starts": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 28}, "odfdo.Element.get_text_change_start": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 45}, "odfdo.Element.get_text_change_ends": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 27}, "odfdo.Element.get_text_change_end": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 45}, "odfdo.Element.get_text_changes": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 26}, "odfdo.Element.get_text_change": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 65}, "odfdo.Element.get_tocs": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 16}, "odfdo.Element.get_toc": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 35}, "odfdo.Element.get_styles": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 53, "bases": 0, "doc": 3}, "odfdo.Element.get_style": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 109, "bases": 0, "doc": 82}, "odfdo.ElementTyped": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.ElementTyped.set_value_and_type": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 105, "bases": 0, "doc": 3}, "odfdo.ElementTyped.get_value": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 107, "bases": 0, "doc": 20}, "odfdo.EllipseShape": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 31}, "odfdo.EllipseShape.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 163, "bases": 0, "doc": 3}, "odfdo.FIRST_CHILD": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 1, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Frame": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 15, "doc": 27}, "odfdo.Frame.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 295, "bases": 0, "doc": 134}, "odfdo.Frame.image_frame": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 367, "bases": 0, "doc": 64}, "odfdo.Frame.text_frame": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 402, "bases": 0, "doc": 75}, "odfdo.Frame.text_content": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 24}, "odfdo.Frame.get_image": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 121, "bases": 0, "doc": 36}, "odfdo.Frame.set_image": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 54, "bases": 0, "doc": 3}, "odfdo.Frame.get_text_box": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 3}, "odfdo.Frame.set_text_box": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 117, "bases": 0, "doc": 3}, "odfdo.Frame.get_formatted_text": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 13}, "odfdo.Frame.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Frame.draw_id": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Frame.width": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Frame.height": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Frame.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Frame.pos_x": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Frame.pos_y": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Frame.presentation_class": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Frame.layer": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Frame.presentation_style": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Header": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 8}, "odfdo.Header.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 146, "bases": 0, "doc": 46}, "odfdo.Header.get_formatted_text": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 54, "bases": 0, "doc": 13}, "odfdo.Header.level": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Header.restart_numbering": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Header.start_value": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Header.suppress_numbering": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.HeaderRows": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.IndexTitle": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 44}, "odfdo.IndexTitle.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 141, "bases": 0, "doc": 3}, "odfdo.IndexTitle.set_title_text": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 50, "bases": 0, "doc": 3}, "odfdo.IndexTitle.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.IndexTitle.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.IndexTitle.xml_id": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.IndexTitle.protected": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.IndexTitle.protection_key": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"qualname": 5, "fullname": 6, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.IndexTitleTemplate": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 17}, "odfdo.IndexTitleTemplate.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 39, "bases": 0, "doc": 3}, "odfdo.IndexTitleTemplate.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.LAST_CHILD": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 1, "signature": 0, "bases": 0, "doc": 3}, "odfdo.LineBreak": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 11}, "odfdo.LineBreak.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 16, "bases": 0, "doc": 3}, "odfdo.LineShape": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 31}, "odfdo.LineShape.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 163, "bases": 0, "doc": 3}, "odfdo.LineShape.x1": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.LineShape.y1": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.LineShape.x2": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.LineShape.y2": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Link": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 4, "doc": 8}, "odfdo.Link.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 190, "bases": 0, "doc": 27}, "odfdo.Link.url": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Link.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Link.title": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Link.target_frame": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Link.show": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Link.visited_style": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Link.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.List": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 6}, "odfdo.List.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 120, "bases": 0, "doc": 71}, "odfdo.List.get_items": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 53, "bases": 0, "doc": 31}, "odfdo.List.get_item": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 73, "bases": 0, "doc": 45}, "odfdo.List.set_list_header": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 82, "bases": 0, "doc": 3}, "odfdo.List.insert_item": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 156, "bases": 0, "doc": 3}, "odfdo.List.append_item": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 64, "bases": 0, "doc": 3}, "odfdo.List.get_formatted_text": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 13}, "odfdo.List.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.ListItem": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 11}, "odfdo.ListItem.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 59, "bases": 0, "doc": 34}, "odfdo.Manifest": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 17}, "odfdo.Manifest.get_paths": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 46, "bases": 0, "doc": 18}, "odfdo.Manifest.get_path_medias": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 22}, "odfdo.Manifest.get_media_type": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 15}, "odfdo.Manifest.set_media_type": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 36, "bases": 0, "doc": 25}, "odfdo.Manifest.make_file_entry": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 41, "bases": 0, "doc": 3}, "odfdo.Manifest.add_full_path": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 46, "bases": 0, "doc": 3}, "odfdo.Manifest.del_full_path": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 25, "bases": 0, "doc": 3}, "odfdo.Meta": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 17}, "odfdo.Meta.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 28, "bases": 0, "doc": 3}, "odfdo.Meta.get_meta_body": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 3}, "odfdo.Meta.get_title": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 31}, "odfdo.Meta.set_title": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 32}, "odfdo.Meta.get_description": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 22}, "odfdo.Meta.get_comments": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 22}, "odfdo.Meta.set_description": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 23}, "odfdo.Meta.set_comments": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 23}, "odfdo.Meta.get_subject": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 18}, "odfdo.Meta.set_subject": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 19}, "odfdo.Meta.get_language": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 37}, "odfdo.Meta.set_language": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 38}, "odfdo.Meta.get_modification_date": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 25, "bases": 0, "doc": 20}, "odfdo.Meta.set_modification_date": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 29, "bases": 0, "doc": 21}, "odfdo.Meta.get_creation_date": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 25, "bases": 0, "doc": 19}, "odfdo.Meta.set_creation_date": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 29, "bases": 0, "doc": 20}, "odfdo.Meta.get_initial_creator": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 37}, "odfdo.Meta.set_initial_creator": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 38}, "odfdo.Meta.get_creator": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 35}, "odfdo.Meta.set_creator": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 36}, "odfdo.Meta.get_keywords": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 30}, "odfdo.Meta.set_keywords": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 34}, "odfdo.Meta.get_editing_duration": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 25, "bases": 0, "doc": 24}, "odfdo.Meta.set_editing_duration": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 29, "bases": 0, "doc": 20}, "odfdo.Meta.get_editing_cycles": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 26}, "odfdo.Meta.set_editing_cycles": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 22}, "odfdo.Meta.get_generator": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 41}, "odfdo.Meta.set_generator": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 41}, "odfdo.Meta.set_generator_default": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 32}, "odfdo.Meta.get_statistic": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 32, "bases": 0, "doc": 67}, "odfdo.Meta.set_statistic": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 36, "bases": 0, "doc": 74}, "odfdo.Meta.get_user_defined_metadata": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 22}, "odfdo.Meta.get_user_defined_metadata_of_name": {"qualname": 7, "fullname": 8, "annotation": 0, "default_value": 0, "signature": 47, "bases": 0, "doc": 38}, "odfdo.Meta.set_user_defined_metadata": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 34, "bases": 0, "doc": 3}, "odfdo.NEXT_SIBLING": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 1, "signature": 0, "bases": 0, "doc": 3}, "odfdo.NamedRange": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 93}, "odfdo.NamedRange.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 126, "bases": 0, "doc": 80}, "odfdo.NamedRange.usage": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.NamedRange.table_name": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.NamedRange.set_usage": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 38}, "odfdo.NamedRange.name": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "odfdo.NamedRange.set_table_name": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 27}, "odfdo.NamedRange.set_range": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 36, "bases": 0, "doc": 62}, "odfdo.NamedRange.get_values": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 95, "bases": 0, "doc": 26}, "odfdo.NamedRange.get_value": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 32, "bases": 0, "doc": 27}, "odfdo.NamedRange.set_values": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 99, "bases": 0, "doc": 23}, "odfdo.NamedRange.set_value": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 99, "bases": 0, "doc": 24}, "odfdo.Note": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 44}, "odfdo.Note.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 113, "bases": 0, "doc": 3}, "odfdo.Note.citation": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Note.note_body": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Note.check_validity": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 3}, "odfdo.Note.note_class": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Note.note_id": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.PREV_SIBLING": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 1, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Paragraph": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 4, "doc": 25}, "odfdo.Paragraph.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 83, "bases": 0, "doc": 30}, "odfdo.Paragraph.insert_note": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 186, "bases": 0, "doc": 3}, "odfdo.Paragraph.insert_annotation": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 265, "bases": 0, "doc": 179}, "odfdo.Paragraph.insert_annotation_end": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 113, "bases": 0, "doc": 86}, "odfdo.Paragraph.set_reference_mark": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 142, "bases": 0, "doc": 173}, "odfdo.Paragraph.set_reference_mark_end": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 113, "bases": 0, "doc": 86}, "odfdo.Paragraph.insert_variable": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 51, "bases": 0, "doc": 3}, "odfdo.Paragraph.set_span": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 124, "bases": 0, "doc": 57}, "odfdo.Paragraph.remove_spans": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 48, "bases": 0, "doc": 27}, "odfdo.Paragraph.remove_span": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 74, "bases": 0, "doc": 30}, "odfdo.Paragraph.set_link": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 124, "bases": 0, "doc": 60}, "odfdo.Paragraph.remove_links": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 13}, "odfdo.Paragraph.remove_link": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 74, "bases": 0, "doc": 32}, "odfdo.Paragraph.insert_reference": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 154, "bases": 0, "doc": 197}, "odfdo.Paragraph.set_bookmark": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 194, "bases": 0, "doc": 212}, "odfdo.PageBreak": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 31}, "odfdo.RectangleShape": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 31}, "odfdo.RectangleShape.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 163, "bases": 0, "doc": 3}, "odfdo.Reference": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 375}, "odfdo.Reference.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 57, "bases": 0, "doc": 118}, "odfdo.Reference.format_allowed": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 38, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Reference.ref_format": {"qualname": 3, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 19}, "odfdo.Reference.update": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 35}, "odfdo.Reference.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.ReferenceMark": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.ReferenceMark.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 36, "bases": 0, "doc": 42}, "odfdo.ReferenceMark.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.ReferenceMarkEnd": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 15}, "odfdo.ReferenceMarkEnd.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 36, "bases": 0, "doc": 41}, "odfdo.ReferenceMarkEnd.referenced_text": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 14}, "odfdo.ReferenceMarkEnd.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.ReferenceMarkStart": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 15}, "odfdo.ReferenceMarkStart.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 36, "bases": 0, "doc": 34}, "odfdo.ReferenceMarkStart.referenced_text": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 14}, "odfdo.ReferenceMarkStart.get_referenced": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 118, "bases": 0, "doc": 127}, "odfdo.ReferenceMarkStart.delete": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 68, "bases": 0, "doc": 77}, "odfdo.ReferenceMarkStart.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Row": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 8}, "odfdo.Row.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 89, "bases": 0, "doc": 57}, "odfdo.Row.y": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Row.clone": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Row.repeated": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 30}, "odfdo.Row.style": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 15}, "odfdo.Row.width": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 20}, "odfdo.Row.traverse": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 89, "bases": 0, "doc": 51}, "odfdo.Row.get_cells": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 134, "bases": 0, "doc": 89}, "odfdo.Row.get_cell": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 57, "bases": 0, "doc": 50}, "odfdo.Row.get_value": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 79, "bases": 0, "doc": 48}, "odfdo.Row.set_cell": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 94, "bases": 0, "doc": 44}, "odfdo.Row.set_value": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 116, "bases": 0, "doc": 55}, "odfdo.Row.insert_cell": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 94, "bases": 0, "doc": 71}, "odfdo.Row.extend_cells": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 65, "bases": 0, "doc": 3}, "odfdo.Row.append_cell": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 102, "bases": 0, "doc": 69}, "odfdo.Row.append": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 102, "bases": 0, "doc": 69}, "odfdo.Row.delete_cell": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 52}, "odfdo.Row.get_values": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 144, "bases": 0, "doc": 185}, "odfdo.Row.set_cells": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 119, "bases": 0, "doc": 46}, "odfdo.Row.set_values": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 134, "bases": 0, "doc": 70}, "odfdo.Row.rstrip": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 43}, "odfdo.Row.is_empty": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 52}, "odfdo.RowGroup": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 12}, "odfdo.RowGroup.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 62, "bases": 0, "doc": 45}, "odfdo.Section": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 18}, "odfdo.Section.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 62, "bases": 0, "doc": 3}, "odfdo.Section.get_formatted_text": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 13}, "odfdo.Section.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Section.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Spacer": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 68}, "odfdo.Spacer.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 33, "bases": 0, "doc": 10}, "odfdo.Spacer.number": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Span": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 17}, "odfdo.Span.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 62, "bases": 0, "doc": 12}, "odfdo.Span.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Span.class_names": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 36}, "odfdo.Style.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 850, "bases": 0, "doc": 280}, "odfdo.Style.family": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.get_properties": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 61, "bases": 0, "doc": 57}, "odfdo.Style.set_properties": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 128, "bases": 0, "doc": 81}, "odfdo.Style.del_properties": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 69, "bases": 0, "doc": 41}, "odfdo.Style.set_background": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 163, "bases": 0, "doc": 135}, "odfdo.Style.get_level_style": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 40, "bases": 0, "doc": 3}, "odfdo.Style.set_level_style": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 272, "bases": 0, "doc": 45}, "odfdo.Style.get_header_style": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 3}, "odfdo.Style.set_header_style": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 35, "bases": 0, "doc": 3}, "odfdo.Style.get_footer_style": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 3}, "odfdo.Style.set_footer_style": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 35, "bases": 0, "doc": 3}, "odfdo.Style.get_page_header": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 20}, "odfdo.Style.set_page_header": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 72, "bases": 0, "doc": 56}, "odfdo.Style.get_page_footer": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 20}, "odfdo.Style.set_page_footer": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 72, "bases": 0, "doc": 56}, "odfdo.Style.set_font": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 97, "bases": 0, "doc": 3}, "odfdo.Style.page_layout": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.next_style": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.parent_style": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.display_name": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.svg_font_family": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.font_family_generic": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.font_pitch": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.text_style": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.master_page": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.style_type": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.leader_style": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.leader_text": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Style.style_position": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Styles": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 17}, "odfdo.Styles.get_styles": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 70, "bases": 0, "doc": 41}, "odfdo.Styles.get_style": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 109, "bases": 0, "doc": 103}, "odfdo.Styles.get_master_pages": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 3}, "odfdo.Styles.get_master_page": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 47, "bases": 0, "doc": 3}, "odfdo.TOC": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 169}, "odfdo.TOC.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 180, "bases": 0, "doc": 3}, "odfdo.TOC.create_toc_source": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 66, "bases": 0, "doc": 3}, "odfdo.TOC.get_formatted_text": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 13}, "odfdo.TOC.outline_level": {"qualname": 3, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TOC.body": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TOC.get_title": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 3}, "odfdo.TOC.set_toc_title": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 75, "bases": 0, "doc": 3}, "odfdo.TOC.fill": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 69, "bases": 0, "doc": 74}, "odfdo.TOC.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TOC.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TOC.xml_id": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TOC.protected": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TOC.protection_key": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TOC.protection_key_digest_algorithm": {"qualname": 5, "fullname": 6, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Tab": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 74}, "odfdo.Tab.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 39, "bases": 0, "doc": 10}, "odfdo.Tab.position": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TabStopStyle": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 16}, "odfdo.TabStopStyle.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 243, "bases": 0, "doc": 3}, "odfdo.TabStopStyle.style_char": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TabStopStyle.leader_color": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TabStopStyle.leader_style": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TabStopStyle.leader_text": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TabStopStyle.leader_text_style": {"qualname": 4, "fullname": 5, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TabStopStyle.leader_type": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TabStopStyle.leader_width": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TabStopStyle.style_position": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TabStopStyle.style_type": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Table": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 6}, "odfdo.Table.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 223, "bases": 0, "doc": 210}, "odfdo.Table.append": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 40, "bases": 0, "doc": 12}, "odfdo.Table.height": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 14}, "odfdo.Table.width": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 33}, "odfdo.Table.size": {"qualname": 2, "fullname": 3, "annotation": 3, "default_value": 0, "signature": 0, "bases": 0, "doc": 20}, "odfdo.Table.name": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "odfdo.Table.protected": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Table.protection_key": {"qualname": 3, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Table.displayed": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Table.printable": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Table.print_ranges": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Table.style": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 14}, "odfdo.Table.get_formatted_text": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 13}, "odfdo.Table.get_values": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 131, "bases": 0, "doc": 186}, "odfdo.Table.iter_values": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 129, "bases": 0, "doc": 78}, "odfdo.Table.set_values": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 135, "bases": 0, "doc": 167}, "odfdo.Table.rstrip": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 60}, "odfdo.Table.transpose": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 49, "bases": 0, "doc": 69}, "odfdo.Table.is_empty": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 48}, "odfdo.Table.traverse": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 89, "bases": 0, "doc": 51}, "odfdo.Table.get_rows": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 115, "bases": 0, "doc": 54}, "odfdo.Table.get_row": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 78, "bases": 0, "doc": 55}, "odfdo.Table.set_row": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 94, "bases": 0, "doc": 72}, "odfdo.Table.insert_row": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 94, "bases": 0, "doc": 71}, "odfdo.Table.extend_rows": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 53, "bases": 0, "doc": 26}, "odfdo.Table.append_row": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 102, "bases": 0, "doc": 87}, "odfdo.Table.delete_row": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 37}, "odfdo.Table.get_row_values": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 94, "bases": 0, "doc": 121}, "odfdo.Table.set_row_values": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 126, "bases": 0, "doc": 77}, "odfdo.Table.set_row_cells": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 63, "bases": 0, "doc": 61}, "odfdo.Table.is_row_empty": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 47, "bases": 0, "doc": 71}, "odfdo.Table.get_cells": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 142, "bases": 0, "doc": 137}, "odfdo.Table.get_cell": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 85, "bases": 0, "doc": 65}, "odfdo.Table.get_value": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 54, "bases": 0, "doc": 85}, "odfdo.Table.set_cell": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 100, "bases": 0, "doc": 62}, "odfdo.Table.set_cells": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 126, "bases": 0, "doc": 142}, "odfdo.Table.set_value": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 122, "bases": 0, "doc": 68}, "odfdo.Table.set_cell_image": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 85, "bases": 0, "doc": 105}, "odfdo.Table.insert_cell": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 100, "bases": 0, "doc": 81}, "odfdo.Table.append_cell": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 94, "bases": 0, "doc": 70}, "odfdo.Table.delete_cell": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 36, "bases": 0, "doc": 63}, "odfdo.Table.traverse_columns": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 89, "bases": 0, "doc": 51}, "odfdo.Table.get_columns": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 91, "bases": 0, "doc": 45}, "odfdo.Table.get_column": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 40, "bases": 0, "doc": 73}, "odfdo.Table.set_column": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 76, "bases": 0, "doc": 57}, "odfdo.Table.insert_column": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 76, "bases": 0, "doc": 67}, "odfdo.Table.append_column": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 84, "bases": 0, "doc": 64}, "odfdo.Table.delete_column": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 51}, "odfdo.Table.get_column_cells": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 145, "bases": 0, "doc": 101}, "odfdo.Table.get_column_values": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 105, "bases": 0, "doc": 122}, "odfdo.Table.set_column_cells": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 56, "bases": 0, "doc": 64}, "odfdo.Table.set_column_values": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 116, "bases": 0, "doc": 84}, "odfdo.Table.is_column_empty": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 47, "bases": 0, "doc": 65}, "odfdo.Table.get_named_ranges": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 68, "bases": 0, "doc": 70}, "odfdo.Table.get_named_range": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 34, "bases": 0, "doc": 63}, "odfdo.Table.set_named_range": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 98, "bases": 0, "doc": 76}, "odfdo.Table.delete_named_range": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 43}, "odfdo.Table.set_span": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 53, "bases": 0, "doc": 161}, "odfdo.Table.del_span": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 36, "bases": 0, "doc": 87}, "odfdo.Table.to_csv": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 74, "bases": 0, "doc": 58}, "odfdo.Text": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 2, "doc": 36}, "odfdo.Text.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 44, "bases": 0, "doc": 3}, "odfdo.Text.parent": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.Text.is_text": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 3}, "odfdo.Text.is_tail": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 3}, "odfdo.TextChange": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 19}, "odfdo.TextChange.get_id": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 3}, "odfdo.TextChange.set_id": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 3}, "odfdo.TextChange.get_changed_region": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 66, "bases": 0, "doc": 3}, "odfdo.TextChange.get_change_info": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 66, "bases": 0, "doc": 3}, "odfdo.TextChange.get_change_element": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 66, "bases": 0, "doc": 3}, "odfdo.TextChange.get_deleted": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 122, "bases": 0, "doc": 25}, "odfdo.TextChange.get_inserted": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 115, "bases": 0, "doc": 5}, "odfdo.TextChange.get_start": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 5}, "odfdo.TextChange.get_end": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 5}, "odfdo.TextChangeEnd": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 4, "doc": 27}, "odfdo.TextChangeEnd.get_start": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 11}, "odfdo.TextChangeEnd.get_end": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 5}, "odfdo.TextChangeEnd.get_deleted": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 54, "bases": 0, "doc": 5}, "odfdo.TextChangeEnd.get_inserted": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 115, "bases": 0, "doc": 92}, "odfdo.TextChangeStart": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 4, "doc": 27}, "odfdo.TextChangeStart.get_start": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 25, "bases": 0, "doc": 5}, "odfdo.TextChangeStart.get_end": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 25, "bases": 0, "doc": 11}, "odfdo.TextChangeStart.delete": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 68, "bases": 0, "doc": 74}, "odfdo.TextChangedRegion": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 127}, "odfdo.TextChangedRegion.get_change_info": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 20}, "odfdo.TextChangedRegion.set_change_info": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 159, "bases": 0, "doc": 53}, "odfdo.TextChangedRegion.get_change_element": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 25}, "odfdo.TextChangedRegion.get_id": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 11}, "odfdo.TextChangedRegion.set_id": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 13}, "odfdo.TextDeletion": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 4, "doc": 256}, "odfdo.TextDeletion.get_deleted": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 81, "bases": 0, "doc": 51}, "odfdo.TextDeletion.set_deleted": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 60, "bases": 0, "doc": 43}, "odfdo.TextDeletion.get_inserted": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 115, "bases": 0, "doc": 5}, "odfdo.TextFormatChange": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 4, "doc": 46}, "odfdo.TextInsertion": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 76}, "odfdo.TextInsertion.get_deleted": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 81, "bases": 0, "doc": 5}, "odfdo.TextInsertion.get_inserted": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 115, "bases": 0, "doc": 86}, "odfdo.TextInsertion.get_change_info": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 30, "bases": 0, "doc": 16}, "odfdo.TextInsertion.set_change_info": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 159, "bases": 0, "doc": 93}, "odfdo.TocEntryTemplate": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 19}, "odfdo.TocEntryTemplate.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 66, "bases": 0, "doc": 3}, "odfdo.TocEntryTemplate.outline_level": {"qualname": 3, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TocEntryTemplate.complete_defaults": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 3}, "odfdo.TocEntryTemplate.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.TrackedChanges": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 83}, "odfdo.TrackedChanges.get_changed_regions": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 132, "bases": 0, "doc": 3}, "odfdo.TrackedChanges.get_changed_region": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 151, "bases": 0, "doc": 3}, "odfdo.UserDefined": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 4, "doc": 69}, "odfdo.UserDefined.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 164, "bases": 0, "doc": 3}, "odfdo.UserDefined.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.UserDefined.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.UserFieldDecl": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 4, "doc": 23}, "odfdo.UserFieldDecl.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 84, "bases": 0, "doc": 3}, "odfdo.UserFieldDecl.set_value": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 3}, "odfdo.UserFieldDecl.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.UserFieldDecls": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.UserFieldGet": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 4, "doc": 23}, "odfdo.UserFieldGet.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 132, "bases": 0, "doc": 3}, "odfdo.UserFieldGet.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.UserFieldGet.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.UserFieldInput": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.UserFieldInput.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.UserFieldInput.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarChapter": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarChapter.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 70, "bases": 0, "doc": 18}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 23, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarChapter.display": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarChapter.outline_level": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarCreationDate": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarCreationDate.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 57, "bases": 0, "doc": 3}, "odfdo.VarCreationDate.fixed": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarCreationDate.data_style": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarCreationTime": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarCreationTime.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 57, "bases": 0, "doc": 3}, "odfdo.VarCreationTime.fixed": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarCreationTime.data_style": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarDate": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarDate.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 143, "bases": 0, "doc": 3}, "odfdo.VarDate.date": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarDate.fixed": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarDate.data_style": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarDate.date_adjust": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarDecl": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarDecl.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 66, "bases": 0, "doc": 3}, "odfdo.VarDecl.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarDecl.value_type": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarDecls": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarDescription": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarDescription.fixed": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarFileName": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarFileName.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 60, "bases": 0, "doc": 13}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 16, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarFileName.display": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarFileName.fixed": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarGet": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 4, "doc": 23}, "odfdo.VarGet.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 132, "bases": 0, "doc": 3}, "odfdo.VarGet.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarGet.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarInitialCreator": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarInitialCreator.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 33, "bases": 0, "doc": 3}, "odfdo.VarInitialCreator.fixed": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarKeywords": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarKeywords.fixed": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarPageCount": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarPageNumber": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 24}, "odfdo.VarPageNumber.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 67, "bases": 0, "doc": 3}, "odfdo.VarPageNumber.select_page": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarPageNumber.page_adjust": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarSet": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 4, "doc": 23}, "odfdo.VarSet.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 156, "bases": 0, "doc": 3}, "odfdo.VarSet.set_value": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 3}, "odfdo.VarSet.name": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarSet.style": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarSet.display": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarSubject": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarSubject.fixed": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarTime": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarTime.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 130, "bases": 0, "doc": 3}, "odfdo.VarTime.time": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarTime.fixed": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarTime.data_style": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarTime.time_adjust": {"qualname": 3, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.VarTitle": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 3, "doc": 23}, "odfdo.VarTitle.fixed": {"qualname": 2, "fullname": 3, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.XmlPart": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 17}, "odfdo.XmlPart.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 35, "bases": 0, "doc": 3}, "odfdo.XmlPart.part_name": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.XmlPart.container": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.XmlPart.root": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.XmlPart.get_elements": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 59, "bases": 0, "doc": 3}, "odfdo.XmlPart.get_element": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 25, "bases": 0, "doc": 3}, "odfdo.XmlPart.delete_element": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 34, "bases": 0, "doc": 3}, "odfdo.XmlPart.xpath": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 59, "bases": 0, "doc": 22}, "odfdo.XmlPart.clone": {"qualname": 2, "fullname": 3, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "odfdo.XmlPart.serialize": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 3}, "odfdo.create_table_cell_style": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 352, "bases": 0, "doc": 300}, "odfdo.default_boolean_style": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 3}, "odfdo.default_currency_style": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 3}, "odfdo.default_date_style": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 3}, "odfdo.default_frame_position_style": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 135, "bases": 0, "doc": 45}, "odfdo.default_number_style": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 3}, "odfdo.default_percentage_style": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 3}, "odfdo.default_time_style": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 20, "bases": 0, "doc": 3}, "odfdo.default_toc_level_style": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 29, "bases": 0, "doc": 13}, "odfdo.hex2rgb": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 26}, "odfdo.make_table_cell_border_string": {"qualname": 5, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 99, "bases": 0, "doc": 48}, "odfdo.rgb2hex": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 43, "bases": 0, "doc": 55}}, "length": 795, "save": true}, "index": {"qualname": {"root": {"docs": {"odfdo.AnimPar.__init__": {"tf": 1}, "odfdo.AnimSeq.__init__": {"tf": 1}, "odfdo.AnimTransFilter.__init__": {"tf": 1}, "odfdo.Annotation.__init__": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Bookmark.__init__": {"tf": 1}, "odfdo.BookmarkEnd.__init__": {"tf": 1}, "odfdo.BookmarkStart.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.ChangeInfo.__init__": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.Container.__init__": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.__init__": {"tf": 1}, "odfdo.EllipseShape.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1}, "odfdo.IndexTitleTemplate.__init__": {"tf": 1}, "odfdo.LineBreak.__init__": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Meta.__init__": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.Note.__init__": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Section.__init__": {"tf": 1}, "odfdo.Spacer.__init__": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Text.__init__": {"tf": 1}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.UserFieldDecl.__init__": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarDecl.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1}, "odfdo.VarInitialCreator.__init__": {"tf": 1}, "odfdo.VarPageNumber.__init__": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}, "odfdo.XmlPart.__init__": {"tf": 1}}, "df": 66, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimPar": {"tf": 1}, "odfdo.AnimPar.__init__": {"tf": 1}, "odfdo.AnimPar.presentation_node_type": {"tf": 1}, "odfdo.AnimPar.smil_begin": {"tf": 1}}, "df": 4}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "q": {"docs": {"odfdo.AnimSeq": {"tf": 1}, "odfdo.AnimSeq.__init__": {"tf": 1}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1}}, "df": 3}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}, "odfdo.AnimTransFilter.__init__": {"tf": 1}, "odfdo.AnimTransFilter.smil_dur": {"tf": 1}, "odfdo.AnimTransFilter.smil_type": {"tf": 1}, "odfdo.AnimTransFilter.smil_subtype": {"tf": 1}, "odfdo.AnimTransFilter.smil_direction": {"tf": 1}, "odfdo.AnimTransFilter.smil_fadeColor": {"tf": 1}, "odfdo.AnimTransFilter.smil_mode": {"tf": 1}}, "df": 8}}}}}}}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Annotation": {"tf": 1}, "odfdo.Annotation.__init__": {"tf": 1}, "odfdo.Annotation.note_body": {"tf": 1}, "odfdo.Annotation.start": {"tf": 1}, "odfdo.Annotation.end": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.Annotation.check_validity": {"tf": 1}, "odfdo.Annotation.name": {"tf": 1}, "odfdo.Annotation.note_id": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}}, "df": 15, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.AnnotationEnd.end": {"tf": 1}, "odfdo.AnnotationEnd.name": {"tf": 1}}, "df": 5}}}, "s": {"docs": {"odfdo.Element.get_annotations": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}}, "df": 1}}}}}}}, "d": {"docs": {"odfdo.ElementTyped.set_value_and_type": {"tf": 1}}, "df": 1}}, "d": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Manifest.add_full_path": {"tf": 1}}, "df": 3}, "j": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarDate.date_adjust": {"tf": 1}, "odfdo.VarPageNumber.page_adjust": {"tf": 1}, "odfdo.VarTime.time_adjust": {"tf": 1}}, "df": 3}}}}}, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawImage.actuate": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.set_attribute": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.del_attribute": {"tf": 1}}, "df": 6, "s": {"docs": {"odfdo.Element.attributes": {"tf": 1}}, "df": 1}}}}}}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.append": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.List.append_item": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Table.append": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}}, "df": 9}}}}}, "l": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}}, "df": 2}}}}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.AnimPar.__init__": {"tf": 1}, "odfdo.AnimSeq.__init__": {"tf": 1}, "odfdo.AnimTransFilter.__init__": {"tf": 1}, "odfdo.Annotation.__init__": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Bookmark.__init__": {"tf": 1}, "odfdo.BookmarkEnd.__init__": {"tf": 1}, "odfdo.BookmarkStart.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.ChangeInfo.__init__": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.Container.__init__": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.__init__": {"tf": 1}, "odfdo.EllipseShape.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1}, "odfdo.IndexTitleTemplate.__init__": {"tf": 1}, "odfdo.LineBreak.__init__": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Meta.__init__": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.Note.__init__": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Section.__init__": {"tf": 1}, "odfdo.Spacer.__init__": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Text.__init__": {"tf": 1}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.UserFieldDecl.__init__": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarDecl.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1}, "odfdo.VarInitialCreator.__init__": {"tf": 1}, "odfdo.VarPageNumber.__init__": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}, "odfdo.XmlPart.__init__": {"tf": 1}}, "df": 66, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}}, "df": 2}}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.List.insert_item": {"tf": 1}, "odfdo.Paragraph.insert_note": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.insert_variable": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}}, "df": 12, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 4}}}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.get_attribute_integer": {"tf": 1}}, "df": 1}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.Element.index": {"tf": 1}}, "df": 1, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.IndexTitle": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1}, "odfdo.IndexTitle.set_title_text": {"tf": 1}, "odfdo.IndexTitle.name": {"tf": 1}, "odfdo.IndexTitle.style": {"tf": 1}, "odfdo.IndexTitle.xml_id": {"tf": 1}, "odfdo.IndexTitle.protected": {"tf": 1}, "odfdo.IndexTitle.protection_key": {"tf": 1}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}}, "df": 9, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.IndexTitleTemplate": {"tf": 1}, "odfdo.IndexTitleTemplate.__init__": {"tf": 1}, "odfdo.IndexTitleTemplate.style": {"tf": 1}}, "df": 3}}}}}}}}}}}}}}}}, "f": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.TextChange.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 5}}}, "d": {"docs": {"odfdo.Annotation.note_id": {"tf": 1}, "odfdo.DrawGroup.draw_id": {"tf": 1}, "odfdo.DrawGroup.caption_id": {"tf": 1}, "odfdo.DrawGroup.xml_id": {"tf": 1}, "odfdo.DrawPage.draw_id": {"tf": 1}, "odfdo.Frame.draw_id": {"tf": 1}, "odfdo.IndexTitle.xml_id": {"tf": 1}, "odfdo.Note.note_id": {"tf": 1}, "odfdo.TOC.xml_id": {"tf": 1}, "odfdo.TextChange.get_id": {"tf": 1}, "odfdo.TextChange.set_id": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}}, "df": 13, "s": {"docs": {"odfdo.Element.get_changes_ids": {"tf": 1}}, "df": 1}}, "s": {"docs": {"odfdo.Cell.is_empty": {"tf": 1}, "odfdo.Element.is_bound": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Text.is_text": {"tf": 1}, "odfdo.Text.is_tail": {"tf": 1}}, "df": 9}, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_image": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Frame.set_image": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}}, "df": 5, "s": {"docs": {"odfdo.Element.get_images": {"tf": 1}}, "df": 1}}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.List.get_item": {"tf": 1}, "odfdo.List.insert_item": {"tf": 1}, "odfdo.List.append_item": {"tf": 1}}, "df": 3, "s": {"docs": {"odfdo.List.get_items": {"tf": 1}}, "df": 1}}, "r": {"docs": {"odfdo.Table.iter_values": {"tf": 1}}, "df": 1}}}}, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnimPar.presentation_node_type": {"tf": 1}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1}, "odfdo.DrawGroup.presentation_style": {"tf": 1}, "odfdo.DrawPage.presentation_page_layout": {"tf": 1}, "odfdo.Frame.presentation_class": {"tf": 1}, "odfdo.Frame.presentation_style": {"tf": 1}}, "df": 7}}}}}}}}}, "v": {"docs": {"odfdo.PREV_SIBLING": {"tf": 1}}, "df": 1}}, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.IndexTitle.protected": {"tf": 1}, "odfdo.TOC.protected": {"tf": 1}, "odfdo.Table.protected": {"tf": 1}}, "df": 3}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.IndexTitle.protection_key": {"tf": 1}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}, "odfdo.TOC.protection_key": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}, "odfdo.Table.protection_key": {"tf": 1}}, "df": 5}}}}}}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}}, "df": 3}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Table.print_ranges": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.printable": {"tf": 1}}, "df": 1}}}}}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.BackgroundImage.font_pitch": {"tf": 1}, "odfdo.Style.font_pitch": {"tf": 1}}, "df": 2}}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.DrawGroup.pos_x": {"tf": 1}, "odfdo.DrawGroup.pos_y": {"tf": 1}, "odfdo.Frame.pos_x": {"tf": 1}, "odfdo.Frame.pos_y": {"tf": 1}}, "df": 4, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.BackgroundImage.position": {"tf": 1}, "odfdo.Style.style_position": {"tf": 1}, "odfdo.Tab.position": {"tf": 1}, "odfdo.TabStopStyle.style_position": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 5}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.ConnectorShape.start_glue_point": {"tf": 1}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1}}, "df": 2}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Container.path": {"tf": 1}, "odfdo.Document.path": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Manifest.add_full_path": {"tf": 1}, "odfdo.Manifest.del_full_path": {"tf": 1}}, "df": 5, "s": {"docs": {"odfdo.Manifest.get_paths": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Container.get_part": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Container.del_part": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.XmlPart.part_name": {"tf": 1}}, "df": 7, "s": {"docs": {"odfdo.Container.get_parts": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}}, "df": 2}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.parent": {"tf": 1}, "odfdo.Style.parent_style": {"tf": 1}, "odfdo.Text.parent": {"tf": 1}}, "df": 3}}}, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Paragraph.insert_note": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_variable": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}}, "df": 17, "s": {"docs": {"odfdo.Element.get_paragraphs": {"tf": 1}}, "df": 1}}}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.DrawPage.master_page": {"tf": 1}, "odfdo.DrawPage.presentation_page_layout": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Style.page_layout": {"tf": 1}, "odfdo.Style.master_page": {"tf": 1}, "odfdo.Styles.get_master_page": {"tf": 1}, "odfdo.VarPageNumber.select_page": {"tf": 1}, "odfdo.VarPageNumber.page_adjust": {"tf": 1}}, "df": 13, "s": {"docs": {"odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Styles.get_master_pages": {"tf": 1}}, "df": 2}, "b": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.PageBreak": {"tf": 1}}, "df": 1}}}}}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.default_percentage_style": {"tf": 1}}, "df": 1}}}}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimPar.presentation_node_type": {"tf": 1}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1}}, "df": 2}}, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.note_body": {"tf": 1}, "odfdo.Annotation.note_id": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Note": {"tf": 1}, "odfdo.Note.__init__": {"tf": 1}, "odfdo.Note.citation": {"tf": 1}, "odfdo.Note.note_body": {"tf": 1.4142135623730951}, "odfdo.Note.check_validity": {"tf": 1}, "odfdo.Note.note_class": {"tf": 1.4142135623730951}, "odfdo.Note.note_id": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_note": {"tf": 1}}, "df": 11, "s": {"docs": {"odfdo.Element.get_notes": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.name": {"tf": 1}, "odfdo.AnnotationEnd.name": {"tf": 1}, "odfdo.BackgroundImage.name": {"tf": 1}, "odfdo.BackgroundImage.display_name": {"tf": 1}, "odfdo.Bookmark.name": {"tf": 1}, "odfdo.BookmarkEnd.name": {"tf": 1}, "odfdo.BookmarkStart.name": {"tf": 1}, "odfdo.DrawFillImage.display_name": {"tf": 1}, "odfdo.DrawFillImage.name": {"tf": 1}, "odfdo.DrawGroup.name": {"tf": 1}, "odfdo.DrawImage.filter_name": {"tf": 1}, "odfdo.DrawPage.name": {"tf": 1}, "odfdo.Frame.name": {"tf": 1}, "odfdo.IndexTitle.name": {"tf": 1}, "odfdo.Link.name": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.NamedRange.table_name": {"tf": 1}, "odfdo.NamedRange.name": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.Reference.name": {"tf": 1}, "odfdo.ReferenceMark.name": {"tf": 1}, "odfdo.ReferenceMarkEnd.name": {"tf": 1}, "odfdo.ReferenceMarkStart.name": {"tf": 1}, "odfdo.Section.name": {"tf": 1}, "odfdo.Style.name": {"tf": 1}, "odfdo.Style.display_name": {"tf": 1}, "odfdo.TOC.name": {"tf": 1}, "odfdo.Table.name": {"tf": 1}, "odfdo.UserDefined.name": {"tf": 1}, "odfdo.UserFieldDecl.name": {"tf": 1}, "odfdo.UserFieldGet.name": {"tf": 1}, "odfdo.UserFieldInput.name": {"tf": 1}, "odfdo.VarDecl.name": {"tf": 1}, "odfdo.VarGet.name": {"tf": 1}, "odfdo.VarSet.name": {"tf": 1}, "odfdo.XmlPart.part_name": {"tf": 1}}, "df": 36, "s": {"docs": {"odfdo.DrawGroup.draw_class_names": {"tf": 1}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Span.class_names": {"tf": 1}}, "df": 4}, "d": {"docs": {"odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}}, "df": 8, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.NamedRange": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.usage": {"tf": 1}, "odfdo.NamedRange.table_name": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.name": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}}, "df": 12}}}}}}}}}, "e": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.Document.new": {"tf": 1}}, "df": 1}, "x": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.NEXT_SIBLING": {"tf": 1}, "odfdo.Style.next_style": {"tf": 1}}, "df": 2}}}, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Spacer.number": {"tf": 1}, "odfdo.default_number_style": {"tf": 1}}, "df": 2, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Header.restart_numbering": {"tf": 1}, "odfdo.Header.suppress_numbering": {"tf": 1}}, "df": 2}}}}}}}}}, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimPar.presentation_node_type": {"tf": 1}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1}, "odfdo.AnimTransFilter.smil_type": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.DrawImage.type": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Style.style_type": {"tf": 1}, "odfdo.TabStopStyle.leader_type": {"tf": 1}, "odfdo.TabStopStyle.style_type": {"tf": 1}, "odfdo.VarDecl.value_type": {"tf": 1}}, "df": 13}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.text_style": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.text": {"tf": 1}, "odfdo.Element.text_recursive": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Frame.get_text_box": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.IndexTitle.set_title_text": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Style.text_style": {"tf": 1}, "odfdo.Style.leader_text": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.TabStopStyle.leader_text": {"tf": 1}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Text": {"tf": 1}, "odfdo.Text.__init__": {"tf": 1}, "odfdo.Text.parent": {"tf": 1}, "odfdo.Text.is_text": {"tf": 1.4142135623730951}, "odfdo.Text.is_tail": {"tf": 1}}, "df": 37, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextChange": {"tf": 1}, "odfdo.TextChange.get_id": {"tf": 1}, "odfdo.TextChange.set_id": {"tf": 1}, "odfdo.TextChange.get_changed_region": {"tf": 1}, "odfdo.TextChange.get_change_info": {"tf": 1}, "odfdo.TextChange.get_change_element": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}}, "df": 10, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}}, "df": 5}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangeStart.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 4}}}}}, "d": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}}, "df": 6}}}}}}}}}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextDeletion": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}}, "df": 4}}}}}}}}, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextFormatChange": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextInsertion": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 5}}}}}}}}}}}}, "a": {"docs": {}, "df": 0, "b": {"docs": {"odfdo.Tab": {"tf": 1}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.Tab.position": {"tf": 1}}, "df": 3, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup.table_end_cell": {"tf": 1}, "odfdo.DrawGroup.table_end_x": {"tf": 1}, "odfdo.DrawGroup.table_end_y": {"tf": 1}, "odfdo.DrawGroup.table_background": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.NamedRange.table_name": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.Table": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.append": {"tf": 1}, "odfdo.Table.height": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.size": {"tf": 1}, "odfdo.Table.name": {"tf": 1}, "odfdo.Table.protected": {"tf": 1}, "odfdo.Table.protection_key": {"tf": 1}, "odfdo.Table.displayed": {"tf": 1}, "odfdo.Table.printable": {"tf": 1}, "odfdo.Table.print_ranges": {"tf": 1}, "odfdo.Table.style": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 70, "s": {"docs": {"odfdo.Element.get_tables": {"tf": 1}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TabStopStyle": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1}, "odfdo.TabStopStyle.style_char": {"tf": 1}, "odfdo.TabStopStyle.leader_color": {"tf": 1}, "odfdo.TabStopStyle.leader_style": {"tf": 1}, "odfdo.TabStopStyle.leader_text": {"tf": 1}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1}, "odfdo.TabStopStyle.leader_type": {"tf": 1}, "odfdo.TabStopStyle.leader_width": {"tf": 1}, "odfdo.TabStopStyle.style_position": {"tf": 1}, "odfdo.TabStopStyle.style_type": {"tf": 1}}, "df": 11}}}}}}}}}}, "g": {"docs": {"odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}}, "df": 3, "s": {"docs": {"odfdo.Element.strip_tags": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Element.tail": {"tf": 1}, "odfdo.Text.is_tail": {"tf": 1}}, "df": 2}}, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Link.target_frame": {"tf": 1}}, "df": 1}}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.DrawPage.set_transition": {"tf": 1}}, "df": 1}}}}}, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.transpose": {"tf": 1}}, "df": 1}}}}}}, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.get_tracked_changes": {"tf": 1}}, "df": 1, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.TrackedChanges": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}}, "df": 3}}}}}}}}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 3}}}}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.svg_title": {"tf": 1}, "odfdo.IndexTitle.set_title_text": {"tf": 1}, "odfdo.Link.title": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.TOC.get_title": {"tf": 1}, "odfdo.TOC.set_toc_title": {"tf": 1}}, "df": 7}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarTime.time": {"tf": 1}, "odfdo.VarTime.time_adjust": {"tf": 1}, "odfdo.default_time_style": {"tf": 1}}, "df": 3}}}, "o": {"docs": {"odfdo.Table.to_csv": {"tf": 1}}, "df": 1, "c": {"docs": {"odfdo.Element.get_toc": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.TOC.create_toc_source": {"tf": 1.4142135623730951}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.TOC.outline_level": {"tf": 1}, "odfdo.TOC.body": {"tf": 1}, "odfdo.TOC.get_title": {"tf": 1}, "odfdo.TOC.set_toc_title": {"tf": 1.4142135623730951}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.TOC.name": {"tf": 1}, "odfdo.TOC.style": {"tf": 1}, "odfdo.TOC.xml_id": {"tf": 1}, "odfdo.TOC.protected": {"tf": 1}, "odfdo.TOC.protection_key": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 17, "s": {"docs": {"odfdo.Element.get_tocs": {"tf": 1}}, "df": 1}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TocEntryTemplate": {"tf": 1}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.TocEntryTemplate.outline_level": {"tf": 1}, "odfdo.TocEntryTemplate.complete_defaults": {"tf": 1}, "odfdo.TocEntryTemplate.style": {"tf": 1}}, "df": 5}}}}}}}}}}}}}}}}, "s": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.AnimPar.smil_begin": {"tf": 1}, "odfdo.AnimTransFilter.smil_dur": {"tf": 1}, "odfdo.AnimTransFilter.smil_type": {"tf": 1}, "odfdo.AnimTransFilter.smil_subtype": {"tf": 1}, "odfdo.AnimTransFilter.smil_direction": {"tf": 1}, "odfdo.AnimTransFilter.smil_fadeColor": {"tf": 1}, "odfdo.AnimTransFilter.smil_mode": {"tf": 1}}, "df": 7}}}, "u": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimTransFilter.smil_subtype": {"tf": 1}}, "df": 1}}}}, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}}, "df": 2}}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Header.suppress_numbering": {"tf": 1}}, "df": 1}}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation.start": {"tf": 1}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.ConnectorShape.start_shape": {"tf": 1}, "odfdo.ConnectorShape.start_glue_point": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Header.start_value": {"tf": 1}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_start": {"tf": 1}}, "df": 11, "s": {"docs": {"odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}}, "df": 3}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 2}}}}}}}, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage.text_style": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.Column.style": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.DrawGroup.style": {"tf": 1}, "odfdo.DrawGroup.presentation_style": {"tf": 1}, "odfdo.DrawPage.style": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Frame.style": {"tf": 1}, "odfdo.Frame.presentation_style": {"tf": 1}, "odfdo.IndexTitle.style": {"tf": 1}, "odfdo.IndexTitleTemplate.style": {"tf": 1}, "odfdo.Link.visited_style": {"tf": 1}, "odfdo.Link.style": {"tf": 1}, "odfdo.List.style": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Section.style": {"tf": 1}, "odfdo.Span.style": {"tf": 1}, "odfdo.Style": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.family": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.get_level_style": {"tf": 1.4142135623730951}, "odfdo.Style.set_level_style": {"tf": 1.4142135623730951}, "odfdo.Style.get_header_style": {"tf": 1.4142135623730951}, "odfdo.Style.set_header_style": {"tf": 1.4142135623730951}, "odfdo.Style.get_footer_style": {"tf": 1.4142135623730951}, "odfdo.Style.set_footer_style": {"tf": 1.4142135623730951}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Style.set_font": {"tf": 1}, "odfdo.Style.page_layout": {"tf": 1}, "odfdo.Style.next_style": {"tf": 1.4142135623730951}, "odfdo.Style.name": {"tf": 1}, "odfdo.Style.parent_style": {"tf": 1.4142135623730951}, "odfdo.Style.display_name": {"tf": 1}, "odfdo.Style.svg_font_family": {"tf": 1}, "odfdo.Style.font_family_generic": {"tf": 1}, "odfdo.Style.font_pitch": {"tf": 1}, "odfdo.Style.text_style": {"tf": 1.4142135623730951}, "odfdo.Style.master_page": {"tf": 1}, "odfdo.Style.style_type": {"tf": 1.4142135623730951}, "odfdo.Style.leader_style": {"tf": 1.4142135623730951}, "odfdo.Style.leader_text": {"tf": 1}, "odfdo.Style.style_position": {"tf": 1.4142135623730951}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC.style": {"tf": 1}, "odfdo.TabStopStyle.style_char": {"tf": 1}, "odfdo.TabStopStyle.leader_style": {"tf": 1}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1}, "odfdo.TabStopStyle.style_position": {"tf": 1}, "odfdo.TabStopStyle.style_type": {"tf": 1}, "odfdo.Table.style": {"tf": 1}, "odfdo.TocEntryTemplate.style": {"tf": 1}, "odfdo.UserDefined.style": {"tf": 1}, "odfdo.UserFieldGet.style": {"tf": 1}, "odfdo.UserFieldInput.style": {"tf": 1}, "odfdo.VarCreationDate.data_style": {"tf": 1}, "odfdo.VarCreationTime.data_style": {"tf": 1}, "odfdo.VarDate.data_style": {"tf": 1}, "odfdo.VarGet.style": {"tf": 1}, "odfdo.VarSet.style": {"tf": 1}, "odfdo.VarTime.data_style": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}, "odfdo.default_boolean_style": {"tf": 1}, "odfdo.default_currency_style": {"tf": 1}, "odfdo.default_date_style": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}, "odfdo.default_number_style": {"tf": 1}, "odfdo.default_percentage_style": {"tf": 1}, "odfdo.default_time_style": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 83, "s": {"docs": {"odfdo.Content.get_styles": {"tf": 1}, "odfdo.Document.styles": {"tf": 1}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.show_styles": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Element.get_styles": {"tf": 1}, "odfdo.Styles": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1.4142135623730951}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Styles.get_master_pages": {"tf": 1}, "odfdo.Styles.get_master_page": {"tf": 1}}, "df": 12}, "d": {"docs": {"odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}}, "df": 2}}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Cell.string": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 3}}, "p": {"docs": {"odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}}, "df": 2}}}}, "v": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.BackgroundImage.svg_font_family": {"tf": 1}, "odfdo.Element.svg_title": {"tf": 1}, "odfdo.Element.svg_description": {"tf": 1}, "odfdo.Style.svg_font_family": {"tf": 1}}, "df": 4}}, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Cell.set_value": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.DrawPage.set_transition": {"tf": 1}, "odfdo.Element.set_attribute": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.Frame.set_image": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}, "odfdo.IndexTitle.set_title_text": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Style.set_header_style": {"tf": 1}, "odfdo.Style.set_footer_style": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Style.set_font": {"tf": 1}, "odfdo.TOC.set_toc_title": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.TextChange.set_id": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.UserFieldDecl.set_value": {"tf": 1}, "odfdo.VarSet.set_value": {"tf": 1}}, "df": 77, "s": {"docs": {"odfdo.Element.get_variable_sets": {"tf": 1}}, "df": 1}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.elements_repeated_sequence": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.search": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.serialize": {"tf": 1}, "odfdo.XmlPart.serialize": {"tf": 1}}, "df": 2}}}}}}}, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_section": {"tf": 1}, "odfdo.Section": {"tf": 1}, "odfdo.Section.__init__": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Section.style": {"tf": 1}, "odfdo.Section.name": {"tf": 1}}, "df": 6, "s": {"docs": {"odfdo.Element.get_sections": {"tf": 1}}, "df": 1}}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarPageNumber.select_page": {"tf": 1}}, "df": 1}}}}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ConnectorShape.start_shape": {"tf": 1}, "odfdo.ConnectorShape.end_shape": {"tf": 1}}, "df": 2, "s": {"docs": {"odfdo.DrawPage.get_shapes": {"tf": 1}}, "df": 1}}}}, "o": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.Document.show_styles": {"tf": 1}, "odfdo.DrawImage.show": {"tf": 1}, "odfdo.Link.show": {"tf": 1}}, "df": 3}}}, "a": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Container.save": {"tf": 1}, "odfdo.Document.save": {"tf": 1}}, "df": 2}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_span": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Span": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Span.style": {"tf": 1}, "odfdo.Span.class_names": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}}, "df": 9, "s": {"docs": {"odfdo.Element.get_spans": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}}, "df": 2}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Spacer": {"tf": 1}, "odfdo.Spacer.__init__": {"tf": 1}, "odfdo.Spacer.number": {"tf": 1}}, "df": 3}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}}, "df": 2}}}}, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.NEXT_SIBLING": {"tf": 1}, "odfdo.PREV_SIBLING": {"tf": 1}}, "df": 2}}}}}, "z": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.size": {"tf": 1}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TOC.create_toc_source": {"tf": 1}}, "df": 1}}}}}}, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnimPar.smil_begin": {"tf": 1}}, "df": 1}}}, "t": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_between": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Annotation.note_body": {"tf": 1}, "odfdo.Content.body": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1}, "odfdo.Meta.get_meta_body": {"tf": 1}, "odfdo.Note.note_body": {"tf": 1}, "odfdo.TOC.body": {"tf": 1}}, "df": 7}}, "o": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Bookmark": {"tf": 1}, "odfdo.Bookmark.__init__": {"tf": 1}, "odfdo.Bookmark.name": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}}, "df": 9, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.BookmarkEnd": {"tf": 1}, "odfdo.BookmarkEnd.__init__": {"tf": 1}, "odfdo.BookmarkEnd.name": {"tf": 1}}, "df": 3}}}, "s": {"docs": {"odfdo.Element.get_bookmarks": {"tf": 1}}, "df": 1, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BookmarkStart": {"tf": 1}, "odfdo.BookmarkStart.__init__": {"tf": 1}, "odfdo.BookmarkStart.name": {"tf": 1}}, "df": 3}}}}}}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.default_boolean_style": {"tf": 1}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.is_bound": {"tf": 1}}, "df": 1}}}, "x": {"docs": {"odfdo.Frame.get_text_box": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}}, "df": 2}, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.DrawGroup.table_background": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}}, "df": 2, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.BackgroundImage.name": {"tf": 1}, "odfdo.BackgroundImage.display_name": {"tf": 1}, "odfdo.BackgroundImage.svg_font_family": {"tf": 1}, "odfdo.BackgroundImage.font_family_generic": {"tf": 1}, "odfdo.BackgroundImage.font_pitch": {"tf": 1}, "odfdo.BackgroundImage.position": {"tf": 1}, "odfdo.BackgroundImage.repeat": {"tf": 1}, "odfdo.BackgroundImage.opacity": {"tf": 1}, "odfdo.BackgroundImage.filter": {"tf": 1}, "odfdo.BackgroundImage.text_style": {"tf": 1}}, "df": 12}}}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1}}, "df": 1}}}}}, "d": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimTransFilter.smil_dur": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}}, "df": 2}}}}}}}, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnimTransFilter.smil_direction": {"tf": 1}}, "df": 1}}}}}}}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.BackgroundImage.display_name": {"tf": 1}, "odfdo.DrawFillImage.display_name": {"tf": 1}, "odfdo.Style.display_name": {"tf": 1}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarChapter.display": {"tf": 1}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarFileName.display": {"tf": 1}, "odfdo.VarSet.display": {"tf": 1}}, "df": 8, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Table.displayed": {"tf": 1}}, "df": 1}}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}}, "df": 2}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Container.del_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Element.del_attribute": {"tf": 1}, "odfdo.Manifest.del_full_path": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}}, "df": 6, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.XmlPart.delete_element": {"tf": 1}}, "df": 12, "d": {"docs": {"odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}}, "df": 5}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_text_change_deletion": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Element.get_text_change_deletions": {"tf": 1}}, "df": 1}}}}}}}, "f": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.default_boolean_style": {"tf": 1}, "odfdo.default_currency_style": {"tf": 1}, "odfdo.default_date_style": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}, "odfdo.default_number_style": {"tf": 1}, "odfdo.default_percentage_style": {"tf": 1}, "odfdo.default_time_style": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 11, "s": {"docs": {"odfdo.TocEntryTemplate.complete_defaults": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}}, "df": 6}}}}}, "s": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.svg_description": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}}, "df": 3}}}}}}}}}, "c": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}}, "df": 4, "s": {"docs": {"odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}}, "df": 2}}}}, "c": {"docs": {"odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}}, "df": 4}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.VarDate.date": {"tf": 1}, "odfdo.VarDate.date_adjust": {"tf": 1}, "odfdo.default_date_style": {"tf": 1}}, "df": 9}, "a": {"docs": {"odfdo.VarCreationDate.data_style": {"tf": 1}, "odfdo.VarCreationTime.data_style": {"tf": 1}, "odfdo.VarDate.data_style": {"tf": 1}, "odfdo.VarTime.data_style": {"tf": 1}}, "df": 4}}}, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.Document.container": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.path": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Document.mimetype": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.Document.meta": {"tf": 1}, "odfdo.Document.manifest": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.clone": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Document.content": {"tf": 1}, "odfdo.Document.styles": {"tf": 1}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Document.show_styles": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1}}, "df": 30}}}}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.DrawGroup.draw_id": {"tf": 1}, "odfdo.DrawGroup.draw_class_names": {"tf": 1}, "odfdo.DrawPage.draw_id": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Frame.draw_id": {"tf": 1}}, "df": 17, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawFillImage.display_name": {"tf": 1}, "odfdo.DrawFillImage.name": {"tf": 1}, "odfdo.DrawFillImage.height": {"tf": 1}, "odfdo.DrawFillImage.width": {"tf": 1}}, "df": 6}}}}}}}}}, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawGroup.draw_id": {"tf": 1}, "odfdo.DrawGroup.caption_id": {"tf": 1}, "odfdo.DrawGroup.draw_class_names": {"tf": 1}, "odfdo.DrawGroup.name": {"tf": 1}, "odfdo.DrawGroup.style": {"tf": 1}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1}, "odfdo.DrawGroup.presentation_style": {"tf": 1}, "odfdo.DrawGroup.table_end_cell": {"tf": 1}, "odfdo.DrawGroup.table_end_x": {"tf": 1}, "odfdo.DrawGroup.table_end_y": {"tf": 1}, "odfdo.DrawGroup.table_background": {"tf": 1}, "odfdo.DrawGroup.xml_id": {"tf": 1}, "odfdo.DrawGroup.pos_x": {"tf": 1}, "odfdo.DrawGroup.pos_y": {"tf": 1}}, "df": 16}}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawImage": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawImage.url": {"tf": 1}, "odfdo.DrawImage.type": {"tf": 1}, "odfdo.DrawImage.show": {"tf": 1}, "odfdo.DrawImage.actuate": {"tf": 1}, "odfdo.DrawImage.filter_name": {"tf": 1}}, "df": 7}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawPage": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.DrawPage.set_transition": {"tf": 1}, "odfdo.DrawPage.get_shapes": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.DrawPage.name": {"tf": 1}, "odfdo.DrawPage.draw_id": {"tf": 1}, "odfdo.DrawPage.master_page": {"tf": 1}, "odfdo.DrawPage.presentation_page_layout": {"tf": 1}, "odfdo.DrawPage.style": {"tf": 1}}, "df": 10}}}}}}}}, "f": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimTransFilter.smil_fadeColor": {"tf": 1}}, "df": 1}}}}}}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.BackgroundImage.svg_font_family": {"tf": 1}, "odfdo.BackgroundImage.font_family_generic": {"tf": 1}, "odfdo.Style.family": {"tf": 1}, "odfdo.Style.svg_font_family": {"tf": 1}, "odfdo.Style.font_family_generic": {"tf": 1}}, "df": 5}}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.svg_font_family": {"tf": 1}, "odfdo.BackgroundImage.font_family_generic": {"tf": 1}, "odfdo.BackgroundImage.font_pitch": {"tf": 1}, "odfdo.Style.set_font": {"tf": 1}, "odfdo.Style.svg_font_family": {"tf": 1}, "odfdo.Style.font_family_generic": {"tf": 1}, "odfdo.Style.font_pitch": {"tf": 1}}, "df": 7}}, "r": {"docs": {"odfdo.Element.from_tag_for_clone": {"tf": 1}}, "df": 1, "m": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Cell.formula": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1}, "odfdo.Reference.ref_format": {"tf": 1}}, "df": 2, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}}, "df": 9}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.get_formated_meta": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Style.get_footer_style": {"tf": 1}, "odfdo.Style.set_footer_style": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}}, "df": 4}}}}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.BackgroundImage.filter": {"tf": 1}, "odfdo.DrawImage.filter_name": {"tf": 1}}, "df": 2}}}, "e": {"docs": {"odfdo.Document.add_file": {"tf": 1}, "odfdo.Manifest.make_file_entry": {"tf": 1}}, "df": 2}, "l": {"docs": {"odfdo.TOC.fill": {"tf": 1}}, "df": 1}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}}, "df": 4}}}, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.FIRST_CHILD": {"tf": 1}}, "df": 1}}}, "x": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.VarCreationDate.fixed": {"tf": 1}, "odfdo.VarCreationTime.fixed": {"tf": 1}, "odfdo.VarDate.fixed": {"tf": 1}, "odfdo.VarDescription.fixed": {"tf": 1}, "odfdo.VarFileName.fixed": {"tf": 1}, "odfdo.VarInitialCreator.fixed": {"tf": 1}, "odfdo.VarKeywords.fixed": {"tf": 1}, "odfdo.VarSubject.fixed": {"tf": 1}, "odfdo.VarTime.fixed": {"tf": 1}, "odfdo.VarTitle.fixed": {"tf": 1}}, "df": 10}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Cell.float": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}}, "df": 3}}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_frame": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Frame.set_image": {"tf": 1}, "odfdo.Frame.get_text_box": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Frame.name": {"tf": 1}, "odfdo.Frame.draw_id": {"tf": 1}, "odfdo.Frame.width": {"tf": 1}, "odfdo.Frame.height": {"tf": 1}, "odfdo.Frame.style": {"tf": 1}, "odfdo.Frame.pos_x": {"tf": 1}, "odfdo.Frame.pos_y": {"tf": 1}, "odfdo.Frame.presentation_class": {"tf": 1}, "odfdo.Frame.layer": {"tf": 1}, "odfdo.Frame.presentation_style": {"tf": 1}, "odfdo.Link.target_frame": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 23, "s": {"docs": {"odfdo.Element.get_frames": {"tf": 1}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Manifest.add_full_path": {"tf": 1}, "odfdo.Manifest.del_full_path": {"tf": 1}}, "df": 2}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimTransFilter.smil_mode": {"tf": 1}}, "df": 1}, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}}, "df": 2}}}}}}}}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Container.mimetype": {"tf": 1}, "odfdo.Document.mimetype": {"tf": 1}}, "df": 2}}}}}}}, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Document.meta": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Meta": {"tf": 1}, "odfdo.Meta.__init__": {"tf": 1}, "odfdo.Meta.get_meta_body": {"tf": 1.4142135623730951}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}}, "df": 37, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}}, "df": 3}}}}}}, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.merge_styles_from": {"tf": 1}}, "df": 1}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}}, "df": 2, "s": {"docs": {"odfdo.Manifest.get_path_medias": {"tf": 1}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.manifest": {"tf": 1}, "odfdo.Manifest": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Manifest.make_file_entry": {"tf": 1}, "odfdo.Manifest.add_full_path": {"tf": 1}, "odfdo.Manifest.del_full_path": {"tf": 1}}, "df": 9}}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.DrawPage.master_page": {"tf": 1}, "odfdo.Style.master_page": {"tf": 1}, "odfdo.Styles.get_master_pages": {"tf": 1}, "odfdo.Styles.get_master_page": {"tf": 1}}, "df": 4}}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.make_etree_element": {"tf": 1}, "odfdo.Manifest.make_file_entry": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 3}}, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.match": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}}, "df": 8, "s": {"docs": {"odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}}, "df": 2}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Annotation.end": {"tf": 1}, "odfdo.AnnotationEnd.end": {"tf": 1}, "odfdo.ConnectorShape.end_shape": {"tf": 1}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1}, "odfdo.DrawGroup.table_end_cell": {"tf": 1}, "odfdo.DrawGroup.table_end_x": {"tf": 1}, "odfdo.DrawGroup.table_end_y": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}}, "df": 16, "s": {"docs": {"odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}}, "df": 4}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Manifest.make_file_entry": {"tf": 1}}, "df": 1}}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Cell.is_empty": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 6}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element": {"tf": 1}, "odfdo.Element.__init__": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Element.make_etree_element": {"tf": 1.4142135623730951}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.get_element": {"tf": 1.4142135623730951}, "odfdo.Element.attributes": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.set_attribute": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.del_attribute": {"tf": 1}, "odfdo.Element.text": {"tf": 1}, "odfdo.Element.text_recursive": {"tf": 1}, "odfdo.Element.tail": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.root": {"tf": 1}, "odfdo.Element.parent": {"tf": 1}, "odfdo.Element.is_bound": {"tf": 1}, "odfdo.Element.children": {"tf": 1}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1.4142135623730951}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.clear": {"tf": 1}, "odfdo.Element.clone": {"tf": 1}, "odfdo.Element.serialize": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Element.svg_title": {"tf": 1}, "odfdo.Element.svg_description": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_styles": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.TextChange.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.XmlPart.get_element": {"tf": 1}, "odfdo.XmlPart.delete_element": {"tf": 1}}, "df": 136, "s": {"docs": {"odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1}}, "df": 6}, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ElementTyped": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}}, "df": 3}}}}}}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_draw_ellipse": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Element.get_draw_ellipses": {"tf": 1}}, "df": 1, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.EllipseShape": {"tf": 1}, "odfdo.EllipseShape.__init__": {"tf": 1}}, "df": 2}}}}}}}}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.make_etree_element": {"tf": 1}}, "df": 1}}}}, "x": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.extend": {"tf": 1}, "odfdo.Row.extend_cells": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1}}, "df": 3}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}}, "df": 4}}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Container.get_parts": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.DrawPage.get_shapes": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.get_element": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_styles": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Frame.get_text_box": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Meta.get_meta_body": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.get_level_style": {"tf": 1}, "odfdo.Style.get_header_style": {"tf": 1}, "odfdo.Style.get_footer_style": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Styles.get_master_pages": {"tf": 1}, "odfdo.Styles.get_master_page": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.TOC.get_title": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.TextChange.get_id": {"tf": 1}, "odfdo.TextChange.get_changed_region": {"tf": 1}, "odfdo.TextChange.get_change_info": {"tf": 1}, "odfdo.TextChange.get_change_element": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1}, "odfdo.XmlPart.get_element": {"tf": 1}}, "df": 195}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.BackgroundImage.font_family_generic": {"tf": 1}, "odfdo.Style.font_family_generic": {"tf": 1}}, "df": 2}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}}, "df": 3}}}}}}}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ConnectorShape.start_glue_point": {"tf": 1}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1}}, "df": 2}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Element.get_draw_group": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Element.get_draw_groups": {"tf": 1}}, "df": 1}}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Annotation.check_validity": {"tf": 1}, "odfdo.Note.check_validity": {"tf": 1}}, "df": 2}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.TextChange.get_change_info": {"tf": 1}, "odfdo.TextChange.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 14, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.ChangeInfo.__init__": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}}, "df": 6}}}}, "s": {"docs": {"odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}}, "df": 3}, "d": {"docs": {"odfdo.TextChange.get_changed_region": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}}, "df": 3}}}}, "r": {"docs": {"odfdo.TabStopStyle.style_char": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.FIRST_CHILD": {"tf": 1}, "odfdo.LAST_CHILD": {"tf": 1}}, "df": 2, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.children": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1}}, "df": 2}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Cell": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.x": {"tf": 1}, "odfdo.Cell.y": {"tf": 1}, "odfdo.Cell.clone": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.float": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.Cell.is_empty": {"tf": 1}, "odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.DrawGroup.table_end_cell": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 31, "s": {"docs": {"odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.extend_cells": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}}, "df": 8}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.clone": {"tf": 1}, "odfdo.Column.clone": {"tf": 1}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Document.clone": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Element.clone": {"tf": 1}, "odfdo.Row.clone": {"tf": 1}, "odfdo.XmlPart.clone": {"tf": 1}}, "df": 8}}}, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.DrawGroup.draw_class_names": {"tf": 1}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1}, "odfdo.Frame.presentation_class": {"tf": 1}, "odfdo.Note.note_class": {"tf": 1}, "odfdo.Span.class_names": {"tf": 1}}, "df": 5}}}, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.clear": {"tf": 1}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Cell.currency": {"tf": 1}, "odfdo.default_currency_style": {"tf": 1}}, "df": 2}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}}, "df": 6}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}}, "df": 2}}}, "e": {"docs": {"odfdo.TOC.create_toc_source": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 2}}}}}, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}}, "df": 4}}}}}, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TocEntryTemplate.complete_defaults": {"tf": 1}}, "df": 1}}}}}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Column": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Column.x": {"tf": 1}, "odfdo.Column.clone": {"tf": 1}, "odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Column.style": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 18, "s": {"docs": {"odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}}, "df": 2}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.TabStopStyle.leader_color": {"tf": 1}}, "df": 1}}}, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.get_draw_connector": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}}, "df": 2, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ConnectorShape": {"tf": 1}, "odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.ConnectorShape.start_shape": {"tf": 1}, "odfdo.ConnectorShape.end_shape": {"tf": 1}, "odfdo.ConnectorShape.start_glue_point": {"tf": 1}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1}, "odfdo.ConnectorShape.x1": {"tf": 1}, "odfdo.ConnectorShape.y1": {"tf": 1}, "odfdo.ConnectorShape.x2": {"tf": 1}, "odfdo.ConnectorShape.y2": {"tf": 1}}, "df": 10}}}}}}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Container": {"tf": 1}, "odfdo.Container.__init__": {"tf": 1}, "odfdo.Container.path": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Container.get_parts": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1}, "odfdo.Container.mimetype": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Container.del_part": {"tf": 1}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Document.container": {"tf": 1}, "odfdo.XmlPart.container": {"tf": 1}}, "df": 13}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Content": {"tf": 1}, "odfdo.Content.body": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.content": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}}, "df": 7}}}}}}, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.DrawGroup.caption_id": {"tf": 1}}, "df": 1}}}}}}, "y": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}}, "df": 2}}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Note.citation": {"tf": 1}}, "df": 1}}}}}}}, "s": {"docs": {}, "df": 0, "v": {"docs": {"odfdo.Table.to_csv": {"tf": 1}}, "df": 1}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Annotation.check_validity": {"tf": 1}, "odfdo.Note.check_validity": {"tf": 1}}, "df": 2}}}}}, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Header.start_value": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.UserFieldDecl.set_value": {"tf": 1}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarDecl.value_type": {"tf": 1}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarSet.set_value": {"tf": 1}}, "df": 19, "s": {"docs": {"odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}}, "df": 11}}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Paragraph.insert_variable": {"tf": 1}}, "df": 7}}}}, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarInitialCreator.__init__": {"tf": 1}, "odfdo.VarInitialCreator.fixed": {"tf": 1}}, "df": 3}}}}}}}}}}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.VarChapter": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarChapter.display": {"tf": 1}, "odfdo.VarChapter.outline_level": {"tf": 1}}, "df": 5}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationDate.fixed": {"tf": 1}, "odfdo.VarCreationDate.data_style": {"tf": 1}}, "df": 4}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarCreationTime.fixed": {"tf": 1}, "odfdo.VarCreationTime.data_style": {"tf": 1}}, "df": 4}}}}}}}}}}}}, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarDate": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarDate.date": {"tf": 1}, "odfdo.VarDate.fixed": {"tf": 1}, "odfdo.VarDate.data_style": {"tf": 1}, "odfdo.VarDate.date_adjust": {"tf": 1}}, "df": 6}}}, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecl.__init__": {"tf": 1}, "odfdo.VarDecl.name": {"tf": 1}, "odfdo.VarDecl.value_type": {"tf": 1}}, "df": 4, "s": {"docs": {"odfdo.VarDecls": {"tf": 1}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.VarDescription": {"tf": 1}, "odfdo.VarDescription.fixed": {"tf": 1}}, "df": 2}}}}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarFileName": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarFileName.display": {"tf": 1}, "odfdo.VarFileName.fixed": {"tf": 1}}, "df": 5}}}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarGet": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1}, "odfdo.VarGet.name": {"tf": 1}, "odfdo.VarGet.style": {"tf": 1}}, "df": 4}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.VarKeywords": {"tf": 1}, "odfdo.VarKeywords.fixed": {"tf": 1}}, "df": 2}}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarPageCount": {"tf": 1}}, "df": 1}}}}}, "n": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.VarPageNumber": {"tf": 1}, "odfdo.VarPageNumber.__init__": {"tf": 1}, "odfdo.VarPageNumber.select_page": {"tf": 1}, "odfdo.VarPageNumber.page_adjust": {"tf": 1}}, "df": 4}}}}}}}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarSet": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}, "odfdo.VarSet.set_value": {"tf": 1}, "odfdo.VarSet.name": {"tf": 1}, "odfdo.VarSet.style": {"tf": 1}, "odfdo.VarSet.display": {"tf": 1}}, "df": 6}}, "u": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarSubject": {"tf": 1}, "odfdo.VarSubject.fixed": {"tf": 1}}, "df": 2}}}}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarTime": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}, "odfdo.VarTime.time": {"tf": 1}, "odfdo.VarTime.fixed": {"tf": 1}, "odfdo.VarTime.data_style": {"tf": 1}, "odfdo.VarTime.time_adjust": {"tf": 1}}, "df": 6}}, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarTitle": {"tf": 1}, "odfdo.VarTitle.fixed": {"tf": 1}}, "df": 2}}}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Link.visited_style": {"tf": 1}}, "df": 1}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.repeat": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell.repeated": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}}, "df": 4}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.replace": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}}, "df": 2}}}}}, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.text_recursive": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_draw_rectangle": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Element.get_draw_rectangles": {"tf": 1}}, "df": 1, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.RectangleShape": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}}, "df": 2}}}}}}}}}}}}, "f": {"docs": {"odfdo.Reference.ref_format": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Reference.format_allowed": {"tf": 1}, "odfdo.Reference.ref_format": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}, "odfdo.Reference.name": {"tf": 1}}, "df": 17, "s": {"docs": {"odfdo.Element.get_references": {"tf": 1}}, "df": 1}, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMark.name": {"tf": 1}}, "df": 3, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ReferenceMarkEnd": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkEnd.name": {"tf": 1}}, "df": 4}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.ReferenceMarkStart": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.ReferenceMarkStart.name": {"tf": 1}}, "df": 6}}}}}}}}}, "d": {"docs": {"odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}}, "df": 3}}}}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Header.restart_numbering": {"tf": 1}}, "df": 1}}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}}, "df": 4}}}}, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextChange.get_changed_region": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}}, "df": 2, "s": {"docs": {"odfdo.TrackedChanges.get_changed_regions": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.root": {"tf": 1}, "odfdo.XmlPart.root": {"tf": 1}}, "df": 2}}, "w": {"docs": {"odfdo.Row": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.y": {"tf": 1}, "odfdo.Row.clone": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.extend_cells": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}}, "df": 32, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.RowGroup": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}}, "df": 2}}}}}, "s": {"docs": {"odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1}}, "df": 2}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}}, "df": 7, "s": {"docs": {"odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Table.print_ranges": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}}, "df": 3}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Row.rstrip": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}}, "df": 2}}}}}, "g": {"docs": {}, "df": 0, "b": {"2": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.rgb2hex": {"tf": 1}}, "df": 1}}}}, "docs": {}, "df": 0}}}, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.BackgroundImage.opacity": {"tf": 1}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Container.open": {"tf": 1}}, "df": 1}}}, "f": {"docs": {"odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}}, "df": 1, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_office_names": {"tf": 1}}, "df": 1}}}}}, "r": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_orphan_draw_connectors": {"tf": 1}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TOC.outline_level": {"tf": 1}, "odfdo.TocEntryTemplate.outline_level": {"tf": 1}, "odfdo.VarChapter.outline_level": {"tf": 1}}, "df": 3}}}}}}}, "x": {"1": {"docs": {"odfdo.ConnectorShape.x1": {"tf": 1}, "odfdo.LineShape.x1": {"tf": 1}}, "df": 2}, "2": {"docs": {"odfdo.ConnectorShape.x2": {"tf": 1}, "odfdo.LineShape.x2": {"tf": 1}}, "df": 2}, "docs": {"odfdo.Cell.x": {"tf": 1}, "odfdo.Column.x": {"tf": 1}, "odfdo.DrawGroup.table_end_x": {"tf": 1}, "odfdo.DrawGroup.pos_x": {"tf": 1}, "odfdo.Frame.pos_x": {"tf": 1}}, "df": 5, "m": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.DrawGroup.xml_id": {"tf": 1}, "odfdo.IndexTitle.xml_id": {"tf": 1}, "odfdo.TOC.xml_id": {"tf": 1}}, "df": 3, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.XmlPart": {"tf": 1}, "odfdo.XmlPart.__init__": {"tf": 1}, "odfdo.XmlPart.part_name": {"tf": 1}, "odfdo.XmlPart.container": {"tf": 1}, "odfdo.XmlPart.root": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1}, "odfdo.XmlPart.get_element": {"tf": 1}, "odfdo.XmlPart.delete_element": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}, "odfdo.XmlPart.clone": {"tf": 1}, "odfdo.XmlPart.serialize": {"tf": 1}}, "df": 11}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.xpath": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 2}}}}}, "y": {"1": {"docs": {"odfdo.ConnectorShape.y1": {"tf": 1}, "odfdo.LineShape.y1": {"tf": 1}}, "df": 2}, "2": {"docs": {"odfdo.ConnectorShape.y2": {"tf": 1}, "odfdo.LineShape.y2": {"tf": 1}}, "df": 2}, "docs": {"odfdo.Cell.y": {"tf": 1}, "odfdo.DrawGroup.table_end_y": {"tf": 1}, "odfdo.DrawGroup.pos_y": {"tf": 1}, "odfdo.Frame.pos_y": {"tf": 1}, "odfdo.Row.y": {"tf": 1}}, "df": 5}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.DrawFillImage.height": {"tf": 1}, "odfdo.Frame.height": {"tf": 1}, "odfdo.Table.height": {"tf": 1}}, "df": 3}}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.get_header": {"tf": 1}, "odfdo.Header": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.Header.level": {"tf": 1}, "odfdo.Header.restart_numbering": {"tf": 1}, "odfdo.Header.start_value": {"tf": 1}, "odfdo.Header.suppress_numbering": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1}, "odfdo.Style.get_header_style": {"tf": 1}, "odfdo.Style.set_header_style": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}}, "df": 13, "s": {"docs": {"odfdo.Element.get_headers": {"tf": 1}}, "df": 1}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.HeaderRows": {"tf": 1}}, "df": 1}}}}}}}}, "x": {"2": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "b": {"docs": {"odfdo.hex2rgb": {"tf": 1}}, "df": 1}}}}, "docs": {}, "df": 0}}}, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.DrawFillImage.width": {"tf": 1}, "odfdo.Frame.width": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.TabStopStyle.leader_width": {"tf": 1}, "odfdo.Table.width": {"tf": 1}}, "df": 5}}}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.DrawImage.url": {"tf": 1}, "odfdo.Link.url": {"tf": 1}}, "df": 2}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}}, "df": 10, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.UserDefined": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.UserDefined.name": {"tf": 1}, "odfdo.UserDefined.style": {"tf": 1}}, "df": 4}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecl.__init__": {"tf": 1}, "odfdo.UserFieldDecl.set_value": {"tf": 1}, "odfdo.UserFieldDecl.name": {"tf": 1}}, "df": 4, "s": {"docs": {"odfdo.UserFieldDecls": {"tf": 1}}, "df": 1}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1}, "odfdo.UserFieldGet.name": {"tf": 1}, "odfdo.UserFieldGet.style": {"tf": 1}}, "df": 4}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.UserFieldInput": {"tf": 1}, "odfdo.UserFieldInput.name": {"tf": 1}, "odfdo.UserFieldInput.style": {"tf": 1}}, "df": 3}}}}}}}}}}}}, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.NamedRange.usage": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}}, "df": 2}}}}, "p": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Reference.update": {"tf": 1}}, "df": 1}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.DrawPage.presentation_page_layout": {"tf": 1}, "odfdo.Style.page_layout": {"tf": 1}}, "df": 2}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Frame.layer": {"tf": 1}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.LAST_CHILD": {"tf": 1}}, "df": 1}}, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}}, "df": 2}}}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.List": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1.4142135623730951}, "odfdo.List.insert_item": {"tf": 1}, "odfdo.List.append_item": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.List.style": {"tf": 1}}, "df": 13, "s": {"docs": {"odfdo.Element.get_lists": {"tf": 1}}, "df": 1}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.ListItem": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}}, "df": 2}}}}}}, "n": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Element.get_link": {"tf": 1}, "odfdo.Link": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.Link.url": {"tf": 1}, "odfdo.Link.name": {"tf": 1}, "odfdo.Link.title": {"tf": 1}, "odfdo.Link.target_frame": {"tf": 1}, "odfdo.Link.show": {"tf": 1}, "odfdo.Link.visited_style": {"tf": 1}, "odfdo.Link.style": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}}, "df": 12, "s": {"docs": {"odfdo.Element.get_links": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}}, "df": 2}}, "e": {"docs": {"odfdo.Element.get_draw_line": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Element.get_draw_lines": {"tf": 1}}, "df": 1, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.LineShape": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}, "odfdo.LineShape.x1": {"tf": 1}, "odfdo.LineShape.y1": {"tf": 1}, "odfdo.LineShape.x2": {"tf": 1}, "odfdo.LineShape.y2": {"tf": 1}}, "df": 6}}}}}, "b": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.LineBreak": {"tf": 1}, "odfdo.LineBreak.__init__": {"tf": 1}}, "df": 2}}}}}}}}, "e": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Header.level": {"tf": 1}, "odfdo.Style.get_level_style": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.TOC.outline_level": {"tf": 1}, "odfdo.TocEntryTemplate.outline_level": {"tf": 1}, "odfdo.VarChapter.outline_level": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 7}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Style.leader_style": {"tf": 1}, "odfdo.Style.leader_text": {"tf": 1}, "odfdo.TabStopStyle.leader_color": {"tf": 1}, "odfdo.TabStopStyle.leader_style": {"tf": 1}, "odfdo.TabStopStyle.leader_text": {"tf": 1}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1}, "odfdo.TabStopStyle.leader_type": {"tf": 1}, "odfdo.TabStopStyle.leader_width": {"tf": 1}}, "df": 8}}}}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.IndexTitle.protection_key": {"tf": 1}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}, "odfdo.TOC.protection_key": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}, "odfdo.Table.protection_key": {"tf": 1}}, "df": 5, "w": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}}, "df": 2}}}}}}}}}}, "fullname": {"root": {"docs": {"odfdo.AnimPar.__init__": {"tf": 1}, "odfdo.AnimSeq.__init__": {"tf": 1}, "odfdo.AnimTransFilter.__init__": {"tf": 1}, "odfdo.Annotation.__init__": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Bookmark.__init__": {"tf": 1}, "odfdo.BookmarkEnd.__init__": {"tf": 1}, "odfdo.BookmarkStart.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.ChangeInfo.__init__": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.Container.__init__": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.__init__": {"tf": 1}, "odfdo.EllipseShape.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1}, "odfdo.IndexTitleTemplate.__init__": {"tf": 1}, "odfdo.LineBreak.__init__": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Meta.__init__": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.Note.__init__": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Section.__init__": {"tf": 1}, "odfdo.Spacer.__init__": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Text.__init__": {"tf": 1}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.UserFieldDecl.__init__": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarDecl.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1}, "odfdo.VarInitialCreator.__init__": {"tf": 1}, "odfdo.VarPageNumber.__init__": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}, "odfdo.XmlPart.__init__": {"tf": 1}}, "df": 66, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "o": {"docs": {"odfdo": {"tf": 1}, "odfdo.AnimPar": {"tf": 1}, "odfdo.AnimPar.__init__": {"tf": 1}, "odfdo.AnimPar.presentation_node_type": {"tf": 1}, "odfdo.AnimPar.smil_begin": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.AnimSeq.__init__": {"tf": 1}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1}, "odfdo.AnimTransFilter": {"tf": 1}, "odfdo.AnimTransFilter.__init__": {"tf": 1}, "odfdo.AnimTransFilter.smil_dur": {"tf": 1}, "odfdo.AnimTransFilter.smil_type": {"tf": 1}, "odfdo.AnimTransFilter.smil_subtype": {"tf": 1}, "odfdo.AnimTransFilter.smil_direction": {"tf": 1}, "odfdo.AnimTransFilter.smil_fadeColor": {"tf": 1}, "odfdo.AnimTransFilter.smil_mode": {"tf": 1}, "odfdo.Annotation": {"tf": 1}, "odfdo.Annotation.__init__": {"tf": 1}, "odfdo.Annotation.note_body": {"tf": 1}, "odfdo.Annotation.start": {"tf": 1}, "odfdo.Annotation.end": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.Annotation.check_validity": {"tf": 1}, "odfdo.Annotation.name": {"tf": 1}, "odfdo.Annotation.note_id": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.AnnotationEnd.end": {"tf": 1}, "odfdo.AnnotationEnd.name": {"tf": 1}, "odfdo.BackgroundImage": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.BackgroundImage.name": {"tf": 1}, "odfdo.BackgroundImage.display_name": {"tf": 1}, "odfdo.BackgroundImage.svg_font_family": {"tf": 1}, "odfdo.BackgroundImage.font_family_generic": {"tf": 1}, "odfdo.BackgroundImage.font_pitch": {"tf": 1}, "odfdo.BackgroundImage.position": {"tf": 1}, "odfdo.BackgroundImage.repeat": {"tf": 1}, "odfdo.BackgroundImage.opacity": {"tf": 1}, "odfdo.BackgroundImage.filter": {"tf": 1}, "odfdo.BackgroundImage.text_style": {"tf": 1}, "odfdo.Bookmark": {"tf": 1}, "odfdo.Bookmark.__init__": {"tf": 1}, "odfdo.Bookmark.name": {"tf": 1}, "odfdo.BookmarkEnd": {"tf": 1}, "odfdo.BookmarkEnd.__init__": {"tf": 1}, "odfdo.BookmarkEnd.name": {"tf": 1}, "odfdo.BookmarkStart": {"tf": 1}, "odfdo.BookmarkStart.__init__": {"tf": 1}, "odfdo.BookmarkStart.name": {"tf": 1}, "odfdo.Cell": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.x": {"tf": 1}, "odfdo.Cell.y": {"tf": 1}, "odfdo.Cell.clone": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.float": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.Cell.is_empty": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.ChangeInfo.__init__": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Column": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Column.x": {"tf": 1}, "odfdo.Column.clone": {"tf": 1}, "odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Column.style": {"tf": 1}, "odfdo.ConnectorShape": {"tf": 1}, "odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.ConnectorShape.start_shape": {"tf": 1}, "odfdo.ConnectorShape.end_shape": {"tf": 1}, "odfdo.ConnectorShape.start_glue_point": {"tf": 1}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1}, "odfdo.ConnectorShape.x1": {"tf": 1}, "odfdo.ConnectorShape.y1": {"tf": 1}, "odfdo.ConnectorShape.x2": {"tf": 1}, "odfdo.ConnectorShape.y2": {"tf": 1}, "odfdo.Container": {"tf": 1}, "odfdo.Container.__init__": {"tf": 1}, "odfdo.Container.path": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Container.get_parts": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1}, "odfdo.Container.mimetype": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Container.del_part": {"tf": 1}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Content": {"tf": 1}, "odfdo.Content.body": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.Document.container": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.path": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Document.mimetype": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.Document.meta": {"tf": 1}, "odfdo.Document.manifest": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.clone": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Document.content": {"tf": 1}, "odfdo.Document.styles": {"tf": 1}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Document.show_styles": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawFillImage.display_name": {"tf": 1}, "odfdo.DrawFillImage.name": {"tf": 1}, "odfdo.DrawFillImage.height": {"tf": 1}, "odfdo.DrawFillImage.width": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawGroup.draw_id": {"tf": 1}, "odfdo.DrawGroup.caption_id": {"tf": 1}, "odfdo.DrawGroup.draw_class_names": {"tf": 1}, "odfdo.DrawGroup.name": {"tf": 1}, "odfdo.DrawGroup.style": {"tf": 1}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1}, "odfdo.DrawGroup.presentation_style": {"tf": 1}, "odfdo.DrawGroup.table_end_cell": {"tf": 1}, "odfdo.DrawGroup.table_end_x": {"tf": 1}, "odfdo.DrawGroup.table_end_y": {"tf": 1}, "odfdo.DrawGroup.table_background": {"tf": 1}, "odfdo.DrawGroup.xml_id": {"tf": 1}, "odfdo.DrawGroup.pos_x": {"tf": 1}, "odfdo.DrawGroup.pos_y": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawImage.url": {"tf": 1}, "odfdo.DrawImage.type": {"tf": 1}, "odfdo.DrawImage.show": {"tf": 1}, "odfdo.DrawImage.actuate": {"tf": 1}, "odfdo.DrawImage.filter_name": {"tf": 1}, "odfdo.DrawPage": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.DrawPage.set_transition": {"tf": 1}, "odfdo.DrawPage.get_shapes": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.DrawPage.name": {"tf": 1}, "odfdo.DrawPage.draw_id": {"tf": 1}, "odfdo.DrawPage.master_page": {"tf": 1}, "odfdo.DrawPage.presentation_page_layout": {"tf": 1}, "odfdo.DrawPage.style": {"tf": 1}, "odfdo.Element": {"tf": 1}, "odfdo.Element.__init__": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Element.make_etree_element": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.get_element": {"tf": 1}, "odfdo.Element.attributes": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.set_attribute": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.del_attribute": {"tf": 1}, "odfdo.Element.text": {"tf": 1}, "odfdo.Element.text_recursive": {"tf": 1}, "odfdo.Element.tail": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.root": {"tf": 1}, "odfdo.Element.parent": {"tf": 1}, "odfdo.Element.is_bound": {"tf": 1}, "odfdo.Element.children": {"tf": 1}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.clear": {"tf": 1}, "odfdo.Element.clone": {"tf": 1}, "odfdo.Element.serialize": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Element.svg_title": {"tf": 1}, "odfdo.Element.svg_description": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_styles": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}, "odfdo.EllipseShape.__init__": {"tf": 1}, "odfdo.FIRST_CHILD": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Frame.set_image": {"tf": 1}, "odfdo.Frame.get_text_box": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Frame.name": {"tf": 1}, "odfdo.Frame.draw_id": {"tf": 1}, "odfdo.Frame.width": {"tf": 1}, "odfdo.Frame.height": {"tf": 1}, "odfdo.Frame.style": {"tf": 1}, "odfdo.Frame.pos_x": {"tf": 1}, "odfdo.Frame.pos_y": {"tf": 1}, "odfdo.Frame.presentation_class": {"tf": 1}, "odfdo.Frame.layer": {"tf": 1}, "odfdo.Frame.presentation_style": {"tf": 1}, "odfdo.Header": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.Header.level": {"tf": 1}, "odfdo.Header.restart_numbering": {"tf": 1}, "odfdo.Header.start_value": {"tf": 1}, "odfdo.Header.suppress_numbering": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1}, "odfdo.IndexTitle.set_title_text": {"tf": 1}, "odfdo.IndexTitle.name": {"tf": 1}, "odfdo.IndexTitle.style": {"tf": 1}, "odfdo.IndexTitle.xml_id": {"tf": 1}, "odfdo.IndexTitle.protected": {"tf": 1}, "odfdo.IndexTitle.protection_key": {"tf": 1}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}, "odfdo.IndexTitleTemplate": {"tf": 1}, "odfdo.IndexTitleTemplate.__init__": {"tf": 1}, "odfdo.IndexTitleTemplate.style": {"tf": 1}, "odfdo.LAST_CHILD": {"tf": 1}, "odfdo.LineBreak": {"tf": 1}, "odfdo.LineBreak.__init__": {"tf": 1}, "odfdo.LineShape": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}, "odfdo.LineShape.x1": {"tf": 1}, "odfdo.LineShape.y1": {"tf": 1}, "odfdo.LineShape.x2": {"tf": 1}, "odfdo.LineShape.y2": {"tf": 1}, "odfdo.Link": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.Link.url": {"tf": 1}, "odfdo.Link.name": {"tf": 1}, "odfdo.Link.title": {"tf": 1}, "odfdo.Link.target_frame": {"tf": 1}, "odfdo.Link.show": {"tf": 1}, "odfdo.Link.visited_style": {"tf": 1}, "odfdo.Link.style": {"tf": 1}, "odfdo.List": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1}, "odfdo.List.insert_item": {"tf": 1}, "odfdo.List.append_item": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.List.style": {"tf": 1}, "odfdo.ListItem": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Manifest": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Manifest.make_file_entry": {"tf": 1}, "odfdo.Manifest.add_full_path": {"tf": 1}, "odfdo.Manifest.del_full_path": {"tf": 1}, "odfdo.Meta": {"tf": 1}, "odfdo.Meta.__init__": {"tf": 1}, "odfdo.Meta.get_meta_body": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}, "odfdo.NEXT_SIBLING": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.usage": {"tf": 1}, "odfdo.NamedRange.table_name": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.name": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Note": {"tf": 1}, "odfdo.Note.__init__": {"tf": 1}, "odfdo.Note.citation": {"tf": 1}, "odfdo.Note.note_body": {"tf": 1}, "odfdo.Note.check_validity": {"tf": 1}, "odfdo.Note.note_class": {"tf": 1}, "odfdo.Note.note_id": {"tf": 1}, "odfdo.PREV_SIBLING": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Paragraph.insert_note": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_variable": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.PageBreak": {"tf": 1}, "odfdo.RectangleShape": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Reference.format_allowed": {"tf": 1}, "odfdo.Reference.ref_format": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}, "odfdo.Reference.name": {"tf": 1}, "odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMark.name": {"tf": 1}, "odfdo.ReferenceMarkEnd": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkEnd.name": {"tf": 1}, "odfdo.ReferenceMarkStart": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.ReferenceMarkStart.name": {"tf": 1}, "odfdo.Row": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.y": {"tf": 1}, "odfdo.Row.clone": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.extend_cells": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.RowGroup": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Section": {"tf": 1}, "odfdo.Section.__init__": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Section.style": {"tf": 1}, "odfdo.Section.name": {"tf": 1}, "odfdo.Spacer": {"tf": 1}, "odfdo.Spacer.__init__": {"tf": 1}, "odfdo.Spacer.number": {"tf": 1}, "odfdo.Span": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Span.style": {"tf": 1}, "odfdo.Span.class_names": {"tf": 1}, "odfdo.Style": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.family": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.get_level_style": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Style.get_header_style": {"tf": 1}, "odfdo.Style.set_header_style": {"tf": 1}, "odfdo.Style.get_footer_style": {"tf": 1}, "odfdo.Style.set_footer_style": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Style.set_font": {"tf": 1}, "odfdo.Style.page_layout": {"tf": 1}, "odfdo.Style.next_style": {"tf": 1}, "odfdo.Style.name": {"tf": 1}, "odfdo.Style.parent_style": {"tf": 1}, "odfdo.Style.display_name": {"tf": 1}, "odfdo.Style.svg_font_family": {"tf": 1}, "odfdo.Style.font_family_generic": {"tf": 1}, "odfdo.Style.font_pitch": {"tf": 1}, "odfdo.Style.text_style": {"tf": 1}, "odfdo.Style.master_page": {"tf": 1}, "odfdo.Style.style_type": {"tf": 1}, "odfdo.Style.leader_style": {"tf": 1}, "odfdo.Style.leader_text": {"tf": 1}, "odfdo.Style.style_position": {"tf": 1}, "odfdo.Styles": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Styles.get_master_pages": {"tf": 1}, "odfdo.Styles.get_master_page": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.TOC.create_toc_source": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.TOC.outline_level": {"tf": 1}, "odfdo.TOC.body": {"tf": 1}, "odfdo.TOC.get_title": {"tf": 1}, "odfdo.TOC.set_toc_title": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.TOC.name": {"tf": 1}, "odfdo.TOC.style": {"tf": 1}, "odfdo.TOC.xml_id": {"tf": 1}, "odfdo.TOC.protected": {"tf": 1}, "odfdo.TOC.protection_key": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.Tab.position": {"tf": 1}, "odfdo.TabStopStyle": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1}, "odfdo.TabStopStyle.style_char": {"tf": 1}, "odfdo.TabStopStyle.leader_color": {"tf": 1}, "odfdo.TabStopStyle.leader_style": {"tf": 1}, "odfdo.TabStopStyle.leader_text": {"tf": 1}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1}, "odfdo.TabStopStyle.leader_type": {"tf": 1}, "odfdo.TabStopStyle.leader_width": {"tf": 1}, "odfdo.TabStopStyle.style_position": {"tf": 1}, "odfdo.TabStopStyle.style_type": {"tf": 1}, "odfdo.Table": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.append": {"tf": 1}, "odfdo.Table.height": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.size": {"tf": 1}, "odfdo.Table.name": {"tf": 1}, "odfdo.Table.protected": {"tf": 1}, "odfdo.Table.protection_key": {"tf": 1}, "odfdo.Table.displayed": {"tf": 1}, "odfdo.Table.printable": {"tf": 1}, "odfdo.Table.print_ranges": {"tf": 1}, "odfdo.Table.style": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.Text": {"tf": 1}, "odfdo.Text.__init__": {"tf": 1}, "odfdo.Text.parent": {"tf": 1}, "odfdo.Text.is_text": {"tf": 1}, "odfdo.Text.is_tail": {"tf": 1}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChange.get_id": {"tf": 1}, "odfdo.TextChange.set_id": {"tf": 1}, "odfdo.TextChange.get_changed_region": {"tf": 1}, "odfdo.TextChange.get_change_info": {"tf": 1}, "odfdo.TextChange.get_change_element": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangeStart.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TocEntryTemplate": {"tf": 1}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.TocEntryTemplate.outline_level": {"tf": 1}, "odfdo.TocEntryTemplate.complete_defaults": {"tf": 1}, "odfdo.TocEntryTemplate.style": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.UserDefined.name": {"tf": 1}, "odfdo.UserDefined.style": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecl.__init__": {"tf": 1}, "odfdo.UserFieldDecl.set_value": {"tf": 1}, "odfdo.UserFieldDecl.name": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1}, "odfdo.UserFieldGet.name": {"tf": 1}, "odfdo.UserFieldGet.style": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.UserFieldInput.name": {"tf": 1}, "odfdo.UserFieldInput.style": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarChapter.display": {"tf": 1}, "odfdo.VarChapter.outline_level": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationDate.fixed": {"tf": 1}, "odfdo.VarCreationDate.data_style": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarCreationTime.fixed": {"tf": 1}, "odfdo.VarCreationTime.data_style": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarDate.date": {"tf": 1}, "odfdo.VarDate.fixed": {"tf": 1}, "odfdo.VarDate.data_style": {"tf": 1}, "odfdo.VarDate.date_adjust": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecl.__init__": {"tf": 1}, "odfdo.VarDecl.name": {"tf": 1}, "odfdo.VarDecl.value_type": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarDescription.fixed": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarFileName.display": {"tf": 1}, "odfdo.VarFileName.fixed": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1}, "odfdo.VarGet.name": {"tf": 1}, "odfdo.VarGet.style": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarInitialCreator.__init__": {"tf": 1}, "odfdo.VarInitialCreator.fixed": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarKeywords.fixed": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarPageNumber": {"tf": 1}, "odfdo.VarPageNumber.__init__": {"tf": 1}, "odfdo.VarPageNumber.select_page": {"tf": 1}, "odfdo.VarPageNumber.page_adjust": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}, "odfdo.VarSet.set_value": {"tf": 1}, "odfdo.VarSet.name": {"tf": 1}, "odfdo.VarSet.style": {"tf": 1}, "odfdo.VarSet.display": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarSubject.fixed": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}, "odfdo.VarTime.time": {"tf": 1}, "odfdo.VarTime.fixed": {"tf": 1}, "odfdo.VarTime.data_style": {"tf": 1}, "odfdo.VarTime.time_adjust": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}, "odfdo.VarTitle.fixed": {"tf": 1}, "odfdo.XmlPart": {"tf": 1}, "odfdo.XmlPart.__init__": {"tf": 1}, "odfdo.XmlPart.part_name": {"tf": 1}, "odfdo.XmlPart.container": {"tf": 1}, "odfdo.XmlPart.root": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1}, "odfdo.XmlPart.get_element": {"tf": 1}, "odfdo.XmlPart.delete_element": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}, "odfdo.XmlPart.clone": {"tf": 1}, "odfdo.XmlPart.serialize": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}, "odfdo.default_boolean_style": {"tf": 1}, "odfdo.default_currency_style": {"tf": 1}, "odfdo.default_date_style": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}, "odfdo.default_number_style": {"tf": 1}, "odfdo.default_percentage_style": {"tf": 1}, "odfdo.default_time_style": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}, "odfdo.hex2rgb": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1}}, "df": 795}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.BackgroundImage.opacity": {"tf": 1}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Container.open": {"tf": 1}}, "df": 1}}}, "f": {"docs": {"odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}}, "df": 1, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_office_names": {"tf": 1}}, "df": 1}}}}}, "r": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_orphan_draw_connectors": {"tf": 1}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TOC.outline_level": {"tf": 1}, "odfdo.TocEntryTemplate.outline_level": {"tf": 1}, "odfdo.VarChapter.outline_level": {"tf": 1}}, "df": 3}}}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimPar": {"tf": 1}, "odfdo.AnimPar.__init__": {"tf": 1}, "odfdo.AnimPar.presentation_node_type": {"tf": 1}, "odfdo.AnimPar.smil_begin": {"tf": 1}}, "df": 4}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "q": {"docs": {"odfdo.AnimSeq": {"tf": 1}, "odfdo.AnimSeq.__init__": {"tf": 1}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1}}, "df": 3}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}, "odfdo.AnimTransFilter.__init__": {"tf": 1}, "odfdo.AnimTransFilter.smil_dur": {"tf": 1}, "odfdo.AnimTransFilter.smil_type": {"tf": 1}, "odfdo.AnimTransFilter.smil_subtype": {"tf": 1}, "odfdo.AnimTransFilter.smil_direction": {"tf": 1}, "odfdo.AnimTransFilter.smil_fadeColor": {"tf": 1}, "odfdo.AnimTransFilter.smil_mode": {"tf": 1}}, "df": 8}}}}}}}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Annotation": {"tf": 1}, "odfdo.Annotation.__init__": {"tf": 1}, "odfdo.Annotation.note_body": {"tf": 1}, "odfdo.Annotation.start": {"tf": 1}, "odfdo.Annotation.end": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.Annotation.check_validity": {"tf": 1}, "odfdo.Annotation.name": {"tf": 1}, "odfdo.Annotation.note_id": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}}, "df": 15, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.AnnotationEnd.end": {"tf": 1}, "odfdo.AnnotationEnd.name": {"tf": 1}}, "df": 5}}}, "s": {"docs": {"odfdo.Element.get_annotations": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}}, "df": 1}}}}}}}, "d": {"docs": {"odfdo.ElementTyped.set_value_and_type": {"tf": 1}}, "df": 1}}, "d": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Manifest.add_full_path": {"tf": 1}}, "df": 3}, "j": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarDate.date_adjust": {"tf": 1}, "odfdo.VarPageNumber.page_adjust": {"tf": 1}, "odfdo.VarTime.time_adjust": {"tf": 1}}, "df": 3}}}}}, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawImage.actuate": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.set_attribute": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.del_attribute": {"tf": 1}}, "df": 6, "s": {"docs": {"odfdo.Element.attributes": {"tf": 1}}, "df": 1}}}}}}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.append": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.List.append_item": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Table.append": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}}, "df": 9}}}}}, "l": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}}, "df": 2}}}}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.AnimPar.__init__": {"tf": 1}, "odfdo.AnimSeq.__init__": {"tf": 1}, "odfdo.AnimTransFilter.__init__": {"tf": 1}, "odfdo.Annotation.__init__": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Bookmark.__init__": {"tf": 1}, "odfdo.BookmarkEnd.__init__": {"tf": 1}, "odfdo.BookmarkStart.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.ChangeInfo.__init__": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.Container.__init__": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.__init__": {"tf": 1}, "odfdo.EllipseShape.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1}, "odfdo.IndexTitleTemplate.__init__": {"tf": 1}, "odfdo.LineBreak.__init__": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Meta.__init__": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.Note.__init__": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Section.__init__": {"tf": 1}, "odfdo.Spacer.__init__": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Text.__init__": {"tf": 1}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.UserFieldDecl.__init__": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarDecl.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1}, "odfdo.VarInitialCreator.__init__": {"tf": 1}, "odfdo.VarPageNumber.__init__": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}, "odfdo.XmlPart.__init__": {"tf": 1}}, "df": 66, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}}, "df": 2}}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.List.insert_item": {"tf": 1}, "odfdo.Paragraph.insert_note": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.insert_variable": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}}, "df": 12, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 4}}}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.get_attribute_integer": {"tf": 1}}, "df": 1}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.Element.index": {"tf": 1}}, "df": 1, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.IndexTitle": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1}, "odfdo.IndexTitle.set_title_text": {"tf": 1}, "odfdo.IndexTitle.name": {"tf": 1}, "odfdo.IndexTitle.style": {"tf": 1}, "odfdo.IndexTitle.xml_id": {"tf": 1}, "odfdo.IndexTitle.protected": {"tf": 1}, "odfdo.IndexTitle.protection_key": {"tf": 1}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}}, "df": 9, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.IndexTitleTemplate": {"tf": 1}, "odfdo.IndexTitleTemplate.__init__": {"tf": 1}, "odfdo.IndexTitleTemplate.style": {"tf": 1}}, "df": 3}}}}}}}}}}}}}}}}, "f": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.TextChange.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 5}}}, "d": {"docs": {"odfdo.Annotation.note_id": {"tf": 1}, "odfdo.DrawGroup.draw_id": {"tf": 1}, "odfdo.DrawGroup.caption_id": {"tf": 1}, "odfdo.DrawGroup.xml_id": {"tf": 1}, "odfdo.DrawPage.draw_id": {"tf": 1}, "odfdo.Frame.draw_id": {"tf": 1}, "odfdo.IndexTitle.xml_id": {"tf": 1}, "odfdo.Note.note_id": {"tf": 1}, "odfdo.TOC.xml_id": {"tf": 1}, "odfdo.TextChange.get_id": {"tf": 1}, "odfdo.TextChange.set_id": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}}, "df": 13, "s": {"docs": {"odfdo.Element.get_changes_ids": {"tf": 1}}, "df": 1}}, "s": {"docs": {"odfdo.Cell.is_empty": {"tf": 1}, "odfdo.Element.is_bound": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Text.is_text": {"tf": 1}, "odfdo.Text.is_tail": {"tf": 1}}, "df": 9}, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_image": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Frame.set_image": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}}, "df": 5, "s": {"docs": {"odfdo.Element.get_images": {"tf": 1}}, "df": 1}}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.List.get_item": {"tf": 1}, "odfdo.List.insert_item": {"tf": 1}, "odfdo.List.append_item": {"tf": 1}}, "df": 3, "s": {"docs": {"odfdo.List.get_items": {"tf": 1}}, "df": 1}}, "r": {"docs": {"odfdo.Table.iter_values": {"tf": 1}}, "df": 1}}}}, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnimPar.presentation_node_type": {"tf": 1}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1}, "odfdo.DrawGroup.presentation_style": {"tf": 1}, "odfdo.DrawPage.presentation_page_layout": {"tf": 1}, "odfdo.Frame.presentation_class": {"tf": 1}, "odfdo.Frame.presentation_style": {"tf": 1}}, "df": 7}}}}}}}}}, "v": {"docs": {"odfdo.PREV_SIBLING": {"tf": 1}}, "df": 1}}, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.IndexTitle.protected": {"tf": 1}, "odfdo.TOC.protected": {"tf": 1}, "odfdo.Table.protected": {"tf": 1}}, "df": 3}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.IndexTitle.protection_key": {"tf": 1}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}, "odfdo.TOC.protection_key": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}, "odfdo.Table.protection_key": {"tf": 1}}, "df": 5}}}}}}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}}, "df": 3}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Table.print_ranges": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.printable": {"tf": 1}}, "df": 1}}}}}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.BackgroundImage.font_pitch": {"tf": 1}, "odfdo.Style.font_pitch": {"tf": 1}}, "df": 2}}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.DrawGroup.pos_x": {"tf": 1}, "odfdo.DrawGroup.pos_y": {"tf": 1}, "odfdo.Frame.pos_x": {"tf": 1}, "odfdo.Frame.pos_y": {"tf": 1}}, "df": 4, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.BackgroundImage.position": {"tf": 1}, "odfdo.Style.style_position": {"tf": 1}, "odfdo.Tab.position": {"tf": 1}, "odfdo.TabStopStyle.style_position": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 5}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.ConnectorShape.start_glue_point": {"tf": 1}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1}}, "df": 2}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Container.path": {"tf": 1}, "odfdo.Document.path": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Manifest.add_full_path": {"tf": 1}, "odfdo.Manifest.del_full_path": {"tf": 1}}, "df": 5, "s": {"docs": {"odfdo.Manifest.get_paths": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Container.get_part": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Container.del_part": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.XmlPart.part_name": {"tf": 1}}, "df": 7, "s": {"docs": {"odfdo.Container.get_parts": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}}, "df": 2}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.parent": {"tf": 1}, "odfdo.Style.parent_style": {"tf": 1}, "odfdo.Text.parent": {"tf": 1}}, "df": 3}}}, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Paragraph.insert_note": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_variable": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}}, "df": 17, "s": {"docs": {"odfdo.Element.get_paragraphs": {"tf": 1}}, "df": 1}}}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.DrawPage.master_page": {"tf": 1}, "odfdo.DrawPage.presentation_page_layout": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Style.page_layout": {"tf": 1}, "odfdo.Style.master_page": {"tf": 1}, "odfdo.Styles.get_master_page": {"tf": 1}, "odfdo.VarPageNumber.select_page": {"tf": 1}, "odfdo.VarPageNumber.page_adjust": {"tf": 1}}, "df": 13, "s": {"docs": {"odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Styles.get_master_pages": {"tf": 1}}, "df": 2}, "b": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.PageBreak": {"tf": 1}}, "df": 1}}}}}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.default_percentage_style": {"tf": 1}}, "df": 1}}}}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimPar.presentation_node_type": {"tf": 1}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1}}, "df": 2}}, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.note_body": {"tf": 1}, "odfdo.Annotation.note_id": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Note": {"tf": 1}, "odfdo.Note.__init__": {"tf": 1}, "odfdo.Note.citation": {"tf": 1}, "odfdo.Note.note_body": {"tf": 1.4142135623730951}, "odfdo.Note.check_validity": {"tf": 1}, "odfdo.Note.note_class": {"tf": 1.4142135623730951}, "odfdo.Note.note_id": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_note": {"tf": 1}}, "df": 11, "s": {"docs": {"odfdo.Element.get_notes": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.name": {"tf": 1}, "odfdo.AnnotationEnd.name": {"tf": 1}, "odfdo.BackgroundImage.name": {"tf": 1}, "odfdo.BackgroundImage.display_name": {"tf": 1}, "odfdo.Bookmark.name": {"tf": 1}, "odfdo.BookmarkEnd.name": {"tf": 1}, "odfdo.BookmarkStart.name": {"tf": 1}, "odfdo.DrawFillImage.display_name": {"tf": 1}, "odfdo.DrawFillImage.name": {"tf": 1}, "odfdo.DrawGroup.name": {"tf": 1}, "odfdo.DrawImage.filter_name": {"tf": 1}, "odfdo.DrawPage.name": {"tf": 1}, "odfdo.Frame.name": {"tf": 1}, "odfdo.IndexTitle.name": {"tf": 1}, "odfdo.Link.name": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.NamedRange.table_name": {"tf": 1}, "odfdo.NamedRange.name": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.Reference.name": {"tf": 1}, "odfdo.ReferenceMark.name": {"tf": 1}, "odfdo.ReferenceMarkEnd.name": {"tf": 1}, "odfdo.ReferenceMarkStart.name": {"tf": 1}, "odfdo.Section.name": {"tf": 1}, "odfdo.Style.name": {"tf": 1}, "odfdo.Style.display_name": {"tf": 1}, "odfdo.TOC.name": {"tf": 1}, "odfdo.Table.name": {"tf": 1}, "odfdo.UserDefined.name": {"tf": 1}, "odfdo.UserFieldDecl.name": {"tf": 1}, "odfdo.UserFieldGet.name": {"tf": 1}, "odfdo.UserFieldInput.name": {"tf": 1}, "odfdo.VarDecl.name": {"tf": 1}, "odfdo.VarGet.name": {"tf": 1}, "odfdo.VarSet.name": {"tf": 1}, "odfdo.XmlPart.part_name": {"tf": 1}}, "df": 36, "s": {"docs": {"odfdo.DrawGroup.draw_class_names": {"tf": 1}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Span.class_names": {"tf": 1}}, "df": 4}, "d": {"docs": {"odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}}, "df": 8, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.NamedRange": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.usage": {"tf": 1}, "odfdo.NamedRange.table_name": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.name": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}}, "df": 12}}}}}}}}}, "e": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.Document.new": {"tf": 1}}, "df": 1}, "x": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.NEXT_SIBLING": {"tf": 1}, "odfdo.Style.next_style": {"tf": 1}}, "df": 2}}}, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Spacer.number": {"tf": 1}, "odfdo.default_number_style": {"tf": 1}}, "df": 2, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Header.restart_numbering": {"tf": 1}, "odfdo.Header.suppress_numbering": {"tf": 1}}, "df": 2}}}}}}}}}, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimPar.presentation_node_type": {"tf": 1}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1}, "odfdo.AnimTransFilter.smil_type": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.DrawImage.type": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Style.style_type": {"tf": 1}, "odfdo.TabStopStyle.leader_type": {"tf": 1}, "odfdo.TabStopStyle.style_type": {"tf": 1}, "odfdo.VarDecl.value_type": {"tf": 1}}, "df": 13}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.text_style": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.text": {"tf": 1}, "odfdo.Element.text_recursive": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Frame.get_text_box": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.IndexTitle.set_title_text": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Style.text_style": {"tf": 1}, "odfdo.Style.leader_text": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.TabStopStyle.leader_text": {"tf": 1}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Text": {"tf": 1}, "odfdo.Text.__init__": {"tf": 1}, "odfdo.Text.parent": {"tf": 1}, "odfdo.Text.is_text": {"tf": 1.4142135623730951}, "odfdo.Text.is_tail": {"tf": 1}}, "df": 37, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextChange": {"tf": 1}, "odfdo.TextChange.get_id": {"tf": 1}, "odfdo.TextChange.set_id": {"tf": 1}, "odfdo.TextChange.get_changed_region": {"tf": 1}, "odfdo.TextChange.get_change_info": {"tf": 1}, "odfdo.TextChange.get_change_element": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}}, "df": 10, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}}, "df": 5}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangeStart.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 4}}}}}, "d": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}}, "df": 6}}}}}}}}}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextDeletion": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}}, "df": 4}}}}}}}}, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextFormatChange": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextInsertion": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 5}}}}}}}}}}}}, "a": {"docs": {}, "df": 0, "b": {"docs": {"odfdo.Tab": {"tf": 1}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.Tab.position": {"tf": 1}}, "df": 3, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup.table_end_cell": {"tf": 1}, "odfdo.DrawGroup.table_end_x": {"tf": 1}, "odfdo.DrawGroup.table_end_y": {"tf": 1}, "odfdo.DrawGroup.table_background": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.NamedRange.table_name": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.Table": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.append": {"tf": 1}, "odfdo.Table.height": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.size": {"tf": 1}, "odfdo.Table.name": {"tf": 1}, "odfdo.Table.protected": {"tf": 1}, "odfdo.Table.protection_key": {"tf": 1}, "odfdo.Table.displayed": {"tf": 1}, "odfdo.Table.printable": {"tf": 1}, "odfdo.Table.print_ranges": {"tf": 1}, "odfdo.Table.style": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 70, "s": {"docs": {"odfdo.Element.get_tables": {"tf": 1}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TabStopStyle": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1}, "odfdo.TabStopStyle.style_char": {"tf": 1}, "odfdo.TabStopStyle.leader_color": {"tf": 1}, "odfdo.TabStopStyle.leader_style": {"tf": 1}, "odfdo.TabStopStyle.leader_text": {"tf": 1}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1}, "odfdo.TabStopStyle.leader_type": {"tf": 1}, "odfdo.TabStopStyle.leader_width": {"tf": 1}, "odfdo.TabStopStyle.style_position": {"tf": 1}, "odfdo.TabStopStyle.style_type": {"tf": 1}}, "df": 11}}}}}}}}}}, "g": {"docs": {"odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}}, "df": 3, "s": {"docs": {"odfdo.Element.strip_tags": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Element.tail": {"tf": 1}, "odfdo.Text.is_tail": {"tf": 1}}, "df": 2}}, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Link.target_frame": {"tf": 1}}, "df": 1}}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.DrawPage.set_transition": {"tf": 1}}, "df": 1}}}}}, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.transpose": {"tf": 1}}, "df": 1}}}}}}, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.get_tracked_changes": {"tf": 1}}, "df": 1, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.TrackedChanges": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}}, "df": 3}}}}}}}}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 3}}}}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.svg_title": {"tf": 1}, "odfdo.IndexTitle.set_title_text": {"tf": 1}, "odfdo.Link.title": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.TOC.get_title": {"tf": 1}, "odfdo.TOC.set_toc_title": {"tf": 1}}, "df": 7}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarTime.time": {"tf": 1}, "odfdo.VarTime.time_adjust": {"tf": 1}, "odfdo.default_time_style": {"tf": 1}}, "df": 3}}}, "o": {"docs": {"odfdo.Table.to_csv": {"tf": 1}}, "df": 1, "c": {"docs": {"odfdo.Element.get_toc": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.TOC.create_toc_source": {"tf": 1.4142135623730951}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.TOC.outline_level": {"tf": 1}, "odfdo.TOC.body": {"tf": 1}, "odfdo.TOC.get_title": {"tf": 1}, "odfdo.TOC.set_toc_title": {"tf": 1.4142135623730951}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.TOC.name": {"tf": 1}, "odfdo.TOC.style": {"tf": 1}, "odfdo.TOC.xml_id": {"tf": 1}, "odfdo.TOC.protected": {"tf": 1}, "odfdo.TOC.protection_key": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 17, "s": {"docs": {"odfdo.Element.get_tocs": {"tf": 1}}, "df": 1}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TocEntryTemplate": {"tf": 1}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.TocEntryTemplate.outline_level": {"tf": 1}, "odfdo.TocEntryTemplate.complete_defaults": {"tf": 1}, "odfdo.TocEntryTemplate.style": {"tf": 1}}, "df": 5}}}}}}}}}}}}}}}}, "s": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.AnimPar.smil_begin": {"tf": 1}, "odfdo.AnimTransFilter.smil_dur": {"tf": 1}, "odfdo.AnimTransFilter.smil_type": {"tf": 1}, "odfdo.AnimTransFilter.smil_subtype": {"tf": 1}, "odfdo.AnimTransFilter.smil_direction": {"tf": 1}, "odfdo.AnimTransFilter.smil_fadeColor": {"tf": 1}, "odfdo.AnimTransFilter.smil_mode": {"tf": 1}}, "df": 7}}}, "u": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimTransFilter.smil_subtype": {"tf": 1}}, "df": 1}}}}, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}}, "df": 2}}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Header.suppress_numbering": {"tf": 1}}, "df": 1}}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation.start": {"tf": 1}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.ConnectorShape.start_shape": {"tf": 1}, "odfdo.ConnectorShape.start_glue_point": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Header.start_value": {"tf": 1}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_start": {"tf": 1}}, "df": 11, "s": {"docs": {"odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}}, "df": 3}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 2}}}}}}}, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage.text_style": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.Column.style": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.DrawGroup.style": {"tf": 1}, "odfdo.DrawGroup.presentation_style": {"tf": 1}, "odfdo.DrawPage.style": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Frame.style": {"tf": 1}, "odfdo.Frame.presentation_style": {"tf": 1}, "odfdo.IndexTitle.style": {"tf": 1}, "odfdo.IndexTitleTemplate.style": {"tf": 1}, "odfdo.Link.visited_style": {"tf": 1}, "odfdo.Link.style": {"tf": 1}, "odfdo.List.style": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Section.style": {"tf": 1}, "odfdo.Span.style": {"tf": 1}, "odfdo.Style": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.family": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.get_level_style": {"tf": 1.4142135623730951}, "odfdo.Style.set_level_style": {"tf": 1.4142135623730951}, "odfdo.Style.get_header_style": {"tf": 1.4142135623730951}, "odfdo.Style.set_header_style": {"tf": 1.4142135623730951}, "odfdo.Style.get_footer_style": {"tf": 1.4142135623730951}, "odfdo.Style.set_footer_style": {"tf": 1.4142135623730951}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Style.set_font": {"tf": 1}, "odfdo.Style.page_layout": {"tf": 1}, "odfdo.Style.next_style": {"tf": 1.4142135623730951}, "odfdo.Style.name": {"tf": 1}, "odfdo.Style.parent_style": {"tf": 1.4142135623730951}, "odfdo.Style.display_name": {"tf": 1}, "odfdo.Style.svg_font_family": {"tf": 1}, "odfdo.Style.font_family_generic": {"tf": 1}, "odfdo.Style.font_pitch": {"tf": 1}, "odfdo.Style.text_style": {"tf": 1.4142135623730951}, "odfdo.Style.master_page": {"tf": 1}, "odfdo.Style.style_type": {"tf": 1.4142135623730951}, "odfdo.Style.leader_style": {"tf": 1.4142135623730951}, "odfdo.Style.leader_text": {"tf": 1}, "odfdo.Style.style_position": {"tf": 1.4142135623730951}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC.style": {"tf": 1}, "odfdo.TabStopStyle.style_char": {"tf": 1}, "odfdo.TabStopStyle.leader_style": {"tf": 1}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1}, "odfdo.TabStopStyle.style_position": {"tf": 1}, "odfdo.TabStopStyle.style_type": {"tf": 1}, "odfdo.Table.style": {"tf": 1}, "odfdo.TocEntryTemplate.style": {"tf": 1}, "odfdo.UserDefined.style": {"tf": 1}, "odfdo.UserFieldGet.style": {"tf": 1}, "odfdo.UserFieldInput.style": {"tf": 1}, "odfdo.VarCreationDate.data_style": {"tf": 1}, "odfdo.VarCreationTime.data_style": {"tf": 1}, "odfdo.VarDate.data_style": {"tf": 1}, "odfdo.VarGet.style": {"tf": 1}, "odfdo.VarSet.style": {"tf": 1}, "odfdo.VarTime.data_style": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}, "odfdo.default_boolean_style": {"tf": 1}, "odfdo.default_currency_style": {"tf": 1}, "odfdo.default_date_style": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}, "odfdo.default_number_style": {"tf": 1}, "odfdo.default_percentage_style": {"tf": 1}, "odfdo.default_time_style": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 83, "s": {"docs": {"odfdo.Content.get_styles": {"tf": 1}, "odfdo.Document.styles": {"tf": 1}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.show_styles": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Element.get_styles": {"tf": 1}, "odfdo.Styles": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1.4142135623730951}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Styles.get_master_pages": {"tf": 1}, "odfdo.Styles.get_master_page": {"tf": 1}}, "df": 12}, "d": {"docs": {"odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}}, "df": 2}}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Cell.string": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 3}}, "p": {"docs": {"odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}}, "df": 2}}}}, "v": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.BackgroundImage.svg_font_family": {"tf": 1}, "odfdo.Element.svg_title": {"tf": 1}, "odfdo.Element.svg_description": {"tf": 1}, "odfdo.Style.svg_font_family": {"tf": 1}}, "df": 4}}, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Cell.set_value": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.DrawPage.set_transition": {"tf": 1}, "odfdo.Element.set_attribute": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.Frame.set_image": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}, "odfdo.IndexTitle.set_title_text": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Style.set_header_style": {"tf": 1}, "odfdo.Style.set_footer_style": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Style.set_font": {"tf": 1}, "odfdo.TOC.set_toc_title": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.TextChange.set_id": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.UserFieldDecl.set_value": {"tf": 1}, "odfdo.VarSet.set_value": {"tf": 1}}, "df": 77, "s": {"docs": {"odfdo.Element.get_variable_sets": {"tf": 1}}, "df": 1}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.elements_repeated_sequence": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.search": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.serialize": {"tf": 1}, "odfdo.XmlPart.serialize": {"tf": 1}}, "df": 2}}}}}}}, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_section": {"tf": 1}, "odfdo.Section": {"tf": 1}, "odfdo.Section.__init__": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Section.style": {"tf": 1}, "odfdo.Section.name": {"tf": 1}}, "df": 6, "s": {"docs": {"odfdo.Element.get_sections": {"tf": 1}}, "df": 1}}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarPageNumber.select_page": {"tf": 1}}, "df": 1}}}}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ConnectorShape.start_shape": {"tf": 1}, "odfdo.ConnectorShape.end_shape": {"tf": 1}}, "df": 2, "s": {"docs": {"odfdo.DrawPage.get_shapes": {"tf": 1}}, "df": 1}}}}, "o": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.Document.show_styles": {"tf": 1}, "odfdo.DrawImage.show": {"tf": 1}, "odfdo.Link.show": {"tf": 1}}, "df": 3}}}, "a": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Container.save": {"tf": 1}, "odfdo.Document.save": {"tf": 1}}, "df": 2}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_span": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Span": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Span.style": {"tf": 1}, "odfdo.Span.class_names": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}}, "df": 9, "s": {"docs": {"odfdo.Element.get_spans": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}}, "df": 2}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Spacer": {"tf": 1}, "odfdo.Spacer.__init__": {"tf": 1}, "odfdo.Spacer.number": {"tf": 1}}, "df": 3}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}}, "df": 2}}}}, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.NEXT_SIBLING": {"tf": 1}, "odfdo.PREV_SIBLING": {"tf": 1}}, "df": 2}}}}}, "z": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.size": {"tf": 1}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TOC.create_toc_source": {"tf": 1}}, "df": 1}}}}}}, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnimPar.smil_begin": {"tf": 1}}, "df": 1}}}, "t": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_between": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Annotation.note_body": {"tf": 1}, "odfdo.Content.body": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1}, "odfdo.Meta.get_meta_body": {"tf": 1}, "odfdo.Note.note_body": {"tf": 1}, "odfdo.TOC.body": {"tf": 1}}, "df": 7}}, "o": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Bookmark": {"tf": 1}, "odfdo.Bookmark.__init__": {"tf": 1}, "odfdo.Bookmark.name": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}}, "df": 9, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.BookmarkEnd": {"tf": 1}, "odfdo.BookmarkEnd.__init__": {"tf": 1}, "odfdo.BookmarkEnd.name": {"tf": 1}}, "df": 3}}}, "s": {"docs": {"odfdo.Element.get_bookmarks": {"tf": 1}}, "df": 1, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BookmarkStart": {"tf": 1}, "odfdo.BookmarkStart.__init__": {"tf": 1}, "odfdo.BookmarkStart.name": {"tf": 1}}, "df": 3}}}}}}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.default_boolean_style": {"tf": 1}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.is_bound": {"tf": 1}}, "df": 1}}}, "x": {"docs": {"odfdo.Frame.get_text_box": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}}, "df": 2}, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.DrawGroup.table_background": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}}, "df": 2, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.BackgroundImage.name": {"tf": 1}, "odfdo.BackgroundImage.display_name": {"tf": 1}, "odfdo.BackgroundImage.svg_font_family": {"tf": 1}, "odfdo.BackgroundImage.font_family_generic": {"tf": 1}, "odfdo.BackgroundImage.font_pitch": {"tf": 1}, "odfdo.BackgroundImage.position": {"tf": 1}, "odfdo.BackgroundImage.repeat": {"tf": 1}, "odfdo.BackgroundImage.opacity": {"tf": 1}, "odfdo.BackgroundImage.filter": {"tf": 1}, "odfdo.BackgroundImage.text_style": {"tf": 1}}, "df": 12}}}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1}}, "df": 1}}}}}, "d": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimTransFilter.smil_dur": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}}, "df": 2}}}}}}}, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnimTransFilter.smil_direction": {"tf": 1}}, "df": 1}}}}}}}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.BackgroundImage.display_name": {"tf": 1}, "odfdo.DrawFillImage.display_name": {"tf": 1}, "odfdo.Style.display_name": {"tf": 1}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarChapter.display": {"tf": 1}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarFileName.display": {"tf": 1}, "odfdo.VarSet.display": {"tf": 1}}, "df": 8, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Table.displayed": {"tf": 1}}, "df": 1}}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}}, "df": 2}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Container.del_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Element.del_attribute": {"tf": 1}, "odfdo.Manifest.del_full_path": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}}, "df": 6, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.XmlPart.delete_element": {"tf": 1}}, "df": 12, "d": {"docs": {"odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}}, "df": 5}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_text_change_deletion": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Element.get_text_change_deletions": {"tf": 1}}, "df": 1}}}}}}}, "f": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.default_boolean_style": {"tf": 1}, "odfdo.default_currency_style": {"tf": 1}, "odfdo.default_date_style": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}, "odfdo.default_number_style": {"tf": 1}, "odfdo.default_percentage_style": {"tf": 1}, "odfdo.default_time_style": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 11, "s": {"docs": {"odfdo.TocEntryTemplate.complete_defaults": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}}, "df": 6}}}}}, "s": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.svg_description": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}}, "df": 3}}}}}}}}}, "c": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}}, "df": 4, "s": {"docs": {"odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}}, "df": 2}}}}, "c": {"docs": {"odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}}, "df": 4}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.VarDate.date": {"tf": 1}, "odfdo.VarDate.date_adjust": {"tf": 1}, "odfdo.default_date_style": {"tf": 1}}, "df": 9}, "a": {"docs": {"odfdo.VarCreationDate.data_style": {"tf": 1}, "odfdo.VarCreationTime.data_style": {"tf": 1}, "odfdo.VarDate.data_style": {"tf": 1}, "odfdo.VarTime.data_style": {"tf": 1}}, "df": 4}}}, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.Document.container": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.path": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Document.mimetype": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.Document.meta": {"tf": 1}, "odfdo.Document.manifest": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.clone": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Document.content": {"tf": 1}, "odfdo.Document.styles": {"tf": 1}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Document.show_styles": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1}}, "df": 30}}}}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.DrawGroup.draw_id": {"tf": 1}, "odfdo.DrawGroup.draw_class_names": {"tf": 1}, "odfdo.DrawPage.draw_id": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Frame.draw_id": {"tf": 1}}, "df": 17, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawFillImage.display_name": {"tf": 1}, "odfdo.DrawFillImage.name": {"tf": 1}, "odfdo.DrawFillImage.height": {"tf": 1}, "odfdo.DrawFillImage.width": {"tf": 1}}, "df": 6}}}}}}}}}, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawGroup.draw_id": {"tf": 1}, "odfdo.DrawGroup.caption_id": {"tf": 1}, "odfdo.DrawGroup.draw_class_names": {"tf": 1}, "odfdo.DrawGroup.name": {"tf": 1}, "odfdo.DrawGroup.style": {"tf": 1}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1}, "odfdo.DrawGroup.presentation_style": {"tf": 1}, "odfdo.DrawGroup.table_end_cell": {"tf": 1}, "odfdo.DrawGroup.table_end_x": {"tf": 1}, "odfdo.DrawGroup.table_end_y": {"tf": 1}, "odfdo.DrawGroup.table_background": {"tf": 1}, "odfdo.DrawGroup.xml_id": {"tf": 1}, "odfdo.DrawGroup.pos_x": {"tf": 1}, "odfdo.DrawGroup.pos_y": {"tf": 1}}, "df": 16}}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawImage": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawImage.url": {"tf": 1}, "odfdo.DrawImage.type": {"tf": 1}, "odfdo.DrawImage.show": {"tf": 1}, "odfdo.DrawImage.actuate": {"tf": 1}, "odfdo.DrawImage.filter_name": {"tf": 1}}, "df": 7}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawPage": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.DrawPage.set_transition": {"tf": 1}, "odfdo.DrawPage.get_shapes": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.DrawPage.name": {"tf": 1}, "odfdo.DrawPage.draw_id": {"tf": 1}, "odfdo.DrawPage.master_page": {"tf": 1}, "odfdo.DrawPage.presentation_page_layout": {"tf": 1}, "odfdo.DrawPage.style": {"tf": 1}}, "df": 10}}}}}}}}, "f": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimTransFilter.smil_fadeColor": {"tf": 1}}, "df": 1}}}}}}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.BackgroundImage.svg_font_family": {"tf": 1}, "odfdo.BackgroundImage.font_family_generic": {"tf": 1}, "odfdo.Style.family": {"tf": 1}, "odfdo.Style.svg_font_family": {"tf": 1}, "odfdo.Style.font_family_generic": {"tf": 1}}, "df": 5}}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.svg_font_family": {"tf": 1}, "odfdo.BackgroundImage.font_family_generic": {"tf": 1}, "odfdo.BackgroundImage.font_pitch": {"tf": 1}, "odfdo.Style.set_font": {"tf": 1}, "odfdo.Style.svg_font_family": {"tf": 1}, "odfdo.Style.font_family_generic": {"tf": 1}, "odfdo.Style.font_pitch": {"tf": 1}}, "df": 7}}, "r": {"docs": {"odfdo.Element.from_tag_for_clone": {"tf": 1}}, "df": 1, "m": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Cell.formula": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1}, "odfdo.Reference.ref_format": {"tf": 1}}, "df": 2, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}}, "df": 9}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.get_formated_meta": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Style.get_footer_style": {"tf": 1}, "odfdo.Style.set_footer_style": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}}, "df": 4}}}}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.BackgroundImage.filter": {"tf": 1}, "odfdo.DrawImage.filter_name": {"tf": 1}}, "df": 2}}}, "e": {"docs": {"odfdo.Document.add_file": {"tf": 1}, "odfdo.Manifest.make_file_entry": {"tf": 1}}, "df": 2}, "l": {"docs": {"odfdo.TOC.fill": {"tf": 1}}, "df": 1}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}}, "df": 4}}}, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.FIRST_CHILD": {"tf": 1}}, "df": 1}}}, "x": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.VarCreationDate.fixed": {"tf": 1}, "odfdo.VarCreationTime.fixed": {"tf": 1}, "odfdo.VarDate.fixed": {"tf": 1}, "odfdo.VarDescription.fixed": {"tf": 1}, "odfdo.VarFileName.fixed": {"tf": 1}, "odfdo.VarInitialCreator.fixed": {"tf": 1}, "odfdo.VarKeywords.fixed": {"tf": 1}, "odfdo.VarSubject.fixed": {"tf": 1}, "odfdo.VarTime.fixed": {"tf": 1}, "odfdo.VarTitle.fixed": {"tf": 1}}, "df": 10}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Cell.float": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}}, "df": 3}}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_frame": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Frame.set_image": {"tf": 1}, "odfdo.Frame.get_text_box": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Frame.name": {"tf": 1}, "odfdo.Frame.draw_id": {"tf": 1}, "odfdo.Frame.width": {"tf": 1}, "odfdo.Frame.height": {"tf": 1}, "odfdo.Frame.style": {"tf": 1}, "odfdo.Frame.pos_x": {"tf": 1}, "odfdo.Frame.pos_y": {"tf": 1}, "odfdo.Frame.presentation_class": {"tf": 1}, "odfdo.Frame.layer": {"tf": 1}, "odfdo.Frame.presentation_style": {"tf": 1}, "odfdo.Link.target_frame": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 23, "s": {"docs": {"odfdo.Element.get_frames": {"tf": 1}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Manifest.add_full_path": {"tf": 1}, "odfdo.Manifest.del_full_path": {"tf": 1}}, "df": 2}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimTransFilter.smil_mode": {"tf": 1}}, "df": 1}, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}}, "df": 2}}}}}}}}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Container.mimetype": {"tf": 1}, "odfdo.Document.mimetype": {"tf": 1}}, "df": 2}}}}}}}, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Document.meta": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Meta": {"tf": 1}, "odfdo.Meta.__init__": {"tf": 1}, "odfdo.Meta.get_meta_body": {"tf": 1.4142135623730951}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}}, "df": 37, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}}, "df": 3}}}}}}, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.merge_styles_from": {"tf": 1}}, "df": 1}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}}, "df": 2, "s": {"docs": {"odfdo.Manifest.get_path_medias": {"tf": 1}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.manifest": {"tf": 1}, "odfdo.Manifest": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Manifest.make_file_entry": {"tf": 1}, "odfdo.Manifest.add_full_path": {"tf": 1}, "odfdo.Manifest.del_full_path": {"tf": 1}}, "df": 9}}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.DrawPage.master_page": {"tf": 1}, "odfdo.Style.master_page": {"tf": 1}, "odfdo.Styles.get_master_pages": {"tf": 1}, "odfdo.Styles.get_master_page": {"tf": 1}}, "df": 4}}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.make_etree_element": {"tf": 1}, "odfdo.Manifest.make_file_entry": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 3}}, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.match": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}}, "df": 8, "s": {"docs": {"odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}}, "df": 2}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Annotation.end": {"tf": 1}, "odfdo.AnnotationEnd.end": {"tf": 1}, "odfdo.ConnectorShape.end_shape": {"tf": 1}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1}, "odfdo.DrawGroup.table_end_cell": {"tf": 1}, "odfdo.DrawGroup.table_end_x": {"tf": 1}, "odfdo.DrawGroup.table_end_y": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}}, "df": 16, "s": {"docs": {"odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}}, "df": 4}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Manifest.make_file_entry": {"tf": 1}}, "df": 1}}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Cell.is_empty": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 6}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element": {"tf": 1}, "odfdo.Element.__init__": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Element.make_etree_element": {"tf": 1.4142135623730951}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.get_element": {"tf": 1.4142135623730951}, "odfdo.Element.attributes": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.set_attribute": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.del_attribute": {"tf": 1}, "odfdo.Element.text": {"tf": 1}, "odfdo.Element.text_recursive": {"tf": 1}, "odfdo.Element.tail": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.root": {"tf": 1}, "odfdo.Element.parent": {"tf": 1}, "odfdo.Element.is_bound": {"tf": 1}, "odfdo.Element.children": {"tf": 1}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1.4142135623730951}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.clear": {"tf": 1}, "odfdo.Element.clone": {"tf": 1}, "odfdo.Element.serialize": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Element.svg_title": {"tf": 1}, "odfdo.Element.svg_description": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_styles": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.TextChange.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.XmlPart.get_element": {"tf": 1}, "odfdo.XmlPart.delete_element": {"tf": 1}}, "df": 136, "s": {"docs": {"odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1}}, "df": 6}, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ElementTyped": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}}, "df": 3}}}}}}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_draw_ellipse": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Element.get_draw_ellipses": {"tf": 1}}, "df": 1, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.EllipseShape": {"tf": 1}, "odfdo.EllipseShape.__init__": {"tf": 1}}, "df": 2}}}}}}}}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.make_etree_element": {"tf": 1}}, "df": 1}}}}, "x": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.extend": {"tf": 1}, "odfdo.Row.extend_cells": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1}}, "df": 3}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}}, "df": 4}}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Container.get_parts": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.DrawPage.get_shapes": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.get_element": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_styles": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Frame.get_text_box": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Meta.get_meta_body": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.get_level_style": {"tf": 1}, "odfdo.Style.get_header_style": {"tf": 1}, "odfdo.Style.get_footer_style": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Styles.get_master_pages": {"tf": 1}, "odfdo.Styles.get_master_page": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.TOC.get_title": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.TextChange.get_id": {"tf": 1}, "odfdo.TextChange.get_changed_region": {"tf": 1}, "odfdo.TextChange.get_change_info": {"tf": 1}, "odfdo.TextChange.get_change_element": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1}, "odfdo.XmlPart.get_element": {"tf": 1}}, "df": 195}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.BackgroundImage.font_family_generic": {"tf": 1}, "odfdo.Style.font_family_generic": {"tf": 1}}, "df": 2}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}}, "df": 3}}}}}}}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ConnectorShape.start_glue_point": {"tf": 1}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1}}, "df": 2}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Element.get_draw_group": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Element.get_draw_groups": {"tf": 1}}, "df": 1}}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Annotation.check_validity": {"tf": 1}, "odfdo.Note.check_validity": {"tf": 1}}, "df": 2}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.TextChange.get_change_info": {"tf": 1}, "odfdo.TextChange.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 14, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.ChangeInfo.__init__": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}}, "df": 6}}}}, "s": {"docs": {"odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}}, "df": 3}, "d": {"docs": {"odfdo.TextChange.get_changed_region": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}}, "df": 3}}}}, "r": {"docs": {"odfdo.TabStopStyle.style_char": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.FIRST_CHILD": {"tf": 1}, "odfdo.LAST_CHILD": {"tf": 1}}, "df": 2, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.children": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1}}, "df": 2}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Cell": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.x": {"tf": 1}, "odfdo.Cell.y": {"tf": 1}, "odfdo.Cell.clone": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.float": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.Cell.is_empty": {"tf": 1}, "odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.DrawGroup.table_end_cell": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 31, "s": {"docs": {"odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.extend_cells": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}}, "df": 8}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.clone": {"tf": 1}, "odfdo.Column.clone": {"tf": 1}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Document.clone": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Element.clone": {"tf": 1}, "odfdo.Row.clone": {"tf": 1}, "odfdo.XmlPart.clone": {"tf": 1}}, "df": 8}}}, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.DrawGroup.draw_class_names": {"tf": 1}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1}, "odfdo.Frame.presentation_class": {"tf": 1}, "odfdo.Note.note_class": {"tf": 1}, "odfdo.Span.class_names": {"tf": 1}}, "df": 5}}}, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.clear": {"tf": 1}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Cell.currency": {"tf": 1}, "odfdo.default_currency_style": {"tf": 1}}, "df": 2}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}}, "df": 6}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}}, "df": 2}}}, "e": {"docs": {"odfdo.TOC.create_toc_source": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 2}}}}}, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}}, "df": 4}}}}}, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TocEntryTemplate.complete_defaults": {"tf": 1}}, "df": 1}}}}}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Column": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Column.x": {"tf": 1}, "odfdo.Column.clone": {"tf": 1}, "odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Column.style": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 18, "s": {"docs": {"odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}}, "df": 2}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.TabStopStyle.leader_color": {"tf": 1}}, "df": 1}}}, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.get_draw_connector": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}}, "df": 2, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ConnectorShape": {"tf": 1}, "odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.ConnectorShape.start_shape": {"tf": 1}, "odfdo.ConnectorShape.end_shape": {"tf": 1}, "odfdo.ConnectorShape.start_glue_point": {"tf": 1}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1}, "odfdo.ConnectorShape.x1": {"tf": 1}, "odfdo.ConnectorShape.y1": {"tf": 1}, "odfdo.ConnectorShape.x2": {"tf": 1}, "odfdo.ConnectorShape.y2": {"tf": 1}}, "df": 10}}}}}}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Container": {"tf": 1}, "odfdo.Container.__init__": {"tf": 1}, "odfdo.Container.path": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Container.get_parts": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1}, "odfdo.Container.mimetype": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Container.del_part": {"tf": 1}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Document.container": {"tf": 1}, "odfdo.XmlPart.container": {"tf": 1}}, "df": 13}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Content": {"tf": 1}, "odfdo.Content.body": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.content": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}}, "df": 7}}}}}}, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.DrawGroup.caption_id": {"tf": 1}}, "df": 1}}}}}}, "y": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}}, "df": 2}}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Note.citation": {"tf": 1}}, "df": 1}}}}}}}, "s": {"docs": {}, "df": 0, "v": {"docs": {"odfdo.Table.to_csv": {"tf": 1}}, "df": 1}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Annotation.check_validity": {"tf": 1}, "odfdo.Note.check_validity": {"tf": 1}}, "df": 2}}}}}, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Header.start_value": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.UserFieldDecl.set_value": {"tf": 1}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarDecl.value_type": {"tf": 1}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarSet.set_value": {"tf": 1}}, "df": 19, "s": {"docs": {"odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}}, "df": 11}}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Paragraph.insert_variable": {"tf": 1}}, "df": 7}}}}, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarInitialCreator.__init__": {"tf": 1}, "odfdo.VarInitialCreator.fixed": {"tf": 1}}, "df": 3}}}}}}}}}}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.VarChapter": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarChapter.display": {"tf": 1}, "odfdo.VarChapter.outline_level": {"tf": 1}}, "df": 5}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationDate.fixed": {"tf": 1}, "odfdo.VarCreationDate.data_style": {"tf": 1}}, "df": 4}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarCreationTime.fixed": {"tf": 1}, "odfdo.VarCreationTime.data_style": {"tf": 1}}, "df": 4}}}}}}}}}}}}, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarDate": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarDate.date": {"tf": 1}, "odfdo.VarDate.fixed": {"tf": 1}, "odfdo.VarDate.data_style": {"tf": 1}, "odfdo.VarDate.date_adjust": {"tf": 1}}, "df": 6}}}, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecl.__init__": {"tf": 1}, "odfdo.VarDecl.name": {"tf": 1}, "odfdo.VarDecl.value_type": {"tf": 1}}, "df": 4, "s": {"docs": {"odfdo.VarDecls": {"tf": 1}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.VarDescription": {"tf": 1}, "odfdo.VarDescription.fixed": {"tf": 1}}, "df": 2}}}}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarFileName": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1}, "odfdo.VarFileName.display": {"tf": 1}, "odfdo.VarFileName.fixed": {"tf": 1}}, "df": 5}}}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarGet": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1}, "odfdo.VarGet.name": {"tf": 1}, "odfdo.VarGet.style": {"tf": 1}}, "df": 4}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.VarKeywords": {"tf": 1}, "odfdo.VarKeywords.fixed": {"tf": 1}}, "df": 2}}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarPageCount": {"tf": 1}}, "df": 1}}}}}, "n": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.VarPageNumber": {"tf": 1}, "odfdo.VarPageNumber.__init__": {"tf": 1}, "odfdo.VarPageNumber.select_page": {"tf": 1}, "odfdo.VarPageNumber.page_adjust": {"tf": 1}}, "df": 4}}}}}}}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarSet": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}, "odfdo.VarSet.set_value": {"tf": 1}, "odfdo.VarSet.name": {"tf": 1}, "odfdo.VarSet.style": {"tf": 1}, "odfdo.VarSet.display": {"tf": 1}}, "df": 6}}, "u": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarSubject": {"tf": 1}, "odfdo.VarSubject.fixed": {"tf": 1}}, "df": 2}}}}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarTime": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}, "odfdo.VarTime.time": {"tf": 1}, "odfdo.VarTime.fixed": {"tf": 1}, "odfdo.VarTime.data_style": {"tf": 1}, "odfdo.VarTime.time_adjust": {"tf": 1}}, "df": 6}}, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarTitle": {"tf": 1}, "odfdo.VarTitle.fixed": {"tf": 1}}, "df": 2}}}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Link.visited_style": {"tf": 1}}, "df": 1}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.repeat": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell.repeated": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}}, "df": 4}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.replace": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}}, "df": 2}}}}}, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.text_recursive": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_draw_rectangle": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Element.get_draw_rectangles": {"tf": 1}}, "df": 1, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.RectangleShape": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}}, "df": 2}}}}}}}}}}}}, "f": {"docs": {"odfdo.Reference.ref_format": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Reference.format_allowed": {"tf": 1}, "odfdo.Reference.ref_format": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}, "odfdo.Reference.name": {"tf": 1}}, "df": 17, "s": {"docs": {"odfdo.Element.get_references": {"tf": 1}}, "df": 1}, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMark.name": {"tf": 1}}, "df": 3, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ReferenceMarkEnd": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkEnd.name": {"tf": 1}}, "df": 4}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.ReferenceMarkStart": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.ReferenceMarkStart.name": {"tf": 1}}, "df": 6}}}}}}}}}, "d": {"docs": {"odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}}, "df": 3}}}}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Header.restart_numbering": {"tf": 1}}, "df": 1}}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}}, "df": 4}}}}, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextChange.get_changed_region": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}}, "df": 2, "s": {"docs": {"odfdo.TrackedChanges.get_changed_regions": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.root": {"tf": 1}, "odfdo.XmlPart.root": {"tf": 1}}, "df": 2}}, "w": {"docs": {"odfdo.Row": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.y": {"tf": 1}, "odfdo.Row.clone": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.extend_cells": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}}, "df": 32, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.RowGroup": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}}, "df": 2}}}}}, "s": {"docs": {"odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1}}, "df": 2}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}}, "df": 7, "s": {"docs": {"odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Table.print_ranges": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}}, "df": 3}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Row.rstrip": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}}, "df": 2}}}}}, "g": {"docs": {}, "df": 0, "b": {"2": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.rgb2hex": {"tf": 1}}, "df": 1}}}}, "docs": {}, "df": 0}}}, "x": {"1": {"docs": {"odfdo.ConnectorShape.x1": {"tf": 1}, "odfdo.LineShape.x1": {"tf": 1}}, "df": 2}, "2": {"docs": {"odfdo.ConnectorShape.x2": {"tf": 1}, "odfdo.LineShape.x2": {"tf": 1}}, "df": 2}, "docs": {"odfdo.Cell.x": {"tf": 1}, "odfdo.Column.x": {"tf": 1}, "odfdo.DrawGroup.table_end_x": {"tf": 1}, "odfdo.DrawGroup.pos_x": {"tf": 1}, "odfdo.Frame.pos_x": {"tf": 1}}, "df": 5, "m": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.DrawGroup.xml_id": {"tf": 1}, "odfdo.IndexTitle.xml_id": {"tf": 1}, "odfdo.TOC.xml_id": {"tf": 1}}, "df": 3, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.XmlPart": {"tf": 1}, "odfdo.XmlPart.__init__": {"tf": 1}, "odfdo.XmlPart.part_name": {"tf": 1}, "odfdo.XmlPart.container": {"tf": 1}, "odfdo.XmlPart.root": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1}, "odfdo.XmlPart.get_element": {"tf": 1}, "odfdo.XmlPart.delete_element": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}, "odfdo.XmlPart.clone": {"tf": 1}, "odfdo.XmlPart.serialize": {"tf": 1}}, "df": 11}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.xpath": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 2}}}}}, "y": {"1": {"docs": {"odfdo.ConnectorShape.y1": {"tf": 1}, "odfdo.LineShape.y1": {"tf": 1}}, "df": 2}, "2": {"docs": {"odfdo.ConnectorShape.y2": {"tf": 1}, "odfdo.LineShape.y2": {"tf": 1}}, "df": 2}, "docs": {"odfdo.Cell.y": {"tf": 1}, "odfdo.DrawGroup.table_end_y": {"tf": 1}, "odfdo.DrawGroup.pos_y": {"tf": 1}, "odfdo.Frame.pos_y": {"tf": 1}, "odfdo.Row.y": {"tf": 1}}, "df": 5}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.DrawFillImage.height": {"tf": 1}, "odfdo.Frame.height": {"tf": 1}, "odfdo.Table.height": {"tf": 1}}, "df": 3}}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.get_header": {"tf": 1}, "odfdo.Header": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.Header.level": {"tf": 1}, "odfdo.Header.restart_numbering": {"tf": 1}, "odfdo.Header.start_value": {"tf": 1}, "odfdo.Header.suppress_numbering": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1}, "odfdo.Style.get_header_style": {"tf": 1}, "odfdo.Style.set_header_style": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}}, "df": 13, "s": {"docs": {"odfdo.Element.get_headers": {"tf": 1}}, "df": 1}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.HeaderRows": {"tf": 1}}, "df": 1}}}}}}}}, "x": {"2": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "b": {"docs": {"odfdo.hex2rgb": {"tf": 1}}, "df": 1}}}}, "docs": {}, "df": 0}}}, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.DrawFillImage.width": {"tf": 1}, "odfdo.Frame.width": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.TabStopStyle.leader_width": {"tf": 1}, "odfdo.Table.width": {"tf": 1}}, "df": 5}}}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.DrawImage.url": {"tf": 1}, "odfdo.Link.url": {"tf": 1}}, "df": 2}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}}, "df": 10, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.UserDefined": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.UserDefined.name": {"tf": 1}, "odfdo.UserDefined.style": {"tf": 1}}, "df": 4}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecl.__init__": {"tf": 1}, "odfdo.UserFieldDecl.set_value": {"tf": 1}, "odfdo.UserFieldDecl.name": {"tf": 1}}, "df": 4, "s": {"docs": {"odfdo.UserFieldDecls": {"tf": 1}}, "df": 1}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1}, "odfdo.UserFieldGet.name": {"tf": 1}, "odfdo.UserFieldGet.style": {"tf": 1}}, "df": 4}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.UserFieldInput": {"tf": 1}, "odfdo.UserFieldInput.name": {"tf": 1}, "odfdo.UserFieldInput.style": {"tf": 1}}, "df": 3}}}}}}}}}}}}, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.NamedRange.usage": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}}, "df": 2}}}}, "p": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Reference.update": {"tf": 1}}, "df": 1}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.DrawPage.presentation_page_layout": {"tf": 1}, "odfdo.Style.page_layout": {"tf": 1}}, "df": 2}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Frame.layer": {"tf": 1}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.LAST_CHILD": {"tf": 1}}, "df": 1}}, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}}, "df": 2}}}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.List": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1.4142135623730951}, "odfdo.List.insert_item": {"tf": 1}, "odfdo.List.append_item": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.List.style": {"tf": 1}}, "df": 13, "s": {"docs": {"odfdo.Element.get_lists": {"tf": 1}}, "df": 1}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.ListItem": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}}, "df": 2}}}}}}, "n": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Element.get_link": {"tf": 1}, "odfdo.Link": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.Link.url": {"tf": 1}, "odfdo.Link.name": {"tf": 1}, "odfdo.Link.title": {"tf": 1}, "odfdo.Link.target_frame": {"tf": 1}, "odfdo.Link.show": {"tf": 1}, "odfdo.Link.visited_style": {"tf": 1}, "odfdo.Link.style": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}}, "df": 12, "s": {"docs": {"odfdo.Element.get_links": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}}, "df": 2}}, "e": {"docs": {"odfdo.Element.get_draw_line": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Element.get_draw_lines": {"tf": 1}}, "df": 1, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.LineShape": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}, "odfdo.LineShape.x1": {"tf": 1}, "odfdo.LineShape.y1": {"tf": 1}, "odfdo.LineShape.x2": {"tf": 1}, "odfdo.LineShape.y2": {"tf": 1}}, "df": 6}}}}}, "b": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.LineBreak": {"tf": 1}, "odfdo.LineBreak.__init__": {"tf": 1}}, "df": 2}}}}}}}}, "e": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Header.level": {"tf": 1}, "odfdo.Style.get_level_style": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.TOC.outline_level": {"tf": 1}, "odfdo.TocEntryTemplate.outline_level": {"tf": 1}, "odfdo.VarChapter.outline_level": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 7}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Style.leader_style": {"tf": 1}, "odfdo.Style.leader_text": {"tf": 1}, "odfdo.TabStopStyle.leader_color": {"tf": 1}, "odfdo.TabStopStyle.leader_style": {"tf": 1}, "odfdo.TabStopStyle.leader_text": {"tf": 1}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1}, "odfdo.TabStopStyle.leader_type": {"tf": 1}, "odfdo.TabStopStyle.leader_width": {"tf": 1}}, "df": 8}}}}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.IndexTitle.protection_key": {"tf": 1}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}, "odfdo.TOC.protection_key": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}, "odfdo.Table.protection_key": {"tf": 1}}, "df": 5, "w": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}}, "df": 2}}}}}}}}}}, "annotation": {"root": {"docs": {"odfdo.AnimPar.presentation_node_type": {"tf": 1.7320508075688772}, "odfdo.AnimPar.smil_begin": {"tf": 1.7320508075688772}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter.smil_dur": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter.smil_type": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter.smil_subtype": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter.smil_direction": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter.smil_fadeColor": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter.smil_mode": {"tf": 1.7320508075688772}, "odfdo.Annotation.note_body": {"tf": 1}, "odfdo.Annotation.start": {"tf": 1}, "odfdo.Annotation.end": {"tf": 1.4142135623730951}, "odfdo.Annotation.name": {"tf": 1.7320508075688772}, "odfdo.Annotation.note_id": {"tf": 1.7320508075688772}, "odfdo.AnnotationEnd.start": {"tf": 1.4142135623730951}, "odfdo.AnnotationEnd.end": {"tf": 1}, "odfdo.AnnotationEnd.name": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.name": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.display_name": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.svg_font_family": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.font_family_generic": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.font_pitch": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.position": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.repeat": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.opacity": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.filter": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.text_style": {"tf": 1.7320508075688772}, "odfdo.Bookmark.name": {"tf": 1.7320508075688772}, "odfdo.BookmarkEnd.name": {"tf": 1.7320508075688772}, "odfdo.BookmarkStart.name": {"tf": 1.7320508075688772}, "odfdo.Cell.clone": {"tf": 1}, "odfdo.Cell.value": {"tf": 3}, "odfdo.Cell.float": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.Cell.type": {"tf": 1.4142135623730951}, "odfdo.Cell.currency": {"tf": 1.4142135623730951}, "odfdo.Cell.repeated": {"tf": 1.4142135623730951}, "odfdo.Cell.style": {"tf": 1.4142135623730951}, "odfdo.Cell.formula": {"tf": 1.4142135623730951}, "odfdo.Column.clone": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1.4142135623730951}, "odfdo.Column.style": {"tf": 1.4142135623730951}, "odfdo.ConnectorShape.start_shape": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.end_shape": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.start_glue_point": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.x1": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.y1": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.x2": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.y2": {"tf": 1.7320508075688772}, "odfdo.Container.path": {"tf": 1.4142135623730951}, "odfdo.Container.mimetype": {"tf": 1}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Content.body": {"tf": 1}, "odfdo.Document.container": {"tf": 1.4142135623730951}, "odfdo.Document.path": {"tf": 1.4142135623730951}, "odfdo.Document.mimetype": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.Document.meta": {"tf": 1}, "odfdo.Document.manifest": {"tf": 1}, "odfdo.Document.clone": {"tf": 1}, "odfdo.Document.content": {"tf": 1}, "odfdo.Document.styles": {"tf": 1}, "odfdo.DrawFillImage.display_name": {"tf": 1.7320508075688772}, "odfdo.DrawFillImage.name": {"tf": 1.7320508075688772}, "odfdo.DrawFillImage.height": {"tf": 1.7320508075688772}, "odfdo.DrawFillImage.width": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.draw_id": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.caption_id": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.draw_class_names": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.name": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.style": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.presentation_style": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.table_end_cell": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.table_end_x": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.table_end_y": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.table_background": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.xml_id": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.pos_x": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.pos_y": {"tf": 1.7320508075688772}, "odfdo.DrawImage.url": {"tf": 1.7320508075688772}, "odfdo.DrawImage.type": {"tf": 1.7320508075688772}, "odfdo.DrawImage.show": {"tf": 1.7320508075688772}, "odfdo.DrawImage.actuate": {"tf": 1.7320508075688772}, "odfdo.DrawImage.filter_name": {"tf": 1.7320508075688772}, "odfdo.DrawPage.name": {"tf": 1.7320508075688772}, "odfdo.DrawPage.draw_id": {"tf": 1.7320508075688772}, "odfdo.DrawPage.master_page": {"tf": 1.7320508075688772}, "odfdo.DrawPage.presentation_page_layout": {"tf": 1.7320508075688772}, "odfdo.DrawPage.style": {"tf": 1.7320508075688772}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.attributes": {"tf": 1}, "odfdo.Element.text": {"tf": 1}, "odfdo.Element.text_recursive": {"tf": 1}, "odfdo.Element.tail": {"tf": 1.4142135623730951}, "odfdo.Element.root": {"tf": 1}, "odfdo.Element.parent": {"tf": 1.4142135623730951}, "odfdo.Element.is_bound": {"tf": 1}, "odfdo.Element.children": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Element.clone": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1.4142135623730951}, "odfdo.Element.dc_creator": {"tf": 1.4142135623730951}, "odfdo.Element.dc_date": {"tf": 1.4142135623730951}, "odfdo.Element.svg_title": {"tf": 1.4142135623730951}, "odfdo.Element.svg_description": {"tf": 1.4142135623730951}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Frame.name": {"tf": 1.7320508075688772}, "odfdo.Frame.draw_id": {"tf": 1.7320508075688772}, "odfdo.Frame.width": {"tf": 1.7320508075688772}, "odfdo.Frame.height": {"tf": 1.7320508075688772}, "odfdo.Frame.style": {"tf": 1.7320508075688772}, "odfdo.Frame.pos_x": {"tf": 1.7320508075688772}, "odfdo.Frame.pos_y": {"tf": 1.7320508075688772}, "odfdo.Frame.presentation_class": {"tf": 1.7320508075688772}, "odfdo.Frame.layer": {"tf": 1.7320508075688772}, "odfdo.Frame.presentation_style": {"tf": 1.7320508075688772}, "odfdo.Header.level": {"tf": 1.7320508075688772}, "odfdo.Header.restart_numbering": {"tf": 1.7320508075688772}, "odfdo.Header.start_value": {"tf": 1.7320508075688772}, "odfdo.Header.suppress_numbering": {"tf": 1.7320508075688772}, "odfdo.IndexTitle.name": {"tf": 1.7320508075688772}, "odfdo.IndexTitle.style": {"tf": 1.7320508075688772}, "odfdo.IndexTitle.xml_id": {"tf": 1.7320508075688772}, "odfdo.IndexTitle.protected": {"tf": 1.7320508075688772}, "odfdo.IndexTitle.protection_key": {"tf": 1.7320508075688772}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1.7320508075688772}, "odfdo.IndexTitleTemplate.style": {"tf": 1.7320508075688772}, "odfdo.LineShape.x1": {"tf": 1.7320508075688772}, "odfdo.LineShape.y1": {"tf": 1.7320508075688772}, "odfdo.LineShape.x2": {"tf": 1.7320508075688772}, "odfdo.LineShape.y2": {"tf": 1.7320508075688772}, "odfdo.Link.url": {"tf": 1.7320508075688772}, "odfdo.Link.name": {"tf": 1.7320508075688772}, "odfdo.Link.title": {"tf": 1.7320508075688772}, "odfdo.Link.target_frame": {"tf": 1.7320508075688772}, "odfdo.Link.show": {"tf": 1.7320508075688772}, "odfdo.Link.visited_style": {"tf": 1.7320508075688772}, "odfdo.Link.style": {"tf": 1.7320508075688772}, "odfdo.List.style": {"tf": 1.7320508075688772}, "odfdo.NamedRange.name": {"tf": 1.4142135623730951}, "odfdo.Note.citation": {"tf": 1}, "odfdo.Note.note_body": {"tf": 1}, "odfdo.Note.note_class": {"tf": 1.7320508075688772}, "odfdo.Note.note_id": {"tf": 1.7320508075688772}, "odfdo.Reference.ref_format": {"tf": 1.4142135623730951}, "odfdo.Reference.name": {"tf": 1.7320508075688772}, "odfdo.ReferenceMark.name": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkEnd.name": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkStart.name": {"tf": 1.7320508075688772}, "odfdo.Row.clone": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1.4142135623730951}, "odfdo.Row.style": {"tf": 1.4142135623730951}, "odfdo.Row.width": {"tf": 1}, "odfdo.Section.style": {"tf": 1.7320508075688772}, "odfdo.Section.name": {"tf": 1.7320508075688772}, "odfdo.Spacer.number": {"tf": 1.7320508075688772}, "odfdo.Span.style": {"tf": 1.7320508075688772}, "odfdo.Span.class_names": {"tf": 1.7320508075688772}, "odfdo.Style.family": {"tf": 1.4142135623730951}, "odfdo.Style.page_layout": {"tf": 1.7320508075688772}, "odfdo.Style.next_style": {"tf": 1.7320508075688772}, "odfdo.Style.name": {"tf": 1.7320508075688772}, "odfdo.Style.parent_style": {"tf": 1.7320508075688772}, "odfdo.Style.display_name": {"tf": 1.7320508075688772}, "odfdo.Style.svg_font_family": {"tf": 1.7320508075688772}, "odfdo.Style.font_family_generic": {"tf": 1.7320508075688772}, "odfdo.Style.font_pitch": {"tf": 1.7320508075688772}, "odfdo.Style.text_style": {"tf": 1.7320508075688772}, "odfdo.Style.master_page": {"tf": 1.7320508075688772}, "odfdo.Style.style_type": {"tf": 1.7320508075688772}, "odfdo.Style.leader_style": {"tf": 1.7320508075688772}, "odfdo.Style.leader_text": {"tf": 1.7320508075688772}, "odfdo.Style.style_position": {"tf": 1.7320508075688772}, "odfdo.TOC.outline_level": {"tf": 1.4142135623730951}, "odfdo.TOC.body": {"tf": 1.4142135623730951}, "odfdo.TOC.name": {"tf": 1.7320508075688772}, "odfdo.TOC.style": {"tf": 1.7320508075688772}, "odfdo.TOC.xml_id": {"tf": 1.7320508075688772}, "odfdo.TOC.protected": {"tf": 1.7320508075688772}, "odfdo.TOC.protection_key": {"tf": 1.7320508075688772}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1.7320508075688772}, "odfdo.Tab.position": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.style_char": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.leader_color": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.leader_style": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.leader_text": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.leader_type": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.leader_width": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.style_position": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.style_type": {"tf": 1.7320508075688772}, "odfdo.Table.height": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.size": {"tf": 1}, "odfdo.Table.name": {"tf": 1.4142135623730951}, "odfdo.Table.protected": {"tf": 1}, "odfdo.Table.protection_key": {"tf": 1.4142135623730951}, "odfdo.Table.displayed": {"tf": 1}, "odfdo.Table.printable": {"tf": 1}, "odfdo.Table.print_ranges": {"tf": 1}, "odfdo.Table.style": {"tf": 1.4142135623730951}, "odfdo.Text.parent": {"tf": 1.4142135623730951}, "odfdo.TocEntryTemplate.outline_level": {"tf": 1.4142135623730951}, "odfdo.TocEntryTemplate.style": {"tf": 1.7320508075688772}, "odfdo.UserDefined.name": {"tf": 1.7320508075688772}, "odfdo.UserDefined.style": {"tf": 1.7320508075688772}, "odfdo.UserFieldDecl.name": {"tf": 1.7320508075688772}, "odfdo.UserFieldGet.name": {"tf": 1.7320508075688772}, "odfdo.UserFieldGet.style": {"tf": 1.7320508075688772}, "odfdo.UserFieldInput.name": {"tf": 1.7320508075688772}, "odfdo.UserFieldInput.style": {"tf": 1.7320508075688772}, "odfdo.VarChapter.display": {"tf": 1.7320508075688772}, "odfdo.VarChapter.outline_level": {"tf": 1.7320508075688772}, "odfdo.VarCreationDate.fixed": {"tf": 1.7320508075688772}, "odfdo.VarCreationDate.data_style": {"tf": 1.7320508075688772}, "odfdo.VarCreationTime.fixed": {"tf": 1.7320508075688772}, "odfdo.VarCreationTime.data_style": {"tf": 1.7320508075688772}, "odfdo.VarDate.date": {"tf": 1.7320508075688772}, "odfdo.VarDate.fixed": {"tf": 1.7320508075688772}, "odfdo.VarDate.data_style": {"tf": 1.7320508075688772}, "odfdo.VarDate.date_adjust": {"tf": 1.7320508075688772}, "odfdo.VarDecl.name": {"tf": 1.7320508075688772}, "odfdo.VarDecl.value_type": {"tf": 1.7320508075688772}, "odfdo.VarDescription.fixed": {"tf": 1.7320508075688772}, "odfdo.VarFileName.display": {"tf": 1.7320508075688772}, "odfdo.VarFileName.fixed": {"tf": 1.7320508075688772}, "odfdo.VarGet.name": {"tf": 1.7320508075688772}, "odfdo.VarGet.style": {"tf": 1.7320508075688772}, "odfdo.VarInitialCreator.fixed": {"tf": 1.7320508075688772}, "odfdo.VarKeywords.fixed": {"tf": 1.7320508075688772}, "odfdo.VarPageNumber.select_page": {"tf": 1.7320508075688772}, "odfdo.VarPageNumber.page_adjust": {"tf": 1.7320508075688772}, "odfdo.VarSet.name": {"tf": 1.7320508075688772}, "odfdo.VarSet.style": {"tf": 1.7320508075688772}, "odfdo.VarSet.display": {"tf": 1.7320508075688772}, "odfdo.VarSubject.fixed": {"tf": 1.7320508075688772}, "odfdo.VarTime.time": {"tf": 1.7320508075688772}, "odfdo.VarTime.fixed": {"tf": 1.7320508075688772}, "odfdo.VarTime.data_style": {"tf": 1.7320508075688772}, "odfdo.VarTime.time_adjust": {"tf": 1.7320508075688772}, "odfdo.VarTitle.fixed": {"tf": 1.7320508075688772}, "odfdo.XmlPart.root": {"tf": 1}, "odfdo.XmlPart.clone": {"tf": 1}}, "df": 245, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimPar.presentation_node_type": {"tf": 1}, "odfdo.AnimPar.smil_begin": {"tf": 1}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1}, "odfdo.AnimTransFilter.smil_dur": {"tf": 1}, "odfdo.AnimTransFilter.smil_type": {"tf": 1}, "odfdo.AnimTransFilter.smil_subtype": {"tf": 1}, "odfdo.AnimTransFilter.smil_direction": {"tf": 1}, "odfdo.AnimTransFilter.smil_fadeColor": {"tf": 1}, "odfdo.AnimTransFilter.smil_mode": {"tf": 1}, "odfdo.Annotation.note_body": {"tf": 1}, "odfdo.Annotation.name": {"tf": 1}, "odfdo.Annotation.note_id": {"tf": 1}, "odfdo.AnnotationEnd.name": {"tf": 1}, "odfdo.BackgroundImage.name": {"tf": 1}, "odfdo.BackgroundImage.display_name": {"tf": 1}, "odfdo.BackgroundImage.svg_font_family": {"tf": 1}, "odfdo.BackgroundImage.font_family_generic": {"tf": 1}, "odfdo.BackgroundImage.font_pitch": {"tf": 1}, "odfdo.BackgroundImage.position": {"tf": 1}, "odfdo.BackgroundImage.repeat": {"tf": 1}, "odfdo.BackgroundImage.opacity": {"tf": 1}, "odfdo.BackgroundImage.filter": {"tf": 1}, "odfdo.BackgroundImage.text_style": {"tf": 1}, "odfdo.Bookmark.name": {"tf": 1}, "odfdo.BookmarkEnd.name": {"tf": 1}, "odfdo.BookmarkStart.name": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.Column.style": {"tf": 1}, "odfdo.ConnectorShape.start_shape": {"tf": 1}, "odfdo.ConnectorShape.end_shape": {"tf": 1}, "odfdo.ConnectorShape.start_glue_point": {"tf": 1}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1}, "odfdo.ConnectorShape.x1": {"tf": 1}, "odfdo.ConnectorShape.y1": {"tf": 1}, "odfdo.ConnectorShape.x2": {"tf": 1}, "odfdo.ConnectorShape.y2": {"tf": 1}, "odfdo.Container.mimetype": {"tf": 1}, "odfdo.Document.mimetype": {"tf": 1}, "odfdo.DrawFillImage.display_name": {"tf": 1}, "odfdo.DrawFillImage.name": {"tf": 1}, "odfdo.DrawFillImage.height": {"tf": 1}, "odfdo.DrawFillImage.width": {"tf": 1}, "odfdo.DrawGroup.draw_id": {"tf": 1}, "odfdo.DrawGroup.caption_id": {"tf": 1}, "odfdo.DrawGroup.draw_class_names": {"tf": 1}, "odfdo.DrawGroup.name": {"tf": 1}, "odfdo.DrawGroup.style": {"tf": 1}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1}, "odfdo.DrawGroup.presentation_style": {"tf": 1}, "odfdo.DrawGroup.table_end_cell": {"tf": 1}, "odfdo.DrawGroup.table_end_x": {"tf": 1}, "odfdo.DrawGroup.table_end_y": {"tf": 1}, "odfdo.DrawGroup.table_background": {"tf": 1}, "odfdo.DrawGroup.xml_id": {"tf": 1}, "odfdo.DrawGroup.pos_x": {"tf": 1}, "odfdo.DrawGroup.pos_y": {"tf": 1}, "odfdo.DrawImage.url": {"tf": 1}, "odfdo.DrawImage.type": {"tf": 1}, "odfdo.DrawImage.show": {"tf": 1}, "odfdo.DrawImage.actuate": {"tf": 1}, "odfdo.DrawImage.filter_name": {"tf": 1}, "odfdo.DrawPage.name": {"tf": 1}, "odfdo.DrawPage.draw_id": {"tf": 1}, "odfdo.DrawPage.master_page": {"tf": 1}, "odfdo.DrawPage.presentation_page_layout": {"tf": 1}, "odfdo.DrawPage.style": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.attributes": {"tf": 1}, "odfdo.Element.text": {"tf": 1}, "odfdo.Element.text_recursive": {"tf": 1}, "odfdo.Element.tail": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.svg_title": {"tf": 1}, "odfdo.Element.svg_description": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Frame.name": {"tf": 1}, "odfdo.Frame.draw_id": {"tf": 1}, "odfdo.Frame.width": {"tf": 1}, "odfdo.Frame.height": {"tf": 1}, "odfdo.Frame.style": {"tf": 1}, "odfdo.Frame.pos_x": {"tf": 1}, "odfdo.Frame.pos_y": {"tf": 1}, "odfdo.Frame.presentation_class": {"tf": 1}, "odfdo.Frame.layer": {"tf": 1}, "odfdo.Frame.presentation_style": {"tf": 1}, "odfdo.Header.level": {"tf": 1}, "odfdo.Header.restart_numbering": {"tf": 1}, "odfdo.Header.start_value": {"tf": 1}, "odfdo.Header.suppress_numbering": {"tf": 1}, "odfdo.IndexTitle.name": {"tf": 1}, "odfdo.IndexTitle.style": {"tf": 1}, "odfdo.IndexTitle.xml_id": {"tf": 1}, "odfdo.IndexTitle.protected": {"tf": 1}, "odfdo.IndexTitle.protection_key": {"tf": 1}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}, "odfdo.IndexTitleTemplate.style": {"tf": 1}, "odfdo.LineShape.x1": {"tf": 1}, "odfdo.LineShape.y1": {"tf": 1}, "odfdo.LineShape.x2": {"tf": 1}, "odfdo.LineShape.y2": {"tf": 1}, "odfdo.Link.url": {"tf": 1}, "odfdo.Link.name": {"tf": 1}, "odfdo.Link.title": {"tf": 1}, "odfdo.Link.target_frame": {"tf": 1}, "odfdo.Link.show": {"tf": 1}, "odfdo.Link.visited_style": {"tf": 1}, "odfdo.Link.style": {"tf": 1}, "odfdo.List.style": {"tf": 1}, "odfdo.NamedRange.name": {"tf": 1}, "odfdo.Note.citation": {"tf": 1}, "odfdo.Note.note_body": {"tf": 1}, "odfdo.Note.note_class": {"tf": 1}, "odfdo.Note.note_id": {"tf": 1}, "odfdo.Reference.ref_format": {"tf": 1}, "odfdo.Reference.name": {"tf": 1}, "odfdo.ReferenceMark.name": {"tf": 1}, "odfdo.ReferenceMarkEnd.name": {"tf": 1}, "odfdo.ReferenceMarkStart.name": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Section.style": {"tf": 1}, "odfdo.Section.name": {"tf": 1}, "odfdo.Spacer.number": {"tf": 1}, "odfdo.Span.style": {"tf": 1}, "odfdo.Span.class_names": {"tf": 1}, "odfdo.Style.family": {"tf": 1}, "odfdo.Style.page_layout": {"tf": 1}, "odfdo.Style.next_style": {"tf": 1}, "odfdo.Style.name": {"tf": 1}, "odfdo.Style.parent_style": {"tf": 1}, "odfdo.Style.display_name": {"tf": 1}, "odfdo.Style.svg_font_family": {"tf": 1}, "odfdo.Style.font_family_generic": {"tf": 1}, "odfdo.Style.font_pitch": {"tf": 1}, "odfdo.Style.text_style": {"tf": 1}, "odfdo.Style.master_page": {"tf": 1}, "odfdo.Style.style_type": {"tf": 1}, "odfdo.Style.leader_style": {"tf": 1}, "odfdo.Style.leader_text": {"tf": 1}, "odfdo.Style.style_position": {"tf": 1}, "odfdo.TOC.name": {"tf": 1}, "odfdo.TOC.style": {"tf": 1}, "odfdo.TOC.xml_id": {"tf": 1}, "odfdo.TOC.protected": {"tf": 1}, "odfdo.TOC.protection_key": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}, "odfdo.Tab.position": {"tf": 1}, "odfdo.TabStopStyle.style_char": {"tf": 1}, "odfdo.TabStopStyle.leader_color": {"tf": 1}, "odfdo.TabStopStyle.leader_style": {"tf": 1}, "odfdo.TabStopStyle.leader_text": {"tf": 1}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1}, "odfdo.TabStopStyle.leader_type": {"tf": 1}, "odfdo.TabStopStyle.leader_width": {"tf": 1}, "odfdo.TabStopStyle.style_position": {"tf": 1}, "odfdo.TabStopStyle.style_type": {"tf": 1}, "odfdo.Table.name": {"tf": 1}, "odfdo.Table.protection_key": {"tf": 1}, "odfdo.Table.style": {"tf": 1}, "odfdo.TocEntryTemplate.style": {"tf": 1}, "odfdo.UserDefined.name": {"tf": 1}, "odfdo.UserDefined.style": {"tf": 1}, "odfdo.UserFieldDecl.name": {"tf": 1}, "odfdo.UserFieldGet.name": {"tf": 1}, "odfdo.UserFieldGet.style": {"tf": 1}, "odfdo.UserFieldInput.name": {"tf": 1}, "odfdo.UserFieldInput.style": {"tf": 1}, "odfdo.VarChapter.display": {"tf": 1}, "odfdo.VarChapter.outline_level": {"tf": 1}, "odfdo.VarCreationDate.fixed": {"tf": 1}, "odfdo.VarCreationDate.data_style": {"tf": 1}, "odfdo.VarCreationTime.fixed": {"tf": 1}, "odfdo.VarCreationTime.data_style": {"tf": 1}, "odfdo.VarDate.date": {"tf": 1}, "odfdo.VarDate.fixed": {"tf": 1}, "odfdo.VarDate.data_style": {"tf": 1}, "odfdo.VarDate.date_adjust": {"tf": 1}, "odfdo.VarDecl.name": {"tf": 1}, "odfdo.VarDecl.value_type": {"tf": 1}, "odfdo.VarDescription.fixed": {"tf": 1}, "odfdo.VarFileName.display": {"tf": 1}, "odfdo.VarFileName.fixed": {"tf": 1}, "odfdo.VarGet.name": {"tf": 1}, "odfdo.VarGet.style": {"tf": 1}, "odfdo.VarInitialCreator.fixed": {"tf": 1}, "odfdo.VarKeywords.fixed": {"tf": 1}, "odfdo.VarPageNumber.select_page": {"tf": 1}, "odfdo.VarPageNumber.page_adjust": {"tf": 1}, "odfdo.VarSet.name": {"tf": 1}, "odfdo.VarSet.style": {"tf": 1}, "odfdo.VarSet.display": {"tf": 1}, "odfdo.VarSubject.fixed": {"tf": 1}, "odfdo.VarTime.time": {"tf": 1}, "odfdo.VarTime.fixed": {"tf": 1}, "odfdo.VarTime.data_style": {"tf": 1}, "odfdo.VarTime.time_adjust": {"tf": 1}, "odfdo.VarTitle.fixed": {"tf": 1}}, "df": 202}, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Document.styles": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "b": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.AnimPar.presentation_node_type": {"tf": 1}, "odfdo.AnimPar.smil_begin": {"tf": 1}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1}, "odfdo.AnimTransFilter.smil_dur": {"tf": 1}, "odfdo.AnimTransFilter.smil_type": {"tf": 1}, "odfdo.AnimTransFilter.smil_subtype": {"tf": 1}, "odfdo.AnimTransFilter.smil_direction": {"tf": 1}, "odfdo.AnimTransFilter.smil_fadeColor": {"tf": 1}, "odfdo.AnimTransFilter.smil_mode": {"tf": 1}, "odfdo.Annotation.name": {"tf": 1}, "odfdo.Annotation.note_id": {"tf": 1}, "odfdo.AnnotationEnd.name": {"tf": 1}, "odfdo.BackgroundImage.name": {"tf": 1}, "odfdo.BackgroundImage.display_name": {"tf": 1}, "odfdo.BackgroundImage.svg_font_family": {"tf": 1}, "odfdo.BackgroundImage.font_family_generic": {"tf": 1}, "odfdo.BackgroundImage.font_pitch": {"tf": 1}, "odfdo.BackgroundImage.position": {"tf": 1}, "odfdo.BackgroundImage.repeat": {"tf": 1}, "odfdo.BackgroundImage.opacity": {"tf": 1}, "odfdo.BackgroundImage.filter": {"tf": 1}, "odfdo.BackgroundImage.text_style": {"tf": 1}, "odfdo.Bookmark.name": {"tf": 1}, "odfdo.BookmarkEnd.name": {"tf": 1}, "odfdo.BookmarkStart.name": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.ConnectorShape.start_shape": {"tf": 1}, "odfdo.ConnectorShape.end_shape": {"tf": 1}, "odfdo.ConnectorShape.start_glue_point": {"tf": 1}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1}, "odfdo.ConnectorShape.x1": {"tf": 1}, "odfdo.ConnectorShape.y1": {"tf": 1}, "odfdo.ConnectorShape.x2": {"tf": 1}, "odfdo.ConnectorShape.y2": {"tf": 1}, "odfdo.DrawFillImage.display_name": {"tf": 1}, "odfdo.DrawFillImage.name": {"tf": 1}, "odfdo.DrawFillImage.height": {"tf": 1}, "odfdo.DrawFillImage.width": {"tf": 1}, "odfdo.DrawGroup.draw_id": {"tf": 1}, "odfdo.DrawGroup.caption_id": {"tf": 1}, "odfdo.DrawGroup.draw_class_names": {"tf": 1}, "odfdo.DrawGroup.name": {"tf": 1}, "odfdo.DrawGroup.style": {"tf": 1}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1}, "odfdo.DrawGroup.presentation_style": {"tf": 1}, "odfdo.DrawGroup.table_end_cell": {"tf": 1}, "odfdo.DrawGroup.table_end_x": {"tf": 1}, "odfdo.DrawGroup.table_end_y": {"tf": 1}, "odfdo.DrawGroup.table_background": {"tf": 1}, "odfdo.DrawGroup.xml_id": {"tf": 1}, "odfdo.DrawGroup.pos_x": {"tf": 1}, "odfdo.DrawGroup.pos_y": {"tf": 1}, "odfdo.DrawImage.url": {"tf": 1}, "odfdo.DrawImage.type": {"tf": 1}, "odfdo.DrawImage.show": {"tf": 1}, "odfdo.DrawImage.actuate": {"tf": 1}, "odfdo.DrawImage.filter_name": {"tf": 1}, "odfdo.DrawPage.name": {"tf": 1}, "odfdo.DrawPage.draw_id": {"tf": 1}, "odfdo.DrawPage.master_page": {"tf": 1}, "odfdo.DrawPage.presentation_page_layout": {"tf": 1}, "odfdo.DrawPage.style": {"tf": 1}, "odfdo.Element.is_bound": {"tf": 1}, "odfdo.Frame.name": {"tf": 1}, "odfdo.Frame.draw_id": {"tf": 1}, "odfdo.Frame.width": {"tf": 1}, "odfdo.Frame.height": {"tf": 1}, "odfdo.Frame.style": {"tf": 1}, "odfdo.Frame.pos_x": {"tf": 1}, "odfdo.Frame.pos_y": {"tf": 1}, "odfdo.Frame.presentation_class": {"tf": 1}, "odfdo.Frame.layer": {"tf": 1}, "odfdo.Frame.presentation_style": {"tf": 1}, "odfdo.Header.level": {"tf": 1}, "odfdo.Header.restart_numbering": {"tf": 1}, "odfdo.Header.start_value": {"tf": 1}, "odfdo.Header.suppress_numbering": {"tf": 1}, "odfdo.IndexTitle.name": {"tf": 1}, "odfdo.IndexTitle.style": {"tf": 1}, "odfdo.IndexTitle.xml_id": {"tf": 1}, "odfdo.IndexTitle.protected": {"tf": 1}, "odfdo.IndexTitle.protection_key": {"tf": 1}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}, "odfdo.IndexTitleTemplate.style": {"tf": 1}, "odfdo.LineShape.x1": {"tf": 1}, "odfdo.LineShape.y1": {"tf": 1}, "odfdo.LineShape.x2": {"tf": 1}, "odfdo.LineShape.y2": {"tf": 1}, "odfdo.Link.url": {"tf": 1}, "odfdo.Link.name": {"tf": 1}, "odfdo.Link.title": {"tf": 1}, "odfdo.Link.target_frame": {"tf": 1}, "odfdo.Link.show": {"tf": 1}, "odfdo.Link.visited_style": {"tf": 1}, "odfdo.Link.style": {"tf": 1}, "odfdo.List.style": {"tf": 1}, "odfdo.Note.note_class": {"tf": 1}, "odfdo.Note.note_id": {"tf": 1}, "odfdo.Reference.name": {"tf": 1}, "odfdo.ReferenceMark.name": {"tf": 1}, "odfdo.ReferenceMarkEnd.name": {"tf": 1}, "odfdo.ReferenceMarkStart.name": {"tf": 1}, "odfdo.Section.style": {"tf": 1}, "odfdo.Section.name": {"tf": 1}, "odfdo.Spacer.number": {"tf": 1}, "odfdo.Span.style": {"tf": 1}, "odfdo.Span.class_names": {"tf": 1}, "odfdo.Style.page_layout": {"tf": 1}, "odfdo.Style.next_style": {"tf": 1}, "odfdo.Style.name": {"tf": 1}, "odfdo.Style.parent_style": {"tf": 1}, "odfdo.Style.display_name": {"tf": 1}, "odfdo.Style.svg_font_family": {"tf": 1}, "odfdo.Style.font_family_generic": {"tf": 1}, "odfdo.Style.font_pitch": {"tf": 1}, "odfdo.Style.text_style": {"tf": 1}, "odfdo.Style.master_page": {"tf": 1}, "odfdo.Style.style_type": {"tf": 1}, "odfdo.Style.leader_style": {"tf": 1}, "odfdo.Style.leader_text": {"tf": 1}, "odfdo.Style.style_position": {"tf": 1}, "odfdo.TOC.name": {"tf": 1}, "odfdo.TOC.style": {"tf": 1}, "odfdo.TOC.xml_id": {"tf": 1}, "odfdo.TOC.protected": {"tf": 1}, "odfdo.TOC.protection_key": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}, "odfdo.Tab.position": {"tf": 1}, "odfdo.TabStopStyle.style_char": {"tf": 1}, "odfdo.TabStopStyle.leader_color": {"tf": 1}, "odfdo.TabStopStyle.leader_style": {"tf": 1}, "odfdo.TabStopStyle.leader_text": {"tf": 1}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1}, "odfdo.TabStopStyle.leader_type": {"tf": 1}, "odfdo.TabStopStyle.leader_width": {"tf": 1}, "odfdo.TabStopStyle.style_position": {"tf": 1}, "odfdo.TabStopStyle.style_type": {"tf": 1}, "odfdo.Table.protected": {"tf": 1}, "odfdo.Table.displayed": {"tf": 1}, "odfdo.Table.printable": {"tf": 1}, "odfdo.TocEntryTemplate.style": {"tf": 1}, "odfdo.UserDefined.name": {"tf": 1}, "odfdo.UserDefined.style": {"tf": 1}, "odfdo.UserFieldDecl.name": {"tf": 1}, "odfdo.UserFieldGet.name": {"tf": 1}, "odfdo.UserFieldGet.style": {"tf": 1}, "odfdo.UserFieldInput.name": {"tf": 1}, "odfdo.UserFieldInput.style": {"tf": 1}, "odfdo.VarChapter.display": {"tf": 1}, "odfdo.VarChapter.outline_level": {"tf": 1}, "odfdo.VarCreationDate.fixed": {"tf": 1}, "odfdo.VarCreationDate.data_style": {"tf": 1}, "odfdo.VarCreationTime.fixed": {"tf": 1}, "odfdo.VarCreationTime.data_style": {"tf": 1}, "odfdo.VarDate.date": {"tf": 1}, "odfdo.VarDate.fixed": {"tf": 1}, "odfdo.VarDate.data_style": {"tf": 1}, "odfdo.VarDate.date_adjust": {"tf": 1}, "odfdo.VarDecl.name": {"tf": 1}, "odfdo.VarDecl.value_type": {"tf": 1}, "odfdo.VarDescription.fixed": {"tf": 1}, "odfdo.VarFileName.display": {"tf": 1}, "odfdo.VarFileName.fixed": {"tf": 1}, "odfdo.VarGet.name": {"tf": 1}, "odfdo.VarGet.style": {"tf": 1}, "odfdo.VarInitialCreator.fixed": {"tf": 1}, "odfdo.VarKeywords.fixed": {"tf": 1}, "odfdo.VarPageNumber.select_page": {"tf": 1}, "odfdo.VarPageNumber.page_adjust": {"tf": 1}, "odfdo.VarSet.name": {"tf": 1}, "odfdo.VarSet.style": {"tf": 1}, "odfdo.VarSet.display": {"tf": 1}, "odfdo.VarSubject.fixed": {"tf": 1}, "odfdo.VarTime.time": {"tf": 1}, "odfdo.VarTime.fixed": {"tf": 1}, "odfdo.VarTime.data_style": {"tf": 1}, "odfdo.VarTime.time_adjust": {"tf": 1}, "odfdo.VarTitle.fixed": {"tf": 1}}, "df": 178}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimPar.presentation_node_type": {"tf": 1}, "odfdo.AnimPar.smil_begin": {"tf": 1}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1}, "odfdo.AnimTransFilter.smil_dur": {"tf": 1}, "odfdo.AnimTransFilter.smil_type": {"tf": 1}, "odfdo.AnimTransFilter.smil_subtype": {"tf": 1}, "odfdo.AnimTransFilter.smil_direction": {"tf": 1}, "odfdo.AnimTransFilter.smil_fadeColor": {"tf": 1}, "odfdo.AnimTransFilter.smil_mode": {"tf": 1}, "odfdo.Annotation.end": {"tf": 1}, "odfdo.Annotation.name": {"tf": 1}, "odfdo.Annotation.note_id": {"tf": 1}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.AnnotationEnd.name": {"tf": 1}, "odfdo.BackgroundImage.name": {"tf": 1}, "odfdo.BackgroundImage.display_name": {"tf": 1}, "odfdo.BackgroundImage.svg_font_family": {"tf": 1}, "odfdo.BackgroundImage.font_family_generic": {"tf": 1}, "odfdo.BackgroundImage.font_pitch": {"tf": 1}, "odfdo.BackgroundImage.position": {"tf": 1}, "odfdo.BackgroundImage.repeat": {"tf": 1}, "odfdo.BackgroundImage.opacity": {"tf": 1}, "odfdo.BackgroundImage.filter": {"tf": 1}, "odfdo.BackgroundImage.text_style": {"tf": 1}, "odfdo.Bookmark.name": {"tf": 1}, "odfdo.BookmarkEnd.name": {"tf": 1}, "odfdo.BookmarkStart.name": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Column.style": {"tf": 1}, "odfdo.ConnectorShape.start_shape": {"tf": 1}, "odfdo.ConnectorShape.end_shape": {"tf": 1}, "odfdo.ConnectorShape.start_glue_point": {"tf": 1}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1}, "odfdo.ConnectorShape.x1": {"tf": 1}, "odfdo.ConnectorShape.y1": {"tf": 1}, "odfdo.ConnectorShape.x2": {"tf": 1}, "odfdo.ConnectorShape.y2": {"tf": 1}, "odfdo.Container.path": {"tf": 1}, "odfdo.Document.container": {"tf": 1}, "odfdo.Document.path": {"tf": 1}, "odfdo.DrawFillImage.display_name": {"tf": 1}, "odfdo.DrawFillImage.name": {"tf": 1}, "odfdo.DrawFillImage.height": {"tf": 1}, "odfdo.DrawFillImage.width": {"tf": 1}, "odfdo.DrawGroup.draw_id": {"tf": 1}, "odfdo.DrawGroup.caption_id": {"tf": 1}, "odfdo.DrawGroup.draw_class_names": {"tf": 1}, "odfdo.DrawGroup.name": {"tf": 1}, "odfdo.DrawGroup.style": {"tf": 1}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1}, "odfdo.DrawGroup.presentation_style": {"tf": 1}, "odfdo.DrawGroup.table_end_cell": {"tf": 1}, "odfdo.DrawGroup.table_end_x": {"tf": 1}, "odfdo.DrawGroup.table_end_y": {"tf": 1}, "odfdo.DrawGroup.table_background": {"tf": 1}, "odfdo.DrawGroup.xml_id": {"tf": 1}, "odfdo.DrawGroup.pos_x": {"tf": 1}, "odfdo.DrawGroup.pos_y": {"tf": 1}, "odfdo.DrawImage.url": {"tf": 1}, "odfdo.DrawImage.type": {"tf": 1}, "odfdo.DrawImage.show": {"tf": 1}, "odfdo.DrawImage.actuate": {"tf": 1}, "odfdo.DrawImage.filter_name": {"tf": 1}, "odfdo.DrawPage.name": {"tf": 1}, "odfdo.DrawPage.draw_id": {"tf": 1}, "odfdo.DrawPage.master_page": {"tf": 1}, "odfdo.DrawPage.presentation_page_layout": {"tf": 1}, "odfdo.DrawPage.style": {"tf": 1}, "odfdo.Element.tail": {"tf": 1}, "odfdo.Element.parent": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Element.svg_title": {"tf": 1}, "odfdo.Element.svg_description": {"tf": 1}, "odfdo.Frame.name": {"tf": 1}, "odfdo.Frame.draw_id": {"tf": 1}, "odfdo.Frame.width": {"tf": 1}, "odfdo.Frame.height": {"tf": 1}, "odfdo.Frame.style": {"tf": 1}, "odfdo.Frame.pos_x": {"tf": 1}, "odfdo.Frame.pos_y": {"tf": 1}, "odfdo.Frame.presentation_class": {"tf": 1}, "odfdo.Frame.layer": {"tf": 1}, "odfdo.Frame.presentation_style": {"tf": 1}, "odfdo.Header.level": {"tf": 1}, "odfdo.Header.restart_numbering": {"tf": 1}, "odfdo.Header.start_value": {"tf": 1}, "odfdo.Header.suppress_numbering": {"tf": 1}, "odfdo.IndexTitle.name": {"tf": 1}, "odfdo.IndexTitle.style": {"tf": 1}, "odfdo.IndexTitle.xml_id": {"tf": 1}, "odfdo.IndexTitle.protected": {"tf": 1}, "odfdo.IndexTitle.protection_key": {"tf": 1}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1}, "odfdo.IndexTitleTemplate.style": {"tf": 1}, "odfdo.LineShape.x1": {"tf": 1}, "odfdo.LineShape.y1": {"tf": 1}, "odfdo.LineShape.x2": {"tf": 1}, "odfdo.LineShape.y2": {"tf": 1}, "odfdo.Link.url": {"tf": 1}, "odfdo.Link.name": {"tf": 1}, "odfdo.Link.title": {"tf": 1}, "odfdo.Link.target_frame": {"tf": 1}, "odfdo.Link.show": {"tf": 1}, "odfdo.Link.visited_style": {"tf": 1}, "odfdo.Link.style": {"tf": 1}, "odfdo.List.style": {"tf": 1}, "odfdo.NamedRange.name": {"tf": 1}, "odfdo.Note.note_class": {"tf": 1}, "odfdo.Note.note_id": {"tf": 1}, "odfdo.Reference.ref_format": {"tf": 1}, "odfdo.Reference.name": {"tf": 1}, "odfdo.ReferenceMark.name": {"tf": 1}, "odfdo.ReferenceMarkEnd.name": {"tf": 1}, "odfdo.ReferenceMarkStart.name": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Section.style": {"tf": 1}, "odfdo.Section.name": {"tf": 1}, "odfdo.Spacer.number": {"tf": 1}, "odfdo.Span.style": {"tf": 1}, "odfdo.Span.class_names": {"tf": 1}, "odfdo.Style.family": {"tf": 1}, "odfdo.Style.page_layout": {"tf": 1}, "odfdo.Style.next_style": {"tf": 1}, "odfdo.Style.name": {"tf": 1}, "odfdo.Style.parent_style": {"tf": 1}, "odfdo.Style.display_name": {"tf": 1}, "odfdo.Style.svg_font_family": {"tf": 1}, "odfdo.Style.font_family_generic": {"tf": 1}, "odfdo.Style.font_pitch": {"tf": 1}, "odfdo.Style.text_style": {"tf": 1}, "odfdo.Style.master_page": {"tf": 1}, "odfdo.Style.style_type": {"tf": 1}, "odfdo.Style.leader_style": {"tf": 1}, "odfdo.Style.leader_text": {"tf": 1}, "odfdo.Style.style_position": {"tf": 1}, "odfdo.TOC.outline_level": {"tf": 1}, "odfdo.TOC.body": {"tf": 1}, "odfdo.TOC.name": {"tf": 1}, "odfdo.TOC.style": {"tf": 1}, "odfdo.TOC.xml_id": {"tf": 1}, "odfdo.TOC.protected": {"tf": 1}, "odfdo.TOC.protection_key": {"tf": 1}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1}, "odfdo.Tab.position": {"tf": 1}, "odfdo.TabStopStyle.style_char": {"tf": 1}, "odfdo.TabStopStyle.leader_color": {"tf": 1}, "odfdo.TabStopStyle.leader_style": {"tf": 1}, "odfdo.TabStopStyle.leader_text": {"tf": 1}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1}, "odfdo.TabStopStyle.leader_type": {"tf": 1}, "odfdo.TabStopStyle.leader_width": {"tf": 1}, "odfdo.TabStopStyle.style_position": {"tf": 1}, "odfdo.TabStopStyle.style_type": {"tf": 1}, "odfdo.Table.name": {"tf": 1}, "odfdo.Table.protection_key": {"tf": 1}, "odfdo.Table.style": {"tf": 1}, "odfdo.Text.parent": {"tf": 1}, "odfdo.TocEntryTemplate.outline_level": {"tf": 1}, "odfdo.TocEntryTemplate.style": {"tf": 1}, "odfdo.UserDefined.name": {"tf": 1}, "odfdo.UserDefined.style": {"tf": 1}, "odfdo.UserFieldDecl.name": {"tf": 1}, "odfdo.UserFieldGet.name": {"tf": 1}, "odfdo.UserFieldGet.style": {"tf": 1}, "odfdo.UserFieldInput.name": {"tf": 1}, "odfdo.UserFieldInput.style": {"tf": 1}, "odfdo.VarChapter.display": {"tf": 1}, "odfdo.VarChapter.outline_level": {"tf": 1}, "odfdo.VarCreationDate.fixed": {"tf": 1}, "odfdo.VarCreationDate.data_style": {"tf": 1}, "odfdo.VarCreationTime.fixed": {"tf": 1}, "odfdo.VarCreationTime.data_style": {"tf": 1}, "odfdo.VarDate.date": {"tf": 1}, "odfdo.VarDate.fixed": {"tf": 1}, "odfdo.VarDate.data_style": {"tf": 1}, "odfdo.VarDate.date_adjust": {"tf": 1}, "odfdo.VarDecl.name": {"tf": 1}, "odfdo.VarDecl.value_type": {"tf": 1}, "odfdo.VarDescription.fixed": {"tf": 1}, "odfdo.VarFileName.display": {"tf": 1}, "odfdo.VarFileName.fixed": {"tf": 1}, "odfdo.VarGet.name": {"tf": 1}, "odfdo.VarGet.style": {"tf": 1}, "odfdo.VarInitialCreator.fixed": {"tf": 1}, "odfdo.VarKeywords.fixed": {"tf": 1}, "odfdo.VarPageNumber.select_page": {"tf": 1}, "odfdo.VarPageNumber.page_adjust": {"tf": 1}, "odfdo.VarSet.name": {"tf": 1}, "odfdo.VarSet.style": {"tf": 1}, "odfdo.VarSet.display": {"tf": 1}, "odfdo.VarSubject.fixed": {"tf": 1}, "odfdo.VarTime.time": {"tf": 1}, "odfdo.VarTime.fixed": {"tf": 1}, "odfdo.VarTime.data_style": {"tf": 1}, "odfdo.VarTime.time_adjust": {"tf": 1}, "odfdo.VarTitle.fixed": {"tf": 1}}, "df": 205}}}}, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.Annotation.start": {"tf": 1}, "odfdo.Annotation.end": {"tf": 1}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.AnnotationEnd.end": {"tf": 1}, "odfdo.Cell.clone": {"tf": 1}, "odfdo.Column.clone": {"tf": 1}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Content.body": {"tf": 1}, "odfdo.Document.container": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.Document.meta": {"tf": 1}, "odfdo.Document.manifest": {"tf": 1}, "odfdo.Document.clone": {"tf": 1}, "odfdo.Document.content": {"tf": 1}, "odfdo.Document.styles": {"tf": 1}, "odfdo.Element.root": {"tf": 1}, "odfdo.Element.parent": {"tf": 1}, "odfdo.Element.clone": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1}, "odfdo.Row.clone": {"tf": 1}, "odfdo.TOC.body": {"tf": 1}, "odfdo.Text.parent": {"tf": 1}, "odfdo.XmlPart.root": {"tf": 1}, "odfdo.XmlPart.clone": {"tf": 1}}, "df": 24}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation.start": {"tf": 1.4142135623730951}, "odfdo.Annotation.end": {"tf": 1.4142135623730951}, "odfdo.AnnotationEnd.start": {"tf": 1.4142135623730951}, "odfdo.AnnotationEnd.end": {"tf": 1.4142135623730951}, "odfdo.Content.body": {"tf": 1.4142135623730951}, "odfdo.Document.body": {"tf": 1.4142135623730951}, "odfdo.Element.root": {"tf": 1.4142135623730951}, "odfdo.Element.parent": {"tf": 1.4142135623730951}, "odfdo.Element.children": {"tf": 1.4142135623730951}, "odfdo.Element.clone": {"tf": 1.4142135623730951}, "odfdo.Element.document_body": {"tf": 1.4142135623730951}, "odfdo.TOC.body": {"tf": 1.4142135623730951}, "odfdo.Text.parent": {"tf": 1.4142135623730951}, "odfdo.XmlPart.root": {"tf": 1.4142135623730951}}, "df": 14}}}}}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Cell.clone": {"tf": 1.4142135623730951}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Column.clone": {"tf": 1}}, "df": 1}}}}, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Container.clone": {"tf": 1.4142135623730951}, "odfdo.Document.container": {"tf": 1.4142135623730951}}, "df": 2}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.content": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.TOC.outline_level": {"tf": 1}, "odfdo.Table.height": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.size": {"tf": 1}, "odfdo.TocEntryTemplate.outline_level": {"tf": 1}}, "df": 10}}}, "f": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.float": {"tf": 1}}, "df": 2}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Cell.value": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.value": {"tf": 1}}, "df": 1, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.value": {"tf": 2}, "odfdo.Element.dc_date": {"tf": 1.4142135623730951}}, "df": 2}}}}}}}, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.clone": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "[": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.attributes": {"tf": 1}}, "df": 1}}}}}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Cell.value": {"tf": 1}}, "df": 1}}}}}}}}, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Column.clone": {"tf": 1}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "[": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Table.size": {"tf": 1}}, "df": 1}}}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Container.path": {"tf": 1}, "odfdo.Document.path": {"tf": 1}}, "df": 2, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {"odfdo.Container.path": {"tf": 1}, "odfdo.Document.path": {"tf": 1}}, "df": 2}}}}}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Document.meta": {"tf": 1.4142135623730951}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.manifest": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "[": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.Element.children": {"tf": 1}}, "df": 1}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Table.print_ranges": {"tf": 1}}, "df": 1}}}}}}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.Row.clone": {"tf": 1.4142135623730951}}, "df": 1}}}, "x": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.XmlPart.clone": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}}, "default_value": {"root": {"0": {"docs": {"odfdo.FIRST_CHILD": {"tf": 1}}, "df": 1}, "1": {"docs": {"odfdo.LAST_CHILD": {"tf": 1}}, "df": 1}, "2": {"docs": {"odfdo.NEXT_SIBLING": {"tf": 1}}, "df": 1}, "3": {"docs": {"odfdo.PREV_SIBLING": {"tf": 1}}, "df": 1}, "docs": {"odfdo.Reference.format_allowed": {"tf": 1.4142135623730951}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1.4142135623730951}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1.4142135623730951}}, "df": 3, "x": {"2": {"7": {"docs": {"odfdo.Reference.format_allowed": {"tf": 4.47213595499958}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 3.1622776601683795}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 2.8284271247461903}}, "df": 3}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1}}, "df": 1}}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1}}, "df": 1}}}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1}}, "df": 1}}}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1}}, "df": 1}}, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1}}, "df": 1}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1.4142135623730951}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1}}, "df": 3}}, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1}}, "df": 1}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "n": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1.7320508075688772}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 2}}, "df": 2}}}}}, "o": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1}}, "df": 1}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1.7320508075688772}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1.4142135623730951}}, "df": 2}}}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Reference.format_allowed": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1}}, "df": 1}}}}}}}}}, "f": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1}}, "df": 1}}}}}}, "signature": {"root": {"0": {"docs": {"odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Styles.get_master_page": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}}, "df": 52}, "1": {"docs": {"odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.Spacer.__init__": {"tf": 1}}, "df": 3, "c": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}}, "df": 3}}}, "2": {"0": {"docs": {"odfdo.TOC.__init__": {"tf": 1.4142135623730951}}, "df": 1}, "docs": {}, "df": 0, "s": {"docs": {"odfdo.DrawPage.set_transition": {"tf": 1}}, "df": 1}}, "3": {"9": {"docs": {"odfdo.Bookmark.__init__": {"tf": 1.4142135623730951}, "odfdo.BookmarkEnd.__init__": {"tf": 1.4142135623730951}, "odfdo.BookmarkStart.__init__": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.set_comments": {"tf": 1.4142135623730951}, "odfdo.Document.__init__": {"tf": 1.4142135623730951}, "odfdo.Document.new": {"tf": 1.4142135623730951}, "odfdo.Document.save": {"tf": 1.4142135623730951}, "odfdo.Document.get_styles": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Document.get_styled_elements": {"tf": 1.4142135623730951}, "odfdo.DrawImage.__init__": {"tf": 2.8284271247461903}, "odfdo.DrawPage.set_transition": {"tf": 1.4142135623730951}, "odfdo.Element.strip_tags": {"tf": 1.4142135623730951}, "odfdo.Element.get_styled_elements": {"tf": 1.4142135623730951}, "odfdo.Frame.__init__": {"tf": 2}, "odfdo.Frame.image_frame": {"tf": 2}, "odfdo.Frame.text_frame": {"tf": 2}, "odfdo.Link.__init__": {"tf": 1.4142135623730951}, "odfdo.Manifest.add_full_path": {"tf": 1.4142135623730951}, "odfdo.Note.__init__": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_note": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.Reference.__init__": {"tf": 2}, "odfdo.ReferenceMark.__init__": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 1.4142135623730951}, "odfdo.Style.set_font": {"tf": 1.4142135623730951}, "odfdo.Styles.get_styles": {"tf": 1.4142135623730951}, "odfdo.TOC.__init__": {"tf": 2.449489742783178}, "odfdo.Table.to_csv": {"tf": 1.4142135623730951}, "odfdo.UserDefined.__init__": {"tf": 1.4142135623730951}, "odfdo.VarChapter.__init__": {"tf": 1.4142135623730951}, "odfdo.VarFileName.__init__": {"tf": 1.4142135623730951}, "odfdo.default_frame_position_style": {"tf": 3.1622776601683795}}, "df": 36}, "docs": {}, "df": 0}, "docs": {"odfdo.AnimPar.__init__": {"tf": 7.416198487095663}, "odfdo.AnimSeq.__init__": {"tf": 5.744562646538029}, "odfdo.AnimTransFilter.__init__": {"tf": 11.61895003862225}, "odfdo.Annotation.__init__": {"tf": 11.832159566199232}, "odfdo.Annotation.get_annotated": {"tf": 9}, "odfdo.Annotation.delete": {"tf": 7.483314773547883}, "odfdo.Annotation.check_validity": {"tf": 3.4641016151377544}, "odfdo.AnnotationEnd.__init__": {"tf": 7.937253933193772}, "odfdo.BackgroundImage.__init__": {"tf": 11.61895003862225}, "odfdo.Bookmark.__init__": {"tf": 5.477225575051661}, "odfdo.BookmarkEnd.__init__": {"tf": 5.477225575051661}, "odfdo.BookmarkStart.__init__": {"tf": 5.477225575051661}, "odfdo.Cell.__init__": {"tf": 12.24744871391589}, "odfdo.Cell.set_value": {"tf": 12.767145334803704}, "odfdo.Cell.is_empty": {"tf": 5.0990195135927845}, "odfdo.ChangeInfo.__init__": {"tf": 7.681145747868608}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 5.5677643628300215}, "odfdo.ChangeInfo.set_dc_date": {"tf": 5.916079783099616}, "odfdo.ChangeInfo.get_comments": {"tf": 6}, "odfdo.ChangeInfo.set_comments": {"tf": 6.48074069840786}, "odfdo.Column.__init__": {"tf": 8.660254037844387}, "odfdo.Column.get_default_cell_style": {"tf": 4.123105625617661}, "odfdo.Column.set_default_cell_style": {"tf": 5.744562646538029}, "odfdo.ConnectorShape.__init__": {"tf": 13.228756555322953}, "odfdo.Container.__init__": {"tf": 6.48074069840786}, "odfdo.Container.open": {"tf": 6.244997998398398}, "odfdo.Container.get_parts": {"tf": 4.123105625617661}, "odfdo.Container.get_part": {"tf": 5.477225575051661}, "odfdo.Container.set_part": {"tf": 5.291502622129181}, "odfdo.Container.del_part": {"tf": 4.47213595499958}, "odfdo.Container.save": {"tf": 9}, "odfdo.Content.get_styles": {"tf": 6.6332495807108}, "odfdo.Content.get_style": {"tf": 9.38083151964686}, "odfdo.Document.__init__": {"tf": 7.937253933193772}, "odfdo.Document.new": {"tf": 7.54983443527075}, "odfdo.Document.get_parts": {"tf": 4.123105625617661}, "odfdo.Document.get_part": {"tf": 6.557438524302}, "odfdo.Document.set_part": {"tf": 5.291502622129181}, "odfdo.Document.del_part": {"tf": 4.47213595499958}, "odfdo.Document.get_type": {"tf": 3.4641016151377544}, "odfdo.Document.get_formatted_text": {"tf": 5.0990195135927845}, "odfdo.Document.get_formated_meta": {"tf": 3.4641016151377544}, "odfdo.Document.add_file": {"tf": 5.385164807134504}, "odfdo.Document.save": {"tf": 9.9498743710662}, "odfdo.Document.get_styles": {"tf": 8.717797887081348}, "odfdo.Document.get_style": {"tf": 9.38083151964686}, "odfdo.Document.insert_style": {"tf": 9.055385138137417}, "odfdo.Document.get_styled_elements": {"tf": 6.4031242374328485}, "odfdo.Document.show_styles": {"tf": 7.615773105863909}, "odfdo.Document.delete_styles": {"tf": 3.4641016151377544}, "odfdo.Document.merge_styles_from": {"tf": 5.291502622129181}, "odfdo.Document.add_page_break_style": {"tf": 3.4641016151377544}, "odfdo.DrawFillImage.__init__": {"tf": 9.746794344808963}, "odfdo.DrawGroup.__init__": {"tf": 13.038404810405298}, "odfdo.DrawImage.__init__": {"tf": 10.14889156509222}, "odfdo.DrawPage.__init__": {"tf": 10.723805294763608}, "odfdo.DrawPage.set_transition": {"tf": 7.681145747868608}, "odfdo.DrawPage.get_shapes": {"tf": 5}, "odfdo.DrawPage.get_formatted_text": {"tf": 5.5677643628300215}, "odfdo.Element.__init__": {"tf": 3.7416573867739413}, "odfdo.Element.from_tag": {"tf": 6.48074069840786}, "odfdo.Element.from_tag_for_clone": {"tf": 7.54983443527075}, "odfdo.Element.make_etree_element": {"tf": 5}, "odfdo.Element.elements_repeated_sequence": {"tf": 7.211102550927978}, "odfdo.Element.get_elements": {"tf": 6.782329983125268}, "odfdo.Element.get_element": {"tf": 6.928203230275509}, "odfdo.Element.get_attribute": {"tf": 5.477225575051661}, "odfdo.Element.get_attribute_integer": {"tf": 5}, "odfdo.Element.get_attribute_string": {"tf": 5}, "odfdo.Element.set_attribute": {"tf": 6.164414002968976}, "odfdo.Element.set_style_attribute": {"tf": 6.4031242374328485}, "odfdo.Element.del_attribute": {"tf": 4.47213595499958}, "odfdo.Element.search": {"tf": 5}, "odfdo.Element.match": {"tf": 4.47213595499958}, "odfdo.Element.replace": {"tf": 6.244997998398398}, "odfdo.Element.index": {"tf": 5.291502622129181}, "odfdo.Element.is_empty": {"tf": 3.4641016151377544}, "odfdo.Element.get_between": {"tf": 10.488088481701515}, "odfdo.Element.insert": {"tf": 9.219544457292887}, "odfdo.Element.extend": {"tf": 6.557438524302}, "odfdo.Element.append": {"tf": 5.744562646538029}, "odfdo.Element.delete": {"tf": 7.483314773547883}, "odfdo.Element.replace_element": {"tf": 6.855654600401044}, "odfdo.Element.strip_elements": {"tf": 8.306623862918075}, "odfdo.Element.strip_tags": {"tf": 10.677078252031311}, "odfdo.Element.xpath": {"tf": 6.928203230275509}, "odfdo.Element.clear": {"tf": 3.4641016151377544}, "odfdo.Element.serialize": {"tf": 6.324555320336759}, "odfdo.Element.get_formatted_text": {"tf": 5.5677643628300215}, "odfdo.Element.get_styled_elements": {"tf": 6.4031242374328485}, "odfdo.Element.get_sections": {"tf": 8.12403840463596}, "odfdo.Element.get_section": {"tf": 7.810249675906654}, "odfdo.Element.get_paragraphs": {"tf": 8.12403840463596}, "odfdo.Element.get_paragraph": {"tf": 7.810249675906654}, "odfdo.Element.get_spans": {"tf": 8.12403840463596}, "odfdo.Element.get_span": {"tf": 7.810249675906654}, "odfdo.Element.get_headers": {"tf": 9.273618495495704}, "odfdo.Element.get_header": {"tf": 9}, "odfdo.Element.get_lists": {"tf": 8.12403840463596}, "odfdo.Element.get_list": {"tf": 7.810249675906654}, "odfdo.Element.get_frames": {"tf": 11.224972160321824}, "odfdo.Element.get_frame": {"tf": 11.874342087037917}, "odfdo.Element.get_images": {"tf": 9.273618495495704}, "odfdo.Element.get_image": {"tf": 10.04987562112089}, "odfdo.Element.get_tables": {"tf": 8.12403840463596}, "odfdo.Element.get_table": {"tf": 9}, "odfdo.Element.get_named_ranges": {"tf": 5}, "odfdo.Element.get_named_range": {"tf": 5.744562646538029}, "odfdo.Element.append_named_range": {"tf": 5.291502622129181}, "odfdo.Element.delete_named_range": {"tf": 4.47213595499958}, "odfdo.Element.get_notes": {"tf": 8.12403840463596}, "odfdo.Element.get_note": {"tf": 10.04987562112089}, "odfdo.Element.get_annotations": {"tf": 10.677078252031311}, "odfdo.Element.get_annotation": {"tf": 12.206555615733702}, "odfdo.Element.get_annotation_ends": {"tf": 5}, "odfdo.Element.get_annotation_end": {"tf": 7.810249675906654}, "odfdo.Element.get_office_names": {"tf": 4.123105625617661}, "odfdo.Element.get_variable_decls": {"tf": 4.47213595499958}, "odfdo.Element.get_variable_decl_list": {"tf": 5}, "odfdo.Element.get_variable_decl": {"tf": 6.855654600401044}, "odfdo.Element.get_variable_sets": {"tf": 6.6332495807108}, "odfdo.Element.get_variable_set": {"tf": 7.0710678118654755}, "odfdo.Element.get_variable_set_value": {"tf": 9.433981132056603}, "odfdo.Element.get_user_field_decls": {"tf": 5}, "odfdo.Element.get_user_field_decl_list": {"tf": 5}, "odfdo.Element.get_user_field_decl": {"tf": 6.855654600401044}, "odfdo.Element.get_user_field_value": {"tf": 9.433981132056603}, "odfdo.Element.get_user_defined_list": {"tf": 5}, "odfdo.Element.get_user_defined": {"tf": 6.855654600401044}, "odfdo.Element.get_user_defined_value": {"tf": 9.433981132056603}, "odfdo.Element.get_draw_pages": {"tf": 8.12403840463596}, "odfdo.Element.get_draw_page": {"tf": 9}, "odfdo.Element.get_links": {"tf": 10.295630140987}, "odfdo.Element.get_link": {"tf": 11}, "odfdo.Element.get_bookmarks": {"tf": 5}, "odfdo.Element.get_bookmark": {"tf": 7.810249675906654}, "odfdo.Element.get_bookmark_starts": {"tf": 5}, "odfdo.Element.get_bookmark_start": {"tf": 7.810249675906654}, "odfdo.Element.get_bookmark_ends": {"tf": 5}, "odfdo.Element.get_bookmark_end": {"tf": 7.810249675906654}, "odfdo.Element.get_reference_marks_single": {"tf": 5}, "odfdo.Element.get_reference_mark_single": {"tf": 7.810249675906654}, "odfdo.Element.get_reference_mark_starts": {"tf": 5}, "odfdo.Element.get_reference_mark_start": {"tf": 7.810249675906654}, "odfdo.Element.get_reference_mark_ends": {"tf": 5}, "odfdo.Element.get_reference_mark_end": {"tf": 7.810249675906654}, "odfdo.Element.get_reference_marks": {"tf": 5}, "odfdo.Element.get_reference_mark": {"tf": 7.810249675906654}, "odfdo.Element.get_references": {"tf": 6.6332495807108}, "odfdo.Element.get_draw_groups": {"tf": 9.273618495495704}, "odfdo.Element.get_draw_group": {"tf": 11}, "odfdo.Element.get_draw_lines": {"tf": 9.273618495495704}, "odfdo.Element.get_draw_line": {"tf": 9}, "odfdo.Element.get_draw_rectangles": {"tf": 9.273618495495704}, "odfdo.Element.get_draw_rectangle": {"tf": 9}, "odfdo.Element.get_draw_ellipses": {"tf": 9.273618495495704}, "odfdo.Element.get_draw_ellipse": {"tf": 9}, "odfdo.Element.get_draw_connectors": {"tf": 9.273618495495704}, "odfdo.Element.get_draw_connector": {"tf": 9}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 5}, "odfdo.Element.get_tracked_changes": {"tf": 5}, "odfdo.Element.get_changes_ids": {"tf": 6.164414002968976}, "odfdo.Element.get_text_change_deletions": {"tf": 5}, "odfdo.Element.get_text_change_deletion": {"tf": 7.810249675906654}, "odfdo.Element.get_text_change_starts": {"tf": 5}, "odfdo.Element.get_text_change_start": {"tf": 7.810249675906654}, "odfdo.Element.get_text_change_ends": {"tf": 5}, "odfdo.Element.get_text_change_end": {"tf": 7.810249675906654}, "odfdo.Element.get_text_changes": {"tf": 5}, "odfdo.Element.get_text_change": {"tf": 7.810249675906654}, "odfdo.Element.get_tocs": {"tf": 5}, "odfdo.Element.get_toc": {"tf": 7.810249675906654}, "odfdo.Element.get_styles": {"tf": 6.6332495807108}, "odfdo.Element.get_style": {"tf": 9.38083151964686}, "odfdo.ElementTyped.set_value_and_type": {"tf": 9.327379053088816}, "odfdo.ElementTyped.get_value": {"tf": 9.273618495495704}, "odfdo.EllipseShape.__init__": {"tf": 11.61895003862225}, "odfdo.Frame.__init__": {"tf": 15.491933384829668}, "odfdo.Frame.image_frame": {"tf": 17.291616465790582}, "odfdo.Frame.text_frame": {"tf": 18.027756377319946}, "odfdo.Frame.get_image": {"tf": 10.04987562112089}, "odfdo.Frame.set_image": {"tf": 6.557438524302}, "odfdo.Frame.get_text_box": {"tf": 5}, "odfdo.Frame.set_text_box": {"tf": 9.695359714832659}, "odfdo.Frame.get_formatted_text": {"tf": 5.5677643628300215}, "odfdo.Header.__init__": {"tf": 10.954451150103322}, "odfdo.Header.get_formatted_text": {"tf": 6.708203932499369}, "odfdo.IndexTitle.__init__": {"tf": 10.723805294763608}, "odfdo.IndexTitle.set_title_text": {"tf": 6.244997998398398}, "odfdo.IndexTitleTemplate.__init__": {"tf": 5.744562646538029}, "odfdo.LineBreak.__init__": {"tf": 3.7416573867739413}, "odfdo.LineShape.__init__": {"tf": 11.61895003862225}, "odfdo.Link.__init__": {"tf": 12.529964086141668}, "odfdo.List.__init__": {"tf": 9.9498743710662}, "odfdo.List.get_items": {"tf": 6.6332495807108}, "odfdo.List.get_item": {"tf": 7.810249675906654}, "odfdo.List.set_list_header": {"tf": 8.12403840463596}, "odfdo.List.insert_item": {"tf": 11.357816691600547}, "odfdo.List.append_item": {"tf": 7.280109889280518}, "odfdo.List.get_formatted_text": {"tf": 5.5677643628300215}, "odfdo.ListItem.__init__": {"tf": 6.928203230275509}, "odfdo.Manifest.get_paths": {"tf": 6.164414002968976}, "odfdo.Manifest.get_path_medias": {"tf": 4.123105625617661}, "odfdo.Manifest.get_media_type": {"tf": 5}, "odfdo.Manifest.set_media_type": {"tf": 5.291502622129181}, "odfdo.Manifest.make_file_entry": {"tf": 5.656854249492381}, "odfdo.Manifest.add_full_path": {"tf": 6}, "odfdo.Manifest.del_full_path": {"tf": 4.47213595499958}, "odfdo.Meta.__init__": {"tf": 4.898979485566356}, "odfdo.Meta.get_meta_body": {"tf": 4.47213595499958}, "odfdo.Meta.get_title": {"tf": 4.123105625617661}, "odfdo.Meta.set_title": {"tf": 4.47213595499958}, "odfdo.Meta.get_description": {"tf": 4.123105625617661}, "odfdo.Meta.get_comments": {"tf": 4.123105625617661}, "odfdo.Meta.set_description": {"tf": 4.47213595499958}, "odfdo.Meta.set_comments": {"tf": 4.47213595499958}, "odfdo.Meta.get_subject": {"tf": 4.123105625617661}, "odfdo.Meta.set_subject": {"tf": 4.47213595499958}, "odfdo.Meta.get_language": {"tf": 4.123105625617661}, "odfdo.Meta.set_language": {"tf": 4.47213595499958}, "odfdo.Meta.get_modification_date": {"tf": 4.58257569495584}, "odfdo.Meta.set_modification_date": {"tf": 4.898979485566356}, "odfdo.Meta.get_creation_date": {"tf": 4.58257569495584}, "odfdo.Meta.set_creation_date": {"tf": 4.898979485566356}, "odfdo.Meta.get_initial_creator": {"tf": 4.123105625617661}, "odfdo.Meta.set_initial_creator": {"tf": 4.47213595499958}, "odfdo.Meta.get_creator": {"tf": 4.123105625617661}, "odfdo.Meta.set_creator": {"tf": 4.47213595499958}, "odfdo.Meta.get_keywords": {"tf": 4.123105625617661}, "odfdo.Meta.set_keywords": {"tf": 4.47213595499958}, "odfdo.Meta.get_editing_duration": {"tf": 4.58257569495584}, "odfdo.Meta.set_editing_duration": {"tf": 4.898979485566356}, "odfdo.Meta.get_editing_cycles": {"tf": 4.123105625617661}, "odfdo.Meta.set_editing_cycles": {"tf": 4.47213595499958}, "odfdo.Meta.get_generator": {"tf": 4.123105625617661}, "odfdo.Meta.set_generator": {"tf": 4.47213595499958}, "odfdo.Meta.set_generator_default": {"tf": 3.4641016151377544}, "odfdo.Meta.get_statistic": {"tf": 5.196152422706632}, "odfdo.Meta.set_statistic": {"tf": 5.477225575051661}, "odfdo.Meta.get_user_defined_metadata": {"tf": 5.0990195135927845}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 6.244997998398398}, "odfdo.Meta.set_user_defined_metadata": {"tf": 5.291502622129181}, "odfdo.NamedRange.__init__": {"tf": 10.246950765959598}, "odfdo.NamedRange.set_usage": {"tf": 5.5677643628300215}, "odfdo.NamedRange.set_table_name": {"tf": 4.47213595499958}, "odfdo.NamedRange.set_range": {"tf": 5.477225575051661}, "odfdo.NamedRange.get_values": {"tf": 8.831760866327848}, "odfdo.NamedRange.get_value": {"tf": 5.0990195135927845}, "odfdo.NamedRange.set_values": {"tf": 9.055385138137417}, "odfdo.NamedRange.set_value": {"tf": 9.055385138137417}, "odfdo.Note.__init__": {"tf": 9.591663046625438}, "odfdo.Note.check_validity": {"tf": 3.4641016151377544}, "odfdo.Paragraph.__init__": {"tf": 8.246211251235321}, "odfdo.Paragraph.insert_note": {"tf": 12.288205727444508}, "odfdo.Paragraph.insert_annotation": {"tf": 14.798648586948742}, "odfdo.Paragraph.insert_annotation_end": {"tf": 9.643650760992955}, "odfdo.Paragraph.set_reference_mark": {"tf": 10.862780491200215}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 9.643650760992955}, "odfdo.Paragraph.insert_variable": {"tf": 6.4031242374328485}, "odfdo.Paragraph.set_span": {"tf": 10.14889156509222}, "odfdo.Paragraph.remove_spans": {"tf": 6.244997998398398}, "odfdo.Paragraph.remove_span": {"tf": 7.810249675906654}, "odfdo.Paragraph.set_link": {"tf": 10.14889156509222}, "odfdo.Paragraph.remove_links": {"tf": 5}, "odfdo.Paragraph.remove_link": {"tf": 7.810249675906654}, "odfdo.Paragraph.insert_reference": {"tf": 11.269427669584644}, "odfdo.Paragraph.set_bookmark": {"tf": 12.68857754044952}, "odfdo.PageBreak": {"tf": 4.123105625617661}, "odfdo.RectangleShape.__init__": {"tf": 11.61895003862225}, "odfdo.Reference.__init__": {"tf": 6.782329983125268}, "odfdo.Reference.update": {"tf": 3.4641016151377544}, "odfdo.ReferenceMark.__init__": {"tf": 5.477225575051661}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 5.477225575051661}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 3.4641016151377544}, "odfdo.ReferenceMarkStart.__init__": {"tf": 5.477225575051661}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 3.4641016151377544}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 9.797958971132712}, "odfdo.ReferenceMarkStart.delete": {"tf": 7.483314773547883}, "odfdo.Row.__init__": {"tf": 8.660254037844387}, "odfdo.Row.traverse": {"tf": 8.602325267042627}, "odfdo.Row.get_cells": {"tf": 10.535653752852738}, "odfdo.Row.get_cell": {"tf": 6.855654600401044}, "odfdo.Row.get_value": {"tf": 8.06225774829855}, "odfdo.Row.set_cell": {"tf": 8.831760866327848}, "odfdo.Row.set_value": {"tf": 9.797958971132712}, "odfdo.Row.insert_cell": {"tf": 8.831760866327848}, "odfdo.Row.extend_cells": {"tf": 7.3484692283495345}, "odfdo.Row.append_cell": {"tf": 9.219544457292887}, "odfdo.Row.append": {"tf": 9.219544457292887}, "odfdo.Row.delete_cell": {"tf": 5}, "odfdo.Row.get_values": {"tf": 10.862780491200215}, "odfdo.Row.set_cells": {"tf": 9.9498743710662}, "odfdo.Row.set_values": {"tf": 10.535653752852738}, "odfdo.Row.rstrip": {"tf": 5.0990195135927845}, "odfdo.Row.is_empty": {"tf": 5.0990195135927845}, "odfdo.RowGroup.__init__": {"tf": 7.211102550927978}, "odfdo.Section.__init__": {"tf": 7.211102550927978}, "odfdo.Section.get_formatted_text": {"tf": 5.5677643628300215}, "odfdo.Spacer.__init__": {"tf": 5.291502622129181}, "odfdo.Span.__init__": {"tf": 7.211102550927978}, "odfdo.Style.__init__": {"tf": 26.210684844162312}, "odfdo.Style.get_properties": {"tf": 7.14142842854285}, "odfdo.Style.set_properties": {"tf": 10.344080432788601}, "odfdo.Style.del_properties": {"tf": 7.615773105863909}, "odfdo.Style.set_background": {"tf": 11.61895003862225}, "odfdo.Style.get_level_style": {"tf": 5.744562646538029}, "odfdo.Style.set_level_style": {"tf": 14.933184523068078}, "odfdo.Style.get_header_style": {"tf": 5}, "odfdo.Style.set_header_style": {"tf": 5.291502622129181}, "odfdo.Style.get_footer_style": {"tf": 5}, "odfdo.Style.set_footer_style": {"tf": 5.291502622129181}, "odfdo.Style.get_page_header": {"tf": 5}, "odfdo.Style.set_page_header": {"tf": 7.615773105863909}, "odfdo.Style.get_page_footer": {"tf": 5}, "odfdo.Style.set_page_footer": {"tf": 7.615773105863909}, "odfdo.Style.set_font": {"tf": 8.888194417315589}, "odfdo.Styles.get_styles": {"tf": 7.615773105863909}, "odfdo.Styles.get_style": {"tf": 9.38083151964686}, "odfdo.Styles.get_master_pages": {"tf": 5}, "odfdo.Styles.get_master_page": {"tf": 6.244997998398398}, "odfdo.TOC.__init__": {"tf": 11.832159566199232}, "odfdo.TOC.create_toc_source": {"tf": 7.211102550927978}, "odfdo.TOC.get_formatted_text": {"tf": 5.5677643628300215}, "odfdo.TOC.get_title": {"tf": 3.4641016151377544}, "odfdo.TOC.set_toc_title": {"tf": 7.874007874011811}, "odfdo.TOC.fill": {"tf": 7.483314773547883}, "odfdo.Tab.__init__": {"tf": 5.744562646538029}, "odfdo.TabStopStyle.__init__": {"tf": 13.96424004376894}, "odfdo.Table.__init__": {"tf": 13.601470508735444}, "odfdo.Table.append": {"tf": 5.744562646538029}, "odfdo.Table.get_formatted_text": {"tf": 5.5677643628300215}, "odfdo.Table.get_values": {"tf": 10.392304845413264}, "odfdo.Table.iter_values": {"tf": 10.295630140987}, "odfdo.Table.set_values": {"tf": 10.583005244258363}, "odfdo.Table.rstrip": {"tf": 5.0990195135927845}, "odfdo.Table.transpose": {"tf": 6.4031242374328485}, "odfdo.Table.is_empty": {"tf": 5.0990195135927845}, "odfdo.Table.traverse": {"tf": 8.602325267042627}, "odfdo.Table.get_rows": {"tf": 9.797958971132712}, "odfdo.Table.get_row": {"tf": 8.06225774829855}, "odfdo.Table.set_row": {"tf": 8.831760866327848}, "odfdo.Table.insert_row": {"tf": 8.831760866327848}, "odfdo.Table.extend_rows": {"tf": 6.6332495807108}, "odfdo.Table.append_row": {"tf": 9.219544457292887}, "odfdo.Table.delete_row": {"tf": 5}, "odfdo.Table.get_row_values": {"tf": 8.774964387392123}, "odfdo.Table.set_row_values": {"tf": 10.198039027185569}, "odfdo.Table.set_row_cells": {"tf": 7.211102550927978}, "odfdo.Table.is_row_empty": {"tf": 6.244997998398398}, "odfdo.Table.get_cells": {"tf": 10.862780491200215}, "odfdo.Table.get_cell": {"tf": 8.366600265340756}, "odfdo.Table.get_value": {"tf": 6.6332495807108}, "odfdo.Table.set_cell": {"tf": 9.1104335791443}, "odfdo.Table.set_cells": {"tf": 10.198039027185569}, "odfdo.Table.set_value": {"tf": 10.04987562112089}, "odfdo.Table.set_cell_image": {"tf": 8.306623862918075}, "odfdo.Table.insert_cell": {"tf": 9.1104335791443}, "odfdo.Table.append_cell": {"tf": 8.831760866327848}, "odfdo.Table.delete_cell": {"tf": 5.477225575051661}, "odfdo.Table.traverse_columns": {"tf": 8.602325267042627}, "odfdo.Table.get_columns": {"tf": 8.717797887081348}, "odfdo.Table.get_column": {"tf": 5.744562646538029}, "odfdo.Table.set_column": {"tf": 7.937253933193772}, "odfdo.Table.insert_column": {"tf": 7.937253933193772}, "odfdo.Table.append_column": {"tf": 8.366600265340756}, "odfdo.Table.delete_column": {"tf": 5}, "odfdo.Table.get_column_cells": {"tf": 10.954451150103322}, "odfdo.Table.get_column_values": {"tf": 9.273618495495704}, "odfdo.Table.set_column_cells": {"tf": 6.782329983125268}, "odfdo.Table.set_column_values": {"tf": 9.797958971132712}, "odfdo.Table.is_column_empty": {"tf": 6.244997998398398}, "odfdo.Table.get_named_ranges": {"tf": 7.483314773547883}, "odfdo.Table.get_named_range": {"tf": 5.291502622129181}, "odfdo.Table.set_named_range": {"tf": 9}, "odfdo.Table.delete_named_range": {"tf": 4.47213595499958}, "odfdo.Table.set_span": {"tf": 6.6332495807108}, "odfdo.Table.del_span": {"tf": 5.477225575051661}, "odfdo.Table.to_csv": {"tf": 7.681145747868608}, "odfdo.Text.__init__": {"tf": 6}, "odfdo.Text.is_text": {"tf": 3.4641016151377544}, "odfdo.Text.is_tail": {"tf": 3.4641016151377544}, "odfdo.TextChange.get_id": {"tf": 4.123105625617661}, "odfdo.TextChange.set_id": {"tf": 4.47213595499958}, "odfdo.TextChange.get_changed_region": {"tf": 7.3484692283495345}, "odfdo.TextChange.get_change_info": {"tf": 7.3484692283495345}, "odfdo.TextChange.get_change_element": {"tf": 7.3484692283495345}, "odfdo.TextChange.get_deleted": {"tf": 9.9498743710662}, "odfdo.TextChange.get_inserted": {"tf": 9.695359714832659}, "odfdo.TextChange.get_start": {"tf": 5}, "odfdo.TextChange.get_end": {"tf": 5}, "odfdo.TextChangeEnd.get_start": {"tf": 5}, "odfdo.TextChangeEnd.get_end": {"tf": 5}, "odfdo.TextChangeEnd.get_deleted": {"tf": 6.708203932499369}, "odfdo.TextChangeEnd.get_inserted": {"tf": 9.695359714832659}, "odfdo.TextChangeStart.get_start": {"tf": 4.47213595499958}, "odfdo.TextChangeStart.get_end": {"tf": 4.47213595499958}, "odfdo.TextChangeStart.delete": {"tf": 7.483314773547883}, "odfdo.TextChangedRegion.get_change_info": {"tf": 5}, "odfdo.TextChangedRegion.set_change_info": {"tf": 11.445523142259598}, "odfdo.TextChangedRegion.get_change_element": {"tf": 5}, "odfdo.TextChangedRegion.get_id": {"tf": 4.123105625617661}, "odfdo.TextChangedRegion.set_id": {"tf": 4.47213595499958}, "odfdo.TextDeletion.get_deleted": {"tf": 8.12403840463596}, "odfdo.TextDeletion.set_deleted": {"tf": 6.928203230275509}, "odfdo.TextDeletion.get_inserted": {"tf": 9.695359714832659}, "odfdo.TextInsertion.get_deleted": {"tf": 8.12403840463596}, "odfdo.TextInsertion.get_inserted": {"tf": 9.695359714832659}, "odfdo.TextInsertion.get_change_info": {"tf": 5}, "odfdo.TextInsertion.set_change_info": {"tf": 11.445523142259598}, "odfdo.TocEntryTemplate.__init__": {"tf": 7.416198487095663}, "odfdo.TocEntryTemplate.complete_defaults": {"tf": 3.4641016151377544}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 10.488088481701515}, "odfdo.TrackedChanges.get_changed_region": {"tf": 11.180339887498949}, "odfdo.UserDefined.__init__": {"tf": 11.61895003862225}, "odfdo.UserFieldDecl.__init__": {"tf": 8.366600265340756}, "odfdo.UserFieldDecl.set_value": {"tf": 4.47213595499958}, "odfdo.UserFieldGet.__init__": {"tf": 10.488088481701515}, "odfdo.VarChapter.__init__": {"tf": 7.54983443527075}, "odfdo.VarCreationDate.__init__": {"tf": 6.855654600401044}, "odfdo.VarCreationTime.__init__": {"tf": 6.855654600401044}, "odfdo.VarDate.__init__": {"tf": 10.862780491200215}, "odfdo.VarDecl.__init__": {"tf": 7.416198487095663}, "odfdo.VarFileName.__init__": {"tf": 7}, "odfdo.VarGet.__init__": {"tf": 10.488088481701515}, "odfdo.VarInitialCreator.__init__": {"tf": 5.291502622129181}, "odfdo.VarPageNumber.__init__": {"tf": 7.416198487095663}, "odfdo.VarSet.__init__": {"tf": 11.40175425099138}, "odfdo.VarSet.set_value": {"tf": 4.47213595499958}, "odfdo.VarTime.__init__": {"tf": 10.344080432788601}, "odfdo.XmlPart.__init__": {"tf": 5.291502622129181}, "odfdo.XmlPart.get_elements": {"tf": 6.928203230275509}, "odfdo.XmlPart.get_element": {"tf": 4.47213595499958}, "odfdo.XmlPart.delete_element": {"tf": 5.291502622129181}, "odfdo.XmlPart.xpath": {"tf": 6.928203230275509}, "odfdo.XmlPart.serialize": {"tf": 5.0990195135927845}, "odfdo.create_table_cell_style": {"tf": 16.911534525287763}, "odfdo.default_boolean_style": {"tf": 4.123105625617661}, "odfdo.default_currency_style": {"tf": 4.123105625617661}, "odfdo.default_date_style": {"tf": 4.123105625617661}, "odfdo.default_frame_position_style": {"tf": 10.04987562112089}, "odfdo.default_number_style": {"tf": 4.123105625617661}, "odfdo.default_percentage_style": {"tf": 4.123105625617661}, "odfdo.default_time_style": {"tf": 4.123105625617661}, "odfdo.default_toc_level_style": {"tf": 4.898979485566356}, "odfdo.hex2rgb": {"tf": 5.5677643628300215}, "odfdo.make_table_cell_border_string": {"tf": 9.1104335791443}, "odfdo.rgb2hex": {"tf": 6}}, "df": 447, "p": {"1": {"docs": {"odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}}, "df": 2}, "2": {"docs": {"odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}}, "df": 2}, "docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnimPar.__init__": {"tf": 1}, "odfdo.AnimSeq.__init__": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}}, "df": 9}}}}}}}}}, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Document.save": {"tf": 1}, "odfdo.Element.serialize": {"tf": 1}, "odfdo.XmlPart.serialize": {"tf": 1}}, "df": 3}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.Style.set_level_style": {"tf": 1}}, "df": 1}}}}, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Document.show_styles": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}}, "df": 3}}}}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.strip_tags": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TOC.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}}, "df": 2}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 2}}}, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.PageBreak": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1.4142135623730951}}, "df": 4}}}}}}, "t": {"docs": {"odfdo.XmlPart.__init__": {"tf": 1}}, "df": 1}}, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Container.__init__": {"tf": 1.4142135623730951}, "odfdo.Container.open": {"tf": 1.4142135623730951}, "odfdo.Container.get_part": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Container.del_part": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1.4142135623730951}, "odfdo.Document.save": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Manifest.make_file_entry": {"tf": 1}, "odfdo.Manifest.add_full_path": {"tf": 1}, "odfdo.Manifest.del_full_path": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1.4142135623730951}}, "df": 19, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {"odfdo.Container.__init__": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}}, "df": 8}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}}, "df": 3}}}}}, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Container.save": {"tf": 1}, "odfdo.Document.save": {"tf": 1}}, "df": 2}}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.VarPageNumber.__init__": {"tf": 1.4142135623730951}}, "df": 7}}, "d": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Style.__init__": {"tf": 2.23606797749979}, "odfdo.create_table_cell_style": {"tf": 2.23606797749979}}, "df": 2}}}}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.default_frame_position_style": {"tf": 1.4142135623730951}}, "df": 1, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.EllipseShape.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.List.insert_item": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Styles.get_master_page": {"tf": 1}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}}, "df": 56}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.ConnectorShape.__init__": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_font": {"tf": 1}}, "df": 2}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 10, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimPar.__init__": {"tf": 1}, "odfdo.AnimSeq.__init__": {"tf": 1}}, "df": 2}}, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimPar.__init__": {"tf": 2}, "odfdo.AnimSeq.__init__": {"tf": 1.4142135623730951}, "odfdo.AnimTransFilter.__init__": {"tf": 3.4641016151377544}, "odfdo.Annotation.__init__": {"tf": 3.1622776601683795}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1.7320508075688772}, "odfdo.Annotation.check_validity": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 2}, "odfdo.BackgroundImage.__init__": {"tf": 3.4641016151377544}, "odfdo.Cell.__init__": {"tf": 3.605551275463989}, "odfdo.Cell.set_value": {"tf": 3.1622776601683795}, "odfdo.ChangeInfo.__init__": {"tf": 2}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1.7320508075688772}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1.7320508075688772}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Column.__init__": {"tf": 2.449489742783178}, "odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.ConnectorShape.__init__": {"tf": 4}, "odfdo.Container.__init__": {"tf": 1.4142135623730951}, "odfdo.Container.open": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Container.del_part": {"tf": 1}, "odfdo.Container.save": {"tf": 2}, "odfdo.Content.get_styles": {"tf": 1.4142135623730951}, "odfdo.Content.get_style": {"tf": 2.23606797749979}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Document.save": {"tf": 1.7320508075688772}, "odfdo.Document.get_style": {"tf": 2.23606797749979}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 2.8284271247461903}, "odfdo.DrawGroup.__init__": {"tf": 3.7416573867739413}, "odfdo.DrawImage.__init__": {"tf": 1.4142135623730951}, "odfdo.DrawPage.__init__": {"tf": 3.1622776601683795}, "odfdo.DrawPage.set_transition": {"tf": 1.7320508075688772}, "odfdo.DrawPage.get_formatted_text": {"tf": 1.4142135623730951}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Element.get_element": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.set_attribute": {"tf": 1.4142135623730951}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.del_attribute": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.replace": {"tf": 1.4142135623730951}, "odfdo.Element.insert": {"tf": 2.23606797749979}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.delete": {"tf": 1.7320508075688772}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 2.23606797749979}, "odfdo.Element.clear": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1.4142135623730951}, "odfdo.Element.get_sections": {"tf": 2}, "odfdo.Element.get_section": {"tf": 1.7320508075688772}, "odfdo.Element.get_paragraphs": {"tf": 2}, "odfdo.Element.get_paragraph": {"tf": 1.7320508075688772}, "odfdo.Element.get_spans": {"tf": 2}, "odfdo.Element.get_span": {"tf": 1.7320508075688772}, "odfdo.Element.get_headers": {"tf": 2.449489742783178}, "odfdo.Element.get_header": {"tf": 2.23606797749979}, "odfdo.Element.get_lists": {"tf": 2}, "odfdo.Element.get_list": {"tf": 1.7320508075688772}, "odfdo.Element.get_frames": {"tf": 3.1622776601683795}, "odfdo.Element.get_frame": {"tf": 3.3166247903554}, "odfdo.Element.get_images": {"tf": 2.449489742783178}, "odfdo.Element.get_image": {"tf": 2.6457513110645907}, "odfdo.Element.get_tables": {"tf": 2}, "odfdo.Element.get_table": {"tf": 2.23606797749979}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 2}, "odfdo.Element.get_note": {"tf": 2.6457513110645907}, "odfdo.Element.get_annotations": {"tf": 2.8284271247461903}, "odfdo.Element.get_annotation": {"tf": 3.3166247903554}, "odfdo.Element.get_annotation_end": {"tf": 1.7320508075688772}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1.7320508075688772}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1.7320508075688772}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_pages": {"tf": 2}, "odfdo.Element.get_draw_page": {"tf": 2.23606797749979}, "odfdo.Element.get_links": {"tf": 2.8284271247461903}, "odfdo.Element.get_link": {"tf": 3}, "odfdo.Element.get_bookmark": {"tf": 1.7320508075688772}, "odfdo.Element.get_bookmark_start": {"tf": 1.7320508075688772}, "odfdo.Element.get_bookmark_end": {"tf": 1.7320508075688772}, "odfdo.Element.get_reference_mark_single": {"tf": 1.7320508075688772}, "odfdo.Element.get_reference_mark_start": {"tf": 1.7320508075688772}, "odfdo.Element.get_reference_mark_end": {"tf": 1.7320508075688772}, "odfdo.Element.get_reference_mark": {"tf": 1.7320508075688772}, "odfdo.Element.get_references": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_groups": {"tf": 2.449489742783178}, "odfdo.Element.get_draw_group": {"tf": 3}, "odfdo.Element.get_draw_lines": {"tf": 2.449489742783178}, "odfdo.Element.get_draw_line": {"tf": 2.23606797749979}, "odfdo.Element.get_draw_rectangles": {"tf": 2.449489742783178}, "odfdo.Element.get_draw_rectangle": {"tf": 2.23606797749979}, "odfdo.Element.get_draw_ellipses": {"tf": 2.449489742783178}, "odfdo.Element.get_draw_ellipse": {"tf": 2.23606797749979}, "odfdo.Element.get_draw_connectors": {"tf": 2.449489742783178}, "odfdo.Element.get_draw_connector": {"tf": 2.23606797749979}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1.7320508075688772}, "odfdo.Element.get_text_change_start": {"tf": 1.7320508075688772}, "odfdo.Element.get_text_change_end": {"tf": 1.7320508075688772}, "odfdo.Element.get_text_change": {"tf": 1.7320508075688772}, "odfdo.Element.get_toc": {"tf": 1.7320508075688772}, "odfdo.Element.get_styles": {"tf": 1.4142135623730951}, "odfdo.Element.get_style": {"tf": 2.23606797749979}, "odfdo.ElementTyped.set_value_and_type": {"tf": 2.6457513110645907}, "odfdo.ElementTyped.get_value": {"tf": 1.4142135623730951}, "odfdo.EllipseShape.__init__": {"tf": 3.4641016151377544}, "odfdo.Frame.__init__": {"tf": 4.242640687119285}, "odfdo.Frame.image_frame": {"tf": 4.47213595499958}, "odfdo.Frame.text_frame": {"tf": 4.47213595499958}, "odfdo.Frame.get_image": {"tf": 2.6457513110645907}, "odfdo.Frame.get_text_box": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1.4142135623730951}, "odfdo.Frame.get_formatted_text": {"tf": 1.4142135623730951}, "odfdo.Header.__init__": {"tf": 2.449489742783178}, "odfdo.Header.get_formatted_text": {"tf": 1.4142135623730951}, "odfdo.IndexTitle.__init__": {"tf": 3.1622776601683795}, "odfdo.IndexTitle.set_title_text": {"tf": 1.7320508075688772}, "odfdo.IndexTitleTemplate.__init__": {"tf": 1.4142135623730951}, "odfdo.LineShape.__init__": {"tf": 3.4641016151377544}, "odfdo.Link.__init__": {"tf": 3.605551275463989}, "odfdo.List.__init__": {"tf": 2}, "odfdo.List.get_items": {"tf": 1.4142135623730951}, "odfdo.List.get_item": {"tf": 1.7320508075688772}, "odfdo.List.set_list_header": {"tf": 1}, "odfdo.List.insert_item": {"tf": 2.8284271247461903}, "odfdo.List.append_item": {"tf": 1.4142135623730951}, "odfdo.List.get_formatted_text": {"tf": 1.4142135623730951}, "odfdo.ListItem.__init__": {"tf": 1.4142135623730951}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Manifest.add_full_path": {"tf": 1}, "odfdo.Manifest.del_full_path": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 2.8284271247461903}, "odfdo.NamedRange.set_usage": {"tf": 1.7320508075688772}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_values": {"tf": 2.6457513110645907}, "odfdo.NamedRange.set_value": {"tf": 2.6457513110645907}, "odfdo.Note.__init__": {"tf": 2.449489742783178}, "odfdo.Note.check_validity": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 2}, "odfdo.Paragraph.insert_note": {"tf": 3.3166247903554}, "odfdo.Paragraph.insert_annotation": {"tf": 3.7416573867739413}, "odfdo.Paragraph.insert_annotation_end": {"tf": 2}, "odfdo.Paragraph.set_reference_mark": {"tf": 2.449489742783178}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 2}, "odfdo.Paragraph.insert_variable": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_span": {"tf": 2}, "odfdo.Paragraph.set_link": {"tf": 2}, "odfdo.Paragraph.insert_reference": {"tf": 2.6457513110645907}, "odfdo.Paragraph.set_bookmark": {"tf": 2.8284271247461903}, "odfdo.RectangleShape.__init__": {"tf": 3.4641016151377544}, "odfdo.Reference.update": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1.7320508075688772}, "odfdo.Row.__init__": {"tf": 2.449489742783178}, "odfdo.Row.traverse": {"tf": 2}, "odfdo.Row.get_cells": {"tf": 2.8284271247461903}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1.4142135623730951}, "odfdo.Row.set_value": {"tf": 2.6457513110645907}, "odfdo.Row.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Row.extend_cells": {"tf": 1.7320508075688772}, "odfdo.Row.append_cell": {"tf": 2}, "odfdo.Row.append": {"tf": 2}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 2}, "odfdo.Row.set_cells": {"tf": 1.7320508075688772}, "odfdo.Row.set_values": {"tf": 2.6457513110645907}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 2}, "odfdo.Section.__init__": {"tf": 2}, "odfdo.Section.get_formatted_text": {"tf": 1.4142135623730951}, "odfdo.Span.__init__": {"tf": 2}, "odfdo.Style.__init__": {"tf": 7.745966692414834}, "odfdo.Style.get_properties": {"tf": 1.7320508075688772}, "odfdo.Style.set_properties": {"tf": 2.6457513110645907}, "odfdo.Style.del_properties": {"tf": 2.23606797749979}, "odfdo.Style.set_background": {"tf": 3.4641016151377544}, "odfdo.Style.get_level_style": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 4.358898943540674}, "odfdo.Style.get_header_style": {"tf": 1}, "odfdo.Style.set_header_style": {"tf": 1}, "odfdo.Style.get_footer_style": {"tf": 1}, "odfdo.Style.set_footer_style": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Style.set_font": {"tf": 2.23606797749979}, "odfdo.Styles.get_style": {"tf": 2.23606797749979}, "odfdo.Styles.get_master_page": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 2}, "odfdo.TOC.get_formatted_text": {"tf": 1.4142135623730951}, "odfdo.TOC.set_toc_title": {"tf": 2.23606797749979}, "odfdo.TOC.fill": {"tf": 1.7320508075688772}, "odfdo.Tab.__init__": {"tf": 1.4142135623730951}, "odfdo.TabStopStyle.__init__": {"tf": 4.242640687119285}, "odfdo.Table.__init__": {"tf": 3.4641016151377544}, "odfdo.Table.append": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 2}, "odfdo.Table.iter_values": {"tf": 2}, "odfdo.Table.set_values": {"tf": 3}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1.7320508075688772}, "odfdo.Table.traverse": {"tf": 2}, "odfdo.Table.get_rows": {"tf": 2.449489742783178}, "odfdo.Table.set_row": {"tf": 1.4142135623730951}, "odfdo.Table.insert_row": {"tf": 1.4142135623730951}, "odfdo.Table.extend_rows": {"tf": 1.7320508075688772}, "odfdo.Table.append_row": {"tf": 2}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_values": {"tf": 2.449489742783178}, "odfdo.Table.set_row_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_cells": {"tf": 2.8284271247461903}, "odfdo.Table.set_cell": {"tf": 1.4142135623730951}, "odfdo.Table.set_cells": {"tf": 1.7320508075688772}, "odfdo.Table.set_value": {"tf": 2.6457513110645907}, "odfdo.Table.set_cell_image": {"tf": 1.7320508075688772}, "odfdo.Table.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Table.append_cell": {"tf": 1.4142135623730951}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 2}, "odfdo.Table.get_columns": {"tf": 2}, "odfdo.Table.set_column": {"tf": 1.4142135623730951}, "odfdo.Table.insert_column": {"tf": 1.4142135623730951}, "odfdo.Table.append_column": {"tf": 2}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 2.6457513110645907}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 2.6457513110645907}, "odfdo.Table.get_named_ranges": {"tf": 1.4142135623730951}, "odfdo.Table.set_named_range": {"tf": 2.23606797749979}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1.4142135623730951}, "odfdo.TextChange.get_id": {"tf": 1}, "odfdo.TextChange.set_id": {"tf": 1}, "odfdo.TextChange.get_changed_region": {"tf": 1.7320508075688772}, "odfdo.TextChange.get_change_info": {"tf": 1.7320508075688772}, "odfdo.TextChange.get_change_element": {"tf": 1.7320508075688772}, "odfdo.TextChange.get_deleted": {"tf": 1.7320508075688772}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1.7320508075688772}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 3}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 3}, "odfdo.TocEntryTemplate.__init__": {"tf": 2}, "odfdo.TocEntryTemplate.complete_defaults": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 2.8284271247461903}, "odfdo.TrackedChanges.get_changed_region": {"tf": 3}, "odfdo.UserDefined.__init__": {"tf": 3}, "odfdo.UserFieldDecl.__init__": {"tf": 2.23606797749979}, "odfdo.UserFieldDecl.set_value": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 3}, "odfdo.VarChapter.__init__": {"tf": 1.7320508075688772}, "odfdo.VarCreationDate.__init__": {"tf": 1.4142135623730951}, "odfdo.VarCreationTime.__init__": {"tf": 1.4142135623730951}, "odfdo.VarDate.__init__": {"tf": 2.8284271247461903}, "odfdo.VarDecl.__init__": {"tf": 2}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 3}, "odfdo.VarPageNumber.__init__": {"tf": 2}, "odfdo.VarSet.__init__": {"tf": 3}, "odfdo.VarSet.set_value": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 2.449489742783178}, "odfdo.XmlPart.delete_element": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 5.0990195135927845}, "odfdo.make_table_cell_border_string": {"tf": 2.449489742783178}}, "df": 337}}, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1.4142135623730951}, "odfdo.Note.__init__": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_note": {"tf": 2.23606797749979}, "odfdo.Paragraph.insert_annotation": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}}, "df": 6}}}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.__init__": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Bookmark.__init__": {"tf": 1}, "odfdo.BookmarkEnd.__init__": {"tf": 1}, "odfdo.BookmarkStart.__init__": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1.4142135623730951}, "odfdo.Document.get_style": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1.4142135623730951}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.set_attribute": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.del_attribute": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1.4142135623730951}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Section.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.7320508075688772}, "odfdo.Style.set_font": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1.4142135623730951}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1.4142135623730951}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.UserFieldDecl.__init__": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarDecl.__init__": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}, "odfdo.XmlPart.__init__": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 85, "d": {"docs": {"odfdo.Element.append_named_range": {"tf": 1}}, "df": 1, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}}, "df": 2}}}}}}}}}, "e": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.Element.replace": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Style.set_header_style": {"tf": 1}, "odfdo.Style.set_footer_style": {"tf": 1}}, "df": 4}, "x": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Style.__init__": {"tf": 1}}, "df": 1}}}, "s": {"docs": {"odfdo.Element.serialize": {"tf": 1}}, "df": 1}, "u": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.Style.set_level_style": {"tf": 1}}, "df": 1, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Spacer.__init__": {"tf": 1}}, "df": 1, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Header.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}}, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimPar.__init__": {"tf": 1}, "odfdo.AnimSeq.__init__": {"tf": 1}, "odfdo.AnimTransFilter.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawPage.set_transition": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1.4142135623730951}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Manifest.make_file_entry": {"tf": 1}, "odfdo.Manifest.add_full_path": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1.4142135623730951}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.iter_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.UserFieldDecl.__init__": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1}, "odfdo.VarDecl.__init__": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}}, "df": 48}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.ElementTyped.get_value": {"tf": 1.4142135623730951}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 1.7320508075688772}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}}, "df": 7}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation.__init__": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.EllipseShape.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.set_text_box": {"tf": 1.4142135623730951}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1.4142135623730951}, "odfdo.IndexTitle.set_title_text": {"tf": 1.4142135623730951}, "odfdo.LineShape.__init__": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.TOC.set_toc_title": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1.4142135623730951}, "odfdo.Text.__init__": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 53, ":": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Element.strip_tags": {"tf": 1}}, "df": 1}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_start": {"tf": 1}}, "df": 3}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TextChange.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}}, "df": 3}}}}}}}}}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.new": {"tf": 1}}, "df": 1}}}}}}}, "r": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1.4142135623730951}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Document.show_styles": {"tf": 1.4142135623730951}, "odfdo.Element.get_between": {"tf": 1.4142135623730951}, "odfdo.Element.delete": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1.4142135623730951}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 40}}, "e": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.from_tag_for_clone": {"tf": 1}}, "df": 1}}, "y": {"docs": {"odfdo.ElementTyped.get_value": {"tf": 1}}, "df": 1}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TextChange.get_changed_region": {"tf": 1}, "odfdo.TextChange.get_change_info": {"tf": 1}, "odfdo.TextChange.get_change_element": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeStart.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}}, "df": 10}}}}}}, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 6}}, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Container.save": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}}, "df": 4}}}}, "g": {"1": {"docs": {"odfdo.Element.get_between": {"tf": 1}}, "df": 1}, "2": {"docs": {"odfdo.Element.get_between": {"tf": 1}}, "df": 1}, "docs": {"odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.make_etree_element": {"tf": 1}}, "df": 2}, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1.4142135623730951}, "odfdo.Table.insert_column": {"tf": 1.4142135623730951}, "odfdo.Table.append_column": {"tf": 1.4142135623730951}, "odfdo.Table.get_named_ranges": {"tf": 1.4142135623730951}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}}, "df": 11}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.VarTime.__init__": {"tf": 1.4142135623730951}}, "df": 1, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Cell.set_value": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}}, "df": 8}}}}}}}, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1.4142135623730951}, "odfdo.IndexTitle.set_title_text": {"tf": 1.4142135623730951}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1.4142135623730951}, "odfdo.TOC.create_toc_source": {"tf": 1.4142135623730951}, "odfdo.TOC.set_toc_title": {"tf": 1}}, "df": 13}}}}, "u": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ConnectorShape.__init__": {"tf": 2}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.EllipseShape.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}, "odfdo.LineShape.__init__": {"tf": 1.4142135623730951}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1.4142135623730951}, "odfdo.RectangleShape.__init__": {"tf": 1.4142135623730951}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.hex2rgb": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1}}, "df": 43}}}}, "o": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 3}}, "h": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 1}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimPar.__init__": {"tf": 1.4142135623730951}, "odfdo.AnimSeq.__init__": {"tf": 1}, "odfdo.AnimTransFilter.__init__": {"tf": 2.449489742783178}, "odfdo.Annotation.__init__": {"tf": 1.7320508075688772}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 2.449489742783178}, "odfdo.Bookmark.__init__": {"tf": 1}, "odfdo.BookmarkEnd.__init__": {"tf": 1}, "odfdo.BookmarkStart.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 2.23606797749979}, "odfdo.Cell.set_value": {"tf": 2.23606797749979}, "odfdo.ChangeInfo.__init__": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1.4142135623730951}, "odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.ConnectorShape.__init__": {"tf": 2}, "odfdo.Container.__init__": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Container.get_parts": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1.4142135623730951}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Container.del_part": {"tf": 1}, "odfdo.Container.save": {"tf": 1.4142135623730951}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1.7320508075688772}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1.4142135623730951}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1.4142135623730951}, "odfdo.Document.save": {"tf": 1.4142135623730951}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1.7320508075688772}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Document.show_styles": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 2}, "odfdo.DrawGroup.__init__": {"tf": 2.23606797749979}, "odfdo.DrawImage.__init__": {"tf": 2.23606797749979}, "odfdo.DrawPage.__init__": {"tf": 2.23606797749979}, "odfdo.DrawPage.set_transition": {"tf": 1.7320508075688772}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.make_etree_element": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.get_element": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1.4142135623730951}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1.4142135623730951}, "odfdo.Element.set_attribute": {"tf": 1.4142135623730951}, "odfdo.Element.set_style_attribute": {"tf": 1.4142135623730951}, "odfdo.Element.del_attribute": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1.4142135623730951}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.append": {"tf": 1.4142135623730951}, "odfdo.Element.strip_tags": {"tf": 1.7320508075688772}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.serialize": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1.4142135623730951}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1.4142135623730951}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1.4142135623730951}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1.7320508075688772}, "odfdo.Element.get_header": {"tf": 1.4142135623730951}, "odfdo.Element.get_lists": {"tf": 1.4142135623730951}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 2.23606797749979}, "odfdo.Element.get_frame": {"tf": 2.23606797749979}, "odfdo.Element.get_images": {"tf": 1.7320508075688772}, "odfdo.Element.get_image": {"tf": 1.7320508075688772}, "odfdo.Element.get_tables": {"tf": 1.4142135623730951}, "odfdo.Element.get_table": {"tf": 1.4142135623730951}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1.4142135623730951}, "odfdo.Element.get_note": {"tf": 1.7320508075688772}, "odfdo.Element.get_annotations": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation": {"tf": 1.7320508075688772}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1.7320508075688772}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1.7320508075688772}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_pages": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_page": {"tf": 1.4142135623730951}, "odfdo.Element.get_links": {"tf": 2}, "odfdo.Element.get_link": {"tf": 2}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_group": {"tf": 2}, "odfdo.Element.get_draw_lines": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_line": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_rectangles": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_rectangle": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_ellipses": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_ellipse": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_connectors": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_connector": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_styles": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1.7320508075688772}, "odfdo.ElementTyped.set_value_and_type": {"tf": 2}, "odfdo.ElementTyped.get_value": {"tf": 1.4142135623730951}, "odfdo.EllipseShape.__init__": {"tf": 2}, "odfdo.Frame.__init__": {"tf": 2.6457513110645907}, "odfdo.Frame.image_frame": {"tf": 3}, "odfdo.Frame.text_frame": {"tf": 3}, "odfdo.Frame.get_image": {"tf": 1.7320508075688772}, "odfdo.Frame.set_image": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1.7320508075688772}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1.4142135623730951}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 2.23606797749979}, "odfdo.IndexTitle.set_title_text": {"tf": 1.4142135623730951}, "odfdo.IndexTitleTemplate.__init__": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 2}, "odfdo.Link.__init__": {"tf": 2.6457513110645907}, "odfdo.List.__init__": {"tf": 1.7320508075688772}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1.4142135623730951}, "odfdo.List.insert_item": {"tf": 1}, "odfdo.List.append_item": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1.4142135623730951}, "odfdo.Manifest.set_media_type": {"tf": 1.4142135623730951}, "odfdo.Manifest.make_file_entry": {"tf": 1.4142135623730951}, "odfdo.Manifest.add_full_path": {"tf": 1.4142135623730951}, "odfdo.Manifest.del_full_path": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1.4142135623730951}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 2}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1.7320508075688772}, "odfdo.NamedRange.set_value": {"tf": 1.7320508075688772}, "odfdo.Note.__init__": {"tf": 2}, "odfdo.Paragraph.__init__": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_note": {"tf": 2.23606797749979}, "odfdo.Paragraph.insert_annotation": {"tf": 2.23606797749979}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 2}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_variable": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 2}, "odfdo.Paragraph.set_link": {"tf": 2}, "odfdo.Paragraph.insert_reference": {"tf": 2.23606797749979}, "odfdo.Paragraph.set_bookmark": {"tf": 2.23606797749979}, "odfdo.RectangleShape.__init__": {"tf": 2}, "odfdo.Reference.__init__": {"tf": 1.4142135623730951}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 2}, "odfdo.Row.get_value": {"tf": 1.4142135623730951}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 2}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 2}, "odfdo.Section.__init__": {"tf": 1.4142135623730951}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 5.5677643628300215}, "odfdo.Style.get_properties": {"tf": 1.7320508075688772}, "odfdo.Style.set_properties": {"tf": 1.7320508075688772}, "odfdo.Style.del_properties": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 2.449489742783178}, "odfdo.Style.set_level_style": {"tf": 2.449489742783178}, "odfdo.Style.set_page_header": {"tf": 1.4142135623730951}, "odfdo.Style.set_page_footer": {"tf": 1.4142135623730951}, "odfdo.Style.set_font": {"tf": 2}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1.7320508075688772}, "odfdo.TOC.__init__": {"tf": 2.23606797749979}, "odfdo.TOC.create_toc_source": {"tf": 1.7320508075688772}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.TOC.get_title": {"tf": 1}, "odfdo.TOC.set_toc_title": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.__init__": {"tf": 3}, "odfdo.Table.__init__": {"tf": 2}, "odfdo.Table.append": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.iter_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 2}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1.7320508075688772}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_values": {"tf": 2}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 2}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 2}, "odfdo.Table.set_cell_image": {"tf": 1.4142135623730951}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1.4142135623730951}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 2}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 2}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1.4142135623730951}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 2}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1.4142135623730951}, "odfdo.TextChange.get_id": {"tf": 1}, "odfdo.TextChange.set_id": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1.7320508075688772}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1.7320508075688772}, "odfdo.UserDefined.__init__": {"tf": 2}, "odfdo.UserFieldDecl.__init__": {"tf": 1.4142135623730951}, "odfdo.UserFieldGet.__init__": {"tf": 2}, "odfdo.VarChapter.__init__": {"tf": 1.4142135623730951}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1.4142135623730951}, "odfdo.VarDecl.__init__": {"tf": 1.4142135623730951}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 2}, "odfdo.VarPageNumber.__init__": {"tf": 1.4142135623730951}, "odfdo.VarSet.__init__": {"tf": 2.23606797749979}, "odfdo.VarTime.__init__": {"tf": 1.4142135623730951}, "odfdo.XmlPart.__init__": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1}, "odfdo.XmlPart.get_element": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 3.605551275463989}, "odfdo.default_frame_position_style": {"tf": 2.23606797749979}, "odfdo.hex2rgb": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 2}, "odfdo.rgb2hex": {"tf": 1.4142135623730951}}, "df": 323, "i": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Element.strip_tags": {"tf": 1}}, "df": 1}}}, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1.4142135623730951}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.ConnectorShape.__init__": {"tf": 1.4142135623730951}, "odfdo.Content.get_styles": {"tf": 1.4142135623730951}, "odfdo.Content.get_style": {"tf": 1.4142135623730951}, "odfdo.Document.get_styles": {"tf": 1.4142135623730951}, "odfdo.Document.get_style": {"tf": 2}, "odfdo.Document.insert_style": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.__init__": {"tf": 1.4142135623730951}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_rectangles": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_ellipses": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_connectors": {"tf": 1.4142135623730951}, "odfdo.EllipseShape.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.7320508075688772}, "odfdo.Frame.set_text_box": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1.4142135623730951}, "odfdo.IndexTitle.set_title_text": {"tf": 1}, "odfdo.IndexTitleTemplate.__init__": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1.4142135623730951}, "odfdo.Link.__init__": {"tf": 1.4142135623730951}, "odfdo.List.__init__": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1.4142135623730951}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Section.__init__": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.7320508075688772}, "odfdo.Style.set_properties": {"tf": 1.7320508075688772}, "odfdo.Style.get_level_style": {"tf": 1.4142135623730951}, "odfdo.Style.set_level_style": {"tf": 2.23606797749979}, "odfdo.Style.set_header_style": {"tf": 1.7320508075688772}, "odfdo.Style.get_footer_style": {"tf": 1.4142135623730951}, "odfdo.Style.set_footer_style": {"tf": 1.7320508075688772}, "odfdo.Styles.get_style": {"tf": 2}, "odfdo.TOC.__init__": {"tf": 1.7320508075688772}, "odfdo.TOC.create_toc_source": {"tf": 1.4142135623730951}, "odfdo.TOC.set_toc_title": {"tf": 1.4142135623730951}, "odfdo.TabStopStyle.__init__": {"tf": 2.23606797749979}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.default_frame_position_style": {"tf": 1.4142135623730951}, "odfdo.default_toc_level_style": {"tf": 1.4142135623730951}}, "df": 80, "s": {"docs": {"odfdo.TOC.fill": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.insert": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 10}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.Meta.set_statistic": {"tf": 1}}, "df": 1}}}}}}}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.AnimPar.__init__": {"tf": 1}, "odfdo.AnimTransFilter.__init__": {"tf": 2.449489742783178}, "odfdo.DrawPage.set_transition": {"tf": 1}}, "df": 3}}}, "u": {"docs": {}, "df": 0, "b": {"docs": {"odfdo.Element.strip_elements": {"tf": 1}}, "df": 1, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimTransFilter.__init__": {"tf": 1}, "odfdo.DrawPage.set_transition": {"tf": 1}}, "df": 2}}}}, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Meta.set_subject": {"tf": 1}}, "df": 1}}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Header.__init__": {"tf": 1}}, "df": 1}}}}}}, "f": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.Style.set_level_style": {"tf": 1}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "f": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.Annotation.check_validity": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.is_empty": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Column.get_default_cell_style": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Container.get_parts": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Container.del_part": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Document.show_styles": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.DrawPage.set_transition": {"tf": 1}, "odfdo.DrawPage.get_shapes": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.get_element": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.set_attribute": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.del_attribute": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.clear": {"tf": 1}, "odfdo.Element.serialize": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_styles": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Frame.set_image": {"tf": 1}, "odfdo.Frame.get_text_box": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.IndexTitle.set_title_text": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1}, "odfdo.List.insert_item": {"tf": 1}, "odfdo.List.append_item": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Manifest.add_full_path": {"tf": 1}, "odfdo.Manifest.del_full_path": {"tf": 1}, "odfdo.Meta.get_meta_body": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Note.check_validity": {"tf": 1}, "odfdo.Paragraph.insert_note": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_variable": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.extend_cells": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.get_level_style": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Style.get_header_style": {"tf": 1}, "odfdo.Style.set_header_style": {"tf": 1}, "odfdo.Style.get_footer_style": {"tf": 1}, "odfdo.Style.set_footer_style": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Style.set_font": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Styles.get_master_pages": {"tf": 1}, "odfdo.Styles.get_master_page": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.TOC.get_title": {"tf": 1}, "odfdo.TOC.set_toc_title": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.append": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.Text.is_text": {"tf": 1}, "odfdo.Text.is_tail": {"tf": 1}, "odfdo.TextChange.get_id": {"tf": 1}, "odfdo.TextChange.set_id": {"tf": 1}, "odfdo.TextChange.get_changed_region": {"tf": 1}, "odfdo.TextChange.get_change_info": {"tf": 1}, "odfdo.TextChange.get_change_element": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TocEntryTemplate.complete_defaults": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}, "odfdo.UserFieldDecl.set_value": {"tf": 1}, "odfdo.VarSet.set_value": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1}, "odfdo.XmlPart.get_element": {"tf": 1}, "odfdo.XmlPart.delete_element": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}, "odfdo.XmlPart.serialize": {"tf": 1}}, "df": 360}, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarPageNumber.__init__": {"tf": 1}}, "df": 1}}}}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.ConnectorShape.__init__": {"tf": 1}}, "df": 1}}}, "d": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.Style.__init__": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 2}}}}, "o": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.DrawImage.__init__": {"tf": 1}}, "df": 1}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}}, "df": 2}}}}, "z": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.EllipseShape.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}}, "df": 5}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Paragraph.set_span": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Paragraph.remove_span": {"tf": 1}}, "df": 1}}}}, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Table.append": {"tf": 1}}, "df": 1}}}}}}}}}, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnimPar.__init__": {"tf": 1}}, "df": 1}}}, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.List.insert_item": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 8}}}}}, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1.7320508075688772}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.is_empty": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.save": {"tf": 1.4142135623730951}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Document.show_styles": {"tf": 1.7320508075688772}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.set_attribute": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.7320508075688772}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.serialize": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1.4142135623730951}, "odfdo.Header.__init__": {"tf": 1.4142135623730951}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1.7320508075688772}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 2}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.7320508075688772}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.7320508075688772}, "odfdo.Table.get_values": {"tf": 1.7320508075688772}, "odfdo.Table.iter_values": {"tf": 1.4142135623730951}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_row": {"tf": 1.4142135623730951}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.is_row_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1.4142135623730951}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.is_column_empty": {"tf": 1.4142135623730951}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.Text.is_text": {"tf": 1}, "odfdo.Text.is_tail": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1.7320508075688772}, "odfdo.TextChange.get_inserted": {"tf": 1.7320508075688772}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.7320508075688772}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.get_inserted": {"tf": 1.7320508075688772}, "odfdo.TextInsertion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1.7320508075688772}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarInitialCreator.__init__": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}, "odfdo.XmlPart.serialize": {"tf": 1}}, "df": 86}}, "d": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Note.__init__": {"tf": 1}, "odfdo.Paragraph.insert_note": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}}, "df": 3}}, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Style.__init__": {"tf": 1}}, "df": 1}}, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Style.__init__": {"tf": 2.23606797749979}, "odfdo.create_table_cell_style": {"tf": 2.23606797749979}}, "df": 2}}}}, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 2}}}}}, "y": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Cell.set_value": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.XmlPart.serialize": {"tf": 1}}, "df": 8, "i": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.Container.__init__": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.save": {"tf": 1}}, "df": 6}}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Container.save": {"tf": 1}, "odfdo.Document.save": {"tf": 1}}, "df": 2}}, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Style.__init__": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 2}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Style.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Style.set_level_style": {"tf": 1}}, "df": 1}}}}}}, "k": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.AnimPar.__init__": {"tf": 1}, "odfdo.AnimSeq.__init__": {"tf": 1}, "odfdo.AnimTransFilter.__init__": {"tf": 1}, "odfdo.Annotation.__init__": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Bookmark.__init__": {"tf": 1}, "odfdo.BookmarkEnd.__init__": {"tf": 1}, "odfdo.BookmarkStart.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.ChangeInfo.__init__": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.__init__": {"tf": 1}, "odfdo.EllipseShape.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1}, "odfdo.IndexTitleTemplate.__init__": {"tf": 1}, "odfdo.LineBreak.__init__": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Meta.__init__": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.Note.__init__": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Section.__init__": {"tf": 1}, "odfdo.Spacer.__init__": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.UserFieldDecl.__init__": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarDecl.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1}, "odfdo.VarInitialCreator.__init__": {"tf": 1}, "odfdo.VarPageNumber.__init__": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}}, "df": 66}}}}}, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 6}}, "y": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1, "w": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Meta.set_keywords": {"tf": 1}}, "df": 1}}}}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}}, "df": 1}}}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.AnimPar.__init__": {"tf": 1}, "odfdo.AnimSeq.__init__": {"tf": 1}, "odfdo.AnimTransFilter.__init__": {"tf": 1}, "odfdo.Annotation.__init__": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Bookmark.__init__": {"tf": 1}, "odfdo.BookmarkEnd.__init__": {"tf": 1}, "odfdo.BookmarkStart.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.__init__": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.__init__": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1.4142135623730951}, "odfdo.EllipseShape.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1}, "odfdo.IndexTitleTemplate.__init__": {"tf": 1}, "odfdo.LineBreak.__init__": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Meta.__init__": {"tf": 1.4142135623730951}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Note.__init__": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1.4142135623730951}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.7320508075688772}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Section.__init__": {"tf": 1}, "odfdo.Spacer.__init__": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1.4142135623730951}, "odfdo.UserFieldDecl.__init__": {"tf": 1.4142135623730951}, "odfdo.UserFieldDecl.set_value": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1.4142135623730951}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarDecl.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1.4142135623730951}, "odfdo.VarInitialCreator.__init__": {"tf": 1}, "odfdo.VarPageNumber.__init__": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1.4142135623730951}, "odfdo.VarSet.set_value": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}, "odfdo.XmlPart.get_element": {"tf": 1}}, "df": 85}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.7320508075688772}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}}, "df": 3, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Paragraph.insert_annotation_end": {"tf": 1}}, "df": 1}}}}}}}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.DrawGroup.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}}, "df": 4}}}}}, "s": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 10}, "g": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.is_empty": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 7}}}}}}}}}, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.show_styles": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1}}, "df": 4}}}}}}}}, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawImage.__init__": {"tf": 1}}, "df": 1}}}}}}, "b": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.Element.extend": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.extend_cells": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 12}}, "f": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.List.insert_item": {"tf": 1}, "odfdo.Paragraph.insert_note": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_variable": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 10}}}}, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Meta.__init__": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}}, "df": 2}}, "e": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}}, "df": 6}}}, "d": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarPageNumber.__init__": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}}, "df": 3}}}}}}, "d": {"docs": {"odfdo.TOC.__init__": {"tf": 1}}, "df": 1, "u": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimTransFilter.__init__": {"tf": 1}, "odfdo.DrawPage.set_transition": {"tf": 1}}, "df": 2, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Meta.set_editing_duration": {"tf": 1}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnimTransFilter.__init__": {"tf": 1}}, "df": 1}}}}}}}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}}, "df": 13}}}}}, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1.4142135623730951}, "odfdo.Style.set_properties": {"tf": 1.4142135623730951}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}}, "df": 14}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Table.to_csv": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.__init__": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.ChangeInfo.__init__": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation": {"tf": 1.4142135623730951}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1.4142135623730951}}, "df": 14, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.set_value": {"tf": 2}, "odfdo.ChangeInfo.__init__": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotations": {"tf": 2}, "odfdo.Element.get_annotation": {"tf": 2}, "odfdo.Element.get_variable_set_value": {"tf": 1.7320508075688772}, "odfdo.Element.get_user_field_value": {"tf": 1.7320508075688772}, "odfdo.Element.get_user_defined_value": {"tf": 1.7320508075688772}, "odfdo.Meta.get_modification_date": {"tf": 1.4142135623730951}, "odfdo.Meta.set_modification_date": {"tf": 1.4142135623730951}, "odfdo.Meta.get_creation_date": {"tf": 1.4142135623730951}, "odfdo.Meta.set_creation_date": {"tf": 1.4142135623730951}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.set_change_info": {"tf": 1.4142135623730951}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1.4142135623730951}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1.4142135623730951}, "odfdo.VarDate.__init__": {"tf": 1.7320508075688772}, "odfdo.VarTime.__init__": {"tf": 1.7320508075688772}}, "df": 22}}}}}, "a": {"docs": {"odfdo.Container.set_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}}, "df": 7}}}, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Cell.set_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_set_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_field_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_defined_value": {"tf": 1.4142135623730951}}, "df": 4}}}}}, "f": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Column.__init__": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}}, "df": 4}}}}}, "s": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}}, "df": 6}}}}}}}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_rectangles": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_ellipses": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_connectors": {"tf": 1.4142135623730951}, "odfdo.EllipseShape.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}}, "df": 13}}}, "o": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.Table.set_cell_image": {"tf": 1}}, "df": 1, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.new": {"tf": 1.4142135623730951}, "odfdo.Document.merge_styles_from": {"tf": 1.7320508075688772}, "odfdo.TOC.fill": {"tf": 1.7320508075688772}, "odfdo.UserDefined.__init__": {"tf": 1.7320508075688772}}, "df": 4}}}}}}}}, "f": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimTransFilter.__init__": {"tf": 1}}, "df": 1}}}}}}}, "l": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Cell.is_empty": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.save": {"tf": 1.4142135623730951}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Document.show_styles": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.serialize": {"tf": 1.4142135623730951}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1.4142135623730951}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1.4142135623730951}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.7320508075688772}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.7320508075688772}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextChange.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarInitialCreator.__init__": {"tf": 1}, "odfdo.VarSet.__init__": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}, "odfdo.XmlPart.serialize": {"tf": 1}}, "df": 51}}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.get_styles": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.7320508075688772}, "odfdo.Style.set_font": {"tf": 1.4142135623730951}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}}, "df": 10}}}}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}}, "df": 3}}}, "e": {"docs": {"odfdo.Container.open": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}}, "df": 3}}, "x": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.VarCreationDate.__init__": {"tf": 1}, "odfdo.VarCreationTime.__init__": {"tf": 1}, "odfdo.VarDate.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarInitialCreator.__init__": {"tf": 1}, "odfdo.VarTime.__init__": {"tf": 1}}, "df": 6}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}}, "df": 2}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}}, "df": 3}}}}, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Note.__init__": {"tf": 1}, "odfdo.Paragraph.insert_note": {"tf": 1}}, "df": 2}}}}}}, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Style.__init__": {"tf": 2}}, "df": 1}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Cell.set_value": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 5}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}}, "df": 3}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Link.__init__": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1.7320508075688772}}, "df": 2, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.default_frame_position_style": {"tf": 1}}, "df": 1}}}}}}}}}}}, "o": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1.4142135623730951}}, "df": 2}}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Manifest.make_file_entry": {"tf": 1}, "odfdo.Manifest.add_full_path": {"tf": 1}, "odfdo.Manifest.del_full_path": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}}, "df": 6}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimTransFilter.__init__": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}}, "df": 2}}}, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 2}}}}, "r": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Paragraph.set_reference_mark_end": {"tf": 1}}, "df": 1}}, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}}, "df": 2}}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Manifest.make_file_entry": {"tf": 1}, "odfdo.Manifest.add_full_path": {"tf": 1}}, "df": 3}}}, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.set_span": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Style.__init__": {"tf": 1}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Annotation.__init__": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.set_image": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}}, "df": 19}, "d": {"docs": {}, "df": 0, "f": {"docs": {"odfdo.Element.extend": {"tf": 1}}, "df": 1, "d": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.Annotation.__init__": {"tf": 1.4142135623730951}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.Column.set_default_cell_style": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1.4142135623730951}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.get_styles": {"tf": 1.4142135623730951}, "odfdo.Document.get_style": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.DrawPage.get_shapes": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.get_element": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.7320508075688772}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1.4142135623730951}, "odfdo.Element.strip_elements": {"tf": 1.7320508075688772}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.xpath": {"tf": 1.4142135623730951}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_styles": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1.4142135623730951}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.7320508075688772}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Frame.set_image": {"tf": 1.4142135623730951}, "odfdo.Frame.get_text_box": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1.7320508075688772}, "odfdo.List.__init__": {"tf": 1.4142135623730951}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1.4142135623730951}, "odfdo.List.insert_item": {"tf": 2}, "odfdo.List.append_item": {"tf": 1.4142135623730951}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1.4142135623730951}, "odfdo.Manifest.make_file_entry": {"tf": 1}, "odfdo.Meta.get_meta_body": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Paragraph.insert_note": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation": {"tf": 2}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_variable": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1.7320508075688772}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1.7320508075688772}, "odfdo.PageBreak": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1.4142135623730951}, "odfdo.Row.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Row.extend_cells": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1.4142135623730951}, "odfdo.Row.append": {"tf": 1.4142135623730951}, "odfdo.Row.set_cells": {"tf": 1.4142135623730951}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.get_level_style": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1.4142135623730951}, "odfdo.Style.get_header_style": {"tf": 1}, "odfdo.Style.set_header_style": {"tf": 1}, "odfdo.Style.get_footer_style": {"tf": 1}, "odfdo.Style.set_footer_style": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1.4142135623730951}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1.4142135623730951}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1.4142135623730951}, "odfdo.Styles.get_master_pages": {"tf": 1}, "odfdo.Styles.get_master_page": {"tf": 1}, "odfdo.TOC.create_toc_source": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.append": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1.4142135623730951}, "odfdo.Table.insert_row": {"tf": 1.4142135623730951}, "odfdo.Table.extend_rows": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1.4142135623730951}, "odfdo.Table.set_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Table.append_cell": {"tf": 1.4142135623730951}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1.4142135623730951}, "odfdo.Table.insert_column": {"tf": 1.4142135623730951}, "odfdo.Table.append_column": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.TextChange.get_changed_region": {"tf": 1.4142135623730951}, "odfdo.TextChange.get_change_info": {"tf": 1.4142135623730951}, "odfdo.TextChange.get_change_element": {"tf": 1.4142135623730951}, "odfdo.TextChange.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextChange.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextChangeStart.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1.7320508075688772}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1.7320508075688772}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1}, "odfdo.XmlPart.__init__": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1.4142135623730951}, "odfdo.XmlPart.delete_element": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1.4142135623730951}, "odfdo.create_table_cell_style": {"tf": 1}, "odfdo.default_boolean_style": {"tf": 1}, "odfdo.default_currency_style": {"tf": 1}, "odfdo.default_date_style": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}, "odfdo.default_number_style": {"tf": 1}, "odfdo.default_percentage_style": {"tf": 1}, "odfdo.default_time_style": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 237}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}}, "df": 2}}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Style.__init__": {"tf": 1}}, "df": 1}}}}}}, "n": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.DrawImage.__init__": {"tf": 1}}, "df": 1}}}}}, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.replace_element": {"tf": 1}}, "df": 1}}, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.TOC.create_toc_source": {"tf": 1}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}}, "df": 6}}}}}}, "f": {"docs": {"odfdo.TOC.__init__": {"tf": 1}}, "df": 1, "f": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}}, "df": 2}}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.Element.from_tag": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation.__init__": {"tf": 2.23606797749979}, "odfdo.Annotation.get_annotated": {"tf": 1.4142135623730951}, "odfdo.Annotation.delete": {"tf": 1.4142135623730951}, "odfdo.AnnotationEnd.__init__": {"tf": 1.4142135623730951}, "odfdo.Column.set_default_cell_style": {"tf": 1.4142135623730951}, "odfdo.Content.get_style": {"tf": 1.7320508075688772}, "odfdo.Document.get_styles": {"tf": 1.4142135623730951}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1.4142135623730951}, "odfdo.DrawPage.get_shapes": {"tf": 1.4142135623730951}, "odfdo.Element.from_tag": {"tf": 1.7320508075688772}, "odfdo.Element.from_tag_for_clone": {"tf": 2}, "odfdo.Element.make_etree_element": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1.4142135623730951}, "odfdo.Element.get_element": {"tf": 1.4142135623730951}, "odfdo.Element.set_style_attribute": {"tf": 1.4142135623730951}, "odfdo.Element.index": {"tf": 1.4142135623730951}, "odfdo.Element.get_between": {"tf": 2.449489742783178}, "odfdo.Element.insert": {"tf": 1.7320508075688772}, "odfdo.Element.extend": {"tf": 1.4142135623730951}, "odfdo.Element.append": {"tf": 1.7320508075688772}, "odfdo.Element.delete": {"tf": 1.4142135623730951}, "odfdo.Element.replace_element": {"tf": 2.449489742783178}, "odfdo.Element.strip_elements": {"tf": 2.449489742783178}, "odfdo.Element.strip_tags": {"tf": 1.4142135623730951}, "odfdo.Element.xpath": {"tf": 1.7320508075688772}, "odfdo.Element.get_styled_elements": {"tf": 1.4142135623730951}, "odfdo.Element.get_sections": {"tf": 1.4142135623730951}, "odfdo.Element.get_section": {"tf": 1.4142135623730951}, "odfdo.Element.get_paragraphs": {"tf": 1.4142135623730951}, "odfdo.Element.get_paragraph": {"tf": 1.4142135623730951}, "odfdo.Element.get_spans": {"tf": 1.4142135623730951}, "odfdo.Element.get_span": {"tf": 1.4142135623730951}, "odfdo.Element.get_headers": {"tf": 1.4142135623730951}, "odfdo.Element.get_header": {"tf": 1.4142135623730951}, "odfdo.Element.get_lists": {"tf": 1.4142135623730951}, "odfdo.Element.get_list": {"tf": 1.4142135623730951}, "odfdo.Element.get_frames": {"tf": 1.4142135623730951}, "odfdo.Element.get_frame": {"tf": 1.4142135623730951}, "odfdo.Element.get_images": {"tf": 1.4142135623730951}, "odfdo.Element.get_image": {"tf": 1.4142135623730951}, "odfdo.Element.get_tables": {"tf": 1.4142135623730951}, "odfdo.Element.get_table": {"tf": 1.4142135623730951}, "odfdo.Element.get_named_ranges": {"tf": 1.4142135623730951}, "odfdo.Element.get_named_range": {"tf": 1.4142135623730951}, "odfdo.Element.append_named_range": {"tf": 1.4142135623730951}, "odfdo.Element.get_notes": {"tf": 1.4142135623730951}, "odfdo.Element.get_note": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotations": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_decls": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_decl_list": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_decl": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_sets": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_set": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_field_decls": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_field_decl_list": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_field_decl": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_defined_list": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_defined": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_pages": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_page": {"tf": 1.4142135623730951}, "odfdo.Element.get_links": {"tf": 1.4142135623730951}, "odfdo.Element.get_link": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmarks": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmark": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmark_starts": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmark_start": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmark_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmark_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_marks_single": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_single": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_starts": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_start": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_marks": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Element.get_references": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_groups": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_group": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_lines": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_line": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_rectangles": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_rectangle": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_ellipses": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_ellipse": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_connectors": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_connector": {"tf": 1.4142135623730951}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1.4142135623730951}, "odfdo.Element.get_tracked_changes": {"tf": 1.4142135623730951}, "odfdo.Element.get_changes_ids": {"tf": 1.7320508075688772}, "odfdo.Element.get_text_change_deletions": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_deletion": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_starts": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_start": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_changes": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change": {"tf": 1.4142135623730951}, "odfdo.Element.get_tocs": {"tf": 1.4142135623730951}, "odfdo.Element.get_toc": {"tf": 1.4142135623730951}, "odfdo.Element.get_styles": {"tf": 1.4142135623730951}, "odfdo.Element.get_style": {"tf": 2.23606797749979}, "odfdo.Frame.image_frame": {"tf": 2}, "odfdo.Frame.text_frame": {"tf": 2.6457513110645907}, "odfdo.Frame.get_image": {"tf": 1.4142135623730951}, "odfdo.Frame.set_image": {"tf": 2.23606797749979}, "odfdo.Frame.get_text_box": {"tf": 1.4142135623730951}, "odfdo.Frame.set_text_box": {"tf": 2.6457513110645907}, "odfdo.List.__init__": {"tf": 2}, "odfdo.List.get_items": {"tf": 1.4142135623730951}, "odfdo.List.get_item": {"tf": 1.4142135623730951}, "odfdo.List.set_list_header": {"tf": 2.23606797749979}, "odfdo.List.insert_item": {"tf": 2.449489742783178}, "odfdo.List.append_item": {"tf": 1.4142135623730951}, "odfdo.ListItem.__init__": {"tf": 1.7320508075688772}, "odfdo.Manifest.get_paths": {"tf": 1.7320508075688772}, "odfdo.Manifest.make_file_entry": {"tf": 1.4142135623730951}, "odfdo.Meta.get_meta_body": {"tf": 1.4142135623730951}, "odfdo.Paragraph.__init__": {"tf": 1.7320508075688772}, "odfdo.Paragraph.insert_note": {"tf": 1.7320508075688772}, "odfdo.Paragraph.insert_annotation": {"tf": 2.23606797749979}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 2}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_variable": {"tf": 1.7320508075688772}, "odfdo.Paragraph.remove_spans": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_span": {"tf": 2.449489742783178}, "odfdo.Paragraph.set_link": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_links": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_link": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_bookmark": {"tf": 2.449489742783178}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.delete": {"tf": 1.4142135623730951}, "odfdo.Style.get_header_style": {"tf": 1.4142135623730951}, "odfdo.Style.get_page_header": {"tf": 1.4142135623730951}, "odfdo.Style.set_page_header": {"tf": 2.23606797749979}, "odfdo.Style.get_page_footer": {"tf": 1.4142135623730951}, "odfdo.Style.set_page_footer": {"tf": 2.23606797749979}, "odfdo.Styles.get_styles": {"tf": 1.4142135623730951}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Styles.get_master_pages": {"tf": 1.4142135623730951}, "odfdo.Styles.get_master_page": {"tf": 1.4142135623730951}, "odfdo.TOC.create_toc_source": {"tf": 1.4142135623730951}, "odfdo.Table.append": {"tf": 1.4142135623730951}, "odfdo.TextChange.get_changed_region": {"tf": 2}, "odfdo.TextChange.get_change_info": {"tf": 2}, "odfdo.TextChange.get_change_element": {"tf": 2}, "odfdo.TextChange.get_deleted": {"tf": 2}, "odfdo.TextChange.get_inserted": {"tf": 2}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextChangeEnd.get_inserted": {"tf": 2}, "odfdo.TextChangeStart.delete": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion.set_change_info": {"tf": 2.449489742783178}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.set_deleted": {"tf": 2}, "odfdo.TextDeletion.get_inserted": {"tf": 2}, "odfdo.TextInsertion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 2}, "odfdo.TextInsertion.get_change_info": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.set_change_info": {"tf": 2.449489742783178}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1.4142135623730951}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1.4142135623730951}, "odfdo.XmlPart.get_elements": {"tf": 1.7320508075688772}, "odfdo.XmlPart.delete_element": {"tf": 1.4142135623730951}, "odfdo.XmlPart.xpath": {"tf": 1.7320508075688772}, "odfdo.default_boolean_style": {"tf": 1.4142135623730951}, "odfdo.default_currency_style": {"tf": 1.4142135623730951}, "odfdo.default_date_style": {"tf": 1.4142135623730951}, "odfdo.default_number_style": {"tf": 1.4142135623730951}, "odfdo.default_percentage_style": {"tf": 1.4142135623730951}, "odfdo.default_time_style": {"tf": 1.4142135623730951}}, "df": 178, "s": {"docs": {"odfdo.Element.extend": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}}, "df": 2, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Text.__init__": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Text.__init__": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}}}, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.DrawImage.__init__": {"tf": 1}}, "df": 1}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Element.make_etree_element": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.get_element": {"tf": 1}, "odfdo.Text.__init__": {"tf": 1.4142135623730951}}, "df": 7}}}}, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 5}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.TOC.__init__": {"tf": 1}, "odfdo.TOC.create_toc_source": {"tf": 1}}, "df": 2}}}}, "x": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Table.to_csv": {"tf": 1}}, "df": 1}}}}}, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Annotation.__init__": {"tf": 1}, "odfdo.ChangeInfo.__init__": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}}, "df": 12}}, "e": {"docs": {"odfdo.Table.get_row": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}}, "df": 3}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 8}}}, "s": {"docs": {"odfdo.Document.new": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}}, "df": 5}, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Note.__init__": {"tf": 1}, "odfdo.Paragraph.insert_note": {"tf": 1}}, "df": 9}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}}, "df": 16}}}}, "h": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.XmlPart.delete_element": {"tf": 1}}, "df": 6}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Style.set_level_style": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1}}, "df": 2}, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 2, "s": {"docs": {"odfdo.TextChange.get_changed_region": {"tf": 1}, "odfdo.TextChange.get_change_info": {"tf": 1}, "odfdo.TextChange.get_change_element": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeStart.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}}, "df": 10}}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1.4142135623730951}, "odfdo.Row.get_cells": {"tf": 1.7320508075688772}, "odfdo.Row.get_cell": {"tf": 1.4142135623730951}, "odfdo.Row.set_cell": {"tf": 2.23606797749979}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 2.23606797749979}, "odfdo.Row.extend_cells": {"tf": 1.4142135623730951}, "odfdo.Row.append_cell": {"tf": 2.23606797749979}, "odfdo.Row.append": {"tf": 2.23606797749979}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 2}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell": {"tf": 2.23606797749979}, "odfdo.Table.set_cells": {"tf": 2}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 2.23606797749979}, "odfdo.Table.append_cell": {"tf": 2.23606797749979}, "odfdo.Table.get_column_cells": {"tf": 1.7320508075688772}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_values": {"tf": 1}}, "df": 34, "s": {"docs": {"odfdo.Row.extend_cells": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}}, "df": 5}}}, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Style.set_background": {"tf": 1}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}}, "df": 11}}}}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ConnectorShape.__init__": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Document.__init__": {"tf": 1.4142135623730951}, "odfdo.XmlPart.__init__": {"tf": 1.7320508075688772}}, "df": 2}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}}, "df": 8}}, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}}, "df": 48, "s": {"docs": {"odfdo.TOC.__init__": {"tf": 1.7320508075688772}}, "df": 1}}}}}}, "m": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Document.show_styles": {"tf": 1}}, "df": 1}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 2}}}}}, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}}, "df": 7}}}}}}, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Element.extend": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.extend_cells": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 12}}}}}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.hex2rgb": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1}}, "df": 7}}, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1.7320508075688772}, "odfdo.Table.insert_column": {"tf": 1.7320508075688772}, "odfdo.Table.append_column": {"tf": 1.7320508075688772}}, "df": 6}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}}, "df": 17}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.from_tag_for_clone": {"tf": 1}}, "df": 1}}}}, "y": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Meta.set_editing_cycles": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Note.__init__": {"tf": 1}, "odfdo.Paragraph.insert_note": {"tf": 1}}, "df": 2}}}}}}}}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 10}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}}, "df": 2}}}}}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.7320508075688772}, "odfdo.Table.__init__": {"tf": 1}}, "df": 4}}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.default_frame_position_style": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.Container.get_parts": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_styles": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.DrawPage.get_shapes": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_groups": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Element.get_styles": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.insert_item": {"tf": 1}, "odfdo.List.append_item": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Styles.get_master_pages": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.iter_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1.4142135623730951}, "odfdo.Table.extend_rows": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 2}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1.4142135623730951}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 119, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.List.insert_item": {"tf": 1}, "odfdo.List.append_item": {"tf": 1}}, "df": 2}}}}}}, "n": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Paragraph.remove_link": {"tf": 2}}, "df": 1, "s": {"docs": {"odfdo.Paragraph.remove_link": {"tf": 1}}, "df": 1}}, "e": {"docs": {"odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.EllipseShape.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}}, "df": 7}}, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 2}}}}, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Meta.set_language": {"tf": 1}}, "df": 1}}}}}}}, "x": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.from_tag_for_clone": {"tf": 1}, "odfdo.Element.make_etree_element": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.get_element": {"tf": 1}, "odfdo.Text.__init__": {"tf": 1.4142135623730951}}, "df": 7}}}, "e": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.Style.get_level_style": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.TOC.create_toc_source": {"tf": 1}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 10, "s": {"docs": {"odfdo.Style.set_level_style": {"tf": 1}}, "df": 1}}}}, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}}, "df": 2}}}}, "f": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 3}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.TabStopStyle.__init__": {"tf": 2.449489742783178}}, "df": 1}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}}, "df": 2, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}}, "df": 8}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ChangeInfo.set_comments": {"tf": 1}}, "df": 1}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Header.__init__": {"tf": 1}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Text.__init__": {"tf": 1}}, "df": 1}}}}, "f": {"docs": {"odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}}, "df": 2, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}}, "df": 1, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Paragraph.set_reference_mark_end": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}}, "df": 2}}}, "l": {"docs": {"odfdo.default_frame_position_style": {"tf": 1.4142135623730951}}, "df": 1}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.get_formatted_text": {"tf": 1}}, "df": 1}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.append_named_range": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1}}, "df": 2}}, "w": {"docs": {"odfdo.Table.traverse": {"tf": 1.4142135623730951}, "odfdo.Table.get_rows": {"tf": 1.4142135623730951}, "odfdo.Table.get_row": {"tf": 1.4142135623730951}, "odfdo.Table.set_row": {"tf": 2.23606797749979}, "odfdo.Table.insert_row": {"tf": 2.23606797749979}, "odfdo.Table.extend_rows": {"tf": 1.4142135623730951}, "odfdo.Table.append_row": {"tf": 2.23606797749979}, "odfdo.Table.set_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_cells": {"tf": 1.4142135623730951}}, "df": 9, "s": {"docs": {"odfdo.Table.extend_rows": {"tf": 1}}, "df": 1}}}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 2}}}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Element.set_attribute": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1.4142135623730951}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.UserDefined.__init__": {"tf": 1.4142135623730951}, "odfdo.UserFieldDecl.__init__": {"tf": 1.4142135623730951}, "odfdo.UserFieldDecl.set_value": {"tf": 1}, "odfdo.UserFieldGet.__init__": {"tf": 1.4142135623730951}, "odfdo.VarDecl.__init__": {"tf": 1}, "odfdo.VarGet.__init__": {"tf": 1.4142135623730951}, "odfdo.VarSet.__init__": {"tf": 1.4142135623730951}, "odfdo.VarSet.set_value": {"tf": 1}}, "df": 23, "s": {"docs": {"odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}}, "df": 5}}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Paragraph.insert_variable": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_font": {"tf": 1}}, "df": 3}}}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Link.__init__": {"tf": 1}}, "df": 1}}}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.default_frame_position_style": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1.4142135623730951}, "odfdo.Element.elements_repeated_sequence": {"tf": 1.4142135623730951}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.insert": {"tf": 1.4142135623730951}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_draw_group": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1.4142135623730951}, "odfdo.List.get_item": {"tf": 1}, "odfdo.List.insert_item": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_link": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1.4142135623730951}, "odfdo.Row.traverse": {"tf": 1.4142135623730951}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1.4142135623730951}, "odfdo.Spacer.__init__": {"tf": 1}, "odfdo.Style.get_level_style": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1.7320508075688772}, "odfdo.Styles.get_master_page": {"tf": 1}, "odfdo.TOC.__init__": {"tf": 1}, "odfdo.TOC.create_toc_source": {"tf": 1}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.traverse": {"tf": 1.4142135623730951}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1.4142135623730951}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.TocEntryTemplate.__init__": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}, "odfdo.hex2rgb": {"tf": 1.7320508075688772}, "odfdo.make_table_cell_border_string": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1.7320508075688772}}, "df": 116}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}}, "df": 4}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.elements_repeated_sequence": {"tf": 1}}, "df": 1}}}}}}, "f": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 2}}}, "d": {"docs": {"odfdo.ConnectorShape.__init__": {"tf": 1}, "odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.EllipseShape.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.IndexTitle.__init__": {"tf": 1}, "odfdo.LineShape.__init__": {"tf": 1}, "odfdo.Note.__init__": {"tf": 1}, "odfdo.Paragraph.insert_note": {"tf": 1}, "odfdo.RectangleShape.__init__": {"tf": 1}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1}}, "df": 18, "x": {"docs": {"odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.TextChange.set_id": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}}, "df": 6}}, "o": {"docs": {"odfdo.Container.__init__": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Document.__init__": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.save": {"tf": 1}}, "df": 6}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.extend": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.set_text_box": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.List.set_list_header": {"tf": 1}, "odfdo.Row.extend_cells": {"tf": 1}}, "df": 8}}}, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 4}}}}}, "m": {"docs": {"odfdo.List.insert_item": {"tf": 1}, "odfdo.List.append_item": {"tf": 1}}, "df": 2}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.Style.__init__": {"tf": 1}}, "df": 1}}}}}, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}}, "df": 2}}}}}, "j": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ChangeInfo.get_comments": {"tf": 1}}, "df": 1}}}}}}, "g": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ConnectorShape.__init__": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.ElementTyped.get_value": {"tf": 1.4142135623730951}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}}, "df": 10}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Meta.set_generator": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_font": {"tf": 1}}, "df": 2}}}}}}}, "x": {"docs": {"odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 15, "m": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.IndexTitle.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}}, "df": 2, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.get_part": {"tf": 1.4142135623730951}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.insert": {"tf": 1}}, "df": 1}}}}}}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.DrawImage.__init__": {"tf": 1}}, "df": 1}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.elements_repeated_sequence": {"tf": 1.4142135623730951}, "odfdo.Element.get_elements": {"tf": 1.4142135623730951}, "odfdo.Element.get_element": {"tf": 1.4142135623730951}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1}, "odfdo.XmlPart.get_element": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 7}}}}}, "z": {"docs": {"odfdo.DrawGroup.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}}, "df": 4, "i": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Document.save": {"tf": 1}}, "df": 1}}}, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.TabStopStyle.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}}, "df": 6}}}, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.serialize": {"tf": 1}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Frame.set_image": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}}, "df": 11}}, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}}, "df": 3}}}, "e": {"docs": {"odfdo.Style.__init__": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}}, "df": 2}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Element.get_elements": {"tf": 1}, "odfdo.Element.get_element": {"tf": 1}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.XmlPart.get_elements": {"tf": 1}, "odfdo.XmlPart.get_element": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 6}}}}}, "y": {"docs": {"odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}}, "df": 9}}}, "bases": {"root": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Annotation": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.BackgroundImage": {"tf": 1.4142135623730951}, "odfdo.Bookmark": {"tf": 1}, "odfdo.BookmarkEnd": {"tf": 1}, "odfdo.BookmarkStart": {"tf": 1}, "odfdo.Cell": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.Column": {"tf": 1}, "odfdo.ConnectorShape": {"tf": 1}, "odfdo.Content": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawGroup": {"tf": 2}, "odfdo.DrawImage": {"tf": 1}, "odfdo.DrawPage": {"tf": 1}, "odfdo.Element": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}, "odfdo.Frame": {"tf": 2.23606797749979}, "odfdo.Header": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.IndexTitleTemplate": {"tf": 1}, "odfdo.LineBreak": {"tf": 1}, "odfdo.LineShape": {"tf": 1}, "odfdo.Link": {"tf": 1}, "odfdo.List": {"tf": 1}, "odfdo.ListItem": {"tf": 1}, "odfdo.Manifest": {"tf": 1}, "odfdo.Meta": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.Note": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}, "odfdo.RectangleShape": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMarkEnd": {"tf": 1}, "odfdo.ReferenceMarkStart": {"tf": 1}, "odfdo.Row": {"tf": 1}, "odfdo.RowGroup": {"tf": 1}, "odfdo.Section": {"tf": 1}, "odfdo.Spacer": {"tf": 1}, "odfdo.Span": {"tf": 1}, "odfdo.Style": {"tf": 1}, "odfdo.Styles": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.TabStopStyle": {"tf": 1}, "odfdo.Table": {"tf": 1}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.TocEntryTemplate": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarPageNumber": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}}, "df": 83}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.AnimPar": {"tf": 1.4142135623730951}, "odfdo.AnimSeq": {"tf": 1.4142135623730951}, "odfdo.AnimTransFilter": {"tf": 1.4142135623730951}, "odfdo.Annotation": {"tf": 1.4142135623730951}, "odfdo.AnnotationEnd": {"tf": 1.4142135623730951}, "odfdo.Bookmark": {"tf": 1.4142135623730951}, "odfdo.BookmarkEnd": {"tf": 1.4142135623730951}, "odfdo.BookmarkStart": {"tf": 1.4142135623730951}, "odfdo.Cell": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1.4142135623730951}, "odfdo.Column": {"tf": 1.4142135623730951}, "odfdo.DrawGroup": {"tf": 1.4142135623730951}, "odfdo.DrawImage": {"tf": 1.4142135623730951}, "odfdo.DrawPage": {"tf": 1.4142135623730951}, "odfdo.Element": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1.4142135623730951}, "odfdo.Frame": {"tf": 1.4142135623730951}, "odfdo.HeaderRows": {"tf": 1.4142135623730951}, "odfdo.IndexTitle": {"tf": 1.4142135623730951}, "odfdo.IndexTitleTemplate": {"tf": 1.4142135623730951}, "odfdo.LineBreak": {"tf": 1.4142135623730951}, "odfdo.List": {"tf": 1.4142135623730951}, "odfdo.ListItem": {"tf": 1.4142135623730951}, "odfdo.NamedRange": {"tf": 1.4142135623730951}, "odfdo.Note": {"tf": 1.4142135623730951}, "odfdo.Reference": {"tf": 1.4142135623730951}, "odfdo.ReferenceMark": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkEnd": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart": {"tf": 1.4142135623730951}, "odfdo.Row": {"tf": 1.4142135623730951}, "odfdo.RowGroup": {"tf": 1.4142135623730951}, "odfdo.Section": {"tf": 1.4142135623730951}, "odfdo.Spacer": {"tf": 1.4142135623730951}, "odfdo.Style": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1.4142135623730951}, "odfdo.Tab": {"tf": 1.4142135623730951}, "odfdo.TabStopStyle": {"tf": 1.4142135623730951}, "odfdo.Table": {"tf": 1.4142135623730951}, "odfdo.TextChange": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion": {"tf": 1.4142135623730951}, "odfdo.TextInsertion": {"tf": 1.4142135623730951}, "odfdo.TocEntryTemplate": {"tf": 1.4142135623730951}, "odfdo.TrackedChanges": {"tf": 1.4142135623730951}, "odfdo.UserDefined": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1.4142135623730951}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.VarChapter": {"tf": 1.4142135623730951}, "odfdo.VarCreationDate": {"tf": 1.4142135623730951}, "odfdo.VarCreationTime": {"tf": 1.4142135623730951}, "odfdo.VarDate": {"tf": 1.4142135623730951}, "odfdo.VarDecl": {"tf": 1.4142135623730951}, "odfdo.VarDecls": {"tf": 1.4142135623730951}, "odfdo.VarFileName": {"tf": 1.4142135623730951}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1.4142135623730951}, "odfdo.VarPageCount": {"tf": 1.4142135623730951}, "odfdo.VarPageNumber": {"tf": 1.4142135623730951}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarTime": {"tf": 1.4142135623730951}}, "df": 60, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarSet": {"tf": 1}}, "df": 6}}}}}}}}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage": {"tf": 1.4142135623730951}}, "df": 1}}}, "r": {"docs": {"odfdo.Text": {"tf": 1}}, "df": 1}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.ConnectorShape": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}, "odfdo.LineShape": {"tf": 1}, "odfdo.RectangleShape": {"tf": 1}}, "df": 4}, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ConnectorShape": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}, "odfdo.LineShape": {"tf": 1}, "odfdo.RectangleShape": {"tf": 1}}, "df": 4}}}}}}}}, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.Frame": {"tf": 1}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}}, "df": 2}}}}}, "d": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}}, "df": 2}}}}}}}}}, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarSet": {"tf": 1}}, "df": 6}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}}, "df": 4}}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextChangeEnd": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TextChangeStart": {"tf": 1}}, "df": 1}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextDeletion": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}}, "df": 2}}}}}}}}}}}}}, "x": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Content": {"tf": 1.4142135623730951}, "odfdo.Manifest": {"tf": 1.4142135623730951}, "odfdo.Meta": {"tf": 1.4142135623730951}, "odfdo.Styles": {"tf": 1.4142135623730951}}, "df": 4}}}}}}}, "f": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1.7320508075688772}, "odfdo.Frame": {"tf": 2}}, "df": 2}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.Frame": {"tf": 1}}, "df": 2}}}}}}}}}, "z": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.Frame": {"tf": 1}}, "df": 2}}}}, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.Frame": {"tf": 1}}, "df": 2}}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Header": {"tf": 1.4142135623730951}, "odfdo.Link": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Span": {"tf": 1.4142135623730951}}, "df": 4, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Link": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}}, "df": 2}}}}}}}}}}}}}, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Element": {"tf": 1}}, "df": 1}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.UserFieldInput": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}}, "df": 4}}}}}}}, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Link": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}}, "df": 2}}}, "u": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Text": {"tf": 1}}, "df": 1}}}}}}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}}, "df": 5}}}}, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.VarDescription": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}}, "df": 4}}}}}}}}}}}}}}}}}}}, "doc": {"root": {"0": {"0": {"0": {"0": {"0": {"0": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 4}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "2": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}}, "df": 2}}}, "docs": {}, "df": 0}, "1": {"2": {"3": {"4": {"5": {"docs": {"odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 2}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "6": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.create_table_cell_style": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 2}}}, "docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage.__init__": {"tf": 2}, "odfdo.Cell.float": {"tf": 1.4142135623730951}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_range": {"tf": 2}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Style.__init__": {"tf": 2}, "odfdo.Tab": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.set_span": {"tf": 2}, "odfdo.Table.del_span": {"tf": 2}, "odfdo.create_table_cell_style": {"tf": 2}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 49}, "1": {"0": {"docs": {"odfdo.Paragraph.set_bookmark": {"tf": 1.4142135623730951}}, "df": 1, "s": {"docs": {"odfdo.AnimPar": {"tf": 1}}, "df": 1}, "c": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.Frame.__init__": {"tf": 1}}, "df": 1}}}, "2": {"docs": {"odfdo": {"tf": 1}}, "df": 1}, "3": {"0": {"docs": {"odfdo.rgb2hex": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "5": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.Frame.__init__": {"tf": 1}}, "df": 1}}}, "7": {"6": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 3}}}, "docs": {}, "df": 0}, "docs": {"odfdo.Header.__init__": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1.4142135623730951}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}, "odfdo.Table.del_span": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 7}, "2": {"0": {"0": {"9": {"docs": {"odfdo": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "1": {"0": {"docs": {"odfdo": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "docs": {"odfdo.Paragraph.set_bookmark": {"tf": 1.4142135623730951}}, "df": 1}, "3": {"8": {"docs": {"odfdo.rgb2hex": {"tf": 1.4142135623730951}}, "df": 1}, "docs": {}, "df": 0}, "6": {"3": {"0": {"0": {"docs": {"odfdo": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {"odfdo": {"tf": 1.7320508075688772}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1.7320508075688772}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 22}, "3": {"docs": {"odfdo": {"tf": 2}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 15}, "4": {"docs": {"odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 2.23606797749979}}, "df": 3}, "5": {"0": {"docs": {"odfdo": {"tf": 1}}, "df": 1}, "docs": {"odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 2, "c": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}}, "df": 2}}, "m": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.create_table_cell_style": {"tf": 1}}, "df": 1}}}, "6": {"docs": {"odfdo": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 3}, "7": {"docs": {"odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 2}, "8": {"0": {"8": {"0": {"8": {"0": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 3}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {"odfdo": {"tf": 1}}, "df": 1}, "9": {"docs": {"odfdo": {"tf": 1}}, "df": 1}, "docs": {"odfdo": {"tf": 15.165750888103101}, "odfdo.AnimPar": {"tf": 3.1622776601683795}, "odfdo.AnimPar.__init__": {"tf": 1.7320508075688772}, "odfdo.AnimPar.presentation_node_type": {"tf": 1.7320508075688772}, "odfdo.AnimPar.smil_begin": {"tf": 1.7320508075688772}, "odfdo.AnimSeq": {"tf": 3.1622776601683795}, "odfdo.AnimSeq.__init__": {"tf": 1.7320508075688772}, "odfdo.AnimSeq.presentation_node_type": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter": {"tf": 3.872983346207417}, "odfdo.AnimTransFilter.__init__": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter.smil_dur": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter.smil_type": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter.smil_subtype": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter.smil_direction": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter.smil_fadeColor": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter.smil_mode": {"tf": 1.7320508075688772}, "odfdo.Annotation": {"tf": 3.1622776601683795}, "odfdo.Annotation.__init__": {"tf": 1.7320508075688772}, "odfdo.Annotation.note_body": {"tf": 1.7320508075688772}, "odfdo.Annotation.start": {"tf": 1.7320508075688772}, "odfdo.Annotation.end": {"tf": 1.7320508075688772}, "odfdo.Annotation.get_annotated": {"tf": 4}, "odfdo.Annotation.delete": {"tf": 3.7416573867739413}, "odfdo.Annotation.check_validity": {"tf": 1.7320508075688772}, "odfdo.Annotation.name": {"tf": 1.7320508075688772}, "odfdo.Annotation.note_id": {"tf": 1.7320508075688772}, "odfdo.AnnotationEnd": {"tf": 1.7320508075688772}, "odfdo.AnnotationEnd.__init__": {"tf": 3.1622776601683795}, "odfdo.AnnotationEnd.start": {"tf": 1.7320508075688772}, "odfdo.AnnotationEnd.end": {"tf": 1.7320508075688772}, "odfdo.AnnotationEnd.name": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage": {"tf": 2.449489742783178}, "odfdo.BackgroundImage.__init__": {"tf": 8.18535277187245}, "odfdo.BackgroundImage.name": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.display_name": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.svg_font_family": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.font_family_generic": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.font_pitch": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.position": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.repeat": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.opacity": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.filter": {"tf": 1.7320508075688772}, "odfdo.BackgroundImage.text_style": {"tf": 1.7320508075688772}, "odfdo.Bookmark": {"tf": 3.1622776601683795}, "odfdo.Bookmark.__init__": {"tf": 1.7320508075688772}, "odfdo.Bookmark.name": {"tf": 1.7320508075688772}, "odfdo.BookmarkEnd": {"tf": 3.1622776601683795}, "odfdo.BookmarkEnd.__init__": {"tf": 1.7320508075688772}, "odfdo.BookmarkEnd.name": {"tf": 1.7320508075688772}, "odfdo.BookmarkStart": {"tf": 3.1622776601683795}, "odfdo.BookmarkStart.__init__": {"tf": 1.7320508075688772}, "odfdo.BookmarkStart.name": {"tf": 1.7320508075688772}, "odfdo.Cell": {"tf": 2}, "odfdo.Cell.__init__": {"tf": 3.1622776601683795}, "odfdo.Cell.x": {"tf": 1.7320508075688772}, "odfdo.Cell.y": {"tf": 1.7320508075688772}, "odfdo.Cell.clone": {"tf": 1.7320508075688772}, "odfdo.Cell.value": {"tf": 2.6457513110645907}, "odfdo.Cell.float": {"tf": 2}, "odfdo.Cell.string": {"tf": 2}, "odfdo.Cell.set_value": {"tf": 4}, "odfdo.Cell.type": {"tf": 2.6457513110645907}, "odfdo.Cell.currency": {"tf": 2.6457513110645907}, "odfdo.Cell.repeated": {"tf": 3}, "odfdo.Cell.style": {"tf": 2.6457513110645907}, "odfdo.Cell.formula": {"tf": 3.1622776601683795}, "odfdo.Cell.is_empty": {"tf": 2.449489742783178}, "odfdo.ChangeInfo": {"tf": 4.69041575982343}, "odfdo.ChangeInfo.__init__": {"tf": 1.7320508075688772}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 3.1622776601683795}, "odfdo.ChangeInfo.set_dc_date": {"tf": 3.1622776601683795}, "odfdo.ChangeInfo.get_comments": {"tf": 3.605551275463989}, "odfdo.ChangeInfo.set_comments": {"tf": 3.1622776601683795}, "odfdo.Column": {"tf": 1.7320508075688772}, "odfdo.Column.__init__": {"tf": 4}, "odfdo.Column.x": {"tf": 1.7320508075688772}, "odfdo.Column.clone": {"tf": 1.7320508075688772}, "odfdo.Column.get_default_cell_style": {"tf": 1.7320508075688772}, "odfdo.Column.set_default_cell_style": {"tf": 1.7320508075688772}, "odfdo.Column.repeated": {"tf": 2.8284271247461903}, "odfdo.Column.style": {"tf": 2.23606797749979}, "odfdo.ConnectorShape": {"tf": 3.1622776601683795}, "odfdo.ConnectorShape.__init__": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.start_shape": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.end_shape": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.start_glue_point": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.end_glue_point": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.x1": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.y1": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.x2": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape.y2": {"tf": 1.7320508075688772}, "odfdo.Container": {"tf": 1.7320508075688772}, "odfdo.Container.__init__": {"tf": 1.7320508075688772}, "odfdo.Container.path": {"tf": 1.7320508075688772}, "odfdo.Container.open": {"tf": 1.7320508075688772}, "odfdo.Container.get_parts": {"tf": 1.7320508075688772}, "odfdo.Container.get_part": {"tf": 1.7320508075688772}, "odfdo.Container.mimetype": {"tf": 1.7320508075688772}, "odfdo.Container.set_part": {"tf": 1.7320508075688772}, "odfdo.Container.del_part": {"tf": 1.7320508075688772}, "odfdo.Container.clone": {"tf": 1.7320508075688772}, "odfdo.Container.save": {"tf": 3.605551275463989}, "odfdo.Content": {"tf": 2.449489742783178}, "odfdo.Content.body": {"tf": 1.7320508075688772}, "odfdo.Content.get_styles": {"tf": 3.4641016151377544}, "odfdo.Content.get_style": {"tf": 4.242640687119285}, "odfdo.Document": {"tf": 4.123105625617661}, "odfdo.Document.__init__": {"tf": 1.7320508075688772}, "odfdo.Document.container": {"tf": 1.7320508075688772}, "odfdo.Document.new": {"tf": 4}, "odfdo.Document.path": {"tf": 1.7320508075688772}, "odfdo.Document.get_parts": {"tf": 2}, "odfdo.Document.get_part": {"tf": 3.1622776601683795}, "odfdo.Document.set_part": {"tf": 2.449489742783178}, "odfdo.Document.del_part": {"tf": 1.7320508075688772}, "odfdo.Document.mimetype": {"tf": 1.7320508075688772}, "odfdo.Document.get_type": {"tf": 2.449489742783178}, "odfdo.Document.body": {"tf": 1.7320508075688772}, "odfdo.Document.meta": {"tf": 1.7320508075688772}, "odfdo.Document.manifest": {"tf": 1.7320508075688772}, "odfdo.Document.get_formatted_text": {"tf": 1.7320508075688772}, "odfdo.Document.get_formated_meta": {"tf": 1.7320508075688772}, "odfdo.Document.add_file": {"tf": 4}, "odfdo.Document.clone": {"tf": 2.23606797749979}, "odfdo.Document.save": {"tf": 3.1622776601683795}, "odfdo.Document.content": {"tf": 1.7320508075688772}, "odfdo.Document.styles": {"tf": 1.7320508075688772}, "odfdo.Document.get_styles": {"tf": 1.7320508075688772}, "odfdo.Document.get_style": {"tf": 4.358898943540674}, "odfdo.Document.insert_style": {"tf": 5.291502622129181}, "odfdo.Document.get_styled_elements": {"tf": 3.4641016151377544}, "odfdo.Document.show_styles": {"tf": 1.7320508075688772}, "odfdo.Document.delete_styles": {"tf": 2.23606797749979}, "odfdo.Document.merge_styles_from": {"tf": 2.449489742783178}, "odfdo.Document.add_page_break_style": {"tf": 3}, "odfdo.DrawFillImage": {"tf": 3.7416573867739413}, "odfdo.DrawFillImage.__init__": {"tf": 3.1622776601683795}, "odfdo.DrawFillImage.display_name": {"tf": 1.7320508075688772}, "odfdo.DrawFillImage.name": {"tf": 1.7320508075688772}, "odfdo.DrawFillImage.height": {"tf": 1.7320508075688772}, "odfdo.DrawFillImage.width": {"tf": 1.7320508075688772}, "odfdo.DrawGroup": {"tf": 3.872983346207417}, "odfdo.DrawGroup.__init__": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.draw_id": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.caption_id": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.draw_class_names": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.name": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.style": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.presentation_class_names": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.presentation_style": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.table_end_cell": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.table_end_x": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.table_end_y": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.table_background": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.xml_id": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.pos_x": {"tf": 1.7320508075688772}, "odfdo.DrawGroup.pos_y": {"tf": 1.7320508075688772}, "odfdo.DrawImage": {"tf": 3.7416573867739413}, "odfdo.DrawImage.__init__": {"tf": 3.1622776601683795}, "odfdo.DrawImage.url": {"tf": 1.7320508075688772}, "odfdo.DrawImage.type": {"tf": 1.7320508075688772}, "odfdo.DrawImage.show": {"tf": 1.7320508075688772}, "odfdo.DrawImage.actuate": {"tf": 1.7320508075688772}, "odfdo.DrawImage.filter_name": {"tf": 1.7320508075688772}, "odfdo.DrawPage": {"tf": 1.7320508075688772}, "odfdo.DrawPage.__init__": {"tf": 2.6457513110645907}, "odfdo.DrawPage.set_transition": {"tf": 1.7320508075688772}, "odfdo.DrawPage.get_shapes": {"tf": 1.7320508075688772}, "odfdo.DrawPage.get_formatted_text": {"tf": 1.7320508075688772}, "odfdo.DrawPage.name": {"tf": 1.7320508075688772}, "odfdo.DrawPage.draw_id": {"tf": 1.7320508075688772}, "odfdo.DrawPage.master_page": {"tf": 1.7320508075688772}, "odfdo.DrawPage.presentation_page_layout": {"tf": 1.7320508075688772}, "odfdo.DrawPage.style": {"tf": 1.7320508075688772}, "odfdo.Element": {"tf": 2.449489742783178}, "odfdo.Element.__init__": {"tf": 1.7320508075688772}, "odfdo.Element.from_tag": {"tf": 3.872983346207417}, "odfdo.Element.from_tag_for_clone": {"tf": 1.7320508075688772}, "odfdo.Element.make_etree_element": {"tf": 1.7320508075688772}, "odfdo.Element.tag": {"tf": 3.605551275463989}, "odfdo.Element.elements_repeated_sequence": {"tf": 1.7320508075688772}, "odfdo.Element.get_elements": {"tf": 1.7320508075688772}, "odfdo.Element.get_element": {"tf": 1.7320508075688772}, "odfdo.Element.attributes": {"tf": 1.7320508075688772}, "odfdo.Element.get_attribute": {"tf": 2.23606797749979}, "odfdo.Element.get_attribute_integer": {"tf": 1.7320508075688772}, "odfdo.Element.get_attribute_string": {"tf": 1.7320508075688772}, "odfdo.Element.set_attribute": {"tf": 1.7320508075688772}, "odfdo.Element.set_style_attribute": {"tf": 1.7320508075688772}, "odfdo.Element.del_attribute": {"tf": 1.7320508075688772}, "odfdo.Element.text": {"tf": 2}, "odfdo.Element.text_recursive": {"tf": 1.7320508075688772}, "odfdo.Element.tail": {"tf": 2}, "odfdo.Element.search": {"tf": 3.872983346207417}, "odfdo.Element.match": {"tf": 3.872983346207417}, "odfdo.Element.replace": {"tf": 4.242640687119285}, "odfdo.Element.root": {"tf": 1.7320508075688772}, "odfdo.Element.parent": {"tf": 1.7320508075688772}, "odfdo.Element.is_bound": {"tf": 1.7320508075688772}, "odfdo.Element.children": {"tf": 1.7320508075688772}, "odfdo.Element.index": {"tf": 2.23606797749979}, "odfdo.Element.text_content": {"tf": 2.449489742783178}, "odfdo.Element.is_empty": {"tf": 2.449489742783178}, "odfdo.Element.get_between": {"tf": 4.47213595499958}, "odfdo.Element.insert": {"tf": 4}, "odfdo.Element.extend": {"tf": 1.7320508075688772}, "odfdo.Element.append": {"tf": 1.7320508075688772}, "odfdo.Element.delete": {"tf": 3.605551275463989}, "odfdo.Element.replace_element": {"tf": 2.6457513110645907}, "odfdo.Element.strip_elements": {"tf": 4.242640687119285}, "odfdo.Element.strip_tags": {"tf": 4.58257569495584}, "odfdo.Element.xpath": {"tf": 1.7320508075688772}, "odfdo.Element.clear": {"tf": 1.7320508075688772}, "odfdo.Element.clone": {"tf": 1.7320508075688772}, "odfdo.Element.serialize": {"tf": 1.7320508075688772}, "odfdo.Element.document_body": {"tf": 2}, "odfdo.Element.get_formatted_text": {"tf": 1.7320508075688772}, "odfdo.Element.get_styled_elements": {"tf": 3.4641016151377544}, "odfdo.Element.dc_creator": {"tf": 2.449489742783178}, "odfdo.Element.dc_date": {"tf": 2.449489742783178}, "odfdo.Element.svg_title": {"tf": 1.7320508075688772}, "odfdo.Element.svg_description": {"tf": 1.7320508075688772}, "odfdo.Element.get_sections": {"tf": 3.4641016151377544}, "odfdo.Element.get_section": {"tf": 3.4641016151377544}, "odfdo.Element.get_paragraphs": {"tf": 3.4641016151377544}, "odfdo.Element.get_paragraph": {"tf": 3.4641016151377544}, "odfdo.Element.get_spans": {"tf": 3.4641016151377544}, "odfdo.Element.get_span": {"tf": 3.4641016151377544}, "odfdo.Element.get_headers": {"tf": 3.4641016151377544}, "odfdo.Element.get_header": {"tf": 3.4641016151377544}, "odfdo.Element.get_lists": {"tf": 3.4641016151377544}, "odfdo.Element.get_list": {"tf": 3.4641016151377544}, "odfdo.Element.get_frames": {"tf": 3.4641016151377544}, "odfdo.Element.get_frame": {"tf": 3.4641016151377544}, "odfdo.Element.get_images": {"tf": 3.4641016151377544}, "odfdo.Element.get_image": {"tf": 3.4641016151377544}, "odfdo.Element.get_tables": {"tf": 3.4641016151377544}, "odfdo.Element.get_table": {"tf": 3.4641016151377544}, "odfdo.Element.get_named_ranges": {"tf": 2.23606797749979}, "odfdo.Element.get_named_range": {"tf": 3.4641016151377544}, "odfdo.Element.append_named_range": {"tf": 3.1622776601683795}, "odfdo.Element.delete_named_range": {"tf": 3.1622776601683795}, "odfdo.Element.get_notes": {"tf": 3.4641016151377544}, "odfdo.Element.get_note": {"tf": 3.4641016151377544}, "odfdo.Element.get_annotations": {"tf": 3.4641016151377544}, "odfdo.Element.get_annotation": {"tf": 3.4641016151377544}, "odfdo.Element.get_annotation_ends": {"tf": 2.23606797749979}, "odfdo.Element.get_annotation_end": {"tf": 3.4641016151377544}, "odfdo.Element.get_office_names": {"tf": 2.23606797749979}, "odfdo.Element.get_variable_decls": {"tf": 2.23606797749979}, "odfdo.Element.get_variable_decl_list": {"tf": 2.23606797749979}, "odfdo.Element.get_variable_decl": {"tf": 3.4641016151377544}, "odfdo.Element.get_variable_sets": {"tf": 3.4641016151377544}, "odfdo.Element.get_variable_set": {"tf": 3.4641016151377544}, "odfdo.Element.get_variable_set_value": {"tf": 3.4641016151377544}, "odfdo.Element.get_user_field_decls": {"tf": 2.23606797749979}, "odfdo.Element.get_user_field_decl_list": {"tf": 2.23606797749979}, "odfdo.Element.get_user_field_decl": {"tf": 2.23606797749979}, "odfdo.Element.get_user_field_value": {"tf": 3.4641016151377544}, "odfdo.Element.get_user_defined_list": {"tf": 2.23606797749979}, "odfdo.Element.get_user_defined": {"tf": 2.23606797749979}, "odfdo.Element.get_user_defined_value": {"tf": 3.4641016151377544}, "odfdo.Element.get_draw_pages": {"tf": 3.4641016151377544}, "odfdo.Element.get_draw_page": {"tf": 3.4641016151377544}, "odfdo.Element.get_links": {"tf": 3.4641016151377544}, "odfdo.Element.get_link": {"tf": 3.4641016151377544}, "odfdo.Element.get_bookmarks": {"tf": 2.23606797749979}, "odfdo.Element.get_bookmark": {"tf": 3.4641016151377544}, "odfdo.Element.get_bookmark_starts": {"tf": 2.23606797749979}, "odfdo.Element.get_bookmark_start": {"tf": 3.4641016151377544}, "odfdo.Element.get_bookmark_ends": {"tf": 2.23606797749979}, "odfdo.Element.get_bookmark_end": {"tf": 3.4641016151377544}, "odfdo.Element.get_reference_marks_single": {"tf": 2.449489742783178}, "odfdo.Element.get_reference_mark_single": {"tf": 3.605551275463989}, "odfdo.Element.get_reference_mark_starts": {"tf": 2.449489742783178}, "odfdo.Element.get_reference_mark_start": {"tf": 3.605551275463989}, "odfdo.Element.get_reference_mark_ends": {"tf": 2.449489742783178}, "odfdo.Element.get_reference_mark_end": {"tf": 3.605551275463989}, "odfdo.Element.get_reference_marks": {"tf": 2.23606797749979}, "odfdo.Element.get_reference_mark": {"tf": 3.4641016151377544}, "odfdo.Element.get_references": {"tf": 3.4641016151377544}, "odfdo.Element.get_draw_groups": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_group": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_lines": {"tf": 3.4641016151377544}, "odfdo.Element.get_draw_line": {"tf": 3.4641016151377544}, "odfdo.Element.get_draw_rectangles": {"tf": 3.4641016151377544}, "odfdo.Element.get_draw_rectangle": {"tf": 3.4641016151377544}, "odfdo.Element.get_draw_ellipses": {"tf": 3.4641016151377544}, "odfdo.Element.get_draw_ellipse": {"tf": 3.4641016151377544}, "odfdo.Element.get_draw_connectors": {"tf": 3.4641016151377544}, "odfdo.Element.get_draw_connector": {"tf": 3.4641016151377544}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1.7320508075688772}, "odfdo.Element.get_tracked_changes": {"tf": 1.7320508075688772}, "odfdo.Element.get_changes_ids": {"tf": 1.7320508075688772}, "odfdo.Element.get_text_change_deletions": {"tf": 2.449489742783178}, "odfdo.Element.get_text_change_deletion": {"tf": 3.605551275463989}, "odfdo.Element.get_text_change_starts": {"tf": 2.449489742783178}, "odfdo.Element.get_text_change_start": {"tf": 3.605551275463989}, "odfdo.Element.get_text_change_ends": {"tf": 2.449489742783178}, "odfdo.Element.get_text_change_end": {"tf": 3.605551275463989}, "odfdo.Element.get_text_changes": {"tf": 2.23606797749979}, "odfdo.Element.get_text_change": {"tf": 3.7416573867739413}, "odfdo.Element.get_tocs": {"tf": 2.23606797749979}, "odfdo.Element.get_toc": {"tf": 3.4641016151377544}, "odfdo.Element.get_styles": {"tf": 1.7320508075688772}, "odfdo.Element.get_style": {"tf": 3.872983346207417}, "odfdo.ElementTyped": {"tf": 2.449489742783178}, "odfdo.ElementTyped.set_value_and_type": {"tf": 1.7320508075688772}, "odfdo.ElementTyped.get_value": {"tf": 2.449489742783178}, "odfdo.EllipseShape": {"tf": 3.1622776601683795}, "odfdo.EllipseShape.__init__": {"tf": 1.7320508075688772}, "odfdo.FIRST_CHILD": {"tf": 1.7320508075688772}, "odfdo.Frame": {"tf": 2.449489742783178}, "odfdo.Frame.__init__": {"tf": 4}, "odfdo.Frame.image_frame": {"tf": 3.872983346207417}, "odfdo.Frame.text_frame": {"tf": 3.872983346207417}, "odfdo.Frame.text_content": {"tf": 2.449489742783178}, "odfdo.Frame.get_image": {"tf": 3.4641016151377544}, "odfdo.Frame.set_image": {"tf": 1.7320508075688772}, "odfdo.Frame.get_text_box": {"tf": 1.7320508075688772}, "odfdo.Frame.set_text_box": {"tf": 1.7320508075688772}, "odfdo.Frame.get_formatted_text": {"tf": 1.7320508075688772}, "odfdo.Frame.name": {"tf": 1.7320508075688772}, "odfdo.Frame.draw_id": {"tf": 1.7320508075688772}, "odfdo.Frame.width": {"tf": 1.7320508075688772}, "odfdo.Frame.height": {"tf": 1.7320508075688772}, "odfdo.Frame.style": {"tf": 1.7320508075688772}, "odfdo.Frame.pos_x": {"tf": 1.7320508075688772}, "odfdo.Frame.pos_y": {"tf": 1.7320508075688772}, "odfdo.Frame.presentation_class": {"tf": 1.7320508075688772}, "odfdo.Frame.layer": {"tf": 1.7320508075688772}, "odfdo.Frame.presentation_style": {"tf": 1.7320508075688772}, "odfdo.Header": {"tf": 1.7320508075688772}, "odfdo.Header.__init__": {"tf": 3.605551275463989}, "odfdo.Header.get_formatted_text": {"tf": 1.7320508075688772}, "odfdo.Header.level": {"tf": 1.7320508075688772}, "odfdo.Header.restart_numbering": {"tf": 1.7320508075688772}, "odfdo.Header.start_value": {"tf": 1.7320508075688772}, "odfdo.Header.suppress_numbering": {"tf": 1.7320508075688772}, "odfdo.HeaderRows": {"tf": 2.449489742783178}, "odfdo.IndexTitle": {"tf": 2.8284271247461903}, "odfdo.IndexTitle.__init__": {"tf": 1.7320508075688772}, "odfdo.IndexTitle.set_title_text": {"tf": 1.7320508075688772}, "odfdo.IndexTitle.name": {"tf": 1.7320508075688772}, "odfdo.IndexTitle.style": {"tf": 1.7320508075688772}, "odfdo.IndexTitle.xml_id": {"tf": 1.7320508075688772}, "odfdo.IndexTitle.protected": {"tf": 1.7320508075688772}, "odfdo.IndexTitle.protection_key": {"tf": 1.7320508075688772}, "odfdo.IndexTitle.protection_key_digest_algorithm": {"tf": 1.7320508075688772}, "odfdo.IndexTitleTemplate": {"tf": 3.1622776601683795}, "odfdo.IndexTitleTemplate.__init__": {"tf": 1.7320508075688772}, "odfdo.IndexTitleTemplate.style": {"tf": 1.7320508075688772}, "odfdo.LAST_CHILD": {"tf": 1.7320508075688772}, "odfdo.LineBreak": {"tf": 1.7320508075688772}, "odfdo.LineBreak.__init__": {"tf": 1.7320508075688772}, "odfdo.LineShape": {"tf": 3.1622776601683795}, "odfdo.LineShape.__init__": {"tf": 1.7320508075688772}, "odfdo.LineShape.x1": {"tf": 1.7320508075688772}, "odfdo.LineShape.y1": {"tf": 1.7320508075688772}, "odfdo.LineShape.x2": {"tf": 1.7320508075688772}, "odfdo.LineShape.y2": {"tf": 1.7320508075688772}, "odfdo.Link": {"tf": 1.7320508075688772}, "odfdo.Link.__init__": {"tf": 2.6457513110645907}, "odfdo.Link.url": {"tf": 1.7320508075688772}, "odfdo.Link.name": {"tf": 1.7320508075688772}, "odfdo.Link.title": {"tf": 1.7320508075688772}, "odfdo.Link.target_frame": {"tf": 1.7320508075688772}, "odfdo.Link.show": {"tf": 1.7320508075688772}, "odfdo.Link.visited_style": {"tf": 1.7320508075688772}, "odfdo.Link.style": {"tf": 1.7320508075688772}, "odfdo.List": {"tf": 1.7320508075688772}, "odfdo.List.__init__": {"tf": 3.605551275463989}, "odfdo.List.get_items": {"tf": 3.4641016151377544}, "odfdo.List.get_item": {"tf": 3.4641016151377544}, "odfdo.List.set_list_header": {"tf": 1.7320508075688772}, "odfdo.List.insert_item": {"tf": 1.7320508075688772}, "odfdo.List.append_item": {"tf": 1.7320508075688772}, "odfdo.List.get_formatted_text": {"tf": 1.7320508075688772}, "odfdo.List.style": {"tf": 1.7320508075688772}, "odfdo.ListItem": {"tf": 1.7320508075688772}, "odfdo.ListItem.__init__": {"tf": 3.1622776601683795}, "odfdo.Manifest": {"tf": 2.449489742783178}, "odfdo.Manifest.get_paths": {"tf": 2.23606797749979}, "odfdo.Manifest.get_path_medias": {"tf": 2.23606797749979}, "odfdo.Manifest.get_media_type": {"tf": 2.23606797749979}, "odfdo.Manifest.set_media_type": {"tf": 3.1622776601683795}, "odfdo.Manifest.make_file_entry": {"tf": 1.7320508075688772}, "odfdo.Manifest.add_full_path": {"tf": 1.7320508075688772}, "odfdo.Manifest.del_full_path": {"tf": 1.7320508075688772}, "odfdo.Meta": {"tf": 2.449489742783178}, "odfdo.Meta.__init__": {"tf": 1.7320508075688772}, "odfdo.Meta.get_meta_body": {"tf": 1.7320508075688772}, "odfdo.Meta.get_title": {"tf": 3}, "odfdo.Meta.set_title": {"tf": 3.605551275463989}, "odfdo.Meta.get_description": {"tf": 2.449489742783178}, "odfdo.Meta.get_comments": {"tf": 2.449489742783178}, "odfdo.Meta.set_description": {"tf": 3.1622776601683795}, "odfdo.Meta.set_comments": {"tf": 3.1622776601683795}, "odfdo.Meta.get_subject": {"tf": 2.449489742783178}, "odfdo.Meta.set_subject": {"tf": 3.1622776601683795}, "odfdo.Meta.get_language": {"tf": 3.7416573867739413}, "odfdo.Meta.set_language": {"tf": 4.242640687119285}, "odfdo.Meta.get_modification_date": {"tf": 2.449489742783178}, "odfdo.Meta.set_modification_date": {"tf": 3.1622776601683795}, "odfdo.Meta.get_creation_date": {"tf": 2.449489742783178}, "odfdo.Meta.set_creation_date": {"tf": 3.1622776601683795}, "odfdo.Meta.get_initial_creator": {"tf": 3.7416573867739413}, "odfdo.Meta.set_initial_creator": {"tf": 4.242640687119285}, "odfdo.Meta.get_creator": {"tf": 3.7416573867739413}, "odfdo.Meta.set_creator": {"tf": 4.242640687119285}, "odfdo.Meta.get_keywords": {"tf": 2.449489742783178}, "odfdo.Meta.set_keywords": {"tf": 3.1622776601683795}, "odfdo.Meta.get_editing_duration": {"tf": 2.449489742783178}, "odfdo.Meta.set_editing_duration": {"tf": 3.1622776601683795}, "odfdo.Meta.get_editing_cycles": {"tf": 2.449489742783178}, "odfdo.Meta.set_editing_cycles": {"tf": 3.1622776601683795}, "odfdo.Meta.get_generator": {"tf": 3.7416573867739413}, "odfdo.Meta.set_generator": {"tf": 4.242640687119285}, "odfdo.Meta.set_generator_default": {"tf": 3.3166247903554}, "odfdo.Meta.get_statistic": {"tf": 4.795831523312719}, "odfdo.Meta.set_statistic": {"tf": 5.0990195135927845}, "odfdo.Meta.get_user_defined_metadata": {"tf": 2.449489742783178}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 3.1622776601683795}, "odfdo.Meta.set_user_defined_metadata": {"tf": 1.7320508075688772}, "odfdo.NEXT_SIBLING": {"tf": 1.7320508075688772}, "odfdo.NamedRange": {"tf": 3.1622776601683795}, "odfdo.NamedRange.__init__": {"tf": 3.4641016151377544}, "odfdo.NamedRange.usage": {"tf": 1.7320508075688772}, "odfdo.NamedRange.table_name": {"tf": 1.7320508075688772}, "odfdo.NamedRange.set_usage": {"tf": 3.3166247903554}, "odfdo.NamedRange.name": {"tf": 2}, "odfdo.NamedRange.set_table_name": {"tf": 3.1622776601683795}, "odfdo.NamedRange.set_range": {"tf": 3.1622776601683795}, "odfdo.NamedRange.get_values": {"tf": 1.7320508075688772}, "odfdo.NamedRange.get_value": {"tf": 1.7320508075688772}, "odfdo.NamedRange.set_values": {"tf": 1.7320508075688772}, "odfdo.NamedRange.set_value": {"tf": 1.7320508075688772}, "odfdo.Note": {"tf": 3.1622776601683795}, "odfdo.Note.__init__": {"tf": 1.7320508075688772}, "odfdo.Note.citation": {"tf": 1.7320508075688772}, "odfdo.Note.note_body": {"tf": 1.7320508075688772}, "odfdo.Note.check_validity": {"tf": 1.7320508075688772}, "odfdo.Note.note_class": {"tf": 1.7320508075688772}, "odfdo.Note.note_id": {"tf": 1.7320508075688772}, "odfdo.PREV_SIBLING": {"tf": 1.7320508075688772}, "odfdo.Paragraph": {"tf": 1.7320508075688772}, "odfdo.Paragraph.__init__": {"tf": 3.1622776601683795}, "odfdo.Paragraph.insert_note": {"tf": 1.7320508075688772}, "odfdo.Paragraph.insert_annotation": {"tf": 4.358898943540674}, "odfdo.Paragraph.insert_annotation_end": {"tf": 3.605551275463989}, "odfdo.Paragraph.set_reference_mark": {"tf": 4.58257569495584}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 3.605551275463989}, "odfdo.Paragraph.insert_variable": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_span": {"tf": 3.7416573867739413}, "odfdo.Paragraph.remove_spans": {"tf": 1.7320508075688772}, "odfdo.Paragraph.remove_span": {"tf": 3.1622776601683795}, "odfdo.Paragraph.set_link": {"tf": 3.7416573867739413}, "odfdo.Paragraph.remove_links": {"tf": 1.7320508075688772}, "odfdo.Paragraph.remove_link": {"tf": 3.1622776601683795}, "odfdo.Paragraph.insert_reference": {"tf": 4.898979485566356}, "odfdo.Paragraph.set_bookmark": {"tf": 5.744562646538029}, "odfdo.PageBreak": {"tf": 2.449489742783178}, "odfdo.RectangleShape": {"tf": 3.1622776601683795}, "odfdo.RectangleShape.__init__": {"tf": 1.7320508075688772}, "odfdo.Reference": {"tf": 5.385164807134504}, "odfdo.Reference.__init__": {"tf": 4.242640687119285}, "odfdo.Reference.format_allowed": {"tf": 1.7320508075688772}, "odfdo.Reference.ref_format": {"tf": 3.1622776601683795}, "odfdo.Reference.update": {"tf": 1.7320508075688772}, "odfdo.Reference.name": {"tf": 1.7320508075688772}, "odfdo.ReferenceMark": {"tf": 1.7320508075688772}, "odfdo.ReferenceMark.__init__": {"tf": 3.1622776601683795}, "odfdo.ReferenceMark.name": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkEnd": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 3.1622776601683795}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkEnd.name": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkStart": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkStart.__init__": {"tf": 3.1622776601683795}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 3.3166247903554}, "odfdo.ReferenceMarkStart.delete": {"tf": 3.7416573867739413}, "odfdo.ReferenceMarkStart.name": {"tf": 1.7320508075688772}, "odfdo.Row": {"tf": 1.7320508075688772}, "odfdo.Row.__init__": {"tf": 4}, "odfdo.Row.y": {"tf": 1.7320508075688772}, "odfdo.Row.clone": {"tf": 1.7320508075688772}, "odfdo.Row.repeated": {"tf": 3}, "odfdo.Row.style": {"tf": 2.23606797749979}, "odfdo.Row.width": {"tf": 2.23606797749979}, "odfdo.Row.traverse": {"tf": 3.3166247903554}, "odfdo.Row.get_cells": {"tf": 4.358898943540674}, "odfdo.Row.get_cell": {"tf": 4}, "odfdo.Row.get_value": {"tf": 3}, "odfdo.Row.set_cell": {"tf": 3.4641016151377544}, "odfdo.Row.set_value": {"tf": 3.605551275463989}, "odfdo.Row.insert_cell": {"tf": 4.242640687119285}, "odfdo.Row.extend_cells": {"tf": 1.7320508075688772}, "odfdo.Row.append_cell": {"tf": 3.872983346207417}, "odfdo.Row.append": {"tf": 3.872983346207417}, "odfdo.Row.delete_cell": {"tf": 3.605551275463989}, "odfdo.Row.get_values": {"tf": 4.898979485566356}, "odfdo.Row.set_cells": {"tf": 3.1622776601683795}, "odfdo.Row.set_values": {"tf": 3.1622776601683795}, "odfdo.Row.rstrip": {"tf": 3.4641016151377544}, "odfdo.Row.is_empty": {"tf": 3.872983346207417}, "odfdo.RowGroup": {"tf": 2}, "odfdo.RowGroup.__init__": {"tf": 3.605551275463989}, "odfdo.Section": {"tf": 3.1622776601683795}, "odfdo.Section.__init__": {"tf": 1.7320508075688772}, "odfdo.Section.get_formatted_text": {"tf": 1.7320508075688772}, "odfdo.Section.style": {"tf": 1.7320508075688772}, "odfdo.Section.name": {"tf": 1.7320508075688772}, "odfdo.Spacer": {"tf": 2.6457513110645907}, "odfdo.Spacer.__init__": {"tf": 2.6457513110645907}, "odfdo.Spacer.number": {"tf": 1.7320508075688772}, "odfdo.Span": {"tf": 1.7320508075688772}, "odfdo.Span.__init__": {"tf": 2.6457513110645907}, "odfdo.Span.style": {"tf": 1.7320508075688772}, "odfdo.Span.class_names": {"tf": 1.7320508075688772}, "odfdo.Style": {"tf": 2.449489742783178}, "odfdo.Style.__init__": {"tf": 8.18535277187245}, "odfdo.Style.family": {"tf": 1.7320508075688772}, "odfdo.Style.get_properties": {"tf": 3.4641016151377544}, "odfdo.Style.set_properties": {"tf": 3.605551275463989}, "odfdo.Style.del_properties": {"tf": 3.1622776601683795}, "odfdo.Style.set_background": {"tf": 5.291502622129181}, "odfdo.Style.get_level_style": {"tf": 1.7320508075688772}, "odfdo.Style.set_level_style": {"tf": 3}, "odfdo.Style.get_header_style": {"tf": 1.7320508075688772}, "odfdo.Style.set_header_style": {"tf": 1.7320508075688772}, "odfdo.Style.get_footer_style": {"tf": 1.7320508075688772}, "odfdo.Style.set_footer_style": {"tf": 1.7320508075688772}, "odfdo.Style.get_page_header": {"tf": 2.449489742783178}, "odfdo.Style.set_page_header": {"tf": 3.605551275463989}, "odfdo.Style.get_page_footer": {"tf": 2.449489742783178}, "odfdo.Style.set_page_footer": {"tf": 3.605551275463989}, "odfdo.Style.set_font": {"tf": 1.7320508075688772}, "odfdo.Style.page_layout": {"tf": 1.7320508075688772}, "odfdo.Style.next_style": {"tf": 1.7320508075688772}, "odfdo.Style.name": {"tf": 1.7320508075688772}, "odfdo.Style.parent_style": {"tf": 1.7320508075688772}, "odfdo.Style.display_name": {"tf": 1.7320508075688772}, "odfdo.Style.svg_font_family": {"tf": 1.7320508075688772}, "odfdo.Style.font_family_generic": {"tf": 1.7320508075688772}, "odfdo.Style.font_pitch": {"tf": 1.7320508075688772}, "odfdo.Style.text_style": {"tf": 1.7320508075688772}, "odfdo.Style.master_page": {"tf": 1.7320508075688772}, "odfdo.Style.style_type": {"tf": 1.7320508075688772}, "odfdo.Style.leader_style": {"tf": 1.7320508075688772}, "odfdo.Style.leader_text": {"tf": 1.7320508075688772}, "odfdo.Style.style_position": {"tf": 1.7320508075688772}, "odfdo.Styles": {"tf": 2.449489742783178}, "odfdo.Styles.get_styles": {"tf": 3.4641016151377544}, "odfdo.Styles.get_style": {"tf": 4.242640687119285}, "odfdo.Styles.get_master_pages": {"tf": 1.7320508075688772}, "odfdo.Styles.get_master_page": {"tf": 1.7320508075688772}, "odfdo.TOC": {"tf": 5.5677643628300215}, "odfdo.TOC.__init__": {"tf": 1.7320508075688772}, "odfdo.TOC.create_toc_source": {"tf": 1.7320508075688772}, "odfdo.TOC.get_formatted_text": {"tf": 1.7320508075688772}, "odfdo.TOC.outline_level": {"tf": 1.7320508075688772}, "odfdo.TOC.body": {"tf": 1.7320508075688772}, "odfdo.TOC.get_title": {"tf": 1.7320508075688772}, "odfdo.TOC.set_toc_title": {"tf": 1.7320508075688772}, "odfdo.TOC.fill": {"tf": 3.605551275463989}, "odfdo.TOC.name": {"tf": 1.7320508075688772}, "odfdo.TOC.style": {"tf": 1.7320508075688772}, "odfdo.TOC.xml_id": {"tf": 1.7320508075688772}, "odfdo.TOC.protected": {"tf": 1.7320508075688772}, "odfdo.TOC.protection_key": {"tf": 1.7320508075688772}, "odfdo.TOC.protection_key_digest_algorithm": {"tf": 1.7320508075688772}, "odfdo.Tab": {"tf": 2.23606797749979}, "odfdo.Tab.__init__": {"tf": 2.6457513110645907}, "odfdo.Tab.position": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle": {"tf": 1.4142135623730951}, "odfdo.TabStopStyle.__init__": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.style_char": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.leader_color": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.leader_style": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.leader_text": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.leader_text_style": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.leader_type": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.leader_width": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.style_position": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle.style_type": {"tf": 1.7320508075688772}, "odfdo.Table": {"tf": 1.7320508075688772}, "odfdo.Table.__init__": {"tf": 5.477225575051661}, "odfdo.Table.append": {"tf": 1.7320508075688772}, "odfdo.Table.height": {"tf": 2.23606797749979}, "odfdo.Table.width": {"tf": 2.8284271247461903}, "odfdo.Table.size": {"tf": 2.449489742783178}, "odfdo.Table.name": {"tf": 2}, "odfdo.Table.protected": {"tf": 1.7320508075688772}, "odfdo.Table.protection_key": {"tf": 1.7320508075688772}, "odfdo.Table.displayed": {"tf": 1.7320508075688772}, "odfdo.Table.printable": {"tf": 1.7320508075688772}, "odfdo.Table.print_ranges": {"tf": 1.7320508075688772}, "odfdo.Table.style": {"tf": 2.23606797749979}, "odfdo.Table.get_formatted_text": {"tf": 1.7320508075688772}, "odfdo.Table.get_values": {"tf": 5.385164807134504}, "odfdo.Table.iter_values": {"tf": 4.47213595499958}, "odfdo.Table.set_values": {"tf": 4.69041575982343}, "odfdo.Table.rstrip": {"tf": 3.872983346207417}, "odfdo.Table.transpose": {"tf": 4}, "odfdo.Table.is_empty": {"tf": 3.605551275463989}, "odfdo.Table.traverse": {"tf": 3.3166247903554}, "odfdo.Table.get_rows": {"tf": 4}, "odfdo.Table.get_row": {"tf": 4.242640687119285}, "odfdo.Table.set_row": {"tf": 4.242640687119285}, "odfdo.Table.insert_row": {"tf": 4.242640687119285}, "odfdo.Table.extend_rows": {"tf": 3.1622776601683795}, "odfdo.Table.append_row": {"tf": 4.242640687119285}, "odfdo.Table.delete_row": {"tf": 3.605551275463989}, "odfdo.Table.get_row_values": {"tf": 4.58257569495584}, "odfdo.Table.set_row_values": {"tf": 4.123105625617661}, "odfdo.Table.set_row_cells": {"tf": 4.123105625617661}, "odfdo.Table.is_row_empty": {"tf": 4}, "odfdo.Table.get_cells": {"tf": 4.69041575982343}, "odfdo.Table.get_cell": {"tf": 4.47213595499958}, "odfdo.Table.get_value": {"tf": 4.358898943540674}, "odfdo.Table.set_cell": {"tf": 4}, "odfdo.Table.set_cells": {"tf": 4.69041575982343}, "odfdo.Table.set_value": {"tf": 3.605551275463989}, "odfdo.Table.set_cell_image": {"tf": 4.358898943540674}, "odfdo.Table.insert_cell": {"tf": 4.242640687119285}, "odfdo.Table.append_cell": {"tf": 4.242640687119285}, "odfdo.Table.delete_cell": {"tf": 4}, "odfdo.Table.traverse_columns": {"tf": 3.3166247903554}, "odfdo.Table.get_columns": {"tf": 3.605551275463989}, "odfdo.Table.get_column": {"tf": 4.58257569495584}, "odfdo.Table.set_column": {"tf": 4}, "odfdo.Table.insert_column": {"tf": 4}, "odfdo.Table.append_column": {"tf": 4}, "odfdo.Table.delete_column": {"tf": 3.605551275463989}, "odfdo.Table.get_column_cells": {"tf": 4.58257569495584}, "odfdo.Table.get_column_values": {"tf": 4.58257569495584}, "odfdo.Table.set_column_cells": {"tf": 4}, "odfdo.Table.set_column_values": {"tf": 4}, "odfdo.Table.is_column_empty": {"tf": 3.3166247903554}, "odfdo.Table.get_named_ranges": {"tf": 3.7416573867739413}, "odfdo.Table.get_named_range": {"tf": 3.7416573867739413}, "odfdo.Table.set_named_range": {"tf": 3.3166247903554}, "odfdo.Table.delete_named_range": {"tf": 3.3166247903554}, "odfdo.Table.set_span": {"tf": 4.242640687119285}, "odfdo.Table.del_span": {"tf": 3.605551275463989}, "odfdo.Table.to_csv": {"tf": 3.605551275463989}, "odfdo.Text": {"tf": 2.449489742783178}, "odfdo.Text.__init__": {"tf": 1.7320508075688772}, "odfdo.Text.parent": {"tf": 1.7320508075688772}, "odfdo.Text.is_text": {"tf": 1.7320508075688772}, "odfdo.Text.is_tail": {"tf": 1.7320508075688772}, "odfdo.TextChange": {"tf": 1.7320508075688772}, "odfdo.TextChange.get_id": {"tf": 1.7320508075688772}, "odfdo.TextChange.set_id": {"tf": 1.7320508075688772}, "odfdo.TextChange.get_changed_region": {"tf": 1.7320508075688772}, "odfdo.TextChange.get_change_info": {"tf": 1.7320508075688772}, "odfdo.TextChange.get_change_element": {"tf": 1.7320508075688772}, "odfdo.TextChange.get_deleted": {"tf": 2.449489742783178}, "odfdo.TextChange.get_inserted": {"tf": 1.7320508075688772}, "odfdo.TextChange.get_start": {"tf": 1.7320508075688772}, "odfdo.TextChange.get_end": {"tf": 1.7320508075688772}, "odfdo.TextChangeEnd": {"tf": 1.7320508075688772}, "odfdo.TextChangeEnd.get_start": {"tf": 1.7320508075688772}, "odfdo.TextChangeEnd.get_end": {"tf": 1.7320508075688772}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1.7320508075688772}, "odfdo.TextChangeEnd.get_inserted": {"tf": 3.7416573867739413}, "odfdo.TextChangeStart": {"tf": 1.7320508075688772}, "odfdo.TextChangeStart.get_start": {"tf": 1.7320508075688772}, "odfdo.TextChangeStart.get_end": {"tf": 1.7320508075688772}, "odfdo.TextChangeStart.delete": {"tf": 3.7416573867739413}, "odfdo.TextChangedRegion": {"tf": 2.6457513110645907}, "odfdo.TextChangedRegion.get_change_info": {"tf": 2.449489742783178}, "odfdo.TextChangedRegion.set_change_info": {"tf": 3.3166247903554}, "odfdo.TextChangedRegion.get_change_element": {"tf": 2.449489742783178}, "odfdo.TextChangedRegion.get_id": {"tf": 2.23606797749979}, "odfdo.TextChangedRegion.set_id": {"tf": 1.7320508075688772}, "odfdo.TextDeletion": {"tf": 3.872983346207417}, "odfdo.TextDeletion.get_deleted": {"tf": 3.3166247903554}, "odfdo.TextDeletion.set_deleted": {"tf": 3.1622776601683795}, "odfdo.TextDeletion.get_inserted": {"tf": 1.7320508075688772}, "odfdo.TextFormatChange": {"tf": 2.449489742783178}, "odfdo.TextInsertion": {"tf": 1.7320508075688772}, "odfdo.TextInsertion.get_deleted": {"tf": 1.7320508075688772}, "odfdo.TextInsertion.get_inserted": {"tf": 3.7416573867739413}, "odfdo.TextInsertion.get_change_info": {"tf": 2.449489742783178}, "odfdo.TextInsertion.set_change_info": {"tf": 3.3166247903554}, "odfdo.TocEntryTemplate": {"tf": 3.1622776601683795}, "odfdo.TocEntryTemplate.__init__": {"tf": 1.7320508075688772}, "odfdo.TocEntryTemplate.outline_level": {"tf": 1.7320508075688772}, "odfdo.TocEntryTemplate.complete_defaults": {"tf": 1.7320508075688772}, "odfdo.TocEntryTemplate.style": {"tf": 1.7320508075688772}, "odfdo.TrackedChanges": {"tf": 1.7320508075688772}, "odfdo.TrackedChanges.get_changed_regions": {"tf": 1.7320508075688772}, "odfdo.TrackedChanges.get_changed_region": {"tf": 1.7320508075688772}, "odfdo.UserDefined": {"tf": 3.1622776601683795}, "odfdo.UserDefined.__init__": {"tf": 1.7320508075688772}, "odfdo.UserDefined.name": {"tf": 1.7320508075688772}, "odfdo.UserDefined.style": {"tf": 1.7320508075688772}, "odfdo.UserFieldDecl": {"tf": 2.449489742783178}, "odfdo.UserFieldDecl.__init__": {"tf": 1.7320508075688772}, "odfdo.UserFieldDecl.set_value": {"tf": 1.7320508075688772}, "odfdo.UserFieldDecl.name": {"tf": 1.7320508075688772}, "odfdo.UserFieldDecls": {"tf": 2.449489742783178}, "odfdo.UserFieldGet": {"tf": 2.449489742783178}, "odfdo.UserFieldGet.__init__": {"tf": 1.7320508075688772}, "odfdo.UserFieldGet.name": {"tf": 1.7320508075688772}, "odfdo.UserFieldGet.style": {"tf": 1.7320508075688772}, "odfdo.UserFieldInput": {"tf": 2.449489742783178}, "odfdo.UserFieldInput.name": {"tf": 1.7320508075688772}, "odfdo.UserFieldInput.style": {"tf": 1.7320508075688772}, "odfdo.VarChapter": {"tf": 2.449489742783178}, "odfdo.VarChapter.__init__": {"tf": 1.7320508075688772}, "odfdo.VarChapter.DISPLAY_VALUE_CHOICE": {"tf": 1.7320508075688772}, "odfdo.VarChapter.display": {"tf": 1.7320508075688772}, "odfdo.VarChapter.outline_level": {"tf": 1.7320508075688772}, "odfdo.VarCreationDate": {"tf": 2.449489742783178}, "odfdo.VarCreationDate.__init__": {"tf": 1.7320508075688772}, "odfdo.VarCreationDate.fixed": {"tf": 1.7320508075688772}, "odfdo.VarCreationDate.data_style": {"tf": 1.7320508075688772}, "odfdo.VarCreationTime": {"tf": 2.449489742783178}, "odfdo.VarCreationTime.__init__": {"tf": 1.7320508075688772}, "odfdo.VarCreationTime.fixed": {"tf": 1.7320508075688772}, "odfdo.VarCreationTime.data_style": {"tf": 1.7320508075688772}, "odfdo.VarDate": {"tf": 2.449489742783178}, "odfdo.VarDate.__init__": {"tf": 1.7320508075688772}, "odfdo.VarDate.date": {"tf": 1.7320508075688772}, "odfdo.VarDate.fixed": {"tf": 1.7320508075688772}, "odfdo.VarDate.data_style": {"tf": 1.7320508075688772}, "odfdo.VarDate.date_adjust": {"tf": 1.7320508075688772}, "odfdo.VarDecl": {"tf": 2.449489742783178}, "odfdo.VarDecl.__init__": {"tf": 1.7320508075688772}, "odfdo.VarDecl.name": {"tf": 1.7320508075688772}, "odfdo.VarDecl.value_type": {"tf": 1.7320508075688772}, "odfdo.VarDecls": {"tf": 2.449489742783178}, "odfdo.VarDescription": {"tf": 2.449489742783178}, "odfdo.VarDescription.fixed": {"tf": 1.7320508075688772}, "odfdo.VarFileName": {"tf": 2.449489742783178}, "odfdo.VarFileName.__init__": {"tf": 1.7320508075688772}, "odfdo.VarFileName.DISPLAY_VALUE_CHOICE": {"tf": 1.7320508075688772}, "odfdo.VarFileName.display": {"tf": 1.7320508075688772}, "odfdo.VarFileName.fixed": {"tf": 1.7320508075688772}, "odfdo.VarGet": {"tf": 2.449489742783178}, "odfdo.VarGet.__init__": {"tf": 1.7320508075688772}, "odfdo.VarGet.name": {"tf": 1.7320508075688772}, "odfdo.VarGet.style": {"tf": 1.7320508075688772}, "odfdo.VarInitialCreator": {"tf": 2.449489742783178}, "odfdo.VarInitialCreator.__init__": {"tf": 1.7320508075688772}, "odfdo.VarInitialCreator.fixed": {"tf": 1.7320508075688772}, "odfdo.VarKeywords": {"tf": 2.449489742783178}, "odfdo.VarKeywords.fixed": {"tf": 1.7320508075688772}, "odfdo.VarPageCount": {"tf": 2.449489742783178}, "odfdo.VarPageNumber": {"tf": 2.449489742783178}, "odfdo.VarPageNumber.__init__": {"tf": 1.7320508075688772}, "odfdo.VarPageNumber.select_page": {"tf": 1.7320508075688772}, "odfdo.VarPageNumber.page_adjust": {"tf": 1.7320508075688772}, "odfdo.VarSet": {"tf": 2.449489742783178}, "odfdo.VarSet.__init__": {"tf": 1.7320508075688772}, "odfdo.VarSet.set_value": {"tf": 1.7320508075688772}, "odfdo.VarSet.name": {"tf": 1.7320508075688772}, "odfdo.VarSet.style": {"tf": 1.7320508075688772}, "odfdo.VarSet.display": {"tf": 1.7320508075688772}, "odfdo.VarSubject": {"tf": 2.449489742783178}, "odfdo.VarSubject.fixed": {"tf": 1.7320508075688772}, "odfdo.VarTime": {"tf": 2.449489742783178}, "odfdo.VarTime.__init__": {"tf": 1.7320508075688772}, "odfdo.VarTime.time": {"tf": 1.7320508075688772}, "odfdo.VarTime.fixed": {"tf": 1.7320508075688772}, "odfdo.VarTime.data_style": {"tf": 1.7320508075688772}, "odfdo.VarTime.time_adjust": {"tf": 1.7320508075688772}, "odfdo.VarTitle": {"tf": 2.449489742783178}, "odfdo.VarTitle.fixed": {"tf": 1.7320508075688772}, "odfdo.XmlPart": {"tf": 2.449489742783178}, "odfdo.XmlPart.__init__": {"tf": 1.7320508075688772}, "odfdo.XmlPart.part_name": {"tf": 1.7320508075688772}, "odfdo.XmlPart.container": {"tf": 1.7320508075688772}, "odfdo.XmlPart.root": {"tf": 1.7320508075688772}, "odfdo.XmlPart.get_elements": {"tf": 1.7320508075688772}, "odfdo.XmlPart.get_element": {"tf": 1.7320508075688772}, "odfdo.XmlPart.delete_element": {"tf": 1.7320508075688772}, "odfdo.XmlPart.xpath": {"tf": 1.7320508075688772}, "odfdo.XmlPart.clone": {"tf": 1.7320508075688772}, "odfdo.XmlPart.serialize": {"tf": 1.7320508075688772}, "odfdo.create_table_cell_style": {"tf": 4.358898943540674}, "odfdo.default_boolean_style": {"tf": 1.7320508075688772}, "odfdo.default_currency_style": {"tf": 1.7320508075688772}, "odfdo.default_date_style": {"tf": 1.7320508075688772}, "odfdo.default_frame_position_style": {"tf": 3}, "odfdo.default_number_style": {"tf": 1.7320508075688772}, "odfdo.default_percentage_style": {"tf": 1.7320508075688772}, "odfdo.default_time_style": {"tf": 1.7320508075688772}, "odfdo.default_toc_level_style": {"tf": 1.7320508075688772}, "odfdo.hex2rgb": {"tf": 3}, "odfdo.make_table_cell_border_string": {"tf": 3.4641016151377544}, "odfdo.rgb2hex": {"tf": 4.123105625617661}}, "df": 795, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "f": {"docs": {"odfdo": {"tf": 3.3166247903554}, "odfdo.Annotation": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.Bookmark": {"tf": 1}, "odfdo.BookmarkEnd": {"tf": 1}, "odfdo.BookmarkStart": {"tf": 1}, "odfdo.Column": {"tf": 1}, "odfdo.Container": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1}, "odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Document.new": {"tf": 1.4142135623730951}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.DrawPage": {"tf": 1}, "odfdo.Element": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1.7320508075688772}, "odfdo.Element.get_between": {"tf": 1.7320508075688772}, "odfdo.Element.strip_tags": {"tf": 1.7320508075688772}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.IndexTitleTemplate": {"tf": 1}, "odfdo.Link": {"tf": 1}, "odfdo.List": {"tf": 1}, "odfdo.ListItem": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Section": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1.4142135623730951}, "odfdo.TabStopStyle": {"tf": 1}, "odfdo.Table": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TocEntryTemplate": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 87, "d": {"docs": {}, "df": 0, "o": {"docs": {"odfdo": {"tf": 4.242640687119285}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}}, "df": 7}}}, "t": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}, "s": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Paragraph": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}}, "df": 3}}}}}}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.save": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1.4142135623730951}}, "df": 2}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}}, "df": 2}}}}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Span": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}}, "df": 9, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo": {"tf": 1}, "odfdo.Annotation": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Note": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}}, "df": 8}}, "y": {"docs": {"odfdo.List.__init__": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1}}, "df": 3}}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}}, "df": 2, "y": {"docs": {"odfdo.RowGroup.__init__": {"tf": 1}}, "df": 1}}}}}}, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 2}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Style.set_background": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "f": {"docs": {"odfdo": {"tf": 2.8284271247461903}, "odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.value": {"tf": 2}, "odfdo.Cell.float": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 2}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1.4142135623730951}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Column.style": {"tf": 1}, "odfdo.Container": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Container.get_parts": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1.4142135623730951}, "odfdo.Container.mimetype": {"tf": 1.4142135623730951}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Content": {"tf": 1.4142135623730951}, "odfdo.Content.get_styles": {"tf": 1.4142135623730951}, "odfdo.Document": {"tf": 2.8284271247461903}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.Document.meta": {"tf": 1}, "odfdo.Document.manifest": {"tf": 1}, "odfdo.Document.clone": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1.7320508075688772}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawPage": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element": {"tf": 1.7320508075688772}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.text": {"tf": 1}, "odfdo.Element.search": {"tf": 1.4142135623730951}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1.4142135623730951}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Element.get_between": {"tf": 2.23606797749979}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1.4142135623730951}, "odfdo.Element.strip_tags": {"tf": 1.7320508075688772}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.serialize": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1.7320508075688772}, "odfdo.Element.get_text_change": {"tf": 2}, "odfdo.Element.get_tocs": {"tf": 1.4142135623730951}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1.7320508075688772}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1.7320508075688772}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1.7320508075688772}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.List.__init__": {"tf": 1.4142135623730951}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.ListItem": {"tf": 1}, "odfdo.Manifest": {"tf": 1.4142135623730951}, "odfdo.Manifest.get_paths": {"tf": 1.4142135623730951}, "odfdo.Manifest.get_path_medias": {"tf": 1.4142135623730951}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Meta": {"tf": 1.4142135623730951}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1.7320508075688772}, "odfdo.NamedRange": {"tf": 3}, "odfdo.NamedRange.__init__": {"tf": 1.7320508075688772}, "odfdo.NamedRange.set_usage": {"tf": 1.4142135623730951}, "odfdo.NamedRange.name": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_range": {"tf": 1.4142135623730951}, "odfdo.NamedRange.get_values": {"tf": 1.4142135623730951}, "odfdo.NamedRange.get_value": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_values": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_value": {"tf": 1.4142135623730951}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 2}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 2.449489742783178}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_bookmark": {"tf": 2}, "odfdo.Reference": {"tf": 4}, "odfdo.Reference.__init__": {"tf": 2}, "odfdo.Reference.update": {"tf": 1}, "odfdo.ReferenceMarkEnd": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}, "odfdo.Row.__init__": {"tf": 1.4142135623730951}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 2.23606797749979}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1.4142135623730951}, "odfdo.Row.append": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 2.8284271247461903}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1.4142135623730951}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 2}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Spacer": {"tf": 1}, "odfdo.Span": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.get_properties": {"tf": 2}, "odfdo.Style.set_properties": {"tf": 2}, "odfdo.Style.set_background": {"tf": 1.7320508075688772}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles": {"tf": 1.4142135623730951}, "odfdo.Styles.get_styles": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 2.8284271247461903}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.Tab": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 2.449489742783178}, "odfdo.Table.height": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.size": {"tf": 1}, "odfdo.Table.name": {"tf": 1}, "odfdo.Table.style": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Table.get_values": {"tf": 3.1622776601683795}, "odfdo.Table.iter_values": {"tf": 2.23606797749979}, "odfdo.Table.set_values": {"tf": 2.449489742783178}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1.7320508075688772}, "odfdo.Table.get_rows": {"tf": 2}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1.7320508075688772}, "odfdo.Table.append_row": {"tf": 1.4142135623730951}, "odfdo.Table.get_row_values": {"tf": 2.449489742783178}, "odfdo.Table.set_row_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_row_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_cells": {"tf": 3}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell": {"tf": 1.4142135623730951}, "odfdo.Table.set_cells": {"tf": 2.6457513110645907}, "odfdo.Table.set_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 2.23606797749979}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1.7320508075688772}, "odfdo.Table.get_column_values": {"tf": 2}, "odfdo.Table.set_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_values": {"tf": 1.7320508075688772}, "odfdo.Table.get_named_ranges": {"tf": 2.23606797749979}, "odfdo.Table.get_named_range": {"tf": 1.4142135623730951}, "odfdo.Table.set_named_range": {"tf": 1.7320508075688772}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 2}, "odfdo.Table.del_span": {"tf": 1.7320508075688772}, "odfdo.Text": {"tf": 1.4142135623730951}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 2.23606797749979}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1.4142135623730951}, "odfdo.TextDeletion": {"tf": 1.7320508075688772}, "odfdo.TextInsertion": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TocEntryTemplate": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}, "odfdo.UserDefined": {"tf": 2}, "odfdo.UserFieldDecl": {"tf": 1.7320508075688772}, "odfdo.UserFieldDecls": {"tf": 1.7320508075688772}, "odfdo.UserFieldGet": {"tf": 1.7320508075688772}, "odfdo.UserFieldInput": {"tf": 1.7320508075688772}, "odfdo.VarChapter": {"tf": 1.7320508075688772}, "odfdo.VarCreationDate": {"tf": 1.7320508075688772}, "odfdo.VarCreationTime": {"tf": 1.7320508075688772}, "odfdo.VarDate": {"tf": 1.7320508075688772}, "odfdo.VarDecl": {"tf": 1.7320508075688772}, "odfdo.VarDecls": {"tf": 1.7320508075688772}, "odfdo.VarDescription": {"tf": 1.7320508075688772}, "odfdo.VarFileName": {"tf": 1.7320508075688772}, "odfdo.VarGet": {"tf": 1.7320508075688772}, "odfdo.VarInitialCreator": {"tf": 1.7320508075688772}, "odfdo.VarKeywords": {"tf": 1.7320508075688772}, "odfdo.VarPageCount": {"tf": 1.7320508075688772}, "odfdo.VarSet": {"tf": 1.7320508075688772}, "odfdo.VarSubject": {"tf": 1.7320508075688772}, "odfdo.VarTime": {"tf": 1.7320508075688772}, "odfdo.VarTitle": {"tf": 1.7320508075688772}, "odfdo.XmlPart": {"tf": 1.4142135623730951}, "odfdo.XmlPart.xpath": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 292, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 2, ":": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnnotationEnd": {"tf": 2.8284271247461903}}, "df": 1}}}}}}}}}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnnotationEnd": {"tf": 1.4142135623730951}, "odfdo.Element.get_office_names": {"tf": 1}}, "df": 2}}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.value": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}}, "df": 3}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ChangeInfo": {"tf": 1}}, "df": 1}}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.DrawFillImage.__init__": {"tf": 1}}, "df": 1}}}}}}, "e": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}, "b": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Element.document_body": {"tf": 1}}, "df": 1}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Paragraph.set_span": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_link": {"tf": 1.7320508075688772}}, "df": 2}}}}}, "r": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Annotation": {"tf": 1}, "odfdo.Annotation.end": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 2.23606797749979}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 2.23606797749979}, "odfdo.Cell.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.float": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1.7320508075688772}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Container.save": {"tf": 2}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1.7320508075688772}, "odfdo.Document": {"tf": 2}, "odfdo.Document.new": {"tf": 1.4142135623730951}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.add_file": {"tf": 2}, "odfdo.Document.save": {"tf": 2}, "odfdo.Document.get_style": {"tf": 1.7320508075688772}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 2}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.search": {"tf": 1.4142135623730951}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.7320508075688772}, "odfdo.Element.insert": {"tf": 1.4142135623730951}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1.7320508075688772}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1.4142135623730951}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1.7320508075688772}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.7320508075688772}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.List.__init__": {"tf": 2}, "odfdo.List.get_item": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1.7320508075688772}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 2}, "odfdo.NamedRange.set_usage": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_range": {"tf": 2.23606797749979}, "odfdo.Note": {"tf": 1.7320508075688772}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 3.3166247903554}, "odfdo.Paragraph.insert_annotation_end": {"tf": 2}, "odfdo.Paragraph.set_reference_mark": {"tf": 3}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 2.23606797749979}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 2.449489742783178}, "odfdo.Paragraph.set_bookmark": {"tf": 2.23606797749979}, "odfdo.Reference": {"tf": 2.6457513110645907}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1.4142135623730951}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1.4142135623730951}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 2}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1.4142135623730951}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Style.__init__": {"tf": 2.23606797749979}, "odfdo.Style.set_properties": {"tf": 1.4142135623730951}, "odfdo.Style.del_properties": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 2.449489742783178}, "odfdo.Style.set_page_header": {"tf": 2}, "odfdo.Style.set_page_footer": {"tf": 2}, "odfdo.Styles.get_style": {"tf": 2}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.append": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1.7320508075688772}, "odfdo.Table.iter_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1.4142135623730951}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_cell": {"tf": 1.4142135623730951}, "odfdo.Table.get_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell": {"tf": 1.4142135623730951}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1.7320508075688772}, "odfdo.Table.set_cell_image": {"tf": 2}, "odfdo.Table.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1.4142135623730951}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1.7320508075688772}, "odfdo.Table.set_span": {"tf": 2.23606797749979}, "odfdo.Table.del_span": {"tf": 2.23606797749979}, "odfdo.Table.to_csv": {"tf": 1.4142135623730951}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.7320508075688772}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion.set_change_info": {"tf": 2.23606797749979}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2}, "odfdo.TextDeletion.set_deleted": {"tf": 2}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.set_change_info": {"tf": 2.23606797749979}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.VarPageNumber": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 2.23606797749979}, "odfdo.default_frame_position_style": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 2}, "odfdo.rgb2hex": {"tf": 1.4142135623730951}}, "df": 219, "g": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"2": {"0": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "docs": {}, "df": 0}}}}}}}}}, "p": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 4}}}}, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Tab": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.TextDeletion": {"tf": 1}}, "df": 1}}}}}}}, "u": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1}, "odfdo.Container.save": {"tf": 1}}, "df": 2}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TOC": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "f": {"docs": {"odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}}, "df": 4}}}}}}, "n": {"docs": {"odfdo": {"tf": 1}, "odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1.4142135623730951}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 48, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}, "odfdo.Spacer": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Text": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 34}}, "e": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1.7320508075688772}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1.4142135623730951}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}}, "df": 28}, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextChangedRegion": {"tf": 1}}, "df": 1}}}, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}}, "df": 4}}, "b": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Container.save": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.save": {"tf": 1.4142135623730951}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Text": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}}, "df": 13, "s": {"docs": {"odfdo.Text": {"tf": 1}}, "df": 1}}}}}}, "w": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Document.get_part": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 3}}, "c": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Element.replace": {"tf": 1}}, "df": 1}}}}}, "s": {"docs": {"odfdo.TrackedChanges": {"tf": 1}}, "df": 1}}}}}, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Reference": {"tf": 1.4142135623730951}, "odfdo.Reference.update": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}}, "df": 9, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextDeletion": {"tf": 1}}, "df": 1}}}}}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}}, "df": 2}}}}, "p": {"1": {"docs": {"odfdo.ConnectorShape": {"tf": 1}, "odfdo.LineShape": {"tf": 1}}, "df": 2}, "2": {"docs": {"odfdo.ConnectorShape": {"tf": 1}, "odfdo.LineShape": {"tf": 1}}, "df": 2}, "6": {"docs": {}, "df": 0, ":": {"docs": {}, "df": 0, "r": {"1": {"2": {"docs": {"odfdo.Table.__init__": {"tf": 1.4142135623730951}}, "df": 1}, "docs": {}, "df": 0}, "docs": {}, "df": 0}}}, "docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"3": {"docs": {"odfdo": {"tf": 1}}, "df": 1}, "docs": {"odfdo": {"tf": 2.6457513110645907}, "odfdo.Cell.set_value": {"tf": 1.4142135623730951}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}}, "df": 25, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}}}}, "p": {"docs": {}, "df": 0, "i": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 2}}, "df": 1}}}}, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}}}}}}}}, "v": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.set_value": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}}, "df": 3, "d": {"docs": {"odfdo.Annotation": {"tf": 1.4142135623730951}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 23}}}}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnnotationEnd.__init__": {"tf": 1}}, "df": 1, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 2.8284271247461903}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.RowGroup": {"tf": 1}, "odfdo.Style.__init__": {"tf": 2.8284271247461903}, "odfdo.Style.get_properties": {"tf": 2}, "odfdo.Style.set_properties": {"tf": 2.449489742783178}, "odfdo.Style.del_properties": {"tf": 1.4142135623730951}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 8}}}, "y": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.strip_tags": {"tf": 1.4142135623730951}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TOC": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}}, "df": 2}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Table.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Table.transpose": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.set_named_range": {"tf": 1}}, "df": 5, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.save": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}}, "df": 2}}, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}, "e": {"docs": {}, "df": 0, "v": {"docs": {"odfdo.Element.insert": {"tf": 1}}, "df": 1, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "s": {"docs": {"odfdo": {"tf": 1}, "odfdo.AnimPar": {"tf": 1.4142135623730951}, "odfdo.AnimSeq": {"tf": 1.4142135623730951}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.VarPageNumber": {"tf": 1}}, "df": 5, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Paragraph.insert_annotation": {"tf": 1}}, "df": 1}}}}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Table.set_span": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnimPar": {"tf": 1.4142135623730951}, "odfdo.AnimSeq": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Document.get_type": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.DrawPage": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1}}, "df": 12, ":": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.merge_styles_from": {"tf": 1}}, "df": 1}}}}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}}, "df": 1, "d": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}, "odfdo.Spacer": {"tf": 1}}, "df": 2}}}}}}, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Document.save": {"tf": 1.4142135623730951}, "odfdo.TOC.fill": {"tf": 1}}, "df": 2}}}, "f": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Paragraph.set_reference_mark": {"tf": 1}}, "df": 1}}}}}}, "i": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.Style.set_level_style": {"tf": 1}}, "df": 1}, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Spacer": {"tf": 1}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "p": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "/": {"1": {"0": {"0": {"0": {"0": {"0": {"0": {"0": {"0": {"0": {"0": {"0": {"0": {"3": {"2": {"0": {"0": {"0": {"0": {"0": {"0": {"2": {"5": {"8": {"9": {"1": {"2": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "b": {"1": {"docs": {}, "df": 0, "c": {"3": {"docs": {"odfdo.Document.get_parts": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}}, "docs": {}, "df": 0}}}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "3": {"2": {"0": {"0": {"2": {"5": {"8": {"9": {"1": {"2": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "b": {"1": {"docs": {}, "df": 0, "c": {"3": {"docs": {"odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}}, "df": 3}, "docs": {}, "df": 0}}, "docs": {}, "df": 0}}}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}}}}}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "h": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1.4142135623730951}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1.4142135623730951}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1.4142135623730951}, "odfdo.Header": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 2.449489742783178}, "odfdo.PageBreak": {"tf": 1}, "odfdo.Reference": {"tf": 2.449489742783178}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.get_properties": {"tf": 1.7320508075688772}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1.4142135623730951}, "odfdo.TextDeletion": {"tf": 2.23606797749979}, "odfdo.TextDeletion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.set_deleted": {"tf": 1.7320508075688772}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1.4142135623730951}}, "df": 42, "s": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1}}, "df": 9}}}, "h": {"docs": {"odfdo.ChangeInfo": {"tf": 1}}, "df": 1}}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.TOC": {"tf": 1}}, "df": 1}}}}}}}, "t": {"docs": {"odfdo.Container.get_part": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Container.del_part": {"tf": 1}, "odfdo.Content": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.Document.meta": {"tf": 1}, "odfdo.Document.manifest": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Manifest": {"tf": 1}, "odfdo.Meta": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1.4142135623730951}, "odfdo.Styles": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.XmlPart": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 21, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}, "s": {"docs": {"odfdo.Document.save": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}}, "df": 2}}, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}}, "df": 4, "/": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}}}}, "r": {"docs": {"odfdo.Reference.update": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.TextInsertion": {"tf": 1.4142135623730951}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 7}}}}, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "n": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Element.search": {"tf": 1.4142135623730951}, "odfdo.Element.match": {"tf": 1.4142135623730951}, "odfdo.Element.replace": {"tf": 1.4142135623730951}}, "df": 4, "s": {"docs": {"odfdo.Element.replace": {"tf": 1}}, "df": 1}}}}}, "h": {"docs": {"odfdo.Container.clone": {"tf": 1}, "odfdo.Container.save": {"tf": 1.4142135623730951}, "odfdo.Document": {"tf": 1.7320508075688772}, "odfdo.Document.new": {"tf": 1.4142135623730951}, "odfdo.Document.path": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1.7320508075688772}, "odfdo.Document.set_part": {"tf": 1.4142135623730951}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Document.add_file": {"tf": 2}, "odfdo.Document.save": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1.4142135623730951}, "odfdo.Table.to_csv": {"tf": 1.4142135623730951}, "odfdo.VarFileName.__init__": {"tf": 1}}, "df": 16, "s": {"docs": {"odfdo.Manifest.get_paths": {"tf": 1}}, "df": 1}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage.__init__": {"tf": 3}, "odfdo.Document.get_style": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Document.add_page_break_style": {"tf": 1.4142135623730951}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.DrawPage": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 2.449489742783178}, "odfdo.Paragraph.insert_reference": {"tf": 1.7320508075688772}, "odfdo.PageBreak": {"tf": 1.7320508075688772}, "odfdo.Reference": {"tf": 1.7320508075688772}, "odfdo.Reference.__init__": {"tf": 1.4142135623730951}, "odfdo.Reference.update": {"tf": 1}, "odfdo.Style": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 3}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1.4142135623730951}, "odfdo.VarPageNumber": {"tf": 1.7320508075688772}}, "df": 20, "b": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "s": {"docs": {"odfdo.DrawPage": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}}, "df": 2}}}, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}}, "df": 3, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.replace_element": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.ListItem.__init__": {"tf": 1}}, "df": 1}}}, "w": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}}}}}, "d": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 2.23606797749979}, "odfdo.Style.__init__": {"tf": 2.23606797749979}, "odfdo.create_table_cell_style": {"tf": 3.872983346207417}}, "df": 3}}}}}, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Container.save": {"tf": 1}}, "df": 1}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Container.save": {"tf": 1.4142135623730951}, "odfdo.Document.save": {"tf": 1}}, "df": 2}}}}}}}, "i": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}}, "df": 4, "s": {"docs": {"odfdo.Manifest.get_path_medias": {"tf": 1}}, "df": 1}}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.insert": {"tf": 1.7320508075688772}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1.4142135623730951}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 2}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 2.23606797749979}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_reference_mark": {"tf": 2.23606797749979}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.7320508075688772}, "odfdo.Paragraph.insert_reference": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_bookmark": {"tf": 2.8284271247461903}, "odfdo.RectangleShape": {"tf": 1}, "odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1.4142135623730951}, "odfdo.Tab": {"tf": 1.7320508075688772}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1.7320508075688772}, "odfdo.Table.get_row": {"tf": 1.4142135623730951}, "odfdo.Table.set_row": {"tf": 1.4142135623730951}, "odfdo.Table.insert_row": {"tf": 1.4142135623730951}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1.4142135623730951}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_cells": {"tf": 1.4142135623730951}, "odfdo.Table.is_row_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1.7320508075688772}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1.4142135623730951}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1.7320508075688772}, "odfdo.Table.set_column": {"tf": 1.7320508075688772}, "odfdo.Table.insert_column": {"tf": 1.7320508075688772}, "odfdo.Table.append_column": {"tf": 1.4142135623730951}, "odfdo.Table.delete_column": {"tf": 1.7320508075688772}, "odfdo.Table.get_column_cells": {"tf": 1.7320508075688772}, "odfdo.Table.get_column_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_column_cells": {"tf": 1.7320508075688772}, "odfdo.Table.set_column_values": {"tf": 1.7320508075688772}, "odfdo.Table.is_column_empty": {"tf": 1.7320508075688772}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}}, "df": 90, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Frame.__init__": {"tf": 1}}, "df": 1}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}}, "df": 3}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}}, "df": 2}}}, "s": {"docs": {"odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Tab": {"tf": 1}}, "df": 9}, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}}, "df": 3}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.default_frame_position_style": {"tf": 1}}, "df": 1}}}}}}}}, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Document": {"tf": 1}}, "df": 1}}}, "y": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1}}, "df": 1}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.ConnectorShape": {"tf": 1.4142135623730951}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.ReferenceMark": {"tf": 1.4142135623730951}, "odfdo.ReferenceMark.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1}}, "df": 6, "s": {"docs": {"odfdo.ConnectorShape": {"tf": 1}}, "df": 1}}}}, "l": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.ChangeInfo.get_comments": {"tf": 1}}, "df": 1, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}}, "df": 19}}}}}}}, "s": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextDeletion": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}}, "df": 2}}}}, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TOC": {"tf": 1}}, "df": 1}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1.4142135623730951}}, "df": 2}}, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.save": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}, "odfdo.TextFormatChange": {"tf": 1.4142135623730951}}, "df": 11}}, "t": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}}, "df": 2}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Meta.set_keywords": {"tf": 1}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Container.save": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}}, "df": 3}}}}}, "s": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}}, "df": 8}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo": {"tf": 2.23606797749979}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.Content": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Element": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.Manifest": {"tf": 1}, "odfdo.Meta": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Styles": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}, "odfdo.XmlPart": {"tf": 1}}, "df": 34}}}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1.7320508075688772}}, "df": 1}}}}}, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.LineBreak": {"tf": 1}, "odfdo.LineShape": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 5, "s": {"docs": {"odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}}, "df": 2}}, "k": {"docs": {"odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Link": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_link": {"tf": 1.4142135623730951}}, "df": 7, "s": {"docs": {"odfdo.Element.get_links": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1.4142135623730951}}, "df": 3}}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Content.get_styles": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1}}, "df": 3}}, "s": {"docs": {"odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}}, "df": 2}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1.4142135623730951}, "odfdo.Container.get_parts": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1.4142135623730951}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.4142135623730951}, "odfdo.Element.strip_elements": {"tf": 1.4142135623730951}, "odfdo.Element.strip_tags": {"tf": 1.7320508075688772}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1.4142135623730951}, "odfdo.Element.get_list": {"tf": 1.4142135623730951}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.List": {"tf": 1}, "odfdo.List.__init__": {"tf": 2.6457513110645907}, "odfdo.List.get_items": {"tf": 1.4142135623730951}, "odfdo.List.get_item": {"tf": 1.4142135623730951}, "odfdo.ListItem": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1.4142135623730951}, "odfdo.Manifest.get_path_medias": {"tf": 1.4142135623730951}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.Reference": {"tf": 3.1622776601683795}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}, "odfdo.Row.get_cells": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 1.7320508075688772}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1.4142135623730951}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1.4142135623730951}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1.7320508075688772}, "odfdo.Table.get_rows": {"tf": 1.4142135623730951}, "odfdo.Table.extend_rows": {"tf": 1.4142135623730951}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.7320508075688772}, "odfdo.Table.set_cells": {"tf": 2}, "odfdo.Table.get_columns": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_cells": {"tf": 1.7320508075688772}, "odfdo.Table.set_column_values": {"tf": 1.7320508075688772}, "odfdo.Table.get_named_ranges": {"tf": 1.7320508075688772}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 102, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}, "d": {"docs": {"odfdo.Element.strip_tags": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1}}, "df": 2}}, "s": {"docs": {"odfdo.Element.get_lists": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1.7320508075688772}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1.7320508075688772}}, "df": 9}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Container.save": {"tf": 1.4142135623730951}, "odfdo.Document": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1.4142135623730951}, "odfdo.Document.save": {"tf": 1.4142135623730951}, "odfdo.Element.replace": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1.7320508075688772}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1.7320508075688772}, "odfdo.Table.del_span": {"tf": 1.7320508075688772}, "odfdo.Table.to_csv": {"tf": 1.4142135623730951}, "odfdo.Text": {"tf": 1}}, "df": 33}}}, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 2}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 4}}, "a": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Container.open": {"tf": 1}, "odfdo.Document": {"tf": 1}}, "df": 2, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.List.__init__": {"tf": 1}}, "df": 1}}}}}, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Table.to_csv": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Style": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Tab": {"tf": 1.4142135623730951}}, "df": 9}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.ConnectorShape": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.LineShape": {"tf": 1}, "odfdo.RectangleShape": {"tf": 1}}, "df": 5}}}, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Meta.get_language": {"tf": 1.4142135623730951}, "odfdo.Meta.set_language": {"tf": 1.7320508075688772}}, "df": 3}}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.insert": {"tf": 1}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2}}, "df": 8}}, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Reference": {"tf": 2.6457513110645907}}, "df": 1, "s": {"docs": {"odfdo.Reference": {"tf": 1}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1.4142135623730951}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1.4142135623730951}, "odfdo.create_table_cell_style": {"tf": 2}}, "df": 12}}, "t": {"docs": {"odfdo.TOC.fill": {"tf": 1}}, "df": 1, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}}, "df": 7, "s": {"docs": {"odfdo.NamedRange.__init__": {"tf": 1}}, "df": 1}}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Element.strip_tags": {"tf": 1.7320508075688772}, "odfdo.Header.__init__": {"tf": 1.7320508075688772}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1.4142135623730951}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 10, "s": {"docs": {"odfdo.Reference": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.TOC": {"tf": 1}}, "df": 3}}}}, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Paragraph.set_span": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_link": {"tf": 1.7320508075688772}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 7}}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.TextDeletion": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "x": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Element.from_tag": {"tf": 1.4142135623730951}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Text": {"tf": 1.4142135623730951}}, "df": 4}}}}, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo": {"tf": 2}, "odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1.4142135623730951}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BackgroundImage": {"tf": 1}, "odfdo.Bookmark": {"tf": 1}, "odfdo.BookmarkEnd": {"tf": 1}, "odfdo.BookmarkStart": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Container.del_part": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.DrawPage": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1.4142135623730951}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}, "odfdo.Header": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.7320508075688772}, "odfdo.Reference": {"tf": 2.23606797749979}, "odfdo.Reference.update": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 1.7320508075688772}, "odfdo.Spacer": {"tf": 1}, "odfdo.Style": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1.7320508075688772}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.TabStopStyle": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 2}, "odfdo.TrackedChanges": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 3.7416573867739413}, "odfdo.default_frame_position_style": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 77, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1.7320508075688772}, "odfdo.Container.save": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 2.23606797749979}, "odfdo.Reference": {"tf": 2.449489742783178}, "odfdo.Reference.__init__": {"tf": 1.7320508075688772}, "odfdo.Reference.ref_format": {"tf": 1.4142135623730951}, "odfdo.Reference.update": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 14, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.TOC": {"tf": 1}}, "df": 3}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1.4142135623730951}}, "df": 3}}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}}, "df": 2}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo": {"tf": 1.7320508075688772}}, "df": 1}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Cell.formula": {"tf": 1.4142135623730951}, "odfdo.Document.get_type": {"tf": 1}}, "df": 2}}}}, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.AnimTransFilter": {"tf": 1.4142135623730951}}, "df": 1}}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}}, "df": 2}}}, "l": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo": {"tf": 2}, "odfdo.Container.save": {"tf": 1}, "odfdo.Document.save": {"tf": 1.4142135623730951}}, "df": 3}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Document.insert_style": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1.4142135623730951}, "odfdo.Element.tail": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.Spacer": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}}, "df": 9}}}}}}}, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 49}}, "r": {"docs": {"odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 1}}, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 2}}, ":": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1.4142135623730951}}, "df": 1}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.create_table_cell_style": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 2}}}}}}}, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Note": {"tf": 1.4142135623730951}}, "df": 3}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Style.get_page_footer": {"tf": 1.4142135623730951}, "odfdo.Style.set_page_footer": {"tf": 1.7320508075688772}}, "df": 2}}}}}, "r": {"docs": {"odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Meta.get_language": {"tf": 1.4142135623730951}, "odfdo.Meta.set_language": {"tf": 1.4142135623730951}}, "df": 3, "o": {"docs": {}, "df": 0, "m": {"docs": {"odfdo": {"tf": 3.1622776601683795}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.clear": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.TOC": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1.4142135623730951}, "odfdo.UserDefined": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 46}, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Reference": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawFillImage": {"tf": 1.4142135623730951}, "odfdo.DrawImage": {"tf": 1.4142135623730951}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Frame": {"tf": 2.23606797749979}, "odfdo.Frame.__init__": {"tf": 2.6457513110645907}, "odfdo.Frame.image_frame": {"tf": 1.7320508075688772}, "odfdo.Frame.text_frame": {"tf": 1.7320508075688772}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1.7320508075688772}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 11, "s": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 5}}}}}, "e": {"docs": {}, "df": 0, "w": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}}, "df": 3}}}}}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 2.23606797749979}, "odfdo.Container": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Container.save": {"tf": 1.4142135623730951}, "odfdo.Document": {"tf": 1.7320508075688772}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.add_file": {"tf": 2}, "odfdo.Document.save": {"tf": 1.7320508075688772}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 2.23606797749979}}, "df": 10, "s": {"docs": {"odfdo": {"tf": 2}, "odfdo.Document.save": {"tf": 1}}, "df": 2}}, "l": {"docs": {"odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}}, "df": 3, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Row.__init__": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}}, "df": 3}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 1.7320508075688772}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}}, "df": 14, "s": {"docs": {"odfdo.Row.get_cells": {"tf": 1}}, "df": 1}}}}}, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}}, "df": 3}}, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.search": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1.4142135623730951}, "odfdo.List.__init__": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}}, "df": 18}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1.7320508075688772}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Reference.update": {"tf": 1.4142135623730951}, "odfdo.UserDefined": {"tf": 2}}, "df": 12, "s": {"docs": {"odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Reference": {"tf": 1.7320508075688772}}, "df": 3}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}}, "e": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 4}, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Element.from_tag": {"tf": 1}}, "df": 1}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1}}}}}}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.7320508075688772}, "odfdo.Content.get_styles": {"tf": 1.4142135623730951}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.7320508075688772}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1.4142135623730951}, "odfdo.Styles.get_style": {"tf": 1}}, "df": 12, "/": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_style": {"tf": 1}}, "df": 1}}}}}}, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Document.insert_style": {"tf": 1}}, "df": 1}}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.extend": {"tf": 1}}, "df": 1}}, "l": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.7320508075688772}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}}, "df": 10}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}}, "df": 2}, "t": {"docs": {"odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}}, "df": 2}}, "o": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Cell.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.float": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 23}}}, "y": {"docs": {"odfdo.Document.insert_style": {"tf": 1}}, "df": 1}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Document.add_file": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.VarFileName.__init__": {"tf": 1}}, "df": 7}}, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.PageBreak": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}}, "df": 10}}}}}}}, "f": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "f": {"0": {"0": {"docs": {"odfdo.rgb2hex": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "docs": {}, "df": 0}}}}, "i": {"docs": {"odfdo": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 6, "s": {"docs": {"odfdo": {"tf": 3.1622776601683795}, "odfdo.Annotation": {"tf": 1.4142135623730951}, "odfdo.Annotation.get_annotated": {"tf": 2}, "odfdo.Annotation.delete": {"tf": 1.4142135623730951}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 2}, "odfdo.Cell.__init__": {"tf": 1.7320508075688772}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1.7320508075688772}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.Cell.is_empty": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 2}, "odfdo.ChangeInfo.set_comments": {"tf": 1.4142135623730951}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Content.get_style": {"tf": 2}, "odfdo.Document": {"tf": 1.7320508075688772}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.Document.get_style": {"tf": 2}, "odfdo.Document.insert_style": {"tf": 1.7320508075688772}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1.4142135623730951}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.7320508075688772}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.delete": {"tf": 2}, "odfdo.Element.strip_tags": {"tf": 2.23606797749979}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1.4142135623730951}, "odfdo.Frame.__init__": {"tf": 2.449489742783178}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 2.6457513110645907}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 2.6457513110645907}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_spans": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 3.1622776601683795}, "odfdo.Paragraph.set_bookmark": {"tf": 1.7320508075688772}, "odfdo.Reference": {"tf": 3.1622776601683795}, "odfdo.Reference.__init__": {"tf": 1.7320508075688772}, "odfdo.Reference.update": {"tf": 1}, "odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1.4142135623730951}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1.4142135623730951}, "odfdo.Row.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Row.append_cell": {"tf": 1.4142135623730951}, "odfdo.Row.append": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 2.6457513110645907}, "odfdo.Row.rstrip": {"tf": 1.4142135623730951}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Spacer": {"tf": 1.7320508075688772}, "odfdo.Style.__init__": {"tf": 2}, "odfdo.Style.set_properties": {"tf": 1.7320508075688772}, "odfdo.Style.set_background": {"tf": 2.449489742783178}, "odfdo.Styles.get_style": {"tf": 2}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1.4142135623730951}, "odfdo.Tab": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 2.8284271247461903}, "odfdo.Table.set_values": {"tf": 2.449489742783178}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1.4142135623730951}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1.4142135623730951}, "odfdo.Table.set_row": {"tf": 1.7320508075688772}, "odfdo.Table.insert_row": {"tf": 2.23606797749979}, "odfdo.Table.append_row": {"tf": 2}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_cells": {"tf": 1.7320508075688772}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 2}, "odfdo.Table.set_cells": {"tf": 2.449489742783178}, "odfdo.Table.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Table.append_cell": {"tf": 1.7320508075688772}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1.7320508075688772}, "odfdo.Table.set_column": {"tf": 1.4142135623730951}, "odfdo.Table.insert_column": {"tf": 2}, "odfdo.Table.append_column": {"tf": 2}, "odfdo.Table.delete_column": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_cells": {"tf": 1.7320508075688772}, "odfdo.Table.get_column_values": {"tf": 2}, "odfdo.Table.set_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.is_column_empty": {"tf": 1.7320508075688772}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 2.449489742783178}, "odfdo.Table.del_span": {"tf": 1.7320508075688772}, "odfdo.Table.to_csv": {"tf": 1.7320508075688772}, "odfdo.TextChangeEnd.get_inserted": {"tf": 2}, "odfdo.TextChangeStart.delete": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion": {"tf": 1.4142135623730951}, "odfdo.TextDeletion": {"tf": 2.6457513110645907}, "odfdo.TextDeletion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1.7320508075688772}, "odfdo.TextInsertion.set_change_info": {"tf": 2}, "odfdo.TrackedChanges": {"tf": 1.4142135623730951}, "odfdo.UserDefined": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 3.1622776601683795}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 129, "o": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}}, "df": 3}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 4}}}}}}}}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}}, "df": 2}}}}, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.get_type": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1.7320508075688772}, "odfdo.DrawFillImage.__init__": {"tf": 1.7320508075688772}, "odfdo.DrawImage": {"tf": 1.7320508075688772}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 2.449489742783178}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 2}}, "df": 13, "s": {"docs": {"odfdo.Element.get_images": {"tf": 1}}, "df": 1}}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Element.tail": {"tf": 1}}, "df": 1}}}}}}}}}}, "n": {"docs": {"odfdo": {"tf": 2}, "odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1.4142135623730951}, "odfdo.Document.save": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.DrawFillImage": {"tf": 1.7320508075688772}, "odfdo.DrawImage": {"tf": 1.7320508075688772}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1.7320508075688772}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Reference": {"tf": 2.23606797749979}, "odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Spacer": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC": {"tf": 2}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1.7320508075688772}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1.7320508075688772}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.Text": {"tf": 1}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1.4142135623730951}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.set_deleted": {"tf": 1.4142135623730951}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TrackedChanges": {"tf": 2.8284271247461903}, "odfdo.VarPageNumber": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 84, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo": {"tf": 2}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 5, "s": {"docs": {"odfdo.Element.xpath": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 3}}}}}, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}}, "df": 6}}}}, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimSeq": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}}, "df": 4}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.4142135623730951}, "odfdo.Element.insert": {"tf": 1.7320508075688772}, "odfdo.Element.append": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1.4142135623730951}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}}, "df": 19, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 2}}, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}, "odfdo.TextInsertion": {"tf": 1}}, "df": 5}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 7}}, "/": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Paragraph.set_reference_mark_end": {"tf": 1}}, "df": 1}}}}}, "s": {"docs": {"odfdo.Paragraph.set_bookmark": {"tf": 1}}, "df": 1}}}}, "p": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.index": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {"odfdo.Cell.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1.4142135623730951}, "odfdo.List.get_item": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_link": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1.7320508075688772}, "odfdo.Row.__init__": {"tf": 1.4142135623730951}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1.4142135623730951}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1.4142135623730951}, "odfdo.Spacer.__init__": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 2}, "odfdo.TOC": {"tf": 1}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.height": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.size": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1.4142135623730951}, "odfdo.Table.traverse": {"tf": 1.4142135623730951}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1.4142135623730951}, "odfdo.Table.get_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell": {"tf": 1.4142135623730951}, "odfdo.Table.set_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell_image": {"tf": 1.4142135623730951}, "odfdo.Table.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1.4142135623730951}, "odfdo.Table.traverse_columns": {"tf": 1.4142135623730951}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.VarPageNumber": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 115, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}}, "df": 2}}}}}}, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell.formula": {"tf": 1}}, "df": 1}}}}}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}}, "df": 4}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Style.set_background": {"tf": 1}}, "df": 1}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.hex2rgb": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1}}, "df": 7}}, "f": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.set_change_info": {"tf": 2}}, "df": 3, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Column.__init__": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}, "odfdo.TextInsertion": {"tf": 1.4142135623730951}}, "df": 12, "s": {"docs": {"odfdo": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}}, "df": 6}}}}}}}}}}, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}}, "df": 1, "d": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Element.text_content": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2}}, "df": 6}}}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimPar": {"tf": 1}}, "df": 1}}}}}}, "x": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.TOC": {"tf": 1}}, "df": 9}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.AnimSeq": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}}, "df": 3, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnnotationEnd.__init__": {"tf": 1}}, "df": 1}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}}, "df": 2}}}}}}, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.DrawImage.__init__": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 2}}}}}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}}, "df": 5}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}}, "df": 16}}}}}}}}}, "d": {"docs": {"odfdo.AnimPar": {"tf": 1.4142135623730951}, "odfdo.ConnectorShape": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.LineShape": {"tf": 1}, "odfdo.Note": {"tf": 1.4142135623730951}, "odfdo.RectangleShape": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}}, "df": 17, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}}, "df": 4}, "s": {"docs": {"odfdo.NamedRange": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}}, "df": 4}}}, "y": {"docs": {"odfdo.TextChangedRegion": {"tf": 1}}, "df": 1}}, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}}, "df": 2}}}}}}}, "s": {"docs": {"odfdo.Element.get_changes_ids": {"tf": 1}}, "df": 1}, "x": {"docs": {"odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1.4142135623730951}}, "df": 4}}, "t": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1.4142135623730951}, "odfdo.Document": {"tf": 1}, "odfdo.Document.save": {"tf": 1.4142135623730951}, "odfdo.Document.get_style": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1.4142135623730951}, "odfdo.List.__init__": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Note": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Spacer": {"tf": 1.4142135623730951}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1.4142135623730951}, "odfdo.Style.set_page_footer": {"tf": 1.4142135623730951}, "odfdo.Styles.get_style": {"tf": 1.4142135623730951}, "odfdo.TOC.fill": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 2}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 41, "s": {"docs": {"odfdo.AnimSeq": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}}, "df": 9, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "f": {"docs": {"odfdo.Cell.style": {"tf": 1}, "odfdo.Column.style": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Row.style": {"tf": 1}}, "df": 4}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 2}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.strip_tags": {"tf": 1.4142135623730951}}, "df": 1}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.iter_values": {"tf": 1}}, "df": 1}, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Table.iter_values": {"tf": 1}}, "df": 1}}}}}, "m": {"docs": {"odfdo.List.__init__": {"tf": 1}, "odfdo.List.get_item": {"tf": 1.4142135623730951}, "odfdo.ListItem": {"tf": 1.4142135623730951}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Reference": {"tf": 3.3166247903554}}, "df": 5, "s": {"docs": {"odfdo.Frame.__init__": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}}, "df": 4}}}}, "f": {"docs": {"odfdo.Annotation": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 2.23606797749979}, "odfdo.Annotation.delete": {"tf": 1.4142135623730951}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.Cell.is_empty": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Content.get_style": {"tf": 2}, "odfdo.Document": {"tf": 1}, "odfdo.Document.get_style": {"tf": 2}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.get_between": {"tf": 2}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.delete": {"tf": 1.4142135623730951}, "odfdo.Element.strip_tags": {"tf": 1.4142135623730951}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1.4142135623730951}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1.7320508075688772}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 2}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 2}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_bookmark": {"tf": 1.7320508075688772}, "odfdo.Reference": {"tf": 1.7320508075688772}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1.4142135623730951}, "odfdo.Row.get_value": {"tf": 1.4142135623730951}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.get_values": {"tf": 2}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Spacer": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 2}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.__init__": {"tf": 2}, "odfdo.Table.get_values": {"tf": 2}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.rstrip": {"tf": 1.4142135623730951}, "odfdo.Table.transpose": {"tf": 1.4142135623730951}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1.4142135623730951}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.7320508075688772}, "odfdo.Table.get_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_cells": {"tf": 1.4142135623730951}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 2}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 2.23606797749979}, "odfdo.TextChangeStart.delete": {"tf": 1.4142135623730951}, "odfdo.TextDeletion": {"tf": 2}, "odfdo.TextDeletion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1.7320508075688772}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 3.4641016151377544}}, "df": 146}, "g": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}}, "df": 4}}}}}}, "o": {"docs": {"odfdo.Document.new": {"tf": 1}}, "df": 1}, "e": {"docs": {"odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}}, "df": 2}}, "a": {"1": {"docs": {"odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}}, "df": 6, ":": {"docs": {}, "df": 0, "b": {"2": {"docs": {"odfdo.NamedRange.set_range": {"tf": 1.4142135623730951}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}, "odfdo.Table.del_span": {"tf": 1.4142135623730951}}, "df": 3}, "docs": {}, "df": 0}}}, "2": {"docs": {}, "df": 0, ":": {"docs": {}, "df": 0, "b": {"5": {"docs": {"odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}}, "df": 2}, "docs": {}, "df": 0}}}, "4": {"docs": {"odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}}, "df": 10}, "docs": {"odfdo": {"tf": 3.605551275463989}, "odfdo.AnimPar": {"tf": 1}, "odfdo.AnimTransFilter": {"tf": 1.4142135623730951}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage.__init__": {"tf": 1.7320508075688772}, "odfdo.Cell.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.float": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1.7320508075688772}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.ConnectorShape": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Container.del_part": {"tf": 1}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Container.save": {"tf": 1.4142135623730951}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document": {"tf": 2.23606797749979}, "odfdo.Document.new": {"tf": 1.7320508075688772}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1.7320508075688772}, "odfdo.Document.save": {"tf": 1.7320508075688772}, "odfdo.Document.get_style": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1.7320508075688772}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1.4142135623730951}, "odfdo.DrawFillImage": {"tf": 1.4142135623730951}, "odfdo.DrawFillImage.__init__": {"tf": 1.4142135623730951}, "odfdo.DrawGroup": {"tf": 1.7320508075688772}, "odfdo.DrawImage": {"tf": 1.4142135623730951}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1.4142135623730951}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.7320508075688772}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1.4142135623730951}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1.7320508075688772}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.LineBreak": {"tf": 1}, "odfdo.LineShape": {"tf": 1}, "odfdo.List.__init__": {"tf": 2}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.ListItem": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1.4142135623730951}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.NamedRange": {"tf": 1.7320508075688772}, "odfdo.NamedRange.__init__": {"tf": 1.7320508075688772}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Note": {"tf": 1.4142135623730951}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.7320508075688772}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 2.23606797749979}, "odfdo.Paragraph.set_bookmark": {"tf": 2.449489742783178}, "odfdo.PageBreak": {"tf": 1}, "odfdo.RectangleShape": {"tf": 1}, "odfdo.Reference": {"tf": 2.8284271247461903}, "odfdo.Reference.__init__": {"tf": 2}, "odfdo.Reference.update": {"tf": 1}, "odfdo.ReferenceMark": {"tf": 2}, "odfdo.ReferenceMark.__init__": {"tf": 2}, "odfdo.ReferenceMarkEnd": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1.4142135623730951}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Spacer": {"tf": 1.7320508075688772}, "odfdo.Span": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.7320508075688772}, "odfdo.Style.get_properties": {"tf": 1.4142135623730951}, "odfdo.Style.set_properties": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 2}, "odfdo.Style.set_page_header": {"tf": 1.4142135623730951}, "odfdo.Style.set_page_footer": {"tf": 1.4142135623730951}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC": {"tf": 2.23606797749979}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1.7320508075688772}, "odfdo.Tab": {"tf": 1.7320508075688772}, "odfdo.TabStopStyle": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 2.23606797749979}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_cell": {"tf": 1.7320508075688772}, "odfdo.Table.get_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell": {"tf": 1.7320508075688772}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell_image": {"tf": 1.7320508075688772}, "odfdo.Table.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Table.delete_cell": {"tf": 1.4142135623730951}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1.4142135623730951}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}, "odfdo.Table.del_span": {"tf": 1.4142135623730951}, "odfdo.Table.to_csv": {"tf": 1.4142135623730951}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1.7320508075688772}, "odfdo.TextDeletion": {"tf": 3.3166247903554}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1.7320508075688772}, "odfdo.UserDefined": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.default_frame_position_style": {"tf": 1}, "odfdo.hex2rgb": {"tf": 1.4142135623730951}, "odfdo.make_table_cell_border_string": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1.7320508075688772}}, "df": 164, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}, "o": {"docs": {"odfdo": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}}, "df": 3, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Annotation": {"tf": 1}}, "df": 1}}}}}}}}}, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.Document.insert_style": {"tf": 2}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1.4142135623730951}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 7, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}}, "df": 4}}}}}}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}}}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1.4142135623730951}, "odfdo.Row.append": {"tf": 1.4142135623730951}, "odfdo.Table.append": {"tf": 1.7320508075688772}, "odfdo.Table.extend_rows": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}}, "df": 11, "i": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}}, "df": 2, "s": {"docs": {"odfdo.Reference": {"tf": 1.4142135623730951}}, "df": 1}}}}, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 9}, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}}, "df": 7, "s": {"docs": {"odfdo.default_frame_position_style": {"tf": 1}}, "df": 1}}}}}}}, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 4}, "d": {"docs": {"odfdo.RowGroup.__init__": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}}, "df": 3}}}}}}}}}, "i": {"docs": {"odfdo": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.7320508075688772}, "odfdo.Table.width": {"tf": 1}}, "df": 11}}, "f": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo": {"tf": 1}, "odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 2.23606797749979}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_reference_mark": {"tf": 2.23606797749979}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.7320508075688772}, "odfdo.Paragraph.insert_reference": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_bookmark": {"tf": 2}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}}, "df": 13, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.List.__init__": {"tf": 1}}, "df": 1}}}}}}}}}, "n": {"docs": {"odfdo": {"tf": 2.6457513110645907}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1.7320508075688772}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Content": {"tf": 1}, "odfdo.Document": {"tf": 2}, "odfdo.Document.clone": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1.7320508075688772}, "odfdo.DrawImage": {"tf": 1.7320508075688772}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.Element": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1.4142135623730951}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.4142135623730951}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.Manifest": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Meta": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1.4142135623730951}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.PageBreak": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Spacer": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1.4142135623730951}, "odfdo.Styles": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1.4142135623730951}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1.4142135623730951}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1.7320508075688772}, "odfdo.Table.del_span": {"tf": 1.7320508075688772}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.Text": {"tf": 1}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}, "odfdo.XmlPart": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 92, "d": {"docs": {"odfdo": {"tf": 2.6457513110645907}, "odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Annotation": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1.4142135623730951}, "odfdo.Document.get_part": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 2}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1.4142135623730951}, "odfdo.DrawPage": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.get_between": {"tf": 2.449489742783178}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1.7320508075688772}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.clear": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1.4142135623730951}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_bookmark": {"tf": 1.7320508075688772}, "odfdo.Reference": {"tf": 2.23606797749979}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Spacer": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.TOC": {"tf": 1.7320508075688772}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.__init__": {"tf": 2}, "odfdo.Table.size": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1.4142135623730951}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2.6457513110645907}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.set_change_info": {"tf": 1.4142135623730951}, "odfdo.VarChapter.__init__": {"tf": 1.4142135623730951}, "odfdo.VarFileName.__init__": {"tf": 1}}, "df": 85, "/": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Table.set_span": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1.4142135623730951}}, "df": 2}}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Annotation": {"tf": 1}, "odfdo.Annotation.end": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1.7320508075688772}, "odfdo.Annotation.delete": {"tf": 1.4142135623730951}, "odfdo.AnnotationEnd.__init__": {"tf": 2}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 3}, "odfdo.Paragraph.insert_annotation_end": {"tf": 2.23606797749979}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}}, "df": 14, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}}, "df": 2}}}, "s": {"docs": {"odfdo.Element.text_content": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}}, "df": 3}}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}}, "df": 1}}}}}}}, "y": {"docs": {"odfdo.Cell.formula": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Text": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.7320508075688772}}, "df": 19, "w": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.match": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1}}, "df": 1}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Frame.__init__": {"tf": 1.7320508075688772}}, "df": 1}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.meta": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.4142135623730951}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1.7320508075688772}, "odfdo.Reference": {"tf": 1.7320508075688772}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.TOC": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1.4142135623730951}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1.4142135623730951}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TrackedChanges": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 55, "a": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.get_properties": {"tf": 1.4142135623730951}, "odfdo.Style.set_properties": {"tf": 2}, "odfdo.Style.del_properties": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.iter_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.transpose": {"tf": 1.7320508075688772}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.7320508075688772}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 2.6457513110645907}, "odfdo.Table.del_span": {"tf": 2.6457513110645907}}, "df": 18}}, "g": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Content.get_style": {"tf": 1}, "odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.Style.del_properties": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 3}}, "df": 17, "s": {"docs": {"odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Annotation": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Bookmark": {"tf": 1}, "odfdo.BookmarkEnd": {"tf": 1}, "odfdo.BookmarkStart": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.ConnectorShape": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.IndexTitleTemplate": {"tf": 1}, "odfdo.LineShape": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Note": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.RectangleShape": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Reference.ref_format": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Section": {"tf": 1}, "odfdo.Spacer.__init__": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1.4142135623730951}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Tab.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TocEntryTemplate": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 2}, "odfdo.default_frame_position_style": {"tf": 1}, "odfdo.hex2rgb": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1}}, "df": 247}}}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}}, "df": 4}}}}}}, "b": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Reference": {"tf": 1}}, "df": 3}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Content": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Element": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.Manifest": {"tf": 1}, "odfdo.Meta": {"tf": 1}, "odfdo.Styles": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}, "odfdo.XmlPart": {"tf": 1}}, "df": 29}}}}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.TrackedChanges": {"tf": 1}}, "df": 1}}}}}, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}, "odfdo.BackgroundImage": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1.4142135623730951}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Element": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_tocs": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 2}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Spacer": {"tf": 1.4142135623730951}, "odfdo.Style": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1.7320508075688772}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.7320508075688772}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.TextDeletion": {"tf": 2}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 89, "o": {"docs": {}, "df": 0, "w": {"docs": {"odfdo": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 5, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.insert_style": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}}, "df": 3}}}}}, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Cell.repeated": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}}, "df": 7}}}}, "s": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}, "odfdo.TextInsertion": {"tf": 1}}, "df": 10}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}}, "df": 10}}}}}, "g": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.IndexTitle": {"tf": 1}, "odfdo.TOC": {"tf": 1}}, "df": 2}}}}}}}, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Meta.set_keywords": {"tf": 1}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}}, "p": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}}, "df": 3, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 14}}}}}}}}}}}, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "d": {"docs": {"odfdo.Container.set_part": {"tf": 1}, "odfdo.PageBreak": {"tf": 1}, "odfdo.VarPageNumber": {"tf": 1}}, "df": 3, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}}, "df": 2}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Row.width": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Reference": {"tf": 1.7320508075688772}}, "df": 1}}}}}}}, "s": {"docs": {"odfdo.Reference": {"tf": 1}}, "df": 1}}, "j": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document": {"tf": 1}, "odfdo.VarPageNumber": {"tf": 1}}, "df": 2, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Table.set_row": {"tf": 1}}, "df": 1}}}}}}}, "s": {"docs": {"odfdo": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1.4142135623730951}, "odfdo.Annotation.delete": {"tf": 1.4142135623730951}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.float": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Document.save": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 2}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1.4142135623730951}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.4142135623730951}, "odfdo.Element.delete": {"tf": 1.4142135623730951}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 2}, "odfdo.ReferenceMarkStart.delete": {"tf": 1.4142135623730951}, "odfdo.Row.traverse": {"tf": 2}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.set_properties": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 2.23606797749979}, "odfdo.Table.traverse": {"tf": 2}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 2.23606797749979}, "odfdo.Table.traverse_columns": {"tf": 2}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1.4142135623730951}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextChangeStart.delete": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TrackedChanges": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1.4142135623730951}}, "df": 60, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Meta.get_keywords": {"tf": 1}}, "df": 1}}}}}}}, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Tab": {"tf": 1}}, "df": 1}}}}}}}}}}, "t": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Document.save": {"tf": 1.4142135623730951}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1.4142135623730951}, "odfdo.Table.set_row": {"tf": 1.4142135623730951}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1.4142135623730951}, "odfdo.Table.delete_row": {"tf": 1.4142135623730951}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_cells": {"tf": 1.4142135623730951}, "odfdo.Table.is_row_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1.4142135623730951}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1.4142135623730951}, "odfdo.Table.set_column": {"tf": 1.4142135623730951}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1.4142135623730951}, "odfdo.Table.delete_column": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.is_column_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 56, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnnotationEnd": {"tf": 1.4142135623730951}, "odfdo.Cell.value": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 2}, "odfdo.Reference.__init__": {"tf": 1.4142135623730951}, "odfdo.Reference.ref_format": {"tf": 1}, "odfdo.Tab": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1.4142135623730951}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 16, "s": {"docs": {"odfdo.DrawGroup": {"tf": 1.4142135623730951}, "odfdo.Element.clear": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}}, "df": 7}}}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.TOC.fill": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}}, "df": 2}}}}}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ChangeInfo": {"tf": 1.4142135623730951}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}}, "df": 4}}}}}}}}, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.DrawGroup": {"tf": 1.4142135623730951}}, "df": 1, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}}, "df": 7}, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawImage.__init__": {"tf": 1}}, "df": 1}}}}, "s": {"docs": {"odfdo.TrackedChanges": {"tf": 1}}, "df": 1}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.set_style_attribute": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 17}}, "s": {"docs": {"odfdo.Text": {"tf": 1}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Table.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Element.replace": {"tf": 1}}, "df": 1}}}}}, "k": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}}, "df": 7}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}}, "df": 2}}}}}, "g": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Row.rstrip": {"tf": 1.4142135623730951}, "odfdo.Row.is_empty": {"tf": 1.4142135623730951}, "odfdo.Table.rstrip": {"tf": 1.4142135623730951}, "odfdo.Table.is_empty": {"tf": 1.4142135623730951}, "odfdo.Table.is_row_empty": {"tf": 1.4142135623730951}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 6}}}}}}}}}}, "t": {"docs": {"odfdo.Column.__init__": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}}, "df": 10, "h": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 3.872983346207417}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.Annotation": {"tf": 1.7320508075688772}, "odfdo.Annotation.end": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1.4142135623730951}, "odfdo.Annotation.delete": {"tf": 2}, "odfdo.AnnotationEnd": {"tf": 2.8284271247461903}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 3.1622776601683795}, "odfdo.Cell.__init__": {"tf": 2.449489742783178}, "odfdo.Cell.value": {"tf": 3.1622776601683795}, "odfdo.Cell.float": {"tf": 1.4142135623730951}, "odfdo.Cell.string": {"tf": 1.4142135623730951}, "odfdo.Cell.set_value": {"tf": 2.23606797749979}, "odfdo.Cell.type": {"tf": 1.4142135623730951}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1.7320508075688772}, "odfdo.Cell.style": {"tf": 1.4142135623730951}, "odfdo.Cell.formula": {"tf": 1.7320508075688772}, "odfdo.Cell.is_empty": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 2}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.get_comments": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.set_comments": {"tf": 2}, "odfdo.Column.__init__": {"tf": 2.23606797749979}, "odfdo.Column.repeated": {"tf": 1.7320508075688772}, "odfdo.Column.style": {"tf": 1.4142135623730951}, "odfdo.Container": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Container.get_parts": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1.4142135623730951}, "odfdo.Container.mimetype": {"tf": 1}, "odfdo.Container.save": {"tf": 2}, "odfdo.Content": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1.7320508075688772}, "odfdo.Content.get_style": {"tf": 3}, "odfdo.Document": {"tf": 3}, "odfdo.Document.new": {"tf": 1.4142135623730951}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 2.23606797749979}, "odfdo.Document.set_part": {"tf": 2}, "odfdo.Document.del_part": {"tf": 1.4142135623730951}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.body": {"tf": 1.4142135623730951}, "odfdo.Document.meta": {"tf": 1.4142135623730951}, "odfdo.Document.manifest": {"tf": 1.4142135623730951}, "odfdo.Document.add_file": {"tf": 1.7320508075688772}, "odfdo.Document.clone": {"tf": 1}, "odfdo.Document.save": {"tf": 1.7320508075688772}, "odfdo.Document.get_style": {"tf": 2.8284271247461903}, "odfdo.Document.insert_style": {"tf": 3.1622776601683795}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1.4142135623730951}, "odfdo.Document.add_page_break_style": {"tf": 2.23606797749979}, "odfdo.DrawFillImage": {"tf": 1.4142135623730951}, "odfdo.DrawFillImage.__init__": {"tf": 1.7320508075688772}, "odfdo.DrawGroup": {"tf": 3.3166247903554}, "odfdo.DrawImage": {"tf": 1.4142135623730951}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.tag": {"tf": 1.7320508075688772}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.text": {"tf": 1.4142135623730951}, "odfdo.Element.tail": {"tf": 1.4142135623730951}, "odfdo.Element.search": {"tf": 2}, "odfdo.Element.match": {"tf": 1.7320508075688772}, "odfdo.Element.replace": {"tf": 2}, "odfdo.Element.index": {"tf": 1.4142135623730951}, "odfdo.Element.text_content": {"tf": 1.4142135623730951}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.delete": {"tf": 2}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1.4142135623730951}, "odfdo.Element.strip_tags": {"tf": 2.449489742783178}, "odfdo.Element.xpath": {"tf": 1.4142135623730951}, "odfdo.Element.clear": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1.4142135623730951}, "odfdo.Element.get_section": {"tf": 1.4142135623730951}, "odfdo.Element.get_paragraphs": {"tf": 1.4142135623730951}, "odfdo.Element.get_paragraph": {"tf": 1.4142135623730951}, "odfdo.Element.get_spans": {"tf": 1.4142135623730951}, "odfdo.Element.get_span": {"tf": 1.4142135623730951}, "odfdo.Element.get_headers": {"tf": 1.4142135623730951}, "odfdo.Element.get_header": {"tf": 1.4142135623730951}, "odfdo.Element.get_lists": {"tf": 1.4142135623730951}, "odfdo.Element.get_list": {"tf": 1.4142135623730951}, "odfdo.Element.get_frames": {"tf": 1.4142135623730951}, "odfdo.Element.get_frame": {"tf": 1.4142135623730951}, "odfdo.Element.get_images": {"tf": 1.4142135623730951}, "odfdo.Element.get_image": {"tf": 1.4142135623730951}, "odfdo.Element.get_tables": {"tf": 1.4142135623730951}, "odfdo.Element.get_table": {"tf": 1.4142135623730951}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1.4142135623730951}, "odfdo.Element.delete_named_range": {"tf": 1.4142135623730951}, "odfdo.Element.get_notes": {"tf": 1.4142135623730951}, "odfdo.Element.get_note": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotations": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_office_names": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_sets": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_set": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_set_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_field_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_defined_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_pages": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_page": {"tf": 1.4142135623730951}, "odfdo.Element.get_links": {"tf": 1.4142135623730951}, "odfdo.Element.get_link": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_marks_single": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_single": {"tf": 1.7320508075688772}, "odfdo.Element.get_reference_mark_starts": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_start": {"tf": 1.7320508075688772}, "odfdo.Element.get_reference_mark_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_end": {"tf": 1.7320508075688772}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Element.get_references": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_lines": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_line": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_rectangles": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_rectangle": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_ellipses": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_ellipse": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_connectors": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_connector": {"tf": 1.4142135623730951}, "odfdo.Element.get_tracked_changes": {"tf": 1.4142135623730951}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_deletion": {"tf": 1.7320508075688772}, "odfdo.Element.get_text_change_starts": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_start": {"tf": 1.7320508075688772}, "odfdo.Element.get_text_change_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_end": {"tf": 1.7320508075688772}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 2}, "odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1.4142135623730951}, "odfdo.Element.get_style": {"tf": 2.6457513110645907}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 2.449489742783178}, "odfdo.Frame.image_frame": {"tf": 2.23606797749979}, "odfdo.Frame.text_frame": {"tf": 2.449489742783178}, "odfdo.Frame.text_content": {"tf": 1.4142135623730951}, "odfdo.Frame.get_image": {"tf": 1.4142135623730951}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1.4142135623730951}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.IndexTitle": {"tf": 2.23606797749979}, "odfdo.List.__init__": {"tf": 1.7320508075688772}, "odfdo.List.get_items": {"tf": 1.4142135623730951}, "odfdo.List.get_item": {"tf": 1.7320508075688772}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Manifest": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1.4142135623730951}, "odfdo.Manifest.get_path_medias": {"tf": 1.4142135623730951}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Meta": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 2}, "odfdo.Meta.set_title": {"tf": 2}, "odfdo.Meta.get_description": {"tf": 1.4142135623730951}, "odfdo.Meta.get_comments": {"tf": 1.4142135623730951}, "odfdo.Meta.set_description": {"tf": 1.4142135623730951}, "odfdo.Meta.set_comments": {"tf": 1.4142135623730951}, "odfdo.Meta.get_subject": {"tf": 1.4142135623730951}, "odfdo.Meta.set_subject": {"tf": 1.4142135623730951}, "odfdo.Meta.get_language": {"tf": 1.4142135623730951}, "odfdo.Meta.set_language": {"tf": 1.4142135623730951}, "odfdo.Meta.get_modification_date": {"tf": 1.4142135623730951}, "odfdo.Meta.set_modification_date": {"tf": 1.4142135623730951}, "odfdo.Meta.get_creation_date": {"tf": 1.4142135623730951}, "odfdo.Meta.set_creation_date": {"tf": 1.4142135623730951}, "odfdo.Meta.get_initial_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_initial_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.get_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.get_keywords": {"tf": 2}, "odfdo.Meta.set_keywords": {"tf": 1.7320508075688772}, "odfdo.Meta.get_editing_duration": {"tf": 1.7320508075688772}, "odfdo.Meta.set_editing_duration": {"tf": 1.4142135623730951}, "odfdo.Meta.get_editing_cycles": {"tf": 1.7320508075688772}, "odfdo.Meta.set_editing_cycles": {"tf": 1.4142135623730951}, "odfdo.Meta.get_generator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_generator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_generator_default": {"tf": 1.4142135623730951}, "odfdo.Meta.get_statistic": {"tf": 1.4142135623730951}, "odfdo.Meta.set_statistic": {"tf": 1.4142135623730951}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1.4142135623730951}, "odfdo.NamedRange": {"tf": 3.1622776601683795}, "odfdo.NamedRange.__init__": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_usage": {"tf": 1.4142135623730951}, "odfdo.NamedRange.name": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_table_name": {"tf": 2}, "odfdo.NamedRange.set_range": {"tf": 1.4142135623730951}, "odfdo.NamedRange.get_values": {"tf": 2}, "odfdo.NamedRange.get_value": {"tf": 2}, "odfdo.NamedRange.set_values": {"tf": 2}, "odfdo.NamedRange.set_value": {"tf": 2}, "odfdo.Note": {"tf": 1.4142135623730951}, "odfdo.Paragraph": {"tf": 1.4142135623730951}, "odfdo.Paragraph.__init__": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation": {"tf": 3.4641016151377544}, "odfdo.Paragraph.insert_annotation_end": {"tf": 2}, "odfdo.Paragraph.set_reference_mark": {"tf": 3.3166247903554}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 2}, "odfdo.Paragraph.set_span": {"tf": 1.7320508075688772}, "odfdo.Paragraph.remove_spans": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_span": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_link": {"tf": 1.7320508075688772}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 3.3166247903554}, "odfdo.Paragraph.set_bookmark": {"tf": 2.8284271247461903}, "odfdo.PageBreak": {"tf": 1}, "odfdo.Reference": {"tf": 6.782329983125268}, "odfdo.Reference.__init__": {"tf": 2.6457513110645907}, "odfdo.Reference.ref_format": {"tf": 1}, "odfdo.Reference.update": {"tf": 1.7320508075688772}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 2.6457513110645907}, "odfdo.ReferenceMarkStart.delete": {"tf": 2}, "odfdo.Row.__init__": {"tf": 1.4142135623730951}, "odfdo.Row.repeated": {"tf": 1.7320508075688772}, "odfdo.Row.style": {"tf": 1.4142135623730951}, "odfdo.Row.width": {"tf": 1.4142135623730951}, "odfdo.Row.traverse": {"tf": 1.4142135623730951}, "odfdo.Row.get_cells": {"tf": 2}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 2}, "odfdo.Row.set_cell": {"tf": 1.7320508075688772}, "odfdo.Row.set_value": {"tf": 1.4142135623730951}, "odfdo.Row.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Row.append_cell": {"tf": 2.23606797749979}, "odfdo.Row.append": {"tf": 2.23606797749979}, "odfdo.Row.delete_cell": {"tf": 2}, "odfdo.Row.get_values": {"tf": 2.449489742783178}, "odfdo.Row.set_cells": {"tf": 2}, "odfdo.Row.set_values": {"tf": 2}, "odfdo.Row.rstrip": {"tf": 1.4142135623730951}, "odfdo.Row.is_empty": {"tf": 1.4142135623730951}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Spacer": {"tf": 2}, "odfdo.Span": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 3.1622776601683795}, "odfdo.Style.get_properties": {"tf": 2.23606797749979}, "odfdo.Style.set_properties": {"tf": 2.449489742783178}, "odfdo.Style.del_properties": {"tf": 1.7320508075688772}, "odfdo.Style.set_background": {"tf": 3}, "odfdo.Style.get_page_header": {"tf": 1.4142135623730951}, "odfdo.Style.set_page_header": {"tf": 2}, "odfdo.Style.get_page_footer": {"tf": 1.4142135623730951}, "odfdo.Style.set_page_footer": {"tf": 2}, "odfdo.Styles": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1.7320508075688772}, "odfdo.Styles.get_style": {"tf": 3}, "odfdo.TOC": {"tf": 3}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.TOC.fill": {"tf": 2}, "odfdo.Tab": {"tf": 3.1622776601683795}, "odfdo.Table.__init__": {"tf": 3.3166247903554}, "odfdo.Table.height": {"tf": 1.4142135623730951}, "odfdo.Table.width": {"tf": 1.7320508075688772}, "odfdo.Table.size": {"tf": 1.4142135623730951}, "odfdo.Table.name": {"tf": 1.4142135623730951}, "odfdo.Table.style": {"tf": 1.4142135623730951}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Table.get_values": {"tf": 2.8284271247461903}, "odfdo.Table.iter_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_values": {"tf": 3.3166247903554}, "odfdo.Table.rstrip": {"tf": 1.4142135623730951}, "odfdo.Table.transpose": {"tf": 2}, "odfdo.Table.is_empty": {"tf": 1.4142135623730951}, "odfdo.Table.traverse": {"tf": 1.4142135623730951}, "odfdo.Table.get_rows": {"tf": 2}, "odfdo.Table.get_row": {"tf": 1.4142135623730951}, "odfdo.Table.set_row": {"tf": 2.23606797749979}, "odfdo.Table.insert_row": {"tf": 1.7320508075688772}, "odfdo.Table.extend_rows": {"tf": 1.4142135623730951}, "odfdo.Table.append_row": {"tf": 2.6457513110645907}, "odfdo.Table.delete_row": {"tf": 1.4142135623730951}, "odfdo.Table.get_row_values": {"tf": 2}, "odfdo.Table.set_row_values": {"tf": 2}, "odfdo.Table.set_row_cells": {"tf": 2}, "odfdo.Table.is_row_empty": {"tf": 1.7320508075688772}, "odfdo.Table.get_cells": {"tf": 2.8284271247461903}, "odfdo.Table.get_cell": {"tf": 1.4142135623730951}, "odfdo.Table.get_value": {"tf": 2.23606797749979}, "odfdo.Table.set_cell": {"tf": 1.7320508075688772}, "odfdo.Table.set_cells": {"tf": 3.3166247903554}, "odfdo.Table.set_value": {"tf": 1.7320508075688772}, "odfdo.Table.set_cell_image": {"tf": 2.8284271247461903}, "odfdo.Table.insert_cell": {"tf": 2}, "odfdo.Table.append_cell": {"tf": 1.7320508075688772}, "odfdo.Table.delete_cell": {"tf": 1.7320508075688772}, "odfdo.Table.traverse_columns": {"tf": 1.4142135623730951}, "odfdo.Table.get_columns": {"tf": 1.4142135623730951}, "odfdo.Table.get_column": {"tf": 1.4142135623730951}, "odfdo.Table.set_column": {"tf": 1.4142135623730951}, "odfdo.Table.insert_column": {"tf": 1.4142135623730951}, "odfdo.Table.append_column": {"tf": 1.7320508075688772}, "odfdo.Table.delete_column": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_column_cells": {"tf": 2.23606797749979}, "odfdo.Table.set_column_values": {"tf": 2.23606797749979}, "odfdo.Table.is_column_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_named_ranges": {"tf": 2}, "odfdo.Table.get_named_range": {"tf": 2.23606797749979}, "odfdo.Table.set_named_range": {"tf": 2}, "odfdo.Table.delete_named_range": {"tf": 1.7320508075688772}, "odfdo.Table.set_span": {"tf": 2.6457513110645907}, "odfdo.Table.del_span": {"tf": 2}, "odfdo.Table.to_csv": {"tf": 1.7320508075688772}, "odfdo.Text": {"tf": 1}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1.7320508075688772}, "odfdo.TextChangeEnd": {"tf": 1.7320508075688772}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextChangeStart": {"tf": 1.7320508075688772}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 2}, "odfdo.TextChangedRegion": {"tf": 3.4641016151377544}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextDeletion": {"tf": 5.0990195135927845}, "odfdo.TextDeletion.get_deleted": {"tf": 1.7320508075688772}, "odfdo.TextDeletion.set_deleted": {"tf": 1.4142135623730951}, "odfdo.TextFormatChange": {"tf": 1.7320508075688772}, "odfdo.TextInsertion": {"tf": 3}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_change_info": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.set_change_info": {"tf": 1.7320508075688772}, "odfdo.TrackedChanges": {"tf": 2.23606797749979}, "odfdo.UserDefined": {"tf": 2.23606797749979}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarPageNumber": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}, "odfdo.XmlPart": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1.4142135623730951}, "odfdo.create_table_cell_style": {"tf": 3.3166247903554}, "odfdo.default_frame_position_style": {"tf": 1.7320508075688772}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 402, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}}, "df": 2, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Reference": {"tf": 1}}, "df": 1}}}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}, "odfdo.BackgroundImage": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1.4142135623730951}, "odfdo.Style": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}}, "df": 9}}, "i": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}}, "df": 2}}, "m": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 10, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}}, "df": 3}}}}}}}, "n": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}}, "df": 2}, "y": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}}, "df": 6}}, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 6}, "t": {"docs": {"odfdo": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 2}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1.7320508075688772}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1.7320508075688772}, "odfdo.TextDeletion": {"tf": 2.23606797749979}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1.7320508075688772}, "odfdo.TrackedChanges": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 73}}, "i": {"docs": {}, "df": 0, "s": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.LineBreak": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.PageBreak": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Spacer": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.7320508075688772}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 2.23606797749979}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 53}, "c": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}}, "df": 7}}, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}}, "df": 3}}}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}, "u": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Style.set_background": {"tf": 1}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}}, "s": {"docs": {"odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}}, "df": 4}}}, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}, "x": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1.7320508075688772}, "odfdo.Annotation": {"tf": 1.4142135623730951}, "odfdo.Annotation.get_annotated": {"tf": 2.23606797749979}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1.4142135623730951}, "odfdo.Cell.is_empty": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.set_comments": {"tf": 1.7320508075688772}, "odfdo.ConnectorShape": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Document.get_type": {"tf": 2}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.text": {"tf": 1}, "odfdo.Element.tail": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1.4142135623730951}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.get_between": {"tf": 2}, "odfdo.Element.insert": {"tf": 1.4142135623730951}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1.4142135623730951}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.clear": {"tf": 1}, "odfdo.Element.serialize": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_deletion": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_starts": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_start": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1.7320508075688772}, "odfdo.Frame.text_frame": {"tf": 2.8284271247461903}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1.4142135623730951}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.LineShape": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Note": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_bookmark": {"tf": 1.4142135623730951}, "odfdo.RectangleShape": {"tf": 1}, "odfdo.Reference": {"tf": 1.7320508075688772}, "odfdo.Reference.__init__": {"tf": 1.7320508075688772}, "odfdo.Reference.update": {"tf": 1.7320508075688772}, "odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Span": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.set_span": {"tf": 2}, "odfdo.Text": {"tf": 1.7320508075688772}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 2.23606797749979}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2.449489742783178}, "odfdo.TextDeletion.get_deleted": {"tf": 1.7320508075688772}, "odfdo.TextInsertion.get_inserted": {"tf": 2}, "odfdo.UserDefined": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 103, ":": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.get_between": {"tf": 2}, "odfdo.Header": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2.449489742783178}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 7}, "p": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.Element.get_between": {"tf": 2}, "odfdo.Paragraph": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2.449489742783178}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 9, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.IndexTitle": {"tf": 1}, "odfdo.TOC": {"tf": 1}}, "df": 2}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.IndexTitle": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1.4142135623730951}}, "df": 2}}}}}}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.List": {"tf": 1}, "odfdo.ListItem": {"tf": 1}, "odfdo.Style": {"tf": 1}}, "df": 4}}, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.LineBreak": {"tf": 1}}, "df": 1}}}}, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.Style": {"tf": 1}}, "df": 2}}}}}}}, "b": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Bookmark": {"tf": 1}, "odfdo.BookmarkEnd": {"tf": 1}, "odfdo.BookmarkStart": {"tf": 1}}, "df": 3}}}}}}}}, "a": {"docs": {"odfdo.Link": {"tf": 1}}, "df": 1, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.DrawGroup": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.tag": {"tf": 1}, "odfdo.Span": {"tf": 1}}, "df": 2}}}, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.IndexTitle": {"tf": 1}, "odfdo.TOC": {"tf": 1}}, "df": 2}}}}, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Section": {"tf": 1}}, "df": 1}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {"odfdo.Reference.__init__": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 2}, "odfdo.Reference": {"tf": 2.8284271247461903}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Reference.ref_format": {"tf": 1}, "odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.7320508075688772}}, "df": 20, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Reference.__init__": {"tf": 1}}, "df": 1}}}}}}}}}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.7320508075688772}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 2}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1.7320508075688772}, "odfdo.TextInsertion": {"tf": 1.7320508075688772}, "odfdo.TextInsertion.get_inserted": {"tf": 1.7320508075688772}}, "df": 18, "d": {"docs": {"odfdo.TextChangedRegion": {"tf": 1.7320508075688772}, "odfdo.TextInsertion": {"tf": 1}}, "df": 2}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.IndexTitle": {"tf": 1}, "odfdo.IndexTitleTemplate": {"tf": 1}}, "df": 2}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextInsertion": {"tf": 1}}, "df": 1}}}}}}}}, "d": {"docs": {"odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}}, "df": 3}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.IndexTitle": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.TOC": {"tf": 1}}, "df": 3}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TOC": {"tf": 1.4142135623730951}, "odfdo.TocEntryTemplate": {"tf": 1}}, "df": 2}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TextChangedRegion": {"tf": 1.4142135623730951}, "odfdo.TrackedChanges": {"tf": 1}}, "df": 2}}}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextDeletion": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.TextFormatChange": {"tf": 1}}, "df": 1}}}}}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.UserDefined": {"tf": 1}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Cell.__init__": {"tf": 1}}, "df": 1}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextChange": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TextChangeEnd": {"tf": 1}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 2}}}}}, "d": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextChangedRegion": {"tf": 1.4142135623730951}, "odfdo.TrackedChanges": {"tf": 1.4142135623730951}}, "df": 2}}}}}}}}}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}}, "df": 6}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1.4142135623730951}}, "df": 4}}}}}}}}}, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}}, "df": 3}}}}}}}}}}}}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Document": {"tf": 1.7320508075688772}, "odfdo.Document.new": {"tf": 2}, "odfdo.Document.get_type": {"tf": 2}, "odfdo.IndexTitleTemplate": {"tf": 1}, "odfdo.TocEntryTemplate": {"tf": 1}}, "df": 6, "s": {"docs": {"odfdo.Document": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "l": {"docs": {"odfdo": {"tf": 1}}, "df": 1}, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}, "r": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.from_tag": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.hex2rgb": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1}}, "df": 2}}}, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.NamedRange": {"tf": 1.7320508075688772}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}, "odfdo.Table.del_span": {"tf": 1.4142135623730951}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.hex2rgb": {"tf": 1.4142135623730951}, "odfdo.make_table_cell_border_string": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1.4142135623730951}}, "df": 26, "s": {"docs": {"odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}}, "df": 6}}}}}, "w": {"docs": {}, "df": 0, "o": {"docs": {"odfdo": {"tf": 1}, "odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}}, "df": 4}}, "o": {"docs": {"odfdo": {"tf": 3.3166247903554}, "odfdo.AnimTransFilter": {"tf": 1.4142135623730951}, "odfdo.Annotation": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1.7320508075688772}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1.7320508075688772}, "odfdo.Column.__init__": {"tf": 1.4142135623730951}, "odfdo.Container.save": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Document": {"tf": 2}, "odfdo.Document.new": {"tf": 1.4142135623730951}, "odfdo.Document.path": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1.4142135623730951}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.delete": {"tf": 2}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.PageBreak": {"tf": 1}, "odfdo.Reference": {"tf": 2}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 2}, "odfdo.ReferenceMarkStart.delete": {"tf": 2}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1.4142135623730951}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Spacer": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.7320508075688772}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Tab": {"tf": 1.7320508075688772}, "odfdo.Table.__init__": {"tf": 2.449489742783178}, "odfdo.Table.append": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.size": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 2}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 2.23606797749979}, "odfdo.Table.set_cell_image": {"tf": 1.4142135623730951}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1.7320508075688772}, "odfdo.Text": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 2}, "odfdo.TextChangedRegion": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2.8284271247461903}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}, "odfdo.VarPageNumber": {"tf": 1.4142135623730951}, "odfdo.XmlPart.xpath": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 121, "o": {"docs": {"odfdo.Table.rstrip": {"tf": 1}}, "df": 1, "l": {"docs": {"odfdo": {"tf": 1}}, "df": 1}, "k": {"docs": {"odfdo.TextDeletion": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}}, "df": 2}}, "p": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 2.23606797749979}}, "df": 6}, "c": {"docs": {"odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.TOC.fill": {"tf": 2}, "odfdo.TabStopStyle": {"tf": 1.4142135623730951}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 5, "s": {"docs": {"odfdo.TOC": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.UserDefined": {"tf": 1}}, "df": 1, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnimSeq": {"tf": 1}, "odfdo.AnimTransFilter": {"tf": 1}}, "df": 2, "s": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}}, "df": 1, "d": {"docs": {"odfdo.Element.xpath": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 2}}}}}, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.transpose": {"tf": 1}}, "df": 1}}}}}}, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1.4142135623730951}}, "df": 5, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.TrackedChanges": {"tf": 2}}, "df": 1}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.TextDeletion": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.TextDeletion": {"tf": 2}}, "df": 1}}}}}}, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 2}, "odfdo.ChangeInfo.get_comments": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.7320508075688772}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.delete": {"tf": 1.7320508075688772}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1.4142135623730951}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 2}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Table.get_values": {"tf": 2.23606797749979}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}, "odfdo.TextChangeEnd.get_inserted": {"tf": 2}, "odfdo.TextChangeStart.delete": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1.7320508075688772}}, "df": 30}}, "e": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 5}}, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Reference": {"tf": 1}}, "df": 1}}}}}, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1.7320508075688772}, "odfdo.Cell.value": {"tf": 2}, "odfdo.Cell.set_value": {"tf": 2}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Document": {"tf": 2.23606797749979}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_field_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_defined_value": {"tf": 1.4142135623730951}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1.4142135623730951}, "odfdo.Row.get_cells": {"tf": 2}, "odfdo.Row.get_value": {"tf": 1.4142135623730951}, "odfdo.Row.set_value": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 3.3166247903554}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Table.get_values": {"tf": 3}, "odfdo.Table.iter_values": {"tf": 2}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_row_values": {"tf": 2.8284271247461903}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 2}, "odfdo.Table.get_value": {"tf": 1.7320508075688772}, "odfdo.Table.set_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell_image": {"tf": 1.7320508075688772}, "odfdo.Table.get_column_cells": {"tf": 2}, "odfdo.Table.get_column_values": {"tf": 2.8284271247461903}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.UserDefined": {"tf": 1.7320508075688772}}, "df": 45, "s": {"docs": {"odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}}, "df": 11, "/": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1}}}}}}}}}}, "d": {"docs": {"odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}}, "df": 2}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}}, "df": 2}}}, "e": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 26, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}}, "df": 3}}}}}, "s": {"docs": {"odfdo.Cell.repeated": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 9}}}, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1.7320508075688772}, "odfdo.IndexTitleTemplate": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1.4142135623730951}, "odfdo.Meta.set_title": {"tf": 1.7320508075688772}, "odfdo.TOC": {"tf": 2}}, "df": 10, "s": {"docs": {"odfdo.TOC.fill": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "a": {"docs": {"odfdo.AnimSeq": {"tf": 1}}, "df": 1, "g": {"1": {"docs": {"odfdo.Element.get_between": {"tf": 1.7320508075688772}}, "df": 1, "/": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"2": {"docs": {"odfdo.Element.get_between": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}}}}}, "2": {"docs": {"odfdo.Element.get_between": {"tf": 1.7320508075688772}}, "df": 1}, "docs": {"odfdo.Annotation.end": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1.7320508075688772}, "odfdo.Element.tag": {"tf": 1.4142135623730951}, "odfdo.Element.get_between": {"tf": 1.4142135623730951}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}}, "df": 17, "s": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.BackgroundImage": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.4142135623730951}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 2.23606797749979}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 2}, "odfdo.Style": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2}}, "df": 23}}, "b": {"docs": {"odfdo.Tab": {"tf": 2}}, "df": 1, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 2.8284271247461903}, "odfdo.Cell": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Column": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 2.23606797749979}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1.4142135623730951}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.NamedRange": {"tf": 2}, "odfdo.NamedRange.__init__": {"tf": 2}, "odfdo.NamedRange.name": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Row": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Row.append_cell": {"tf": 1.4142135623730951}, "odfdo.Row.append": {"tf": 1.4142135623730951}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Style.__init__": {"tf": 2.8284271247461903}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC": {"tf": 2}, "odfdo.Table": {"tf": 1}, "odfdo.Table.__init__": {"tf": 2.449489742783178}, "odfdo.Table.height": {"tf": 1}, "odfdo.Table.width": {"tf": 1.4142135623730951}, "odfdo.Table.size": {"tf": 1}, "odfdo.Table.name": {"tf": 1}, "odfdo.Table.style": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 2}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1.4142135623730951}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 2}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 2}, "odfdo.Table.get_named_range": {"tf": 1.4142135623730951}, "odfdo.Table.set_named_range": {"tf": 1.7320508075688772}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 62, ":": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell": {"tf": 1}, "odfdo.Column": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Row": {"tf": 1}, "odfdo.RowGroup": {"tf": 1}, "odfdo.Table": {"tf": 1}}, "df": 6}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.DrawGroup": {"tf": 1.7320508075688772}}, "df": 1}}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.NamedRange": {"tf": 1}}, "df": 1}}}}}}, "s": {"docs": {"odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1.4142135623730951}, "odfdo.Table.get_named_range": {"tf": 1}}, "df": 7}}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Tab": {"tf": 1}}, "df": 1}}}}}}}, "/": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {"odfdo.Tab": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Cell.is_empty": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.delete": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 7}}, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Container.save": {"tf": 1.4142135623730951}, "odfdo.Document.save": {"tf": 1.7320508075688772}, "odfdo.Link.__init__": {"tf": 1}}, "df": 3}}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}}, "df": 3}}}}}, "s": {"docs": {"odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 5, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 1.7320508075688772}, "odfdo.Element.get_between": {"tf": 1}}, "df": 2}}}}}, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BookmarkStart": {"tf": 1}, "odfdo.Element.insert": {"tf": 1.7320508075688772}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_marks": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_starts": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_start": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_changes": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change": {"tf": 1.4142135623730951}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 2.23606797749979}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1.7320508075688772}, "odfdo.Row.set_values": {"tf": 1.7320508075688772}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}}, "df": 60, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}}, "df": 13}}}, "s": {"docs": {"odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Reference": {"tf": 1}}, "df": 3}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.set_value": {"tf": 1}}, "df": 1}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.Meta.get_statistic": {"tf": 1.4142135623730951}, "odfdo.Meta.set_statistic": {"tf": 2.23606797749979}}, "df": 2}}}}}}}, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage": {"tf": 2.6457513110645907}, "odfdo.BackgroundImage.__init__": {"tf": 2.6457513110645907}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Column.__init__": {"tf": 2.23606797749979}, "odfdo.Column.style": {"tf": 1}, "odfdo.ConnectorShape": {"tf": 1.4142135623730951}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 2.23606797749979}, "odfdo.Document.get_style": {"tf": 2}, "odfdo.Document.insert_style": {"tf": 3.4641016151377544}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1.4142135623730951}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_rectangles": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_ellipses": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_connectors": {"tf": 1.4142135623730951}, "odfdo.Element.get_style": {"tf": 2}, "odfdo.EllipseShape": {"tf": 1.4142135623730951}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}, "odfdo.Header.__init__": {"tf": 1.4142135623730951}, "odfdo.IndexTitleTemplate": {"tf": 1}, "odfdo.LineShape": {"tf": 1.4142135623730951}, "odfdo.Link.__init__": {"tf": 1.4142135623730951}, "odfdo.List.__init__": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_span": {"tf": 1.7320508075688772}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.PageBreak": {"tf": 1.4142135623730951}, "odfdo.RectangleShape": {"tf": 1.4142135623730951}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1.4142135623730951}, "odfdo.Row.rstrip": {"tf": 1.4142135623730951}, "odfdo.Row.is_empty": {"tf": 1.4142135623730951}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Section": {"tf": 1}, "odfdo.Span": {"tf": 1}, "odfdo.Span.__init__": {"tf": 1}, "odfdo.Style": {"tf": 2.6457513110645907}, "odfdo.Style.__init__": {"tf": 2.6457513110645907}, "odfdo.Style.get_properties": {"tf": 1.7320508075688772}, "odfdo.Style.set_properties": {"tf": 2.23606797749979}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 2}, "odfdo.Style.set_level_style": {"tf": 1.7320508075688772}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 2.23606797749979}, "odfdo.TOC": {"tf": 1.7320508075688772}, "odfdo.Tab": {"tf": 1}, "odfdo.TabStopStyle": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.style": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.rstrip": {"tf": 1.4142135623730951}, "odfdo.Table.is_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1.4142135623730951}, "odfdo.TocEntryTemplate": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 3.7416573867739413}, "odfdo.default_frame_position_style": {"tf": 2.23606797749979}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 94, "s": {"docs": {"odfdo": {"tf": 3.1622776601683795}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1.7320508075688772}, "odfdo.Document.delete_styles": {"tf": 1.4142135623730951}, "odfdo.Document.merge_styles_from": {"tf": 1.7320508075688772}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1.4142135623730951}}, "df": 11}, ":": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.Style": {"tf": 1}}, "df": 2}}}}}, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.Style": {"tf": 1}}, "df": 2}}}}, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.Style": {"tf": 1}}, "df": 2}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.Style": {"tf": 1}}, "df": 2}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.Style": {"tf": 1}}, "df": 2}}}}}}}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.Style": {"tf": 1}, "odfdo.TabStopStyle": {"tf": 1}}, "df": 3, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 1}}}}}}}}}, "r": {"docs": {"odfdo.Annotation": {"tf": 1.7320508075688772}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 3.4641016151377544}, "odfdo.Bookmark": {"tf": 1}, "odfdo.BookmarkEnd": {"tf": 1}, "odfdo.BookmarkStart": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 2}, "odfdo.Cell.set_value": {"tf": 1.4142135623730951}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1.4142135623730951}, "odfdo.Column.style": {"tf": 1}, "odfdo.ConnectorShape": {"tf": 2.8284271247461903}, "odfdo.Container.mimetype": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1.4142135623730951}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1.4142135623730951}, "odfdo.Document.save": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1.7320508075688772}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 2}, "odfdo.DrawImage.__init__": {"tf": 2.23606797749979}, "odfdo.DrawPage.__init__": {"tf": 2.23606797749979}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1.4142135623730951}, "odfdo.Element.strip_tags": {"tf": 1.7320508075688772}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1.4142135623730951}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1.4142135623730951}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1.4142135623730951}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1.4142135623730951}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1.4142135623730951}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 2.23606797749979}, "odfdo.Element.get_frame": {"tf": 2.23606797749979}, "odfdo.Element.get_images": {"tf": 1.7320508075688772}, "odfdo.Element.get_image": {"tf": 1.7320508075688772}, "odfdo.Element.get_tables": {"tf": 1.4142135623730951}, "odfdo.Element.get_table": {"tf": 1.4142135623730951}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotations": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation": {"tf": 1.7320508075688772}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_page": {"tf": 1.4142135623730951}, "odfdo.Element.get_links": {"tf": 2}, "odfdo.Element.get_link": {"tf": 2}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_line": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_rectangles": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_rectangle": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_ellipses": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_ellipse": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_connectors": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_connector": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1.4142135623730951}, "odfdo.EllipseShape": {"tf": 2.8284271247461903}, "odfdo.Frame.__init__": {"tf": 3.1622776601683795}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.get_image": {"tf": 1.7320508075688772}, "odfdo.Header.__init__": {"tf": 1.4142135623730951}, "odfdo.IndexTitleTemplate": {"tf": 1}, "odfdo.LineShape": {"tf": 2.8284271247461903}, "odfdo.Link.__init__": {"tf": 2.449489742783178}, "odfdo.List.__init__": {"tf": 2}, "odfdo.List.get_items": {"tf": 1.4142135623730951}, "odfdo.List.get_item": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1.4142135623730951}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1.4142135623730951}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1.7320508075688772}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Note": {"tf": 1.7320508075688772}, "odfdo.Paragraph.__init__": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation": {"tf": 2.23606797749979}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 2}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_span": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_link": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 2}, "odfdo.Paragraph.set_bookmark": {"tf": 2}, "odfdo.RectangleShape": {"tf": 2.8284271247461903}, "odfdo.Reference.__init__": {"tf": 1.4142135623730951}, "odfdo.Reference.ref_format": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1.7320508075688772}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1.7320508075688772}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1.4142135623730951}, "odfdo.Section": {"tf": 1.4142135623730951}, "odfdo.Span.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 3.4641016151377544}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 2}, "odfdo.Style.set_level_style": {"tf": 2.23606797749979}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 2.23606797749979}, "odfdo.Table.__init__": {"tf": 1.7320508075688772}, "odfdo.Table.style": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1.7320508075688772}, "odfdo.Table.transpose": {"tf": 1.4142135623730951}, "odfdo.Table.get_rows": {"tf": 1.7320508075688772}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_row_cells": {"tf": 1.4142135623730951}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.7320508075688772}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1.7320508075688772}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1.4142135623730951}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1.7320508075688772}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1.7320508075688772}, "odfdo.Table.get_named_ranges": {"tf": 1.4142135623730951}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1.7320508075688772}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1.4142135623730951}, "odfdo.Text": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TocEntryTemplate": {"tf": 1}, "odfdo.UserDefined": {"tf": 2}, "odfdo.create_table_cell_style": {"tf": 3.872983346207417}, "odfdo.hex2rgb": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 2.23606797749979}, "odfdo.rgb2hex": {"tf": 1.4142135623730951}}, "df": 229, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.VarPageNumber": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 3.7416573867739413}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 39, "s": {"docs": {"odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 3}}}, "p": {"docs": {"odfdo.Element.strip_tags": {"tf": 2}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}}, "df": 3}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.strip_tags": {"tf": 1}}, "df": 1}}}}}, "/": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Meta.get_user_defined_metadata": {"tf": 1}}, "df": 1}}}}}}, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Style.set_background": {"tf": 1}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TOC": {"tf": 1}}, "df": 1}}}}}}}, "o": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Tab": {"tf": 1.4142135623730951}, "odfdo.TabStopStyle": {"tf": 1}}, "df": 3, "s": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.Style": {"tf": 1}}, "df": 2}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.body": {"tf": 1}, "odfdo.Document.meta": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}}, "df": 12}}}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Table.set_span": {"tf": 1}}, "df": 1}}}}, "o": {"docs": {"odfdo": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1.4142135623730951}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 30, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}}}}, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.get_between": {"tf": 1}}, "df": 1}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Annotation": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 9}}, "f": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1.7320508075688772}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}}, "df": 5}}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 4}}}}, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.float": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Column.style": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.text": {"tf": 1}, "odfdo.Element.tail": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1.4142135623730951}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1.4142135623730951}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_generator_default": {"tf": 1.4142135623730951}, "odfdo.Meta.set_statistic": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.name": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_value": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 2.6457513110645907}, "odfdo.Reference.ref_format": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.name": {"tf": 1}, "odfdo.Table.style": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 88, "u": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "s": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Cell.value": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}}, "df": 3, "s": {"docs": {"odfdo.Document.get_part": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}}, "df": 2}}}, "s": {"docs": {"odfdo.Element.get_variable_sets": {"tf": 1}}, "df": 1}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.replace_element": {"tf": 1}, "odfdo.Spacer": {"tf": 1.4142135623730951}}, "df": 2, "s": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Section": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 6, "s": {"docs": {"odfdo.Element.get_sections": {"tf": 1}}, "df": 1}}}}}}, "e": {"docs": {"odfdo": {"tf": 1.7320508075688772}, "odfdo.AnimTransFilter": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 15, "s": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 2}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimPar": {"tf": 1.4142135623730951}, "odfdo.AnimSeq": {"tf": 1.4142135623730951}, "odfdo.Reference": {"tf": 2}, "odfdo.Spacer": {"tf": 1.4142135623730951}}, "df": 4}}}}}}, "l": {"docs": {}, "df": 0, "f": {"docs": {"odfdo.Annotation.start": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.AnnotationEnd.end": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeStart.get_start": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 9}, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarPageNumber": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TOC": {"tf": 1}}, "df": 1}}}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Column.__init__": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}}, "df": 6}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}}, "df": 3}}}}}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.serialize": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}}, "df": 2}}}}}}}}}, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.RowGroup.__init__": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}}, "df": 13, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Text": {"tf": 1}}, "df": 1}}}}}}}, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}}, "df": 4}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 17}}}, "w": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.DrawImage.__init__": {"tf": 1}}, "df": 2}, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.path": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.size": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 23, "s": {"docs": {"odfdo.Document.get_part": {"tf": 1}}, "df": 1}}}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.AnnotationEnd": {"tf": 1.7320508075688772}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Spacer": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1.4142135623730951}}, "df": 6}}, "d": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 3}}}, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ConnectorShape": {"tf": 1.7320508075688772}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}, "odfdo.LineShape": {"tf": 1}, "odfdo.RectangleShape": {"tf": 1}}, "df": 14, "s": {"docs": {"odfdo.ConnectorShape": {"tf": 1}, "odfdo.DrawGroup": {"tf": 2}}, "df": 2}}}}, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}}, "df": 3}}}}}}, "a": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}}, "df": 4, "d": {"docs": {"odfdo.Document.save": {"tf": 1}}, "df": 1}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}, "e": {"docs": {"odfdo.AnnotationEnd": {"tf": 1.7320508075688772}, "odfdo.Container.save": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}}, "df": 18}}}, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo": {"tf": 1.7320508075688772}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextChangedRegion": {"tf": 1.7320508075688772}, "odfdo.TrackedChanges": {"tf": 2.449489742783178}}, "df": 2}}}}, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}}, "df": 1, "s": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1}, "odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Document.get_type": {"tf": 1.4142135623730951}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}}, "df": 9}}}}}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Span": {"tf": 1}, "odfdo.Table.set_span": {"tf": 2.23606797749979}, "odfdo.Table.del_span": {"tf": 1}}, "df": 10, "s": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1.4142135623730951}}, "df": 4}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Table.del_span": {"tf": 1}}, "df": 1}}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Spacer": {"tf": 2}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}}, "df": 3}, "d": {"docs": {"odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 6}}, "c": {"docs": {"odfdo.Style.set_background": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Text": {"tf": 1}}, "df": 1}}}, "y": {"docs": {"odfdo.Style.get_properties": {"tf": 1}}, "df": 1, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.create_table_cell_style": {"tf": 1}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Header": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}}, "df": 2}}}}}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.replace": {"tf": 1}}, "df": 1}}}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.AnimPar": {"tf": 1.4142135623730951}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.AnimTransFilter": {"tf": 2.6457513110645907}}, "df": 3}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimSeq": {"tf": 1}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "b": {"docs": {"odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}}, "df": 5, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.xpath": {"tf": 1}}, "df": 1}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.VarPageNumber": {"tf": 1}}, "df": 1}}}}}, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Element.from_tag": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1.4142135623730951}}, "df": 2}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}}, "df": 2}}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}}, "df": 4}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Reference": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Reference": {"tf": 1.7320508075688772}}, "df": 1}}}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}}, "df": 23, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.Reference": {"tf": 1.7320508075688772}, "odfdo.Reference.__init__": {"tf": 1.4142135623730951}}, "df": 3}}}}}}, "f": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.Style.set_level_style": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.TextDeletion": {"tf": 1}}, "df": 1}}}}}}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 12}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}}, "df": 2}}}, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Element.insert": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "z": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.EllipseShape": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1.7320508075688772}, "odfdo.RectangleShape": {"tf": 1}}, "df": 3}}, "g": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Style.set_background": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}}, "df": 3}}}}}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}}, "df": 1}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.create_table_cell_style": {"tf": 2}}, "df": 1}}}}, "v": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, ":": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}}}}, "y": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}}, "df": 3}}}}}, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Table.transpose": {"tf": 1}}, "df": 1}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.transpose": {"tf": 1}}, "df": 1}}}}}}, "h": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, ":": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "b": {"docs": {"odfdo": {"tf": 2}}, "df": 1}}}}}}}}}}, ":": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1}}}}}}}}, "m": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "#": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}}, "p": {"docs": {"odfdo.Tab": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.default_frame_position_style": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1.4142135623730951}, "odfdo.Element.get_between": {"tf": 1.7320508075688772}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1.4142135623730951}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1.4142135623730951}, "odfdo.Style.set_page_header": {"tf": 1.7320508075688772}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.get_deleted": {"tf": 1.7320508075688772}, "odfdo.TextDeletion.set_deleted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1.7320508075688772}}, "df": 12, "s": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 7}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1.4142135623730951}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 6, "s": {"docs": {"odfdo.Header": {"tf": 1}, "odfdo.TOC": {"tf": 1}}, "df": 2}}}}}}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.height": {"tf": 1}, "odfdo.Table.size": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}}, "df": 10}}}}, "x": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.hex2rgb": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1}}, "df": 2}}}}}}}}}}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Tab": {"tf": 1}}, "df": 1}}, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Text": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.AnimSeq": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1.4142135623730951}, "odfdo.DrawGroup": {"tf": 1.4142135623730951}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1.4142135623730951}, "odfdo.TextChangeStart": {"tf": 1.4142135623730951}, "odfdo.TextInsertion": {"tf": 1}}, "df": 14, "h": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}}, "df": 15}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Element.get_between": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}}, "df": 2}}}}, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Column.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}}, "df": 2, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}}}}}}, "o": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.Cell.set_value": {"tf": 1}}, "df": 1}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Tab": {"tf": 1}}, "df": 1}}}}}}}}}, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}}}}}, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}}, "df": 7}}}}}, "c": {"4": {"docs": {"odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 17}, "docs": {"odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 10, "o": {"docs": {}, "df": 0, "m": {"docs": {"odfdo": {"tf": 1}}, "df": 1, "/": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "o": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}, "l": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}}}}}, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.RowGroup": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 5}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 4, "s": {"docs": {"odfdo.ChangeInfo": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1.4142135623730951}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1.7320508075688772}}, "df": 9}}}}}, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {"odfdo": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}}, "df": 2}, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Row.get_values": {"tf": 2}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Table.get_values": {"tf": 2}, "odfdo.Table.iter_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}}, "df": 9}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Style.set_background": {"tf": 1}}, "df": 1}}}}}}}}, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1.4142135623730951}}, "df": 15, "s": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.Reference": {"tf": 1.4142135623730951}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1.4142135623730951}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}, "odfdo.TextInsertion": {"tf": 1}}, "df": 12}, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Document.path": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}}, "df": 9}, "d": {"docs": {"odfdo.DrawGroup": {"tf": 1.7320508075688772}, "odfdo.Reference": {"tf": 1.4142135623730951}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}}, "df": 4}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Span": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}}, "df": 6}}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1.7320508075688772}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Container.open": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1.4142135623730951}, "odfdo.Document.body": {"tf": 1.4142135623730951}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Element.text": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.List.__init__": {"tf": 1.4142135623730951}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1.4142135623730951}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation": {"tf": 2.6457513110645907}, "odfdo.Paragraph.set_reference_mark": {"tf": 2.6457513110645907}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_bookmark": {"tf": 2}, "odfdo.Reference": {"tf": 1.4142135623730951}, "odfdo.Reference.__init__": {"tf": 1.4142135623730951}, "odfdo.Reference.update": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 2.23606797749979}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.TOC": {"tf": 1.7320508075688772}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.7320508075688772}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TocEntryTemplate": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}}, "df": 85, "s": {"docs": {"odfdo.Element.get_tocs": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Reference": {"tf": 1.4142135623730951}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.TOC": {"tf": 1.7320508075688772}}, "df": 6}, "/": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}}, "df": 4}}}}}}}}}, "x": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Frame.__init__": {"tf": 1}}, "df": 1, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.TOC.fill": {"tf": 1}}, "df": 1}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 4}}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 3}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ChangeInfo.get_comments": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Table.set_span": {"tf": 1}}, "df": 1}}}}}}}}}}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.ConnectorShape": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}}, "df": 2, "s": {"docs": {"odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}}, "df": 2}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ConnectorShape": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}}, "df": 2}}}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.replace": {"tf": 1}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}}, "df": 19, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Row.is_empty": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 4}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Table.width": {"tf": 1}}, "df": 1}}}}}}}, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Tab": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Text": {"tf": 1}}, "df": 1}}}}}}}}, "f": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.TOC": {"tf": 1}}, "df": 1}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Annotation.end": {"tf": 1}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}}, "df": 6}}}, "s": {"docs": {"odfdo.TextChangedRegion": {"tf": 1}}, "df": 1}}}}}}, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.NamedRange.__init__": {"tf": 1}}, "df": 1}}}}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 2}, "odfdo.Column": {"tf": 1.4142135623730951}, "odfdo.Column.__init__": {"tf": 1.4142135623730951}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Column.style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Style.__init__": {"tf": 2}, "odfdo.Table.append": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1.7320508075688772}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 2}, "odfdo.Table.set_column": {"tf": 2}, "odfdo.Table.insert_column": {"tf": 2.23606797749979}, "odfdo.Table.append_column": {"tf": 2.23606797749979}, "odfdo.Table.delete_column": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1.4142135623730951}, "odfdo.Table.set_named_range": {"tf": 1}}, "df": 25, "s": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Column.__init__": {"tf": 2}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1.7320508075688772}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}}, "df": 14}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Style.set_background": {"tf": 1.7320508075688772}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.hex2rgb": {"tf": 1.4142135623730951}, "odfdo.make_table_cell_border_string": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1.7320508075688772}}, "df": 5}}}, "p": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Container.clone": {"tf": 1}, "odfdo.Document.clone": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}}, "df": 12}, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Document": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 4}, "d": {"docs": {"odfdo.Style.set_properties": {"tf": 1}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1}}, "df": 1}}, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Header.__init__": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 2.6457513110645907}, "odfdo.Meta.set_statistic": {"tf": 2.6457513110645907}}, "df": 3}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}}, "df": 2}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Row.get_cells": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 2.23606797749979}, "odfdo.Table.transpose": {"tf": 1.4142135623730951}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1.7320508075688772}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 2.23606797749979}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}}, "df": 17, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.NamedRange.__init__": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1.4142135623730951}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}}, "df": 10, "s": {"docs": {"odfdo.Row.get_cells": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 2}, "odfdo.Table.get_values": {"tf": 1.7320508075688772}, "odfdo.Table.iter_values": {"tf": 1.7320508075688772}, "odfdo.Table.transpose": {"tf": 1.4142135623730951}, "odfdo.Table.get_rows": {"tf": 1.7320508075688772}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Table.delete_cell": {"tf": 1.4142135623730951}, "odfdo.Table.get_columns": {"tf": 1}}, "df": 15}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.del_span": {"tf": 1}}, "df": 1}}}}}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}}, "df": 2}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}}, "df": 2}}, "d": {"docs": {"odfdo.Table.set_span": {"tf": 1}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Cell.__init__": {"tf": 1.7320508075688772}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Document.save": {"tf": 1.7320508075688772}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1.4142135623730951}, "odfdo.Reference": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}, "odfdo.Table.del_span": {"tf": 1.4142135623730951}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 29, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.replace": {"tf": 1}}, "df": 1}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}}, "df": 5}}, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Table.append": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}}, "df": 5, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.get_type": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}}, "df": 2}}}, "s": {"docs": {"odfdo.Paragraph.set_bookmark": {"tf": 1.4142135623730951}}, "df": 1}}}, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1.4142135623730951}, "odfdo.Reference.__init__": {"tf": 1}}, "df": 3}}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}}, "df": 3}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.TOC.fill": {"tf": 1}}, "df": 1}}}}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {"odfdo": {"tf": 1}, "odfdo.Cell.is_empty": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}}, "df": 3}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.Element.tag": {"tf": 1.4142135623730951}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change": {"tf": 1.4142135623730951}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 2.449489742783178}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1.7320508075688772}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2.449489742783178}, "odfdo.TextFormatChange": {"tf": 1.7320508075688772}, "odfdo.TextInsertion": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.set_change_info": {"tf": 2.23606797749979}, "odfdo.TrackedChanges": {"tf": 1}}, "df": 22, "s": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1.4142135623730951}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 2}}, "df": 12}, "d": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}}, "df": 8}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_change_info": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.set_change_info": {"tf": 1.7320508075688772}}, "df": 5}}}}}}}, "r": {"docs": {"odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.set_level_style": {"tf": 1}}, "df": 2, "t": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 4}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Spacer": {"tf": 1.4142135623730951}, "odfdo.Tab": {"tf": 1.4142135623730951}}, "df": 3, "s": {"docs": {"odfdo.Paragraph.set_bookmark": {"tf": 1.4142135623730951}, "odfdo.Spacer": {"tf": 1.7320508075688772}}, "df": 2}}}}}}}, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1.4142135623730951}, "odfdo.Reference.__init__": {"tf": 1}}, "df": 3}}}}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.insert": {"tf": 1.4142135623730951}, "odfdo.Element.delete": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}}, "df": 12, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Cell.is_empty": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.clear": {"tf": 1}}, "df": 4}}}, "s": {"docs": {"odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}}, "df": 2}}}}, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Paragraph.set_bookmark": {"tf": 1}}, "df": 1}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.AnimPar": {"tf": 1.4142135623730951}, "odfdo.AnimSeq": {"tf": 1}}, "df": 2}}}, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}, "odfdo.BackgroundImage": {"tf": 1}, "odfdo.Bookmark": {"tf": 1}, "odfdo.BookmarkEnd": {"tf": 1}, "odfdo.BookmarkStart": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Element": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1.4142135623730951}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.Link": {"tf": 1}, "odfdo.Note": {"tf": 1}, "odfdo.Style": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}}, "df": 40, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Element": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}}, "df": 23}}}}}, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1.4142135623730951}, "odfdo.Element.get_between": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 5, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 4}}}, "r": {"docs": {"odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Row.set_cells": {"tf": 1.4142135623730951}, "odfdo.Row.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}}, "df": 5, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}}, "df": 2}}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.replace_element": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}}, "df": 5, "d": {"docs": {"odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}}, "df": 4}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Annotation": {"tf": 1}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Annotation": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1.7320508075688772}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_initial_creator": {"tf": 1.7320508075688772}, "odfdo.Meta.get_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_creator": {"tf": 1.7320508075688772}, "odfdo.Paragraph.insert_annotation": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.set_change_info": {"tf": 1.4142135623730951}}, "df": 11}}, "e": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1.4142135623730951}, "odfdo.ConnectorShape": {"tf": 1}, "odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Document.new": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.LineShape": {"tf": 1}, "odfdo.List.__init__": {"tf": 1.7320508075688772}, "odfdo.ListItem.__init__": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.Paragraph.__init__": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.RectangleShape": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1.4142135623730951}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Span": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}}, "df": 31, "d": {"docs": {"odfdo.Document": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1.4142135623730951}, "odfdo.Table.append_row": {"tf": 1.4142135623730951}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Text": {"tf": 1}}, "df": 19}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.ListItem.__init__": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Reference": {"tf": 1}}, "df": 4}}}}}, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 2}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}}, "df": 53}}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.NamedRange": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}}, "df": 4}}}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Table.height": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.size": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}, "odfdo.VarPageNumber": {"tf": 1}}, "df": 11, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}}, "df": 2}}}, "c": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Cell.__init__": {"tf": 2.23606797749979}, "odfdo.Cell.set_value": {"tf": 1.7320508075688772}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1.4142135623730951}}, "df": 19}}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.Document": {"tf": 1}}, "df": 1}}}}, "t": {"docs": {"odfdo.Element.get_between": {"tf": 1}}, "df": 1}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell": {"tf": 1.4142135623730951}, "odfdo.Cell.__init__": {"tf": 2.23606797749979}, "odfdo.Cell.value": {"tf": 1.7320508075688772}, "odfdo.Cell.float": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 2}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.NamedRange": {"tf": 1.4142135623730951}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1.4142135623730951}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1.7320508075688772}, "odfdo.Row.get_cells": {"tf": 2}, "odfdo.Row.get_cell": {"tf": 1.7320508075688772}, "odfdo.Row.get_value": {"tf": 2}, "odfdo.Row.set_cell": {"tf": 1.4142135623730951}, "odfdo.Row.set_value": {"tf": 2}, "odfdo.Row.insert_cell": {"tf": 2.449489742783178}, "odfdo.Row.append_cell": {"tf": 2.449489742783178}, "odfdo.Row.append": {"tf": 2.449489742783178}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 3}, "odfdo.Row.set_values": {"tf": 1.4142135623730951}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.get_values": {"tf": 2.449489742783178}, "odfdo.Table.iter_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1.7320508075688772}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1.4142135623730951}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 2.23606797749979}, "odfdo.Table.set_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_cells": {"tf": 1.7320508075688772}, "odfdo.Table.get_cell": {"tf": 1.7320508075688772}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 2}, "odfdo.Table.set_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 2.23606797749979}, "odfdo.Table.append_cell": {"tf": 2.449489742783178}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 2.23606797749979}, "odfdo.Table.get_column_values": {"tf": 2.23606797749979}, "odfdo.Table.set_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.is_column_empty": {"tf": 1.4142135623730951}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 2.8284271247461903}, "odfdo.Table.del_span": {"tf": 2.449489742783178}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 73, "s": {"docs": {"odfdo.Column.__init__": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1.4142135623730951}, "odfdo.Row.width": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 2}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 2.23606797749979}, "odfdo.Row.set_cells": {"tf": 1.7320508075688772}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 2}, "odfdo.Table.get_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_values": {"tf": 1.7320508075688772}, "odfdo.Table.rstrip": {"tf": 1.7320508075688772}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1.4142135623730951}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 2.6457513110645907}, "odfdo.Table.set_cells": {"tf": 2.23606797749979}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1.7320508075688772}, "odfdo.Table.get_column_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}}, "df": 45}}}, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Style.set_background": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TrackedChanges": {"tf": 1}}, "df": 1}}}}}}, "y": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Meta.set_editing_cycles": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Note": {"tf": 1}}, "df": 1}}}}}}}, "s": {"docs": {}, "df": 0, "v": {"docs": {"odfdo.Table.to_csv": {"tf": 1.4142135623730951}}, "df": 1}}}, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Meta.set_keywords": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ChangeInfo.get_comments": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Column.__init__": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}}, "df": 4}}}, "p": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}}, "df": 4}}}, "d": {"docs": {"odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}}, "df": 4, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "@": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "p": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}, "r": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Meta.set_editing_duration": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Table.transpose": {"tf": 1}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TOC": {"tf": 1}}, "df": 1}}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}, "s": {"docs": {"odfdo.TextChangedRegion.set_change_info": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Cell.value": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Tab": {"tf": 1.4142135623730951}}, "df": 3}}}}}}}, "f": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.Annotation": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Document.save": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 2.6457513110645907}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.delete": {"tf": 1.4142135623730951}, "odfdo.Element.strip_tags": {"tf": 2}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 2.23606797749979}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1.7320508075688772}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1.7320508075688772}, "odfdo.create_table_cell_style": {"tf": 1.7320508075688772}, "odfdo.default_frame_position_style": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 51, "s": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 2}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Element.get_between": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}}, "df": 2}, "d": {"docs": {"odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1.7320508075688772}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.UserDefined": {"tf": 2}}, "df": 20}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Container.del_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2}}, "df": 9, "s": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}}, "df": 3}}}}, "e": {"docs": {"odfdo.Annotation.delete": {"tf": 1.4142135623730951}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1.4142135623730951}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1.4142135623730951}}, "df": 13, "d": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2.449489742783178}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1.4142135623730951}}, "df": 10}}}}}, "d": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell.__init__": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.get_part": {"tf": 1}}, "df": 1}}}}}}}, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}}, "df": 2}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}}, "df": 3, "s": {"docs": {"odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}}, "df": 5}}}}}}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}}, "df": 2}}}}}}}, "b": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Container.save": {"tf": 1}, "odfdo.Document.save": {"tf": 1}}, "df": 2}}}}}}}, "s": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 5}}}}, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Document": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1.4142135623730951}, "odfdo.Meta.set_comments": {"tf": 1.4142135623730951}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}}, "df": 11}}}}}}}}}, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.strip_tags": {"tf": 1}}, "df": 1}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Row.get_values": {"tf": 1}}, "df": 1}}}, "s": {"docs": {"odfdo.Table.set_cell_image": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {"odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}}, "df": 10, "c": {"docs": {"odfdo": {"tf": 2}, "odfdo.Table.set_cell_image": {"tf": 1}}, "df": 2, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 3}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Container.mimetype": {"tf": 1}, "odfdo.Container.save": {"tf": 1.4142135623730951}, "odfdo.Document": {"tf": 4.123105625617661}, "odfdo.Document.new": {"tf": 1.7320508075688772}, "odfdo.Document.path": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.meta": {"tf": 1}, "odfdo.Document.manifest": {"tf": 1}, "odfdo.Document.clone": {"tf": 1.4142135623730951}, "odfdo.Document.save": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1.7320508075688772}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.set_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1.4142135623730951}, "odfdo.Meta.set_language": {"tf": 1.4142135623730951}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_initial_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.get_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_generator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_generator_default": {"tf": 1.4142135623730951}, "odfdo.Meta.get_statistic": {"tf": 1.4142135623730951}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.PageBreak": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.TOC": {"tf": 1.7320508075688772}, "odfdo.TOC.fill": {"tf": 2}, "odfdo.Table.set_cell_image": {"tf": 1.4142135623730951}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}, "odfdo.UserDefined": {"tf": 1.7320508075688772}}, "df": 59, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo": {"tf": 1.7320508075688772}}, "df": 1}}}}}, "s": {"docs": {"odfdo": {"tf": 1}, "odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 3}}}}}}}, "n": {"docs": {"odfdo.Column.__init__": {"tf": 1.4142135623730951}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}}, "df": 8}, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Element.tag": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}}, "df": 4}}, "m": {"docs": {"odfdo.Element.insert": {"tf": 1}}, "df": 1}}, "r": {"3": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, ":": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}}}}, "docs": {"odfdo": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.ConnectorShape": {"tf": 1}, "odfdo.DrawPage": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1.7320508075688772}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.LineShape": {"tf": 1}, "odfdo.RectangleShape": {"tf": 1}}, "df": 17, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1.7320508075688772}, "odfdo.Style.__init__": {"tf": 1}}, "df": 5, "s": {"docs": {"odfdo.DrawPage": {"tf": 1}}, "df": 1}}}, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell_image": {"tf": 1}}, "df": 3}}}}}, ":": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}}, "df": 2}}}}, "d": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}, "f": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Frame": {"tf": 1}}, "df": 4}}}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.DrawFillImage.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}, "g": {"docs": {"odfdo.DrawGroup": {"tf": 2.23606797749979}}, "df": 1, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {"odfdo.DrawGroup": {"tf": 2.23606797749979}}, "df": 1}, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.DrawGroup": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}, "z": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.DrawPage": {"tf": 1}}, "df": 2}}, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}, "g": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}}}}, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}}, "df": 2}}}}}}}, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "f": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 4}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.tag": {"tf": 1}}, "df": 1, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}}, "df": 4}}}, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Frame": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}}, "df": 2}}}}}}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Content.get_style": {"tf": 1.4142135623730951}, "odfdo.Document.get_style": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.Reference": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}}, "df": 15, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell.set_value": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.set_span": {"tf": 1}}, "df": 5}}, "s": {"docs": {"odfdo.Reference": {"tf": 3.3166247903554}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Table.append": {"tf": 1}}, "df": 1}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.IndexTitle": {"tf": 1}, "odfdo.TOC": {"tf": 1}}, "df": 2}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.NamedRange.__init__": {"tf": 1}}, "df": 1}}}}, "c": {"docs": {"odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}}, "df": 1, "t": {"docs": {"odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1.4142135623730951}}, "df": 5}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Table.set_cell_image": {"tf": 1}}, "df": 1}}}}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Table.to_csv": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation": {"tf": 1.4142135623730951}, "odfdo.Cell.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1.7320508075688772}, "odfdo.Element.get_annotations": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1.4142135623730951}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1.4142135623730951}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.7320508075688772}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1.7320508075688772}}, "df": 35, "d": {"docs": {"odfdo.Annotation": {"tf": 1}}, "df": 1}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation": {"tf": 1.4142135623730951}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.set_creation_date": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 14}}}}}, "a": {"docs": {"odfdo.Document.meta": {"tf": 1}}, "df": 1, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.get_type": {"tf": 1}}, "df": 1}}}}}}}, "c": {"docs": {}, "df": 0, ":": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.dc_creator": {"tf": 1}}, "df": 1}}}}}}}, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.dc_date": {"tf": 1}}, "df": 1}}}}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}}, "df": 12}}}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo": {"tf": 1}}, "df": 1}, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}}, "df": 6}}}}}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnnotationEnd": {"tf": 1.4142135623730951}, "odfdo.Cell.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.value": {"tf": 2}, "odfdo.Cell.float": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1.4142135623730951}, "odfdo.Container.mimetype": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.set_style_attribute": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_field_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_defined_value": {"tf": 1.4142135623730951}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_value": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.7320508075688772}, "odfdo.Reference": {"tf": 2}, "odfdo.Reference.__init__": {"tf": 1.7320508075688772}, "odfdo.Row.get_value": {"tf": 1.7320508075688772}, "odfdo.Row.set_value": {"tf": 1.7320508075688772}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1.4142135623730951}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1.4142135623730951}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.is_row_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_value": {"tf": 1.4142135623730951}, "odfdo.Table.delete_cell": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.is_column_empty": {"tf": 1.4142135623730951}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.UserDefined": {"tf": 2}, "odfdo.create_table_cell_style": {"tf": 1.7320508075688772}}, "df": 55, "s": {"docs": {"odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_values": {"tf": 1.4142135623730951}, "odfdo.Reference": {"tf": 2.23606797749979}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.7320508075688772}, "odfdo.Row.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 2}, "odfdo.Table.iter_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 2.23606797749979}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_column_values": {"tf": 1.4142135623730951}}, "df": 20}}}}}, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Element.insert": {"tf": 1}}, "df": 1}}}}}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Link.__init__": {"tf": 1}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Reference.update": {"tf": 1}}, "df": 1}}}}, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Row.set_values": {"tf": 1}}, "df": 1}}}}, "w": {"3": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "k": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}}, "df": 4}}}}, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}, "d": {"docs": {"odfdo.Element.replace": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Meta.set_statistic": {"tf": 1}}, "df": 1}}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Element.replace": {"tf": 1}}, "df": 2}}}}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"odfdo": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}}, "df": 15}, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.body": {"tf": 1}, "odfdo.Document.meta": {"tf": 1}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}}, "df": 8}}, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Reference": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}}, "df": 3}}}}}, "o": {"docs": {"odfdo.ChangeInfo": {"tf": 1}}, "df": 1, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Column.__init__": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}}, "df": 2}}, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}}, "df": 2}}}, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Document": {"tf": 1}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1.4142135623730951}, "odfdo.Reference": {"tf": 2.449489742783178}, "odfdo.Tab": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1.4142135623730951}, "odfdo.TrackedChanges": {"tf": 1}}, "df": 10}}, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Spacer": {"tf": 1}}, "df": 1}}, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextDeletion": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.TOC": {"tf": 1}}, "df": 3, "e": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}}}}}}, "a": {"docs": {}, "df": 0, "y": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Cell.formula": {"tf": 1}}, "df": 2}, "s": {"docs": {"odfdo": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2.23606797749979}, "odfdo.TextDeletion.set_deleted": {"tf": 1}}, "df": 11}, "r": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_between": {"tf": 1}}, "df": 1, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Cell.value": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 8}}}}}, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}}, "df": 3}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"odfdo": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}}, "df": 2}}}, "e": {"docs": {"odfdo.Table.to_csv": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}}, "df": 2, "s": {"docs": {"odfdo.ReferenceMarkEnd.__init__": {"tf": 1}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.Annotation": {"tf": 1}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Note": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.PageBreak": {"tf": 1.4142135623730951}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.7320508075688772}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.RowGroup": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1.4142135623730951}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1.7320508075688772}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1.4142135623730951}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 63, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}}, "df": 6}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 3}}}}, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Document.merge_styles_from": {"tf": 1.4142135623730951}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1.4142135623730951}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1.4142135623730951}}, "df": 31}}, "d": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1.4142135623730951}, "odfdo.RowGroup.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.width": {"tf": 1.4142135623730951}, "odfdo.Table.size": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}}, "df": 10, "s": {"docs": {"odfdo.Table.width": {"tf": 1}}, "df": 1}}}}}, "e": {"docs": {"odfdo.Paragraph.set_bookmark": {"tf": 1.4142135623730951}}, "df": 1, "l": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Cell.__init__": {"tf": 1}}, "df": 1}}, "b": {"docs": {"odfdo.Document.get_type": {"tf": 1}}, "df": 1}, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 2}}}}}}, "r": {"docs": {"odfdo.hex2rgb": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1}}, "df": 2, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.TextDeletion": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "i": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Element.strip_tags": {"tf": 1}}, "df": 1}}}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.RectangleShape": {"tf": 1}}, "df": 2, "s": {"docs": {"odfdo.Element.get_draw_rectangles": {"tf": 1}}, "df": 1}}}}}}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.TextChangedRegion": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}, "s": {"docs": {"odfdo": {"tf": 1}, "odfdo.PageBreak": {"tf": 1}}, "df": 2}, "d": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 5}}}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}, "odfdo.AnimTransFilter": {"tf": 1.4142135623730951}}, "df": 2}}}}}, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.set_comments": {"tf": 1.7320508075688772}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.replace": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 17, "d": {"docs": {"odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}}, "df": 4}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Element.replace": {"tf": 1}}, "df": 1}}}}}, "s": {"docs": {"odfdo.Element.replace_element": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Element.append_named_range": {"tf": 1}}, "df": 1}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Spacer": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}}, "df": 5, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Container": {"tf": 1}, "odfdo.Content": {"tf": 1}, "odfdo.Element": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.Manifest": {"tf": 1}, "odfdo.Meta": {"tf": 1}, "odfdo.Styles": {"tf": 1}, "odfdo.Text": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}, "odfdo.XmlPart": {"tf": 1}, "odfdo.hex2rgb": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1}}, "df": 33}}}}}, "s": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.LineBreak": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.ReferenceMarkEnd": {"tf": 1}, "odfdo.ReferenceMarkStart": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}}, "df": 13}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}}, "df": 2}}}}}}}}, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.NamedRange.__init__": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_usage": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 2}, "odfdo.Table.set_named_range": {"tf": 1.4142135623730951}}, "df": 4, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1.4142135623730951}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1.7320508075688772}, "odfdo.Row.append": {"tf": 1.7320508075688772}, "odfdo.Table.append_row": {"tf": 1.4142135623730951}, "odfdo.Table.append_cell": {"tf": 1}}, "df": 10}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Row.width": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 5}}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Table.set_row": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}}, "df": 2}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1.7320508075688772}, "odfdo.Element.get_frame": {"tf": 1.7320508075688772}, "odfdo.Element.get_images": {"tf": 1.4142135623730951}, "odfdo.Element.get_image": {"tf": 1.4142135623730951}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1.4142135623730951}, "odfdo.Element.get_link": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1.4142135623730951}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 2}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 2}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_span": {"tf": 2}, "odfdo.Paragraph.set_link": {"tf": 2}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 2.23606797749979}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}}, "df": 49}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.7320508075688772}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}}, "df": 10}}}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1.7320508075688772}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}}, "df": 7}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.PageBreak": {"tf": 1}}, "df": 1}}}}}}, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}}, "df": 4, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Element.insert": {"tf": 1}}, "df": 1}}}}}}}, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.from_tag": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Annotation.start": {"tf": 1}, "odfdo.Annotation.end": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.AnnotationEnd.end": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.Cell.is_empty": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Column.style": {"tf": 1}, "odfdo.Container.mimetype": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1.4142135623730951}, "odfdo.Content.get_style": {"tf": 1.7320508075688772}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1.4142135623730951}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.Document.meta": {"tf": 1}, "odfdo.Document.manifest": {"tf": 1}, "odfdo.Document.get_formatted_text": {"tf": 1}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1.4142135623730951}, "odfdo.Document.clone": {"tf": 1.4142135623730951}, "odfdo.Document.get_style": {"tf": 1.7320508075688772}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.search": {"tf": 1.4142135623730951}, "odfdo.Element.match": {"tf": 1.4142135623730951}, "odfdo.Element.replace": {"tf": 1.7320508075688772}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1.4142135623730951}, "odfdo.Element.xpath": {"tf": 1}, "odfdo.Element.serialize": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1.4142135623730951}, "odfdo.Element.get_section": {"tf": 1.4142135623730951}, "odfdo.Element.get_paragraphs": {"tf": 1.4142135623730951}, "odfdo.Element.get_paragraph": {"tf": 1.4142135623730951}, "odfdo.Element.get_spans": {"tf": 1.4142135623730951}, "odfdo.Element.get_span": {"tf": 1.4142135623730951}, "odfdo.Element.get_headers": {"tf": 1.4142135623730951}, "odfdo.Element.get_header": {"tf": 1.4142135623730951}, "odfdo.Element.get_lists": {"tf": 1.4142135623730951}, "odfdo.Element.get_list": {"tf": 1.4142135623730951}, "odfdo.Element.get_frames": {"tf": 1.4142135623730951}, "odfdo.Element.get_frame": {"tf": 1.4142135623730951}, "odfdo.Element.get_images": {"tf": 1.4142135623730951}, "odfdo.Element.get_image": {"tf": 1.4142135623730951}, "odfdo.Element.get_tables": {"tf": 1.4142135623730951}, "odfdo.Element.get_table": {"tf": 1.4142135623730951}, "odfdo.Element.get_named_ranges": {"tf": 1.4142135623730951}, "odfdo.Element.get_named_range": {"tf": 1.4142135623730951}, "odfdo.Element.get_notes": {"tf": 1.4142135623730951}, "odfdo.Element.get_note": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotations": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_office_names": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_decls": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_decl_list": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_decl": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_sets": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_set": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_set_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_field_decls": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_field_decl_list": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_field_decl": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_field_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_defined_list": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_defined": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_defined_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_pages": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_page": {"tf": 1.4142135623730951}, "odfdo.Element.get_links": {"tf": 1.4142135623730951}, "odfdo.Element.get_link": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmarks": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmark": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmark_starts": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmark_start": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmark_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmark_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_marks_single": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_single": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_starts": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_start": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_marks": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Element.get_references": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_lines": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_line": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_rectangles": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_rectangle": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_ellipses": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_ellipse": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_connectors": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_connector": {"tf": 1.4142135623730951}, "odfdo.Element.get_orphan_draw_connectors": {"tf": 1}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_deletion": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_starts": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_start": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_changes": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change": {"tf": 1.4142135623730951}, "odfdo.Element.get_tocs": {"tf": 1.4142135623730951}, "odfdo.Element.get_toc": {"tf": 1.4142135623730951}, "odfdo.Element.get_style": {"tf": 1.7320508075688772}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1.4142135623730951}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.List.get_items": {"tf": 1.4142135623730951}, "odfdo.List.get_item": {"tf": 1.7320508075688772}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Manifest.get_paths": {"tf": 1.4142135623730951}, "odfdo.Manifest.get_path_medias": {"tf": 1.4142135623730951}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1.4142135623730951}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1.4142135623730951}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.PageBreak": {"tf": 1}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1.4142135623730951}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1.4142135623730951}, "odfdo.Styles.get_style": {"tf": 1.7320508075688772}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.Table.height": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.size": {"tf": 1}, "odfdo.Table.style": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.iter_values": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.7320508075688772}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextChangeStart.get_start": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_change_info": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.hex2rgb": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1}}, "df": 226, "s": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 2}, "odfdo.Element.get_between": {"tf": 1.7320508075688772}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1.4142135623730951}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.7320508075688772}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.make_table_cell_border_string": {"tf": 1.4142135623730951}}, "df": 28}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 2}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 11}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 3}}}}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Element.get_between": {"tf": 1}}, "df": 1}}}}}}, "e": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_text_change": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}}, "df": 10, "d": {"docs": {"odfdo.Reference.__init__": {"tf": 1}}, "df": 1}}}}}}}, "f": {"docs": {"odfdo.Element.get_references": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.7320508075688772}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1.4142135623730951}, "odfdo.Reference.ref_format": {"tf": 1}}, "df": 5, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_single": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_starts": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_start": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_marks": {"tf": 1.7320508075688772}, "odfdo.Element.get_reference_mark": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.7320508075688772}, "odfdo.Paragraph.insert_reference": {"tf": 2.8284271247461903}, "odfdo.Reference": {"tf": 3}, "odfdo.Reference.__init__": {"tf": 2.449489742783178}, "odfdo.Reference.update": {"tf": 1}, "odfdo.ReferenceMark": {"tf": 1.4142135623730951}, "odfdo.ReferenceMark.__init__": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkEnd": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1.7320508075688772}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 29, "s": {"docs": {"odfdo.Element.get_references": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 2.449489742783178}}, "df": 3}, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}}, "df": 2, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}}, "df": 2}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}}, "df": 2}}}}}}}, "d": {"docs": {"odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 3.7416573867739413}, "odfdo.TextChangedRegion": {"tf": 1.7320508075688772}}, "df": 4}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Note": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 2}}}}}}, "s": {"docs": {"odfdo.Element.get_changes_ids": {"tf": 1}, "odfdo.Tab": {"tf": 1}}, "df": 2}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Reference.update": {"tf": 1}}, "df": 1}}}}}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell.value": {"tf": 1}}, "df": 1, "y": {"docs": {"odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}}, "df": 2}, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}}, "df": 7}}}}}, "l": {"docs": {"odfdo.Document.get_part": {"tf": 1}}, "df": 1, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Document": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}}, "df": 2}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.delete_styles": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.clear": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}}, "df": 9, "d": {"docs": {"odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}}, "df": 3}}, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Element.strip_tags": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}}, "df": 3}}}}, "s": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}}, "df": 3}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Header.__init__": {"tf": 1}}, "df": 1}}}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Paragraph.set_bookmark": {"tf": 1}}, "df": 1}}}}}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TextDeletion": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}}, "df": 2}}}}}}}}, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}}, "df": 2}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Table.get_columns": {"tf": 1}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "n": {"docs": {"odfdo": {"tf": 1}}, "df": 1}, "b": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 3}}}, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}}, "df": 2}}, "w": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.Row": {"tf": 1.4142135623730951}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1.4142135623730951}, "odfdo.Row.append": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 1.7320508075688772}, "odfdo.Row.set_cells": {"tf": 2}, "odfdo.Row.set_values": {"tf": 2}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1}, "odfdo.RowGroup": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.append": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1.7320508075688772}, "odfdo.Table.get_row": {"tf": 1.7320508075688772}, "odfdo.Table.set_row": {"tf": 3}, "odfdo.Table.insert_row": {"tf": 3}, "odfdo.Table.extend_rows": {"tf": 1}, "odfdo.Table.append_row": {"tf": 3.1622776601683795}, "odfdo.Table.delete_row": {"tf": 1.4142135623730951}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_values": {"tf": 2}, "odfdo.Table.set_row_cells": {"tf": 2}, "odfdo.Table.is_row_empty": {"tf": 1.4142135623730951}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}}, "df": 37, "s": {"docs": {"odfdo.Row.__init__": {"tf": 1.4142135623730951}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.RowGroup": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1.7320508075688772}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1.7320508075688772}, "odfdo.Table.extend_rows": {"tf": 1.4142135623730951}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}}, "df": 16}}, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Paragraph.set_bookmark": {"tf": 2.449489742783178}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}, "odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1.7320508075688772}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.NamedRange": {"tf": 3}, "odfdo.NamedRange.__init__": {"tf": 1.7320508075688772}, "odfdo.NamedRange.set_usage": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1.7320508075688772}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkEnd": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1.7320508075688772}, "odfdo.Table.delete_named_range": {"tf": 1}}, "df": 27, "s": {"docs": {"odfdo.Element.get_named_ranges": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.7320508075688772}, "odfdo.Table.get_named_ranges": {"tf": 1.4142135623730951}, "odfdo.Table.get_named_range": {"tf": 1.4142135623730951}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}}, "df": 7}}}}, "w": {"docs": {"odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}}, "df": 2}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Style.set_background": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 2}}, "df": 8}}}}, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "b": {"docs": {"odfdo.Style.set_background": {"tf": 1}, "odfdo.hex2rgb": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1}}, "df": 3}}}}}, "g": {"docs": {}, "df": 0, "b": {"2": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.rgb2hex": {"tf": 1.4142135623730951}}, "df": 1}}}}, "docs": {"odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 2}}}, "y": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.NamedRange": {"tf": 1.7320508075688772}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1.4142135623730951}, "odfdo.Table.set_row": {"tf": 1.4142135623730951}, "odfdo.Table.insert_row": {"tf": 1.7320508075688772}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1.4142135623730951}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_row_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_row_cells": {"tf": 1.7320508075688772}, "odfdo.Table.is_row_empty": {"tf": 1.4142135623730951}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1.4142135623730951}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Table.append_cell": {"tf": 1.7320508075688772}, "odfdo.Table.delete_cell": {"tf": 1}}, "df": 24, "o": {"docs": {}, "df": 0, "u": {"docs": {"odfdo": {"tf": 1.7320508075688772}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Table.__init__": {"tf": 2.23606797749979}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 17, "r": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}}, "df": 3}}}, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 3}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.rgb2hex": {"tf": 1}}, "df": 1}}}}}}, "e": {"6": {"docs": {}, "df": 0, ":": {"docs": {}, "df": 0, "k": {"1": {"2": {"docs": {"odfdo.Table.__init__": {"tf": 1.4142135623730951}}, "df": 1}, "docs": {}, "df": 0}, "docs": {}, "df": 0}}}, "docs": {"odfdo.BackgroundImage.__init__": {"tf": 2.23606797749979}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1.4142135623730951}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Style.__init__": {"tf": 2.23606797749979}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.7320508075688772}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 17, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Row.is_empty": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 4, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}}, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Table.set_values": {"tf": 1}}, "df": 1}}}}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Row.is_empty": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 5}}}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo": {"tf": 1}, "odfdo.Spacer": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}}, "df": 3}}}, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.delete": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Table.delete_cell": {"tf": 1}}, "df": 1}}}}}}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}}}}, "x": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.AnimSeq": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Reference.__init__": {"tf": 1}}, "df": 1, "s": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 9}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}}, "df": 18}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 1}}}}}}, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Document": {"tf": 1}}, "df": 1}}}}}}}, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Document.new": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}}, "df": 11}}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Meta.set_generator": {"tf": 1}}, "df": 1}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.7320508075688772}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}}, "df": 10}}}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 3}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.clone": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}}, "df": 2}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}}, "df": 13, "s": {"docs": {"odfdo.rgb2hex": {"tf": 1}}, "df": 1}}}}}}, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.insert_style": {"tf": 1}}, "df": 1}}}}}}, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}}, "df": 3}}, "l": {"docs": {"odfdo.Table.to_csv": {"tf": 1}}, "df": 1}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}}, "df": 2}}}}, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.extend": {"tf": 1}}, "df": 1}, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.VarFileName.__init__": {"tf": 1}}, "df": 1}}}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.UserDefined": {"tf": 1}}, "df": 1}}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.Element.from_tag": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Annotation": {"tf": 1.7320508075688772}, "odfdo.Annotation.get_annotated": {"tf": 1.4142135623730951}, "odfdo.Annotation.delete": {"tf": 2}, "odfdo.AnnotationEnd": {"tf": 3}, "odfdo.AnnotationEnd.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.is_empty": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1.7320508075688772}, "odfdo.DrawGroup": {"tf": 2.449489742783178}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Element": {"tf": 1}, "odfdo.Element.from_tag": {"tf": 2.23606797749979}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.text": {"tf": 1}, "odfdo.Element.tail": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.7320508075688772}, "odfdo.Element.insert": {"tf": 2}, "odfdo.Element.append": {"tf": 1}, "odfdo.Element.delete": {"tf": 2}, "odfdo.Element.replace_element": {"tf": 1.7320508075688772}, "odfdo.Element.strip_elements": {"tf": 1.7320508075688772}, "odfdo.Element.strip_tags": {"tf": 2}, "odfdo.Element.xpath": {"tf": 1.4142135623730951}, "odfdo.Element.clear": {"tf": 1}, "odfdo.Element.serialize": {"tf": 1}, "odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl_list": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1.7320508075688772}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1.4142135623730951}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1.7320508075688772}, "odfdo.LineBreak": {"tf": 1}, "odfdo.Link": {"tf": 1}, "odfdo.List.__init__": {"tf": 1.7320508075688772}, "odfdo.List.get_items": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.ListItem": {"tf": 1}, "odfdo.ListItem.__init__": {"tf": 2}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.Note": {"tf": 1.4142135623730951}, "odfdo.Paragraph": {"tf": 1.4142135623730951}, "odfdo.Paragraph.__init__": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation": {"tf": 2.449489742783178}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1.7320508075688772}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 2.449489742783178}, "odfdo.Reference": {"tf": 1.7320508075688772}, "odfdo.Reference.__init__": {"tf": 1.4142135623730951}, "odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.delete": {"tf": 2}, "odfdo.Spacer": {"tf": 1.7320508075688772}, "odfdo.Span": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1.4142135623730951}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1.4142135623730951}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC": {"tf": 1.4142135623730951}, "odfdo.Tab": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1.4142135623730951}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextChangeStart": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 2}, "odfdo.TextChangedRegion": {"tf": 2}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1.7320508075688772}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1.7320508075688772}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1.7320508075688772}, "odfdo.TextDeletion": {"tf": 3.605551275463989}, "odfdo.TextDeletion.set_deleted": {"tf": 1.4142135623730951}, "odfdo.TextFormatChange": {"tf": 1.4142135623730951}, "odfdo.TextInsertion": {"tf": 2}, "odfdo.TextInsertion.get_inserted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_change_info": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.set_change_info": {"tf": 2.23606797749979}, "odfdo.TrackedChanges": {"tf": 2.23606797749979}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 167, "s": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1.7320508075688772}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1.7320508075688772}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1.4142135623730951}, "odfdo.TextChangedRegion.set_change_info": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1.7320508075688772}}, "df": 20}}}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 7, "w": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Style.set_background": {"tf": 1}}, "df": 1}}}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.EllipseShape": {"tf": 1}}, "df": 2, "s": {"docs": {"odfdo.Element.get_draw_ellipses": {"tf": 1}}, "df": 1}}}}}}}, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Annotation.end": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 2.449489742783178}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.BookmarkEnd": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_text_change_end": {"tf": 1.4142135623730951}, "odfdo.NamedRange": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 2.23606797749979}, "odfdo.ReferenceMarkEnd": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.extend_rows": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1.4142135623730951}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 43, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Note": {"tf": 1.4142135623730951}}, "df": 3}}}}, "s": {"docs": {"odfdo.Element.get_annotation_ends": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}}, "df": 3}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Table.width": {"tf": 1}}, "df": 2}}, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}}}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.TOC": {"tf": 1}, "odfdo.TabStopStyle": {"tf": 1}, "odfdo.TocEntryTemplate": {"tf": 1}}, "df": 3, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.TabStopStyle": {"tf": 1}}, "df": 1}}}}}}}, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TextDeletion": {"tf": 1}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.default_frame_position_style": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_text_changes": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Note": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}}, "df": 26}}}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Cell.is_empty": {"tf": 1}, "odfdo.Document": {"tf": 2.449489742783178}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.PageBreak": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.get_values": {"tf": 2}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1.4142135623730951}, "odfdo.Row.is_empty": {"tf": 1.7320508075688772}, "odfdo.Table.get_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 2}, "odfdo.Table.is_empty": {"tf": 1.7320508075688772}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1.4142135623730951}, "odfdo.Table.append_row": {"tf": 1.4142135623730951}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1.7320508075688772}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1.7320508075688772}, "odfdo.TextChange": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 38}}}, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.strip_tags": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}}, "df": 2, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}}, "df": 6}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.text_content": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.TextDeletion.set_deleted": {"tf": 1}}, "df": 3}}}}}}, "t": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 3}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.set_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}}, "df": 4}}}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Paragraph.set_bookmark": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Row.get_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}}, "df": 2}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Row.get_values": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.get_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}}, "df": 8}}}, "e": {"8": {"2": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.rgb2hex": {"tf": 1}}, "df": 1}}}, "docs": {}, "df": 0}, "docs": {}, "df": 0}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}, "s": {"docs": {"odfdo.Row.get_cells": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.DrawGroup": {"tf": 1}}, "df": 1}}}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Container.mimetype": {"tf": 1}}, "df": 1}}}}}}, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Element.text_content": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}}, "df": 8}}}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}}, "df": 9}}, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1, "l": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.elements_repeated_sequence": {"tf": 1}}, "df": 1}}}, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.set_modification_date": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}}, "df": 4}}, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.TOC": {"tf": 1}}, "df": 1}}}}}}}}, "y": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}}}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}}, "df": 2}}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.delete": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.List.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 9}}}, "e": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1, "t": {"docs": {}, "df": 0, "a": {"docs": {"odfdo": {"tf": 1}, "odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.meta": {"tf": 1.7320508075688772}, "odfdo.Document.get_formated_meta": {"tf": 1}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.set_language": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.set_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.set_creator": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}}, "df": 17, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}}, "df": 3}}}}, ":": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 2}}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 2}}}}}, "o": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 2}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 2}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 2}}}}}}}}}, "w": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 2}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}}, "df": 2}}}}}}}}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}}, "df": 1}}}}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell.value": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Element.elements_repeated_sequence": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Reference": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 15, "s": {"docs": {"odfdo.ChangeInfo": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}}, "df": 3}}}}}, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}}}, "e": {"docs": {"odfdo.Table.set_span": {"tf": 2}}, "df": 1, "d": {"docs": {"odfdo.TextDeletion": {"tf": 1}}, "df": 1}}}}, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Container.get_parts": {"tf": 1}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Document": {"tf": 1}}, "df": 1}}}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Table.width": {"tf": 1}}, "df": 1}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {"odfdo.Manifest.get_path_medias": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Manifest.set_media_type": {"tf": 1.4142135623730951}}, "df": 3}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}, "f": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.manifest": {"tf": 1.4142135623730951}, "odfdo.Manifest.get_paths": {"tf": 1}, "odfdo.Manifest.get_path_medias": {"tf": 1}}, "df": 4}}}}}, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.TOC": {"tf": 1}}, "df": 8}}}}}}, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1.4142135623730951}, "odfdo.PageBreak": {"tf": 1}, "odfdo.TOC": {"tf": 1}}, "df": 3, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Table.__init__": {"tf": 1}}, "df": 1}}}}}, "y": {"docs": {"odfdo.Row.traverse": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.traverse": {"tf": 1.4142135623730951}, "odfdo.Table.set_cells": {"tf": 1.4142135623730951}, "odfdo.Table.traverse_columns": {"tf": 1.4142135623730951}}, "df": 5}}, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.get_sections": {"tf": 1}, "odfdo.Element.get_paragraphs": {"tf": 1}, "odfdo.Element.get_spans": {"tf": 1}, "odfdo.Element.get_headers": {"tf": 1}, "odfdo.Element.get_lists": {"tf": 1}, "odfdo.Element.get_frames": {"tf": 1}, "odfdo.Element.get_tables": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1}, "odfdo.Element.get_annotations": {"tf": 1}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_draw_pages": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_draw_lines": {"tf": 1}, "odfdo.Element.get_draw_rectangles": {"tf": 1}, "odfdo.Element.get_draw_ellipses": {"tf": 1}, "odfdo.Element.get_draw_connectors": {"tf": 1}, "odfdo.List.get_items": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}}, "df": 21, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}}, "df": 14}}}, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1.4142135623730951}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}}, "df": 29}}, "s": {"docs": {"odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}}, "df": 1}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.Table.get_values": {"tf": 1}}, "df": 1}}}}, "y": {"docs": {"odfdo": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}, "odfdo.TextInsertion": {"tf": 1}}, "df": 12, "s": {"docs": {"odfdo.Table.transpose": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo": {"tf": 1}, "odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}}, "df": 3}}, "k": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 4}}, "r": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Container.del_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1.7320508075688772}, "odfdo.Element.get_reference_mark_starts": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_start": {"tf": 1.7320508075688772}, "odfdo.Element.get_reference_mark_ends": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_marks": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark": {"tf": 2}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 2}, "odfdo.Reference": {"tf": 1.7320508075688772}, "odfdo.Reference.__init__": {"tf": 2.23606797749979}, "odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkEnd": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.7320508075688772}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.7320508075688772}, "odfdo.TrackedChanges": {"tf": 1}}, "df": 28, "s": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1.4142135623730951}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_marks": {"tf": 1}, "odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.TextChange": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart": {"tf": 1}}, "df": 15}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}}, "df": 5}}, "u": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.TextChangedRegion": {"tf": 1}}, "df": 1}}}, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Tab": {"tf": 1}}, "df": 1}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.7320508075688772}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1.7320508075688772}, "odfdo.Styles.get_style": {"tf": 1}}, "df": 6}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ChangeInfo": {"tf": 1}}, "df": 1}}, "l": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.get_between": {"tf": 1}}, "df": 1}}}}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.Style.get_properties": {"tf": 1}}, "df": 2}}}}}, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.Table.set_cell_image": {"tf": 1}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.7320508075688772}, "odfdo.Table.set_cell_image": {"tf": 1.7320508075688772}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 13}}, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Document.insert_style": {"tf": 1}}, "df": 1}}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Annotation.get_annotated": {"tf": 1.7320508075688772}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.Cell.is_empty": {"tf": 1.7320508075688772}, "odfdo.Container.clone": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1.7320508075688772}, "odfdo.Element.get_between": {"tf": 1.4142135623730951}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.replace_element": {"tf": 1}, "odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 1.4142135623730951}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1.4142135623730951}, "odfdo.Table.is_empty": {"tf": 1.4142135623730951}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1.4142135623730951}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1.4142135623730951}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.7320508075688772}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1.7320508075688772}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 3}}, "df": 46, "t": {"docs": {"odfdo": {"tf": 1}, "odfdo.Annotation": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1.4142135623730951}, "odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Document.get_style": {"tf": 1.4142135623730951}, "odfdo.DrawFillImage": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1}, "odfdo.DrawImage": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.search": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decls": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1.4142135623730951}, "odfdo.ElementTyped.get_value": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Reference": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Spacer": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1.4142135623730951}, "odfdo.Styles.get_style": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1.4142135623730951}, "odfdo.TOC.fill": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 2}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1.4142135623730951}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 87, "e": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Element.get_notes": {"tf": 1.4142135623730951}, "odfdo.Element.get_note": {"tf": 2}, "odfdo.Note": {"tf": 1.7320508075688772}, "odfdo.Spacer": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}}, "df": 8, "s": {"docs": {"odfdo.Element.get_notes": {"tf": 1}}, "df": 1}}, "h": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Reference": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}}, "df": 2}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.AnimPar": {"tf": 1}, "odfdo.AnimSeq": {"tf": 1}, "odfdo.Text": {"tf": 1}}, "df": 3, "s": {"docs": {"odfdo.Element.xpath": {"tf": 1}, "odfdo.Text": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 3}}}, "n": {"docs": {"odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}}, "df": 8, "e": {"docs": {"odfdo.Annotation.end": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.AnnotationEnd.start": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1.4142135623730951}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo": {"tf": 1.4142135623730951}, "odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1.4142135623730951}, "odfdo.Column.repeated": {"tf": 1.4142135623730951}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1.4142135623730951}, "odfdo.Document.get_style": {"tf": 1.7320508075688772}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.get_attribute_integer": {"tf": 1}, "odfdo.Element.get_attribute_string": {"tf": 1}, "odfdo.Element.search": {"tf": 1.4142135623730951}, "odfdo.Element.strip_tags": {"tf": 2}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Element.get_section": {"tf": 1}, "odfdo.Element.get_paragraph": {"tf": 1}, "odfdo.Element.get_span": {"tf": 1}, "odfdo.Element.get_header": {"tf": 1}, "odfdo.Element.get_list": {"tf": 1}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.get_note": {"tf": 1}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1}, "odfdo.Element.get_draw_line": {"tf": 1}, "odfdo.Element.get_draw_rectangle": {"tf": 1}, "odfdo.Element.get_draw_ellipse": {"tf": 1}, "odfdo.Element.get_draw_connector": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Element.get_text_change": {"tf": 1}, "odfdo.Element.get_toc": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.List.get_item": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_annotation": {"tf": 2}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_span": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_link": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_bookmark": {"tf": 2}, "odfdo.Row.repeated": {"tf": 1.4142135623730951}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 1.7320508075688772}, "odfdo.Row.get_values": {"tf": 2.449489742783178}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 2}, "odfdo.Table.get_values": {"tf": 2.23606797749979}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChange.get_inserted": {"tf": 1}, "odfdo.TextChange.get_start": {"tf": 1}, "odfdo.TextChange.get_end": {"tf": 1}, "odfdo.TextChangeEnd.get_start": {"tf": 1}, "odfdo.TextChangeEnd.get_deleted": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangeStart.get_end": {"tf": 1}, "odfdo.TextChangedRegion.set_change_info": {"tf": 2}, "odfdo.TextDeletion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 2}, "odfdo.create_table_cell_style": {"tf": 1.7320508075688772}}, "df": 120}}, "w": {"docs": {"odfdo.Annotation.delete": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 4}}, "e": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}}}}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}}, "df": 4}}}}}}}, "x": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.VarPageNumber": {"tf": 1}}, "df": 5}}, "w": {"docs": {"odfdo.Cell.value": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Container.set_part": {"tf": 1}, "odfdo.Document": {"tf": 1.4142135623730951}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1.4142135623730951}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 9, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Document": {"tf": 1}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.List.get_item": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Reference.update": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 2}}}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Annotation": {"tf": 1.7320508075688772}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.AnnotationEnd.__init__": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage.__init__": {"tf": 2.449489742783178}, "odfdo.Bookmark": {"tf": 1}, "odfdo.BookmarkEnd": {"tf": 1}, "odfdo.BookmarkStart": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Content.get_style": {"tf": 2.6457513110645907}, "odfdo.Document.get_style": {"tf": 2.6457513110645907}, "odfdo.Document.insert_style": {"tf": 2.449489742783178}, "odfdo.Document.get_styled_elements": {"tf": 1.4142135623730951}, "odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.DrawFillImage.__init__": {"tf": 1.4142135623730951}, "odfdo.DrawGroup": {"tf": 1.4142135623730951}, "odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.DrawPage.__init__": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1.4142135623730951}, "odfdo.Element.get_frame": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_table": {"tf": 1}, "odfdo.Element.get_named_range": {"tf": 1.4142135623730951}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Element.delete_named_range": {"tf": 1.4142135623730951}, "odfdo.Element.get_annotation": {"tf": 1}, "odfdo.Element.get_annotation_end": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_sets": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1.4142135623730951}, "odfdo.Element.get_variable_set_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1.4142135623730951}, "odfdo.Element.get_draw_page": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_reference_mark": {"tf": 1}, "odfdo.Element.get_references": {"tf": 1.7320508075688772}, "odfdo.Element.get_style": {"tf": 2.449489742783178}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 2}, "odfdo.NamedRange": {"tf": 2.6457513110645907}, "odfdo.NamedRange.__init__": {"tf": 2.6457513110645907}, "odfdo.NamedRange.name": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 2}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Section": {"tf": 1}, "odfdo.Style.__init__": {"tf": 2.449489742783178}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 2.6457513110645907}, "odfdo.TOC": {"tf": 1.7320508075688772}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.name": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1.4142135623730951}, "odfdo.Table.get_named_range": {"tf": 2.23606797749979}, "odfdo.Table.set_named_range": {"tf": 2}, "odfdo.Table.delete_named_range": {"tf": 1.4142135623730951}, "odfdo.UserDefined": {"tf": 1.7320508075688772}, "odfdo.VarChapter.__init__": {"tf": 1.7320508075688772}, "odfdo.VarFileName.__init__": {"tf": 1.4142135623730951}, "odfdo.rgb2hex": {"tf": 1}}, "df": 82, "/": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}}, "df": 3}}}}}}}, "s": {"docs": {"odfdo.Document.get_parts": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1.4142135623730951}, "odfdo.Table.get_named_ranges": {"tf": 1.4142135623730951}}, "df": 3}, "d": {"docs": {"odfdo.Element.get_named_ranges": {"tf": 1.4142135623730951}, "odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1.7320508075688772}, "odfdo.Element.delete_named_range": {"tf": 1}, "odfdo.NamedRange": {"tf": 2.449489742783178}, "odfdo.NamedRange.__init__": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.set_table_name": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.NamedRange.set_values": {"tf": 1}, "odfdo.NamedRange.set_value": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1.4142135623730951}, "odfdo.Table.set_named_range": {"tf": 1.7320508075688772}, "odfdo.Table.delete_named_range": {"tf": 1.4142135623730951}}, "df": 18, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.get_named_range": {"tf": 1}, "odfdo.Element.append_named_range": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}}, "df": 3}}}}}}}}}, "u": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.Style.set_level_style": {"tf": 1}}, "df": 1, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1.4142135623730951}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.delete_styles": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Element.replace": {"tf": 1.4142135623730951}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.set_editing_cycles": {"tf": 1}, "odfdo.Meta.set_statistic": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Reference": {"tf": 2.449489742783178}, "odfdo.Reference.__init__": {"tf": 1.7320508075688772}, "odfdo.Row.__init__": {"tf": 1.7320508075688772}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.RowGroup.__init__": {"tf": 1}, "odfdo.Spacer.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Tab": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1}, "odfdo.VarChapter.__init__": {"tf": 2}, "odfdo.VarPageNumber": {"tf": 1}}, "df": 32, ":": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.Style": {"tf": 1}}, "df": 2}}}}, "n": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.Style": {"tf": 1}}, "df": 2}}}}}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.Style": {"tf": 1}}, "df": 2}}}}}}}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage": {"tf": 1}, "odfdo.Style": {"tf": 1}}, "df": 2}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Header.__init__": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Reference": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.Element.insert": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}}, "df": 4}}}}}}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}, "odfdo.NamedRange": {"tf": 1.4142135623730951}, "odfdo.NamedRange.__init__": {"tf": 1}, "odfdo.NamedRange.set_usage": {"tf": 1.7320508075688772}}, "df": 4, "s": {"docs": {"odfdo.Element.delete": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 3}}}, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.DrawFillImage.__init__": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {"odfdo": {"tf": 1.4142135623730951}, "odfdo.Annotation.delete": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.ChangeInfo.set_dc_date": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Row.append_cell": {"tf": 1.4142135623730951}, "odfdo.Row.append": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Spacer": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 49, "d": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1.4142135623730951}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Spacer": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.del_span": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 2.23606797749979}}, "df": 17}, "r": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Element.get_user_field_decls": {"tf": 1}, "odfdo.Element.get_user_field_decl_list": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_list": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata_of_name": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.UserDefined": {"tf": 1.7320508075688772}}, "df": 11}, "f": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Document": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}}, "df": 3}}}, "s": {"docs": {"odfdo.Document.add_page_break_style": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Cell.repeated": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.extend": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Note": {"tf": 1}, "odfdo.PageBreak": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.__init__": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkEnd.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.__init__": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1}, "odfdo.Text": {"tf": 1}}, "df": 29}}}}, "n": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}}, "df": 4}}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Container.save": {"tf": 1}}, "df": 3}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell.formula": {"tf": 1}}, "df": 1}}}}}, "r": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Element.tag": {"tf": 1}}, "df": 1}}}}}}}}, "k": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.ChangeInfo.set_dc_creator": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1}, "odfdo.Meta.get_creator": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}}, "df": 4}}}}}, "i": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.merge_styles_from": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.get_office_names": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}}, "df": 4, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}}, "df": 4}}}}}, "t": {"docs": {"odfdo.Frame.__init__": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}}, "df": 2}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Tab": {"tf": 1}}, "df": 1}}}}, "x": {"docs": {"odfdo.Table.to_csv": {"tf": 1}}, "df": 1}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Paragraph.remove_spans": {"tf": 1}}, "df": 1}}}}}}}, "a": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Row.delete_cell": {"tf": 1}}, "df": 1}}}}}}}}, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}}, "df": 2}}}}}}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {"odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.add_file": {"tf": 1}}, "df": 3}, "l": {"docs": {"odfdo.DrawImage.__init__": {"tf": 1}, "odfdo.Element.get_images": {"tf": 1}, "odfdo.Element.get_image": {"tf": 1}, "odfdo.Element.get_links": {"tf": 1}, "odfdo.Element.get_link": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.get_image": {"tf": 1}, "odfdo.Link.__init__": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1.7320508075688772}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.Style.set_level_style": {"tf": 1}}, "df": 11}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Element.elements_repeated_sequence": {"tf": 1}}, "df": 1}}}}}}, "p": {"docs": {"odfdo.TOC": {"tf": 1}, "odfdo.TextDeletion": {"tf": 2}}, "df": 2, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Reference": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}}, "df": 4, "d": {"docs": {"odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Reference": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Row.insert_cell": {"tf": 1}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.append_cell": {"tf": 1}}, "df": 14}}}}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1.4142135623730951}, "odfdo.Table.del_span": {"tf": 1.4142135623730951}}, "df": 4}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}}, "df": 7}}}}, "+": {"0": {"0": {"0": {"9": {"docs": {"odfdo.Tab": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "2": {"0": {"docs": {"odfdo.Spacer": {"tf": 1.4142135623730951}}, "df": 1}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.set_named_range": {"tf": 1}}, "df": 1}}}}, "b": {"docs": {"odfdo.hex2rgb": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1}}, "df": 2, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "y": {"docs": {"odfdo": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Document.body": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Element.document_body": {"tf": 1}, "odfdo.Element.get_tracked_changes": {"tf": 1}, "odfdo.Note": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.4142135623730951}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}}, "df": 12}}, "o": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.7320508075688772}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Document.save": {"tf": 1.4142135623730951}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Element.get_attribute": {"tf": 1}, "odfdo.Element.match": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Row.is_empty": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.7320508075688772}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.7320508075688772}, "odfdo.Table.rstrip": {"tf": 1}, "odfdo.Table.is_empty": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 18, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Annotation.get_annotated": {"tf": 1.7320508075688772}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.set_value": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.is_empty": {"tf": 1}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.ChangeInfo.set_comments": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Element.is_empty": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.7320508075688772}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.delete": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 2}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.set_value": {"tf": 1}, "odfdo.Row.get_values": {"tf": 1.7320508075688772}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1.7320508075688772}, "odfdo.Table.iter_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_values": {"tf": 1.7320508075688772}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1.7320508075688772}, "odfdo.TextChangeStart.delete": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1.4142135623730951}, "odfdo.TextInsertion.get_inserted": {"tf": 1.7320508075688772}}, "df": 38}}}}, "k": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Bookmark": {"tf": 1}, "odfdo.Element.get_bookmark": {"tf": 1.4142135623730951}, "odfdo.Element.get_bookmark_starts": {"tf": 1}, "odfdo.Element.get_bookmark_start": {"tf": 1}, "odfdo.Element.get_bookmark_ends": {"tf": 1}, "odfdo.Element.get_bookmark_end": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 4.123105625617661}, "odfdo.Reference": {"tf": 1.7320508075688772}}, "df": 8, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.BookmarkEnd": {"tf": 1}}, "df": 1}}}, "s": {"docs": {"odfdo.Element.get_bookmarks": {"tf": 1}, "odfdo.Reference": {"tf": 1}}, "df": 2, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.BookmarkStart": {"tf": 1}}, "df": 1}}}}}}}}}}}, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}}, "df": 1}}}}}}}}, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.AnnotationEnd": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}}, "df": 5}, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}, "odfdo.Style.set_background": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 2.23606797749979}}, "df": 4}}}}, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 2}}, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 2.23606797749979}, "odfdo.Style.__init__": {"tf": 2.23606797749979}, "odfdo.create_table_cell_style": {"tf": 4}}, "df": 3, "s": {"docs": {"odfdo.create_table_cell_style": {"tf": 2.23606797749979}}, "df": 1}}}}}, "x": {"docs": {"odfdo.Frame.text_frame": {"tf": 1.7320508075688772}}, "df": 1}}, "u": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.set_title": {"tf": 1}, "odfdo.Row.rstrip": {"tf": 1}, "odfdo.Spacer": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}, "odfdo.Text": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1.4142135623730951}}, "df": 18}, "g": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Element.get_between": {"tf": 1}}, "df": 1}}}, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Style.set_level_style": {"tf": 1.4142135623730951}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 2}}}}, "e": {"docs": {"odfdo": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1.4142135623730951}, "odfdo.AnnotationEnd.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 2}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Document": {"tf": 1}, "odfdo.Document.new": {"tf": 1}, "odfdo.Document.save": {"tf": 1.7320508075688772}, "odfdo.Document.insert_style": {"tf": 2.449489742783178}, "odfdo.Document.merge_styles_from": {"tf": 1.4142135623730951}, "odfdo.Document.add_page_break_style": {"tf": 1.4142135623730951}, "odfdo.DrawFillImage": {"tf": 1.4142135623730951}, "odfdo.DrawImage": {"tf": 1.4142135623730951}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.4142135623730951}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Frame.image_frame": {"tf": 1}, "odfdo.Frame.text_frame": {"tf": 1}, "odfdo.Meta.get_user_defined_metadata": {"tf": 1}, "odfdo.NamedRange.__init__": {"tf": 1.4142135623730951}, "odfdo.NamedRange.set_usage": {"tf": 1}, "odfdo.NamedRange.set_range": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1}, "odfdo.Paragraph.set_bookmark": {"tf": 1.7320508075688772}, "odfdo.Reference": {"tf": 1}, "odfdo.Reference.update": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Spacer": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Table.__init__": {"tf": 2.449489742783178}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1.7320508075688772}, "odfdo.Table.set_cell_image": {"tf": 1.4142135623730951}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}, "odfdo.Table.del_span": {"tf": 1.4142135623730951}, "odfdo.Table.to_csv": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1.7320508075688772}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextInsertion.set_change_info": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1.4142135623730951}, "odfdo.VarChapter.__init__": {"tf": 1}, "odfdo.VarFileName.__init__": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.7320508075688772}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 50, "t": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"odfdo": {"tf": 1}, "odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.ReferenceMarkEnd.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.referenced_text": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}}, "df": 8}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Table.append_row": {"tf": 1}}, "df": 1}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"odfdo": {"tf": 1.4142135623730951}}, "df": 1}}, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.AnimPar": {"tf": 1.4142135623730951}}, "df": 1, "s": {"docs": {"odfdo.Header.__init__": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}, "odfdo.DrawPage.get_formatted_text": {"tf": 1}, "odfdo.Element.get_formatted_text": {"tf": 1}, "odfdo.Frame.get_formatted_text": {"tf": 1}, "odfdo.Header.get_formatted_text": {"tf": 1}, "odfdo.List.get_formatted_text": {"tf": 1}, "odfdo.Section.get_formatted_text": {"tf": 1}, "odfdo.TOC.get_formatted_text": {"tf": 1}, "odfdo.Table.get_formatted_text": {"tf": 1}}, "df": 9}}}}}}, "r": {"docs": {"odfdo.RowGroup.__init__": {"tf": 1}}, "df": 1}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 2}}}}, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Document.add_page_break_style": {"tf": 1}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1.7320508075688772}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1.4142135623730951}, "odfdo.Paragraph.insert_reference": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_bookmark": {"tf": 2.23606797749979}, "odfdo.Row.set_cells": {"tf": 1}, "odfdo.Row.set_values": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.set_values": {"tf": 1.4142135623730951}, "odfdo.Table.insert_row": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1.4142135623730951}, "odfdo.Table.insert_column": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}}, "df": 18, "/": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Paragraph.set_bookmark": {"tf": 1}}, "df": 1}}}}}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.TOC.fill": {"tf": 1}}, "df": 1}}}}}}}}, "h": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Content": {"tf": 1}, "odfdo.Element": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1}, "odfdo.HeaderRows": {"tf": 1}, "odfdo.Manifest": {"tf": 1}, "odfdo.Meta": {"tf": 1}, "odfdo.Styles": {"tf": 1}, "odfdo.UserFieldDecl": {"tf": 1}, "odfdo.UserFieldDecls": {"tf": 1}, "odfdo.UserFieldGet": {"tf": 1}, "odfdo.UserFieldInput": {"tf": 1}, "odfdo.VarChapter": {"tf": 1}, "odfdo.VarCreationDate": {"tf": 1}, "odfdo.VarCreationTime": {"tf": 1}, "odfdo.VarDate": {"tf": 1}, "odfdo.VarDecl": {"tf": 1}, "odfdo.VarDecls": {"tf": 1}, "odfdo.VarDescription": {"tf": 1}, "odfdo.VarFileName": {"tf": 1}, "odfdo.VarGet": {"tf": 1}, "odfdo.VarInitialCreator": {"tf": 1}, "odfdo.VarKeywords": {"tf": 1}, "odfdo.VarPageCount": {"tf": 1}, "odfdo.VarSet": {"tf": 1}, "odfdo.VarSubject": {"tf": 1}, "odfdo.VarTime": {"tf": 1}, "odfdo.VarTitle": {"tf": 1}, "odfdo.XmlPart": {"tf": 1}}, "df": 28}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {"odfdo.Reference": {"tf": 1}, "odfdo.Table.rstrip": {"tf": 1}}, "df": 2}, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Table.set_span": {"tf": 1}}, "df": 1}}}}}, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.get_named_ranges": {"tf": 1}, "odfdo.Table.get_named_range": {"tf": 1}, "odfdo.Table.set_named_range": {"tf": 1}, "odfdo.Table.delete_named_range": {"tf": 1}, "odfdo.Table.set_span": {"tf": 1}}, "df": 6}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.TextChange": {"tf": 1}, "odfdo.TextChangeEnd": {"tf": 1.4142135623730951}, "odfdo.TextChangeStart": {"tf": 1.4142135623730951}}, "df": 3}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.TextChangedRegion": {"tf": 1}}, "df": 1}}}}, "y": {"docs": {"odfdo": {"tf": 2}, "odfdo.Annotation": {"tf": 1}, "odfdo.Annotation.get_annotated": {"tf": 1}, "odfdo.AnnotationEnd": {"tf": 1}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1.4142135623730951}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.index": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1.4142135623730951}, "odfdo.Element.insert": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Frame": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1.4142135623730951}, "odfdo.List.__init__": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 2}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.Paragraph.set_link": {"tf": 1}, "odfdo.Paragraph.insert_reference": {"tf": 1.7320508075688772}, "odfdo.Paragraph.set_bookmark": {"tf": 1}, "odfdo.Reference": {"tf": 2.23606797749979}, "odfdo.Reference.__init__": {"tf": 1.4142135623730951}, "odfdo.ReferenceMark": {"tf": 1}, "odfdo.ReferenceMark.__init__": {"tf": 1}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}, "odfdo.Row.__init__": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1.7320508075688772}, "odfdo.Row.get_values": {"tf": 2}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1.4142135623730951}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TOC.fill": {"tf": 1}, "odfdo.Table.get_values": {"tf": 2.23606797749979}, "odfdo.Table.iter_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.transpose": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_rows": {"tf": 1.4142135623730951}, "odfdo.Table.get_row_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_column_values": {"tf": 1.4142135623730951}, "odfdo.Table.set_span": {"tf": 1.4142135623730951}, "odfdo.TextChangeEnd.get_inserted": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextDeletion": {"tf": 1}, "odfdo.TextFormatChange": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TrackedChanges": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}}, "df": 69, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.Container.get_part": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}}, "df": 3, "i": {"docs": {}, "df": 0, "o": {"docs": {"odfdo.Document.new": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo": {"tf": 1}, "odfdo.Paragraph": {"tf": 1}}, "df": 2}}, "e": {"docs": {"odfdo.Style.set_background": {"tf": 1}, "odfdo.TabStopStyle": {"tf": 1}}, "df": 2, "d": {"docs": {"odfdo.Tab": {"tf": 1}}, "df": 1}}}, "c": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.Paragraph.remove_span": {"tf": 1}, "odfdo.Paragraph.remove_links": {"tf": 1}, "odfdo.Paragraph.remove_link": {"tf": 1}, "odfdo.Row.traverse": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1}, "odfdo.Table.traverse": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.traverse_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}}, "df": 12, "u": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Container.save": {"tf": 1}, "odfdo.Document.save": {"tf": 1}}, "df": 2}}, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.Style.set_background": {"tf": 1.7320508075688772}, "odfdo.create_table_cell_style": {"tf": 1}}, "df": 3}}}}}}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.AnimSeq": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.Link.__init__": {"tf": 1}}, "df": 1}}, "c": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 2}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "k": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1.4142135623730951}, "odfdo.Document.add_page_break_style": {"tf": 1.4142135623730951}, "odfdo.LineBreak": {"tf": 1.4142135623730951}, "odfdo.PageBreak": {"tf": 1.7320508075688772}, "odfdo.Style.__init__": {"tf": 1.4142135623730951}}, "df": 5}}}, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Element.get_styled_elements": {"tf": 1}}, "df": 2}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.DrawFillImage.__init__": {"tf": 1}}, "df": 1}}}}, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "s": {"docs": {"odfdo.TextInsertion": {"tf": 1}}, "df": 1}}}}}, "g": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 2.23606797749979}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1.4142135623730951}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.del_part": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Style.__init__": {"tf": 2.23606797749979}, "odfdo.Style.get_properties": {"tf": 1}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Table.set_values": {"tf": 1}, "odfdo.Table.set_cells": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.hex2rgb": {"tf": 1}, "odfdo.rgb2hex": {"tf": 1}}, "df": 15, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}, "odfdo.create_table_cell_style": {"tf": 1}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 3, "d": {"docs": {"odfdo": {"tf": 1.7320508075688772}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1}, "odfdo.Meta.set_generator_default": {"tf": 1}, "odfdo.Meta.get_statistic": {"tf": 1}}, "df": 5}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {"odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1}, "odfdo.Meta.set_generator": {"tf": 1.4142135623730951}, "odfdo.Meta.set_generator_default": {"tf": 1}}, "df": 5}}}, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Column.__init__": {"tf": 1}, "odfdo.Row.__init__": {"tf": 1}}, "df": 2}}}}}}}, "t": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}, "odfdo.Cell.value": {"tf": 1}, "odfdo.Cell.float": {"tf": 1}, "odfdo.Cell.string": {"tf": 1}, "odfdo.Cell.type": {"tf": 1}, "odfdo.Cell.currency": {"tf": 1}, "odfdo.Cell.repeated": {"tf": 1}, "odfdo.Cell.style": {"tf": 1}, "odfdo.Cell.formula": {"tf": 1}, "odfdo.ChangeInfo": {"tf": 1.7320508075688772}, "odfdo.ChangeInfo.get_comments": {"tf": 1}, "odfdo.Column.repeated": {"tf": 1}, "odfdo.Column.style": {"tf": 1}, "odfdo.Container.get_parts": {"tf": 1}, "odfdo.Container.get_part": {"tf": 1}, "odfdo.Document.get_type": {"tf": 1}, "odfdo.Element.text": {"tf": 1}, "odfdo.Element.tail": {"tf": 1}, "odfdo.Element.text_content": {"tf": 1}, "odfdo.Element.dc_creator": {"tf": 1}, "odfdo.Element.dc_date": {"tf": 1}, "odfdo.Element.get_reference_marks_single": {"tf": 1}, "odfdo.Element.get_reference_mark_single": {"tf": 1}, "odfdo.Element.get_reference_mark_starts": {"tf": 1}, "odfdo.Element.get_reference_mark_start": {"tf": 1}, "odfdo.Element.get_reference_mark_ends": {"tf": 1}, "odfdo.Element.get_reference_mark_end": {"tf": 1}, "odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}, "odfdo.Element.get_text_change_starts": {"tf": 1}, "odfdo.Element.get_text_change_start": {"tf": 1}, "odfdo.Element.get_text_change_ends": {"tf": 1}, "odfdo.Element.get_text_change_end": {"tf": 1}, "odfdo.Frame.text_content": {"tf": 1}, "odfdo.Manifest.get_media_type": {"tf": 1}, "odfdo.Meta.get_title": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.get_subject": {"tf": 1}, "odfdo.Meta.get_language": {"tf": 1.4142135623730951}, "odfdo.Meta.get_modification_date": {"tf": 1}, "odfdo.Meta.get_creation_date": {"tf": 1}, "odfdo.Meta.get_initial_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.get_creator": {"tf": 1.4142135623730951}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.get_editing_duration": {"tf": 1}, "odfdo.Meta.get_editing_cycles": {"tf": 1}, "odfdo.Meta.get_generator": {"tf": 1.4142135623730951}, "odfdo.Meta.get_statistic": {"tf": 1.4142135623730951}, "odfdo.NamedRange.name": {"tf": 1}, "odfdo.NamedRange.get_values": {"tf": 1}, "odfdo.NamedRange.get_value": {"tf": 1}, "odfdo.Row.repeated": {"tf": 1}, "odfdo.Row.style": {"tf": 1}, "odfdo.Row.width": {"tf": 1}, "odfdo.Row.get_cells": {"tf": 1}, "odfdo.Row.get_cell": {"tf": 1}, "odfdo.Row.get_value": {"tf": 2}, "odfdo.Row.set_value": {"tf": 1.4142135623730951}, "odfdo.Row.get_values": {"tf": 2}, "odfdo.Style.get_properties": {"tf": 1.4142135623730951}, "odfdo.Style.get_page_header": {"tf": 1}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.get_page_footer": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Table.height": {"tf": 1}, "odfdo.Table.width": {"tf": 1}, "odfdo.Table.size": {"tf": 1}, "odfdo.Table.name": {"tf": 1}, "odfdo.Table.style": {"tf": 1}, "odfdo.Table.get_values": {"tf": 2}, "odfdo.Table.iter_values": {"tf": 1.4142135623730951}, "odfdo.Table.get_rows": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1.7320508075688772}, "odfdo.Table.get_cells": {"tf": 1.4142135623730951}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1.4142135623730951}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1.7320508075688772}, "odfdo.TextChange.get_deleted": {"tf": 1}, "odfdo.TextChangedRegion.get_change_info": {"tf": 1}, "odfdo.TextChangedRegion.get_change_element": {"tf": 1}, "odfdo.TextChangedRegion.get_id": {"tf": 1}, "odfdo.TextDeletion.get_deleted": {"tf": 1}, "odfdo.TextInsertion.get_inserted": {"tf": 1}, "odfdo.TextInsertion.get_change_info": {"tf": 1}}, "df": 89, "/": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"odfdo.Element.tag": {"tf": 1}}, "df": 1}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}, "y": {"docs": {"odfdo.create_table_cell_style": {"tf": 1.4142135623730951}, "odfdo.make_table_cell_border_string": {"tf": 1}}, "df": 2}}, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}, "odfdo.default_frame_position_style": {"tf": 1}}, "df": 8, "s": {"docs": {"odfdo.Document.get_type": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Column.__init__": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Paragraph.insert_annotation": {"tf": 1}, "odfdo.Paragraph.insert_annotation_end": {"tf": 1}, "odfdo.Paragraph.set_reference_mark": {"tf": 1}, "odfdo.Paragraph.set_reference_mark_end": {"tf": 1}, "odfdo.RowGroup": {"tf": 1.4142135623730951}, "odfdo.RowGroup.__init__": {"tf": 1.4142135623730951}}, "df": 8}}}, "t": {"docs": {"odfdo.Table.iter_values": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Column.__init__": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}}, "df": 2, "n": {"docs": {"odfdo.Annotation": {"tf": 1.4142135623730951}, "odfdo.Annotation.delete": {"tf": 1.4142135623730951}, "odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Cell.__init__": {"tf": 1.7320508075688772}, "odfdo.Column.__init__": {"tf": 1}, "odfdo.Container.save": {"tf": 1}, "odfdo.Content.get_styles": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.set_part": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Document.insert_style": {"tf": 1.4142135623730951}, "odfdo.Document.get_styled_elements": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.replace": {"tf": 1}, "odfdo.Element.delete": {"tf": 1.4142135623730951}, "odfdo.Element.get_styled_elements": {"tf": 1}, "odfdo.Element.get_variable_decl": {"tf": 1}, "odfdo.Element.get_variable_set": {"tf": 1}, "odfdo.Element.get_variable_set_value": {"tf": 1}, "odfdo.Element.get_user_field_decl": {"tf": 1}, "odfdo.Element.get_user_field_value": {"tf": 1}, "odfdo.Element.get_user_defined": {"tf": 1}, "odfdo.Element.get_user_defined_value": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.Header.__init__": {"tf": 1.4142135623730951}, "odfdo.Note": {"tf": 1.4142135623730951}, "odfdo.Paragraph.__init__": {"tf": 1.4142135623730951}, "odfdo.Paragraph.set_span": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1.4142135623730951}, "odfdo.Row.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Row.append_cell": {"tf": 1.4142135623730951}, "odfdo.Row.append": {"tf": 1.4142135623730951}, "odfdo.Row.delete_cell": {"tf": 1}, "odfdo.Span": {"tf": 1.4142135623730951}, "odfdo.Style.__init__": {"tf": 1}, "odfdo.Style.set_properties": {"tf": 1}, "odfdo.Style.del_properties": {"tf": 1.4142135623730951}, "odfdo.Style.set_page_header": {"tf": 1}, "odfdo.Style.set_page_footer": {"tf": 1}, "odfdo.Styles.get_styles": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.Table.get_row": {"tf": 1}, "odfdo.Table.set_row": {"tf": 1}, "odfdo.Table.insert_row": {"tf": 1.4142135623730951}, "odfdo.Table.append_row": {"tf": 1}, "odfdo.Table.delete_row": {"tf": 1}, "odfdo.Table.get_row_values": {"tf": 1}, "odfdo.Table.set_row_values": {"tf": 1}, "odfdo.Table.set_row_cells": {"tf": 1}, "odfdo.Table.is_row_empty": {"tf": 1}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1.4142135623730951}, "odfdo.Table.set_cell": {"tf": 1}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1.7320508075688772}, "odfdo.Table.append_cell": {"tf": 1.4142135623730951}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1}, "odfdo.Table.set_column": {"tf": 1}, "odfdo.Table.insert_column": {"tf": 1.4142135623730951}, "odfdo.Table.append_column": {"tf": 1}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1.4142135623730951}, "odfdo.default_toc_level_style": {"tf": 1}}, "df": 69}}}}, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Cell.set_value": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {"odfdo.Table.set_span": {"tf": 1}}, "df": 1}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.ConnectorShape": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Content.get_style": {"tf": 1}, "odfdo.Document.get_style": {"tf": 1}, "odfdo.Element.get_style": {"tf": 1}, "odfdo.Styles.get_style": {"tf": 1}}, "df": 4}}}, "t": {"docs": {"odfdo.Document": {"tf": 2}, "odfdo.Meta.get_language": {"tf": 1.7320508075688772}, "odfdo.Meta.set_language": {"tf": 1.7320508075688772}, "odfdo.Meta.get_initial_creator": {"tf": 1.7320508075688772}, "odfdo.Meta.set_initial_creator": {"tf": 1.7320508075688772}, "odfdo.Meta.get_creator": {"tf": 1.7320508075688772}, "odfdo.Meta.set_creator": {"tf": 1.7320508075688772}, "odfdo.Meta.get_generator": {"tf": 1.7320508075688772}, "odfdo.Meta.set_generator": {"tf": 1.7320508075688772}, "odfdo.Meta.set_generator_default": {"tf": 1.7320508075688772}, "odfdo.Meta.get_statistic": {"tf": 1.7320508075688772}, "odfdo.Meta.set_statistic": {"tf": 2.449489742783178}, "odfdo.rgb2hex": {"tf": 2.449489742783178}}, "df": 13}, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Spacer": {"tf": 1}}, "df": 1}}}}, "k": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"odfdo": {"tf": 1}}, "df": 1}}}}}, "n": {"docs": {"odfdo.Document": {"tf": 1}, "odfdo.Meta.get_description": {"tf": 1}, "odfdo.Meta.get_comments": {"tf": 1}, "odfdo.Meta.set_description": {"tf": 1}, "odfdo.Meta.set_comments": {"tf": 1}, "odfdo.UserDefined": {"tf": 1}}, "df": 6}}}}, "e": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.IndexTitle": {"tf": 1.4142135623730951}, "odfdo.TOC": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}}, "df": 3, "w": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.BackgroundImage.__init__": {"tf": 1}, "odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Style.__init__": {"tf": 1}}, "df": 3, "s": {"docs": {"odfdo.Meta.get_keywords": {"tf": 1}, "odfdo.Meta.set_keywords": {"tf": 1.4142135623730951}}, "df": 2}}}}}}, "e": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Element.delete": {"tf": 1.4142135623730951}, "odfdo.Paragraph.remove_spans": {"tf": 1}, "odfdo.ReferenceMarkStart.delete": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1}}, "df": 4, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"odfdo.Element.strip_elements": {"tf": 1}, "odfdo.Element.strip_tags": {"tf": 1}}, "df": 2}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.get_text_change_deletions": {"tf": 1}, "odfdo.Element.get_text_change_deletion": {"tf": 1}}, "df": 2}}}, "o": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "/": {"2": {"docs": {"odfdo.Meta.get_generator": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}}}}}}}}, "x": {"docs": {"odfdo": {"tf": 1}, "odfdo.DrawGroup": {"tf": 1}, "odfdo.Frame.__init__": {"tf": 1}, "odfdo.NamedRange": {"tf": 1.7320508075688772}, "odfdo.Row.get_cell": {"tf": 1.4142135623730951}, "odfdo.Row.get_value": {"tf": 1}, "odfdo.Row.set_cell": {"tf": 1.7320508075688772}, "odfdo.Row.set_value": {"tf": 1.4142135623730951}, "odfdo.Row.insert_cell": {"tf": 1.7320508075688772}, "odfdo.Row.append_cell": {"tf": 1}, "odfdo.Row.append": {"tf": 1}, "odfdo.Row.delete_cell": {"tf": 1.4142135623730951}, "odfdo.Table.get_cell": {"tf": 1}, "odfdo.Table.get_value": {"tf": 1}, "odfdo.Table.set_cell": {"tf": 1.4142135623730951}, "odfdo.Table.set_value": {"tf": 1}, "odfdo.Table.set_cell_image": {"tf": 1}, "odfdo.Table.insert_cell": {"tf": 1.4142135623730951}, "odfdo.Table.append_cell": {"tf": 1}, "odfdo.Table.delete_cell": {"tf": 1}, "odfdo.Table.get_columns": {"tf": 1}, "odfdo.Table.get_column": {"tf": 1.4142135623730951}, "odfdo.Table.set_column": {"tf": 1.4142135623730951}, "odfdo.Table.insert_column": {"tf": 1.4142135623730951}, "odfdo.Table.delete_column": {"tf": 1}, "odfdo.Table.get_column_cells": {"tf": 1}, "odfdo.Table.get_column_values": {"tf": 1}, "odfdo.Table.set_column_cells": {"tf": 1}, "odfdo.Table.set_column_values": {"tf": 1}, "odfdo.Table.is_column_empty": {"tf": 1}}, "df": 30, "x": {"docs": {}, "df": 0, "x": {"docs": {"odfdo.AnimTransFilter": {"tf": 1}}, "df": 1}}, "m": {"docs": {}, "df": 0, "l": {"docs": {"odfdo.Annotation.delete": {"tf": 1.4142135623730951}, "odfdo.Content": {"tf": 1.4142135623730951}, "odfdo.Document.get_parts": {"tf": 1}, "odfdo.Document.get_part": {"tf": 1}, "odfdo.Document.meta": {"tf": 1}, "odfdo.Document.manifest": {"tf": 1}, "odfdo.Document.save": {"tf": 1}, "odfdo.Element": {"tf": 1.4142135623730951}, "odfdo.Element.from_tag": {"tf": 1}, "odfdo.Element.tag": {"tf": 1}, "odfdo.Element.get_between": {"tf": 1}, "odfdo.Element.delete": {"tf": 1.4142135623730951}, "odfdo.Element.serialize": {"tf": 1}, "odfdo.ElementTyped": {"tf": 1.4142135623730951}, "odfdo.HeaderRows": {"tf": 1.4142135623730951}, "odfdo.Manifest": {"tf": 1.4142135623730951}, "odfdo.Meta": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.get_referenced": {"tf": 1.4142135623730951}, "odfdo.ReferenceMarkStart.delete": {"tf": 1.4142135623730951}, "odfdo.Styles": {"tf": 1.4142135623730951}, "odfdo.Table.__init__": {"tf": 1.4142135623730951}, "odfdo.Text": {"tf": 1}, "odfdo.TextChangeStart.delete": {"tf": 1.4142135623730951}, "odfdo.UserFieldDecl": {"tf": 1.4142135623730951}, "odfdo.UserFieldDecls": {"tf": 1.4142135623730951}, "odfdo.UserFieldGet": {"tf": 1.4142135623730951}, "odfdo.UserFieldInput": {"tf": 1.4142135623730951}, "odfdo.VarChapter": {"tf": 1.4142135623730951}, "odfdo.VarCreationDate": {"tf": 1.4142135623730951}, "odfdo.VarCreationTime": {"tf": 1.4142135623730951}, "odfdo.VarDate": {"tf": 1.4142135623730951}, "odfdo.VarDecl": {"tf": 1.4142135623730951}, "odfdo.VarDecls": {"tf": 1.4142135623730951}, "odfdo.VarDescription": {"tf": 1.4142135623730951}, "odfdo.VarFileName": {"tf": 1.4142135623730951}, "odfdo.VarGet": {"tf": 1.4142135623730951}, "odfdo.VarInitialCreator": {"tf": 1.4142135623730951}, "odfdo.VarKeywords": {"tf": 1.4142135623730951}, "odfdo.VarPageCount": {"tf": 1.4142135623730951}, "odfdo.VarSet": {"tf": 1.4142135623730951}, "odfdo.VarSubject": {"tf": 1.4142135623730951}, "odfdo.VarTime": {"tf": 1.4142135623730951}, "odfdo.VarTitle": {"tf": 1.4142135623730951}, "odfdo.XmlPart": {"tf": 1.4142135623730951}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 45, ":": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.DrawGroup": {"tf": 1}, "odfdo.IndexTitle": {"tf": 1}, "odfdo.TOC": {"tf": 1}, "odfdo.TextChangedRegion": {"tf": 1}, "odfdo.TextChangedRegion.set_id": {"tf": 1}, "odfdo.TextInsertion": {"tf": 1}}, "df": 6}}}, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"odfdo.Element.insert": {"tf": 1}}, "df": 1}}}}}}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, ":": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {"odfdo.DrawGroup": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"odfdo.Element.xpath": {"tf": 1}, "odfdo.Text": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 3}}}}, "y": {"docs": {}, "df": 0, "z": {"docs": {"odfdo.Paragraph.set_bookmark": {"tf": 1.7320508075688772}}, "df": 1}}}, "z": {"docs": {"odfdo.Frame.__init__": {"tf": 1}, "odfdo.NamedRange": {"tf": 1}}, "df": 2, "i": {"docs": {}, "df": 0, "p": {"docs": {"odfdo.Container.save": {"tf": 1}, "odfdo.Document.save": {"tf": 1.4142135623730951}}, "df": 2}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Element.tag": {"tf": 1}}, "df": 1}}}}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"odfdo.Element.xpath": {"tf": 1}, "odfdo.XmlPart.xpath": {"tf": 1}}, "df": 2}, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"odfdo.Row.get_values": {"tf": 1}, "odfdo.Table.get_values": {"tf": 1}}, "df": 2}}}}}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"odfdo.Element.tag": {"tf": 1}}, "df": 1}}}}}}}}, "pipeline": ["trimmer"], "_isPrebuiltIndex": true}; + + // mirrored in build-search-index.js (part 1) + // Also split on html tags. this is a cheap heuristic, but good enough. + elasticlunr.tokenizer.setSeperator(/[\s\-.;&_'"=,()]+|<[^>]*>/); + + let searchIndex; + if (docs._isPrebuiltIndex) { + console.info("using precompiled search index"); + searchIndex = elasticlunr.Index.load(docs); + } else { + console.time("building search index"); + // mirrored in build-search-index.js (part 2) + searchIndex = elasticlunr(function () { + this.pipeline.remove(elasticlunr.stemmer); + this.pipeline.remove(elasticlunr.stopWordFilter); + this.addField("qualname"); + this.addField("fullname"); + this.addField("annotation"); + this.addField("default_value"); + this.addField("signature"); + this.addField("bases"); + this.addField("doc"); + this.setRef("fullname"); + }); + for (let doc of docs) { + searchIndex.addDoc(doc); + } + console.timeEnd("building search index"); + } + + return (term) => searchIndex.search(term, { + fields: { + qualname: {boost: 4}, + fullname: {boost: 2}, + annotation: {boost: 2}, + default_value: {boost: 2}, + signature: {boost: 2}, + bases: {boost: 2}, + doc: {boost: 1}, + }, + expand: true + }); +})(); \ No newline at end of file diff --git a/doc/section.html b/doc/section.html deleted file mode 100644 index 0b04a4e..0000000 --- a/doc/section.html +++ /dev/null @@ -1,359 +0,0 @@ - - - - - - -odfdo.section API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.section

-
-
-

Section class for "text:section".

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-#          David Versmisse <david.versmisse@itaapy.com>
-"""Section class for "text:section".
-"""
-from __future__ import annotations
-
-from typing import Any
-
-from .element import Element, PropDef, register_element_class
-
-
-class Section(Element):
-    """ODF section "text:section"
-
-    Arguments:
-
-        style -- str
-
-        name -- str
-    """
-
-    _tag = "text:section"
-    _properties = (
-        PropDef("style", "text:style-name"),
-        PropDef("name", "text:name"),
-    )
-
-    def __init__(
-        self,
-        style: str | None = None,
-        name: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style:
-                self.style = style
-            if name:
-                self.name = name
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        result = [element.get_formatted_text(context) for element in self.children]
-        result.append("\n")
-        return "".join(result)
-
-
-Section._define_attribut_property()
-
-register_element_class(Section)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class Section -(style: str | None = None, name: str | None = None, **kwargs: Any) -
-
-

ODF section "text:section"

-

Arguments

-

style – str

-

name – str

-
- -Expand source code - -
class Section(Element):
-    """ODF section "text:section"
-
-    Arguments:
-
-        style -- str
-
-        name -- str
-    """
-
-    _tag = "text:section"
-    _properties = (
-        PropDef("style", "text:style-name"),
-        PropDef("name", "text:name"),
-    )
-
-    def __init__(
-        self,
-        style: str | None = None,
-        name: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style:
-                self.style = style
-            if name:
-                self.name = name
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        result = [element.get_formatted_text(context) for element in self.children]
-        result.append("\n")
-        return "".join(result)
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/shapes.html b/doc/shapes.html deleted file mode 100644 index 85aea43..0000000 --- a/doc/shapes.html +++ /dev/null @@ -1,2581 +0,0 @@ - - - - - - -odfdo.shapes API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.shapes

-
-
-

Drawing classes ShapeBase, LineShape, RectangleShape, EllipseShape, -ConnectorShape and DrawGroup.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-"""Drawing classes ShapeBase, LineShape, RectangleShape, EllipseShape,
-ConnectorShape and DrawGroup.
-"""
-from __future__ import annotations
-
-from typing import Any
-
-from .element import Element, PropDef, register_element_class
-from .frame import AnchorMix, PosMix, SizeMix, ZMix
-
-
-class ShapeBase(Element, SizeMix, PosMix):
-    """Base class for shapes"""
-
-    _tag = "draw:shape-odfdo-notodf"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("draw_id", "draw:id"),
-        PropDef("layer", "draw:layer"),
-        PropDef("width", "svg:width"),
-        PropDef("height", "svg:height"),
-        PropDef("pos_x", "svg:x"),
-        PropDef("pos_y", "svg:y"),
-        PropDef("presentation_class", "presentation:class"),
-        PropDef("style", "draw:style-name"),
-        PropDef("text_style", "draw:text-style-name"),
-    )
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        position: tuple | None = None,
-        size: tuple | None = None,
-        presentation_class: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style:
-                self.style = style
-            if text_style:
-                self.text_style = text_style
-            if draw_id:
-                self.draw_id = draw_id
-            if layer:
-                self.layer = layer
-            if position:
-                self.position = position
-            if size:
-                self.size = size
-            if presentation_class:
-                self.presentation_class = presentation_class
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        result: list[str] = []
-        for child in self.children:
-            result.append(child.get_formatted_text(context))
-        result.append("\n")
-        return "".join(result)
-
-
-ShapeBase._define_attribut_property()
-
-
-class LineShape(ShapeBase):
-    """Create a line shape.
-
-    Arguments:
-
-        style -- str
-
-        text_style -- str
-
-        draw_id -- str
-
-        layer -- str
-
-        p1 -- (str, str)
-
-        p2 -- (str, str)
-    """
-
-    _tag = "draw:line"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("x1", "svg:x1"),
-        PropDef("y1", "svg:y1"),
-        PropDef("x2", "svg:x2"),
-        PropDef("y2", "svg:y2"),
-    )
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        p1: tuple | None = None,
-        p2: tuple | None = None,
-        **kwargs: Any,
-    ) -> None:
-        kwargs.update(
-            {
-                "style": style,
-                "text_style": text_style,
-                "draw_id": draw_id,
-                "layer": layer,
-            }
-        )
-        super().__init__(**kwargs)
-        if self._do_init:
-            if p1:
-                self.x1 = p1[0]
-                self.y1 = p1[1]
-            if p2:
-                self.x2 = p2[0]
-                self.y2 = p2[1]
-
-
-LineShape._define_attribut_property()
-
-
-class RectangleShape(ShapeBase):
-    """Create a rectangle shape.
-
-    Arguments:
-
-        style -- str
-
-        text_style -- str
-
-        draw_id -- str
-
-        layer -- str
-
-        position -- (str, str)
-
-        size -- (str, str)
-
-    """
-
-    _tag = "draw:rect"
-    _properties: tuple[PropDef, ...] = ()
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        position: tuple | None = None,
-        size: tuple | None = None,
-        **kwargs: Any,
-    ) -> None:
-        kwargs.update(
-            {
-                "style": style,
-                "text_style": text_style,
-                "draw_id": draw_id,
-                "layer": layer,
-                "size": size,
-                "position": position,
-            }
-        )
-        super().__init__(**kwargs)
-
-
-RectangleShape._define_attribut_property()
-
-
-class EllipseShape(ShapeBase):
-    """Create a ellipse shape.
-
-    Arguments:
-
-        style -- str
-
-        text_style -- str
-
-        draw_id -- str
-
-        layer -- str
-
-        position -- (str, str)
-
-        size -- (str, str)
-
-    """
-
-    _tag = "draw:ellipse"
-    _properties: tuple[PropDef, ...] = ()
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        position: tuple | None = None,
-        size: tuple | None = None,
-        **kwargs: Any,
-    ) -> None:
-        kwargs.update(
-            {
-                "style": style,
-                "text_style": text_style,
-                "draw_id": draw_id,
-                "layer": layer,
-                "size": size,
-                "position": position,
-            }
-        )
-        super().__init__(**kwargs)
-
-
-EllipseShape._define_attribut_property()
-
-
-class ConnectorShape(ShapeBase):
-    """Create a Connector shape.
-
-    Arguments:
-
-        style -- str
-
-        text_style -- str
-
-        draw_id -- str
-
-        layer -- str
-
-        connected_shapes -- (shape, shape)
-
-        glue_points -- (point, point)
-
-        p1 -- (str, str)
-
-        p2 -- (str, str)
-    """
-
-    _tag = "draw:connector"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("start_shape", "draw:start-shape"),
-        PropDef("end_shape", "draw:end-shape"),
-        PropDef("start_glue_point", "draw:start-glue-point"),
-        PropDef("end_glue_point", "draw:end-glue-point"),
-        PropDef("x1", "svg:x1"),
-        PropDef("y1", "svg:y1"),
-        PropDef("x2", "svg:x2"),
-        PropDef("y2", "svg:y2"),
-    )
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        connected_shapes: tuple | None = None,
-        glue_points: tuple | None = None,
-        p1: tuple | None = None,
-        p2: tuple | None = None,
-        **kwargs: Any,
-    ) -> None:
-        kwargs.update(
-            {
-                "style": style,
-                "text_style": text_style,
-                "draw_id": draw_id,
-                "layer": layer,
-            }
-        )
-        super().__init__(**kwargs)
-        if self._do_init:
-            if connected_shapes:
-                self.start_shape = connected_shapes[0].draw_id
-                self.end_shape = connected_shapes[1].draw_id
-            if glue_points:
-                self.start_glue_point = glue_points[0]
-                self.end_glue_point = glue_points[1]
-            if p1:
-                self.x1 = p1[0]
-                self.y1 = p1[1]
-            if p2:
-                self.x2 = p2[0]
-                self.y2 = p2[1]
-
-
-ConnectorShape._define_attribut_property()
-
-
-class DrawGroup(Element, AnchorMix, ZMix, PosMix):
-    """The DrawGroup "draw:g" element represents a group of drawing shapes.
-
-    Warning: implementation is currently minimal.
-
-    Drawing shapes contained by a "draw:g" element that is itself
-    contained by a "draw:a" element, act as hyperlinks using the
-    xlink:href attribute of the containing "draw:a" element. If the
-    included drawing shapes are themselves contained within "draw:a"
-    elements, then the xlink:href attributes of those "draw:a" elements
-    act as the hyperlink information for the shapes they contain.
-
-    The "draw:g" element has the following attributes: draw:caption-id,
-    draw:class-names, draw:id, draw:name, draw:style-name, draw:z-index,
-    presentation:class-names, presentation:style-name, svg:y,
-    table:end-cell-address, table:end-x, table:end-y,
-    table:table-background, text:anchor-page-number, text:anchor-type,
-    and xml:id.
-
-    The "draw:g" element has the following child elements: "dr3d:scene",
-    "draw:a", "draw:caption", "draw:circle", "draw:connector",
-    "draw:control", "draw:custom-shape", "draw:ellipse", "draw:frame",
-    "draw:g", "draw:glue-point", "draw:line", "draw:measure",
-    "draw:page-thumbnail", "draw:path", "draw:polygon", "draw:polyline",
-    "draw:rect", "draw:regular-polygon", "office:event-listeners",
-    "svg:desc" and "svg:title".
-    """
-
-    _tag = "draw:g"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("draw_id", "draw:id"),
-        PropDef("caption_id", "draw:caption-id"),
-        PropDef("draw_class_names", "draw:class-names"),
-        PropDef("name", "draw:name"),
-        PropDef("style", "draw:style-name"),
-        # ('z_index', 'draw:z-index'),
-        PropDef("presentation_class_names", "presentation:class-names"),
-        PropDef("presentation_style", "presentation:style-name"),
-        PropDef("table_end_cell", "table:end-cell-address"),
-        PropDef("table_end_x", "table:end-x"),
-        PropDef("table_end_y", "table:end-y"),
-        PropDef("table_background", "table:table-background"),
-        # ('anchor_page', 'text:anchor-page-number'),
-        # ('anchor_type', 'text:anchor-type'),
-        PropDef("xml_id", "xml:id"),
-        PropDef("pos_x", "svg:x"),
-        PropDef("pos_y", "svg:y"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        draw_id: str | None = None,
-        style: str | None = None,
-        position: tuple | None = None,
-        z_index: int = 0,
-        anchor_type: str | None = None,
-        anchor_page: int | None = None,
-        presentation_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if z_index is not None:
-                self.z_index = z_index
-            if name:
-                self.name = name
-            if draw_id is not None:
-                self.draw_id = draw_id
-            if style is not None:
-                self.style = style
-            if position is not None:
-                self.position = position
-            if anchor_type:
-                self.anchor_type = anchor_type
-            if anchor_page is not None:
-                self.anchor_page = anchor_page
-            if presentation_style is not None:
-                self.presentation_style = presentation_style
-
-
-DrawGroup._define_attribut_property()
-
-registered_shapes = [
-    s._tag for s in (LineShape, RectangleShape, EllipseShape, ConnectorShape)  # type: ignore
-]
-register_element_class(LineShape)
-register_element_class(RectangleShape)
-register_element_class(EllipseShape)
-register_element_class(ConnectorShape)
-register_element_class(DrawGroup)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class ConnectorShape -(style: str | None = None, text_style: str | None = None, draw_id: str | None = None, layer: str | None = None, connected_shapes: tuple | None = None, glue_points: tuple | None = None, p1: tuple | None = None, p2: tuple | None = None, **kwargs: Any) -
-
-

Create a Connector shape.

-

Arguments

-

style – str

-

text_style – str

-

draw_id – str

-

layer – str

-

connected_shapes – (shape, shape)

-

glue_points – (point, point)

-

p1 – (str, str)

-

p2 – (str, str)

-
- -Expand source code - -
class ConnectorShape(ShapeBase):
-    """Create a Connector shape.
-
-    Arguments:
-
-        style -- str
-
-        text_style -- str
-
-        draw_id -- str
-
-        layer -- str
-
-        connected_shapes -- (shape, shape)
-
-        glue_points -- (point, point)
-
-        p1 -- (str, str)
-
-        p2 -- (str, str)
-    """
-
-    _tag = "draw:connector"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("start_shape", "draw:start-shape"),
-        PropDef("end_shape", "draw:end-shape"),
-        PropDef("start_glue_point", "draw:start-glue-point"),
-        PropDef("end_glue_point", "draw:end-glue-point"),
-        PropDef("x1", "svg:x1"),
-        PropDef("y1", "svg:y1"),
-        PropDef("x2", "svg:x2"),
-        PropDef("y2", "svg:y2"),
-    )
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        connected_shapes: tuple | None = None,
-        glue_points: tuple | None = None,
-        p1: tuple | None = None,
-        p2: tuple | None = None,
-        **kwargs: Any,
-    ) -> None:
-        kwargs.update(
-            {
-                "style": style,
-                "text_style": text_style,
-                "draw_id": draw_id,
-                "layer": layer,
-            }
-        )
-        super().__init__(**kwargs)
-        if self._do_init:
-            if connected_shapes:
-                self.start_shape = connected_shapes[0].draw_id
-                self.end_shape = connected_shapes[1].draw_id
-            if glue_points:
-                self.start_glue_point = glue_points[0]
-                self.end_glue_point = glue_points[1]
-            if p1:
-                self.x1 = p1[0]
-                self.y1 = p1[1]
-            if p2:
-                self.x2 = p2[0]
-                self.y2 = p2[1]
-
-

Ancestors

- -

Instance variables

-
-
var end_glue_point : str | bool | None
-
-

Get/set the attribute draw:end-glue-point

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var end_shape : str | bool | None
-
-

Get/set the attribute draw:end-shape

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var start_glue_point : str | bool | None
-
-

Get/set the attribute draw:start-glue-point

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var start_shape : str | bool | None
-
-

Get/set the attribute draw:start-shape

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var x1 : str | bool | None
-
-

Get/set the attribute svg:x1

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var x2 : str | bool | None
-
-

Get/set the attribute svg:x2

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var y1 : str | bool | None
-
-

Get/set the attribute svg:y1

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var y2 : str | bool | None
-
-

Get/set the attribute svg:y2

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class DrawGroup -(name: str | None = None, draw_id: str | None = None, style: str | None = None, position: tuple | None = None, z_index: int = 0, anchor_type: str | None = None, anchor_page: int | None = None, presentation_style: str | None = None, **kwargs: Any) -
-
-

The DrawGroup "draw:g" element represents a group of drawing shapes.

-

Warning: implementation is currently minimal.

-

Drawing shapes contained by a "draw:g" element that is itself -contained by a "draw:a" element, act as hyperlinks using the -xlink:href attribute of the containing "draw:a" element. If the -included drawing shapes are themselves contained within "draw:a" -elements, then the xlink:href attributes of those "draw:a" elements -act as the hyperlink information for the shapes they contain.

-

The "draw:g" element has the following attributes: draw:caption-id, -draw:class-names, draw:id, draw:name, draw:style-name, draw:z-index, -presentation:class-names, presentation:style-name, svg:y, -table:end-cell-address, table:end-x, table:end-y, -table:table-background, text:anchor-page-number, text:anchor-type, -and xml:id.

-

The "draw:g" element has the following child elements: "dr3d:scene", -"draw:a", "draw:caption", "draw:circle", "draw:connector", -"draw:control", "draw:custom-shape", "draw:ellipse", "draw:frame", -"draw:g", "draw:glue-point", "draw:line", "draw:measure", -"draw:page-thumbnail", "draw:path", "draw:polygon", "draw:polyline", -"draw:rect", "draw:regular-polygon", "office:event-listeners", -"svg:desc" and "svg:title".

-
- -Expand source code - -
class DrawGroup(Element, AnchorMix, ZMix, PosMix):
-    """The DrawGroup "draw:g" element represents a group of drawing shapes.
-
-    Warning: implementation is currently minimal.
-
-    Drawing shapes contained by a "draw:g" element that is itself
-    contained by a "draw:a" element, act as hyperlinks using the
-    xlink:href attribute of the containing "draw:a" element. If the
-    included drawing shapes are themselves contained within "draw:a"
-    elements, then the xlink:href attributes of those "draw:a" elements
-    act as the hyperlink information for the shapes they contain.
-
-    The "draw:g" element has the following attributes: draw:caption-id,
-    draw:class-names, draw:id, draw:name, draw:style-name, draw:z-index,
-    presentation:class-names, presentation:style-name, svg:y,
-    table:end-cell-address, table:end-x, table:end-y,
-    table:table-background, text:anchor-page-number, text:anchor-type,
-    and xml:id.
-
-    The "draw:g" element has the following child elements: "dr3d:scene",
-    "draw:a", "draw:caption", "draw:circle", "draw:connector",
-    "draw:control", "draw:custom-shape", "draw:ellipse", "draw:frame",
-    "draw:g", "draw:glue-point", "draw:line", "draw:measure",
-    "draw:page-thumbnail", "draw:path", "draw:polygon", "draw:polyline",
-    "draw:rect", "draw:regular-polygon", "office:event-listeners",
-    "svg:desc" and "svg:title".
-    """
-
-    _tag = "draw:g"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("draw_id", "draw:id"),
-        PropDef("caption_id", "draw:caption-id"),
-        PropDef("draw_class_names", "draw:class-names"),
-        PropDef("name", "draw:name"),
-        PropDef("style", "draw:style-name"),
-        # ('z_index', 'draw:z-index'),
-        PropDef("presentation_class_names", "presentation:class-names"),
-        PropDef("presentation_style", "presentation:style-name"),
-        PropDef("table_end_cell", "table:end-cell-address"),
-        PropDef("table_end_x", "table:end-x"),
-        PropDef("table_end_y", "table:end-y"),
-        PropDef("table_background", "table:table-background"),
-        # ('anchor_page', 'text:anchor-page-number'),
-        # ('anchor_type', 'text:anchor-type'),
-        PropDef("xml_id", "xml:id"),
-        PropDef("pos_x", "svg:x"),
-        PropDef("pos_y", "svg:y"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        draw_id: str | None = None,
-        style: str | None = None,
-        position: tuple | None = None,
-        z_index: int = 0,
-        anchor_type: str | None = None,
-        anchor_page: int | None = None,
-        presentation_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if z_index is not None:
-                self.z_index = z_index
-            if name:
-                self.name = name
-            if draw_id is not None:
-                self.draw_id = draw_id
-            if style is not None:
-                self.style = style
-            if position is not None:
-                self.position = position
-            if anchor_type:
-                self.anchor_type = anchor_type
-            if anchor_page is not None:
-                self.anchor_page = anchor_page
-            if presentation_style is not None:
-                self.presentation_style = presentation_style
-
-

Ancestors

- -

Instance variables

-
-
var caption_id : str | bool | None
-
-

Get/set the attribute draw:caption-id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var draw_class_names : str | bool | None
-
-

Get/set the attribute draw:class-names

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var draw_id : str | bool | None
-
-

Get/set the attribute draw:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute draw:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var pos_x : str | bool | None
-
-

Get/set the attribute svg:x

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var pos_y : str | bool | None
-
-

Get/set the attribute svg:y

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var presentation_class_names : str | bool | None
-
-

Get/set the attribute presentation:class-names

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var presentation_style : str | bool | None
-
-

Get/set the attribute presentation:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute draw:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var table_background : str | bool | None
-
-

Get/set the attribute table:table-background

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var table_end_cell : str | bool | None
-
-

Get/set the attribute table:end-cell-address

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var table_end_x : str | bool | None
-
-

Get/set the attribute table:end-x

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var table_end_y : str | bool | None
-
-

Get/set the attribute table:end-y

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var xml_id : str | bool | None
-
-

Get/set the attribute xml:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class EllipseShape -(style: str | None = None, text_style: str | None = None, draw_id: str | None = None, layer: str | None = None, position: tuple | None = None, size: tuple | None = None, **kwargs: Any) -
-
-

Create a ellipse shape.

-

Arguments

-

style – str

-

text_style – str

-

draw_id – str

-

layer – str

-

position – (str, str)

-

size – (str, str)

-
- -Expand source code - -
class EllipseShape(ShapeBase):
-    """Create a ellipse shape.
-
-    Arguments:
-
-        style -- str
-
-        text_style -- str
-
-        draw_id -- str
-
-        layer -- str
-
-        position -- (str, str)
-
-        size -- (str, str)
-
-    """
-
-    _tag = "draw:ellipse"
-    _properties: tuple[PropDef, ...] = ()
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        position: tuple | None = None,
-        size: tuple | None = None,
-        **kwargs: Any,
-    ) -> None:
-        kwargs.update(
-            {
-                "style": style,
-                "text_style": text_style,
-                "draw_id": draw_id,
-                "layer": layer,
-                "size": size,
-                "position": position,
-            }
-        )
-        super().__init__(**kwargs)
-
-

Ancestors

- -

Inherited members

- -
-
-class LineShape -(style: str | None = None, text_style: str | None = None, draw_id: str | None = None, layer: str | None = None, p1: tuple | None = None, p2: tuple | None = None, **kwargs: Any) -
-
-

Create a line shape.

-

Arguments

-

style – str

-

text_style – str

-

draw_id – str

-

layer – str

-

p1 – (str, str)

-

p2 – (str, str)

-
- -Expand source code - -
class LineShape(ShapeBase):
-    """Create a line shape.
-
-    Arguments:
-
-        style -- str
-
-        text_style -- str
-
-        draw_id -- str
-
-        layer -- str
-
-        p1 -- (str, str)
-
-        p2 -- (str, str)
-    """
-
-    _tag = "draw:line"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("x1", "svg:x1"),
-        PropDef("y1", "svg:y1"),
-        PropDef("x2", "svg:x2"),
-        PropDef("y2", "svg:y2"),
-    )
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        p1: tuple | None = None,
-        p2: tuple | None = None,
-        **kwargs: Any,
-    ) -> None:
-        kwargs.update(
-            {
-                "style": style,
-                "text_style": text_style,
-                "draw_id": draw_id,
-                "layer": layer,
-            }
-        )
-        super().__init__(**kwargs)
-        if self._do_init:
-            if p1:
-                self.x1 = p1[0]
-                self.y1 = p1[1]
-            if p2:
-                self.x2 = p2[0]
-                self.y2 = p2[1]
-
-

Ancestors

- -

Instance variables

-
-
var x1 : str | bool | None
-
-

Get/set the attribute svg:x1

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var x2 : str | bool | None
-
-

Get/set the attribute svg:x2

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var y1 : str | bool | None
-
-

Get/set the attribute svg:y1

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var y2 : str | bool | None
-
-

Get/set the attribute svg:y2

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class RectangleShape -(style: str | None = None, text_style: str | None = None, draw_id: str | None = None, layer: str | None = None, position: tuple | None = None, size: tuple | None = None, **kwargs: Any) -
-
-

Create a rectangle shape.

-

Arguments

-

style – str

-

text_style – str

-

draw_id – str

-

layer – str

-

position – (str, str)

-

size – (str, str)

-
- -Expand source code - -
class RectangleShape(ShapeBase):
-    """Create a rectangle shape.
-
-    Arguments:
-
-        style -- str
-
-        text_style -- str
-
-        draw_id -- str
-
-        layer -- str
-
-        position -- (str, str)
-
-        size -- (str, str)
-
-    """
-
-    _tag = "draw:rect"
-    _properties: tuple[PropDef, ...] = ()
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        position: tuple | None = None,
-        size: tuple | None = None,
-        **kwargs: Any,
-    ) -> None:
-        kwargs.update(
-            {
-                "style": style,
-                "text_style": text_style,
-                "draw_id": draw_id,
-                "layer": layer,
-                "size": size,
-                "position": position,
-            }
-        )
-        super().__init__(**kwargs)
-
-

Ancestors

- -

Inherited members

- -
-
-class ShapeBase -(style: str | None = None, text_style: str | None = None, draw_id: str | None = None, layer: str | None = None, position: tuple | None = None, size: tuple | None = None, presentation_class: str | None = None, **kwargs: Any) -
-
-

Base class for shapes

-
- -Expand source code - -
class ShapeBase(Element, SizeMix, PosMix):
-    """Base class for shapes"""
-
-    _tag = "draw:shape-odfdo-notodf"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("draw_id", "draw:id"),
-        PropDef("layer", "draw:layer"),
-        PropDef("width", "svg:width"),
-        PropDef("height", "svg:height"),
-        PropDef("pos_x", "svg:x"),
-        PropDef("pos_y", "svg:y"),
-        PropDef("presentation_class", "presentation:class"),
-        PropDef("style", "draw:style-name"),
-        PropDef("text_style", "draw:text-style-name"),
-    )
-
-    def __init__(
-        self,
-        style: str | None = None,
-        text_style: str | None = None,
-        draw_id: str | None = None,
-        layer: str | None = None,
-        position: tuple | None = None,
-        size: tuple | None = None,
-        presentation_class: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style:
-                self.style = style
-            if text_style:
-                self.text_style = text_style
-            if draw_id:
-                self.draw_id = draw_id
-            if layer:
-                self.layer = layer
-            if position:
-                self.position = position
-            if size:
-                self.size = size
-            if presentation_class:
-                self.presentation_class = presentation_class
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        result: list[str] = []
-        for child in self.children:
-            result.append(child.get_formatted_text(context))
-        result.append("\n")
-        return "".join(result)
-
-

Ancestors

- -

Subclasses

- -

Instance variables

-
-
var draw_id : str | bool | None
-
-

Get/set the attribute draw:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var height : str | bool | None
-
-

Get/set the attribute svg:height

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var layer : str | bool | None
-
-

Get/set the attribute draw:layer

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var pos_x : str | bool | None
-
-

Get/set the attribute svg:x

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var pos_y : str | bool | None
-
-

Get/set the attribute svg:y

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var presentation_class : str | bool | None
-
-

Get/set the attribute presentation:class

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute draw:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var text_style : str | bool | None
-
-

Get/set the attribute draw:text-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var width : str | bool | None
-
-

Get/set the attribute svg:width

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/smil.html b/doc/smil.html deleted file mode 100644 index ed4ad6e..0000000 --- a/doc/smil.html +++ /dev/null @@ -1,977 +0,0 @@ - - - - - - -odfdo.smil API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.smil

-
-
-

Classes for ODF implementation of SMIL (Synchronized Multimedia -Integration Language).

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-"""Classes for ODF implementation of SMIL (Synchronized Multimedia
-Integration Language).
-"""
-from __future__ import annotations
-
-from typing import Any
-
-from .element import Element, PropDef, register_element_class
-
-
-class AnimPar(Element):
-    """A container for SMIL Presentation Animations.
-
-    Arguments:
-
-        presentation_node_type -- default, on-click, with-previous,
-                                  after-previous, timing-root, main-sequence
-                                  and interactive-sequence
-
-        smil_begin -- indefinite, 10s, [id].click, [id].begin
-    """
-
-    _tag = "anim:par"
-    _properties = (
-        PropDef("presentation_node_type", "presentation:node-type"),
-        PropDef("smil_begin", "smil:begin"),
-    )
-
-    def __init__(
-        self,
-        presentation_node_type: str | None = None,
-        smil_begin: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if presentation_node_type:
-                self.presentation_node_type = presentation_node_type
-            if smil_begin:
-                self.smil_begin = smil_begin
-
-
-AnimPar._define_attribut_property()
-
-
-class AnimSeq(Element):
-    """TA container for SMIL Presentation Animations. Animations
-    inside this block are executed after the slide has executed its initial
-    transition.
-
-    Arguments:
-
-        presentation_node_type -- default, on-click, with-previous,
-                                  after-previous, timing-root, main-sequence
-                                  and interactive-sequence
-    """
-
-    _tag = "anim:seq"
-    _properties = (PropDef("presentation_node_type", "presentation:node-type"),)
-
-    def __init__(
-        self,
-        presentation_node_type: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init and presentation_node_type:
-            self.presentation_node_type = presentation_node_type
-
-
-AnimSeq._define_attribut_property()
-
-
-class AnimTransFilter(Element):
-    """
-    Class to make a beautiful transition between two frames.
-
-    Arguments:
-      smil_dur -- XXX complete me
-
-      smil_type and smil_subtype -- see http://www.w3.org/TR/SMIL20/
-                    smil-transitions.html#TransitionEffects-Appendix
-                                    to get a list of all types/subtypes
-
-      smil_direction -- forward, reverse
-
-      smil_fadeColor -- forward, reverse
-
-      smil_mode -- in, out
-    """
-
-    _tag = "anim:transitionFilter"
-    _properties = (
-        PropDef("smil_dur", "smil:dur"),
-        PropDef("smil_type", "smil:type"),
-        PropDef("smil_subtype", "smil:subtype"),
-        PropDef("smil_direction", "smil:direction"),
-        PropDef("smil_fadeColor", "smil:fadeColor"),
-        PropDef("smil_mode", "smil:mode"),
-    )
-
-    def __init__(
-        self,
-        smil_dur: str | None = None,
-        smil_type: str | None = None,
-        smil_subtype: str | None = None,
-        smil_direction: str | None = None,
-        smil_fadeColor: str | None = None,
-        smil_mode: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if smil_dur:
-                self.smil_dur = smil_dur
-            if smil_type:
-                self.smil_type = smil_type
-            if smil_subtype:
-                self.smil_subtype = smil_subtype
-            if smil_direction:
-                self.smil_direction = smil_direction
-            if smil_fadeColor:
-                self.smil_fadeColor = smil_fadeColor
-            if smil_mode:
-                self.smil_mode = smil_mode
-
-
-AnimTransFilter._define_attribut_property()
-
-register_element_class(AnimPar)
-register_element_class(AnimSeq)
-register_element_class(AnimTransFilter)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class AnimPar -(presentation_node_type: str | None = None, smil_begin: str | None = None, **kwargs: Any) -
-
-

A container for SMIL Presentation Animations.

-

Arguments

-

presentation_node_type – default, on-click, with-previous, -after-previous, timing-root, main-sequence -and interactive-sequence

-

smil_begin – indefinite, 10s, [id].click, [id].begin

-
- -Expand source code - -
class AnimPar(Element):
-    """A container for SMIL Presentation Animations.
-
-    Arguments:
-
-        presentation_node_type -- default, on-click, with-previous,
-                                  after-previous, timing-root, main-sequence
-                                  and interactive-sequence
-
-        smil_begin -- indefinite, 10s, [id].click, [id].begin
-    """
-
-    _tag = "anim:par"
-    _properties = (
-        PropDef("presentation_node_type", "presentation:node-type"),
-        PropDef("smil_begin", "smil:begin"),
-    )
-
-    def __init__(
-        self,
-        presentation_node_type: str | None = None,
-        smil_begin: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if presentation_node_type:
-                self.presentation_node_type = presentation_node_type
-            if smil_begin:
-                self.smil_begin = smil_begin
-
-

Ancestors

- -

Instance variables

-
-
var presentation_node_type : str | bool | None
-
-

Get/set the attribute presentation:node-type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var smil_begin : str | bool | None
-
-

Get/set the attribute smil:begin

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class AnimSeq -(presentation_node_type: str | None = None, **kwargs: Any) -
-
-

TA container for SMIL Presentation Animations. Animations -inside this block are executed after the slide has executed its initial -transition.

-

Arguments

-

presentation_node_type – default, on-click, with-previous, -after-previous, timing-root, main-sequence -and interactive-sequence

-
- -Expand source code - -
class AnimSeq(Element):
-    """TA container for SMIL Presentation Animations. Animations
-    inside this block are executed after the slide has executed its initial
-    transition.
-
-    Arguments:
-
-        presentation_node_type -- default, on-click, with-previous,
-                                  after-previous, timing-root, main-sequence
-                                  and interactive-sequence
-    """
-
-    _tag = "anim:seq"
-    _properties = (PropDef("presentation_node_type", "presentation:node-type"),)
-
-    def __init__(
-        self,
-        presentation_node_type: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init and presentation_node_type:
-            self.presentation_node_type = presentation_node_type
-
-

Ancestors

- -

Instance variables

-
-
var presentation_node_type : str | bool | None
-
-

Get/set the attribute presentation:node-type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class AnimTransFilter -(smil_dur: str | None = None, smil_type: str | None = None, smil_subtype: str | None = None, smil_direction: str | None = None, smil_fadeColor: str | None = None, smil_mode: str | None = None, **kwargs: Any) -
-
-

Class to make a beautiful transition between two frames.

-

Arguments

-

smil_dur – XXX complete me

-

smil_type and smil_subtype – see http://www.w3.org/TR/SMIL20/ -smil-transitions.html#TransitionEffects-Appendix -to get a list of all types/subtypes

-

smil_direction – forward, reverse

-

smil_fadeColor – forward, reverse

-

smil_mode – in, out

-
- -Expand source code - -
class AnimTransFilter(Element):
-    """
-    Class to make a beautiful transition between two frames.
-
-    Arguments:
-      smil_dur -- XXX complete me
-
-      smil_type and smil_subtype -- see http://www.w3.org/TR/SMIL20/
-                    smil-transitions.html#TransitionEffects-Appendix
-                                    to get a list of all types/subtypes
-
-      smil_direction -- forward, reverse
-
-      smil_fadeColor -- forward, reverse
-
-      smil_mode -- in, out
-    """
-
-    _tag = "anim:transitionFilter"
-    _properties = (
-        PropDef("smil_dur", "smil:dur"),
-        PropDef("smil_type", "smil:type"),
-        PropDef("smil_subtype", "smil:subtype"),
-        PropDef("smil_direction", "smil:direction"),
-        PropDef("smil_fadeColor", "smil:fadeColor"),
-        PropDef("smil_mode", "smil:mode"),
-    )
-
-    def __init__(
-        self,
-        smil_dur: str | None = None,
-        smil_type: str | None = None,
-        smil_subtype: str | None = None,
-        smil_direction: str | None = None,
-        smil_fadeColor: str | None = None,
-        smil_mode: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if smil_dur:
-                self.smil_dur = smil_dur
-            if smil_type:
-                self.smil_type = smil_type
-            if smil_subtype:
-                self.smil_subtype = smil_subtype
-            if smil_direction:
-                self.smil_direction = smil_direction
-            if smil_fadeColor:
-                self.smil_fadeColor = smil_fadeColor
-            if smil_mode:
-                self.smil_mode = smil_mode
-
-

Ancestors

- -

Instance variables

-
-
var smil_direction : str | bool | None
-
-

Get/set the attribute smil:direction

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var smil_dur : str | bool | None
-
-

Get/set the attribute smil:dur

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var smil_fadeColor : str | bool | None
-
-

Get/set the attribute smil:fadeColor

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var smil_mode : str | bool | None
-
-

Get/set the attribute smil:mode

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var smil_subtype : str | bool | None
-
-

Get/set the attribute smil:subtype

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var smil_type : str | bool | None
-
-

Get/set the attribute smil:type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/style.html b/doc/style.html deleted file mode 100644 index fbb92c1..0000000 --- a/doc/style.html +++ /dev/null @@ -1,3887 +0,0 @@ - - - - - - -odfdo.style API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.style

-
-
-

Style class for various style tags and BackgroundImage class.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-"""Style class for various style tags and BackgroundImage class.
-"""
-from __future__ import annotations
-
-from typing import Any
-
-from .const import CSS3_COLORMAP, ODF_PROPERTIES
-from .datatype import Boolean
-from .element import (
-    Element,
-    PropDef,
-    register_element_class,
-    register_element_class_list,
-)
-from .image import DrawImage
-from .utils import (
-    FALSE_FAMILY_MAP_REVERSE,
-    FAMILY_MAPPING,
-    FAMILY_ODF_STD,
-    STYLES_TO_REGISTER,
-    SUBCLASSED_STYLES,
-    to_str,
-)
-
-# This mapping is not exhaustive, it only contains cases where replacing
-# '_' with '-' and adding the "fo:" prefix is not enough
-_PROPERTY_MAPPING = {  # text
-    "display": "text:display",
-    "family_generic": "style:font-family-generic",
-    "font": "style:font-name",
-    "outline": "style:text-outline",
-    "pitch": "style:font-pitch",
-    "size": "fo:font-size",
-    "style": "fo:font-style",
-    "underline": "style:text-underline-style",
-    "weight": "fo:font-weight",
-    # compliance with office suites
-    "font_family": "fo:font-family",
-    "font_style_name": "style:font-style-name",
-    # paragraph
-    "align-last": "fo:text-align-last",
-    "align": "fo:text-align",
-    "indent": "fo:text-indent",
-    "together": "fo:keep-together",
-    # frame position
-    "horizontal_pos": "style:horizontal-pos",
-    "horizontal_rel": "style:horizontal-rel",
-    "vertical_pos": "style:vertical-pos",
-    "vertical_rel": "style:vertical-rel",
-    # TODO 'page-break-before': 'fo:page-break-before',
-    # TODO 'page-break-after': 'fo:page-break-after',
-    "shadow": "fo:text-shadow",
-    # Graphic
-    "fill_color": "draw:fill-color",
-    "fill_image_height": "draw:fill-image-height",
-    "fill_image_width": "draw:fill-image-width",
-    "guide_distance": "draw:guide-distance",
-    "guide_overhang": "draw:guide-overhang",
-    "line_distance": "draw:line-distance",
-    "stroke": "draw:stroke",
-    "textarea_vertical_align": "draw:textarea-vertical-align",
-}
-
-
-def _map_key(key: str) -> str | None:
-    if key in ODF_PROPERTIES:
-        return key
-    key = _PROPERTY_MAPPING.get(key, key).replace("_", "-")
-    if ":" not in key:
-        key = f"fo:{key}"
-    if key in ODF_PROPERTIES:
-        return key
-    return None
-
-
-def _merge_dicts(dic_base: dict, *args: dict, **kwargs: Any) -> dict:
-    """Merge two or more dictionaries into a new dictionary object."""
-    new_dict = dic_base.copy()
-    for dic in args:
-        new_dict.update(dic)
-    new_dict.update(kwargs)
-    return new_dict
-
-
-def _expand_properties_dict(properties: dict[str, str | dict]) -> dict[str, str | dict]:
-    expanded = {}
-    for key in sorted(properties.keys()):
-        prop_key = _map_key(key)
-        if not prop_key:
-            continue
-        expanded[prop_key] = properties[key]
-    return expanded
-
-
-def _expand_properties_list(properties: list[str]) -> list[str]:
-    return list(filter(None, (_map_key(key) for key in properties)))
-
-
-def hex2rgb(color: str) -> tuple[int, int, int]:
-    """Turns a "#RRGGBB" hexadecimal color representation into a (R, G, B)
-    tuple.
-    Arguments:
-
-        color -- str
-
-    Return: tuple
-    """
-    code = color[1:]
-    if not (len(color) == 7 and color[0] == "#" and code.isalnum()):
-        raise ValueError('"%s" is not a valid color' % color)
-    red = int(code[:2], 16)
-    green = int(code[2:4], 16)
-    blue = int(code[4:6], 16)
-    return (red, green, blue)
-
-
-def rgb2hex(color: str | tuple[int, int, int]) -> str:
-    """Turns a color name or a (R, G, B) color tuple into a "#RRGGBB"
-    hexadecimal representation.
-    Arguments:
-
-        color -- str or tuple
-
-    Return: str
-
-    Examples::
-
-        >>> rgb2hex('yellow')
-        '#FFFF00'
-        >>> rgb2hex((238, 130, 238))
-        '#EE82EE'
-    """
-    if isinstance(color, str):
-        try:
-            code = CSS3_COLORMAP[color.lower()]
-        except KeyError as e:
-            raise KeyError(f'Color "{color}" is unknown') from e
-    elif isinstance(color, tuple):
-        if len(color) != 3:
-            raise ValueError("Color must be a 3-tuple")
-        code = color
-    else:
-        raise TypeError("Invalid color")
-    for channel in code:
-        if channel < 0 or channel > 255:
-            raise ValueError("Color code must be between 0 and 255")
-    return f"#{code[0]:02X}{code[1]:02X}{code[2]:02X}"
-
-
-def _make_color_string(color: str | tuple[int, int, int] | None = None) -> str:
-    color_default = "#000000"
-    if not color:
-        return color_default
-    if isinstance(color, tuple):
-        return rgb2hex(color)
-    if not isinstance(color, str):
-        msg = "Color must be None for default or color string, or RGB tuple"
-        raise TypeError(msg)
-    color = color.strip()
-    if not color:
-        return color_default
-    if color.startswith("#"):
-        return color
-    return rgb2hex(color)
-
-
-def _make_thick_string(thick: str | float | int | None) -> str:
-    THICK_DEFAULT = "0.06pt"
-    if thick is None:
-        return THICK_DEFAULT
-    if isinstance(thick, str):
-        thick = thick.strip()
-        if thick:
-            return thick
-        return THICK_DEFAULT
-    if isinstance(thick, float):
-        return f"{thick:.2f}pt"
-    if isinstance(thick, int):
-        return f"{thick/100.0:.2f}pt"
-    raise ValueError("Thickness must be None for default or float value (pt)")
-
-
-def _make_line_string(line: str | None) -> str:
-    LINE_DEFAULT = "solid"
-    if line is None:
-        return LINE_DEFAULT
-    if isinstance(line, str):
-        line = line.strip()
-        if line:
-            return line
-        return LINE_DEFAULT
-    raise ValueError("Line style must be None for default or string")
-
-
-def make_table_cell_border_string(
-    thick: str | float | int | None = None,
-    line: str | None = None,
-    color: str | tuple | None = None,
-) -> str:
-    """Returns a string for style:table-cell-properties fo:border,
-    with default : "0.06pt solid #000000"
-
-        thick -- str or float or int
-        line -- str
-        color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
-
-    Returns : str
-    """
-    thick_string = _make_thick_string(thick)
-    line_string = _make_line_string(line)
-    color_string = _make_color_string(color)
-    return " ".join((thick_string, line_string, color_string))
-
-
-def create_table_cell_style(
-    border: str | None = None,
-    border_top: str | None = None,
-    border_bottom: str | None = None,
-    border_left: str | None = None,
-    border_right: str | None = None,
-    padding: str | None = None,
-    padding_top: str | None = None,
-    padding_bottom: str | None = None,
-    padding_left: str | None = None,
-    padding_right: str | None = None,
-    background_color: str | tuple | None = None,
-    shadow: str | None = None,
-    color: str | tuple | None = None,
-) -> Style:
-    """Return a cell style.
-
-    The borders arguments must be some style attribute strings or None, see the
-    method 'make_table_cell_border_string' to generate them.
-    If the 'border' argument as the value 'default', the default style
-    "0.06pt solid #000000" is used for the 4 borders.
-    If any value is used for border, it is used for the 4 borders, else any of
-    the 4 borders can be specified by it's own string. If all the border,
-    border_top, border_bottom, ... arguments are None, an empty border is used
-    (ODF value is fo:border="none").
-
-    Padding arguments are string specifying a length (e.g. "0.5mm")". If
-    'padding' is provided, it is used for the 4 sides, else any of
-    the 4 sides padding can be specified by it's own string. Default padding is
-    no padding.
-
-    Arguments:
-
-        border -- str, style string for borders on four sides
-
-        border_top -- str, style string for top if no 'border' argument
-
-        border_bottom -- str, style string for bottom if no 'border' argument
-
-        border_left -- str, style string for left if no 'border' argument
-
-        border_right -- str, style string for right if no 'border' argument
-
-        padding -- str, style string for padding on four sides
-
-        padding_top -- str, style string for top if no 'padding' argument
-
-        padding_bottom -- str, style string for bottom if no 'padding' argument
-
-        padding_left -- str, style string for left if no 'padding' argument
-
-        padding_right -- str, style string for right if no 'padding' argument
-
-        background_color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
-
-        shadow -- str, e.g. "#808080 0.176cm 0.176cm"
-
-        color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
-
-    Return : Style
-    """
-    if border == "default":
-        border = make_table_cell_border_string()  # default border
-    if border is not None:
-        # use the border value for 4 sides.
-        border_bottom = border_top = border_left = border_right = None
-    if (
-        border is None
-        and border_bottom is None
-        and border_top is None
-        and border_left is None
-        and border_right is None
-    ):
-        border = "none"
-    if padding is not None:
-        # use the padding value for 4 sides.
-        padding_bottom = padding_top = padding_left = padding_right = None
-    if color:
-        color_string = _make_color_string(color)
-    if background_color:
-        bgcolor_string = _make_color_string(background_color)
-    else:
-        bgcolor_string = None
-    cell_style = Style(
-        "table-cell",
-        area="table-cell",
-        border=border,
-        border_top=border_top,
-        border_bottom=border_bottom,
-        border_left=border_left,
-        border_right=border_right,
-        padding=padding,
-        padding_top=padding_top,
-        padding_bottom=padding_bottom,
-        padding_left=padding_left,
-        padding_right=padding_right,
-        background_color=bgcolor_string,
-        shadow=shadow,
-    )
-    if color:
-        cell_style.set_properties(area="text", color=color_string)
-    return cell_style
-
-
-class Style(Element):
-    """Style class for all these tags:
-
-    'style:style'
-    'number:date-style',
-    'number:number-style',
-    'number:percentage-style',
-    'number:time-style'
-    'style:font-face',
-    'style:master-page',
-    'style:page-layout',
-    'style:presentation-page-layout',
-    'text:list-style',
-    'text:outline-style',
-    'style:tab-stops',
-    ...
-    """
-
-    _properties: tuple[PropDef, ...] = (
-        PropDef("page_layout", "style:page-layout-name", "master-page"),
-        PropDef("next_style", "style:next-style-name", "master-page"),
-        PropDef("name", "style:name"),
-        PropDef("parent_style", "style:parent-style-name"),
-        PropDef("display_name", "style:display-name"),
-        PropDef("svg_font_family", "svg:font-family"),
-        PropDef("font_family_generic", "style:font-family-generic"),
-        PropDef("font_pitch", "style:font-pitch"),
-        PropDef("text_style", "text:style-name"),
-        PropDef("master_page", "style:master-page-name", "paragraph"),
-        PropDef("master_page", "style:master-page-name", "paragraph"),
-        PropDef("master_page", "style:master-page-name", "paragraph"),
-        # style:tab-stop
-        PropDef("style_type", "style:type"),
-        PropDef("leader_style", "style:leader-style"),
-        PropDef("leader_text", "style:leader-text"),
-        PropDef("style_position", "style:position"),
-        PropDef("leader_text", "style:position"),
-    )
-
-    def __init__(  # noqa: C901
-        self,
-        family: str | None = None,
-        name: str | None = None,
-        display_name: str | None = None,
-        parent_style: str | None = None,
-        # Where properties apply
-        area: str | None = None,
-        # For family 'text':
-        color: str | tuple | None = None,
-        background_color: str | tuple | None = None,
-        italic: bool = False,
-        bold: bool = False,
-        # For family 'paragraph'
-        master_page: str | None = None,
-        # For family 'master-page'
-        page_layout: str | None = None,
-        next_style: str | None = None,
-        # For family 'table-cell'
-        data_style: str | None = None,  # unused
-        border: str | None = None,
-        border_top: str | None = None,
-        border_right: str | None = None,
-        border_bottom: str | None = None,
-        border_left: str | None = None,
-        padding: str | None = None,
-        padding_top: str | None = None,
-        padding_bottom: str | None = None,
-        padding_left: str | None = None,
-        padding_right: str | None = None,
-        shadow: str | None = None,
-        # For family 'table-row'
-        height: str | None = None,
-        use_optimal_height: bool = False,
-        # For family 'table-column'
-        width: str | None = None,
-        break_before: str | None = None,
-        break_after: str | None = None,
-        # For family 'graphic'
-        min_height: str | None = None,
-        # For family 'font-face'
-        font_name: str | None = None,
-        font_family: str | None = None,
-        font_family_generic: str | None = None,
-        font_pitch: str = "variable",
-        # Every other property
-        **kwargs: Any,
-    ) -> None:
-        """Create a style of the given family. The name is not mandatory at this
-        point but will become required when inserting in a document as a common
-        style.
-
-        The display name is the name the user sees in an office application.
-
-        The parent_style is the name of the style this style will inherit from.
-
-        To set properties, pass them as keyword arguments. The area properties
-        apply to is optional and defaults to the family.
-
-        Arguments:
-
-            family -- 'paragraph', 'text', 'section', 'table', 'table-column',
-                      'table-row', 'table-cell', 'table-page', 'chart',
-                      'drawing-page', 'graphic', 'presentation',
-                      'control', 'ruby', 'list', 'number', 'page-layout'
-                      'font-face', or 'master-page'
-
-            name -- str
-
-            display_name -- str
-
-            parent_style -- str
-
-            area -- str
-
-        'text' Properties:
-
-            italic -- bool
-
-            bold -- bool
-
-        'paragraph' Properties:
-
-            master_page -- str
-
-        'master-page' Properties:
-
-            page_layout -- str
-
-            next_style -- str
-
-        'table-cell' Properties:
-
-            border, border_top, border_right, border_bottom, border_left -- str,
-            e.g. "0.002cm solid #000000" or 'none'
-
-            padding, padding_top, padding_right, padding_bottom, padding_left -- str,
-            e.g. "0.002cm" or 'none'
-
-            shadow -- str, e.g. "#808080 0.176cm 0.176cm"
-
-        'table-row' Properties:
-
-            height -- str, e.g. '5cm'
-
-            use_optimal_height -- bool
-
-        'table-column' Properties:
-
-            width -- str, e.g. '5cm'
-
-            break_before -- 'page', 'column' or 'auto'
-
-            break_after -- 'page', 'column' or 'auto'
-        """
-        self._family: str | None = None
-        tag_or_elem = kwargs.get("tag_or_elem", None)
-        if tag_or_elem is None:
-            family = to_str(family)
-            if family not in FAMILY_MAPPING:
-                raise ValueError("Unknown family value: %s" % family)
-            kwargs["tag"] = FAMILY_MAPPING[family]
-        super().__init__(**kwargs)
-        if self._do_init and family not in SUBCLASSED_STYLES:
-            kwargs.pop("tag", None)
-            kwargs.pop("tag_or_elem", None)
-            self.family = family  # relevant test made by property
-            # Common attributes
-            if name:
-                self.name = name
-            if display_name:
-                self.display_name = display_name
-            if parent_style:
-                self.parent_style = parent_style
-            # Paragraph
-            if family == "paragraph":
-                if master_page:
-                    self.master_page = master_page
-            # Master Page
-            elif family == "master-page":
-                if page_layout:
-                    self.page_layout = page_layout
-                if next_style:
-                    self.next_style = next_style
-            # Font face
-            elif family == "font-face":
-                if not font_name:
-                    raise ValueError("A font_name is required for 'font-face' style")
-                self.set_font(
-                    font_name,
-                    family=font_family,
-                    family_generic=font_family_generic,
-                    pitch=font_pitch,
-                )
-            # Properties
-            if area is None:
-                area = family
-            area = to_str(area)
-            # Text
-            if area == "text":
-                if color:
-                    kwargs["fo:color"] = color
-                if background_color:
-                    kwargs["fo:background-color"] = background_color
-                if italic:
-                    kwargs["fo:font-style"] = "italic"
-                    kwargs["style:font-style-asian"] = "italic"
-                    kwargs["style:font-style-complex"] = "italic"
-                if bold:
-                    kwargs["fo:font-weight"] = "bold"
-                    kwargs["style:font-weight-asian"] = "bold"
-                    kwargs["style:font-weight-complex"] = "bold"
-            # Table cell
-            elif area == "table-cell":
-                if border:
-                    kwargs["fo:border"] = border
-                elif border_top or border_right or border_bottom or border_left:
-                    kwargs["fo:border-top"] = border_top or "none"
-                    kwargs["fo:border-right"] = border_right or "none"
-                    kwargs["fo:border-bottom"] = border_bottom or "none"
-                    kwargs["fo:border-left"] = border_left or "none"
-                else:  # no border_top, ... neither border are defined
-                    pass  # left untouched
-                if padding:
-                    kwargs["fo:padding"] = padding
-                elif padding_top or padding_right or padding_bottom or padding_left:
-                    kwargs["fo:padding-top"] = padding_top or "none"
-                    kwargs["fo:padding-right"] = padding_right or "none"
-                    kwargs["fo:padding-bottom"] = padding_bottom or "none"
-                    kwargs["fo:padding-left"] = padding_left or "none"
-                else:  # no border_top, ... neither border are defined
-                    pass  # left untouched
-                if shadow:
-                    kwargs["style:shadow"] = shadow
-                if background_color:
-                    kwargs["fo:background-color"] = background_color
-            # Table row
-            elif area == "table-row":
-                if height:
-                    kwargs["style:row-height"] = height
-                if use_optimal_height:
-                    kwargs["style:use-optimal-row-height"] = Boolean.encode(
-                        use_optimal_height
-                    )
-                if background_color:
-                    kwargs["fo:background-color"] = background_color
-            # Table column
-            elif area == "table-column":
-                if width:
-                    kwargs["style:column-width"] = width
-                if break_before:
-                    kwargs["fo:break-before"] = break_before
-                if break_after:
-                    kwargs["fo:break-after"] = break_after
-            # Graphic
-            elif area == "graphic":
-                if min_height:
-                    kwargs["fo:min-height"] = min_height
-            # Every other properties
-            if kwargs:
-                self.set_properties(kwargs, area=area)
-
-    @property
-    def family(self) -> str | None:
-        if self._family is None:
-            self._family = FALSE_FAMILY_MAP_REVERSE.get(
-                self.tag, self.get_attribute_string("style:family")
-            )
-        return self._family
-
-    @family.setter
-    def family(self, family: str | None) -> None:
-        self._family = family
-        if family in FAMILY_ODF_STD and self.tag == "style:style":
-            self.set_attribute("style:family", family)
-
-    def get_properties(self, area: str | None = None) -> dict[str, str | dict] | None:
-        """Get the mapping of all properties of this style. By default the
-        properties of the same family, e.g. a paragraph style and its
-        paragraph properties. Specify the area to get the text properties of
-        a paragraph style for example.
-
-        Arguments:
-
-            area -- str
-
-        Return: dict
-        """
-        if area is None:
-            area = self.family
-        element = self.get_element(f"style:{area}-properties")
-        if element is None:
-            return None
-        properties: dict[str, str | dict] = element.attributes  # type: ignore
-        # Nested properties are nested dictionaries
-        for child in element.children:
-            properties[child.tag] = child.attributes
-        return properties
-
-    def set_properties(  # noqa: C901
-        self,
-        properties: dict[str, str | dict] | None = None,
-        style: Style | None = None,
-        area: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Set the properties of the "area" type of this style. Properties
-        are given either as a dict or as named arguments (or both). The area
-        is identical to the style family by default. If the properties
-        element is missing, it is created.
-
-        Instead of properties, you can pass a style with properties of the
-        same area. These will be copied.
-
-        Arguments:
-
-            properties -- dict
-
-            style -- Style
-
-            area -- 'paragraph', 'text'...
-        """
-        if properties is None:
-            properties = {}
-        if area is None:
-            if isinstance(self.family, bool):
-                area = None
-            else:
-                area = self.family
-        element = self.get_element(f"style:{area}-properties")
-        if element is None:
-            element = Element.from_tag(f"style:{area}-properties")
-            self.append(element)
-        if properties or kwargs:
-            properties = _expand_properties_dict(_merge_dicts(properties, kwargs))
-        elif style is not None:
-            properties = style.get_properties(area=area)
-            if properties is None:
-                return
-        if properties is None:
-            return
-        for key, value in properties.items():
-            if value is None:
-                element.del_attribute(key)
-            elif isinstance(value, (str, bool)):
-                element.set_attribute(key, value)
-            else:
-                pass
-
-    def del_properties(
-        self,
-        properties: list[str] | None = None,
-        area: str | None = None,
-    ) -> None:
-        """Delete the given properties, either by list argument or
-        positional argument (or both). Remove only from the given area,
-        identical to the style family by default.
-
-        Arguments:
-
-            properties -- list
-
-            area -- str
-        """
-        if properties is None:
-            properties = []
-        if area is None:
-            area = self.family
-        element = self.get_element(f"style:{area}-properties")
-        if element is None:
-            raise ValueError(
-                f"properties element is inexistent for: style:{area}-properties"
-            )
-        for key in _expand_properties_list(properties):
-            element.del_attribute(key)
-
-    def set_background(  # noqa: C901
-        self,
-        color: str | None = None,
-        url: str | None = None,
-        position: str | None = "center",
-        repeat: str | None = None,
-        opacity: str | None = None,
-        filter: str | None = None,  # noqa: A002
-    ) -> None:
-        """Set the background color of a text style, or the background color
-        or image of a paragraph style or page layout.
-
-        With no argument, remove any existing background.
-
-        The position is one or two of 'center', 'left', 'right', 'top' or
-        'bottom'.
-
-        The repeat is 'no-repeat', 'repeat' or 'stretch'.
-
-        The opacity is a percentage integer (not a string with the '%s' sign)
-
-        The filter is an application-specific filter name defined elsewhere.
-
-        Though this method is defined on the base style class, it will raise
-        an error if the style type is not compatible.
-
-        Arguments:
-
-            color -- '#rrggbb'
-
-            url -- str
-
-            position -- str
-
-            repeat -- str
-
-            opacity -- int
-
-            filter -- str
-        """
-        family = self.family
-        if family not in {
-            "text",
-            "paragraph",
-            "page-layout",
-            "section",
-            "table",
-            "table-row",
-            "table-cell",
-            "graphic",
-        }:
-            raise TypeError("No background support for this family")
-        if url is not None and family == "text":
-            raise TypeError("No background image for text styles")
-        properties = self.get_element(f"style:{family}-properties")
-        bg_image: BackgroundImage | None = None
-        if properties is not None:
-            bg_image = properties.get_element("style:background-image")  # type:ignore
-        # Erasing
-        if color is None and url is None:
-            if properties is None:
-                return
-            properties.del_attribute("fo:background-color")
-            if bg_image is not None:
-                properties.delete(bg_image)
-            return
-        # Add the properties if necessary
-        if properties is None:
-            properties = Element.from_tag(f"style:{family}-properties")
-            self.append(properties)
-        # Add the color...
-        if color:
-            properties.set_attribute("fo:background-color", color)
-            if bg_image is not None:
-                properties.delete(bg_image)
-        # ... or the background
-        elif url:
-            properties.set_attribute("fo:background-color", "transparent")
-            if bg_image is None:
-                bg_image = Element.from_tag("style:background-image")  # type:ignore
-                properties.append(bg_image)  # type:ignore
-            bg_image.url = url  # type:ignore
-            if position:
-                bg_image.position = position  # type:ignore
-            if repeat:
-                bg_image.repeat = repeat  # type:ignore
-            if opacity:
-                bg_image.opacity = opacity  # type:ignore
-            if filter:
-                bg_image.filter = filter  # type:ignore
-
-    # list-style only:
-
-    def get_level_style(self, level: int) -> Style | None:
-        if self.family != "list":
-            return None
-        level_styles = (
-            "(text:list-level-style-number"
-            "|text:list-level-style-bullet"
-            "|text:list-level-style-image)"
-        )
-        return self._filtered_element(level_styles, 0, level=level)  # type: ignore
-
-    def set_level_style(  # noqa: C901
-        self,
-        level: int,
-        num_format: str | None = None,
-        bullet_char: str | None = None,
-        url: str | None = None,
-        display_levels: int | None = None,
-        prefix: str | None = None,
-        suffix: str | None = None,
-        start_value: int | None = None,
-        style: str | None = None,
-        clone: Style | None = None,
-    ) -> Style | None:
-        """
-        Arguments:
-
-            level -- int
-
-            num_format (for number) -- int
-
-            bullet_char (for bullet) -- str
-
-            url (for image) -- str
-
-            display_levels -- int
-
-            prefix -- str
-
-            suffix -- str
-
-            start_value -- int
-
-            style -- str
-
-            clone -- List Style
-
-        Return:
-            level_style created
-        """
-        if self.family != "list":
-            return None
-        # Expected name
-        if num_format is not None:
-            level_style_name = "text:list-level-style-number"
-        elif bullet_char is not None:
-            level_style_name = "text:list-level-style-bullet"
-        elif url is not None:
-            level_style_name = "text:list-level-style-image"
-        elif clone is not None:
-            level_style_name = clone.tag
-        else:
-            raise ValueError("unknown level style type")
-        was_created = False
-        # Cloning or reusing an existing element
-        level_style: Style | None = None
-        if clone is not None:
-            level_style = clone.clone  # type: ignore
-            was_created = True
-        else:
-            level_style = self.get_level_style(level)
-            if level_style is None:
-                level_style = Element.from_tag(level_style_name)  # type: ignore
-                was_created = True
-        if level_style is None:
-            return None
-        # Transmute if the type changed
-        if level_style.tag != level_style_name:
-            print("Warn: different style", level_style_name, level_style.tag)
-            level_style.tag = level_style_name
-        # Set the level
-        level_style.set_attribute("text:level", str(level))
-        # Set the main attribute
-        if num_format is not None:
-            level_style.set_attribute("fo:num-format", num_format)
-        elif bullet_char is not None:
-            level_style.set_attribute("text:bullet-char", bullet_char)
-        elif url is not None:
-            level_style.set_attribute("xlink:href", url)
-        # Set attributes
-        if prefix:
-            level_style.set_attribute("style:num-prefix", prefix)
-        if suffix:
-            level_style.set_attribute("style:num-suffix", suffix)
-        if display_levels:
-            level_style.set_attribute("text:display-levels", str(display_levels))
-        if start_value:
-            level_style.set_attribute("text:start-value", str(start_value))
-        if style:
-            level_style.text_style = style  # type: ignore
-        # Commit the creation
-        if was_created:
-            self.append(level_style)
-        return level_style
-
-    # page-layout only:
-
-    def get_header_style(self) -> Element | None:
-        if self.family != "page-layout":
-            return None
-        return self.get_element("style:header-style")
-
-    def set_header_style(self, new_style: Style) -> None:
-        if self.family != "page-layout":
-            return
-        header_style = self.get_header_style()
-        if header_style is not None:
-            self.delete(header_style)
-        self.append(new_style)
-
-    def get_footer_style(self) -> Style | None:
-        if self.family != "page-layout":
-            return None
-        return self.get_element("style:footer-style")  # type: ignore
-
-    def set_footer_style(self, new_style: Style) -> None:
-        if self.family != "page-layout":
-            return
-        footer_style = self.get_footer_style()
-        if footer_style is not None:
-            self.delete(footer_style)
-        self.append(new_style)
-
-    # master-page only:
-
-    def _set_header_or_footer(
-        self,
-        text_or_element: str | Element | list[Element | str],
-        name: str = "header",
-        style: str = "Header",
-    ) -> None:
-        if name == "header":
-            header_or_footer = self.get_page_header()
-        else:
-            header_or_footer = self.get_page_footer()
-        if header_or_footer is None:
-            header_or_footer = Element.from_tag("style:" + name)
-            self.append(header_or_footer)
-        else:
-            header_or_footer.clear()
-        if (
-            isinstance(text_or_element, Element)
-            and text_or_element.tag == f"style:{name}"
-        ):
-            # Already a header or footer?
-            self.delete(header_or_footer)
-            self.append(text_or_element)
-            return
-        if isinstance(text_or_element, (Element, str)):
-            elem_list: list[Element | str] = [text_or_element]
-        else:
-            elem_list = text_or_element
-        for item in elem_list:
-            if isinstance(item, str):
-                paragraph = Element.from_tag("text:p")
-                paragraph.style = style  # type: ignore
-                header_or_footer.append(paragraph)
-            elif isinstance(item, Element):
-                header_or_footer.append(item)
-
-    def get_page_header(self) -> Element | None:
-        """Get the element that contains the header contents.
-
-        If None, no header was set.
-        """
-        if self.family != "master-page":
-            return None
-        return self.get_element("style:header")
-
-    def set_page_header(
-        self,
-        text_or_element: str | Element | list[Element | str],
-    ) -> None:
-        """Create or replace the header by the given content. It can already
-        be a complete header.
-
-        If you only want to update the existing header, get it and use the
-        API.
-
-        Arguments:
-
-            text_or_element -- str or Element or a list of them
-        """
-        if self.family != "master-page":
-            return None
-        self._set_header_or_footer(text_or_element)
-
-    def get_page_footer(self) -> Element | None:
-        """Get the element that contains the footer contents.
-
-        If None, no footer was set.
-        """
-        if self.family != "master-page":
-            return None
-        return self.get_element("style:footer")
-
-    def set_page_footer(
-        self,
-        text_or_element: str | Element | list[Element | str],
-    ) -> None:
-        """Create or replace the footer by the given content. It can already
-        be a complete footer.
-
-        If you only want to update the existing footer, get it and use the
-        API.
-
-        Arguments:
-
-            text_or_element -- str or Element or a list of them
-        """
-        if self.family != "master-page":
-            return None
-        self._set_header_or_footer(text_or_element, name="footer", style="Footer")
-
-    # font-face only:
-
-    def set_font(
-        self,
-        name: str,
-        family: str | None = None,
-        family_generic: str | None = None,
-        pitch: str = "variable",
-    ) -> None:
-        if self.family != "font-face":
-            return
-        self.name = name
-        if family is None:
-            family = name
-        self.svg_font_family = f'"{family}"'
-        if family_generic is not None:
-            self.font_family_generic = family_generic
-        self.font_pitch = pitch
-
-
-Style._define_attribut_property()
-
-
-class BackgroundImage(Style, DrawImage):
-    _tag = "style:background-image"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("name", "style:name"),
-        PropDef("display_name", "style:display-name"),
-        PropDef("svg_font_family", "svg:font-family"),
-        PropDef("font_family_generic", "style:font-family-generic"),
-        PropDef("font_pitch", "style:font-pitch"),
-        PropDef("position", "style:position", "background-image"),
-        PropDef("repeat", "style:repeat", "background-image"),
-        PropDef("opacity", "draw:opacity", "background-image"),
-        PropDef("filter", "style:filter-name", "background-image"),
-        PropDef("text_style", "text:style-name"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        display_name: str | None = None,
-        position: str | None = None,
-        repeat: str | None = None,
-        opacity: str | None = None,
-        filter: str | None = None,  # noqa: A002
-        # Every other property
-        **kwargs: Any,
-    ):
-        kwargs["family"] = "background-image"
-        super().__init__(**kwargs)
-        if self._do_init:
-            kwargs.pop("tag", None)
-            kwargs.pop("tag_or_elem", None)
-            self.family = "background-image"
-            if name:
-                self.name = name
-            if display_name:
-                self.display_name = display_name
-            if position:
-                self.position = position
-            if repeat:
-                self.position = repeat
-            if opacity:
-                self.position = opacity
-            if filter:
-                self.position = filter
-            # Every other properties
-            for prop in BackgroundImage._properties:
-                if prop.name in kwargs:
-                    self.set_style_attribute(prop.attr, kwargs[prop.name])
-
-
-BackgroundImage._define_attribut_property()
-
-
-# Some predefined styles
-
-
-def default_number_style() -> Element:
-    return Element.from_tag(
-        """<number:number-style style:name="lpod-default-number-style">
-           <number:number number:decimal-places="2"
-            number:min-integer-digits="1"/>
-           </number:number-style>"""
-    )
-
-
-def default_percentage_style() -> Element:
-    return Element.from_tag(
-        """<number:percentage-style
-            style:name="lpod-default-percentage-style">
-           <number:number number:decimal-places="2"
-            number:min-integer-digits="1"/>
-           <number:text>%</number:text>
-           </number:percentage-style>"""
-    )
-
-
-def default_time_style() -> Element:
-    return Element.from_tag(
-        """<number:time-style style:name="lpod-default-time-style">
-           <number:hours number:style="long"/>
-           <number:text>:</number:text>
-           <number:minutes number:style="long"/>
-           <number:text>:</number:text>
-           <number:seconds number:style="long"/>
-           </number:time-style>"""
-    )
-
-
-def default_date_style() -> Element:
-    return Element.from_tag(
-        """
-           <number:date-style style:name="lpod-default-date-style">
-           <number:year number:style="long"/>
-           <number:text>-</number:text>
-           <number:month number:style="long"/>
-           <number:text>-</number:text>
-           <number:day number:style="long"/>
-           </number:date-style>"""
-    )
-
-
-def default_boolean_style() -> Element:
-    return Element.from_tag(
-        """<number:boolean-style style:name="lpod-default-boolean-style">
-           <number:boolean/>
-           </number:boolean-style>"""
-    )
-
-
-def default_currency_style() -> Element:
-    return Element.from_tag(
-        """<number:currency-style style:name="lpod-default-currency-style">
-            <number:text>-</number:text>
-            <number:number number:decimal-places="2"
-             number:min-integer-digits="1"
-             number:grouping="true"/>
-            <number:text> </number:text>
-            <number:currency-symbol
-             number:language="fr"
-             number:country="FR">€</number:currency-symbol>
-           </number:currency-style>"""
-    )
-
-
-register_element_class(BackgroundImage)
-register_element_class_list(Style, STYLES_TO_REGISTER)
-
-
-
-
-
-
-
-

Functions

-
-
-def create_table_cell_style(border: str | None = None, border_top: str | None = None, border_bottom: str | None = None, border_left: str | None = None, border_right: str | None = None, padding: str | None = None, padding_top: str | None = None, padding_bottom: str | None = None, padding_left: str | None = None, padding_right: str | None = None, background_color: str | tuple | None = None, shadow: str | None = None, color: str | tuple | None = None) ‑> Style -
-
-

Return a cell style.

-

The borders arguments must be some style attribute strings or None, see the -method 'make_table_cell_border_string' to generate them. -If the 'border' argument as the value 'default', the default style -"0.06pt solid #000000" is used for the 4 borders. -If any value is used for border, it is used for the 4 borders, else any of -the 4 borders can be specified by it's own string. If all the border, -border_top, border_bottom, … arguments are None, an empty border is used -(ODF value is fo:border="none").

-

Padding arguments are string specifying a length (e.g. "0.5mm")". If -'padding' is provided, it is used for the 4 sides, else any of -the 4 sides padding can be specified by it's own string. Default padding is -no padding.

-

Arguments

-

border – str, style string for borders on four sides

-

border_top – str, style string for top if no 'border' argument

-

border_bottom – str, style string for bottom if no 'border' argument

-

border_left – str, style string for left if no 'border' argument

-

border_right – str, style string for right if no 'border' argument

-

padding – str, style string for padding on four sides

-

padding_top – str, style string for top if no 'padding' argument

-

padding_bottom – str, style string for bottom if no 'padding' argument

-

padding_left – str, style string for left if no 'padding' argument

-

padding_right – str, style string for right if no 'padding' argument

-

background_color – str or rgb 3-tuple, str is 'black', 'grey', … or '#012345'

-

shadow – str, e.g. "#808080 0.176cm 0.176cm"

-

color – str or rgb 3-tuple, str is 'black', 'grey', … or '#012345'

-

Return : Style

-
- -Expand source code - -
def create_table_cell_style(
-    border: str | None = None,
-    border_top: str | None = None,
-    border_bottom: str | None = None,
-    border_left: str | None = None,
-    border_right: str | None = None,
-    padding: str | None = None,
-    padding_top: str | None = None,
-    padding_bottom: str | None = None,
-    padding_left: str | None = None,
-    padding_right: str | None = None,
-    background_color: str | tuple | None = None,
-    shadow: str | None = None,
-    color: str | tuple | None = None,
-) -> Style:
-    """Return a cell style.
-
-    The borders arguments must be some style attribute strings or None, see the
-    method 'make_table_cell_border_string' to generate them.
-    If the 'border' argument as the value 'default', the default style
-    "0.06pt solid #000000" is used for the 4 borders.
-    If any value is used for border, it is used for the 4 borders, else any of
-    the 4 borders can be specified by it's own string. If all the border,
-    border_top, border_bottom, ... arguments are None, an empty border is used
-    (ODF value is fo:border="none").
-
-    Padding arguments are string specifying a length (e.g. "0.5mm")". If
-    'padding' is provided, it is used for the 4 sides, else any of
-    the 4 sides padding can be specified by it's own string. Default padding is
-    no padding.
-
-    Arguments:
-
-        border -- str, style string for borders on four sides
-
-        border_top -- str, style string for top if no 'border' argument
-
-        border_bottom -- str, style string for bottom if no 'border' argument
-
-        border_left -- str, style string for left if no 'border' argument
-
-        border_right -- str, style string for right if no 'border' argument
-
-        padding -- str, style string for padding on four sides
-
-        padding_top -- str, style string for top if no 'padding' argument
-
-        padding_bottom -- str, style string for bottom if no 'padding' argument
-
-        padding_left -- str, style string for left if no 'padding' argument
-
-        padding_right -- str, style string for right if no 'padding' argument
-
-        background_color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
-
-        shadow -- str, e.g. "#808080 0.176cm 0.176cm"
-
-        color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
-
-    Return : Style
-    """
-    if border == "default":
-        border = make_table_cell_border_string()  # default border
-    if border is not None:
-        # use the border value for 4 sides.
-        border_bottom = border_top = border_left = border_right = None
-    if (
-        border is None
-        and border_bottom is None
-        and border_top is None
-        and border_left is None
-        and border_right is None
-    ):
-        border = "none"
-    if padding is not None:
-        # use the padding value for 4 sides.
-        padding_bottom = padding_top = padding_left = padding_right = None
-    if color:
-        color_string = _make_color_string(color)
-    if background_color:
-        bgcolor_string = _make_color_string(background_color)
-    else:
-        bgcolor_string = None
-    cell_style = Style(
-        "table-cell",
-        area="table-cell",
-        border=border,
-        border_top=border_top,
-        border_bottom=border_bottom,
-        border_left=border_left,
-        border_right=border_right,
-        padding=padding,
-        padding_top=padding_top,
-        padding_bottom=padding_bottom,
-        padding_left=padding_left,
-        padding_right=padding_right,
-        background_color=bgcolor_string,
-        shadow=shadow,
-    )
-    if color:
-        cell_style.set_properties(area="text", color=color_string)
-    return cell_style
-
-
-
-def default_boolean_style() ‑> Element -
-
-
-
- -Expand source code - -
def default_boolean_style() -> Element:
-    return Element.from_tag(
-        """<number:boolean-style style:name="lpod-default-boolean-style">
-           <number:boolean/>
-           </number:boolean-style>"""
-    )
-
-
-
-def default_currency_style() ‑> Element -
-
-
-
- -Expand source code - -
def default_currency_style() -> Element:
-    return Element.from_tag(
-        """<number:currency-style style:name="lpod-default-currency-style">
-            <number:text>-</number:text>
-            <number:number number:decimal-places="2"
-             number:min-integer-digits="1"
-             number:grouping="true"/>
-            <number:text> </number:text>
-            <number:currency-symbol
-             number:language="fr"
-             number:country="FR">€</number:currency-symbol>
-           </number:currency-style>"""
-    )
-
-
-
-def default_date_style() ‑> Element -
-
-
-
- -Expand source code - -
def default_date_style() -> Element:
-    return Element.from_tag(
-        """
-           <number:date-style style:name="lpod-default-date-style">
-           <number:year number:style="long"/>
-           <number:text>-</number:text>
-           <number:month number:style="long"/>
-           <number:text>-</number:text>
-           <number:day number:style="long"/>
-           </number:date-style>"""
-    )
-
-
-
-def default_number_style() ‑> Element -
-
-
-
- -Expand source code - -
def default_number_style() -> Element:
-    return Element.from_tag(
-        """<number:number-style style:name="lpod-default-number-style">
-           <number:number number:decimal-places="2"
-            number:min-integer-digits="1"/>
-           </number:number-style>"""
-    )
-
-
-
-def default_percentage_style() ‑> Element -
-
-
-
- -Expand source code - -
def default_percentage_style() -> Element:
-    return Element.from_tag(
-        """<number:percentage-style
-            style:name="lpod-default-percentage-style">
-           <number:number number:decimal-places="2"
-            number:min-integer-digits="1"/>
-           <number:text>%</number:text>
-           </number:percentage-style>"""
-    )
-
-
-
-def default_time_style() ‑> Element -
-
-
-
- -Expand source code - -
def default_time_style() -> Element:
-    return Element.from_tag(
-        """<number:time-style style:name="lpod-default-time-style">
-           <number:hours number:style="long"/>
-           <number:text>:</number:text>
-           <number:minutes number:style="long"/>
-           <number:text>:</number:text>
-           <number:seconds number:style="long"/>
-           </number:time-style>"""
-    )
-
-
-
-def hex2rgb(color: str) ‑> tuple[int, int, int] -
-
-

Turns a "#RRGGBB" hexadecimal color representation into a (R, G, B) -tuple.

-

Arguments

-

color – str

-

Return: tuple

-
- -Expand source code - -
def hex2rgb(color: str) -> tuple[int, int, int]:
-    """Turns a "#RRGGBB" hexadecimal color representation into a (R, G, B)
-    tuple.
-    Arguments:
-
-        color -- str
-
-    Return: tuple
-    """
-    code = color[1:]
-    if not (len(color) == 7 and color[0] == "#" and code.isalnum()):
-        raise ValueError('"%s" is not a valid color' % color)
-    red = int(code[:2], 16)
-    green = int(code[2:4], 16)
-    blue = int(code[4:6], 16)
-    return (red, green, blue)
-
-
-
-def make_table_cell_border_string(thick: str | float | int | None = None, line: str | None = None, color: str | tuple | None = None) ‑> str -
-
-

Returns a string for style:table-cell-properties fo:border, -with default : "0.06pt solid #000000"

-
thick -- str or float or int
-line -- str
-color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
-
-

Returns : str

-
- -Expand source code - -
def make_table_cell_border_string(
-    thick: str | float | int | None = None,
-    line: str | None = None,
-    color: str | tuple | None = None,
-) -> str:
-    """Returns a string for style:table-cell-properties fo:border,
-    with default : "0.06pt solid #000000"
-
-        thick -- str or float or int
-        line -- str
-        color -- str or rgb 3-tuple, str is 'black', 'grey', ... or '#012345'
-
-    Returns : str
-    """
-    thick_string = _make_thick_string(thick)
-    line_string = _make_line_string(line)
-    color_string = _make_color_string(color)
-    return " ".join((thick_string, line_string, color_string))
-
-
-
-def rgb2hex(color: str | tuple[int, int, int]) ‑> str -
-
-

Turns a color name or a (R, G, B) color tuple into a "#RRGGBB" -hexadecimal representation.

-

Arguments

-

color – str or tuple

-

Return: str

-

Examples::

-
>>> rgb2hex('yellow')
-'#FFFF00'
->>> rgb2hex((238, 130, 238))
-'#EE82EE'
-
-
- -Expand source code - -
def rgb2hex(color: str | tuple[int, int, int]) -> str:
-    """Turns a color name or a (R, G, B) color tuple into a "#RRGGBB"
-    hexadecimal representation.
-    Arguments:
-
-        color -- str or tuple
-
-    Return: str
-
-    Examples::
-
-        >>> rgb2hex('yellow')
-        '#FFFF00'
-        >>> rgb2hex((238, 130, 238))
-        '#EE82EE'
-    """
-    if isinstance(color, str):
-        try:
-            code = CSS3_COLORMAP[color.lower()]
-        except KeyError as e:
-            raise KeyError(f'Color "{color}" is unknown') from e
-    elif isinstance(color, tuple):
-        if len(color) != 3:
-            raise ValueError("Color must be a 3-tuple")
-        code = color
-    else:
-        raise TypeError("Invalid color")
-    for channel in code:
-        if channel < 0 or channel > 255:
-            raise ValueError("Color code must be between 0 and 255")
-    return f"#{code[0]:02X}{code[1]:02X}{code[2]:02X}"
-
-
-
-
-
-

Classes

-
-
-class BackgroundImage -(name: str | None = None, display_name: str | None = None, position: str | None = None, repeat: str | None = None, opacity: str | None = None, filter: str | None = None, **kwargs: Any) -
-
-

Style class for all these tags:

-

'style:style' -'number:date-style', -'number:number-style', -'number:percentage-style', -'number:time-style' -'style:font-face', -'style:master-page', -'style:page-layout', -'style:presentation-page-layout', -'text:list-style', -'text:outline-style', -'style:tab-stops', -…

-

Create a style of the given family. The name is not mandatory at this -point but will become required when inserting in a document as a common -style.

-

The display name is the name the user sees in an office application.

-

The parent_style is the name of the style this style will inherit from.

-

To set properties, pass them as keyword arguments. The area properties -apply to is optional and defaults to the family.

-

Arguments

-

family – 'paragraph', 'text', 'section', 'table', 'table-column', -'table-row', 'table-cell', 'table-page', 'chart', -'drawing-page', 'graphic', 'presentation', -'control', 'ruby', 'list', 'number', 'page-layout' -'font-face', or 'master-page'

-

name – str

-

display_name – str

-

parent_style – str

-

area – str

-

'text' Properties:

-
italic -- bool
-
-bold -- bool
-
-

'paragraph' Properties:

-
master_page -- str
-
-

'master-page' Properties:

-
page_layout -- str
-
-next_style -- str
-
-

'table-cell' Properties:

-
border, border_top, border_right, border_bottom, border_left -- str,
-e.g. "0.002cm solid #000000" or 'none'
-
-padding, padding_top, padding_right, padding_bottom, padding_left -- str,
-e.g. "0.002cm" or 'none'
-
-shadow -- str, e.g. "#808080 0.176cm 0.176cm"
-
-

'table-row' Properties:

-
height -- str, e.g. '5cm'
-
-use_optimal_height -- bool
-
-

'table-column' Properties:

-
width -- str, e.g. '5cm'
-
-break_before -- 'page', 'column' or 'auto'
-
-break_after -- 'page', 'column' or 'auto'
-
-
- -Expand source code - -
class BackgroundImage(Style, DrawImage):
-    _tag = "style:background-image"
-    _properties: tuple[PropDef, ...] = (
-        PropDef("name", "style:name"),
-        PropDef("display_name", "style:display-name"),
-        PropDef("svg_font_family", "svg:font-family"),
-        PropDef("font_family_generic", "style:font-family-generic"),
-        PropDef("font_pitch", "style:font-pitch"),
-        PropDef("position", "style:position", "background-image"),
-        PropDef("repeat", "style:repeat", "background-image"),
-        PropDef("opacity", "draw:opacity", "background-image"),
-        PropDef("filter", "style:filter-name", "background-image"),
-        PropDef("text_style", "text:style-name"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        display_name: str | None = None,
-        position: str | None = None,
-        repeat: str | None = None,
-        opacity: str | None = None,
-        filter: str | None = None,  # noqa: A002
-        # Every other property
-        **kwargs: Any,
-    ):
-        kwargs["family"] = "background-image"
-        super().__init__(**kwargs)
-        if self._do_init:
-            kwargs.pop("tag", None)
-            kwargs.pop("tag_or_elem", None)
-            self.family = "background-image"
-            if name:
-                self.name = name
-            if display_name:
-                self.display_name = display_name
-            if position:
-                self.position = position
-            if repeat:
-                self.position = repeat
-            if opacity:
-                self.position = opacity
-            if filter:
-                self.position = filter
-            # Every other properties
-            for prop in BackgroundImage._properties:
-                if prop.name in kwargs:
-                    self.set_style_attribute(prop.attr, kwargs[prop.name])
-
-

Ancestors

- -

Instance variables

-
-
var filter : str | bool | None
-
-

Get/set the attribute style:filter-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var opacity : str | bool | None
-
-

Get/set the attribute draw:opacity

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var position : str | bool | None
-
-

Get/set the attribute style:position

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var repeat : str | bool | None
-
-

Get/set the attribute style:repeat

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class Style -(family: str | None = None, name: str | None = None, display_name: str | None = None, parent_style: str | None = None, area: str | None = None, color: str | tuple | None = None, background_color: str | tuple | None = None, italic: bool = False, bold: bool = False, master_page: str | None = None, page_layout: str | None = None, next_style: str | None = None, data_style: str | None = None, border: str | None = None, border_top: str | None = None, border_right: str | None = None, border_bottom: str | None = None, border_left: str | None = None, padding: str | None = None, padding_top: str | None = None, padding_bottom: str | None = None, padding_left: str | None = None, padding_right: str | None = None, shadow: str | None = None, height: str | None = None, use_optimal_height: bool = False, width: str | None = None, break_before: str | None = None, break_after: str | None = None, min_height: str | None = None, font_name: str | None = None, font_family: str | None = None, font_family_generic: str | None = None, font_pitch: str = 'variable', **kwargs: Any) -
-
-

Style class for all these tags:

-

'style:style' -'number:date-style', -'number:number-style', -'number:percentage-style', -'number:time-style' -'style:font-face', -'style:master-page', -'style:page-layout', -'style:presentation-page-layout', -'text:list-style', -'text:outline-style', -'style:tab-stops', -…

-

Create a style of the given family. The name is not mandatory at this -point but will become required when inserting in a document as a common -style.

-

The display name is the name the user sees in an office application.

-

The parent_style is the name of the style this style will inherit from.

-

To set properties, pass them as keyword arguments. The area properties -apply to is optional and defaults to the family.

-

Arguments

-

family – 'paragraph', 'text', 'section', 'table', 'table-column', -'table-row', 'table-cell', 'table-page', 'chart', -'drawing-page', 'graphic', 'presentation', -'control', 'ruby', 'list', 'number', 'page-layout' -'font-face', or 'master-page'

-

name – str

-

display_name – str

-

parent_style – str

-

area – str

-

'text' Properties:

-
italic -- bool
-
-bold -- bool
-
-

'paragraph' Properties:

-
master_page -- str
-
-

'master-page' Properties:

-
page_layout -- str
-
-next_style -- str
-
-

'table-cell' Properties:

-
border, border_top, border_right, border_bottom, border_left -- str,
-e.g. "0.002cm solid #000000" or 'none'
-
-padding, padding_top, padding_right, padding_bottom, padding_left -- str,
-e.g. "0.002cm" or 'none'
-
-shadow -- str, e.g. "#808080 0.176cm 0.176cm"
-
-

'table-row' Properties:

-
height -- str, e.g. '5cm'
-
-use_optimal_height -- bool
-
-

'table-column' Properties:

-
width -- str, e.g. '5cm'
-
-break_before -- 'page', 'column' or 'auto'
-
-break_after -- 'page', 'column' or 'auto'
-
-
- -Expand source code - -
class Style(Element):
-    """Style class for all these tags:
-
-    'style:style'
-    'number:date-style',
-    'number:number-style',
-    'number:percentage-style',
-    'number:time-style'
-    'style:font-face',
-    'style:master-page',
-    'style:page-layout',
-    'style:presentation-page-layout',
-    'text:list-style',
-    'text:outline-style',
-    'style:tab-stops',
-    ...
-    """
-
-    _properties: tuple[PropDef, ...] = (
-        PropDef("page_layout", "style:page-layout-name", "master-page"),
-        PropDef("next_style", "style:next-style-name", "master-page"),
-        PropDef("name", "style:name"),
-        PropDef("parent_style", "style:parent-style-name"),
-        PropDef("display_name", "style:display-name"),
-        PropDef("svg_font_family", "svg:font-family"),
-        PropDef("font_family_generic", "style:font-family-generic"),
-        PropDef("font_pitch", "style:font-pitch"),
-        PropDef("text_style", "text:style-name"),
-        PropDef("master_page", "style:master-page-name", "paragraph"),
-        PropDef("master_page", "style:master-page-name", "paragraph"),
-        PropDef("master_page", "style:master-page-name", "paragraph"),
-        # style:tab-stop
-        PropDef("style_type", "style:type"),
-        PropDef("leader_style", "style:leader-style"),
-        PropDef("leader_text", "style:leader-text"),
-        PropDef("style_position", "style:position"),
-        PropDef("leader_text", "style:position"),
-    )
-
-    def __init__(  # noqa: C901
-        self,
-        family: str | None = None,
-        name: str | None = None,
-        display_name: str | None = None,
-        parent_style: str | None = None,
-        # Where properties apply
-        area: str | None = None,
-        # For family 'text':
-        color: str | tuple | None = None,
-        background_color: str | tuple | None = None,
-        italic: bool = False,
-        bold: bool = False,
-        # For family 'paragraph'
-        master_page: str | None = None,
-        # For family 'master-page'
-        page_layout: str | None = None,
-        next_style: str | None = None,
-        # For family 'table-cell'
-        data_style: str | None = None,  # unused
-        border: str | None = None,
-        border_top: str | None = None,
-        border_right: str | None = None,
-        border_bottom: str | None = None,
-        border_left: str | None = None,
-        padding: str | None = None,
-        padding_top: str | None = None,
-        padding_bottom: str | None = None,
-        padding_left: str | None = None,
-        padding_right: str | None = None,
-        shadow: str | None = None,
-        # For family 'table-row'
-        height: str | None = None,
-        use_optimal_height: bool = False,
-        # For family 'table-column'
-        width: str | None = None,
-        break_before: str | None = None,
-        break_after: str | None = None,
-        # For family 'graphic'
-        min_height: str | None = None,
-        # For family 'font-face'
-        font_name: str | None = None,
-        font_family: str | None = None,
-        font_family_generic: str | None = None,
-        font_pitch: str = "variable",
-        # Every other property
-        **kwargs: Any,
-    ) -> None:
-        """Create a style of the given family. The name is not mandatory at this
-        point but will become required when inserting in a document as a common
-        style.
-
-        The display name is the name the user sees in an office application.
-
-        The parent_style is the name of the style this style will inherit from.
-
-        To set properties, pass them as keyword arguments. The area properties
-        apply to is optional and defaults to the family.
-
-        Arguments:
-
-            family -- 'paragraph', 'text', 'section', 'table', 'table-column',
-                      'table-row', 'table-cell', 'table-page', 'chart',
-                      'drawing-page', 'graphic', 'presentation',
-                      'control', 'ruby', 'list', 'number', 'page-layout'
-                      'font-face', or 'master-page'
-
-            name -- str
-
-            display_name -- str
-
-            parent_style -- str
-
-            area -- str
-
-        'text' Properties:
-
-            italic -- bool
-
-            bold -- bool
-
-        'paragraph' Properties:
-
-            master_page -- str
-
-        'master-page' Properties:
-
-            page_layout -- str
-
-            next_style -- str
-
-        'table-cell' Properties:
-
-            border, border_top, border_right, border_bottom, border_left -- str,
-            e.g. "0.002cm solid #000000" or 'none'
-
-            padding, padding_top, padding_right, padding_bottom, padding_left -- str,
-            e.g. "0.002cm" or 'none'
-
-            shadow -- str, e.g. "#808080 0.176cm 0.176cm"
-
-        'table-row' Properties:
-
-            height -- str, e.g. '5cm'
-
-            use_optimal_height -- bool
-
-        'table-column' Properties:
-
-            width -- str, e.g. '5cm'
-
-            break_before -- 'page', 'column' or 'auto'
-
-            break_after -- 'page', 'column' or 'auto'
-        """
-        self._family: str | None = None
-        tag_or_elem = kwargs.get("tag_or_elem", None)
-        if tag_or_elem is None:
-            family = to_str(family)
-            if family not in FAMILY_MAPPING:
-                raise ValueError("Unknown family value: %s" % family)
-            kwargs["tag"] = FAMILY_MAPPING[family]
-        super().__init__(**kwargs)
-        if self._do_init and family not in SUBCLASSED_STYLES:
-            kwargs.pop("tag", None)
-            kwargs.pop("tag_or_elem", None)
-            self.family = family  # relevant test made by property
-            # Common attributes
-            if name:
-                self.name = name
-            if display_name:
-                self.display_name = display_name
-            if parent_style:
-                self.parent_style = parent_style
-            # Paragraph
-            if family == "paragraph":
-                if master_page:
-                    self.master_page = master_page
-            # Master Page
-            elif family == "master-page":
-                if page_layout:
-                    self.page_layout = page_layout
-                if next_style:
-                    self.next_style = next_style
-            # Font face
-            elif family == "font-face":
-                if not font_name:
-                    raise ValueError("A font_name is required for 'font-face' style")
-                self.set_font(
-                    font_name,
-                    family=font_family,
-                    family_generic=font_family_generic,
-                    pitch=font_pitch,
-                )
-            # Properties
-            if area is None:
-                area = family
-            area = to_str(area)
-            # Text
-            if area == "text":
-                if color:
-                    kwargs["fo:color"] = color
-                if background_color:
-                    kwargs["fo:background-color"] = background_color
-                if italic:
-                    kwargs["fo:font-style"] = "italic"
-                    kwargs["style:font-style-asian"] = "italic"
-                    kwargs["style:font-style-complex"] = "italic"
-                if bold:
-                    kwargs["fo:font-weight"] = "bold"
-                    kwargs["style:font-weight-asian"] = "bold"
-                    kwargs["style:font-weight-complex"] = "bold"
-            # Table cell
-            elif area == "table-cell":
-                if border:
-                    kwargs["fo:border"] = border
-                elif border_top or border_right or border_bottom or border_left:
-                    kwargs["fo:border-top"] = border_top or "none"
-                    kwargs["fo:border-right"] = border_right or "none"
-                    kwargs["fo:border-bottom"] = border_bottom or "none"
-                    kwargs["fo:border-left"] = border_left or "none"
-                else:  # no border_top, ... neither border are defined
-                    pass  # left untouched
-                if padding:
-                    kwargs["fo:padding"] = padding
-                elif padding_top or padding_right or padding_bottom or padding_left:
-                    kwargs["fo:padding-top"] = padding_top or "none"
-                    kwargs["fo:padding-right"] = padding_right or "none"
-                    kwargs["fo:padding-bottom"] = padding_bottom or "none"
-                    kwargs["fo:padding-left"] = padding_left or "none"
-                else:  # no border_top, ... neither border are defined
-                    pass  # left untouched
-                if shadow:
-                    kwargs["style:shadow"] = shadow
-                if background_color:
-                    kwargs["fo:background-color"] = background_color
-            # Table row
-            elif area == "table-row":
-                if height:
-                    kwargs["style:row-height"] = height
-                if use_optimal_height:
-                    kwargs["style:use-optimal-row-height"] = Boolean.encode(
-                        use_optimal_height
-                    )
-                if background_color:
-                    kwargs["fo:background-color"] = background_color
-            # Table column
-            elif area == "table-column":
-                if width:
-                    kwargs["style:column-width"] = width
-                if break_before:
-                    kwargs["fo:break-before"] = break_before
-                if break_after:
-                    kwargs["fo:break-after"] = break_after
-            # Graphic
-            elif area == "graphic":
-                if min_height:
-                    kwargs["fo:min-height"] = min_height
-            # Every other properties
-            if kwargs:
-                self.set_properties(kwargs, area=area)
-
-    @property
-    def family(self) -> str | None:
-        if self._family is None:
-            self._family = FALSE_FAMILY_MAP_REVERSE.get(
-                self.tag, self.get_attribute_string("style:family")
-            )
-        return self._family
-
-    @family.setter
-    def family(self, family: str | None) -> None:
-        self._family = family
-        if family in FAMILY_ODF_STD and self.tag == "style:style":
-            self.set_attribute("style:family", family)
-
-    def get_properties(self, area: str | None = None) -> dict[str, str | dict] | None:
-        """Get the mapping of all properties of this style. By default the
-        properties of the same family, e.g. a paragraph style and its
-        paragraph properties. Specify the area to get the text properties of
-        a paragraph style for example.
-
-        Arguments:
-
-            area -- str
-
-        Return: dict
-        """
-        if area is None:
-            area = self.family
-        element = self.get_element(f"style:{area}-properties")
-        if element is None:
-            return None
-        properties: dict[str, str | dict] = element.attributes  # type: ignore
-        # Nested properties are nested dictionaries
-        for child in element.children:
-            properties[child.tag] = child.attributes
-        return properties
-
-    def set_properties(  # noqa: C901
-        self,
-        properties: dict[str, str | dict] | None = None,
-        style: Style | None = None,
-        area: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Set the properties of the "area" type of this style. Properties
-        are given either as a dict or as named arguments (or both). The area
-        is identical to the style family by default. If the properties
-        element is missing, it is created.
-
-        Instead of properties, you can pass a style with properties of the
-        same area. These will be copied.
-
-        Arguments:
-
-            properties -- dict
-
-            style -- Style
-
-            area -- 'paragraph', 'text'...
-        """
-        if properties is None:
-            properties = {}
-        if area is None:
-            if isinstance(self.family, bool):
-                area = None
-            else:
-                area = self.family
-        element = self.get_element(f"style:{area}-properties")
-        if element is None:
-            element = Element.from_tag(f"style:{area}-properties")
-            self.append(element)
-        if properties or kwargs:
-            properties = _expand_properties_dict(_merge_dicts(properties, kwargs))
-        elif style is not None:
-            properties = style.get_properties(area=area)
-            if properties is None:
-                return
-        if properties is None:
-            return
-        for key, value in properties.items():
-            if value is None:
-                element.del_attribute(key)
-            elif isinstance(value, (str, bool)):
-                element.set_attribute(key, value)
-            else:
-                pass
-
-    def del_properties(
-        self,
-        properties: list[str] | None = None,
-        area: str | None = None,
-    ) -> None:
-        """Delete the given properties, either by list argument or
-        positional argument (or both). Remove only from the given area,
-        identical to the style family by default.
-
-        Arguments:
-
-            properties -- list
-
-            area -- str
-        """
-        if properties is None:
-            properties = []
-        if area is None:
-            area = self.family
-        element = self.get_element(f"style:{area}-properties")
-        if element is None:
-            raise ValueError(
-                f"properties element is inexistent for: style:{area}-properties"
-            )
-        for key in _expand_properties_list(properties):
-            element.del_attribute(key)
-
-    def set_background(  # noqa: C901
-        self,
-        color: str | None = None,
-        url: str | None = None,
-        position: str | None = "center",
-        repeat: str | None = None,
-        opacity: str | None = None,
-        filter: str | None = None,  # noqa: A002
-    ) -> None:
-        """Set the background color of a text style, or the background color
-        or image of a paragraph style or page layout.
-
-        With no argument, remove any existing background.
-
-        The position is one or two of 'center', 'left', 'right', 'top' or
-        'bottom'.
-
-        The repeat is 'no-repeat', 'repeat' or 'stretch'.
-
-        The opacity is a percentage integer (not a string with the '%s' sign)
-
-        The filter is an application-specific filter name defined elsewhere.
-
-        Though this method is defined on the base style class, it will raise
-        an error if the style type is not compatible.
-
-        Arguments:
-
-            color -- '#rrggbb'
-
-            url -- str
-
-            position -- str
-
-            repeat -- str
-
-            opacity -- int
-
-            filter -- str
-        """
-        family = self.family
-        if family not in {
-            "text",
-            "paragraph",
-            "page-layout",
-            "section",
-            "table",
-            "table-row",
-            "table-cell",
-            "graphic",
-        }:
-            raise TypeError("No background support for this family")
-        if url is not None and family == "text":
-            raise TypeError("No background image for text styles")
-        properties = self.get_element(f"style:{family}-properties")
-        bg_image: BackgroundImage | None = None
-        if properties is not None:
-            bg_image = properties.get_element("style:background-image")  # type:ignore
-        # Erasing
-        if color is None and url is None:
-            if properties is None:
-                return
-            properties.del_attribute("fo:background-color")
-            if bg_image is not None:
-                properties.delete(bg_image)
-            return
-        # Add the properties if necessary
-        if properties is None:
-            properties = Element.from_tag(f"style:{family}-properties")
-            self.append(properties)
-        # Add the color...
-        if color:
-            properties.set_attribute("fo:background-color", color)
-            if bg_image is not None:
-                properties.delete(bg_image)
-        # ... or the background
-        elif url:
-            properties.set_attribute("fo:background-color", "transparent")
-            if bg_image is None:
-                bg_image = Element.from_tag("style:background-image")  # type:ignore
-                properties.append(bg_image)  # type:ignore
-            bg_image.url = url  # type:ignore
-            if position:
-                bg_image.position = position  # type:ignore
-            if repeat:
-                bg_image.repeat = repeat  # type:ignore
-            if opacity:
-                bg_image.opacity = opacity  # type:ignore
-            if filter:
-                bg_image.filter = filter  # type:ignore
-
-    # list-style only:
-
-    def get_level_style(self, level: int) -> Style | None:
-        if self.family != "list":
-            return None
-        level_styles = (
-            "(text:list-level-style-number"
-            "|text:list-level-style-bullet"
-            "|text:list-level-style-image)"
-        )
-        return self._filtered_element(level_styles, 0, level=level)  # type: ignore
-
-    def set_level_style(  # noqa: C901
-        self,
-        level: int,
-        num_format: str | None = None,
-        bullet_char: str | None = None,
-        url: str | None = None,
-        display_levels: int | None = None,
-        prefix: str | None = None,
-        suffix: str | None = None,
-        start_value: int | None = None,
-        style: str | None = None,
-        clone: Style | None = None,
-    ) -> Style | None:
-        """
-        Arguments:
-
-            level -- int
-
-            num_format (for number) -- int
-
-            bullet_char (for bullet) -- str
-
-            url (for image) -- str
-
-            display_levels -- int
-
-            prefix -- str
-
-            suffix -- str
-
-            start_value -- int
-
-            style -- str
-
-            clone -- List Style
-
-        Return:
-            level_style created
-        """
-        if self.family != "list":
-            return None
-        # Expected name
-        if num_format is not None:
-            level_style_name = "text:list-level-style-number"
-        elif bullet_char is not None:
-            level_style_name = "text:list-level-style-bullet"
-        elif url is not None:
-            level_style_name = "text:list-level-style-image"
-        elif clone is not None:
-            level_style_name = clone.tag
-        else:
-            raise ValueError("unknown level style type")
-        was_created = False
-        # Cloning or reusing an existing element
-        level_style: Style | None = None
-        if clone is not None:
-            level_style = clone.clone  # type: ignore
-            was_created = True
-        else:
-            level_style = self.get_level_style(level)
-            if level_style is None:
-                level_style = Element.from_tag(level_style_name)  # type: ignore
-                was_created = True
-        if level_style is None:
-            return None
-        # Transmute if the type changed
-        if level_style.tag != level_style_name:
-            print("Warn: different style", level_style_name, level_style.tag)
-            level_style.tag = level_style_name
-        # Set the level
-        level_style.set_attribute("text:level", str(level))
-        # Set the main attribute
-        if num_format is not None:
-            level_style.set_attribute("fo:num-format", num_format)
-        elif bullet_char is not None:
-            level_style.set_attribute("text:bullet-char", bullet_char)
-        elif url is not None:
-            level_style.set_attribute("xlink:href", url)
-        # Set attributes
-        if prefix:
-            level_style.set_attribute("style:num-prefix", prefix)
-        if suffix:
-            level_style.set_attribute("style:num-suffix", suffix)
-        if display_levels:
-            level_style.set_attribute("text:display-levels", str(display_levels))
-        if start_value:
-            level_style.set_attribute("text:start-value", str(start_value))
-        if style:
-            level_style.text_style = style  # type: ignore
-        # Commit the creation
-        if was_created:
-            self.append(level_style)
-        return level_style
-
-    # page-layout only:
-
-    def get_header_style(self) -> Element | None:
-        if self.family != "page-layout":
-            return None
-        return self.get_element("style:header-style")
-
-    def set_header_style(self, new_style: Style) -> None:
-        if self.family != "page-layout":
-            return
-        header_style = self.get_header_style()
-        if header_style is not None:
-            self.delete(header_style)
-        self.append(new_style)
-
-    def get_footer_style(self) -> Style | None:
-        if self.family != "page-layout":
-            return None
-        return self.get_element("style:footer-style")  # type: ignore
-
-    def set_footer_style(self, new_style: Style) -> None:
-        if self.family != "page-layout":
-            return
-        footer_style = self.get_footer_style()
-        if footer_style is not None:
-            self.delete(footer_style)
-        self.append(new_style)
-
-    # master-page only:
-
-    def _set_header_or_footer(
-        self,
-        text_or_element: str | Element | list[Element | str],
-        name: str = "header",
-        style: str = "Header",
-    ) -> None:
-        if name == "header":
-            header_or_footer = self.get_page_header()
-        else:
-            header_or_footer = self.get_page_footer()
-        if header_or_footer is None:
-            header_or_footer = Element.from_tag("style:" + name)
-            self.append(header_or_footer)
-        else:
-            header_or_footer.clear()
-        if (
-            isinstance(text_or_element, Element)
-            and text_or_element.tag == f"style:{name}"
-        ):
-            # Already a header or footer?
-            self.delete(header_or_footer)
-            self.append(text_or_element)
-            return
-        if isinstance(text_or_element, (Element, str)):
-            elem_list: list[Element | str] = [text_or_element]
-        else:
-            elem_list = text_or_element
-        for item in elem_list:
-            if isinstance(item, str):
-                paragraph = Element.from_tag("text:p")
-                paragraph.style = style  # type: ignore
-                header_or_footer.append(paragraph)
-            elif isinstance(item, Element):
-                header_or_footer.append(item)
-
-    def get_page_header(self) -> Element | None:
-        """Get the element that contains the header contents.
-
-        If None, no header was set.
-        """
-        if self.family != "master-page":
-            return None
-        return self.get_element("style:header")
-
-    def set_page_header(
-        self,
-        text_or_element: str | Element | list[Element | str],
-    ) -> None:
-        """Create or replace the header by the given content. It can already
-        be a complete header.
-
-        If you only want to update the existing header, get it and use the
-        API.
-
-        Arguments:
-
-            text_or_element -- str or Element or a list of them
-        """
-        if self.family != "master-page":
-            return None
-        self._set_header_or_footer(text_or_element)
-
-    def get_page_footer(self) -> Element | None:
-        """Get the element that contains the footer contents.
-
-        If None, no footer was set.
-        """
-        if self.family != "master-page":
-            return None
-        return self.get_element("style:footer")
-
-    def set_page_footer(
-        self,
-        text_or_element: str | Element | list[Element | str],
-    ) -> None:
-        """Create or replace the footer by the given content. It can already
-        be a complete footer.
-
-        If you only want to update the existing footer, get it and use the
-        API.
-
-        Arguments:
-
-            text_or_element -- str or Element or a list of them
-        """
-        if self.family != "master-page":
-            return None
-        self._set_header_or_footer(text_or_element, name="footer", style="Footer")
-
-    # font-face only:
-
-    def set_font(
-        self,
-        name: str,
-        family: str | None = None,
-        family_generic: str | None = None,
-        pitch: str = "variable",
-    ) -> None:
-        if self.family != "font-face":
-            return
-        self.name = name
-        if family is None:
-            family = name
-        self.svg_font_family = f'"{family}"'
-        if family_generic is not None:
-            self.font_family_generic = family_generic
-        self.font_pitch = pitch
-
-

Ancestors

- -

Subclasses

- -

Instance variables

-
-
var display_name : str | bool | None
-
-

Get/set the attribute style:display-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var family : str | None
-
-
-
- -Expand source code - -
@property
-def family(self) -> str | None:
-    if self._family is None:
-        self._family = FALSE_FAMILY_MAP_REVERSE.get(
-            self.tag, self.get_attribute_string("style:family")
-        )
-    return self._family
-
-
-
var font_family_generic : str | bool | None
-
-

Get/set the attribute style:font-family-generic

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var font_pitch : str | bool | None
-
-

Get/set the attribute style:font-pitch

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_style : str | bool | None
-
-

Get/set the attribute style:leader-style

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_text : str | bool | None
-
-

Get/set the attribute style:position

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var master_page : str | bool | None
-
-

Get/set the attribute style:master-page-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute style:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var next_style : str | bool | None
-
-

Get/set the attribute style:next-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var page_layout : str | bool | None
-
-

Get/set the attribute style:page-layout-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var parent_style : str | bool | None
-
-

Get/set the attribute style:parent-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style_position : str | bool | None
-
-

Get/set the attribute style:position

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style_type : str | bool | None
-
-

Get/set the attribute style:type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var svg_font_family : str | bool | None
-
-

Get/set the attribute svg:font-family

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var text_style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def del_properties(self, properties: list[str] | None = None, area: str | None = None) ‑> None -
-
-

Delete the given properties, either by list argument or -positional argument (or both). Remove only from the given area, -identical to the style family by default.

-

Arguments

-

properties – list

-

area – str

-
- -Expand source code - -
def del_properties(
-    self,
-    properties: list[str] | None = None,
-    area: str | None = None,
-) -> None:
-    """Delete the given properties, either by list argument or
-    positional argument (or both). Remove only from the given area,
-    identical to the style family by default.
-
-    Arguments:
-
-        properties -- list
-
-        area -- str
-    """
-    if properties is None:
-        properties = []
-    if area is None:
-        area = self.family
-    element = self.get_element(f"style:{area}-properties")
-    if element is None:
-        raise ValueError(
-            f"properties element is inexistent for: style:{area}-properties"
-        )
-    for key in _expand_properties_list(properties):
-        element.del_attribute(key)
-
-
- -
-
-
- -Expand source code - -
def get_footer_style(self) -> Style | None:
-    if self.family != "page-layout":
-        return None
-    return self.get_element("style:footer-style")  # type: ignore
-
-
-
-def get_header_style(self) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_header_style(self) -> Element | None:
-    if self.family != "page-layout":
-        return None
-    return self.get_element("style:header-style")
-
-
-
-def get_level_style(self, level: int) ‑> Style | None -
-
-
-
- -Expand source code - -
def get_level_style(self, level: int) -> Style | None:
-    if self.family != "list":
-        return None
-    level_styles = (
-        "(text:list-level-style-number"
-        "|text:list-level-style-bullet"
-        "|text:list-level-style-image)"
-    )
-    return self._filtered_element(level_styles, 0, level=level)  # type: ignore
-
-
- -
-

Get the element that contains the footer contents.

-

If None, no footer was set.

-
- -Expand source code - -
def get_page_footer(self) -> Element | None:
-    """Get the element that contains the footer contents.
-
-    If None, no footer was set.
-    """
-    if self.family != "master-page":
-        return None
-    return self.get_element("style:footer")
-
-
-
-def get_page_header(self) ‑> Element | None -
-
-

Get the element that contains the header contents.

-

If None, no header was set.

-
- -Expand source code - -
def get_page_header(self) -> Element | None:
-    """Get the element that contains the header contents.
-
-    If None, no header was set.
-    """
-    if self.family != "master-page":
-        return None
-    return self.get_element("style:header")
-
-
-
-def get_properties(self, area: str | None = None) ‑> dict[str, str | dict] | None -
-
-

Get the mapping of all properties of this style. By default the -properties of the same family, e.g. a paragraph style and its -paragraph properties. Specify the area to get the text properties of -a paragraph style for example.

-

Arguments

-

area – str

-

Return: dict

-
- -Expand source code - -
def get_properties(self, area: str | None = None) -> dict[str, str | dict] | None:
-    """Get the mapping of all properties of this style. By default the
-    properties of the same family, e.g. a paragraph style and its
-    paragraph properties. Specify the area to get the text properties of
-    a paragraph style for example.
-
-    Arguments:
-
-        area -- str
-
-    Return: dict
-    """
-    if area is None:
-        area = self.family
-    element = self.get_element(f"style:{area}-properties")
-    if element is None:
-        return None
-    properties: dict[str, str | dict] = element.attributes  # type: ignore
-    # Nested properties are nested dictionaries
-    for child in element.children:
-        properties[child.tag] = child.attributes
-    return properties
-
-
-
-def set_background(self, color: str | None = None, url: str | None = None, position: str | None = 'center', repeat: str | None = None, opacity: str | None = None, filter: str | None = None) ‑> None -
-
-

Set the background color of a text style, or the background color -or image of a paragraph style or page layout.

-

With no argument, remove any existing background.

-

The position is one or two of 'center', 'left', 'right', 'top' or -'bottom'.

-

The repeat is 'no-repeat', 'repeat' or 'stretch'.

-

The opacity is a percentage integer (not a string with the '%s' sign)

-

The filter is an application-specific filter name defined elsewhere.

-

Though this method is defined on the base style class, it will raise -an error if the style type is not compatible.

-

Arguments

-

color – '#rrggbb'

-

url – str

-

position – str

-

repeat – str

-

opacity – int

-

filter – str

-
- -Expand source code - -
def set_background(  # noqa: C901
-    self,
-    color: str | None = None,
-    url: str | None = None,
-    position: str | None = "center",
-    repeat: str | None = None,
-    opacity: str | None = None,
-    filter: str | None = None,  # noqa: A002
-) -> None:
-    """Set the background color of a text style, or the background color
-    or image of a paragraph style or page layout.
-
-    With no argument, remove any existing background.
-
-    The position is one or two of 'center', 'left', 'right', 'top' or
-    'bottom'.
-
-    The repeat is 'no-repeat', 'repeat' or 'stretch'.
-
-    The opacity is a percentage integer (not a string with the '%s' sign)
-
-    The filter is an application-specific filter name defined elsewhere.
-
-    Though this method is defined on the base style class, it will raise
-    an error if the style type is not compatible.
-
-    Arguments:
-
-        color -- '#rrggbb'
-
-        url -- str
-
-        position -- str
-
-        repeat -- str
-
-        opacity -- int
-
-        filter -- str
-    """
-    family = self.family
-    if family not in {
-        "text",
-        "paragraph",
-        "page-layout",
-        "section",
-        "table",
-        "table-row",
-        "table-cell",
-        "graphic",
-    }:
-        raise TypeError("No background support for this family")
-    if url is not None and family == "text":
-        raise TypeError("No background image for text styles")
-    properties = self.get_element(f"style:{family}-properties")
-    bg_image: BackgroundImage | None = None
-    if properties is not None:
-        bg_image = properties.get_element("style:background-image")  # type:ignore
-    # Erasing
-    if color is None and url is None:
-        if properties is None:
-            return
-        properties.del_attribute("fo:background-color")
-        if bg_image is not None:
-            properties.delete(bg_image)
-        return
-    # Add the properties if necessary
-    if properties is None:
-        properties = Element.from_tag(f"style:{family}-properties")
-        self.append(properties)
-    # Add the color...
-    if color:
-        properties.set_attribute("fo:background-color", color)
-        if bg_image is not None:
-            properties.delete(bg_image)
-    # ... or the background
-    elif url:
-        properties.set_attribute("fo:background-color", "transparent")
-        if bg_image is None:
-            bg_image = Element.from_tag("style:background-image")  # type:ignore
-            properties.append(bg_image)  # type:ignore
-        bg_image.url = url  # type:ignore
-        if position:
-            bg_image.position = position  # type:ignore
-        if repeat:
-            bg_image.repeat = repeat  # type:ignore
-        if opacity:
-            bg_image.opacity = opacity  # type:ignore
-        if filter:
-            bg_image.filter = filter  # type:ignore
-
-
-
-def set_font(self, name: str, family: str | None = None, family_generic: str | None = None, pitch: str = 'variable') ‑> None -
-
-
-
- -Expand source code - -
def set_font(
-    self,
-    name: str,
-    family: str | None = None,
-    family_generic: str | None = None,
-    pitch: str = "variable",
-) -> None:
-    if self.family != "font-face":
-        return
-    self.name = name
-    if family is None:
-        family = name
-    self.svg_font_family = f'"{family}"'
-    if family_generic is not None:
-        self.font_family_generic = family_generic
-    self.font_pitch = pitch
-
-
- -
-
-
- -Expand source code - -
def set_footer_style(self, new_style: Style) -> None:
-    if self.family != "page-layout":
-        return
-    footer_style = self.get_footer_style()
-    if footer_style is not None:
-        self.delete(footer_style)
-    self.append(new_style)
-
-
-
-def set_header_style(self, new_style: Style) ‑> None -
-
-
-
- -Expand source code - -
def set_header_style(self, new_style: Style) -> None:
-    if self.family != "page-layout":
-        return
-    header_style = self.get_header_style()
-    if header_style is not None:
-        self.delete(header_style)
-    self.append(new_style)
-
-
-
-def set_level_style(self, level: int, num_format: str | None = None, bullet_char: str | None = None, url: str | None = None, display_levels: int | None = None, prefix: str | None = None, suffix: str | None = None, start_value: int | None = None, style: str | None = None, clone: Style | None = None) ‑> Style | None -
-
-

Arguments

-

level – int

-

num_format (for number) – int

-

bullet_char (for bullet) – str

-

url (for image) – str

-

display_levels – int

-

prefix – str

-

suffix – str

-

start_value – int

-

style – str

-

clone – List Style

-

Return

-

level_style created

-
- -Expand source code - -
def set_level_style(  # noqa: C901
-    self,
-    level: int,
-    num_format: str | None = None,
-    bullet_char: str | None = None,
-    url: str | None = None,
-    display_levels: int | None = None,
-    prefix: str | None = None,
-    suffix: str | None = None,
-    start_value: int | None = None,
-    style: str | None = None,
-    clone: Style | None = None,
-) -> Style | None:
-    """
-    Arguments:
-
-        level -- int
-
-        num_format (for number) -- int
-
-        bullet_char (for bullet) -- str
-
-        url (for image) -- str
-
-        display_levels -- int
-
-        prefix -- str
-
-        suffix -- str
-
-        start_value -- int
-
-        style -- str
-
-        clone -- List Style
-
-    Return:
-        level_style created
-    """
-    if self.family != "list":
-        return None
-    # Expected name
-    if num_format is not None:
-        level_style_name = "text:list-level-style-number"
-    elif bullet_char is not None:
-        level_style_name = "text:list-level-style-bullet"
-    elif url is not None:
-        level_style_name = "text:list-level-style-image"
-    elif clone is not None:
-        level_style_name = clone.tag
-    else:
-        raise ValueError("unknown level style type")
-    was_created = False
-    # Cloning or reusing an existing element
-    level_style: Style | None = None
-    if clone is not None:
-        level_style = clone.clone  # type: ignore
-        was_created = True
-    else:
-        level_style = self.get_level_style(level)
-        if level_style is None:
-            level_style = Element.from_tag(level_style_name)  # type: ignore
-            was_created = True
-    if level_style is None:
-        return None
-    # Transmute if the type changed
-    if level_style.tag != level_style_name:
-        print("Warn: different style", level_style_name, level_style.tag)
-        level_style.tag = level_style_name
-    # Set the level
-    level_style.set_attribute("text:level", str(level))
-    # Set the main attribute
-    if num_format is not None:
-        level_style.set_attribute("fo:num-format", num_format)
-    elif bullet_char is not None:
-        level_style.set_attribute("text:bullet-char", bullet_char)
-    elif url is not None:
-        level_style.set_attribute("xlink:href", url)
-    # Set attributes
-    if prefix:
-        level_style.set_attribute("style:num-prefix", prefix)
-    if suffix:
-        level_style.set_attribute("style:num-suffix", suffix)
-    if display_levels:
-        level_style.set_attribute("text:display-levels", str(display_levels))
-    if start_value:
-        level_style.set_attribute("text:start-value", str(start_value))
-    if style:
-        level_style.text_style = style  # type: ignore
-    # Commit the creation
-    if was_created:
-        self.append(level_style)
-    return level_style
-
-
- -
-

Create or replace the footer by the given content. It can already -be a complete footer.

-

If you only want to update the existing footer, get it and use the -API.

-

Arguments

-

text_or_element – str or Element or a list of them

-
- -Expand source code - -
def set_page_footer(
-    self,
-    text_or_element: str | Element | list[Element | str],
-) -> None:
-    """Create or replace the footer by the given content. It can already
-    be a complete footer.
-
-    If you only want to update the existing footer, get it and use the
-    API.
-
-    Arguments:
-
-        text_or_element -- str or Element or a list of them
-    """
-    if self.family != "master-page":
-        return None
-    self._set_header_or_footer(text_or_element, name="footer", style="Footer")
-
-
-
-def set_page_header(self, text_or_element: str | Element | list[Element | str]) ‑> None -
-
-

Create or replace the header by the given content. It can already -be a complete header.

-

If you only want to update the existing header, get it and use the -API.

-

Arguments

-

text_or_element – str or Element or a list of them

-
- -Expand source code - -
def set_page_header(
-    self,
-    text_or_element: str | Element | list[Element | str],
-) -> None:
-    """Create or replace the header by the given content. It can already
-    be a complete header.
-
-    If you only want to update the existing header, get it and use the
-    API.
-
-    Arguments:
-
-        text_or_element -- str or Element or a list of them
-    """
-    if self.family != "master-page":
-        return None
-    self._set_header_or_footer(text_or_element)
-
-
-
-def set_properties(self, properties: dict[str, str | dict] | None = None, style: Style | None = None, area: str | None = None, **kwargs: Any) ‑> None -
-
-

Set the properties of the "area" type of this style. Properties -are given either as a dict or as named arguments (or both). The area -is identical to the style family by default. If the properties -element is missing, it is created.

-

Instead of properties, you can pass a style with properties of the -same area. These will be copied.

-

Arguments

-

properties – dict

-

style – Style

-

area – 'paragraph', 'text'…

-
- -Expand source code - -
def set_properties(  # noqa: C901
-    self,
-    properties: dict[str, str | dict] | None = None,
-    style: Style | None = None,
-    area: str | None = None,
-    **kwargs: Any,
-) -> None:
-    """Set the properties of the "area" type of this style. Properties
-    are given either as a dict or as named arguments (or both). The area
-    is identical to the style family by default. If the properties
-    element is missing, it is created.
-
-    Instead of properties, you can pass a style with properties of the
-    same area. These will be copied.
-
-    Arguments:
-
-        properties -- dict
-
-        style -- Style
-
-        area -- 'paragraph', 'text'...
-    """
-    if properties is None:
-        properties = {}
-    if area is None:
-        if isinstance(self.family, bool):
-            area = None
-        else:
-            area = self.family
-    element = self.get_element(f"style:{area}-properties")
-    if element is None:
-        element = Element.from_tag(f"style:{area}-properties")
-        self.append(element)
-    if properties or kwargs:
-        properties = _expand_properties_dict(_merge_dicts(properties, kwargs))
-    elif style is not None:
-        properties = style.get_properties(area=area)
-        if properties is None:
-            return
-    if properties is None:
-        return
-    for key, value in properties.items():
-        if value is None:
-            element.del_attribute(key)
-        elif isinstance(value, (str, bool)):
-            element.set_attribute(key, value)
-        else:
-            pass
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/styles.html b/doc/styles.html deleted file mode 100644 index 6eaab21..0000000 --- a/doc/styles.html +++ /dev/null @@ -1,466 +0,0 @@ - - - - - - -odfdo.styles API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.styles

-
-
-

Styles class for styles.xml part.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-"""Styles class for styles.xml part.
-"""
-from __future__ import annotations
-
-from .element import Element
-from .style import Style
-from .utils import make_xpath_query
-from .xmlpart import XmlPart
-
-CONTEXT_MAPPING = {
-    "paragraph": ("//office:styles", "//office:automatic-styles"),
-    "text": ("//office:styles",),
-    "graphic": ("//office:styles",),
-    "page-layout": ("//office:automatic-styles",),
-    "master-page": ("//office:master-styles",),
-    "font-face": ("//office:font-face-decls",),
-    "outline": ("//office:styles",),
-    "date": ("//office:automatic-styles",),
-    "list": ("//office:styles",),
-    "presentation": ("//office:styles", "//office:automatic-styles"),
-    "drawing-page": ("//office:automatic-styles",),
-    "presentation-page-layout": ("//office:styles",),
-    "marker": ("//office:styles",),
-    "fill-image": ("//office:styles",),
-    # FIXME Do they?
-    "table": ("//office:automatic-styles",),
-    "table-cell": ("//office:automatic-styles",),
-    "table-row": ("//office:automatic-styles",),
-    "table-column": ("//office:automatic-styles",),
-    # FIXME: to test:
-    "section": ("//office:styles", "//office:automatic-styles"),
-    "chart": ("//office:styles", "//office:automatic-styles"),
-}
-
-
-class Styles(XmlPart):
-    def _get_style_contexts(
-        self, family: str, automatic: bool = False
-    ) -> list[Element]:
-        if automatic:
-            return [self.get_element("//office:automatic-styles")]
-        if not family:
-            # All possibilities
-            return [
-                self.get_element("//office:automatic-styles"),
-                self.get_element("//office:styles"),
-                self.get_element("//office:master-styles"),
-                self.get_element("//office:font-face-decls"),
-            ]
-        queries = CONTEXT_MAPPING.get(family)
-        if queries is None:
-            raise ValueError(f"unknown family: {family}")
-        # print('q:', queries)
-        return [self.get_element(query) for query in queries]
-
-    def get_styles(self, family: str = "", automatic: bool = False) -> list[Element]:
-        """Return the list of styles in the Content part, optionally limited
-        to the given family, optionaly limited to automatic styles.
-
-        Arguments:
-
-            family -- str
-
-            automatic -- bool
-
-        Return: list of Style
-        """
-        result = []
-        for context in self._get_style_contexts(family, automatic=automatic):
-            if context is None:
-                continue
-            # print('-ctx----', automatic)
-            # print(context.tag)
-            # print(context.__class__)
-            # print(context.serialize())
-            result.extend(context.get_styles(family=family))
-        return result
-
-    def get_style(
-        self,
-        family: str,
-        name_or_element: str | Style | None = None,
-        display_name: str | None = None,
-    ) -> Style | None:
-        """Return the style uniquely identified by the name/family pair. If
-        the argument is already a style object, it will return it.
-
-        If the name is None, the default style is fetched.
-
-        If the name is not the internal name but the name you gave in the
-        desktop application, use display_name instead.
-
-        Arguments:
-
-            family -- 'paragraph', 'text',  'graphic', 'table', 'list',
-                      'number', 'page-layout', 'master-page'
-
-            name_or_element -- str, odf_style or None
-
-            display_name -- str or None
-
-        Return: odf_style or None if not found
-        """
-        for context in self._get_style_contexts(family):
-            if context is None:
-                continue
-            style = context.get_style(
-                family,
-                name_or_element=name_or_element,
-                display_name=display_name,
-            )
-            if style is not None:
-                return style  # type: ignore
-        return None
-
-    def get_master_pages(self) -> list[Element]:
-        query = make_xpath_query("descendant::style:master-page")
-        return self.get_elements(query)  # type:ignore
-
-    def get_master_page(self, position: int = 0) -> Element | None:
-        results = self.get_master_pages()
-        try:
-            return results[position]
-        except IndexError:
-            return None
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class Styles -(part_name: str, container: Container) -
-
-

Representation of an XML part.

-

Abstraction of the XML library behind.

-
- -Expand source code - -
class Styles(XmlPart):
-    def _get_style_contexts(
-        self, family: str, automatic: bool = False
-    ) -> list[Element]:
-        if automatic:
-            return [self.get_element("//office:automatic-styles")]
-        if not family:
-            # All possibilities
-            return [
-                self.get_element("//office:automatic-styles"),
-                self.get_element("//office:styles"),
-                self.get_element("//office:master-styles"),
-                self.get_element("//office:font-face-decls"),
-            ]
-        queries = CONTEXT_MAPPING.get(family)
-        if queries is None:
-            raise ValueError(f"unknown family: {family}")
-        # print('q:', queries)
-        return [self.get_element(query) for query in queries]
-
-    def get_styles(self, family: str = "", automatic: bool = False) -> list[Element]:
-        """Return the list of styles in the Content part, optionally limited
-        to the given family, optionaly limited to automatic styles.
-
-        Arguments:
-
-            family -- str
-
-            automatic -- bool
-
-        Return: list of Style
-        """
-        result = []
-        for context in self._get_style_contexts(family, automatic=automatic):
-            if context is None:
-                continue
-            # print('-ctx----', automatic)
-            # print(context.tag)
-            # print(context.__class__)
-            # print(context.serialize())
-            result.extend(context.get_styles(family=family))
-        return result
-
-    def get_style(
-        self,
-        family: str,
-        name_or_element: str | Style | None = None,
-        display_name: str | None = None,
-    ) -> Style | None:
-        """Return the style uniquely identified by the name/family pair. If
-        the argument is already a style object, it will return it.
-
-        If the name is None, the default style is fetched.
-
-        If the name is not the internal name but the name you gave in the
-        desktop application, use display_name instead.
-
-        Arguments:
-
-            family -- 'paragraph', 'text',  'graphic', 'table', 'list',
-                      'number', 'page-layout', 'master-page'
-
-            name_or_element -- str, odf_style or None
-
-            display_name -- str or None
-
-        Return: odf_style or None if not found
-        """
-        for context in self._get_style_contexts(family):
-            if context is None:
-                continue
-            style = context.get_style(
-                family,
-                name_or_element=name_or_element,
-                display_name=display_name,
-            )
-            if style is not None:
-                return style  # type: ignore
-        return None
-
-    def get_master_pages(self) -> list[Element]:
-        query = make_xpath_query("descendant::style:master-page")
-        return self.get_elements(query)  # type:ignore
-
-    def get_master_page(self, position: int = 0) -> Element | None:
-        results = self.get_master_pages()
-        try:
-            return results[position]
-        except IndexError:
-            return None
-
-

Ancestors

- -

Methods

-
-
-def get_master_page(self, position: int = 0) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_master_page(self, position: int = 0) -> Element | None:
-    results = self.get_master_pages()
-    try:
-        return results[position]
-    except IndexError:
-        return None
-
-
-
-def get_master_pages(self) ‑> list[Element] -
-
-
-
- -Expand source code - -
def get_master_pages(self) -> list[Element]:
-    query = make_xpath_query("descendant::style:master-page")
-    return self.get_elements(query)  # type:ignore
-
-
-
-def get_style(self, family: str, name_or_element: str | Style | None = None, display_name: str | None = None) ‑> Style | None -
-
-

Return the style uniquely identified by the name/family pair. If -the argument is already a style object, it will return it.

-

If the name is None, the default style is fetched.

-

If the name is not the internal name but the name you gave in the -desktop application, use display_name instead.

-

Arguments

-

family – 'paragraph', 'text', -'graphic', 'table', 'list', -'number', 'page-layout', 'master-page'

-

name_or_element – str, odf_style or None

-

display_name – str or None

-

Return: odf_style or None if not found

-
- -Expand source code - -
def get_style(
-    self,
-    family: str,
-    name_or_element: str | Style | None = None,
-    display_name: str | None = None,
-) -> Style | None:
-    """Return the style uniquely identified by the name/family pair. If
-    the argument is already a style object, it will return it.
-
-    If the name is None, the default style is fetched.
-
-    If the name is not the internal name but the name you gave in the
-    desktop application, use display_name instead.
-
-    Arguments:
-
-        family -- 'paragraph', 'text',  'graphic', 'table', 'list',
-                  'number', 'page-layout', 'master-page'
-
-        name_or_element -- str, odf_style or None
-
-        display_name -- str or None
-
-    Return: odf_style or None if not found
-    """
-    for context in self._get_style_contexts(family):
-        if context is None:
-            continue
-        style = context.get_style(
-            family,
-            name_or_element=name_or_element,
-            display_name=display_name,
-        )
-        if style is not None:
-            return style  # type: ignore
-    return None
-
-
-
-def get_styles(self, family: str = '', automatic: bool = False) ‑> list[Element] -
-
-

Return the list of styles in the Content part, optionally limited -to the given family, optionaly limited to automatic styles.

-

Arguments

-

family – str

-

automatic – bool

-

Return: list of Style

-
- -Expand source code - -
def get_styles(self, family: str = "", automatic: bool = False) -> list[Element]:
-    """Return the list of styles in the Content part, optionally limited
-    to the given family, optionaly limited to automatic styles.
-
-    Arguments:
-
-        family -- str
-
-        automatic -- bool
-
-    Return: list of Style
-    """
-    result = []
-    for context in self._get_style_contexts(family, automatic=automatic):
-        if context is None:
-            continue
-        # print('-ctx----', automatic)
-        # print(context.tag)
-        # print(context.__class__)
-        # print(context.serialize())
-        result.extend(context.get_styles(family=family))
-    return result
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/table.html b/doc/table.html deleted file mode 100644 index 310491a..0000000 --- a/doc/table.html +++ /dev/null @@ -1,10327 +0,0 @@ - - - - - - -odfdo.table API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.table

-
-
-

Table class for "table:table" and HeaderRows, Cell, Row, Column, -NamedRange related classes.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2012 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Table class for "table:table" and HeaderRows, Cell, Row, Column,
-NamedRange related classes.
-"""
-from __future__ import annotations
-
-import contextlib
-import csv
-import os
-import string
-from collections.abc import Iterator
-from io import StringIO
-from itertools import zip_longest
-from pathlib import Path
-from textwrap import wrap
-from typing import Any
-from functools import cache
-from .cell import Cell
-from .datatype import Boolean, Date, DateTime, Duration
-from .element import Element, register_element_class, xpath_compile
-from .frame import Frame
-from .row import Row
-from .utils import (
-    convert_coordinates,
-    delete_item_in_vault,
-    digit_to_alpha,
-    find_odf_idx,
-    increment,
-    insert_item_in_vault,
-    insert_map_once,
-    isiterable,
-    make_cache_map,
-    set_item_in_vault,
-    translate_from_any,
-)
-
-_xpath_row = xpath_compile("table:table-row")
-_xpath_row_idx = xpath_compile("(table:table-row)[$idx]")
-_xpath_column = xpath_compile("table:table-column")
-_xpath_column_idx = xpath_compile("(table:table-column)[$idx]")
-
-
-def _table_name_check(name: Any) -> str:
-    if not isinstance(name, str):
-        raise TypeError("String required.")
-    name = name.strip()
-    if not name:
-        raise ValueError("Empty name not allowed.")
-    for character in ("\n", "/", "\\", "'"):
-        if character in name:
-            raise ValueError(f"Character {character} not allowed.")
-    return name
-
-
-@cache
-def forbidden_in_named_range():
-    return {
-        char
-        for char in string.printable
-        if char not in string.ascii_letters
-        and char not in string.digits
-        and char != "_"
-    }
-
-
-def _get_python_value(data: Any, encoding: str) -> Any:
-    """Try and guess the most appropriate Python type to load the data, with
-    regard to ODF types.
-    """
-    if isinstance(data, bytes):
-        data = data.decode(encoding)
-    # An int ?
-    try:
-        return int(data)
-    except ValueError:
-        pass
-    # A float ?
-    try:
-        return float(data)
-    except ValueError:
-        pass
-    # A Date ?
-    try:
-        return Date.decode(data)
-    except ValueError:
-        pass
-    # A DateTime ?
-    try:
-        # Two tests: "yyyy-mm-dd hh:mm:ss" or "yyyy-mm-ddThh:mm:ss"
-        return DateTime.decode(data.replace(" ", "T"))
-    except ValueError:
-        pass
-    # A Duration ?
-    try:
-        return Duration.decode(data)
-    except ValueError:
-        pass
-    # A Boolean ?
-    try:
-        # "True" or "False" with a .lower
-        return Boolean.decode(data.lower())
-    except ValueError:
-        pass
-    # TODO Try some other types ?
-    # So a text
-    return data
-
-
-class RowGroup(Element):
-    """ "table:table-row-group" group rows with common properties."""
-
-    # TODO
-    _tag = "table:table-row-group"
-    _caching = True
-
-    def __init__(
-        self,
-        height: int | None = None,
-        width: int | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a group of rows, optionnaly filled with "height" number of
-        rows, of "width" cells each.
-
-        Row group bear style information applied to a series of rows.
-
-        Arguments:
-
-            height -- int
-
-            width -- int
-        """
-        super().__init__(**kwargs)
-        if self._do_init and height is not None:
-            for _i in range(height):
-                row = Row(width=width)
-                self.append(row)
-
-
-class Column(Element):
-    """ODF table column "table:table-column" """
-
-    _tag = "table:table-column"
-    _caching = True
-
-    def __init__(
-        self,
-        default_cell_style: str | None = None,
-        repeated: int | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a column group element of the optionally given style. Cell
-        style can be set for the whole column. If the properties apply to
-        several columns, give the number of repeated columns.
-
-        Columns don't contain cells, just style information.
-
-        You don't generally have to create columns by hand, use the Table API.
-
-        Arguments:
-
-            default_cell_style -- str
-
-            repeated -- int
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        self.x = None
-        if self._do_init:
-            if default_cell_style:
-                self.set_default_cell_style(default_cell_style)
-            if repeated and repeated > 1:
-                self.repeated = repeated
-            if style:
-                self.style = style
-
-    @property
-    def clone(self) -> Column:
-        clone = Element.clone.fget(self)  # type: ignore
-        clone.x = self.x
-        if hasattr(self, "_tmap"):
-            if hasattr(self, "_rmap"):
-                clone._rmap = self._rmap[:]
-            clone._tmap = self._tmap[:]
-            clone._cmap = self._cmap[:]
-        return clone
-
-    def get_default_cell_style(self) -> str | None:
-        return self.get_attribute_string("table:default-cell-style-name")
-
-    def set_default_cell_style(self, style: Element | str) -> None:
-        self.set_style_attribute("table:default-cell-style-name", style)
-
-    def _set_repeated(self, repeated: int | None) -> None:
-        """Internal only. Set the number of times the column is repeated, or
-        None to delete it. Without changing cache.
-
-        Arguments:
-
-            repeated -- int or None
-        """
-        if repeated is None or repeated < 2:
-            with contextlib.suppress(KeyError):
-                self.del_attribute("table:number-columns-repeated")
-            return
-        self.set_attribute("table:number-columns-repeated", str(repeated))
-
-    @property
-    def repeated(self) -> int | None:
-        """Get /set the number of times the column is repeated.
-
-        Always None when using the table API.
-
-        Return: int or None
-        """
-        repeated = self.get_attribute("table:number-columns-repeated")
-        if repeated is None:
-            return None
-        return int(repeated)
-
-    @repeated.setter
-    def repeated(self, repeated: int | None) -> None:
-        self._set_repeated(repeated)
-        # update cache
-        current: Element = self
-        while True:
-            # look for Table, parent may be group of rows
-            upper = current.parent
-            if not upper:
-                # lonely column
-                return
-            # parent may be group of rows, not table
-            if isinstance(upper, Table):
-                break
-            current = upper
-        # fixme : need to optimize this
-        if isinstance(upper, Table):
-            upper._compute_table_cache()
-            if hasattr(self, "_cmap"):
-                del self._cmap[:]
-                self._cmap.extend(upper._cmap)
-            else:
-                self._cmap = upper._cmap
-
-    @property
-    def style(self) -> str | None:
-        """Get /set the style of the column itself.
-
-        Return: str
-        """
-        return self.get_attribute_string("table:style-name")
-
-    @style.setter
-    def style(self, style: str | Element) -> None:
-        self.set_style_attribute("table:style-name", style)
-
-
-class Table(Element):
-    """ODF table "table:table" """
-
-    _tag = "table:table"
-    _caching = True
-    _append = Element.append
-
-    def __init__(
-        self,
-        name: str | None = None,
-        width: int | None = None,
-        height: int | None = None,
-        protected: bool = False,
-        protection_key: str | None = None,
-        display: bool = True,
-        printable: bool = True,
-        print_ranges: list[str] | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a table element, optionally prefilled with "height" rows of
-        "width" cells each.
-
-        If the table is to be protected, a protection key must be provided,
-        i.e. a hash value of the password.
-
-        If the table must not be displayed, set "display" to False.
-
-        If the table must not be printed, set "printable" to False. The table
-        will not be printed when it is not displayed, whatever the value of
-        this argument.
-
-        Ranges of cells to print can be provided as a list of cell ranges,
-        e.g. ['E6:K12', 'P6:R12'] or directly as a raw string, e.g.
-        "E6:K12 P6:R12".
-
-        You can access and modify the XML tree manually, but you probably want
-        to use the API to access and alter cells. It will save you from
-        handling repetitions and the same number of cells for each row.
-
-        If you use both the table API and the XML API, you are on your own for
-        ensuiring model integrity.
-
-        Arguments:
-
-            name -- str
-
-            width -- int
-
-            height -- int
-
-            protected -- bool
-
-            protection_key -- str
-
-            display -- bool
-
-            printable -- bool
-
-            print_ranges -- list
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        self._indexes = {}
-        self._indexes["_cmap"] = {}
-        self._indexes["_tmap"] = {}
-        if self._do_init:
-            self.name = name
-            if protected:
-                self.protected = protected
-                self.set_protection_key = protection_key
-            if not display:
-                self.displayed = display
-            if not printable:
-                self.printable = printable
-            if print_ranges:
-                self.print_ranges = print_ranges
-            if style:
-                self.style = style
-            # Prefill the table
-            if width is not None or height is not None:
-                width = width or 1
-                height = height or 1
-                # Column groups for style information
-                columns = Column(repeated=width)
-                self._append(columns)
-                for _i in range(height):
-                    row = Row(width)
-                    self._append(row)
-        self._compute_table_cache()
-
-    def __str__(self) -> str:
-        def write_content(csv_writer: object) -> None:
-            for values in self.iter_values():
-                line = []
-                for value in values:
-                    if value is None:
-                        value = ""
-                    if isinstance(value, str):
-                        value = value.strip()
-                    line.append(value)
-                csv_writer.writerow(line)  # type: ignore
-
-        out = StringIO(newline=os.linesep)
-        csv_writer = csv.writer(
-            out,
-            delimiter=" ",
-            doublequote=False,
-            escapechar="\\",
-            lineterminator=os.linesep,
-            quotechar='"',
-            quoting=csv.QUOTE_NONNUMERIC,
-        )
-        write_content(csv_writer)
-        return out.getvalue()
-
-    def _translate_y_from_any(self, y: str | int) -> int:
-        # "3" (couting from 1) -> 2 (couting from 0)
-        return translate_from_any(y, self.height, 1)
-
-    def _translate_table_coordinates_list(
-        self,
-        coord: tuple | list,
-    ) -> tuple[int | None, ...]:
-        height = self.height
-        width = self.width
-        # assuming we got int values
-        if len(coord) == 1:
-            # It is a row
-            y = coord[0]
-            if y and y < 0:
-                y = increment(y, height)
-            return (None, y, None, y)
-        if len(coord) == 2:
-            # It is a row range, not a cell, because context is table
-            y = coord[0]
-            if y and y < 0:
-                y = increment(y, height)
-            t = coord[1]
-            if t and t < 0:
-                t = increment(t, height)
-            return (None, y, None, t)
-        # should be 4 int
-        x, y, z, t = coord
-        if x and x < 0:
-            x = increment(x, width)
-        if y and y < 0:
-            y = increment(y, height)
-        if z and z < 0:
-            z = increment(z, width)
-        if t and t < 0:
-            t = increment(t, height)
-        return (x, y, z, t)
-
-    def _translate_table_coordinates_str(
-        self,
-        coord_str: str,
-    ) -> tuple[int | None, ...]:
-        height = self.height
-        width = self.width
-        coord = convert_coordinates(coord_str)
-        if len(coord) == 2:
-            x, y = coord
-            if x and x < 0:
-                x = increment(x, width)
-            if y and y < 0:
-                y = increment(y, height)
-            # extent to an area :
-            return (x, y, x, y)
-        x, y, z, t = coord
-        if x and x < 0:
-            x = increment(x, width)
-        if y and y < 0:
-            y = increment(y, height)
-        if z and z < 0:
-            z = increment(z, width)
-        if t and t < 0:
-            t = increment(t, height)
-        return (x, y, z, t)
-
-    def _translate_table_coordinates(
-        self,
-        coord: tuple | list | str,
-    ) -> tuple[int | None, ...]:
-        if isinstance(coord, str):
-            return self._translate_table_coordinates_str(coord)
-        return self._translate_table_coordinates_list(coord)
-
-    def _translate_column_coordinates_str(
-        self,
-        coord_str: str,
-    ) -> tuple[int | None, ...]:
-        width = self.width
-        height = self.height
-        coord = convert_coordinates(coord_str)
-        if len(coord) == 2:
-            x, y = coord
-            if x and x < 0:
-                x = increment(x, width)
-            if y and y < 0:
-                y = increment(y, height)
-            # extent to an area :
-            return (x, y, x, y)
-        x, y, z, t = coord
-        if x and x < 0:
-            x = increment(x, width)
-        if y and y < 0:
-            y = increment(y, height)
-        if z and z < 0:
-            z = increment(z, width)
-        if t and t < 0:
-            t = increment(t, height)
-        return (x, y, z, t)
-
-    def _translate_column_coordinates_list(
-        self,
-        coord: tuple | list,
-    ) -> tuple[int | None, ...]:
-        width = self.width
-        height = self.height
-        # assuming we got int values
-        if len(coord) == 1:
-            # It is a column
-            x = coord[0]
-            if x and x < 0:
-                x = increment(x, width)
-            return (x, None, x, None)
-        if len(coord) == 2:
-            # It is a column range, not a cell, because context is table
-            x = coord[0]
-            if x and x < 0:
-                x = increment(x, width)
-            z = coord[1]
-            if z and z < 0:
-                z = increment(z, width)
-            return (x, None, z, None)
-        # should be 4 int
-        x, y, z, t = coord
-        if x and x < 0:
-            x = increment(x, width)
-        if y and y < 0:
-            y = increment(y, height)
-        if z and z < 0:
-            z = increment(z, width)
-        if t and t < 0:
-            t = increment(t, height)
-        return (x, y, z, t)
-
-    def _translate_column_coordinates(
-        self,
-        coord: tuple | list | str,
-    ) -> tuple[int | None, ...]:
-        if isinstance(coord, str):
-            return self._translate_column_coordinates_str(coord)
-        return self._translate_column_coordinates_list(coord)
-
-    def _translate_cell_coordinates(
-        self,
-        coord: tuple | list | str,
-    ) -> tuple[int | None, int | None]:
-        # we want an x,y result
-        coord = convert_coordinates(coord)
-        if len(coord) == 2:
-            x, y = coord
-        # If we got an area, take the first cell
-        elif len(coord) == 4:
-            x, y, z, t = coord
-        else:
-            raise ValueError(str(coord))
-        if x and x < 0:
-            x = increment(x, self.width)
-        if y and y < 0:
-            y = increment(y, self.height)
-        return (x, y)
-
-    def _compute_table_cache(self) -> None:
-        idx_repeated_seq = self.elements_repeated_sequence(
-            _xpath_row, "table:number-rows-repeated"
-        )
-        self._tmap = make_cache_map(idx_repeated_seq)
-        idx_repeated_seq = self.elements_repeated_sequence(
-            _xpath_column, "table:number-columns-repeated"
-        )
-        self._cmap = make_cache_map(idx_repeated_seq)
-
-    def _update_width(self, row: Row) -> None:
-        """Synchronize the number of columns if the row is bigger.
-
-        Append, don't insert, not to disturb the current layout.
-        """
-        diff = row.width - self.width
-        if diff > 0:
-            self.append_column(Column(repeated=diff))
-
-    def _get_formatted_text_normal(self, context: dict | None) -> str:
-        result = []
-        for row in self.traverse():
-            for cell in row.traverse():
-                value = cell.get_value(try_get_text=False)
-                # None ?
-                if value is None:
-                    # Try with get_formatted_text on the elements
-                    value = []
-                    for element in cell.children:
-                        value.append(element.get_formatted_text(context))
-                    value = "".join(value)
-                else:
-                    value = str(value)
-                result.append(value)
-                result.append("\n")
-            result.append("\n")
-        return "".join(result)
-
-    def _get_formatted_text_rst(self, context: dict) -> str:  # noqa: C901
-        context["no_img_level"] += 1
-        # Strip the table => We must clone
-        table = self.clone
-        table.rstrip(aggressive=True)  # type: ignore
-
-        # Fill the rows
-        rows = []
-        cols_nb = 0
-        cols_size: dict[int, int] = {}
-        for odf_row in table.traverse():  # type: ignore
-            row = []
-            for i, cell in enumerate(odf_row.traverse()):
-                value = cell.get_value(try_get_text=False)
-                # None ?
-                if value is None:
-                    # Try with get_formatted_text on the elements
-                    value = []
-                    for element in cell.children:
-                        value.append(element.get_formatted_text(context))
-                    value = "".join(value)
-                else:
-                    value = str(value)
-                value = value.strip()
-                # Strip the empty columns
-                if value:
-                    cols_nb = max(cols_nb, i + 1)
-                # Compute the size of each columns (at least 2)
-                cols_size[i] = max(cols_size.get(i, 2), len(value))
-                # Append
-                row.append(value)
-            rows.append(row)
-
-        # Nothing ?
-        if cols_nb == 0:
-            return ""
-
-        # Prevent a crash with empty columns (by example with images)
-        for col, size in cols_size.items():
-            if size == 0:
-                cols_size[col] = 1
-
-        # Update cols_size
-        LINE_MAX = 100
-        COL_MIN = 16
-
-        free_size = LINE_MAX - (cols_nb - 1) * 3 - 4
-        real_size = sum([cols_size[i] for i in range(cols_nb)])
-        if real_size > free_size:
-            factor = float(free_size) / real_size
-
-            for i in range(cols_nb):
-                old_size = cols_size[i]
-
-                # The cell is already small
-                if old_size <= COL_MIN:
-                    continue
-
-                new_size = int(factor * old_size)
-
-                if new_size < COL_MIN:
-                    new_size = COL_MIN
-                cols_size[i] = new_size
-
-        # Convert !
-        result: list[str] = [""]
-        # Construct the first/last line
-        line: list[str] = []
-        for i in range(cols_nb):
-            line.append("=" * cols_size[i])
-            line.append(" ")
-        line_str = "".join(line)
-
-        # Add the lines
-        result.append(line_str)
-        for row in rows:
-            # Wrap the row
-            wrapped_row = []
-            for i, value in enumerate(row[:cols_nb]):
-                wrapped_value = []
-                for part in value.split("\n"):
-                    # Hack to handle correctly the lists or the directives
-                    subsequent_indent = ""
-                    part_lstripped = part.lstrip()
-                    if part_lstripped.startswith("-") or part_lstripped.startswith(
-                        ".."
-                    ):
-                        subsequent_indent = " " * (len(part) - len(part.lstrip()) + 2)
-                    wrapped_part = wrap(
-                        part, width=cols_size[i], subsequent_indent=subsequent_indent
-                    )
-                    if wrapped_part:
-                        wrapped_value.extend(wrapped_part)
-                    else:
-                        wrapped_value.append("")
-                wrapped_row.append(wrapped_value)
-
-            # Append!
-            for j in range(max([1] + [len(values) for values in wrapped_row])):
-                txt_row: list[str] = []
-                for i in range(cols_nb):
-                    values = wrapped_row[i] if i < len(wrapped_row) else []
-
-                    # An empty cell ?
-                    if len(values) - 1 < j or not values[j]:
-                        if i == 0 and j == 0:
-                            txt_row.append("..")
-                            txt_row.append(" " * (cols_size[i] - 1))
-                        else:
-                            txt_row.append(" " * (cols_size[i] + 1))
-                        continue
-
-                    # Not empty
-                    value = values[j]
-                    txt_row.append(value)
-                    txt_row.append(" " * (cols_size[i] - len(value) + 1))
-                result.append("".join(txt_row))
-
-        result.append(line_str)
-        result.append("")
-        result.append("")
-        result_str = "\n".join(result)
-
-        context["no_img_level"] -= 1
-        return result_str
-
-    def _translate_x_from_any(self, x: str | int) -> int:
-        return translate_from_any(x, self.width, 0)
-
-    #
-    # Public API
-    #
-
-    def append(self, something: Element | str) -> None:
-        """Dispatch .append() call to append_row() or append_column()."""
-        if isinstance(something, Row):
-            self.append_row(something)
-        elif isinstance(something, Column):
-            self.append_column(something)
-        else:
-            # probably still an error
-            self._append(something)
-
-    @property
-    def height(self) -> int:
-        """Get the current height of the table.
-
-        Return: int
-        """
-        try:
-            height = self._tmap[-1] + 1
-        except Exception:
-            height = 0
-        return height
-
-    @property
-    def width(self) -> int:
-        """Get the current width of the table, measured on columns.
-
-        Rows may have different widths, use the Table API to ensure width
-        consistency.
-
-        Return: int
-        """
-        # Columns are our reference for user expected width
-
-        try:
-            width = self._cmap[-1] + 1
-        except Exception:
-            width = 0
-
-        # columns = self._get_columns()
-        # repeated = self.xpath(
-        #        'table:table-column/@table:number-columns-repeated')
-        # unrepeated = len(columns) - len(repeated)
-        # ws = sum(int(r) for r in repeated) + unrepeated
-        # if w != ws:
-        #    print "WARNING   ws", ws, "w", w
-
-        return width
-
-    @property
-    def size(self) -> tuple[int, int]:
-        """Shortcut to get the current width and height of the table.
-
-        Return: (int, int)
-        """
-        return self.width, self.height
-
-    @property
-    def name(self) -> str | None:
-        """Get / set the name of the table."""
-        return self.get_attribute_string("table:name")
-
-    @name.setter
-    def name(self, name: str) -> None:
-        name = _table_name_check(name)
-        # first, update named ranges
-        # fixme : delete name ranges when deleting table, too.
-        for named_range in self.get_named_ranges(table_name=self.name):
-            named_range.set_table_name(name)
-        self.set_attribute("table:name", name)
-
-    @property
-    def protected(self) -> bool:
-        return bool(self.get_attribute("table:protected"))
-
-    @protected.setter
-    def protected(self, protect: bool) -> None:
-        self.set_attribute("table:protected", protect)
-
-    @property
-    def protection_key(self) -> str | None:
-        return self.get_attribute_string("table:protection-key")
-
-    @protection_key.setter
-    def protection_key(self, key: str) -> None:
-        self.set_attribute("table:protection-key", key)
-
-    @property
-    def displayed(self) -> bool:
-        return bool(self.get_attribute("table:display"))
-
-    @displayed.setter
-    def displayed(self, display: bool) -> None:
-        self.set_attribute("table:display", display)
-
-    @property
-    def printable(self) -> bool:
-        printable = self.get_attribute("table:print")
-        # Default value
-        if printable is None:
-            return True
-        return bool(printable)
-
-    @printable.setter
-    def printable(self, printable: bool) -> None:
-        self.set_attribute("table:print", printable)
-
-    @property
-    def print_ranges(self) -> list[str]:
-        ranges = self.get_attribute_string("table:print-ranges")
-        if isinstance(ranges, str):
-            return ranges.split()
-        return []
-
-    @print_ranges.setter
-    def print_ranges(self, ranges: list[str] | None) -> None:
-        if isinstance(ranges, (list, tuple)):
-            self.set_attribute("table:print-ranges", " ".join(ranges))
-        else:
-            self.set_attribute("table:print-ranges", ranges)
-
-    @property
-    def style(self) -> str | None:
-        """Get / set the style of the table
-
-        Return: str
-        """
-        return self.get_attribute_string("table:style-name")
-
-    @style.setter
-    def style(self, style: str | Element) -> None:
-        self.set_style_attribute("table:style-name", style)
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        if context and context["rst_mode"]:
-            return self._get_formatted_text_rst(context)
-        return self._get_formatted_text_normal(context)
-
-    def get_values(
-        self,
-        coord: tuple | list | str | None = None,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-        flat: bool = False,
-    ) -> list:
-        """Get a matrix of values of the table.
-
-        Filter by coordinates will parse the area defined by the coordinates.
-
-        If 'cell_type' is used and 'complete' is True (default), missing values
-        are replaced by None.
-        Filter by ' cell_type = "all" ' will retrieve cells of any
-        type, aka non empty cells.
-
-        If 'cell_type' is None, complete is always True : with no cell type
-        queried, get_values() returns None for each empty cell, the length
-        each lists is equal to the width of the table.
-
-        If get_type is True, returns tuples (value, ODF type of value), or
-        (None, None) for empty cells with complete True.
-
-        If flat is True, the methods return a single list of all the values.
-        By default, flat is False.
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of area
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: list of lists of Python types
-        """
-        if coord:
-            x, y, z, t = self._translate_table_coordinates(coord)
-        else:
-            x = y = z = t = None
-        data = []
-        for row in self.traverse(start=y, end=t):
-            if z is None:
-                width = self.width
-            else:
-                width = min(z + 1, self.width)
-            if x is not None:
-                width -= x
-            values = row.get_values(
-                (x, z),
-                cell_type=cell_type,
-                complete=complete,
-                get_type=get_type,
-            )
-            # complete row to match request width
-            if complete:
-                if get_type:
-                    values.extend([(None, None)] * (width - len(values)))
-                else:
-                    values.extend([None] * (width - len(values)))
-            if flat:
-                data.extend(values)
-            else:
-                data.append(values)
-        return data
-
-    def iter_values(
-        self,
-        coord: tuple | list | str | None = None,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-    ) -> Iterator[list]:
-        """Iterate through lines of Python values of the table.
-
-        Filter by coordinates will parse the area defined by the coordinates.
-
-        cell_type, complete, grt_type : see get_values()
-
-
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of area
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: iterator of lists
-        """
-        if coord:
-            x, y, z, t = self._translate_table_coordinates(coord)
-        else:
-            x = y = z = t = None
-        for row in self.traverse(start=y, end=t):
-            if z is None:
-                width = self.width
-            else:
-                width = min(z + 1, self.width)
-            if x is not None:
-                width -= x
-            values = row.get_values(
-                (x, z),
-                cell_type=cell_type,
-                complete=complete,
-                get_type=get_type,
-            )
-            # complete row to match column width
-            if complete:
-                if get_type:
-                    values.extend([(None, None)] * (width - len(values)))
-                else:
-                    values.extend([None] * (width - len(values)))
-            yield values
-
-    def set_values(
-        self,
-        values: list,
-        coord: tuple | list | str | None = None,
-        style: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-    ) -> None:
-        """Set the value of cells in the table, from the 'coord' position
-        with values.
-
-        'coord' is the coordinate of the upper left cell to be modified by
-        values. If 'coord' is None, default to the position (0,0) ("A1").
-        If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
-        area is used as coordinate.
-
-        The table is *not* cleared before the operation, to reset the table
-        before setting values, use table.clear().
-
-        A list of lists is expected, with as many lists as rows, and as many
-        items in each sublist as cells to be setted. None values in the list
-        will create empty cells with no cell type (but eventually a style).
-
-        Arguments:
-
-            coord -- tuple or str
-
-            values -- list of lists of python types
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                         'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-        """
-        if coord:
-            x, y = self._translate_cell_coordinates(coord)
-        else:
-            x = y = 0
-        if y is None:
-            y = 0
-        if x is None:
-            x = 0
-        y -= 1
-        for row_values in values:
-            y += 1
-            if not row_values:
-                continue
-            row = self.get_row(y, clone=True)
-            repeated = row.repeated or 1
-            if repeated >= 2:
-                row.repeated = None
-            row.set_values(
-                row_values,
-                start=x,
-                cell_type=cell_type,
-                currency=currency,
-                style=style,
-            )
-            self.set_row(y, row, clone=False)
-            self._update_width(row)
-
-    def rstrip(self, aggressive: bool = False) -> None:
-        """Remove *in-place* empty rows below and empty cells at the right of
-        the table. Cells are empty if they contain no value or it evaluates
-        to False, and no style.
-
-        If aggressive is True, empty cells with style are removed too.
-
-        Argument:
-
-            aggressive -- bool
-        """
-        # Step 1: remove empty rows below the table
-        for row in reversed(self._get_rows()):
-            if row.is_empty(aggressive=aggressive):
-                row.parent.delete(row)  # type: ignore
-            else:
-                break
-        # Step 2: rstrip remaining rows
-        max_width = 0
-        for row in self._get_rows():
-            row.rstrip(aggressive=aggressive)
-            # keep count of the biggest row
-            max_width = max(max_width, row.width)
-        # raz cache of rows
-        self._indexes["_tmap"] = {}
-        # Step 3: trim columns to match max_width
-        columns = self._get_columns()
-        repeated_cols = self.xpath("table:table-column/@table:number-columns-repeated")
-        if not isinstance(repeated_cols, list):
-            raise TypeError
-        unrepeated = len(columns) - len(repeated_cols)
-        column_width = sum(int(r) for r in repeated_cols) + unrepeated  # type: ignore
-        diff = column_width - max_width
-        if diff > 0:
-            for column in reversed(columns):
-                repeated = column.repeated or 1
-                repeated = repeated - diff
-                if repeated > 0:
-                    column.repeated = repeated
-                    break
-                else:
-                    column.parent.delete(column)
-                    diff = -repeated
-                    if diff == 0:
-                        break
-        # raz cache of columns
-        self._indexes["_cmap"] = {}
-        self._compute_table_cache()
-
-    def transpose(self, coord: tuple | list | str | None = None) -> None:  # noqa: C901
-        """Swap *in-place* rows and columns of the table.
-
-        If 'coord' is not None, apply transpose only to the area defined by the
-        coordinates. Beware, if area is not square, some cells mays be over
-        written during the process.
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of area
-
-            start -- int or str
-        """
-        data = []
-        if coord is None:
-            for row in self.traverse():
-                data.append(list(row.traverse()))
-            transposed_data = zip_longest(*data)
-            self.clear()
-            # new_rows = []
-            for row_cells in transposed_data:
-                if not isiterable(row_cells):
-                    row_cells = (row_cells,)
-                row = Row()
-                row.extend_cells(row_cells)
-                self.append_row(row, clone=False)
-            self._compute_table_cache()
-        else:
-            x, y, z, t = self._translate_table_coordinates(coord)
-            if x is None:
-                x = 0
-            else:
-                x = min(x, self.width - 1)
-            if z is None:
-                z = self.width - 1
-            else:
-                z = min(z, self.width - 1)
-            if y is None:
-                y = 0
-            else:
-                y = min(y, self.height - 1)
-            if t is None:
-                t = self.height - 1
-            else:
-                t = min(t, self.height - 1)
-            for row in self.traverse(start=y, end=t):
-                data.append(list(row.traverse(start=x, end=z)))
-            transposed_data = zip_longest(*data)
-            # clear locally
-            w = z - x + 1
-            h = t - y + 1
-            if w != h:
-                nones = [[None] * w for i in range(h)]
-                self.set_values(nones, coord=(x, y, z, t))
-            # put transposed
-            filtered_data: list[tuple[Cell]] = []
-            for row_cells in transposed_data:
-                if isinstance(row_cells, (list, tuple)):
-                    filtered_data.append(row_cells)
-                else:
-                    filtered_data.append((row_cells,))
-            self.set_cells(filtered_data, (x, y, x + h - 1, y + w - 1))
-            self._compute_table_cache()
-
-    def is_empty(self, aggressive: bool = False) -> bool:
-        """Return whether every cell in the table has no value or the value
-        evaluates to False (empty string), and no style.
-
-        If aggressive is True, empty cells with style are considered empty.
-
-        Arguments:
-
-            aggressive -- bool
-        """
-        return all(row.is_empty(aggressive=aggressive) for row in self._get_rows())
-
-    #
-    # Rows
-    #
-
-    def _get_rows(self) -> list[Row]:
-        return self.get_elements(_xpath_row)  # type: ignore
-
-    def traverse(  # noqa: C901
-        self,
-        start: int | None = None,
-        end: int | None = None,
-    ) -> Iterator[Row]:
-        """Yield as many row elements as expected rows in the table, i.e.
-        expand repetitions by returning the same row as many times as
-        necessary.
-
-            Arguments:
-
-                start -- int
-
-                end -- int
-
-        Copies are returned, use set_row() to push them back.
-        """
-        idx = -1
-        before = -1
-        y = 0
-        if start is None and end is None:
-            for juska in self._tmap:
-                idx += 1
-                if idx in self._indexes["_tmap"]:
-                    row = self._indexes["_tmap"][idx]
-                else:
-                    row = self._get_element_idx2(_xpath_row_idx, idx)
-                    self._indexes["_tmap"][idx] = row
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    # Return a copy without the now obsolete repetition
-                    row = row.clone
-                    row.y = y
-                    y += 1
-                    if repeated > 1:
-                        row.repeated = None
-                    yield row
-        else:
-            if start is None:
-                start = 0
-            start = max(0, start)
-            if end is None:
-                try:
-                    end = self._tmap[-1]
-                except Exception:
-                    end = -1
-            start_map = find_odf_idx(self._tmap, start)
-            if start_map is None:
-                return
-            if start_map > 0:
-                before = self._tmap[start_map - 1]
-            idx = start_map - 1
-            before = start - 1
-            y = start
-            for juska in self._tmap[start_map:]:
-                idx += 1
-                if idx in self._indexes["_tmap"]:
-                    row = self._indexes["_tmap"][idx]
-                else:
-                    row = self._get_element_idx2(_xpath_row_idx, idx)
-                    self._indexes["_tmap"][idx] = row
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    if y <= end:
-                        row = row.clone
-                        row.y = y
-                        y += 1
-                        if repeated > 1 or (y == start and start > 0):
-                            row.repeated = None
-                        yield row
-
-    def get_rows(
-        self,
-        coord: tuple | list | str | None = None,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Row]:
-        """Get the list of rows matching the criteria.
-
-        Filter by coordinates will parse the area defined by the coordinates.
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of rows
-
-            content -- str regex
-
-            style -- str
-
-        Return: list of rows
-        """
-        if coord:
-            _x, y, _z, t = self._translate_table_coordinates(coord)
-        else:
-            y = t = None
-        # fixme : not clones ?
-        if not content and not style:
-            return list(self.traverse(start=y, end=t))
-        rows = []
-        for row in self.traverse(start=y, end=t):
-            if content and not row.match(content):
-                continue
-            if style and style != row.style:
-                continue
-            rows.append(row)
-        return rows
-
-    def _get_row2(self, y: int, clone: bool = True, create: bool = True) -> Row:
-        if y >= self.height:
-            if create:
-                return Row()
-            raise ValueError("Row not found")
-        row = self._get_row2_base(y)
-        if row is None:
-            raise ValueError("Row not found")
-        if clone:
-            return row.clone
-        return row
-
-    def _get_row2_base(self, y: int) -> Row | None:
-        idx = find_odf_idx(self._tmap, y)
-        if idx is not None:
-            if idx in self._indexes["_tmap"]:
-                row = self._indexes["_tmap"][idx]
-            else:
-                row = self._get_element_idx2(_xpath_row_idx, idx)
-                self._indexes["_tmap"][idx] = row
-            return row
-        return None
-
-    def get_row(self, y: int | str, clone: bool = True, create: bool = True) -> Row:
-        """Get the row at the given "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        A copy is returned, use set_cell() to push it back.
-
-        Arguments:
-
-            y -- int or str
-
-        Return: Row
-        """
-        # fixme : keep repeat ? maybe an option to functions : "raw=False"
-        y = self._translate_y_from_any(y)
-        row = self._get_row2(y, clone=clone, create=create)
-        if row is None:
-            raise ValueError("Row not found")
-        row.y = y
-        return row
-
-    def set_row(self, y: int | str, row: Row | None = None, clone: bool = True) -> Row:
-        """Replace the row at the given position with the new one. Repetions of
-        the old row will be adjusted.
-
-        If row is None, a new empty row is created.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Arguments:
-
-            y -- int or str
-
-            row -- Row
-
-        returns the row, with updated row.y
-        """
-        if row is None:
-            row = Row()
-            repeated = 1
-            clone = False
-        else:
-            repeated = row.repeated or 1
-        y = self._translate_y_from_any(y)
-        row.y = y
-        # Outside the defined table ?
-        diff = y - self.height
-        if diff == 0:
-            row_back = self.append_row(row, _repeated=repeated, clone=clone)
-        elif diff > 0:
-            self.append_row(Row(repeated=diff), _repeated=diff, clone=clone)
-            row_back = self.append_row(row, _repeated=repeated, clone=clone)
-        else:
-            # Inside the defined table
-            row_back = set_item_in_vault(  # type: ignore
-                y, row, self, _xpath_row_idx, "_tmap", clone=clone
-            )
-        # print self.serialize(True)
-        # Update width if necessary
-        self._update_width(row_back)
-        return row_back
-
-    def insert_row(
-        self, y: str | int, row: Row | None = None, clone: bool = True
-    ) -> Row:
-        """Insert the row before the given "y" position. If no row is given,
-        an empty one is created.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        If row is None, a new empty row is created.
-
-        Arguments:
-
-            y -- int or str
-
-            row -- Row
-
-        returns the row, with updated row.y
-        """
-        if row is None:
-            row = Row()
-            clone = False
-        y = self._translate_y_from_any(y)
-        diff = y - self.height
-        if diff < 0:
-            row_back = insert_item_in_vault(y, row, self, _xpath_row_idx, "_tmap")
-        elif diff == 0:
-            row_back = self.append_row(row, clone=clone)
-        else:
-            self.append_row(Row(repeated=diff), _repeated=diff, clone=False)
-            row_back = self.append_row(row, clone=clone)
-        row_back.y = y  # type: ignore
-        # Update width if necessary
-        self._update_width(row_back)  # type: ignore
-        return row_back  # type: ignore
-
-    def extend_rows(self, rows: list[Row] | None = None) -> None:
-        """Append a list of rows at the end of the table.
-
-        Arguments:
-
-            rows -- list of Row
-        """
-        if rows is None:
-            rows = []
-        self.extend(rows)
-        self._compute_table_cache()
-        # Update width if necessary
-        width = self.width
-        for row in self.traverse():
-            if row.width > width:
-                width = row.width
-        diff = width - self.width
-        if diff > 0:
-            self.append_column(Column(repeated=diff))
-
-    def append_row(
-        self,
-        row: Row | None = None,
-        clone: bool = True,
-        _repeated: int | None = None,
-    ) -> Row:
-        """Append the row at the end of the table. If no row is given, an
-        empty one is created.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Note the columns are automatically created when the first row is
-        inserted in an empty table. So better insert a filled row.
-
-        Arguments:
-
-            row -- Row
-
-            _repeated -- (optional), repeated value of the row
-
-        returns the row, with updated row.y
-        """
-        if row is None:
-            row = Row()
-            _repeated = 1
-        elif clone:
-            row = row.clone
-        # Appending a repeated row accepted
-        # Do not insert next to the last row because it could be in a group
-        self._append(row)
-        if _repeated is None:
-            _repeated = row.repeated or 1
-        self._tmap = insert_map_once(self._tmap, len(self._tmap), _repeated)
-        row.y = self.height - 1
-        # Initialize columns
-        if not self._get_columns():
-            repeated = row.width
-            self.insert(Column(repeated=repeated), position=0)
-            self._compute_table_cache()
-        # Update width if necessary
-        self._update_width(row)
-        return row
-
-    def delete_row(self, y: int | str) -> None:
-        """Delete the row at the given "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Arguments:
-
-            y -- int or str
-        """
-        y = self._translate_y_from_any(y)
-        # Outside the defined table
-        if y >= self.height:
-            return
-        # Inside the defined table
-        delete_item_in_vault(y, self, _xpath_row_idx, "_tmap")
-
-    def get_row_values(
-        self,
-        y: int | str,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-    ) -> list:
-        """Shortcut to get the list of Python values for the cells of the row
-        at the given "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-        If cell_type and complete is True, replace missing values by None.
-
-        If get_type is True, returns a tuple (value, ODF type of value)
-
-        Arguments:
-
-            y -- int, str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: list of lists of Python types
-        """
-        values = self.get_row(y, clone=False).get_values(
-            cell_type=cell_type, complete=complete, get_type=get_type
-        )
-        # complete row to match column width
-        if complete:
-            if get_type:
-                values.extend([(None, None)] * (self.width - len(values)))
-            else:
-                values.extend([None] * (self.width - len(values)))
-        return values
-
-    def set_row_values(
-        self,
-        y: int | str,
-        values: list,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        style: str | None = None,
-    ) -> Row:
-        """Shortcut to set the values of *all* cells of the row at the given
-        "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Arguments:
-
-            y -- int or str
-
-            values -- list of Python types
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                         'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-
-        returns the row, with updated row.y
-        """
-        row = Row()  # needed if clones rows
-        row.set_values(values, style=style, cell_type=cell_type, currency=currency)
-        return self.set_row(y, row)  # needed if clones rows
-
-    def set_row_cells(self, y: int | str, cells: list | None = None) -> Row:
-        """Shortcut to set *all* the cells of the row at the given
-        "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Arguments:
-
-            y -- int or str
-
-            cells -- list of Python types
-
-            style -- str
-
-        returns the row, with updated row.y
-        """
-        if cells is None:
-            cells = []
-        row = Row()  # needed if clones rows
-        row.extend_cells(cells)
-        return self.set_row(y, row)  # needed if clones rows
-
-    def is_row_empty(self, y: int | str, aggressive: bool = False) -> bool:
-        """Return wether every cell in the row at the given "y" position has
-        no value or the value evaluates to False (empty string), and no style.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        If aggressive is True, empty cells with style are considered empty.
-
-        Arguments:
-
-            y -- int or str
-
-            aggressive -- bool
-        """
-        return self.get_row(y, clone=False).is_empty(aggressive=aggressive)
-
-    #
-    # Cells
-    #
-
-    def get_cells(
-        self,
-        coord: tuple | list | str | None = None,
-        cell_type: str | None = None,
-        style: str | None = None,
-        content: str | None = None,
-        flat: bool = False,
-    ) -> list:
-        """Get the cells matching the criteria. If 'coord' is None,
-        parse the whole table, else parse the area defined by 'coord'.
-
-        Filter by  cell_type = "all"  will retrieve cells of any
-        type, aka non empty cells.
-
-        If flat is True (default is False), the method return a single list
-        of all the values, else a list of lists of cells.
-
-        if cell_type, style and content are None, get_cells() will return
-        the exact number of cells of the area, including empty cells.
-
-        Arguments:
-
-            coordinates -- str or tuple of int : coordinates of area
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            content -- str regex
-
-            style -- str
-
-            flat -- boolean
-
-        Return: list of tuples
-        """
-        if coord:
-            x, y, z, t = self._translate_table_coordinates(coord)
-        else:
-            x = y = z = t = None
-        if flat:
-            cells: list[Cell] = []
-            for row in self.traverse(start=y, end=t):
-                row_cells = row.get_cells(
-                    coord=(x, z),
-                    cell_type=cell_type,
-                    style=style,
-                    content=content,
-                )
-                cells.extend(row_cells)
-            return cells
-        else:
-            lcells: list[list[Cell]] = []
-            for row in self.traverse(start=y, end=t):
-                row_cells = row.get_cells(
-                    coord=(x, z),
-                    cell_type=cell_type,
-                    style=style,
-                    content=content,
-                )
-                lcells.append(row_cells)
-            return lcells
-
-    def get_cell(
-        self,
-        coord: tuple | list | str,
-        clone: bool = True,
-        keep_repeated: bool = True,
-    ) -> Cell:
-        """Get the cell at the given coordinates.
-
-        They are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        A copy is returned, use ``set_cell`` to push it back.
-
-        Arguments:
-
-            coord -- (int, int) or str
-
-        Return: Cell
-        """
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        # Outside the defined table
-        if y >= self.height:
-            cell = Cell()
-        else:
-            # Inside the defined table
-            row = self._get_row2_base(y)
-            if row is None:
-                raise ValueError
-            read_cell = row.get_cell(x, clone=clone)
-            if read_cell is None:
-                raise ValueError
-            cell = read_cell
-            if not keep_repeated:
-                repeated = cell.repeated or 1
-                if repeated >= 2:
-                    cell.repeated = None
-        cell.x = x
-        cell.y = y
-        return cell
-
-    def get_value(
-        self,
-        coord: tuple | list | str,
-        get_type: bool = False,
-    ) -> Any:
-        """Shortcut to get the Python value of the cell at the given
-        coordinates.
-
-        If get_type is True, returns the tuples (value, ODF type)
-
-        coord is either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4". If an Area is given, the upper
-        left position is used as coord.
-
-        Arguments:
-
-            coord -- (int, int) or str : coordinate
-
-        Return: Python type
-        """
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        # Outside the defined table
-        if y >= self.height:
-            if get_type:
-                return (None, None)
-            return None
-        else:
-            # Inside the defined table
-            row = self._get_row2_base(y)
-            if row is None:
-                raise ValueError
-            cell = row._get_cell2_base(x)
-            if cell is None:
-                if get_type:
-                    return (None, None)
-                return None
-            return cell.get_value(get_type=get_type)
-
-    def set_cell(
-        self,
-        coord: tuple | list | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Replace a cell of the table at the given coordinates.
-
-        They are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        Arguments:
-
-            coord -- (int, int) or str : coordinate
-
-            cell -- Cell
-
-        return the cell, with x and y updated
-        """
-        if cell is None:
-            cell = Cell()
-            clone = False
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        cell.x = x
-        cell.y = y
-        if y >= self.height:
-            row = Row()
-            cell_back = row.set_cell(x, cell, clone=clone)
-            self.set_row(y, row, clone=False)
-        else:
-            row_read = self._get_row2_base(y)
-            if row_read is None:
-                raise ValueError
-            row = row_read
-            row.y = y
-            repeated = row.repeated or 1
-            if repeated > 1:
-                row = row.clone
-                row.repeated = None
-                cell_back = row.set_cell(x, cell, clone=clone)
-                self.set_row(y, row, clone=False)
-            else:
-                cell_back = row.set_cell(x, cell, clone=clone)
-                # Update width if necessary, since we don't use set_row
-                self._update_width(row)
-        return cell_back
-
-    def set_cells(
-        self,
-        cells: list[list[Cell]] | list[tuple[Cell]],
-        coord: tuple | list | str | None = None,
-        clone: bool = True,
-    ) -> None:
-        """Set the cells in the table, from the 'coord' position.
-
-        'coord' is the coordinate of the upper left cell to be modified by
-        values. If 'coord' is None, default to the position (0,0) ("A1").
-        If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
-        area is used as coordinate.
-
-        The table is *not* cleared before the operation, to reset the table
-        before setting cells, use table.clear().
-
-        A list of lists is expected, with as many lists as rows to be set, and
-        as many cell in each sublist as cells to be setted in the row.
-
-        Arguments:
-
-            cells -- list of list of cells
-
-            coord -- tuple or str
-
-            values -- list of lists of python types
-        """
-        if coord:
-            x, y = self._translate_cell_coordinates(coord)
-        else:
-            x = y = 0
-        if y is None:
-            y = 0
-        if x is None:
-            x = 0
-        y -= 1
-        for row_cells in cells:
-            y += 1
-            if not row_cells:
-                continue
-            row = self.get_row(y, clone=True)
-            repeated = row.repeated or 1
-            if repeated >= 2:
-                row.repeated = None
-            row.set_cells(row_cells, start=x, clone=clone)
-            self.set_row(y, row, clone=False)
-            self._update_width(row)
-
-    def set_value(
-        self,
-        coord: tuple | list | str,
-        value: Any,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        style: str | None = None,
-    ) -> None:
-        """Set the Python value of the cell at the given coordinates.
-
-        They are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        Arguments:
-
-            coord -- (int, int) or str
-
-            value -- Python type
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                     'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-
-        """
-        self.set_cell(
-            coord,
-            Cell(value, cell_type=cell_type, currency=currency, style=style),
-            clone=False,
-        )
-
-    def set_cell_image(
-        self,
-        coord: tuple | list | str,
-        image_frame: Frame,
-        doc_type: str | None = None,
-    ) -> None:
-        """Do all the magic to display an image in the cell at the given
-        coordinates.
-
-        They are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        The frame element must contain the expected image position and
-        dimensions.
-
-        DrawImage insertion depends on the document type, so the type must be
-        provided or the table element must be already attached to a document.
-
-        Arguments:
-
-            coord -- (int, int) or str
-
-            image_frame -- Frame including an image
-
-            doc_type -- 'spreadsheet' or 'text'
-        """
-        # Test document type
-        if doc_type is None:
-            body = self.document_body
-            if body is None:
-                raise ValueError("document type not found")
-            doc_type = {"office:spreadsheet": "spreadsheet", "office:text": "text"}.get(
-                body.tag
-            )
-            if doc_type is None:
-                raise ValueError("document type not supported for images")
-        # We need the end address of the image
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        cell = self.get_cell((x, y))
-        image_frame = image_frame.clone  # type: ignore
-        # Remove any previous paragraph, frame, etc.
-        for child in cell.children:
-            cell.delete(child)
-        # Now it all depends on the document type
-        if doc_type == "spreadsheet":
-            image_frame.anchor_type = "char"
-            # The frame needs end coordinates
-            width, height = image_frame.size
-            image_frame.set_attribute("table:end-x", width)
-            image_frame.set_attribute("table:end-y", height)
-            # FIXME what happens when the address changes?
-            address = f"{self.name}.{digit_to_alpha(x)}{y + 1}"
-            image_frame.set_attribute("table:end-cell-address", address)
-            # The frame is directly in the cell
-            cell.append(image_frame)
-        elif doc_type == "text":
-            # The frame must be in a paragraph
-            cell.set_value("")
-            paragraph = cell.get_element("text:p")
-            if paragraph is None:
-                raise ValueError
-            paragraph.append(image_frame)
-        self.set_cell(coord, cell)
-
-    def insert_cell(
-        self,
-        coord: tuple | list | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Insert the given cell at the given coordinates. If no cell is
-        given, an empty one is created.
-
-        Coordinates are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        Cells on the right are shifted. Other rows remain untouched.
-
-        Arguments:
-
-            coord -- (int, int) or str
-
-            cell -- Cell
-
-        returns the cell with x and y updated
-        """
-        if cell is None:
-            cell = Cell()
-            clone = False
-        if clone:
-            cell = cell.clone
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        row = self._get_row2(y, clone=True)
-        row.y = y
-        row.repeated = None
-        cell_back = row.insert_cell(x, cell, clone=False)
-        self.set_row(y, row, clone=False)
-        # Update width if necessary
-        self._update_width(row)
-        return cell_back
-
-    def append_cell(
-        self,
-        y: int | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Append the given cell at the "y" coordinate. Repeated cells are
-        accepted. If no cell is given, an empty one is created.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Other rows remain untouched.
-
-        Arguments:
-
-            y -- int or str
-
-            cell -- Cell
-
-        returns the cell with x and y updated
-        """
-        if cell is None:
-            cell = Cell()
-            clone = False
-        if clone:
-            cell = cell.clone
-        y = self._translate_y_from_any(y)
-        row = self._get_row2(y)
-        row.y = y
-        cell_back = row.append_cell(cell, clone=False)
-        self.set_row(y, row)
-        # Update width if necessary
-        self._update_width(row)
-        return cell_back
-
-    def delete_cell(self, coord: tuple | list | str) -> None:
-        """Delete the cell at the given coordinates, so that next cells are
-        shifted to the left.
-
-        Coordinates are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        Use set_value() for erasing value.
-
-        Arguments:
-
-            coord -- (int, int) or str
-        """
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        # Outside the defined table
-        if y >= self.height:
-            return
-        # Inside the defined table
-        row = self._get_row2_base(y)
-        if row is None:
-            raise ValueError
-        row.delete_cell(x)
-        # self.set_row(y, row)
-
-    # Columns
-
-    def _get_columns(self) -> list:
-        return self.get_elements(_xpath_column)
-
-    def traverse_columns(  # noqa: C901
-        self,
-        start: int | None = None,
-        end: int | None = None,
-    ) -> Iterator[Column]:
-        """Yield as many column elements as expected columns in the table,
-        i.e. expand repetitions by returning the same column as many times as
-        necessary.
-
-            Arguments:
-
-                start -- int
-
-                end -- int
-
-        Copies are returned, use set_column() to push them back.
-        """
-        idx = -1
-        before = -1
-        x = 0
-        if start is None and end is None:
-            for juska in self._cmap:
-                idx += 1
-                if idx in self._indexes["_cmap"]:
-                    column = self._indexes["_cmap"][idx]
-                else:
-                    column = self._get_element_idx2(_xpath_column_idx, idx)
-                    self._indexes["_cmap"][idx] = column
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    # Return a copy without the now obsolete repetition
-                    column = column.clone
-                    column.x = x
-                    x += 1
-                    if repeated > 1:
-                        column.repeated = None
-                    yield column
-        else:
-            if start is None:
-                start = 0
-            start = max(0, start)
-            if end is None:
-                try:
-                    end = self._cmap[-1]
-                except Exception:
-                    end = -1
-            start_map = find_odf_idx(self._cmap, start)
-            if start_map is None:
-                return
-            if start_map > 0:
-                before = self._cmap[start_map - 1]
-            idx = start_map - 1
-            before = start - 1
-            x = start
-            for juska in self._cmap[start_map:]:
-                idx += 1
-                if idx in self._indexes["_cmap"]:
-                    column = self._indexes["_cmap"][idx]
-                else:
-                    column = self._get_element_idx2(_xpath_column_idx, idx)
-                    self._indexes["_cmap"][idx] = column
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    if x <= end:
-                        column = column.clone
-                        column.x = x
-                        x += 1
-                        if repeated > 1 or (x == start and start > 0):
-                            column.repeated = None
-                        yield column
-
-    def get_columns(
-        self,
-        coord: tuple | list | str | None = None,
-        style: str | None = None,
-    ) -> list[Column]:
-        """Get the list of columns matching the criteria. Each result is a
-        tuple of (x, column).
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of columns
-
-            style -- str
-
-        Return: list of columns
-        """
-        if coord:
-            x, _y, _z, t = self._translate_column_coordinates(coord)
-        else:
-            x = t = None
-        if not style:
-            return list(self.traverse_columns(start=x, end=t))
-        columns = []
-        for column in self.traverse_columns(start=x, end=t):
-            if style != column.style:
-                continue
-            columns.append(column)
-        return columns
-
-    def _get_column2(self, x: int) -> Column | None:
-        # Outside the defined table
-        if x >= self.width:
-            return Column()
-        # Inside the defined table
-        odf_idx = find_odf_idx(self._cmap, x)
-        if odf_idx is not None:
-            column = self._get_element_idx2(_xpath_column_idx, odf_idx)
-            if column is None:
-                return None
-            # fixme : no clone here => change doc and unit tests
-            return column.clone  # type: ignore
-            # return row
-        return None
-
-    def get_column(self, x: int | str) -> Column:
-        """Get the column at the given "x" position.
-
-        ODF columns don't contain cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        A copy is returned, use set_column() to push it back.
-
-        Arguments:
-
-            x -- int or str
-
-        Return: Column
-        """
-        x = self._translate_x_from_any(x)
-        column = self._get_column2(x)
-        if column is None:
-            raise ValueError
-        column.x = x
-        return column
-
-    def set_column(
-        self,
-        x: int | str,
-        column: Column | None = None,
-    ) -> Column:
-        """Replace the column at the given "x" position.
-
-        ODF columns don't contain cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Arguments:
-
-            x -- int or str
-
-            column -- Column
-        """
-        x = self._translate_x_from_any(x)
-        if column is None:
-            column = Column()
-            repeated = 1
-        else:
-            repeated = column.repeated or 1
-        column.x = x
-        # Outside the defined table ?
-        diff = x - self.width
-        if diff == 0:
-            column_back = self.append_column(column, _repeated=repeated)
-        elif diff > 0:
-            self.append_column(Column(repeated=diff), _repeated=diff)
-            column_back = self.append_column(column, _repeated=repeated)
-        else:
-            # Inside the defined table
-            column_back = set_item_in_vault(  # type: ignore
-                x, column, self, _xpath_column_idx, "_cmap"
-            )
-        return column_back
-
-    def insert_column(
-        self,
-        x: int | str,
-        column: Column | None = None,
-    ) -> Column:
-        """Insert the column before the given "x" position. If no column is
-        given, an empty one is created.
-
-        ODF columns don't contain cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Arguments:
-
-            x -- int or str
-
-            column -- Column
-        """
-        if column is None:
-            column = Column()
-        x = self._translate_x_from_any(x)
-        diff = x - self.width
-        if diff < 0:
-            column_back = insert_item_in_vault(
-                x, column, self, _xpath_column_idx, "_cmap"
-            )
-        elif diff == 0:
-            column_back = self.append_column(column.clone)
-        else:
-            self.append_column(Column(repeated=diff), _repeated=diff)
-            column_back = self.append_column(column.clone)
-        column_back.x = x  # type: ignore
-        # Repetitions are accepted
-        repeated = column.repeated or 1
-        # Update width on every row
-        for row in self._get_rows():
-            if row.width > x:
-                row.insert_cell(x, Cell(repeated=repeated))
-            # Shorter rows don't need insert
-            # Longer rows shouldn't exist!
-        return column_back  # type: ignore
-
-    def append_column(
-        self,
-        column: Column | None = None,
-        _repeated: int | None = None,
-    ) -> Column:
-        """Append the column at the end of the table. If no column is given,
-        an empty one is created.
-
-        ODF columns don't contain cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Arguments:
-
-            column -- Column
-        """
-        if column is None:
-            column = Column()
-        else:
-            column = column.clone
-        if not self._cmap:
-            position = 0
-        else:
-            odf_idx = len(self._cmap) - 1
-            last_column = self._get_element_idx2(_xpath_column_idx, odf_idx)
-            if last_column is None:
-                raise ValueError
-            position = self.index(last_column) + 1
-        column.x = self.width
-        self.insert(column, position=position)
-        # Repetitions are accepted
-        if _repeated is None:
-            _repeated = column.repeated or 1
-        self._cmap = insert_map_once(self._cmap, len(self._cmap), _repeated)
-        # No need to update row widths
-        return column
-
-    def delete_column(self, x: int | str) -> None:
-        """Delete the column at the given position. ODF columns don't contain
-        cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Arguments:
-
-            x -- int or str
-        """
-        x = self._translate_x_from_any(x)
-        # Outside the defined table
-        if x >= self.width:
-            return
-        # Inside the defined table
-        delete_item_in_vault(x, self, _xpath_column_idx, "_cmap")
-        # Update width
-        width = self.width
-        for row in self._get_rows():
-            if row.width >= width:
-                row.delete_cell(x)
-
-    def get_column_cells(  # noqa: C901
-        self,
-        x: int | str,
-        style: str | None = None,
-        content: str | None = None,
-        cell_type: str | None = None,
-        complete: bool = False,
-    ) -> list[Cell | None]:
-        """Get the list of cells at the given position.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-
-        If complete is True, replace missing values by None.
-
-        Arguments:
-
-            x -- int or str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            content -- str regex
-
-            style -- str
-
-            complete -- boolean
-
-        Return: list of Cell
-        """
-        x = self._translate_x_from_any(x)
-        if cell_type:
-            cell_type = cell_type.lower().strip()
-        cells: list[Cell | None] = []
-        if not style and not content and not cell_type:
-            for row in self.traverse():
-                cells.append(row.get_cell(x, clone=True))
-            return cells
-        for row in self.traverse():
-            cell = row.get_cell(x, clone=True)
-            if cell is None:
-                raise ValueError
-            # Filter the cells by cell_type
-            if cell_type:
-                ctype = cell.type
-                if not ctype or not (ctype == cell_type or cell_type == "all"):
-                    if complete:
-                        cells.append(None)
-                    continue
-            # Filter the cells with the regex
-            if content and not cell.match(content):
-                if complete:
-                    cells.append(None)
-                continue
-            # Filter the cells with the style
-            if style and style != cell.style:
-                if complete:
-                    cells.append(None)
-                continue
-            cells.append(cell)
-        return cells
-
-    def get_column_values(
-        self,
-        x: int | str,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-    ) -> list[Any]:
-        """Shortcut to get the list of Python values for the cells at the
-        given position.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-        If cell_type and complete is True, replace missing values by None.
-
-        If get_type is True, returns a tuple (value, ODF type of value)
-
-        Arguments:
-
-            x -- int or str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: list of Python types
-        """
-        cells = self.get_column_cells(
-            x, style=None, content=None, cell_type=cell_type, complete=complete
-        )
-        values: list[Any] = []
-        for cell in cells:
-            if cell is None:
-                if complete:
-                    if get_type:
-                        values.append((None, None))
-                    else:
-                        values.append(None)
-                continue
-            if cell_type:
-                ctype = cell.type
-                if not ctype or not (ctype == cell_type or cell_type == "all"):
-                    if complete:
-                        if get_type:
-                            values.append((None, None))
-                        else:
-                            values.append(None)
-                    continue
-            values.append(cell.get_value(get_type=get_type))
-        return values
-
-    def set_column_cells(self, x: int | str, cells: list[Cell]) -> None:
-        """Shortcut to set the list of cells at the given position.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        The list must have the same length than the table height.
-
-        Arguments:
-
-            x -- int or str
-
-            cells -- list of Cell
-        """
-        height = self.height
-        if len(cells) != height:
-            raise ValueError(f"col mismatch: {height} cells expected")
-        cells_iterator = iter(cells)
-        for y, row in enumerate(self.traverse()):
-            row.set_cell(x, next(cells_iterator))
-            self.set_row(y, row)
-
-    def set_column_values(
-        self,
-        x: int | str,
-        values: list,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        style: str | None = None,
-    ) -> None:
-        """Shortcut to set the list of Python values of cells at the given
-        position.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        The list must have the same length than the table height.
-
-        Arguments:
-
-            x -- int or str
-
-            values -- list of Python types
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                         'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-        """
-        cells = [
-            Cell(value, cell_type=cell_type, currency=currency, style=style)
-            for value in values
-        ]
-        self.set_column_cells(x, cells)
-
-    def is_column_empty(self, x: int | str, aggressive: bool = False) -> bool:
-        """Return wether every cell in the column at "x" position has no value
-        or the value evaluates to False (empty string), and no style.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        If aggressive is True, empty cells with style are considered empty.
-
-        Return: bool
-        """
-        for cell in self.get_column_cells(x):
-            if cell is None:
-                continue
-            if not cell.is_empty(aggressive=aggressive):
-                return False
-        return True
-
-    # Named Range
-
-    def get_named_ranges(  # type: ignore
-        self,
-        table_name: str | list[str] | None = None,
-    ) -> list[NamedRange]:
-        """Returns the list of available Name Ranges of the spreadsheet. If
-        table_name is provided, limits the search to these tables.
-        Beware : named ranges are stored at the body level, thus do not call
-        this method on a cloned table.
-
-        Arguments:
-
-            table_names -- str or list of str, names of tables
-
-        Return : list of table_range
-        """
-        body = self.document_body
-        if not body:
-            return []
-        all_named_ranges = body.get_named_ranges()
-        if not table_name:
-            return all_named_ranges  # type:ignore
-        filter_ = []
-        if isinstance(table_name, str):
-            filter_.append(table_name)
-        elif isiterable(table_name):
-            filter_.extend(table_name)
-        else:
-            raise ValueError(
-                f"table_name must be string or Iterable, not {type(table_name)}"
-            )
-        return [
-            nr for nr in all_named_ranges if nr.table_name in filter_  # type:ignore
-        ]
-
-    def get_named_range(self, name: str) -> NamedRange:
-        """Returns the Name Ranges of the specified name. If
-        table_name is provided, limits the search to these tables.
-        Beware : named ranges are stored at the body level, thus do not call
-        this method on a cloned table.
-
-        Arguments:
-
-            name -- str, name of the named range object
-
-        Return : NamedRange
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document")
-        return body.get_named_range(name)  # type: ignore
-
-    def set_named_range(
-        self,
-        name: str,
-        crange: str | tuple | list,
-        table_name: str | None = None,
-        usage: str | None = None,
-    ) -> None:
-        """Create a Named Range element and insert it in the document.
-        Beware : named ranges are stored at the body level, thus do not call
-        this method on a cloned table.
-
-        Arguments:
-
-            name -- str, name of the named range
-
-            crange -- str or tuple of int, cell or area coordinate
-
-            table_name -- str, name of the table
-
-            uage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document")
-        if not name:
-            raise ValueError("Name required.")
-        if table_name is None:
-            table_name = self.name
-        named_range = NamedRange(name, crange, table_name, usage)
-        body.append_named_range(named_range)
-
-    def delete_named_range(self, name: str) -> None:
-        """Delete the Named Range of specified name from the spreadsheet.
-        Beware : named ranges are stored at the body level, thus do not call
-        this method on a cloned table.
-
-        Arguments:
-
-            name -- str
-        """
-        name = name.strip()
-        if not name:
-            raise ValueError("Name required.")
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        body.delete_named_range(name)
-
-    #
-    # Cell span
-    #
-
-    def set_span(  # noqa: C901
-        self,
-        area: str | tuple | list,
-        merge: bool = False,
-    ) -> bool:
-        """Create a Cell Span : span the first cell of the area on several
-        columns and/or rows.
-        If merge is True, replace text of the cell by the concatenation of
-        existing text in covered cells.
-        Beware : if merge is True, old text is changed, if merge is False
-        (the default), old text in coverd cells is still present but not
-        displayed by most GUI.
-
-        If the area defines only one cell, the set span will do nothing.
-        It is not allowed to apply set span to an area whose one cell already
-        belongs to previous cell span.
-
-        Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
-        be provided as an alpha numeric value like "A1:B2' or a tuple like
-        (0, 0, 1, 1) or (0, 0).
-
-        Arguments:
-
-            area -- str or tuple of int, cell or area coordinate
-
-            merge -- boolean
-        """
-        # get area
-        digits = convert_coordinates(area)
-        if len(digits) == 4:
-            x, y, z, t = digits
-        else:
-            x, y = digits
-            z, t = digits
-        start = x, y
-        end = z, t
-        if start == end:
-            # one cell : do nothing
-            return False
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        if z is None:
-            raise ValueError
-        if t is None:
-            raise ValueError
-        # check for previous span
-        good = True
-        # Check boundaries and empty cells : need to crate non existent cells
-        # so don't use get_cells directly, but get_cell
-        cells = []
-        for yy in range(y, t + 1):
-            row_cells = []
-            for xx in range(x, z + 1):
-                row_cells.append(
-                    self.get_cell((xx, yy), clone=True, keep_repeated=False)
-                )
-            cells.append(row_cells)
-        for row in cells:
-            for cell in row:
-                if cell._is_spanned():
-                    good = False
-                    break
-            if not good:
-                break
-        if not good:
-            return False
-        # Check boundaries
-        # if z >= self.width or t >= self.height:
-        #    self.set_cell(coord = end)
-        #    print area, z, t
-        #    cells = self.get_cells((x, y, z, t))
-        #    print cells
-        # do it:
-        if merge:
-            val_list = []
-            for row in cells:
-                for cell in row:
-                    if cell.is_empty(aggressive=True):
-                        continue
-                    val = cell.get_value()
-                    if val is not None:
-                        if isinstance(val, str):
-                            val.strip()
-                        if val != "":
-                            val_list.append(val)
-                        cell.clear()
-            if val_list:
-                if len(val_list) == 1:
-                    cells[0][0].set_value(val_list[0])
-                else:
-                    value = " ".join([str(v) for v in val_list if v])
-                    cells[0][0].set_value(value)
-        cols = z - x + 1
-        cells[0][0].set_attribute("table:number-columns-spanned", str(cols))
-        rows = t - y + 1
-        cells[0][0].set_attribute("table:number-rows-spanned", str(rows))
-        for cell in cells[0][1:]:
-            cell.tag = "table:covered-table-cell"
-        for row in cells[1:]:
-            for cell in row:
-                cell.tag = "table:covered-table-cell"
-        # replace cells in table
-        self.set_cells(cells, coord=start, clone=False)
-        return True
-
-    def del_span(self, area: str | tuple | list) -> bool:
-        """Delete a Cell Span. 'area' is the cell coordiante of the upper left
-        cell of the spanned area.
-
-        Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
-        be provided as an alpha numeric value like "A1:B2' or a tuple like
-        (0, 0, 1, 1) or (0, 0). If an area is provided, the upper left cell
-        is used.
-
-        Arguments:
-
-            area -- str or tuple of int, cell or area coordinate
-        """
-        # get area
-        digits = convert_coordinates(area)
-        if len(digits) == 4:
-            x, y, _z, _t = digits
-        else:
-            x, y = digits
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        start = x, y
-        # check for previous span
-        cell0 = self.get_cell(start)
-        nb_cols = cell0.get_attribute_integer("table:number-columns-spanned")
-        if nb_cols is None:
-            return False
-        nb_rows = cell0.get_attribute_integer("table:number-rows-spanned")
-        if nb_rows is None:
-            return False
-        z = x + nb_cols - 1
-        t = y + nb_rows - 1
-        cells = self.get_cells((x, y, z, t))
-        cells[0][0].del_attribute("table:number-columns-spanned")
-        cells[0][0].del_attribute("table:number-rows-spanned")
-        for cell in cells[0][1:]:
-            cell.tag = "table:table-cell"
-        for row in cells[1:]:
-            for cell in row:
-                cell.tag = "table:table-cell"
-        # replace cells in table
-        self.set_cells(cells, coord=start, clone=False)
-        return True
-
-    # Utilities
-
-    def to_csv(
-        self,
-        path_or_file: str | Path | None = None,
-        dialect: str = "excel",
-    ) -> Any:
-        """Write the table as CSV in the file.
-
-        If the file is a string, it is opened as a local path. Else an
-        opened file-like is expected.
-
-        Arguments:
-
-            path_or_file -- str or file-like
-
-            dialect -- str, python csv.dialect, can be 'excel', 'unix'...
-        """
-
-        def write_content(csv_writer: object) -> None:
-            for values in self.iter_values():
-                line = []
-                for value in values:
-                    if value is None:
-                        value = ""
-                    if isinstance(value, str):
-                        value = value.strip()
-                    line.append(value)
-                csv_writer.writerow(line)  # type: ignore
-
-        out = StringIO(newline="")
-        csv_writer = csv.writer(out, dialect=dialect)
-        write_content(csv_writer)
-        if path_or_file is None:
-            return out.getvalue()
-        path = Path(path_or_file)
-        path.write_text(out.getvalue())
-        return None
-
-
-class NamedRange(Element):
-    """ODF Named Range "table:named-range". Identifies inside the spreadsheet
-    a range of cells of a table by a name and the name of the table.
-
-    Name Ranges have the following attributes:
-
-        name -- name of the named range
-
-        table_name -- name of the table
-
-        start -- first cell of the named range, tuple (x, y)
-
-        end -- last cell of the named range, tuple (x, y)
-
-        crange -- range of the named range, tuple (x, y, z, t)
-
-        usage -- None or str, usage of the named range.
-    """
-
-    _tag = "table:named-range"
-
-    def __init__(
-        self,
-        name: str | None = None,
-        crange: str | tuple | list | None = None,
-        table_name: str | None = None,
-        usage: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a Named Range element. 'name' must contains only letters, digits
-           and '_', and must not be like a coordinate as 'A1'. 'table_name' must be
-           a correct table name (no "'" or "/" in it).
-
-        Arguments:
-
-             name -- str, name of the named range
-
-             crange -- str or tuple of int, cell or area coordinate
-
-             table_name -- str, name of the table
-
-             usage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
-        """
-        super().__init__(**kwargs)
-        self.usage = None
-        if self._do_init:
-            self.name = name or ""
-            self.table_name = _table_name_check(table_name)
-            self.set_range(crange or "")
-            self.set_usage(usage)
-        cell_range_address = self.get_attribute_string("table:cell-range-address") or ""
-        if not cell_range_address:
-            self.table_name = ""
-            self.start = None
-            self.end = None
-            self.crange = None
-            self.usage = None
-            return
-        self.usage = self.get_attribute("table:range-usable-as")
-        name_range = cell_range_address.replace("$", "")
-        name, crange = name_range.split(".", 1)
-        if name.startswith("'") and name.endswith("'"):
-            name = name[1:-1]
-        self.table_name = name
-        crange = crange.replace(".", "")
-        self._set_range(crange)
-
-    def set_usage(self, usage: str | None = None) -> None:
-        """Set the usage of the Named Range. Usage can be None (default) or one
-        of :
-            'print-range'
-            'filter'
-            'repeat-column'
-            'repeat-row'
-
-        Arguments:
-
-            usage -- None or str
-        """
-        if usage is not None:
-            usage = usage.strip().lower()
-            if usage not in ("print-range", "filter", "repeat-column", "repeat-row"):
-                usage = None
-        if usage is None:
-            with contextlib.suppress(KeyError):
-                self.del_attribute("table:range-usable-as")
-            self.usage = None
-        else:
-            self.set_attribute("table:range-usable-as", usage)
-            self.usage = usage
-
-    @property
-    def name(self) -> str | None:
-        """Get / set the name of the table."""
-        return self.get_attribute_string("table:name")
-
-    @name.setter
-    def name(self, name: str) -> None:
-        """Set the name of the Named Range. The name is mandatory, if a Named
-        Range of the same name exists, it will be replaced. Name must contains
-        only alphanumerics characters and '_', and can not be of a cell
-        coordinates form like 'AB12'.
-
-        Arguments:
-
-            name -- str
-        """
-        name = name.strip()
-        if not name:
-            raise ValueError("Name required.")
-        for x in name:
-            if x in forbidden_in_named_range():
-                raise ValueError(f"Character forbidden '{x}' ")
-        step = ""
-        for x in name:
-            if x in string.ascii_letters and step in ("", "A"):
-                step = "A"
-                continue
-            elif step in ("A", "A1") and x in string.digits:
-                step = "A1"
-                continue
-            else:
-                step = ""
-                break
-        if step == "A1":
-            raise ValueError("Name of the type 'ABC123' is not allowed.")
-        with contextlib.suppress(Exception):
-            # we are not on an inserted in a document.
-            body = self.document_body
-            named_range = body.get_named_range(name)  # type: ignore
-            if named_range:
-                named_range.delete()
-        self.set_attribute("table:name", name)
-
-    def set_table_name(self, name: str) -> None:
-        """Set the name of the table of the Named Range. The name is mandatory.
-
-        Arguments:
-
-            name -- str
-        """
-        self.table_name = _table_name_check(name)
-        self._update_attributes()
-
-    def _set_range(self, coord: tuple | list | str) -> None:
-        digits = convert_coordinates(coord)
-        if len(digits) == 4:
-            x, y, z, t = digits
-        else:
-            x, y = digits
-            z, t = digits
-        self.start = x, y  # type: ignore
-        self.end = z, t  # type: ignore
-        self.crange = x, y, z, t  # type: ignore
-
-    def set_range(self, crange: str | tuple | list) -> None:
-        """Set the range of the named range. Range can be either one cell
-        (like 'A1') or an area ('A1:B2'). It can be provided as an alpha numeric
-        value like "A1:B2' or a tuple like (0, 0, 1, 1) or (0, 0).
-
-        Arguments:
-
-            crange -- str or tuple of int, cell or area coordinate
-        """
-        self._set_range(crange)
-        self._update_attributes()
-
-    def _update_attributes(self) -> None:
-        self.set_attribute("table:base-cell-address", self._make_base_cell_address())
-        self.set_attribute("table:cell-range-address", self._make_cell_range_address())
-
-    def _make_base_cell_address(self) -> str:
-        # assuming we got table_name and range
-        if " " in self.table_name:
-            name = f"'{self.table_name}'"
-        else:
-            name = self.table_name
-        return f"${name}.${digit_to_alpha(self.start[0])}${self.start[1] + 1}"  # type: ignore
-
-    def _make_cell_range_address(self) -> str:
-        # assuming we got table_name and range
-        if " " in self.table_name:
-            name = f"'{self.table_name}'"
-        else:
-            name = self.table_name
-        if self.start == self.end:
-            return self._make_base_cell_address()
-        return (
-            f"${name}.${digit_to_alpha(self.start[0])}${self.start[1] + 1}:"  # type: ignore
-            f".${digit_to_alpha(self.end[0])}${self.end[1] + 1}"  # type: ignore
-        )
-
-    def get_values(
-        self,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-        flat: bool = False,
-    ) -> list:
-        """Shortcut to retrieve the values of the cells of the named range. See
-        table.get_values() for the arguments description and return format.
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        table = body.get_table(name=self.table_name)
-        if table is None:
-            raise ValueError
-        return table.get_values(self.crange, cell_type, complete, get_type, flat)  # type: ignore
-
-    def get_value(self, get_type: bool = False) -> Any:
-        """Shortcut to retrieve the value of the first cell of the named range.
-        See table.get_value() for the arguments description and return format.
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        table = body.get_table(name=self.table_name)
-        if table is None:
-            raise ValueError
-        return table.get_value(self.start, get_type)  # type: ignore
-
-    def set_values(
-        self,
-        values: list,
-        style: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-    ) -> None:
-        """Shortcut to set the values of the cells of the named range.
-        See table.set_values() for the arguments description.
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        table = body.get_table(name=self.table_name)
-        if table is None:
-            raise ValueError
-        table.set_values(  # type: ignore
-            values,
-            coord=self.crange,
-            style=style,
-            cell_type=cell_type,
-            currency=currency,
-        )
-
-    def set_value(
-        self,
-        value: Any,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        style: str | None = None,
-    ) -> None:
-        """Shortcut to set the value of the first cell of the named range.
-        See table.set_value() for the arguments description.
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        table = body.get_table(name=self.table_name)
-        if table is None:
-            raise ValueError
-        table.set_value(  # type: ignore
-            coord=self.start,
-            value=value,
-            cell_type=cell_type,
-            currency=currency,
-            style=style,
-        )
-
-
-def import_from_csv(
-    path_or_file: str | Path | object,
-    name: str,
-    style: str | None = None,
-    delimiter: str | None = None,
-    quotechar: str | None = None,
-    lineterminator: str | None = None,
-    encoding: str = "utf-8",
-) -> Table:
-    """Convert the CSV file to an Table. If the file is a string, it is
-    opened as a local path. Else a open file-like is expected; it will not be
-    closed afterwards.
-
-    CSV format can be autodetected to a certain limit, but encoding is
-    important.
-
-    Arguments:
-
-      path_or_file -- str or file-like
-
-      name -- str
-
-      style -- str
-
-      delimiter -- str
-
-      quotechar -- str
-
-      lineterminator -- str
-
-      encoding -- str
-    """
-
-    # Load the data
-    # XXX Load the entire file in memory
-    # Alternative: a file-wrapper returning the sample then the rest
-    if isinstance(path_or_file, (str, Path)):
-        Path(path_or_file)
-        content_b = Path(path_or_file).read_bytes()
-    else:
-        # Leave the file we were given open
-        content_b = path_or_file.read()  # type: ignore
-    if isinstance(content_b, bytes):
-        content = content_b.decode()
-    else:
-        content = content_b
-    data = content.splitlines(True)
-    # Sniff the dialect
-    sample = "".join(data[:100])
-    dialect = csv.Sniffer().sniff(sample)
-    # We can overload the result
-    if delimiter is not None:
-        dialect.delimiter = delimiter
-    if quotechar is not None:
-        dialect.quotechar = quotechar
-    if lineterminator is not None:
-        dialect.lineterminator = lineterminator
-    # Make the rows
-    reader = csv.reader(data, dialect)
-    table = Table(name, style=style)
-    for line in reader:
-        row = Row()
-        # rstrip line
-        while line and not line[-1].strip():
-            line.pop()
-        for value in line:
-            cell = Cell(_get_python_value(value, encoding))
-            row.append_cell(cell, clone=False)
-        table.append_row(row, clone=False)
-    return table
-
-
-# register_element_class(CellCovered)
-register_element_class(Column)
-register_element_class(RowGroup)
-register_element_class(Table)
-register_element_class(NamedRange)
-
-
-
-
-
-
-
-

Functions

-
-
-def forbidden_in_named_range() -
-
-
-
- -Expand source code - -
@cache
-def forbidden_in_named_range():
-    return {
-        char
-        for char in string.printable
-        if char not in string.ascii_letters
-        and char not in string.digits
-        and char != "_"
-    }
-
-
-
-def import_from_csv(path_or_file: str | Path | object, name: str, style: str | None = None, delimiter: str | None = None, quotechar: str | None = None, lineterminator: str | None = None, encoding: str = 'utf-8') ‑> Table -
-
-

Convert the CSV file to an Table. If the file is a string, it is -opened as a local path. Else a open file-like is expected; it will not be -closed afterwards.

-

CSV format can be autodetected to a certain limit, but encoding is -important.

-

Arguments

-

path_or_file – str or file-like

-

name – str

-

style – str

-

delimiter – str

-

quotechar – str

-

lineterminator – str

-

encoding – str

-
- -Expand source code - -
def import_from_csv(
-    path_or_file: str | Path | object,
-    name: str,
-    style: str | None = None,
-    delimiter: str | None = None,
-    quotechar: str | None = None,
-    lineterminator: str | None = None,
-    encoding: str = "utf-8",
-) -> Table:
-    """Convert the CSV file to an Table. If the file is a string, it is
-    opened as a local path. Else a open file-like is expected; it will not be
-    closed afterwards.
-
-    CSV format can be autodetected to a certain limit, but encoding is
-    important.
-
-    Arguments:
-
-      path_or_file -- str or file-like
-
-      name -- str
-
-      style -- str
-
-      delimiter -- str
-
-      quotechar -- str
-
-      lineterminator -- str
-
-      encoding -- str
-    """
-
-    # Load the data
-    # XXX Load the entire file in memory
-    # Alternative: a file-wrapper returning the sample then the rest
-    if isinstance(path_or_file, (str, Path)):
-        Path(path_or_file)
-        content_b = Path(path_or_file).read_bytes()
-    else:
-        # Leave the file we were given open
-        content_b = path_or_file.read()  # type: ignore
-    if isinstance(content_b, bytes):
-        content = content_b.decode()
-    else:
-        content = content_b
-    data = content.splitlines(True)
-    # Sniff the dialect
-    sample = "".join(data[:100])
-    dialect = csv.Sniffer().sniff(sample)
-    # We can overload the result
-    if delimiter is not None:
-        dialect.delimiter = delimiter
-    if quotechar is not None:
-        dialect.quotechar = quotechar
-    if lineterminator is not None:
-        dialect.lineterminator = lineterminator
-    # Make the rows
-    reader = csv.reader(data, dialect)
-    table = Table(name, style=style)
-    for line in reader:
-        row = Row()
-        # rstrip line
-        while line and not line[-1].strip():
-            line.pop()
-        for value in line:
-            cell = Cell(_get_python_value(value, encoding))
-            row.append_cell(cell, clone=False)
-        table.append_row(row, clone=False)
-    return table
-
-
-
-
-
-

Classes

-
-
-class Column -(default_cell_style: str | None = None, repeated: int | None = None, style: str | None = None, **kwargs: Any) -
-
-

ODF table column "table:table-column"

-

Create a column group element of the optionally given style. Cell -style can be set for the whole column. If the properties apply to -several columns, give the number of repeated columns.

-

Columns don't contain cells, just style information.

-

You don't generally have to create columns by hand, use the Table API.

-

Arguments

-

default_cell_style – str

-

repeated – int

-

style – str

-
- -Expand source code - -
class Column(Element):
-    """ODF table column "table:table-column" """
-
-    _tag = "table:table-column"
-    _caching = True
-
-    def __init__(
-        self,
-        default_cell_style: str | None = None,
-        repeated: int | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a column group element of the optionally given style. Cell
-        style can be set for the whole column. If the properties apply to
-        several columns, give the number of repeated columns.
-
-        Columns don't contain cells, just style information.
-
-        You don't generally have to create columns by hand, use the Table API.
-
-        Arguments:
-
-            default_cell_style -- str
-
-            repeated -- int
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        self.x = None
-        if self._do_init:
-            if default_cell_style:
-                self.set_default_cell_style(default_cell_style)
-            if repeated and repeated > 1:
-                self.repeated = repeated
-            if style:
-                self.style = style
-
-    @property
-    def clone(self) -> Column:
-        clone = Element.clone.fget(self)  # type: ignore
-        clone.x = self.x
-        if hasattr(self, "_tmap"):
-            if hasattr(self, "_rmap"):
-                clone._rmap = self._rmap[:]
-            clone._tmap = self._tmap[:]
-            clone._cmap = self._cmap[:]
-        return clone
-
-    def get_default_cell_style(self) -> str | None:
-        return self.get_attribute_string("table:default-cell-style-name")
-
-    def set_default_cell_style(self, style: Element | str) -> None:
-        self.set_style_attribute("table:default-cell-style-name", style)
-
-    def _set_repeated(self, repeated: int | None) -> None:
-        """Internal only. Set the number of times the column is repeated, or
-        None to delete it. Without changing cache.
-
-        Arguments:
-
-            repeated -- int or None
-        """
-        if repeated is None or repeated < 2:
-            with contextlib.suppress(KeyError):
-                self.del_attribute("table:number-columns-repeated")
-            return
-        self.set_attribute("table:number-columns-repeated", str(repeated))
-
-    @property
-    def repeated(self) -> int | None:
-        """Get /set the number of times the column is repeated.
-
-        Always None when using the table API.
-
-        Return: int or None
-        """
-        repeated = self.get_attribute("table:number-columns-repeated")
-        if repeated is None:
-            return None
-        return int(repeated)
-
-    @repeated.setter
-    def repeated(self, repeated: int | None) -> None:
-        self._set_repeated(repeated)
-        # update cache
-        current: Element = self
-        while True:
-            # look for Table, parent may be group of rows
-            upper = current.parent
-            if not upper:
-                # lonely column
-                return
-            # parent may be group of rows, not table
-            if isinstance(upper, Table):
-                break
-            current = upper
-        # fixme : need to optimize this
-        if isinstance(upper, Table):
-            upper._compute_table_cache()
-            if hasattr(self, "_cmap"):
-                del self._cmap[:]
-                self._cmap.extend(upper._cmap)
-            else:
-                self._cmap = upper._cmap
-
-    @property
-    def style(self) -> str | None:
-        """Get /set the style of the column itself.
-
-        Return: str
-        """
-        return self.get_attribute_string("table:style-name")
-
-    @style.setter
-    def style(self, style: str | Element) -> None:
-        self.set_style_attribute("table:style-name", style)
-
-

Ancestors

- -

Instance variables

-
-
var cloneColumn
-
-
-
- -Expand source code - -
@property
-def clone(self) -> Column:
-    clone = Element.clone.fget(self)  # type: ignore
-    clone.x = self.x
-    if hasattr(self, "_tmap"):
-        if hasattr(self, "_rmap"):
-            clone._rmap = self._rmap[:]
-        clone._tmap = self._tmap[:]
-        clone._cmap = self._cmap[:]
-    return clone
-
-
-
var repeated : int | None
-
-

Get /set the number of times the column is repeated.

-

Always None when using the table API.

-

Return: int or None

-
- -Expand source code - -
@property
-def repeated(self) -> int | None:
-    """Get /set the number of times the column is repeated.
-
-    Always None when using the table API.
-
-    Return: int or None
-    """
-    repeated = self.get_attribute("table:number-columns-repeated")
-    if repeated is None:
-        return None
-    return int(repeated)
-
-
-
var style : str | None
-
-

Get /set the style of the column itself.

-

Return: str

-
- -Expand source code - -
@property
-def style(self) -> str | None:
-    """Get /set the style of the column itself.
-
-    Return: str
-    """
-    return self.get_attribute_string("table:style-name")
-
-
-
-

Methods

-
-
-def get_default_cell_style(self) ‑> str | None -
-
-
-
- -Expand source code - -
def get_default_cell_style(self) -> str | None:
-    return self.get_attribute_string("table:default-cell-style-name")
-
-
-
-def set_default_cell_style(self, style: Element | str) ‑> None -
-
-
-
- -Expand source code - -
def set_default_cell_style(self, style: Element | str) -> None:
-    self.set_style_attribute("table:default-cell-style-name", style)
-
-
-
-

Inherited members

- -
-
-class NamedRange -(name: str | None = None, crange: str | tuple | list | None = None, table_name: str | None = None, usage: str | None = None, **kwargs: Any) -
-
-

ODF Named Range "table:named-range". Identifies inside the spreadsheet -a range of cells of a table by a name and the name of the table.

-

Name Ranges have the following attributes:

-
name -- name of the named range
-
-table_name -- name of the table
-
-start -- first cell of the named range, tuple (x, y)
-
-end -- last cell of the named range, tuple (x, y)
-
-crange -- range of the named range, tuple (x, y, z, t)
-
-usage -- None or str, usage of the named range.
-
-

Create a Named Range element. 'name' must contains only letters, digits -and '_', and must not be like a coordinate as 'A1'. 'table_name' must be -a correct table name (no "'" or "/" in it).

-

Arguments

-

name – str, name of the named range

-

crange – str or tuple of int, cell or area coordinate

-

table_name – str, name of the table

-

usage – None or 'print-range', 'filter', 'repeat-column', 'repeat-row'

-
- -Expand source code - -
class NamedRange(Element):
-    """ODF Named Range "table:named-range". Identifies inside the spreadsheet
-    a range of cells of a table by a name and the name of the table.
-
-    Name Ranges have the following attributes:
-
-        name -- name of the named range
-
-        table_name -- name of the table
-
-        start -- first cell of the named range, tuple (x, y)
-
-        end -- last cell of the named range, tuple (x, y)
-
-        crange -- range of the named range, tuple (x, y, z, t)
-
-        usage -- None or str, usage of the named range.
-    """
-
-    _tag = "table:named-range"
-
-    def __init__(
-        self,
-        name: str | None = None,
-        crange: str | tuple | list | None = None,
-        table_name: str | None = None,
-        usage: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a Named Range element. 'name' must contains only letters, digits
-           and '_', and must not be like a coordinate as 'A1'. 'table_name' must be
-           a correct table name (no "'" or "/" in it).
-
-        Arguments:
-
-             name -- str, name of the named range
-
-             crange -- str or tuple of int, cell or area coordinate
-
-             table_name -- str, name of the table
-
-             usage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
-        """
-        super().__init__(**kwargs)
-        self.usage = None
-        if self._do_init:
-            self.name = name or ""
-            self.table_name = _table_name_check(table_name)
-            self.set_range(crange or "")
-            self.set_usage(usage)
-        cell_range_address = self.get_attribute_string("table:cell-range-address") or ""
-        if not cell_range_address:
-            self.table_name = ""
-            self.start = None
-            self.end = None
-            self.crange = None
-            self.usage = None
-            return
-        self.usage = self.get_attribute("table:range-usable-as")
-        name_range = cell_range_address.replace("$", "")
-        name, crange = name_range.split(".", 1)
-        if name.startswith("'") and name.endswith("'"):
-            name = name[1:-1]
-        self.table_name = name
-        crange = crange.replace(".", "")
-        self._set_range(crange)
-
-    def set_usage(self, usage: str | None = None) -> None:
-        """Set the usage of the Named Range. Usage can be None (default) or one
-        of :
-            'print-range'
-            'filter'
-            'repeat-column'
-            'repeat-row'
-
-        Arguments:
-
-            usage -- None or str
-        """
-        if usage is not None:
-            usage = usage.strip().lower()
-            if usage not in ("print-range", "filter", "repeat-column", "repeat-row"):
-                usage = None
-        if usage is None:
-            with contextlib.suppress(KeyError):
-                self.del_attribute("table:range-usable-as")
-            self.usage = None
-        else:
-            self.set_attribute("table:range-usable-as", usage)
-            self.usage = usage
-
-    @property
-    def name(self) -> str | None:
-        """Get / set the name of the table."""
-        return self.get_attribute_string("table:name")
-
-    @name.setter
-    def name(self, name: str) -> None:
-        """Set the name of the Named Range. The name is mandatory, if a Named
-        Range of the same name exists, it will be replaced. Name must contains
-        only alphanumerics characters and '_', and can not be of a cell
-        coordinates form like 'AB12'.
-
-        Arguments:
-
-            name -- str
-        """
-        name = name.strip()
-        if not name:
-            raise ValueError("Name required.")
-        for x in name:
-            if x in forbidden_in_named_range():
-                raise ValueError(f"Character forbidden '{x}' ")
-        step = ""
-        for x in name:
-            if x in string.ascii_letters and step in ("", "A"):
-                step = "A"
-                continue
-            elif step in ("A", "A1") and x in string.digits:
-                step = "A1"
-                continue
-            else:
-                step = ""
-                break
-        if step == "A1":
-            raise ValueError("Name of the type 'ABC123' is not allowed.")
-        with contextlib.suppress(Exception):
-            # we are not on an inserted in a document.
-            body = self.document_body
-            named_range = body.get_named_range(name)  # type: ignore
-            if named_range:
-                named_range.delete()
-        self.set_attribute("table:name", name)
-
-    def set_table_name(self, name: str) -> None:
-        """Set the name of the table of the Named Range. The name is mandatory.
-
-        Arguments:
-
-            name -- str
-        """
-        self.table_name = _table_name_check(name)
-        self._update_attributes()
-
-    def _set_range(self, coord: tuple | list | str) -> None:
-        digits = convert_coordinates(coord)
-        if len(digits) == 4:
-            x, y, z, t = digits
-        else:
-            x, y = digits
-            z, t = digits
-        self.start = x, y  # type: ignore
-        self.end = z, t  # type: ignore
-        self.crange = x, y, z, t  # type: ignore
-
-    def set_range(self, crange: str | tuple | list) -> None:
-        """Set the range of the named range. Range can be either one cell
-        (like 'A1') or an area ('A1:B2'). It can be provided as an alpha numeric
-        value like "A1:B2' or a tuple like (0, 0, 1, 1) or (0, 0).
-
-        Arguments:
-
-            crange -- str or tuple of int, cell or area coordinate
-        """
-        self._set_range(crange)
-        self._update_attributes()
-
-    def _update_attributes(self) -> None:
-        self.set_attribute("table:base-cell-address", self._make_base_cell_address())
-        self.set_attribute("table:cell-range-address", self._make_cell_range_address())
-
-    def _make_base_cell_address(self) -> str:
-        # assuming we got table_name and range
-        if " " in self.table_name:
-            name = f"'{self.table_name}'"
-        else:
-            name = self.table_name
-        return f"${name}.${digit_to_alpha(self.start[0])}${self.start[1] + 1}"  # type: ignore
-
-    def _make_cell_range_address(self) -> str:
-        # assuming we got table_name and range
-        if " " in self.table_name:
-            name = f"'{self.table_name}'"
-        else:
-            name = self.table_name
-        if self.start == self.end:
-            return self._make_base_cell_address()
-        return (
-            f"${name}.${digit_to_alpha(self.start[0])}${self.start[1] + 1}:"  # type: ignore
-            f".${digit_to_alpha(self.end[0])}${self.end[1] + 1}"  # type: ignore
-        )
-
-    def get_values(
-        self,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-        flat: bool = False,
-    ) -> list:
-        """Shortcut to retrieve the values of the cells of the named range. See
-        table.get_values() for the arguments description and return format.
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        table = body.get_table(name=self.table_name)
-        if table is None:
-            raise ValueError
-        return table.get_values(self.crange, cell_type, complete, get_type, flat)  # type: ignore
-
-    def get_value(self, get_type: bool = False) -> Any:
-        """Shortcut to retrieve the value of the first cell of the named range.
-        See table.get_value() for the arguments description and return format.
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        table = body.get_table(name=self.table_name)
-        if table is None:
-            raise ValueError
-        return table.get_value(self.start, get_type)  # type: ignore
-
-    def set_values(
-        self,
-        values: list,
-        style: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-    ) -> None:
-        """Shortcut to set the values of the cells of the named range.
-        See table.set_values() for the arguments description.
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        table = body.get_table(name=self.table_name)
-        if table is None:
-            raise ValueError
-        table.set_values(  # type: ignore
-            values,
-            coord=self.crange,
-            style=style,
-            cell_type=cell_type,
-            currency=currency,
-        )
-
-    def set_value(
-        self,
-        value: Any,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        style: str | None = None,
-    ) -> None:
-        """Shortcut to set the value of the first cell of the named range.
-        See table.set_value() for the arguments description.
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        table = body.get_table(name=self.table_name)
-        if table is None:
-            raise ValueError
-        table.set_value(  # type: ignore
-            coord=self.start,
-            value=value,
-            cell_type=cell_type,
-            currency=currency,
-            style=style,
-        )
-
-

Ancestors

- -

Instance variables

-
-
var name : str | None
-
-

Get / set the name of the table.

-
- -Expand source code - -
@property
-def name(self) -> str | None:
-    """Get / set the name of the table."""
-    return self.get_attribute_string("table:name")
-
-
-
-

Methods

-
-
-def get_value(self, get_type: bool = False) ‑> Any -
-
-

Shortcut to retrieve the value of the first cell of the named range. -See table.get_value() for the arguments description and return format.

-
- -Expand source code - -
def get_value(self, get_type: bool = False) -> Any:
-    """Shortcut to retrieve the value of the first cell of the named range.
-    See table.get_value() for the arguments description and return format.
-    """
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document.")
-    table = body.get_table(name=self.table_name)
-    if table is None:
-        raise ValueError
-    return table.get_value(self.start, get_type)  # type: ignore
-
-
-
-def get_values(self, cell_type: str | None = None, complete: bool = True, get_type: bool = False, flat: bool = False) ‑> list -
-
-

Shortcut to retrieve the values of the cells of the named range. See -table.get_values() for the arguments description and return format.

-
- -Expand source code - -
def get_values(
-    self,
-    cell_type: str | None = None,
-    complete: bool = True,
-    get_type: bool = False,
-    flat: bool = False,
-) -> list:
-    """Shortcut to retrieve the values of the cells of the named range. See
-    table.get_values() for the arguments description and return format.
-    """
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document.")
-    table = body.get_table(name=self.table_name)
-    if table is None:
-        raise ValueError
-    return table.get_values(self.crange, cell_type, complete, get_type, flat)  # type: ignore
-
-
-
-def set_range(self, crange: str | tuple | list) ‑> None -
-
-

Set the range of the named range. Range can be either one cell -(like 'A1') or an area ('A1:B2'). It can be provided as an alpha numeric -value like "A1:B2' or a tuple like (0, 0, 1, 1) or (0, 0).

-

Arguments

-

crange – str or tuple of int, cell or area coordinate

-
- -Expand source code - -
def set_range(self, crange: str | tuple | list) -> None:
-    """Set the range of the named range. Range can be either one cell
-    (like 'A1') or an area ('A1:B2'). It can be provided as an alpha numeric
-    value like "A1:B2' or a tuple like (0, 0, 1, 1) or (0, 0).
-
-    Arguments:
-
-        crange -- str or tuple of int, cell or area coordinate
-    """
-    self._set_range(crange)
-    self._update_attributes()
-
-
-
-def set_table_name(self, name: str) ‑> None -
-
-

Set the name of the table of the Named Range. The name is mandatory.

-

Arguments

-

name – str

-
- -Expand source code - -
def set_table_name(self, name: str) -> None:
-    """Set the name of the table of the Named Range. The name is mandatory.
-
-    Arguments:
-
-        name -- str
-    """
-    self.table_name = _table_name_check(name)
-    self._update_attributes()
-
-
-
-def set_usage(self, usage: str | None = None) ‑> None -
-
-

Set the usage of the Named Range. Usage can be None (default) or one -of : -'print-range' -'filter' -'repeat-column' -'repeat-row'

-

Arguments

-

usage – None or str

-
- -Expand source code - -
def set_usage(self, usage: str | None = None) -> None:
-    """Set the usage of the Named Range. Usage can be None (default) or one
-    of :
-        'print-range'
-        'filter'
-        'repeat-column'
-        'repeat-row'
-
-    Arguments:
-
-        usage -- None or str
-    """
-    if usage is not None:
-        usage = usage.strip().lower()
-        if usage not in ("print-range", "filter", "repeat-column", "repeat-row"):
-            usage = None
-    if usage is None:
-        with contextlib.suppress(KeyError):
-            self.del_attribute("table:range-usable-as")
-        self.usage = None
-    else:
-        self.set_attribute("table:range-usable-as", usage)
-        self.usage = usage
-
-
-
-def set_value(self, value: Any, cell_type: str | None = None, currency: str | None = None, style: str | None = None) ‑> None -
-
-

Shortcut to set the value of the first cell of the named range. -See table.set_value() for the arguments description.

-
- -Expand source code - -
def set_value(
-    self,
-    value: Any,
-    cell_type: str | None = None,
-    currency: str | None = None,
-    style: str | None = None,
-) -> None:
-    """Shortcut to set the value of the first cell of the named range.
-    See table.set_value() for the arguments description.
-    """
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document.")
-    table = body.get_table(name=self.table_name)
-    if table is None:
-        raise ValueError
-    table.set_value(  # type: ignore
-        coord=self.start,
-        value=value,
-        cell_type=cell_type,
-        currency=currency,
-        style=style,
-    )
-
-
-
-def set_values(self, values: list, style: str | None = None, cell_type: str | None = None, currency: str | None = None) ‑> None -
-
-

Shortcut to set the values of the cells of the named range. -See table.set_values() for the arguments description.

-
- -Expand source code - -
def set_values(
-    self,
-    values: list,
-    style: str | None = None,
-    cell_type: str | None = None,
-    currency: str | None = None,
-) -> None:
-    """Shortcut to set the values of the cells of the named range.
-    See table.set_values() for the arguments description.
-    """
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document.")
-    table = body.get_table(name=self.table_name)
-    if table is None:
-        raise ValueError
-    table.set_values(  # type: ignore
-        values,
-        coord=self.crange,
-        style=style,
-        cell_type=cell_type,
-        currency=currency,
-    )
-
-
-
-

Inherited members

- -
-
-class RowGroup -(height: int | None = None, width: int | None = None, **kwargs: Any) -
-
-

"table:table-row-group" group rows with common properties.

-

Create a group of rows, optionnaly filled with "height" number of -rows, of "width" cells each.

-

Row group bear style information applied to a series of rows.

-

Arguments

-

height – int

-

width – int

-
- -Expand source code - -
class RowGroup(Element):
-    """ "table:table-row-group" group rows with common properties."""
-
-    # TODO
-    _tag = "table:table-row-group"
-    _caching = True
-
-    def __init__(
-        self,
-        height: int | None = None,
-        width: int | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a group of rows, optionnaly filled with "height" number of
-        rows, of "width" cells each.
-
-        Row group bear style information applied to a series of rows.
-
-        Arguments:
-
-            height -- int
-
-            width -- int
-        """
-        super().__init__(**kwargs)
-        if self._do_init and height is not None:
-            for _i in range(height):
-                row = Row(width=width)
-                self.append(row)
-
-

Ancestors

- -

Inherited members

- -
-
-class Table -(name: str | None = None, width: int | None = None, height: int | None = None, protected: bool = False, protection_key: str | None = None, display: bool = True, printable: bool = True, print_ranges: list[str] | None = None, style: str | None = None, **kwargs: Any) -
-
-

ODF table "table:table"

-

Create a table element, optionally prefilled with "height" rows of -"width" cells each.

-

If the table is to be protected, a protection key must be provided, -i.e. a hash value of the password.

-

If the table must not be displayed, set "display" to False.

-

If the table must not be printed, set "printable" to False. The table -will not be printed when it is not displayed, whatever the value of -this argument.

-

Ranges of cells to print can be provided as a list of cell ranges, -e.g. ['E6:K12', 'P6:R12'] or directly as a raw string, e.g. -"E6:K12 P6:R12".

-

You can access and modify the XML tree manually, but you probably want -to use the API to access and alter cells. It will save you from -handling repetitions and the same number of cells for each row.

-

If you use both the table API and the XML API, you are on your own for -ensuiring model integrity.

-

Arguments

-

name – str

-

width – int

-

height – int

-

protected – bool

-

protection_key – str

-

display – bool

-

printable – bool

-

print_ranges – list

-

style – str

-
- -Expand source code - -
class Table(Element):
-    """ODF table "table:table" """
-
-    _tag = "table:table"
-    _caching = True
-    _append = Element.append
-
-    def __init__(
-        self,
-        name: str | None = None,
-        width: int | None = None,
-        height: int | None = None,
-        protected: bool = False,
-        protection_key: str | None = None,
-        display: bool = True,
-        printable: bool = True,
-        print_ranges: list[str] | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """Create a table element, optionally prefilled with "height" rows of
-        "width" cells each.
-
-        If the table is to be protected, a protection key must be provided,
-        i.e. a hash value of the password.
-
-        If the table must not be displayed, set "display" to False.
-
-        If the table must not be printed, set "printable" to False. The table
-        will not be printed when it is not displayed, whatever the value of
-        this argument.
-
-        Ranges of cells to print can be provided as a list of cell ranges,
-        e.g. ['E6:K12', 'P6:R12'] or directly as a raw string, e.g.
-        "E6:K12 P6:R12".
-
-        You can access and modify the XML tree manually, but you probably want
-        to use the API to access and alter cells. It will save you from
-        handling repetitions and the same number of cells for each row.
-
-        If you use both the table API and the XML API, you are on your own for
-        ensuiring model integrity.
-
-        Arguments:
-
-            name -- str
-
-            width -- int
-
-            height -- int
-
-            protected -- bool
-
-            protection_key -- str
-
-            display -- bool
-
-            printable -- bool
-
-            print_ranges -- list
-
-            style -- str
-        """
-        super().__init__(**kwargs)
-        self._indexes = {}
-        self._indexes["_cmap"] = {}
-        self._indexes["_tmap"] = {}
-        if self._do_init:
-            self.name = name
-            if protected:
-                self.protected = protected
-                self.set_protection_key = protection_key
-            if not display:
-                self.displayed = display
-            if not printable:
-                self.printable = printable
-            if print_ranges:
-                self.print_ranges = print_ranges
-            if style:
-                self.style = style
-            # Prefill the table
-            if width is not None or height is not None:
-                width = width or 1
-                height = height or 1
-                # Column groups for style information
-                columns = Column(repeated=width)
-                self._append(columns)
-                for _i in range(height):
-                    row = Row(width)
-                    self._append(row)
-        self._compute_table_cache()
-
-    def __str__(self) -> str:
-        def write_content(csv_writer: object) -> None:
-            for values in self.iter_values():
-                line = []
-                for value in values:
-                    if value is None:
-                        value = ""
-                    if isinstance(value, str):
-                        value = value.strip()
-                    line.append(value)
-                csv_writer.writerow(line)  # type: ignore
-
-        out = StringIO(newline=os.linesep)
-        csv_writer = csv.writer(
-            out,
-            delimiter=" ",
-            doublequote=False,
-            escapechar="\\",
-            lineterminator=os.linesep,
-            quotechar='"',
-            quoting=csv.QUOTE_NONNUMERIC,
-        )
-        write_content(csv_writer)
-        return out.getvalue()
-
-    def _translate_y_from_any(self, y: str | int) -> int:
-        # "3" (couting from 1) -> 2 (couting from 0)
-        return translate_from_any(y, self.height, 1)
-
-    def _translate_table_coordinates_list(
-        self,
-        coord: tuple | list,
-    ) -> tuple[int | None, ...]:
-        height = self.height
-        width = self.width
-        # assuming we got int values
-        if len(coord) == 1:
-            # It is a row
-            y = coord[0]
-            if y and y < 0:
-                y = increment(y, height)
-            return (None, y, None, y)
-        if len(coord) == 2:
-            # It is a row range, not a cell, because context is table
-            y = coord[0]
-            if y and y < 0:
-                y = increment(y, height)
-            t = coord[1]
-            if t and t < 0:
-                t = increment(t, height)
-            return (None, y, None, t)
-        # should be 4 int
-        x, y, z, t = coord
-        if x and x < 0:
-            x = increment(x, width)
-        if y and y < 0:
-            y = increment(y, height)
-        if z and z < 0:
-            z = increment(z, width)
-        if t and t < 0:
-            t = increment(t, height)
-        return (x, y, z, t)
-
-    def _translate_table_coordinates_str(
-        self,
-        coord_str: str,
-    ) -> tuple[int | None, ...]:
-        height = self.height
-        width = self.width
-        coord = convert_coordinates(coord_str)
-        if len(coord) == 2:
-            x, y = coord
-            if x and x < 0:
-                x = increment(x, width)
-            if y and y < 0:
-                y = increment(y, height)
-            # extent to an area :
-            return (x, y, x, y)
-        x, y, z, t = coord
-        if x and x < 0:
-            x = increment(x, width)
-        if y and y < 0:
-            y = increment(y, height)
-        if z and z < 0:
-            z = increment(z, width)
-        if t and t < 0:
-            t = increment(t, height)
-        return (x, y, z, t)
-
-    def _translate_table_coordinates(
-        self,
-        coord: tuple | list | str,
-    ) -> tuple[int | None, ...]:
-        if isinstance(coord, str):
-            return self._translate_table_coordinates_str(coord)
-        return self._translate_table_coordinates_list(coord)
-
-    def _translate_column_coordinates_str(
-        self,
-        coord_str: str,
-    ) -> tuple[int | None, ...]:
-        width = self.width
-        height = self.height
-        coord = convert_coordinates(coord_str)
-        if len(coord) == 2:
-            x, y = coord
-            if x and x < 0:
-                x = increment(x, width)
-            if y and y < 0:
-                y = increment(y, height)
-            # extent to an area :
-            return (x, y, x, y)
-        x, y, z, t = coord
-        if x and x < 0:
-            x = increment(x, width)
-        if y and y < 0:
-            y = increment(y, height)
-        if z and z < 0:
-            z = increment(z, width)
-        if t and t < 0:
-            t = increment(t, height)
-        return (x, y, z, t)
-
-    def _translate_column_coordinates_list(
-        self,
-        coord: tuple | list,
-    ) -> tuple[int | None, ...]:
-        width = self.width
-        height = self.height
-        # assuming we got int values
-        if len(coord) == 1:
-            # It is a column
-            x = coord[0]
-            if x and x < 0:
-                x = increment(x, width)
-            return (x, None, x, None)
-        if len(coord) == 2:
-            # It is a column range, not a cell, because context is table
-            x = coord[0]
-            if x and x < 0:
-                x = increment(x, width)
-            z = coord[1]
-            if z and z < 0:
-                z = increment(z, width)
-            return (x, None, z, None)
-        # should be 4 int
-        x, y, z, t = coord
-        if x and x < 0:
-            x = increment(x, width)
-        if y and y < 0:
-            y = increment(y, height)
-        if z and z < 0:
-            z = increment(z, width)
-        if t and t < 0:
-            t = increment(t, height)
-        return (x, y, z, t)
-
-    def _translate_column_coordinates(
-        self,
-        coord: tuple | list | str,
-    ) -> tuple[int | None, ...]:
-        if isinstance(coord, str):
-            return self._translate_column_coordinates_str(coord)
-        return self._translate_column_coordinates_list(coord)
-
-    def _translate_cell_coordinates(
-        self,
-        coord: tuple | list | str,
-    ) -> tuple[int | None, int | None]:
-        # we want an x,y result
-        coord = convert_coordinates(coord)
-        if len(coord) == 2:
-            x, y = coord
-        # If we got an area, take the first cell
-        elif len(coord) == 4:
-            x, y, z, t = coord
-        else:
-            raise ValueError(str(coord))
-        if x and x < 0:
-            x = increment(x, self.width)
-        if y and y < 0:
-            y = increment(y, self.height)
-        return (x, y)
-
-    def _compute_table_cache(self) -> None:
-        idx_repeated_seq = self.elements_repeated_sequence(
-            _xpath_row, "table:number-rows-repeated"
-        )
-        self._tmap = make_cache_map(idx_repeated_seq)
-        idx_repeated_seq = self.elements_repeated_sequence(
-            _xpath_column, "table:number-columns-repeated"
-        )
-        self._cmap = make_cache_map(idx_repeated_seq)
-
-    def _update_width(self, row: Row) -> None:
-        """Synchronize the number of columns if the row is bigger.
-
-        Append, don't insert, not to disturb the current layout.
-        """
-        diff = row.width - self.width
-        if diff > 0:
-            self.append_column(Column(repeated=diff))
-
-    def _get_formatted_text_normal(self, context: dict | None) -> str:
-        result = []
-        for row in self.traverse():
-            for cell in row.traverse():
-                value = cell.get_value(try_get_text=False)
-                # None ?
-                if value is None:
-                    # Try with get_formatted_text on the elements
-                    value = []
-                    for element in cell.children:
-                        value.append(element.get_formatted_text(context))
-                    value = "".join(value)
-                else:
-                    value = str(value)
-                result.append(value)
-                result.append("\n")
-            result.append("\n")
-        return "".join(result)
-
-    def _get_formatted_text_rst(self, context: dict) -> str:  # noqa: C901
-        context["no_img_level"] += 1
-        # Strip the table => We must clone
-        table = self.clone
-        table.rstrip(aggressive=True)  # type: ignore
-
-        # Fill the rows
-        rows = []
-        cols_nb = 0
-        cols_size: dict[int, int] = {}
-        for odf_row in table.traverse():  # type: ignore
-            row = []
-            for i, cell in enumerate(odf_row.traverse()):
-                value = cell.get_value(try_get_text=False)
-                # None ?
-                if value is None:
-                    # Try with get_formatted_text on the elements
-                    value = []
-                    for element in cell.children:
-                        value.append(element.get_formatted_text(context))
-                    value = "".join(value)
-                else:
-                    value = str(value)
-                value = value.strip()
-                # Strip the empty columns
-                if value:
-                    cols_nb = max(cols_nb, i + 1)
-                # Compute the size of each columns (at least 2)
-                cols_size[i] = max(cols_size.get(i, 2), len(value))
-                # Append
-                row.append(value)
-            rows.append(row)
-
-        # Nothing ?
-        if cols_nb == 0:
-            return ""
-
-        # Prevent a crash with empty columns (by example with images)
-        for col, size in cols_size.items():
-            if size == 0:
-                cols_size[col] = 1
-
-        # Update cols_size
-        LINE_MAX = 100
-        COL_MIN = 16
-
-        free_size = LINE_MAX - (cols_nb - 1) * 3 - 4
-        real_size = sum([cols_size[i] for i in range(cols_nb)])
-        if real_size > free_size:
-            factor = float(free_size) / real_size
-
-            for i in range(cols_nb):
-                old_size = cols_size[i]
-
-                # The cell is already small
-                if old_size <= COL_MIN:
-                    continue
-
-                new_size = int(factor * old_size)
-
-                if new_size < COL_MIN:
-                    new_size = COL_MIN
-                cols_size[i] = new_size
-
-        # Convert !
-        result: list[str] = [""]
-        # Construct the first/last line
-        line: list[str] = []
-        for i in range(cols_nb):
-            line.append("=" * cols_size[i])
-            line.append(" ")
-        line_str = "".join(line)
-
-        # Add the lines
-        result.append(line_str)
-        for row in rows:
-            # Wrap the row
-            wrapped_row = []
-            for i, value in enumerate(row[:cols_nb]):
-                wrapped_value = []
-                for part in value.split("\n"):
-                    # Hack to handle correctly the lists or the directives
-                    subsequent_indent = ""
-                    part_lstripped = part.lstrip()
-                    if part_lstripped.startswith("-") or part_lstripped.startswith(
-                        ".."
-                    ):
-                        subsequent_indent = " " * (len(part) - len(part.lstrip()) + 2)
-                    wrapped_part = wrap(
-                        part, width=cols_size[i], subsequent_indent=subsequent_indent
-                    )
-                    if wrapped_part:
-                        wrapped_value.extend(wrapped_part)
-                    else:
-                        wrapped_value.append("")
-                wrapped_row.append(wrapped_value)
-
-            # Append!
-            for j in range(max([1] + [len(values) for values in wrapped_row])):
-                txt_row: list[str] = []
-                for i in range(cols_nb):
-                    values = wrapped_row[i] if i < len(wrapped_row) else []
-
-                    # An empty cell ?
-                    if len(values) - 1 < j or not values[j]:
-                        if i == 0 and j == 0:
-                            txt_row.append("..")
-                            txt_row.append(" " * (cols_size[i] - 1))
-                        else:
-                            txt_row.append(" " * (cols_size[i] + 1))
-                        continue
-
-                    # Not empty
-                    value = values[j]
-                    txt_row.append(value)
-                    txt_row.append(" " * (cols_size[i] - len(value) + 1))
-                result.append("".join(txt_row))
-
-        result.append(line_str)
-        result.append("")
-        result.append("")
-        result_str = "\n".join(result)
-
-        context["no_img_level"] -= 1
-        return result_str
-
-    def _translate_x_from_any(self, x: str | int) -> int:
-        return translate_from_any(x, self.width, 0)
-
-    #
-    # Public API
-    #
-
-    def append(self, something: Element | str) -> None:
-        """Dispatch .append() call to append_row() or append_column()."""
-        if isinstance(something, Row):
-            self.append_row(something)
-        elif isinstance(something, Column):
-            self.append_column(something)
-        else:
-            # probably still an error
-            self._append(something)
-
-    @property
-    def height(self) -> int:
-        """Get the current height of the table.
-
-        Return: int
-        """
-        try:
-            height = self._tmap[-1] + 1
-        except Exception:
-            height = 0
-        return height
-
-    @property
-    def width(self) -> int:
-        """Get the current width of the table, measured on columns.
-
-        Rows may have different widths, use the Table API to ensure width
-        consistency.
-
-        Return: int
-        """
-        # Columns are our reference for user expected width
-
-        try:
-            width = self._cmap[-1] + 1
-        except Exception:
-            width = 0
-
-        # columns = self._get_columns()
-        # repeated = self.xpath(
-        #        'table:table-column/@table:number-columns-repeated')
-        # unrepeated = len(columns) - len(repeated)
-        # ws = sum(int(r) for r in repeated) + unrepeated
-        # if w != ws:
-        #    print "WARNING   ws", ws, "w", w
-
-        return width
-
-    @property
-    def size(self) -> tuple[int, int]:
-        """Shortcut to get the current width and height of the table.
-
-        Return: (int, int)
-        """
-        return self.width, self.height
-
-    @property
-    def name(self) -> str | None:
-        """Get / set the name of the table."""
-        return self.get_attribute_string("table:name")
-
-    @name.setter
-    def name(self, name: str) -> None:
-        name = _table_name_check(name)
-        # first, update named ranges
-        # fixme : delete name ranges when deleting table, too.
-        for named_range in self.get_named_ranges(table_name=self.name):
-            named_range.set_table_name(name)
-        self.set_attribute("table:name", name)
-
-    @property
-    def protected(self) -> bool:
-        return bool(self.get_attribute("table:protected"))
-
-    @protected.setter
-    def protected(self, protect: bool) -> None:
-        self.set_attribute("table:protected", protect)
-
-    @property
-    def protection_key(self) -> str | None:
-        return self.get_attribute_string("table:protection-key")
-
-    @protection_key.setter
-    def protection_key(self, key: str) -> None:
-        self.set_attribute("table:protection-key", key)
-
-    @property
-    def displayed(self) -> bool:
-        return bool(self.get_attribute("table:display"))
-
-    @displayed.setter
-    def displayed(self, display: bool) -> None:
-        self.set_attribute("table:display", display)
-
-    @property
-    def printable(self) -> bool:
-        printable = self.get_attribute("table:print")
-        # Default value
-        if printable is None:
-            return True
-        return bool(printable)
-
-    @printable.setter
-    def printable(self, printable: bool) -> None:
-        self.set_attribute("table:print", printable)
-
-    @property
-    def print_ranges(self) -> list[str]:
-        ranges = self.get_attribute_string("table:print-ranges")
-        if isinstance(ranges, str):
-            return ranges.split()
-        return []
-
-    @print_ranges.setter
-    def print_ranges(self, ranges: list[str] | None) -> None:
-        if isinstance(ranges, (list, tuple)):
-            self.set_attribute("table:print-ranges", " ".join(ranges))
-        else:
-            self.set_attribute("table:print-ranges", ranges)
-
-    @property
-    def style(self) -> str | None:
-        """Get / set the style of the table
-
-        Return: str
-        """
-        return self.get_attribute_string("table:style-name")
-
-    @style.setter
-    def style(self, style: str | Element) -> None:
-        self.set_style_attribute("table:style-name", style)
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        if context and context["rst_mode"]:
-            return self._get_formatted_text_rst(context)
-        return self._get_formatted_text_normal(context)
-
-    def get_values(
-        self,
-        coord: tuple | list | str | None = None,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-        flat: bool = False,
-    ) -> list:
-        """Get a matrix of values of the table.
-
-        Filter by coordinates will parse the area defined by the coordinates.
-
-        If 'cell_type' is used and 'complete' is True (default), missing values
-        are replaced by None.
-        Filter by ' cell_type = "all" ' will retrieve cells of any
-        type, aka non empty cells.
-
-        If 'cell_type' is None, complete is always True : with no cell type
-        queried, get_values() returns None for each empty cell, the length
-        each lists is equal to the width of the table.
-
-        If get_type is True, returns tuples (value, ODF type of value), or
-        (None, None) for empty cells with complete True.
-
-        If flat is True, the methods return a single list of all the values.
-        By default, flat is False.
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of area
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: list of lists of Python types
-        """
-        if coord:
-            x, y, z, t = self._translate_table_coordinates(coord)
-        else:
-            x = y = z = t = None
-        data = []
-        for row in self.traverse(start=y, end=t):
-            if z is None:
-                width = self.width
-            else:
-                width = min(z + 1, self.width)
-            if x is not None:
-                width -= x
-            values = row.get_values(
-                (x, z),
-                cell_type=cell_type,
-                complete=complete,
-                get_type=get_type,
-            )
-            # complete row to match request width
-            if complete:
-                if get_type:
-                    values.extend([(None, None)] * (width - len(values)))
-                else:
-                    values.extend([None] * (width - len(values)))
-            if flat:
-                data.extend(values)
-            else:
-                data.append(values)
-        return data
-
-    def iter_values(
-        self,
-        coord: tuple | list | str | None = None,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-    ) -> Iterator[list]:
-        """Iterate through lines of Python values of the table.
-
-        Filter by coordinates will parse the area defined by the coordinates.
-
-        cell_type, complete, grt_type : see get_values()
-
-
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of area
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: iterator of lists
-        """
-        if coord:
-            x, y, z, t = self._translate_table_coordinates(coord)
-        else:
-            x = y = z = t = None
-        for row in self.traverse(start=y, end=t):
-            if z is None:
-                width = self.width
-            else:
-                width = min(z + 1, self.width)
-            if x is not None:
-                width -= x
-            values = row.get_values(
-                (x, z),
-                cell_type=cell_type,
-                complete=complete,
-                get_type=get_type,
-            )
-            # complete row to match column width
-            if complete:
-                if get_type:
-                    values.extend([(None, None)] * (width - len(values)))
-                else:
-                    values.extend([None] * (width - len(values)))
-            yield values
-
-    def set_values(
-        self,
-        values: list,
-        coord: tuple | list | str | None = None,
-        style: str | None = None,
-        cell_type: str | None = None,
-        currency: str | None = None,
-    ) -> None:
-        """Set the value of cells in the table, from the 'coord' position
-        with values.
-
-        'coord' is the coordinate of the upper left cell to be modified by
-        values. If 'coord' is None, default to the position (0,0) ("A1").
-        If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
-        area is used as coordinate.
-
-        The table is *not* cleared before the operation, to reset the table
-        before setting values, use table.clear().
-
-        A list of lists is expected, with as many lists as rows, and as many
-        items in each sublist as cells to be setted. None values in the list
-        will create empty cells with no cell type (but eventually a style).
-
-        Arguments:
-
-            coord -- tuple or str
-
-            values -- list of lists of python types
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                         'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-        """
-        if coord:
-            x, y = self._translate_cell_coordinates(coord)
-        else:
-            x = y = 0
-        if y is None:
-            y = 0
-        if x is None:
-            x = 0
-        y -= 1
-        for row_values in values:
-            y += 1
-            if not row_values:
-                continue
-            row = self.get_row(y, clone=True)
-            repeated = row.repeated or 1
-            if repeated >= 2:
-                row.repeated = None
-            row.set_values(
-                row_values,
-                start=x,
-                cell_type=cell_type,
-                currency=currency,
-                style=style,
-            )
-            self.set_row(y, row, clone=False)
-            self._update_width(row)
-
-    def rstrip(self, aggressive: bool = False) -> None:
-        """Remove *in-place* empty rows below and empty cells at the right of
-        the table. Cells are empty if they contain no value or it evaluates
-        to False, and no style.
-
-        If aggressive is True, empty cells with style are removed too.
-
-        Argument:
-
-            aggressive -- bool
-        """
-        # Step 1: remove empty rows below the table
-        for row in reversed(self._get_rows()):
-            if row.is_empty(aggressive=aggressive):
-                row.parent.delete(row)  # type: ignore
-            else:
-                break
-        # Step 2: rstrip remaining rows
-        max_width = 0
-        for row in self._get_rows():
-            row.rstrip(aggressive=aggressive)
-            # keep count of the biggest row
-            max_width = max(max_width, row.width)
-        # raz cache of rows
-        self._indexes["_tmap"] = {}
-        # Step 3: trim columns to match max_width
-        columns = self._get_columns()
-        repeated_cols = self.xpath("table:table-column/@table:number-columns-repeated")
-        if not isinstance(repeated_cols, list):
-            raise TypeError
-        unrepeated = len(columns) - len(repeated_cols)
-        column_width = sum(int(r) for r in repeated_cols) + unrepeated  # type: ignore
-        diff = column_width - max_width
-        if diff > 0:
-            for column in reversed(columns):
-                repeated = column.repeated or 1
-                repeated = repeated - diff
-                if repeated > 0:
-                    column.repeated = repeated
-                    break
-                else:
-                    column.parent.delete(column)
-                    diff = -repeated
-                    if diff == 0:
-                        break
-        # raz cache of columns
-        self._indexes["_cmap"] = {}
-        self._compute_table_cache()
-
-    def transpose(self, coord: tuple | list | str | None = None) -> None:  # noqa: C901
-        """Swap *in-place* rows and columns of the table.
-
-        If 'coord' is not None, apply transpose only to the area defined by the
-        coordinates. Beware, if area is not square, some cells mays be over
-        written during the process.
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of area
-
-            start -- int or str
-        """
-        data = []
-        if coord is None:
-            for row in self.traverse():
-                data.append(list(row.traverse()))
-            transposed_data = zip_longest(*data)
-            self.clear()
-            # new_rows = []
-            for row_cells in transposed_data:
-                if not isiterable(row_cells):
-                    row_cells = (row_cells,)
-                row = Row()
-                row.extend_cells(row_cells)
-                self.append_row(row, clone=False)
-            self._compute_table_cache()
-        else:
-            x, y, z, t = self._translate_table_coordinates(coord)
-            if x is None:
-                x = 0
-            else:
-                x = min(x, self.width - 1)
-            if z is None:
-                z = self.width - 1
-            else:
-                z = min(z, self.width - 1)
-            if y is None:
-                y = 0
-            else:
-                y = min(y, self.height - 1)
-            if t is None:
-                t = self.height - 1
-            else:
-                t = min(t, self.height - 1)
-            for row in self.traverse(start=y, end=t):
-                data.append(list(row.traverse(start=x, end=z)))
-            transposed_data = zip_longest(*data)
-            # clear locally
-            w = z - x + 1
-            h = t - y + 1
-            if w != h:
-                nones = [[None] * w for i in range(h)]
-                self.set_values(nones, coord=(x, y, z, t))
-            # put transposed
-            filtered_data: list[tuple[Cell]] = []
-            for row_cells in transposed_data:
-                if isinstance(row_cells, (list, tuple)):
-                    filtered_data.append(row_cells)
-                else:
-                    filtered_data.append((row_cells,))
-            self.set_cells(filtered_data, (x, y, x + h - 1, y + w - 1))
-            self._compute_table_cache()
-
-    def is_empty(self, aggressive: bool = False) -> bool:
-        """Return whether every cell in the table has no value or the value
-        evaluates to False (empty string), and no style.
-
-        If aggressive is True, empty cells with style are considered empty.
-
-        Arguments:
-
-            aggressive -- bool
-        """
-        return all(row.is_empty(aggressive=aggressive) for row in self._get_rows())
-
-    #
-    # Rows
-    #
-
-    def _get_rows(self) -> list[Row]:
-        return self.get_elements(_xpath_row)  # type: ignore
-
-    def traverse(  # noqa: C901
-        self,
-        start: int | None = None,
-        end: int | None = None,
-    ) -> Iterator[Row]:
-        """Yield as many row elements as expected rows in the table, i.e.
-        expand repetitions by returning the same row as many times as
-        necessary.
-
-            Arguments:
-
-                start -- int
-
-                end -- int
-
-        Copies are returned, use set_row() to push them back.
-        """
-        idx = -1
-        before = -1
-        y = 0
-        if start is None and end is None:
-            for juska in self._tmap:
-                idx += 1
-                if idx in self._indexes["_tmap"]:
-                    row = self._indexes["_tmap"][idx]
-                else:
-                    row = self._get_element_idx2(_xpath_row_idx, idx)
-                    self._indexes["_tmap"][idx] = row
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    # Return a copy without the now obsolete repetition
-                    row = row.clone
-                    row.y = y
-                    y += 1
-                    if repeated > 1:
-                        row.repeated = None
-                    yield row
-        else:
-            if start is None:
-                start = 0
-            start = max(0, start)
-            if end is None:
-                try:
-                    end = self._tmap[-1]
-                except Exception:
-                    end = -1
-            start_map = find_odf_idx(self._tmap, start)
-            if start_map is None:
-                return
-            if start_map > 0:
-                before = self._tmap[start_map - 1]
-            idx = start_map - 1
-            before = start - 1
-            y = start
-            for juska in self._tmap[start_map:]:
-                idx += 1
-                if idx in self._indexes["_tmap"]:
-                    row = self._indexes["_tmap"][idx]
-                else:
-                    row = self._get_element_idx2(_xpath_row_idx, idx)
-                    self._indexes["_tmap"][idx] = row
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    if y <= end:
-                        row = row.clone
-                        row.y = y
-                        y += 1
-                        if repeated > 1 or (y == start and start > 0):
-                            row.repeated = None
-                        yield row
-
-    def get_rows(
-        self,
-        coord: tuple | list | str | None = None,
-        style: str | None = None,
-        content: str | None = None,
-    ) -> list[Row]:
-        """Get the list of rows matching the criteria.
-
-        Filter by coordinates will parse the area defined by the coordinates.
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of rows
-
-            content -- str regex
-
-            style -- str
-
-        Return: list of rows
-        """
-        if coord:
-            _x, y, _z, t = self._translate_table_coordinates(coord)
-        else:
-            y = t = None
-        # fixme : not clones ?
-        if not content and not style:
-            return list(self.traverse(start=y, end=t))
-        rows = []
-        for row in self.traverse(start=y, end=t):
-            if content and not row.match(content):
-                continue
-            if style and style != row.style:
-                continue
-            rows.append(row)
-        return rows
-
-    def _get_row2(self, y: int, clone: bool = True, create: bool = True) -> Row:
-        if y >= self.height:
-            if create:
-                return Row()
-            raise ValueError("Row not found")
-        row = self._get_row2_base(y)
-        if row is None:
-            raise ValueError("Row not found")
-        if clone:
-            return row.clone
-        return row
-
-    def _get_row2_base(self, y: int) -> Row | None:
-        idx = find_odf_idx(self._tmap, y)
-        if idx is not None:
-            if idx in self._indexes["_tmap"]:
-                row = self._indexes["_tmap"][idx]
-            else:
-                row = self._get_element_idx2(_xpath_row_idx, idx)
-                self._indexes["_tmap"][idx] = row
-            return row
-        return None
-
-    def get_row(self, y: int | str, clone: bool = True, create: bool = True) -> Row:
-        """Get the row at the given "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        A copy is returned, use set_cell() to push it back.
-
-        Arguments:
-
-            y -- int or str
-
-        Return: Row
-        """
-        # fixme : keep repeat ? maybe an option to functions : "raw=False"
-        y = self._translate_y_from_any(y)
-        row = self._get_row2(y, clone=clone, create=create)
-        if row is None:
-            raise ValueError("Row not found")
-        row.y = y
-        return row
-
-    def set_row(self, y: int | str, row: Row | None = None, clone: bool = True) -> Row:
-        """Replace the row at the given position with the new one. Repetions of
-        the old row will be adjusted.
-
-        If row is None, a new empty row is created.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Arguments:
-
-            y -- int or str
-
-            row -- Row
-
-        returns the row, with updated row.y
-        """
-        if row is None:
-            row = Row()
-            repeated = 1
-            clone = False
-        else:
-            repeated = row.repeated or 1
-        y = self._translate_y_from_any(y)
-        row.y = y
-        # Outside the defined table ?
-        diff = y - self.height
-        if diff == 0:
-            row_back = self.append_row(row, _repeated=repeated, clone=clone)
-        elif diff > 0:
-            self.append_row(Row(repeated=diff), _repeated=diff, clone=clone)
-            row_back = self.append_row(row, _repeated=repeated, clone=clone)
-        else:
-            # Inside the defined table
-            row_back = set_item_in_vault(  # type: ignore
-                y, row, self, _xpath_row_idx, "_tmap", clone=clone
-            )
-        # print self.serialize(True)
-        # Update width if necessary
-        self._update_width(row_back)
-        return row_back
-
-    def insert_row(
-        self, y: str | int, row: Row | None = None, clone: bool = True
-    ) -> Row:
-        """Insert the row before the given "y" position. If no row is given,
-        an empty one is created.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        If row is None, a new empty row is created.
-
-        Arguments:
-
-            y -- int or str
-
-            row -- Row
-
-        returns the row, with updated row.y
-        """
-        if row is None:
-            row = Row()
-            clone = False
-        y = self._translate_y_from_any(y)
-        diff = y - self.height
-        if diff < 0:
-            row_back = insert_item_in_vault(y, row, self, _xpath_row_idx, "_tmap")
-        elif diff == 0:
-            row_back = self.append_row(row, clone=clone)
-        else:
-            self.append_row(Row(repeated=diff), _repeated=diff, clone=False)
-            row_back = self.append_row(row, clone=clone)
-        row_back.y = y  # type: ignore
-        # Update width if necessary
-        self._update_width(row_back)  # type: ignore
-        return row_back  # type: ignore
-
-    def extend_rows(self, rows: list[Row] | None = None) -> None:
-        """Append a list of rows at the end of the table.
-
-        Arguments:
-
-            rows -- list of Row
-        """
-        if rows is None:
-            rows = []
-        self.extend(rows)
-        self._compute_table_cache()
-        # Update width if necessary
-        width = self.width
-        for row in self.traverse():
-            if row.width > width:
-                width = row.width
-        diff = width - self.width
-        if diff > 0:
-            self.append_column(Column(repeated=diff))
-
-    def append_row(
-        self,
-        row: Row | None = None,
-        clone: bool = True,
-        _repeated: int | None = None,
-    ) -> Row:
-        """Append the row at the end of the table. If no row is given, an
-        empty one is created.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Note the columns are automatically created when the first row is
-        inserted in an empty table. So better insert a filled row.
-
-        Arguments:
-
-            row -- Row
-
-            _repeated -- (optional), repeated value of the row
-
-        returns the row, with updated row.y
-        """
-        if row is None:
-            row = Row()
-            _repeated = 1
-        elif clone:
-            row = row.clone
-        # Appending a repeated row accepted
-        # Do not insert next to the last row because it could be in a group
-        self._append(row)
-        if _repeated is None:
-            _repeated = row.repeated or 1
-        self._tmap = insert_map_once(self._tmap, len(self._tmap), _repeated)
-        row.y = self.height - 1
-        # Initialize columns
-        if not self._get_columns():
-            repeated = row.width
-            self.insert(Column(repeated=repeated), position=0)
-            self._compute_table_cache()
-        # Update width if necessary
-        self._update_width(row)
-        return row
-
-    def delete_row(self, y: int | str) -> None:
-        """Delete the row at the given "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Arguments:
-
-            y -- int or str
-        """
-        y = self._translate_y_from_any(y)
-        # Outside the defined table
-        if y >= self.height:
-            return
-        # Inside the defined table
-        delete_item_in_vault(y, self, _xpath_row_idx, "_tmap")
-
-    def get_row_values(
-        self,
-        y: int | str,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-    ) -> list:
-        """Shortcut to get the list of Python values for the cells of the row
-        at the given "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-        If cell_type and complete is True, replace missing values by None.
-
-        If get_type is True, returns a tuple (value, ODF type of value)
-
-        Arguments:
-
-            y -- int, str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: list of lists of Python types
-        """
-        values = self.get_row(y, clone=False).get_values(
-            cell_type=cell_type, complete=complete, get_type=get_type
-        )
-        # complete row to match column width
-        if complete:
-            if get_type:
-                values.extend([(None, None)] * (self.width - len(values)))
-            else:
-                values.extend([None] * (self.width - len(values)))
-        return values
-
-    def set_row_values(
-        self,
-        y: int | str,
-        values: list,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        style: str | None = None,
-    ) -> Row:
-        """Shortcut to set the values of *all* cells of the row at the given
-        "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Arguments:
-
-            y -- int or str
-
-            values -- list of Python types
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                         'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-
-        returns the row, with updated row.y
-        """
-        row = Row()  # needed if clones rows
-        row.set_values(values, style=style, cell_type=cell_type, currency=currency)
-        return self.set_row(y, row)  # needed if clones rows
-
-    def set_row_cells(self, y: int | str, cells: list | None = None) -> Row:
-        """Shortcut to set *all* the cells of the row at the given
-        "y" position.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Arguments:
-
-            y -- int or str
-
-            cells -- list of Python types
-
-            style -- str
-
-        returns the row, with updated row.y
-        """
-        if cells is None:
-            cells = []
-        row = Row()  # needed if clones rows
-        row.extend_cells(cells)
-        return self.set_row(y, row)  # needed if clones rows
-
-    def is_row_empty(self, y: int | str, aggressive: bool = False) -> bool:
-        """Return wether every cell in the row at the given "y" position has
-        no value or the value evaluates to False (empty string), and no style.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        If aggressive is True, empty cells with style are considered empty.
-
-        Arguments:
-
-            y -- int or str
-
-            aggressive -- bool
-        """
-        return self.get_row(y, clone=False).is_empty(aggressive=aggressive)
-
-    #
-    # Cells
-    #
-
-    def get_cells(
-        self,
-        coord: tuple | list | str | None = None,
-        cell_type: str | None = None,
-        style: str | None = None,
-        content: str | None = None,
-        flat: bool = False,
-    ) -> list:
-        """Get the cells matching the criteria. If 'coord' is None,
-        parse the whole table, else parse the area defined by 'coord'.
-
-        Filter by  cell_type = "all"  will retrieve cells of any
-        type, aka non empty cells.
-
-        If flat is True (default is False), the method return a single list
-        of all the values, else a list of lists of cells.
-
-        if cell_type, style and content are None, get_cells() will return
-        the exact number of cells of the area, including empty cells.
-
-        Arguments:
-
-            coordinates -- str or tuple of int : coordinates of area
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            content -- str regex
-
-            style -- str
-
-            flat -- boolean
-
-        Return: list of tuples
-        """
-        if coord:
-            x, y, z, t = self._translate_table_coordinates(coord)
-        else:
-            x = y = z = t = None
-        if flat:
-            cells: list[Cell] = []
-            for row in self.traverse(start=y, end=t):
-                row_cells = row.get_cells(
-                    coord=(x, z),
-                    cell_type=cell_type,
-                    style=style,
-                    content=content,
-                )
-                cells.extend(row_cells)
-            return cells
-        else:
-            lcells: list[list[Cell]] = []
-            for row in self.traverse(start=y, end=t):
-                row_cells = row.get_cells(
-                    coord=(x, z),
-                    cell_type=cell_type,
-                    style=style,
-                    content=content,
-                )
-                lcells.append(row_cells)
-            return lcells
-
-    def get_cell(
-        self,
-        coord: tuple | list | str,
-        clone: bool = True,
-        keep_repeated: bool = True,
-    ) -> Cell:
-        """Get the cell at the given coordinates.
-
-        They are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        A copy is returned, use ``set_cell`` to push it back.
-
-        Arguments:
-
-            coord -- (int, int) or str
-
-        Return: Cell
-        """
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        # Outside the defined table
-        if y >= self.height:
-            cell = Cell()
-        else:
-            # Inside the defined table
-            row = self._get_row2_base(y)
-            if row is None:
-                raise ValueError
-            read_cell = row.get_cell(x, clone=clone)
-            if read_cell is None:
-                raise ValueError
-            cell = read_cell
-            if not keep_repeated:
-                repeated = cell.repeated or 1
-                if repeated >= 2:
-                    cell.repeated = None
-        cell.x = x
-        cell.y = y
-        return cell
-
-    def get_value(
-        self,
-        coord: tuple | list | str,
-        get_type: bool = False,
-    ) -> Any:
-        """Shortcut to get the Python value of the cell at the given
-        coordinates.
-
-        If get_type is True, returns the tuples (value, ODF type)
-
-        coord is either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4". If an Area is given, the upper
-        left position is used as coord.
-
-        Arguments:
-
-            coord -- (int, int) or str : coordinate
-
-        Return: Python type
-        """
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        # Outside the defined table
-        if y >= self.height:
-            if get_type:
-                return (None, None)
-            return None
-        else:
-            # Inside the defined table
-            row = self._get_row2_base(y)
-            if row is None:
-                raise ValueError
-            cell = row._get_cell2_base(x)
-            if cell is None:
-                if get_type:
-                    return (None, None)
-                return None
-            return cell.get_value(get_type=get_type)
-
-    def set_cell(
-        self,
-        coord: tuple | list | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Replace a cell of the table at the given coordinates.
-
-        They are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        Arguments:
-
-            coord -- (int, int) or str : coordinate
-
-            cell -- Cell
-
-        return the cell, with x and y updated
-        """
-        if cell is None:
-            cell = Cell()
-            clone = False
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        cell.x = x
-        cell.y = y
-        if y >= self.height:
-            row = Row()
-            cell_back = row.set_cell(x, cell, clone=clone)
-            self.set_row(y, row, clone=False)
-        else:
-            row_read = self._get_row2_base(y)
-            if row_read is None:
-                raise ValueError
-            row = row_read
-            row.y = y
-            repeated = row.repeated or 1
-            if repeated > 1:
-                row = row.clone
-                row.repeated = None
-                cell_back = row.set_cell(x, cell, clone=clone)
-                self.set_row(y, row, clone=False)
-            else:
-                cell_back = row.set_cell(x, cell, clone=clone)
-                # Update width if necessary, since we don't use set_row
-                self._update_width(row)
-        return cell_back
-
-    def set_cells(
-        self,
-        cells: list[list[Cell]] | list[tuple[Cell]],
-        coord: tuple | list | str | None = None,
-        clone: bool = True,
-    ) -> None:
-        """Set the cells in the table, from the 'coord' position.
-
-        'coord' is the coordinate of the upper left cell to be modified by
-        values. If 'coord' is None, default to the position (0,0) ("A1").
-        If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
-        area is used as coordinate.
-
-        The table is *not* cleared before the operation, to reset the table
-        before setting cells, use table.clear().
-
-        A list of lists is expected, with as many lists as rows to be set, and
-        as many cell in each sublist as cells to be setted in the row.
-
-        Arguments:
-
-            cells -- list of list of cells
-
-            coord -- tuple or str
-
-            values -- list of lists of python types
-        """
-        if coord:
-            x, y = self._translate_cell_coordinates(coord)
-        else:
-            x = y = 0
-        if y is None:
-            y = 0
-        if x is None:
-            x = 0
-        y -= 1
-        for row_cells in cells:
-            y += 1
-            if not row_cells:
-                continue
-            row = self.get_row(y, clone=True)
-            repeated = row.repeated or 1
-            if repeated >= 2:
-                row.repeated = None
-            row.set_cells(row_cells, start=x, clone=clone)
-            self.set_row(y, row, clone=False)
-            self._update_width(row)
-
-    def set_value(
-        self,
-        coord: tuple | list | str,
-        value: Any,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        style: str | None = None,
-    ) -> None:
-        """Set the Python value of the cell at the given coordinates.
-
-        They are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        Arguments:
-
-            coord -- (int, int) or str
-
-            value -- Python type
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                     'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-
-        """
-        self.set_cell(
-            coord,
-            Cell(value, cell_type=cell_type, currency=currency, style=style),
-            clone=False,
-        )
-
-    def set_cell_image(
-        self,
-        coord: tuple | list | str,
-        image_frame: Frame,
-        doc_type: str | None = None,
-    ) -> None:
-        """Do all the magic to display an image in the cell at the given
-        coordinates.
-
-        They are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        The frame element must contain the expected image position and
-        dimensions.
-
-        DrawImage insertion depends on the document type, so the type must be
-        provided or the table element must be already attached to a document.
-
-        Arguments:
-
-            coord -- (int, int) or str
-
-            image_frame -- Frame including an image
-
-            doc_type -- 'spreadsheet' or 'text'
-        """
-        # Test document type
-        if doc_type is None:
-            body = self.document_body
-            if body is None:
-                raise ValueError("document type not found")
-            doc_type = {"office:spreadsheet": "spreadsheet", "office:text": "text"}.get(
-                body.tag
-            )
-            if doc_type is None:
-                raise ValueError("document type not supported for images")
-        # We need the end address of the image
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        cell = self.get_cell((x, y))
-        image_frame = image_frame.clone  # type: ignore
-        # Remove any previous paragraph, frame, etc.
-        for child in cell.children:
-            cell.delete(child)
-        # Now it all depends on the document type
-        if doc_type == "spreadsheet":
-            image_frame.anchor_type = "char"
-            # The frame needs end coordinates
-            width, height = image_frame.size
-            image_frame.set_attribute("table:end-x", width)
-            image_frame.set_attribute("table:end-y", height)
-            # FIXME what happens when the address changes?
-            address = f"{self.name}.{digit_to_alpha(x)}{y + 1}"
-            image_frame.set_attribute("table:end-cell-address", address)
-            # The frame is directly in the cell
-            cell.append(image_frame)
-        elif doc_type == "text":
-            # The frame must be in a paragraph
-            cell.set_value("")
-            paragraph = cell.get_element("text:p")
-            if paragraph is None:
-                raise ValueError
-            paragraph.append(image_frame)
-        self.set_cell(coord, cell)
-
-    def insert_cell(
-        self,
-        coord: tuple | list | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Insert the given cell at the given coordinates. If no cell is
-        given, an empty one is created.
-
-        Coordinates are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        Cells on the right are shifted. Other rows remain untouched.
-
-        Arguments:
-
-            coord -- (int, int) or str
-
-            cell -- Cell
-
-        returns the cell with x and y updated
-        """
-        if cell is None:
-            cell = Cell()
-            clone = False
-        if clone:
-            cell = cell.clone
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        row = self._get_row2(y, clone=True)
-        row.y = y
-        row.repeated = None
-        cell_back = row.insert_cell(x, cell, clone=False)
-        self.set_row(y, row, clone=False)
-        # Update width if necessary
-        self._update_width(row)
-        return cell_back
-
-    def append_cell(
-        self,
-        y: int | str,
-        cell: Cell | None = None,
-        clone: bool = True,
-    ) -> Cell:
-        """Append the given cell at the "y" coordinate. Repeated cells are
-        accepted. If no cell is given, an empty one is created.
-
-        Position start at 0. So cell A4 is on row 3.
-
-        Other rows remain untouched.
-
-        Arguments:
-
-            y -- int or str
-
-            cell -- Cell
-
-        returns the cell with x and y updated
-        """
-        if cell is None:
-            cell = Cell()
-            clone = False
-        if clone:
-            cell = cell.clone
-        y = self._translate_y_from_any(y)
-        row = self._get_row2(y)
-        row.y = y
-        cell_back = row.append_cell(cell, clone=False)
-        self.set_row(y, row)
-        # Update width if necessary
-        self._update_width(row)
-        return cell_back
-
-    def delete_cell(self, coord: tuple | list | str) -> None:
-        """Delete the cell at the given coordinates, so that next cells are
-        shifted to the left.
-
-        Coordinates are either a 2-uplet of (x, y) starting from 0, or a
-        human-readable position like "C4".
-
-        Use set_value() for erasing value.
-
-        Arguments:
-
-            coord -- (int, int) or str
-        """
-        x, y = self._translate_cell_coordinates(coord)
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        # Outside the defined table
-        if y >= self.height:
-            return
-        # Inside the defined table
-        row = self._get_row2_base(y)
-        if row is None:
-            raise ValueError
-        row.delete_cell(x)
-        # self.set_row(y, row)
-
-    # Columns
-
-    def _get_columns(self) -> list:
-        return self.get_elements(_xpath_column)
-
-    def traverse_columns(  # noqa: C901
-        self,
-        start: int | None = None,
-        end: int | None = None,
-    ) -> Iterator[Column]:
-        """Yield as many column elements as expected columns in the table,
-        i.e. expand repetitions by returning the same column as many times as
-        necessary.
-
-            Arguments:
-
-                start -- int
-
-                end -- int
-
-        Copies are returned, use set_column() to push them back.
-        """
-        idx = -1
-        before = -1
-        x = 0
-        if start is None and end is None:
-            for juska in self._cmap:
-                idx += 1
-                if idx in self._indexes["_cmap"]:
-                    column = self._indexes["_cmap"][idx]
-                else:
-                    column = self._get_element_idx2(_xpath_column_idx, idx)
-                    self._indexes["_cmap"][idx] = column
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    # Return a copy without the now obsolete repetition
-                    column = column.clone
-                    column.x = x
-                    x += 1
-                    if repeated > 1:
-                        column.repeated = None
-                    yield column
-        else:
-            if start is None:
-                start = 0
-            start = max(0, start)
-            if end is None:
-                try:
-                    end = self._cmap[-1]
-                except Exception:
-                    end = -1
-            start_map = find_odf_idx(self._cmap, start)
-            if start_map is None:
-                return
-            if start_map > 0:
-                before = self._cmap[start_map - 1]
-            idx = start_map - 1
-            before = start - 1
-            x = start
-            for juska in self._cmap[start_map:]:
-                idx += 1
-                if idx in self._indexes["_cmap"]:
-                    column = self._indexes["_cmap"][idx]
-                else:
-                    column = self._get_element_idx2(_xpath_column_idx, idx)
-                    self._indexes["_cmap"][idx] = column
-                repeated = juska - before
-                before = juska
-                for _i in range(repeated or 1):
-                    if x <= end:
-                        column = column.clone
-                        column.x = x
-                        x += 1
-                        if repeated > 1 or (x == start and start > 0):
-                            column.repeated = None
-                        yield column
-
-    def get_columns(
-        self,
-        coord: tuple | list | str | None = None,
-        style: str | None = None,
-    ) -> list[Column]:
-        """Get the list of columns matching the criteria. Each result is a
-        tuple of (x, column).
-
-        Arguments:
-
-            coord -- str or tuple of int : coordinates of columns
-
-            style -- str
-
-        Return: list of columns
-        """
-        if coord:
-            x, _y, _z, t = self._translate_column_coordinates(coord)
-        else:
-            x = t = None
-        if not style:
-            return list(self.traverse_columns(start=x, end=t))
-        columns = []
-        for column in self.traverse_columns(start=x, end=t):
-            if style != column.style:
-                continue
-            columns.append(column)
-        return columns
-
-    def _get_column2(self, x: int) -> Column | None:
-        # Outside the defined table
-        if x >= self.width:
-            return Column()
-        # Inside the defined table
-        odf_idx = find_odf_idx(self._cmap, x)
-        if odf_idx is not None:
-            column = self._get_element_idx2(_xpath_column_idx, odf_idx)
-            if column is None:
-                return None
-            # fixme : no clone here => change doc and unit tests
-            return column.clone  # type: ignore
-            # return row
-        return None
-
-    def get_column(self, x: int | str) -> Column:
-        """Get the column at the given "x" position.
-
-        ODF columns don't contain cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        A copy is returned, use set_column() to push it back.
-
-        Arguments:
-
-            x -- int or str
-
-        Return: Column
-        """
-        x = self._translate_x_from_any(x)
-        column = self._get_column2(x)
-        if column is None:
-            raise ValueError
-        column.x = x
-        return column
-
-    def set_column(
-        self,
-        x: int | str,
-        column: Column | None = None,
-    ) -> Column:
-        """Replace the column at the given "x" position.
-
-        ODF columns don't contain cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Arguments:
-
-            x -- int or str
-
-            column -- Column
-        """
-        x = self._translate_x_from_any(x)
-        if column is None:
-            column = Column()
-            repeated = 1
-        else:
-            repeated = column.repeated or 1
-        column.x = x
-        # Outside the defined table ?
-        diff = x - self.width
-        if diff == 0:
-            column_back = self.append_column(column, _repeated=repeated)
-        elif diff > 0:
-            self.append_column(Column(repeated=diff), _repeated=diff)
-            column_back = self.append_column(column, _repeated=repeated)
-        else:
-            # Inside the defined table
-            column_back = set_item_in_vault(  # type: ignore
-                x, column, self, _xpath_column_idx, "_cmap"
-            )
-        return column_back
-
-    def insert_column(
-        self,
-        x: int | str,
-        column: Column | None = None,
-    ) -> Column:
-        """Insert the column before the given "x" position. If no column is
-        given, an empty one is created.
-
-        ODF columns don't contain cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Arguments:
-
-            x -- int or str
-
-            column -- Column
-        """
-        if column is None:
-            column = Column()
-        x = self._translate_x_from_any(x)
-        diff = x - self.width
-        if diff < 0:
-            column_back = insert_item_in_vault(
-                x, column, self, _xpath_column_idx, "_cmap"
-            )
-        elif diff == 0:
-            column_back = self.append_column(column.clone)
-        else:
-            self.append_column(Column(repeated=diff), _repeated=diff)
-            column_back = self.append_column(column.clone)
-        column_back.x = x  # type: ignore
-        # Repetitions are accepted
-        repeated = column.repeated or 1
-        # Update width on every row
-        for row in self._get_rows():
-            if row.width > x:
-                row.insert_cell(x, Cell(repeated=repeated))
-            # Shorter rows don't need insert
-            # Longer rows shouldn't exist!
-        return column_back  # type: ignore
-
-    def append_column(
-        self,
-        column: Column | None = None,
-        _repeated: int | None = None,
-    ) -> Column:
-        """Append the column at the end of the table. If no column is given,
-        an empty one is created.
-
-        ODF columns don't contain cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Arguments:
-
-            column -- Column
-        """
-        if column is None:
-            column = Column()
-        else:
-            column = column.clone
-        if not self._cmap:
-            position = 0
-        else:
-            odf_idx = len(self._cmap) - 1
-            last_column = self._get_element_idx2(_xpath_column_idx, odf_idx)
-            if last_column is None:
-                raise ValueError
-            position = self.index(last_column) + 1
-        column.x = self.width
-        self.insert(column, position=position)
-        # Repetitions are accepted
-        if _repeated is None:
-            _repeated = column.repeated or 1
-        self._cmap = insert_map_once(self._cmap, len(self._cmap), _repeated)
-        # No need to update row widths
-        return column
-
-    def delete_column(self, x: int | str) -> None:
-        """Delete the column at the given position. ODF columns don't contain
-        cells, only style information.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Arguments:
-
-            x -- int or str
-        """
-        x = self._translate_x_from_any(x)
-        # Outside the defined table
-        if x >= self.width:
-            return
-        # Inside the defined table
-        delete_item_in_vault(x, self, _xpath_column_idx, "_cmap")
-        # Update width
-        width = self.width
-        for row in self._get_rows():
-            if row.width >= width:
-                row.delete_cell(x)
-
-    def get_column_cells(  # noqa: C901
-        self,
-        x: int | str,
-        style: str | None = None,
-        content: str | None = None,
-        cell_type: str | None = None,
-        complete: bool = False,
-    ) -> list[Cell | None]:
-        """Get the list of cells at the given position.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-
-        If complete is True, replace missing values by None.
-
-        Arguments:
-
-            x -- int or str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            content -- str regex
-
-            style -- str
-
-            complete -- boolean
-
-        Return: list of Cell
-        """
-        x = self._translate_x_from_any(x)
-        if cell_type:
-            cell_type = cell_type.lower().strip()
-        cells: list[Cell | None] = []
-        if not style and not content and not cell_type:
-            for row in self.traverse():
-                cells.append(row.get_cell(x, clone=True))
-            return cells
-        for row in self.traverse():
-            cell = row.get_cell(x, clone=True)
-            if cell is None:
-                raise ValueError
-            # Filter the cells by cell_type
-            if cell_type:
-                ctype = cell.type
-                if not ctype or not (ctype == cell_type or cell_type == "all"):
-                    if complete:
-                        cells.append(None)
-                    continue
-            # Filter the cells with the regex
-            if content and not cell.match(content):
-                if complete:
-                    cells.append(None)
-                continue
-            # Filter the cells with the style
-            if style and style != cell.style:
-                if complete:
-                    cells.append(None)
-                continue
-            cells.append(cell)
-        return cells
-
-    def get_column_values(
-        self,
-        x: int | str,
-        cell_type: str | None = None,
-        complete: bool = True,
-        get_type: bool = False,
-    ) -> list[Any]:
-        """Shortcut to get the list of Python values for the cells at the
-        given position.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        Filter by cell_type, with cell_type 'all' will retrieve cells of any
-        type, aka non empty cells.
-        If cell_type and complete is True, replace missing values by None.
-
-        If get_type is True, returns a tuple (value, ODF type of value)
-
-        Arguments:
-
-            x -- int or str
-
-            cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                         'currency', 'percentage' or 'all'
-
-            complete -- boolean
-
-            get_type -- boolean
-
-        Return: list of Python types
-        """
-        cells = self.get_column_cells(
-            x, style=None, content=None, cell_type=cell_type, complete=complete
-        )
-        values: list[Any] = []
-        for cell in cells:
-            if cell is None:
-                if complete:
-                    if get_type:
-                        values.append((None, None))
-                    else:
-                        values.append(None)
-                continue
-            if cell_type:
-                ctype = cell.type
-                if not ctype or not (ctype == cell_type or cell_type == "all"):
-                    if complete:
-                        if get_type:
-                            values.append((None, None))
-                        else:
-                            values.append(None)
-                    continue
-            values.append(cell.get_value(get_type=get_type))
-        return values
-
-    def set_column_cells(self, x: int | str, cells: list[Cell]) -> None:
-        """Shortcut to set the list of cells at the given position.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        The list must have the same length than the table height.
-
-        Arguments:
-
-            x -- int or str
-
-            cells -- list of Cell
-        """
-        height = self.height
-        if len(cells) != height:
-            raise ValueError(f"col mismatch: {height} cells expected")
-        cells_iterator = iter(cells)
-        for y, row in enumerate(self.traverse()):
-            row.set_cell(x, next(cells_iterator))
-            self.set_row(y, row)
-
-    def set_column_values(
-        self,
-        x: int | str,
-        values: list,
-        cell_type: str | None = None,
-        currency: str | None = None,
-        style: str | None = None,
-    ) -> None:
-        """Shortcut to set the list of Python values of cells at the given
-        position.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        The list must have the same length than the table height.
-
-        Arguments:
-
-            x -- int or str
-
-            values -- list of Python types
-
-            cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                         'string' or 'time'
-
-            currency -- three-letter str
-
-            style -- str
-        """
-        cells = [
-            Cell(value, cell_type=cell_type, currency=currency, style=style)
-            for value in values
-        ]
-        self.set_column_cells(x, cells)
-
-    def is_column_empty(self, x: int | str, aggressive: bool = False) -> bool:
-        """Return wether every cell in the column at "x" position has no value
-        or the value evaluates to False (empty string), and no style.
-
-        Position start at 0. So cell C4 is on column 2. Alphabetical position
-        like "C" is accepted.
-
-        If aggressive is True, empty cells with style are considered empty.
-
-        Return: bool
-        """
-        for cell in self.get_column_cells(x):
-            if cell is None:
-                continue
-            if not cell.is_empty(aggressive=aggressive):
-                return False
-        return True
-
-    # Named Range
-
-    def get_named_ranges(  # type: ignore
-        self,
-        table_name: str | list[str] | None = None,
-    ) -> list[NamedRange]:
-        """Returns the list of available Name Ranges of the spreadsheet. If
-        table_name is provided, limits the search to these tables.
-        Beware : named ranges are stored at the body level, thus do not call
-        this method on a cloned table.
-
-        Arguments:
-
-            table_names -- str or list of str, names of tables
-
-        Return : list of table_range
-        """
-        body = self.document_body
-        if not body:
-            return []
-        all_named_ranges = body.get_named_ranges()
-        if not table_name:
-            return all_named_ranges  # type:ignore
-        filter_ = []
-        if isinstance(table_name, str):
-            filter_.append(table_name)
-        elif isiterable(table_name):
-            filter_.extend(table_name)
-        else:
-            raise ValueError(
-                f"table_name must be string or Iterable, not {type(table_name)}"
-            )
-        return [
-            nr for nr in all_named_ranges if nr.table_name in filter_  # type:ignore
-        ]
-
-    def get_named_range(self, name: str) -> NamedRange:
-        """Returns the Name Ranges of the specified name. If
-        table_name is provided, limits the search to these tables.
-        Beware : named ranges are stored at the body level, thus do not call
-        this method on a cloned table.
-
-        Arguments:
-
-            name -- str, name of the named range object
-
-        Return : NamedRange
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document")
-        return body.get_named_range(name)  # type: ignore
-
-    def set_named_range(
-        self,
-        name: str,
-        crange: str | tuple | list,
-        table_name: str | None = None,
-        usage: str | None = None,
-    ) -> None:
-        """Create a Named Range element and insert it in the document.
-        Beware : named ranges are stored at the body level, thus do not call
-        this method on a cloned table.
-
-        Arguments:
-
-            name -- str, name of the named range
-
-            crange -- str or tuple of int, cell or area coordinate
-
-            table_name -- str, name of the table
-
-            uage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
-        """
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document")
-        if not name:
-            raise ValueError("Name required.")
-        if table_name is None:
-            table_name = self.name
-        named_range = NamedRange(name, crange, table_name, usage)
-        body.append_named_range(named_range)
-
-    def delete_named_range(self, name: str) -> None:
-        """Delete the Named Range of specified name from the spreadsheet.
-        Beware : named ranges are stored at the body level, thus do not call
-        this method on a cloned table.
-
-        Arguments:
-
-            name -- str
-        """
-        name = name.strip()
-        if not name:
-            raise ValueError("Name required.")
-        body = self.document_body
-        if not body:
-            raise ValueError("Table is not inside a document.")
-        body.delete_named_range(name)
-
-    #
-    # Cell span
-    #
-
-    def set_span(  # noqa: C901
-        self,
-        area: str | tuple | list,
-        merge: bool = False,
-    ) -> bool:
-        """Create a Cell Span : span the first cell of the area on several
-        columns and/or rows.
-        If merge is True, replace text of the cell by the concatenation of
-        existing text in covered cells.
-        Beware : if merge is True, old text is changed, if merge is False
-        (the default), old text in coverd cells is still present but not
-        displayed by most GUI.
-
-        If the area defines only one cell, the set span will do nothing.
-        It is not allowed to apply set span to an area whose one cell already
-        belongs to previous cell span.
-
-        Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
-        be provided as an alpha numeric value like "A1:B2' or a tuple like
-        (0, 0, 1, 1) or (0, 0).
-
-        Arguments:
-
-            area -- str or tuple of int, cell or area coordinate
-
-            merge -- boolean
-        """
-        # get area
-        digits = convert_coordinates(area)
-        if len(digits) == 4:
-            x, y, z, t = digits
-        else:
-            x, y = digits
-            z, t = digits
-        start = x, y
-        end = z, t
-        if start == end:
-            # one cell : do nothing
-            return False
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        if z is None:
-            raise ValueError
-        if t is None:
-            raise ValueError
-        # check for previous span
-        good = True
-        # Check boundaries and empty cells : need to crate non existent cells
-        # so don't use get_cells directly, but get_cell
-        cells = []
-        for yy in range(y, t + 1):
-            row_cells = []
-            for xx in range(x, z + 1):
-                row_cells.append(
-                    self.get_cell((xx, yy), clone=True, keep_repeated=False)
-                )
-            cells.append(row_cells)
-        for row in cells:
-            for cell in row:
-                if cell._is_spanned():
-                    good = False
-                    break
-            if not good:
-                break
-        if not good:
-            return False
-        # Check boundaries
-        # if z >= self.width or t >= self.height:
-        #    self.set_cell(coord = end)
-        #    print area, z, t
-        #    cells = self.get_cells((x, y, z, t))
-        #    print cells
-        # do it:
-        if merge:
-            val_list = []
-            for row in cells:
-                for cell in row:
-                    if cell.is_empty(aggressive=True):
-                        continue
-                    val = cell.get_value()
-                    if val is not None:
-                        if isinstance(val, str):
-                            val.strip()
-                        if val != "":
-                            val_list.append(val)
-                        cell.clear()
-            if val_list:
-                if len(val_list) == 1:
-                    cells[0][0].set_value(val_list[0])
-                else:
-                    value = " ".join([str(v) for v in val_list if v])
-                    cells[0][0].set_value(value)
-        cols = z - x + 1
-        cells[0][0].set_attribute("table:number-columns-spanned", str(cols))
-        rows = t - y + 1
-        cells[0][0].set_attribute("table:number-rows-spanned", str(rows))
-        for cell in cells[0][1:]:
-            cell.tag = "table:covered-table-cell"
-        for row in cells[1:]:
-            for cell in row:
-                cell.tag = "table:covered-table-cell"
-        # replace cells in table
-        self.set_cells(cells, coord=start, clone=False)
-        return True
-
-    def del_span(self, area: str | tuple | list) -> bool:
-        """Delete a Cell Span. 'area' is the cell coordiante of the upper left
-        cell of the spanned area.
-
-        Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
-        be provided as an alpha numeric value like "A1:B2' or a tuple like
-        (0, 0, 1, 1) or (0, 0). If an area is provided, the upper left cell
-        is used.
-
-        Arguments:
-
-            area -- str or tuple of int, cell or area coordinate
-        """
-        # get area
-        digits = convert_coordinates(area)
-        if len(digits) == 4:
-            x, y, _z, _t = digits
-        else:
-            x, y = digits
-        if x is None:
-            raise ValueError
-        if y is None:
-            raise ValueError
-        start = x, y
-        # check for previous span
-        cell0 = self.get_cell(start)
-        nb_cols = cell0.get_attribute_integer("table:number-columns-spanned")
-        if nb_cols is None:
-            return False
-        nb_rows = cell0.get_attribute_integer("table:number-rows-spanned")
-        if nb_rows is None:
-            return False
-        z = x + nb_cols - 1
-        t = y + nb_rows - 1
-        cells = self.get_cells((x, y, z, t))
-        cells[0][0].del_attribute("table:number-columns-spanned")
-        cells[0][0].del_attribute("table:number-rows-spanned")
-        for cell in cells[0][1:]:
-            cell.tag = "table:table-cell"
-        for row in cells[1:]:
-            for cell in row:
-                cell.tag = "table:table-cell"
-        # replace cells in table
-        self.set_cells(cells, coord=start, clone=False)
-        return True
-
-    # Utilities
-
-    def to_csv(
-        self,
-        path_or_file: str | Path | None = None,
-        dialect: str = "excel",
-    ) -> Any:
-        """Write the table as CSV in the file.
-
-        If the file is a string, it is opened as a local path. Else an
-        opened file-like is expected.
-
-        Arguments:
-
-            path_or_file -- str or file-like
-
-            dialect -- str, python csv.dialect, can be 'excel', 'unix'...
-        """
-
-        def write_content(csv_writer: object) -> None:
-            for values in self.iter_values():
-                line = []
-                for value in values:
-                    if value is None:
-                        value = ""
-                    if isinstance(value, str):
-                        value = value.strip()
-                    line.append(value)
-                csv_writer.writerow(line)  # type: ignore
-
-        out = StringIO(newline="")
-        csv_writer = csv.writer(out, dialect=dialect)
-        write_content(csv_writer)
-        if path_or_file is None:
-            return out.getvalue()
-        path = Path(path_or_file)
-        path.write_text(out.getvalue())
-        return None
-
-

Ancestors

- -

Instance variables

-
-
var displayed : bool
-
-
-
- -Expand source code - -
@property
-def displayed(self) -> bool:
-    return bool(self.get_attribute("table:display"))
-
-
-
var height : int
-
-

Get the current height of the table.

-

Return: int

-
- -Expand source code - -
@property
-def height(self) -> int:
-    """Get the current height of the table.
-
-    Return: int
-    """
-    try:
-        height = self._tmap[-1] + 1
-    except Exception:
-        height = 0
-    return height
-
-
-
var name : str | None
-
-

Get / set the name of the table.

-
- -Expand source code - -
@property
-def name(self) -> str | None:
-    """Get / set the name of the table."""
-    return self.get_attribute_string("table:name")
-
-
-
var print_ranges : list[str]
-
-
-
- -Expand source code - -
@property
-def print_ranges(self) -> list[str]:
-    ranges = self.get_attribute_string("table:print-ranges")
-    if isinstance(ranges, str):
-        return ranges.split()
-    return []
-
-
-
var printable : bool
-
-
-
- -Expand source code - -
@property
-def printable(self) -> bool:
-    printable = self.get_attribute("table:print")
-    # Default value
-    if printable is None:
-        return True
-    return bool(printable)
-
-
-
var protected : bool
-
-
-
- -Expand source code - -
@property
-def protected(self) -> bool:
-    return bool(self.get_attribute("table:protected"))
-
-
-
var protection_key : str | None
-
-
-
- -Expand source code - -
@property
-def protection_key(self) -> str | None:
-    return self.get_attribute_string("table:protection-key")
-
-
-
var size : tuple[int, int]
-
-

Shortcut to get the current width and height of the table.

-

Return: (int, int)

-
- -Expand source code - -
@property
-def size(self) -> tuple[int, int]:
-    """Shortcut to get the current width and height of the table.
-
-    Return: (int, int)
-    """
-    return self.width, self.height
-
-
-
var style : str | None
-
-

Get / set the style of the table

-

Return: str

-
- -Expand source code - -
@property
-def style(self) -> str | None:
-    """Get / set the style of the table
-
-    Return: str
-    """
-    return self.get_attribute_string("table:style-name")
-
-
-
var width : int
-
-

Get the current width of the table, measured on columns.

-

Rows may have different widths, use the Table API to ensure width -consistency.

-

Return: int

-
- -Expand source code - -
@property
-def width(self) -> int:
-    """Get the current width of the table, measured on columns.
-
-    Rows may have different widths, use the Table API to ensure width
-    consistency.
-
-    Return: int
-    """
-    # Columns are our reference for user expected width
-
-    try:
-        width = self._cmap[-1] + 1
-    except Exception:
-        width = 0
-
-    # columns = self._get_columns()
-    # repeated = self.xpath(
-    #        'table:table-column/@table:number-columns-repeated')
-    # unrepeated = len(columns) - len(repeated)
-    # ws = sum(int(r) for r in repeated) + unrepeated
-    # if w != ws:
-    #    print "WARNING   ws", ws, "w", w
-
-    return width
-
-
-
-

Methods

-
-
-def append(self, something: Element | str) ‑> None -
-
-

Dispatch .append() call to append_row() or append_column().

-
- -Expand source code - -
def append(self, something: Element | str) -> None:
-    """Dispatch .append() call to append_row() or append_column()."""
-    if isinstance(something, Row):
-        self.append_row(something)
-    elif isinstance(something, Column):
-        self.append_column(something)
-    else:
-        # probably still an error
-        self._append(something)
-
-
-
-def append_cell(self, y: int | str, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Append the given cell at the "y" coordinate. Repeated cells are -accepted. If no cell is given, an empty one is created.

-

Position start at 0. So cell A4 is on row 3.

-

Other rows remain untouched.

-

Arguments

-

y – int or str

-

cell – Cell

-

returns the cell with x and y updated

-
- -Expand source code - -
def append_cell(
-    self,
-    y: int | str,
-    cell: Cell | None = None,
-    clone: bool = True,
-) -> Cell:
-    """Append the given cell at the "y" coordinate. Repeated cells are
-    accepted. If no cell is given, an empty one is created.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Other rows remain untouched.
-
-    Arguments:
-
-        y -- int or str
-
-        cell -- Cell
-
-    returns the cell with x and y updated
-    """
-    if cell is None:
-        cell = Cell()
-        clone = False
-    if clone:
-        cell = cell.clone
-    y = self._translate_y_from_any(y)
-    row = self._get_row2(y)
-    row.y = y
-    cell_back = row.append_cell(cell, clone=False)
-    self.set_row(y, row)
-    # Update width if necessary
-    self._update_width(row)
-    return cell_back
-
-
-
-def append_column(self, column: Column | None = None) ‑> Column -
-
-

Append the column at the end of the table. If no column is given, -an empty one is created.

-

ODF columns don't contain cells, only style information.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

Arguments

-

column – Column

-
- -Expand source code - -
def append_column(
-    self,
-    column: Column | None = None,
-    _repeated: int | None = None,
-) -> Column:
-    """Append the column at the end of the table. If no column is given,
-    an empty one is created.
-
-    ODF columns don't contain cells, only style information.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    Arguments:
-
-        column -- Column
-    """
-    if column is None:
-        column = Column()
-    else:
-        column = column.clone
-    if not self._cmap:
-        position = 0
-    else:
-        odf_idx = len(self._cmap) - 1
-        last_column = self._get_element_idx2(_xpath_column_idx, odf_idx)
-        if last_column is None:
-            raise ValueError
-        position = self.index(last_column) + 1
-    column.x = self.width
-    self.insert(column, position=position)
-    # Repetitions are accepted
-    if _repeated is None:
-        _repeated = column.repeated or 1
-    self._cmap = insert_map_once(self._cmap, len(self._cmap), _repeated)
-    # No need to update row widths
-    return column
-
-
-
-def append_row(self, row: Row | None = None, clone: bool = True) ‑> Row -
-
-

Append the row at the end of the table. If no row is given, an -empty one is created.

-

Position start at 0. So cell A4 is on row 3.

-

Note the columns are automatically created when the first row is -inserted in an empty table. So better insert a filled row.

-

Arguments

-

row – Row

-

_repeated – (optional), repeated value of the row

-

returns the row, with updated row.y

-
- -Expand source code - -
def append_row(
-    self,
-    row: Row | None = None,
-    clone: bool = True,
-    _repeated: int | None = None,
-) -> Row:
-    """Append the row at the end of the table. If no row is given, an
-    empty one is created.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Note the columns are automatically created when the first row is
-    inserted in an empty table. So better insert a filled row.
-
-    Arguments:
-
-        row -- Row
-
-        _repeated -- (optional), repeated value of the row
-
-    returns the row, with updated row.y
-    """
-    if row is None:
-        row = Row()
-        _repeated = 1
-    elif clone:
-        row = row.clone
-    # Appending a repeated row accepted
-    # Do not insert next to the last row because it could be in a group
-    self._append(row)
-    if _repeated is None:
-        _repeated = row.repeated or 1
-    self._tmap = insert_map_once(self._tmap, len(self._tmap), _repeated)
-    row.y = self.height - 1
-    # Initialize columns
-    if not self._get_columns():
-        repeated = row.width
-        self.insert(Column(repeated=repeated), position=0)
-        self._compute_table_cache()
-    # Update width if necessary
-    self._update_width(row)
-    return row
-
-
-
-def del_span(self, area: str | tuple | list) ‑> bool -
-
-

Delete a Cell Span. 'area' is the cell coordiante of the upper left -cell of the spanned area.

-

Area can be either one cell (like 'A1') or an area ('A1:B2'). It can -be provided as an alpha numeric value like "A1:B2' or a tuple like -(0, 0, 1, 1) or (0, 0). If an area is provided, the upper left cell -is used.

-

Arguments

-

area – str or tuple of int, cell or area coordinate

-
- -Expand source code - -
def del_span(self, area: str | tuple | list) -> bool:
-    """Delete a Cell Span. 'area' is the cell coordiante of the upper left
-    cell of the spanned area.
-
-    Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
-    be provided as an alpha numeric value like "A1:B2' or a tuple like
-    (0, 0, 1, 1) or (0, 0). If an area is provided, the upper left cell
-    is used.
-
-    Arguments:
-
-        area -- str or tuple of int, cell or area coordinate
-    """
-    # get area
-    digits = convert_coordinates(area)
-    if len(digits) == 4:
-        x, y, _z, _t = digits
-    else:
-        x, y = digits
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    start = x, y
-    # check for previous span
-    cell0 = self.get_cell(start)
-    nb_cols = cell0.get_attribute_integer("table:number-columns-spanned")
-    if nb_cols is None:
-        return False
-    nb_rows = cell0.get_attribute_integer("table:number-rows-spanned")
-    if nb_rows is None:
-        return False
-    z = x + nb_cols - 1
-    t = y + nb_rows - 1
-    cells = self.get_cells((x, y, z, t))
-    cells[0][0].del_attribute("table:number-columns-spanned")
-    cells[0][0].del_attribute("table:number-rows-spanned")
-    for cell in cells[0][1:]:
-        cell.tag = "table:table-cell"
-    for row in cells[1:]:
-        for cell in row:
-            cell.tag = "table:table-cell"
-    # replace cells in table
-    self.set_cells(cells, coord=start, clone=False)
-    return True
-
-
-
-def delete_cell(self, coord: tuple | list | str) ‑> None -
-
-

Delete the cell at the given coordinates, so that next cells are -shifted to the left.

-

Coordinates are either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4".

-

Use set_value() for erasing value.

-

Arguments

-

coord – (int, int) or str

-
- -Expand source code - -
def delete_cell(self, coord: tuple | list | str) -> None:
-    """Delete the cell at the given coordinates, so that next cells are
-    shifted to the left.
-
-    Coordinates are either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4".
-
-    Use set_value() for erasing value.
-
-    Arguments:
-
-        coord -- (int, int) or str
-    """
-    x, y = self._translate_cell_coordinates(coord)
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    # Outside the defined table
-    if y >= self.height:
-        return
-    # Inside the defined table
-    row = self._get_row2_base(y)
-    if row is None:
-        raise ValueError
-    row.delete_cell(x)
-    # self.set_row(y, row)
-
-
-
-def delete_column(self, x: int | str) ‑> None -
-
-

Delete the column at the given position. ODF columns don't contain -cells, only style information.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

Arguments

-

x – int or str

-
- -Expand source code - -
def delete_column(self, x: int | str) -> None:
-    """Delete the column at the given position. ODF columns don't contain
-    cells, only style information.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    Arguments:
-
-        x -- int or str
-    """
-    x = self._translate_x_from_any(x)
-    # Outside the defined table
-    if x >= self.width:
-        return
-    # Inside the defined table
-    delete_item_in_vault(x, self, _xpath_column_idx, "_cmap")
-    # Update width
-    width = self.width
-    for row in self._get_rows():
-        if row.width >= width:
-            row.delete_cell(x)
-
-
-
-def delete_named_range(self, name: str) ‑> None -
-
-

Delete the Named Range of specified name from the spreadsheet. -Beware : named ranges are stored at the body level, thus do not call -this method on a cloned table.

-

Arguments

-

name – str

-
- -Expand source code - -
def delete_named_range(self, name: str) -> None:
-    """Delete the Named Range of specified name from the spreadsheet.
-    Beware : named ranges are stored at the body level, thus do not call
-    this method on a cloned table.
-
-    Arguments:
-
-        name -- str
-    """
-    name = name.strip()
-    if not name:
-        raise ValueError("Name required.")
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document.")
-    body.delete_named_range(name)
-
-
-
-def delete_row(self, y: int | str) ‑> None -
-
-

Delete the row at the given "y" position.

-

Position start at 0. So cell A4 is on row 3.

-

Arguments

-

y – int or str

-
- -Expand source code - -
def delete_row(self, y: int | str) -> None:
-    """Delete the row at the given "y" position.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Arguments:
-
-        y -- int or str
-    """
-    y = self._translate_y_from_any(y)
-    # Outside the defined table
-    if y >= self.height:
-        return
-    # Inside the defined table
-    delete_item_in_vault(y, self, _xpath_row_idx, "_tmap")
-
-
-
-def extend_rows(self, rows: list[Row] | None = None) ‑> None -
-
-

Append a list of rows at the end of the table.

-

Arguments

-

rows – list of Row

-
- -Expand source code - -
def extend_rows(self, rows: list[Row] | None = None) -> None:
-    """Append a list of rows at the end of the table.
-
-    Arguments:
-
-        rows -- list of Row
-    """
-    if rows is None:
-        rows = []
-    self.extend(rows)
-    self._compute_table_cache()
-    # Update width if necessary
-    width = self.width
-    for row in self.traverse():
-        if row.width > width:
-            width = row.width
-    diff = width - self.width
-    if diff > 0:
-        self.append_column(Column(repeated=diff))
-
-
-
-def get_cell(self, coord: tuple | list | str, clone: bool = True, keep_repeated: bool = True) ‑> Cell -
-
-

Get the cell at the given coordinates.

-

They are either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4".

-

A copy is returned, use set_cell to push it back.

-

Arguments

-

coord – (int, int) or str

-

Return: Cell

-
- -Expand source code - -
def get_cell(
-    self,
-    coord: tuple | list | str,
-    clone: bool = True,
-    keep_repeated: bool = True,
-) -> Cell:
-    """Get the cell at the given coordinates.
-
-    They are either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4".
-
-    A copy is returned, use ``set_cell`` to push it back.
-
-    Arguments:
-
-        coord -- (int, int) or str
-
-    Return: Cell
-    """
-    x, y = self._translate_cell_coordinates(coord)
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    # Outside the defined table
-    if y >= self.height:
-        cell = Cell()
-    else:
-        # Inside the defined table
-        row = self._get_row2_base(y)
-        if row is None:
-            raise ValueError
-        read_cell = row.get_cell(x, clone=clone)
-        if read_cell is None:
-            raise ValueError
-        cell = read_cell
-        if not keep_repeated:
-            repeated = cell.repeated or 1
-            if repeated >= 2:
-                cell.repeated = None
-    cell.x = x
-    cell.y = y
-    return cell
-
-
-
-def get_cells(self, coord: tuple | list | str | None = None, cell_type: str | None = None, style: str | None = None, content: str | None = None, flat: bool = False) ‑> list -
-
-

Get the cells matching the criteria. If 'coord' is None, -parse the whole table, else parse the area defined by 'coord'.

-

Filter by -cell_type = "all" -will retrieve cells of any -type, aka non empty cells.

-

If flat is True (default is False), the method return a single list -of all the values, else a list of lists of cells.

-

if cell_type, style and content are None, get_cells() will return -the exact number of cells of the area, including empty cells.

-

Arguments

-

coordinates – str or tuple of int : coordinates of area

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

content – str regex

-

style – str

-

flat – boolean

-

Return: list of tuples

-
- -Expand source code - -
def get_cells(
-    self,
-    coord: tuple | list | str | None = None,
-    cell_type: str | None = None,
-    style: str | None = None,
-    content: str | None = None,
-    flat: bool = False,
-) -> list:
-    """Get the cells matching the criteria. If 'coord' is None,
-    parse the whole table, else parse the area defined by 'coord'.
-
-    Filter by  cell_type = "all"  will retrieve cells of any
-    type, aka non empty cells.
-
-    If flat is True (default is False), the method return a single list
-    of all the values, else a list of lists of cells.
-
-    if cell_type, style and content are None, get_cells() will return
-    the exact number of cells of the area, including empty cells.
-
-    Arguments:
-
-        coordinates -- str or tuple of int : coordinates of area
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        content -- str regex
-
-        style -- str
-
-        flat -- boolean
-
-    Return: list of tuples
-    """
-    if coord:
-        x, y, z, t = self._translate_table_coordinates(coord)
-    else:
-        x = y = z = t = None
-    if flat:
-        cells: list[Cell] = []
-        for row in self.traverse(start=y, end=t):
-            row_cells = row.get_cells(
-                coord=(x, z),
-                cell_type=cell_type,
-                style=style,
-                content=content,
-            )
-            cells.extend(row_cells)
-        return cells
-    else:
-        lcells: list[list[Cell]] = []
-        for row in self.traverse(start=y, end=t):
-            row_cells = row.get_cells(
-                coord=(x, z),
-                cell_type=cell_type,
-                style=style,
-                content=content,
-            )
-            lcells.append(row_cells)
-        return lcells
-
-
-
-def get_column(self, x: int | str) ‑> Column -
-
-

Get the column at the given "x" position.

-

ODF columns don't contain cells, only style information.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

A copy is returned, use set_column() to push it back.

-

Arguments

-

x – int or str

-

Return: Column

-
- -Expand source code - -
def get_column(self, x: int | str) -> Column:
-    """Get the column at the given "x" position.
-
-    ODF columns don't contain cells, only style information.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    A copy is returned, use set_column() to push it back.
-
-    Arguments:
-
-        x -- int or str
-
-    Return: Column
-    """
-    x = self._translate_x_from_any(x)
-    column = self._get_column2(x)
-    if column is None:
-        raise ValueError
-    column.x = x
-    return column
-
-
-
-def get_column_cells(self, x: int | str, style: str | None = None, content: str | None = None, cell_type: str | None = None, complete: bool = False) ‑> list[Cell | None] -
-
-

Get the list of cells at the given position.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

Filter by cell_type, with cell_type 'all' will retrieve cells of any -type, aka non empty cells.

-

If complete is True, replace missing values by None.

-

Arguments

-

x – int or str

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

content – str regex

-

style – str

-

complete – boolean

-

Return: list of Cell

-
- -Expand source code - -
def get_column_cells(  # noqa: C901
-    self,
-    x: int | str,
-    style: str | None = None,
-    content: str | None = None,
-    cell_type: str | None = None,
-    complete: bool = False,
-) -> list[Cell | None]:
-    """Get the list of cells at the given position.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    Filter by cell_type, with cell_type 'all' will retrieve cells of any
-    type, aka non empty cells.
-
-    If complete is True, replace missing values by None.
-
-    Arguments:
-
-        x -- int or str
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        content -- str regex
-
-        style -- str
-
-        complete -- boolean
-
-    Return: list of Cell
-    """
-    x = self._translate_x_from_any(x)
-    if cell_type:
-        cell_type = cell_type.lower().strip()
-    cells: list[Cell | None] = []
-    if not style and not content and not cell_type:
-        for row in self.traverse():
-            cells.append(row.get_cell(x, clone=True))
-        return cells
-    for row in self.traverse():
-        cell = row.get_cell(x, clone=True)
-        if cell is None:
-            raise ValueError
-        # Filter the cells by cell_type
-        if cell_type:
-            ctype = cell.type
-            if not ctype or not (ctype == cell_type or cell_type == "all"):
-                if complete:
-                    cells.append(None)
-                continue
-        # Filter the cells with the regex
-        if content and not cell.match(content):
-            if complete:
-                cells.append(None)
-            continue
-        # Filter the cells with the style
-        if style and style != cell.style:
-            if complete:
-                cells.append(None)
-            continue
-        cells.append(cell)
-    return cells
-
-
-
-def get_column_values(self, x: int | str, cell_type: str | None = None, complete: bool = True, get_type: bool = False) ‑> list[typing.Any] -
-
-

Shortcut to get the list of Python values for the cells at the -given position.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

Filter by cell_type, with cell_type 'all' will retrieve cells of any -type, aka non empty cells. -If cell_type and complete is True, replace missing values by None.

-

If get_type is True, returns a tuple (value, ODF type of value)

-

Arguments

-

x – int or str

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

complete – boolean

-

get_type – boolean

-

Return: list of Python types

-
- -Expand source code - -
def get_column_values(
-    self,
-    x: int | str,
-    cell_type: str | None = None,
-    complete: bool = True,
-    get_type: bool = False,
-) -> list[Any]:
-    """Shortcut to get the list of Python values for the cells at the
-    given position.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    Filter by cell_type, with cell_type 'all' will retrieve cells of any
-    type, aka non empty cells.
-    If cell_type and complete is True, replace missing values by None.
-
-    If get_type is True, returns a tuple (value, ODF type of value)
-
-    Arguments:
-
-        x -- int or str
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        complete -- boolean
-
-        get_type -- boolean
-
-    Return: list of Python types
-    """
-    cells = self.get_column_cells(
-        x, style=None, content=None, cell_type=cell_type, complete=complete
-    )
-    values: list[Any] = []
-    for cell in cells:
-        if cell is None:
-            if complete:
-                if get_type:
-                    values.append((None, None))
-                else:
-                    values.append(None)
-            continue
-        if cell_type:
-            ctype = cell.type
-            if not ctype or not (ctype == cell_type or cell_type == "all"):
-                if complete:
-                    if get_type:
-                        values.append((None, None))
-                    else:
-                        values.append(None)
-                continue
-        values.append(cell.get_value(get_type=get_type))
-    return values
-
-
-
-def get_columns(self, coord: tuple | list | str | None = None, style: str | None = None) ‑> list[Column] -
-
-

Get the list of columns matching the criteria. Each result is a -tuple of (x, column).

-

Arguments

-

coord – str or tuple of int : coordinates of columns

-

style – str

-

Return: list of columns

-
- -Expand source code - -
def get_columns(
-    self,
-    coord: tuple | list | str | None = None,
-    style: str | None = None,
-) -> list[Column]:
-    """Get the list of columns matching the criteria. Each result is a
-    tuple of (x, column).
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates of columns
-
-        style -- str
-
-    Return: list of columns
-    """
-    if coord:
-        x, _y, _z, t = self._translate_column_coordinates(coord)
-    else:
-        x = t = None
-    if not style:
-        return list(self.traverse_columns(start=x, end=t))
-    columns = []
-    for column in self.traverse_columns(start=x, end=t):
-        if style != column.style:
-            continue
-        columns.append(column)
-    return columns
-
-
-
-def get_named_range(self, name: str) ‑> NamedRange -
-
-

Returns the Name Ranges of the specified name. If -table_name is provided, limits the search to these tables. -Beware : named ranges are stored at the body level, thus do not call -this method on a cloned table.

-

Arguments

-

name – str, name of the named range object

-

Return : NamedRange

-
- -Expand source code - -
def get_named_range(self, name: str) -> NamedRange:
-    """Returns the Name Ranges of the specified name. If
-    table_name is provided, limits the search to these tables.
-    Beware : named ranges are stored at the body level, thus do not call
-    this method on a cloned table.
-
-    Arguments:
-
-        name -- str, name of the named range object
-
-    Return : NamedRange
-    """
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document")
-    return body.get_named_range(name)  # type: ignore
-
-
-
-def get_named_ranges(self, table_name: str | list[str] | None = None) ‑> list[NamedRange] -
-
-

Returns the list of available Name Ranges of the spreadsheet. If -table_name is provided, limits the search to these tables. -Beware : named ranges are stored at the body level, thus do not call -this method on a cloned table.

-

Arguments

-

table_names – str or list of str, names of tables

-

Return : list of table_range

-
- -Expand source code - -
def get_named_ranges(  # type: ignore
-    self,
-    table_name: str | list[str] | None = None,
-) -> list[NamedRange]:
-    """Returns the list of available Name Ranges of the spreadsheet. If
-    table_name is provided, limits the search to these tables.
-    Beware : named ranges are stored at the body level, thus do not call
-    this method on a cloned table.
-
-    Arguments:
-
-        table_names -- str or list of str, names of tables
-
-    Return : list of table_range
-    """
-    body = self.document_body
-    if not body:
-        return []
-    all_named_ranges = body.get_named_ranges()
-    if not table_name:
-        return all_named_ranges  # type:ignore
-    filter_ = []
-    if isinstance(table_name, str):
-        filter_.append(table_name)
-    elif isiterable(table_name):
-        filter_.extend(table_name)
-    else:
-        raise ValueError(
-            f"table_name must be string or Iterable, not {type(table_name)}"
-        )
-    return [
-        nr for nr in all_named_ranges if nr.table_name in filter_  # type:ignore
-    ]
-
-
-
-def get_row(self, y: int | str, clone: bool = True, create: bool = True) ‑> Row -
-
-

Get the row at the given "y" position.

-

Position start at 0. So cell A4 is on row 3.

-

A copy is returned, use set_cell() to push it back.

-

Arguments

-

y – int or str

-

Return: Row

-
- -Expand source code - -
def get_row(self, y: int | str, clone: bool = True, create: bool = True) -> Row:
-    """Get the row at the given "y" position.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    A copy is returned, use set_cell() to push it back.
-
-    Arguments:
-
-        y -- int or str
-
-    Return: Row
-    """
-    # fixme : keep repeat ? maybe an option to functions : "raw=False"
-    y = self._translate_y_from_any(y)
-    row = self._get_row2(y, clone=clone, create=create)
-    if row is None:
-        raise ValueError("Row not found")
-    row.y = y
-    return row
-
-
-
-def get_row_values(self, y: int | str, cell_type: str | None = None, complete: bool = True, get_type: bool = False) ‑> list -
-
-

Shortcut to get the list of Python values for the cells of the row -at the given "y" position.

-

Position start at 0. So cell A4 is on row 3.

-

Filter by cell_type, with cell_type 'all' will retrieve cells of any -type, aka non empty cells. -If cell_type and complete is True, replace missing values by None.

-

If get_type is True, returns a tuple (value, ODF type of value)

-

Arguments

-

y – int, str

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

complete – boolean

-

get_type – boolean

-

Return: list of lists of Python types

-
- -Expand source code - -
def get_row_values(
-    self,
-    y: int | str,
-    cell_type: str | None = None,
-    complete: bool = True,
-    get_type: bool = False,
-) -> list:
-    """Shortcut to get the list of Python values for the cells of the row
-    at the given "y" position.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Filter by cell_type, with cell_type 'all' will retrieve cells of any
-    type, aka non empty cells.
-    If cell_type and complete is True, replace missing values by None.
-
-    If get_type is True, returns a tuple (value, ODF type of value)
-
-    Arguments:
-
-        y -- int, str
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        complete -- boolean
-
-        get_type -- boolean
-
-    Return: list of lists of Python types
-    """
-    values = self.get_row(y, clone=False).get_values(
-        cell_type=cell_type, complete=complete, get_type=get_type
-    )
-    # complete row to match column width
-    if complete:
-        if get_type:
-            values.extend([(None, None)] * (self.width - len(values)))
-        else:
-            values.extend([None] * (self.width - len(values)))
-    return values
-
-
-
-def get_rows(self, coord: tuple | list | str | None = None, style: str | None = None, content: str | None = None) ‑> list[Row] -
-
-

Get the list of rows matching the criteria.

-

Filter by coordinates will parse the area defined by the coordinates.

-

Arguments

-

coord – str or tuple of int : coordinates of rows

-

content – str regex

-

style – str

-

Return: list of rows

-
- -Expand source code - -
def get_rows(
-    self,
-    coord: tuple | list | str | None = None,
-    style: str | None = None,
-    content: str | None = None,
-) -> list[Row]:
-    """Get the list of rows matching the criteria.
-
-    Filter by coordinates will parse the area defined by the coordinates.
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates of rows
-
-        content -- str regex
-
-        style -- str
-
-    Return: list of rows
-    """
-    if coord:
-        _x, y, _z, t = self._translate_table_coordinates(coord)
-    else:
-        y = t = None
-    # fixme : not clones ?
-    if not content and not style:
-        return list(self.traverse(start=y, end=t))
-    rows = []
-    for row in self.traverse(start=y, end=t):
-        if content and not row.match(content):
-            continue
-        if style and style != row.style:
-            continue
-        rows.append(row)
-    return rows
-
-
-
-def get_value(self, coord: tuple | list | str, get_type: bool = False) ‑> Any -
-
-

Shortcut to get the Python value of the cell at the given -coordinates.

-

If get_type is True, returns the tuples (value, ODF type)

-

coord is either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4". If an Area is given, the upper -left position is used as coord.

-

Arguments

-

coord – (int, int) or str : coordinate

-

Return: Python type

-
- -Expand source code - -
def get_value(
-    self,
-    coord: tuple | list | str,
-    get_type: bool = False,
-) -> Any:
-    """Shortcut to get the Python value of the cell at the given
-    coordinates.
-
-    If get_type is True, returns the tuples (value, ODF type)
-
-    coord is either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4". If an Area is given, the upper
-    left position is used as coord.
-
-    Arguments:
-
-        coord -- (int, int) or str : coordinate
-
-    Return: Python type
-    """
-    x, y = self._translate_cell_coordinates(coord)
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    # Outside the defined table
-    if y >= self.height:
-        if get_type:
-            return (None, None)
-        return None
-    else:
-        # Inside the defined table
-        row = self._get_row2_base(y)
-        if row is None:
-            raise ValueError
-        cell = row._get_cell2_base(x)
-        if cell is None:
-            if get_type:
-                return (None, None)
-            return None
-        return cell.get_value(get_type=get_type)
-
-
-
-def get_values(self, coord: tuple | list | str | None = None, cell_type: str | None = None, complete: bool = True, get_type: bool = False, flat: bool = False) ‑> list -
-
-

Get a matrix of values of the table.

-

Filter by coordinates will parse the area defined by the coordinates.

-

If 'cell_type' is used and 'complete' is True (default), missing values -are replaced by None. -Filter by ' cell_type = "all" ' will retrieve cells of any -type, aka non empty cells.

-

If 'cell_type' is None, complete is always True : with no cell type -queried, get_values() returns None for each empty cell, the length -each lists is equal to the width of the table.

-

If get_type is True, returns tuples (value, ODF type of value), or -(None, None) for empty cells with complete True.

-

If flat is True, the methods return a single list of all the values. -By default, flat is False.

-

Arguments

-

coord – str or tuple of int : coordinates of area

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

complete – boolean

-

get_type – boolean

-

Return: list of lists of Python types

-
- -Expand source code - -
def get_values(
-    self,
-    coord: tuple | list | str | None = None,
-    cell_type: str | None = None,
-    complete: bool = True,
-    get_type: bool = False,
-    flat: bool = False,
-) -> list:
-    """Get a matrix of values of the table.
-
-    Filter by coordinates will parse the area defined by the coordinates.
-
-    If 'cell_type' is used and 'complete' is True (default), missing values
-    are replaced by None.
-    Filter by ' cell_type = "all" ' will retrieve cells of any
-    type, aka non empty cells.
-
-    If 'cell_type' is None, complete is always True : with no cell type
-    queried, get_values() returns None for each empty cell, the length
-    each lists is equal to the width of the table.
-
-    If get_type is True, returns tuples (value, ODF type of value), or
-    (None, None) for empty cells with complete True.
-
-    If flat is True, the methods return a single list of all the values.
-    By default, flat is False.
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates of area
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        complete -- boolean
-
-        get_type -- boolean
-
-    Return: list of lists of Python types
-    """
-    if coord:
-        x, y, z, t = self._translate_table_coordinates(coord)
-    else:
-        x = y = z = t = None
-    data = []
-    for row in self.traverse(start=y, end=t):
-        if z is None:
-            width = self.width
-        else:
-            width = min(z + 1, self.width)
-        if x is not None:
-            width -= x
-        values = row.get_values(
-            (x, z),
-            cell_type=cell_type,
-            complete=complete,
-            get_type=get_type,
-        )
-        # complete row to match request width
-        if complete:
-            if get_type:
-                values.extend([(None, None)] * (width - len(values)))
-            else:
-                values.extend([None] * (width - len(values)))
-        if flat:
-            data.extend(values)
-        else:
-            data.append(values)
-    return data
-
-
-
-def insert_cell(self, coord: tuple | list | str, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Insert the given cell at the given coordinates. If no cell is -given, an empty one is created.

-

Coordinates are either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4".

-

Cells on the right are shifted. Other rows remain untouched.

-

Arguments

-

coord – (int, int) or str

-

cell – Cell

-

returns the cell with x and y updated

-
- -Expand source code - -
def insert_cell(
-    self,
-    coord: tuple | list | str,
-    cell: Cell | None = None,
-    clone: bool = True,
-) -> Cell:
-    """Insert the given cell at the given coordinates. If no cell is
-    given, an empty one is created.
-
-    Coordinates are either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4".
-
-    Cells on the right are shifted. Other rows remain untouched.
-
-    Arguments:
-
-        coord -- (int, int) or str
-
-        cell -- Cell
-
-    returns the cell with x and y updated
-    """
-    if cell is None:
-        cell = Cell()
-        clone = False
-    if clone:
-        cell = cell.clone
-    x, y = self._translate_cell_coordinates(coord)
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    row = self._get_row2(y, clone=True)
-    row.y = y
-    row.repeated = None
-    cell_back = row.insert_cell(x, cell, clone=False)
-    self.set_row(y, row, clone=False)
-    # Update width if necessary
-    self._update_width(row)
-    return cell_back
-
-
-
-def insert_column(self, x: int | str, column: Column | None = None) ‑> Column -
-
-

Insert the column before the given "x" position. If no column is -given, an empty one is created.

-

ODF columns don't contain cells, only style information.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

Arguments

-

x – int or str

-

column – Column

-
- -Expand source code - -
def insert_column(
-    self,
-    x: int | str,
-    column: Column | None = None,
-) -> Column:
-    """Insert the column before the given "x" position. If no column is
-    given, an empty one is created.
-
-    ODF columns don't contain cells, only style information.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    Arguments:
-
-        x -- int or str
-
-        column -- Column
-    """
-    if column is None:
-        column = Column()
-    x = self._translate_x_from_any(x)
-    diff = x - self.width
-    if diff < 0:
-        column_back = insert_item_in_vault(
-            x, column, self, _xpath_column_idx, "_cmap"
-        )
-    elif diff == 0:
-        column_back = self.append_column(column.clone)
-    else:
-        self.append_column(Column(repeated=diff), _repeated=diff)
-        column_back = self.append_column(column.clone)
-    column_back.x = x  # type: ignore
-    # Repetitions are accepted
-    repeated = column.repeated or 1
-    # Update width on every row
-    for row in self._get_rows():
-        if row.width > x:
-            row.insert_cell(x, Cell(repeated=repeated))
-        # Shorter rows don't need insert
-        # Longer rows shouldn't exist!
-    return column_back  # type: ignore
-
-
-
-def insert_row(self, y: str | int, row: Row | None = None, clone: bool = True) ‑> Row -
-
-

Insert the row before the given "y" position. If no row is given, -an empty one is created.

-

Position start at 0. So cell A4 is on row 3.

-

If row is None, a new empty row is created.

-

Arguments

-

y – int or str

-

row – Row

-

returns the row, with updated row.y

-
- -Expand source code - -
def insert_row(
-    self, y: str | int, row: Row | None = None, clone: bool = True
-) -> Row:
-    """Insert the row before the given "y" position. If no row is given,
-    an empty one is created.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    If row is None, a new empty row is created.
-
-    Arguments:
-
-        y -- int or str
-
-        row -- Row
-
-    returns the row, with updated row.y
-    """
-    if row is None:
-        row = Row()
-        clone = False
-    y = self._translate_y_from_any(y)
-    diff = y - self.height
-    if diff < 0:
-        row_back = insert_item_in_vault(y, row, self, _xpath_row_idx, "_tmap")
-    elif diff == 0:
-        row_back = self.append_row(row, clone=clone)
-    else:
-        self.append_row(Row(repeated=diff), _repeated=diff, clone=False)
-        row_back = self.append_row(row, clone=clone)
-    row_back.y = y  # type: ignore
-    # Update width if necessary
-    self._update_width(row_back)  # type: ignore
-    return row_back  # type: ignore
-
-
-
-def is_column_empty(self, x: int | str, aggressive: bool = False) ‑> bool -
-
-

Return wether every cell in the column at "x" position has no value -or the value evaluates to False (empty string), and no style.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

If aggressive is True, empty cells with style are considered empty.

-

Return: bool

-
- -Expand source code - -
def is_column_empty(self, x: int | str, aggressive: bool = False) -> bool:
-    """Return wether every cell in the column at "x" position has no value
-    or the value evaluates to False (empty string), and no style.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    If aggressive is True, empty cells with style are considered empty.
-
-    Return: bool
-    """
-    for cell in self.get_column_cells(x):
-        if cell is None:
-            continue
-        if not cell.is_empty(aggressive=aggressive):
-            return False
-    return True
-
-
-
-def is_empty(self, aggressive: bool = False) ‑> bool -
-
-

Return whether every cell in the table has no value or the value -evaluates to False (empty string), and no style.

-

If aggressive is True, empty cells with style are considered empty.

-

Arguments

-

aggressive – bool

-
- -Expand source code - -
def is_empty(self, aggressive: bool = False) -> bool:
-    """Return whether every cell in the table has no value or the value
-    evaluates to False (empty string), and no style.
-
-    If aggressive is True, empty cells with style are considered empty.
-
-    Arguments:
-
-        aggressive -- bool
-    """
-    return all(row.is_empty(aggressive=aggressive) for row in self._get_rows())
-
-
-
-def is_row_empty(self, y: int | str, aggressive: bool = False) ‑> bool -
-
-

Return wether every cell in the row at the given "y" position has -no value or the value evaluates to False (empty string), and no style.

-

Position start at 0. So cell A4 is on row 3.

-

If aggressive is True, empty cells with style are considered empty.

-

Arguments

-

y – int or str

-

aggressive – bool

-
- -Expand source code - -
def is_row_empty(self, y: int | str, aggressive: bool = False) -> bool:
-    """Return wether every cell in the row at the given "y" position has
-    no value or the value evaluates to False (empty string), and no style.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    If aggressive is True, empty cells with style are considered empty.
-
-    Arguments:
-
-        y -- int or str
-
-        aggressive -- bool
-    """
-    return self.get_row(y, clone=False).is_empty(aggressive=aggressive)
-
-
-
-def iter_values(self, coord: tuple | list | str | None = None, cell_type: str | None = None, complete: bool = True, get_type: bool = False) ‑> collections.abc.Iterator[list] -
-
-

Iterate through lines of Python values of the table.

-

Filter by coordinates will parse the area defined by the coordinates.

-

cell_type, complete, grt_type : see get_values()

-

Arguments

-

coord – str or tuple of int : coordinates of area

-

cell_type – 'boolean', 'float', 'date', 'string', 'time', -'currency', 'percentage' or 'all'

-

complete – boolean

-

get_type – boolean

-

Return: iterator of lists

-
- -Expand source code - -
def iter_values(
-    self,
-    coord: tuple | list | str | None = None,
-    cell_type: str | None = None,
-    complete: bool = True,
-    get_type: bool = False,
-) -> Iterator[list]:
-    """Iterate through lines of Python values of the table.
-
-    Filter by coordinates will parse the area defined by the coordinates.
-
-    cell_type, complete, grt_type : see get_values()
-
-
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates of area
-
-        cell_type -- 'boolean', 'float', 'date', 'string', 'time',
-                     'currency', 'percentage' or 'all'
-
-        complete -- boolean
-
-        get_type -- boolean
-
-    Return: iterator of lists
-    """
-    if coord:
-        x, y, z, t = self._translate_table_coordinates(coord)
-    else:
-        x = y = z = t = None
-    for row in self.traverse(start=y, end=t):
-        if z is None:
-            width = self.width
-        else:
-            width = min(z + 1, self.width)
-        if x is not None:
-            width -= x
-        values = row.get_values(
-            (x, z),
-            cell_type=cell_type,
-            complete=complete,
-            get_type=get_type,
-        )
-        # complete row to match column width
-        if complete:
-            if get_type:
-                values.extend([(None, None)] * (width - len(values)))
-            else:
-                values.extend([None] * (width - len(values)))
-        yield values
-
-
-
-def rstrip(self, aggressive: bool = False) ‑> None -
-
-

Remove in-place empty rows below and empty cells at the right of -the table. Cells are empty if they contain no value or it evaluates -to False, and no style.

-

If aggressive is True, empty cells with style are removed too.

-

Argument

-

aggressive – bool

-
- -Expand source code - -
def rstrip(self, aggressive: bool = False) -> None:
-    """Remove *in-place* empty rows below and empty cells at the right of
-    the table. Cells are empty if they contain no value or it evaluates
-    to False, and no style.
-
-    If aggressive is True, empty cells with style are removed too.
-
-    Argument:
-
-        aggressive -- bool
-    """
-    # Step 1: remove empty rows below the table
-    for row in reversed(self._get_rows()):
-        if row.is_empty(aggressive=aggressive):
-            row.parent.delete(row)  # type: ignore
-        else:
-            break
-    # Step 2: rstrip remaining rows
-    max_width = 0
-    for row in self._get_rows():
-        row.rstrip(aggressive=aggressive)
-        # keep count of the biggest row
-        max_width = max(max_width, row.width)
-    # raz cache of rows
-    self._indexes["_tmap"] = {}
-    # Step 3: trim columns to match max_width
-    columns = self._get_columns()
-    repeated_cols = self.xpath("table:table-column/@table:number-columns-repeated")
-    if not isinstance(repeated_cols, list):
-        raise TypeError
-    unrepeated = len(columns) - len(repeated_cols)
-    column_width = sum(int(r) for r in repeated_cols) + unrepeated  # type: ignore
-    diff = column_width - max_width
-    if diff > 0:
-        for column in reversed(columns):
-            repeated = column.repeated or 1
-            repeated = repeated - diff
-            if repeated > 0:
-                column.repeated = repeated
-                break
-            else:
-                column.parent.delete(column)
-                diff = -repeated
-                if diff == 0:
-                    break
-    # raz cache of columns
-    self._indexes["_cmap"] = {}
-    self._compute_table_cache()
-
-
-
-def set_cell(self, coord: tuple | list | str, cell: Cell | None = None, clone: bool = True) ‑> Cell -
-
-

Replace a cell of the table at the given coordinates.

-

They are either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4".

-

Arguments

-

coord – (int, int) or str : coordinate

-

cell – Cell

-

return the cell, with x and y updated

-
- -Expand source code - -
def set_cell(
-    self,
-    coord: tuple | list | str,
-    cell: Cell | None = None,
-    clone: bool = True,
-) -> Cell:
-    """Replace a cell of the table at the given coordinates.
-
-    They are either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4".
-
-    Arguments:
-
-        coord -- (int, int) or str : coordinate
-
-        cell -- Cell
-
-    return the cell, with x and y updated
-    """
-    if cell is None:
-        cell = Cell()
-        clone = False
-    x, y = self._translate_cell_coordinates(coord)
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    cell.x = x
-    cell.y = y
-    if y >= self.height:
-        row = Row()
-        cell_back = row.set_cell(x, cell, clone=clone)
-        self.set_row(y, row, clone=False)
-    else:
-        row_read = self._get_row2_base(y)
-        if row_read is None:
-            raise ValueError
-        row = row_read
-        row.y = y
-        repeated = row.repeated or 1
-        if repeated > 1:
-            row = row.clone
-            row.repeated = None
-            cell_back = row.set_cell(x, cell, clone=clone)
-            self.set_row(y, row, clone=False)
-        else:
-            cell_back = row.set_cell(x, cell, clone=clone)
-            # Update width if necessary, since we don't use set_row
-            self._update_width(row)
-    return cell_back
-
-
-
-def set_cell_image(self, coord: tuple | list | str, image_frame: Frame, doc_type: str | None = None) ‑> None -
-
-

Do all the magic to display an image in the cell at the given -coordinates.

-

They are either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4".

-

The frame element must contain the expected image position and -dimensions.

-

DrawImage insertion depends on the document type, so the type must be -provided or the table element must be already attached to a document.

-

Arguments

-

coord – (int, int) or str

-

image_frame – Frame including an image

-

doc_type – 'spreadsheet' or 'text'

-
- -Expand source code - -
def set_cell_image(
-    self,
-    coord: tuple | list | str,
-    image_frame: Frame,
-    doc_type: str | None = None,
-) -> None:
-    """Do all the magic to display an image in the cell at the given
-    coordinates.
-
-    They are either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4".
-
-    The frame element must contain the expected image position and
-    dimensions.
-
-    DrawImage insertion depends on the document type, so the type must be
-    provided or the table element must be already attached to a document.
-
-    Arguments:
-
-        coord -- (int, int) or str
-
-        image_frame -- Frame including an image
-
-        doc_type -- 'spreadsheet' or 'text'
-    """
-    # Test document type
-    if doc_type is None:
-        body = self.document_body
-        if body is None:
-            raise ValueError("document type not found")
-        doc_type = {"office:spreadsheet": "spreadsheet", "office:text": "text"}.get(
-            body.tag
-        )
-        if doc_type is None:
-            raise ValueError("document type not supported for images")
-    # We need the end address of the image
-    x, y = self._translate_cell_coordinates(coord)
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    cell = self.get_cell((x, y))
-    image_frame = image_frame.clone  # type: ignore
-    # Remove any previous paragraph, frame, etc.
-    for child in cell.children:
-        cell.delete(child)
-    # Now it all depends on the document type
-    if doc_type == "spreadsheet":
-        image_frame.anchor_type = "char"
-        # The frame needs end coordinates
-        width, height = image_frame.size
-        image_frame.set_attribute("table:end-x", width)
-        image_frame.set_attribute("table:end-y", height)
-        # FIXME what happens when the address changes?
-        address = f"{self.name}.{digit_to_alpha(x)}{y + 1}"
-        image_frame.set_attribute("table:end-cell-address", address)
-        # The frame is directly in the cell
-        cell.append(image_frame)
-    elif doc_type == "text":
-        # The frame must be in a paragraph
-        cell.set_value("")
-        paragraph = cell.get_element("text:p")
-        if paragraph is None:
-            raise ValueError
-        paragraph.append(image_frame)
-    self.set_cell(coord, cell)
-
-
-
-def set_cells(self, cells: list[list[Cell]] | list[tuple[Cell]], coord: tuple | list | str | None = None, clone: bool = True) ‑> None -
-
-

Set the cells in the table, from the 'coord' position.

-

'coord' is the coordinate of the upper left cell to be modified by -values. If 'coord' is None, default to the position (0,0) ("A1"). -If 'coord' is an area (e.g. "A2:B5"), the upper left position of this -area is used as coordinate.

-

The table is not cleared before the operation, to reset the table -before setting cells, use table.clear().

-

A list of lists is expected, with as many lists as rows to be set, and -as many cell in each sublist as cells to be setted in the row.

-

Arguments

-

cells – list of list of cells

-

coord – tuple or str

-

values – list of lists of python types

-
- -Expand source code - -
def set_cells(
-    self,
-    cells: list[list[Cell]] | list[tuple[Cell]],
-    coord: tuple | list | str | None = None,
-    clone: bool = True,
-) -> None:
-    """Set the cells in the table, from the 'coord' position.
-
-    'coord' is the coordinate of the upper left cell to be modified by
-    values. If 'coord' is None, default to the position (0,0) ("A1").
-    If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
-    area is used as coordinate.
-
-    The table is *not* cleared before the operation, to reset the table
-    before setting cells, use table.clear().
-
-    A list of lists is expected, with as many lists as rows to be set, and
-    as many cell in each sublist as cells to be setted in the row.
-
-    Arguments:
-
-        cells -- list of list of cells
-
-        coord -- tuple or str
-
-        values -- list of lists of python types
-    """
-    if coord:
-        x, y = self._translate_cell_coordinates(coord)
-    else:
-        x = y = 0
-    if y is None:
-        y = 0
-    if x is None:
-        x = 0
-    y -= 1
-    for row_cells in cells:
-        y += 1
-        if not row_cells:
-            continue
-        row = self.get_row(y, clone=True)
-        repeated = row.repeated or 1
-        if repeated >= 2:
-            row.repeated = None
-        row.set_cells(row_cells, start=x, clone=clone)
-        self.set_row(y, row, clone=False)
-        self._update_width(row)
-
-
-
-def set_column(self, x: int | str, column: Column | None = None) ‑> Column -
-
-

Replace the column at the given "x" position.

-

ODF columns don't contain cells, only style information.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

Arguments

-

x – int or str

-

column – Column

-
- -Expand source code - -
def set_column(
-    self,
-    x: int | str,
-    column: Column | None = None,
-) -> Column:
-    """Replace the column at the given "x" position.
-
-    ODF columns don't contain cells, only style information.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    Arguments:
-
-        x -- int or str
-
-        column -- Column
-    """
-    x = self._translate_x_from_any(x)
-    if column is None:
-        column = Column()
-        repeated = 1
-    else:
-        repeated = column.repeated or 1
-    column.x = x
-    # Outside the defined table ?
-    diff = x - self.width
-    if diff == 0:
-        column_back = self.append_column(column, _repeated=repeated)
-    elif diff > 0:
-        self.append_column(Column(repeated=diff), _repeated=diff)
-        column_back = self.append_column(column, _repeated=repeated)
-    else:
-        # Inside the defined table
-        column_back = set_item_in_vault(  # type: ignore
-            x, column, self, _xpath_column_idx, "_cmap"
-        )
-    return column_back
-
-
-
-def set_column_cells(self, x: int | str, cells: list[Cell]) ‑> None -
-
-

Shortcut to set the list of cells at the given position.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

The list must have the same length than the table height.

-

Arguments

-

x – int or str

-

cells – list of Cell

-
- -Expand source code - -
def set_column_cells(self, x: int | str, cells: list[Cell]) -> None:
-    """Shortcut to set the list of cells at the given position.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    The list must have the same length than the table height.
-
-    Arguments:
-
-        x -- int or str
-
-        cells -- list of Cell
-    """
-    height = self.height
-    if len(cells) != height:
-        raise ValueError(f"col mismatch: {height} cells expected")
-    cells_iterator = iter(cells)
-    for y, row in enumerate(self.traverse()):
-        row.set_cell(x, next(cells_iterator))
-        self.set_row(y, row)
-
-
-
-def set_column_values(self, x: int | str, values: list, cell_type: str | None = None, currency: str | None = None, style: str | None = None) ‑> None -
-
-

Shortcut to set the list of Python values of cells at the given -position.

-

Position start at 0. So cell C4 is on column 2. Alphabetical position -like "C" is accepted.

-

The list must have the same length than the table height.

-

Arguments

-

x – int or str

-

values – list of Python types

-

cell_type – 'boolean', 'currency', 'date', 'float', 'percentage', -'string' or 'time'

-

currency – three-letter str

-

style – str

-
- -Expand source code - -
def set_column_values(
-    self,
-    x: int | str,
-    values: list,
-    cell_type: str | None = None,
-    currency: str | None = None,
-    style: str | None = None,
-) -> None:
-    """Shortcut to set the list of Python values of cells at the given
-    position.
-
-    Position start at 0. So cell C4 is on column 2. Alphabetical position
-    like "C" is accepted.
-
-    The list must have the same length than the table height.
-
-    Arguments:
-
-        x -- int or str
-
-        values -- list of Python types
-
-        cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                     'string' or 'time'
-
-        currency -- three-letter str
-
-        style -- str
-    """
-    cells = [
-        Cell(value, cell_type=cell_type, currency=currency, style=style)
-        for value in values
-    ]
-    self.set_column_cells(x, cells)
-
-
-
-def set_named_range(self, name: str, crange: str | tuple | list, table_name: str | None = None, usage: str | None = None) ‑> None -
-
-

Create a Named Range element and insert it in the document. -Beware : named ranges are stored at the body level, thus do not call -this method on a cloned table.

-

Arguments

-

name – str, name of the named range

-

crange – str or tuple of int, cell or area coordinate

-

table_name – str, name of the table

-

uage – None or 'print-range', 'filter', 'repeat-column', 'repeat-row'

-
- -Expand source code - -
def set_named_range(
-    self,
-    name: str,
-    crange: str | tuple | list,
-    table_name: str | None = None,
-    usage: str | None = None,
-) -> None:
-    """Create a Named Range element and insert it in the document.
-    Beware : named ranges are stored at the body level, thus do not call
-    this method on a cloned table.
-
-    Arguments:
-
-        name -- str, name of the named range
-
-        crange -- str or tuple of int, cell or area coordinate
-
-        table_name -- str, name of the table
-
-        uage -- None or 'print-range', 'filter', 'repeat-column', 'repeat-row'
-    """
-    body = self.document_body
-    if not body:
-        raise ValueError("Table is not inside a document")
-    if not name:
-        raise ValueError("Name required.")
-    if table_name is None:
-        table_name = self.name
-    named_range = NamedRange(name, crange, table_name, usage)
-    body.append_named_range(named_range)
-
-
-
-def set_row(self, y: int | str, row: Row | None = None, clone: bool = True) ‑> Row -
-
-

Replace the row at the given position with the new one. Repetions of -the old row will be adjusted.

-

If row is None, a new empty row is created.

-

Position start at 0. So cell A4 is on row 3.

-

Arguments

-

y – int or str

-

row – Row

-

returns the row, with updated row.y

-
- -Expand source code - -
def set_row(self, y: int | str, row: Row | None = None, clone: bool = True) -> Row:
-    """Replace the row at the given position with the new one. Repetions of
-    the old row will be adjusted.
-
-    If row is None, a new empty row is created.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Arguments:
-
-        y -- int or str
-
-        row -- Row
-
-    returns the row, with updated row.y
-    """
-    if row is None:
-        row = Row()
-        repeated = 1
-        clone = False
-    else:
-        repeated = row.repeated or 1
-    y = self._translate_y_from_any(y)
-    row.y = y
-    # Outside the defined table ?
-    diff = y - self.height
-    if diff == 0:
-        row_back = self.append_row(row, _repeated=repeated, clone=clone)
-    elif diff > 0:
-        self.append_row(Row(repeated=diff), _repeated=diff, clone=clone)
-        row_back = self.append_row(row, _repeated=repeated, clone=clone)
-    else:
-        # Inside the defined table
-        row_back = set_item_in_vault(  # type: ignore
-            y, row, self, _xpath_row_idx, "_tmap", clone=clone
-        )
-    # print self.serialize(True)
-    # Update width if necessary
-    self._update_width(row_back)
-    return row_back
-
-
-
-def set_row_cells(self, y: int | str, cells: list | None = None) ‑> Row -
-
-

Shortcut to set all the cells of the row at the given -"y" position.

-

Position start at 0. So cell A4 is on row 3.

-

Arguments

-

y – int or str

-

cells – list of Python types

-

style – str

-

returns the row, with updated row.y

-
- -Expand source code - -
def set_row_cells(self, y: int | str, cells: list | None = None) -> Row:
-    """Shortcut to set *all* the cells of the row at the given
-    "y" position.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Arguments:
-
-        y -- int or str
-
-        cells -- list of Python types
-
-        style -- str
-
-    returns the row, with updated row.y
-    """
-    if cells is None:
-        cells = []
-    row = Row()  # needed if clones rows
-    row.extend_cells(cells)
-    return self.set_row(y, row)  # needed if clones rows
-
-
-
-def set_row_values(self, y: int | str, values: list, cell_type: str | None = None, currency: str | None = None, style: str | None = None) ‑> Row -
-
-

Shortcut to set the values of all cells of the row at the given -"y" position.

-

Position start at 0. So cell A4 is on row 3.

-

Arguments

-

y – int or str

-

values – list of Python types

-

cell_type – 'boolean', 'currency', 'date', 'float', 'percentage', -'string' or 'time'

-

currency – three-letter str

-

style – str

-

returns the row, with updated row.y

-
- -Expand source code - -
def set_row_values(
-    self,
-    y: int | str,
-    values: list,
-    cell_type: str | None = None,
-    currency: str | None = None,
-    style: str | None = None,
-) -> Row:
-    """Shortcut to set the values of *all* cells of the row at the given
-    "y" position.
-
-    Position start at 0. So cell A4 is on row 3.
-
-    Arguments:
-
-        y -- int or str
-
-        values -- list of Python types
-
-        cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                     'string' or 'time'
-
-        currency -- three-letter str
-
-        style -- str
-
-    returns the row, with updated row.y
-    """
-    row = Row()  # needed if clones rows
-    row.set_values(values, style=style, cell_type=cell_type, currency=currency)
-    return self.set_row(y, row)  # needed if clones rows
-
-
-
-def set_span(self, area: str | tuple | list, merge: bool = False) ‑> bool -
-
-

Create a Cell Span : span the first cell of the area on several -columns and/or rows. -If merge is True, replace text of the cell by the concatenation of -existing text in covered cells. -Beware : if merge is True, old text is changed, if merge is False -(the default), old text in coverd cells is still present but not -displayed by most GUI.

-

If the area defines only one cell, the set span will do nothing. -It is not allowed to apply set span to an area whose one cell already -belongs to previous cell span.

-

Area can be either one cell (like 'A1') or an area ('A1:B2'). It can -be provided as an alpha numeric value like "A1:B2' or a tuple like -(0, 0, 1, 1) or (0, 0).

-

Arguments

-

area – str or tuple of int, cell or area coordinate

-

merge – boolean

-
- -Expand source code - -
def set_span(  # noqa: C901
-    self,
-    area: str | tuple | list,
-    merge: bool = False,
-) -> bool:
-    """Create a Cell Span : span the first cell of the area on several
-    columns and/or rows.
-    If merge is True, replace text of the cell by the concatenation of
-    existing text in covered cells.
-    Beware : if merge is True, old text is changed, if merge is False
-    (the default), old text in coverd cells is still present but not
-    displayed by most GUI.
-
-    If the area defines only one cell, the set span will do nothing.
-    It is not allowed to apply set span to an area whose one cell already
-    belongs to previous cell span.
-
-    Area can be either one cell (like 'A1') or an area ('A1:B2'). It can
-    be provided as an alpha numeric value like "A1:B2' or a tuple like
-    (0, 0, 1, 1) or (0, 0).
-
-    Arguments:
-
-        area -- str or tuple of int, cell or area coordinate
-
-        merge -- boolean
-    """
-    # get area
-    digits = convert_coordinates(area)
-    if len(digits) == 4:
-        x, y, z, t = digits
-    else:
-        x, y = digits
-        z, t = digits
-    start = x, y
-    end = z, t
-    if start == end:
-        # one cell : do nothing
-        return False
-    if x is None:
-        raise ValueError
-    if y is None:
-        raise ValueError
-    if z is None:
-        raise ValueError
-    if t is None:
-        raise ValueError
-    # check for previous span
-    good = True
-    # Check boundaries and empty cells : need to crate non existent cells
-    # so don't use get_cells directly, but get_cell
-    cells = []
-    for yy in range(y, t + 1):
-        row_cells = []
-        for xx in range(x, z + 1):
-            row_cells.append(
-                self.get_cell((xx, yy), clone=True, keep_repeated=False)
-            )
-        cells.append(row_cells)
-    for row in cells:
-        for cell in row:
-            if cell._is_spanned():
-                good = False
-                break
-        if not good:
-            break
-    if not good:
-        return False
-    # Check boundaries
-    # if z >= self.width or t >= self.height:
-    #    self.set_cell(coord = end)
-    #    print area, z, t
-    #    cells = self.get_cells((x, y, z, t))
-    #    print cells
-    # do it:
-    if merge:
-        val_list = []
-        for row in cells:
-            for cell in row:
-                if cell.is_empty(aggressive=True):
-                    continue
-                val = cell.get_value()
-                if val is not None:
-                    if isinstance(val, str):
-                        val.strip()
-                    if val != "":
-                        val_list.append(val)
-                    cell.clear()
-        if val_list:
-            if len(val_list) == 1:
-                cells[0][0].set_value(val_list[0])
-            else:
-                value = " ".join([str(v) for v in val_list if v])
-                cells[0][0].set_value(value)
-    cols = z - x + 1
-    cells[0][0].set_attribute("table:number-columns-spanned", str(cols))
-    rows = t - y + 1
-    cells[0][0].set_attribute("table:number-rows-spanned", str(rows))
-    for cell in cells[0][1:]:
-        cell.tag = "table:covered-table-cell"
-    for row in cells[1:]:
-        for cell in row:
-            cell.tag = "table:covered-table-cell"
-    # replace cells in table
-    self.set_cells(cells, coord=start, clone=False)
-    return True
-
-
-
-def set_value(self, coord: tuple | list | str, value: Any, cell_type: str | None = None, currency: str | None = None, style: str | None = None) ‑> None -
-
-

Set the Python value of the cell at the given coordinates.

-

They are either a 2-uplet of (x, y) starting from 0, or a -human-readable position like "C4".

-

Arguments

-

coord – (int, int) or str

-

value – Python type

-

cell_type – 'boolean', 'currency', 'date', 'float', 'percentage', -'string' or 'time'

-

currency – three-letter str

-

style – str

-
- -Expand source code - -
def set_value(
-    self,
-    coord: tuple | list | str,
-    value: Any,
-    cell_type: str | None = None,
-    currency: str | None = None,
-    style: str | None = None,
-) -> None:
-    """Set the Python value of the cell at the given coordinates.
-
-    They are either a 2-uplet of (x, y) starting from 0, or a
-    human-readable position like "C4".
-
-    Arguments:
-
-        coord -- (int, int) or str
-
-        value -- Python type
-
-        cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                 'string' or 'time'
-
-        currency -- three-letter str
-
-        style -- str
-
-    """
-    self.set_cell(
-        coord,
-        Cell(value, cell_type=cell_type, currency=currency, style=style),
-        clone=False,
-    )
-
-
-
-def set_values(self, values: list, coord: tuple | list | str | None = None, style: str | None = None, cell_type: str | None = None, currency: str | None = None) ‑> None -
-
-

Set the value of cells in the table, from the 'coord' position -with values.

-

'coord' is the coordinate of the upper left cell to be modified by -values. If 'coord' is None, default to the position (0,0) ("A1"). -If 'coord' is an area (e.g. "A2:B5"), the upper left position of this -area is used as coordinate.

-

The table is not cleared before the operation, to reset the table -before setting values, use table.clear().

-

A list of lists is expected, with as many lists as rows, and as many -items in each sublist as cells to be setted. None values in the list -will create empty cells with no cell type (but eventually a style).

-

Arguments

-

coord – tuple or str

-

values – list of lists of python types

-

cell_type – 'boolean', 'currency', 'date', 'float', 'percentage', -'string' or 'time'

-

currency – three-letter str

-

style – str

-
- -Expand source code - -
def set_values(
-    self,
-    values: list,
-    coord: tuple | list | str | None = None,
-    style: str | None = None,
-    cell_type: str | None = None,
-    currency: str | None = None,
-) -> None:
-    """Set the value of cells in the table, from the 'coord' position
-    with values.
-
-    'coord' is the coordinate of the upper left cell to be modified by
-    values. If 'coord' is None, default to the position (0,0) ("A1").
-    If 'coord' is an area (e.g. "A2:B5"), the upper left position of this
-    area is used as coordinate.
-
-    The table is *not* cleared before the operation, to reset the table
-    before setting values, use table.clear().
-
-    A list of lists is expected, with as many lists as rows, and as many
-    items in each sublist as cells to be setted. None values in the list
-    will create empty cells with no cell type (but eventually a style).
-
-    Arguments:
-
-        coord -- tuple or str
-
-        values -- list of lists of python types
-
-        cell_type -- 'boolean', 'currency', 'date', 'float', 'percentage',
-                     'string' or 'time'
-
-        currency -- three-letter str
-
-        style -- str
-    """
-    if coord:
-        x, y = self._translate_cell_coordinates(coord)
-    else:
-        x = y = 0
-    if y is None:
-        y = 0
-    if x is None:
-        x = 0
-    y -= 1
-    for row_values in values:
-        y += 1
-        if not row_values:
-            continue
-        row = self.get_row(y, clone=True)
-        repeated = row.repeated or 1
-        if repeated >= 2:
-            row.repeated = None
-        row.set_values(
-            row_values,
-            start=x,
-            cell_type=cell_type,
-            currency=currency,
-            style=style,
-        )
-        self.set_row(y, row, clone=False)
-        self._update_width(row)
-
-
-
-def to_csv(self, path_or_file: str | Path | None = None, dialect: str = 'excel') ‑> Any -
-
-

Write the table as CSV in the file.

-

If the file is a string, it is opened as a local path. Else an -opened file-like is expected.

-

Arguments

-

path_or_file – str or file-like

-

dialect – str, python csv.dialect, can be 'excel', 'unix'…

-
- -Expand source code - -
def to_csv(
-    self,
-    path_or_file: str | Path | None = None,
-    dialect: str = "excel",
-) -> Any:
-    """Write the table as CSV in the file.
-
-    If the file is a string, it is opened as a local path. Else an
-    opened file-like is expected.
-
-    Arguments:
-
-        path_or_file -- str or file-like
-
-        dialect -- str, python csv.dialect, can be 'excel', 'unix'...
-    """
-
-    def write_content(csv_writer: object) -> None:
-        for values in self.iter_values():
-            line = []
-            for value in values:
-                if value is None:
-                    value = ""
-                if isinstance(value, str):
-                    value = value.strip()
-                line.append(value)
-            csv_writer.writerow(line)  # type: ignore
-
-    out = StringIO(newline="")
-    csv_writer = csv.writer(out, dialect=dialect)
-    write_content(csv_writer)
-    if path_or_file is None:
-        return out.getvalue()
-    path = Path(path_or_file)
-    path.write_text(out.getvalue())
-    return None
-
-
-
-def transpose(self, coord: tuple | list | str | None = None) ‑> None -
-
-

Swap in-place rows and columns of the table.

-

If 'coord' is not None, apply transpose only to the area defined by the -coordinates. Beware, if area is not square, some cells mays be over -written during the process.

-

Arguments

-

coord – str or tuple of int : coordinates of area

-

start – int or str

-
- -Expand source code - -
def transpose(self, coord: tuple | list | str | None = None) -> None:  # noqa: C901
-    """Swap *in-place* rows and columns of the table.
-
-    If 'coord' is not None, apply transpose only to the area defined by the
-    coordinates. Beware, if area is not square, some cells mays be over
-    written during the process.
-
-    Arguments:
-
-        coord -- str or tuple of int : coordinates of area
-
-        start -- int or str
-    """
-    data = []
-    if coord is None:
-        for row in self.traverse():
-            data.append(list(row.traverse()))
-        transposed_data = zip_longest(*data)
-        self.clear()
-        # new_rows = []
-        for row_cells in transposed_data:
-            if not isiterable(row_cells):
-                row_cells = (row_cells,)
-            row = Row()
-            row.extend_cells(row_cells)
-            self.append_row(row, clone=False)
-        self._compute_table_cache()
-    else:
-        x, y, z, t = self._translate_table_coordinates(coord)
-        if x is None:
-            x = 0
-        else:
-            x = min(x, self.width - 1)
-        if z is None:
-            z = self.width - 1
-        else:
-            z = min(z, self.width - 1)
-        if y is None:
-            y = 0
-        else:
-            y = min(y, self.height - 1)
-        if t is None:
-            t = self.height - 1
-        else:
-            t = min(t, self.height - 1)
-        for row in self.traverse(start=y, end=t):
-            data.append(list(row.traverse(start=x, end=z)))
-        transposed_data = zip_longest(*data)
-        # clear locally
-        w = z - x + 1
-        h = t - y + 1
-        if w != h:
-            nones = [[None] * w for i in range(h)]
-            self.set_values(nones, coord=(x, y, z, t))
-        # put transposed
-        filtered_data: list[tuple[Cell]] = []
-        for row_cells in transposed_data:
-            if isinstance(row_cells, (list, tuple)):
-                filtered_data.append(row_cells)
-            else:
-                filtered_data.append((row_cells,))
-        self.set_cells(filtered_data, (x, y, x + h - 1, y + w - 1))
-        self._compute_table_cache()
-
-
-
-def traverse(self, start: int | None = None, end: int | None = None) ‑> collections.abc.Iterator[Row] -
-
-

Yield as many row elements as expected rows in the table, i.e. -expand repetitions by returning the same row as many times as -necessary.

-
Arguments:
-
-    start -- int
-
-    end -- int
-
-

Copies are returned, use set_row() to push them back.

-
- -Expand source code - -
def traverse(  # noqa: C901
-    self,
-    start: int | None = None,
-    end: int | None = None,
-) -> Iterator[Row]:
-    """Yield as many row elements as expected rows in the table, i.e.
-    expand repetitions by returning the same row as many times as
-    necessary.
-
-        Arguments:
-
-            start -- int
-
-            end -- int
-
-    Copies are returned, use set_row() to push them back.
-    """
-    idx = -1
-    before = -1
-    y = 0
-    if start is None and end is None:
-        for juska in self._tmap:
-            idx += 1
-            if idx in self._indexes["_tmap"]:
-                row = self._indexes["_tmap"][idx]
-            else:
-                row = self._get_element_idx2(_xpath_row_idx, idx)
-                self._indexes["_tmap"][idx] = row
-            repeated = juska - before
-            before = juska
-            for _i in range(repeated or 1):
-                # Return a copy without the now obsolete repetition
-                row = row.clone
-                row.y = y
-                y += 1
-                if repeated > 1:
-                    row.repeated = None
-                yield row
-    else:
-        if start is None:
-            start = 0
-        start = max(0, start)
-        if end is None:
-            try:
-                end = self._tmap[-1]
-            except Exception:
-                end = -1
-        start_map = find_odf_idx(self._tmap, start)
-        if start_map is None:
-            return
-        if start_map > 0:
-            before = self._tmap[start_map - 1]
-        idx = start_map - 1
-        before = start - 1
-        y = start
-        for juska in self._tmap[start_map:]:
-            idx += 1
-            if idx in self._indexes["_tmap"]:
-                row = self._indexes["_tmap"][idx]
-            else:
-                row = self._get_element_idx2(_xpath_row_idx, idx)
-                self._indexes["_tmap"][idx] = row
-            repeated = juska - before
-            before = juska
-            for _i in range(repeated or 1):
-                if y <= end:
-                    row = row.clone
-                    row.y = y
-                    y += 1
-                    if repeated > 1 or (y == start and start > 0):
-                        row.repeated = None
-                    yield row
-
-
-
-def traverse_columns(self, start: int | None = None, end: int | None = None) ‑> collections.abc.Iterator[Column] -
-
-

Yield as many column elements as expected columns in the table, -i.e. expand repetitions by returning the same column as many times as -necessary.

-
Arguments:
-
-    start -- int
-
-    end -- int
-
-

Copies are returned, use set_column() to push them back.

-
- -Expand source code - -
def traverse_columns(  # noqa: C901
-    self,
-    start: int | None = None,
-    end: int | None = None,
-) -> Iterator[Column]:
-    """Yield as many column elements as expected columns in the table,
-    i.e. expand repetitions by returning the same column as many times as
-    necessary.
-
-        Arguments:
-
-            start -- int
-
-            end -- int
-
-    Copies are returned, use set_column() to push them back.
-    """
-    idx = -1
-    before = -1
-    x = 0
-    if start is None and end is None:
-        for juska in self._cmap:
-            idx += 1
-            if idx in self._indexes["_cmap"]:
-                column = self._indexes["_cmap"][idx]
-            else:
-                column = self._get_element_idx2(_xpath_column_idx, idx)
-                self._indexes["_cmap"][idx] = column
-            repeated = juska - before
-            before = juska
-            for _i in range(repeated or 1):
-                # Return a copy without the now obsolete repetition
-                column = column.clone
-                column.x = x
-                x += 1
-                if repeated > 1:
-                    column.repeated = None
-                yield column
-    else:
-        if start is None:
-            start = 0
-        start = max(0, start)
-        if end is None:
-            try:
-                end = self._cmap[-1]
-            except Exception:
-                end = -1
-        start_map = find_odf_idx(self._cmap, start)
-        if start_map is None:
-            return
-        if start_map > 0:
-            before = self._cmap[start_map - 1]
-        idx = start_map - 1
-        before = start - 1
-        x = start
-        for juska in self._cmap[start_map:]:
-            idx += 1
-            if idx in self._indexes["_cmap"]:
-                column = self._indexes["_cmap"][idx]
-            else:
-                column = self._get_element_idx2(_xpath_column_idx, idx)
-                self._indexes["_cmap"][idx] = column
-            repeated = juska - before
-            before = juska
-            for _i in range(repeated or 1):
-                if x <= end:
-                    column = column.clone
-                    column.x = x
-                    x += 1
-                    if repeated > 1 or (x == start and start > 0):
-                        column.repeated = None
-                    yield column
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/templates/index.html b/doc/templates/index.html deleted file mode 100644 index 3e342c1..0000000 --- a/doc/templates/index.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - -odfdo.templates API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.templates

-
-
-
-
-
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/toc.html b/doc/toc.html deleted file mode 100644 index 9354b2a..0000000 --- a/doc/toc.html +++ /dev/null @@ -1,2582 +0,0 @@ - - - - - - -odfdo.toc API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.toc

-
-
-

TOC class for "text:table-of-content" and IndexTitle, TabStopStyle, -IndexTitleTemplate, TocEntryTemplate related classes.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-"""TOC class for "text:table-of-content" and IndexTitle, TabStopStyle,
-IndexTitleTemplate, TocEntryTemplate related classes.
-"""
-from __future__ import annotations
-
-from typing import Any
-
-from .document import Document
-from .element import FIRST_CHILD, Element, PropDef, register_element_class
-from .paragraph import Paragraph
-from .style import Style
-
-
-def _toc_entry_style_name(level: int) -> str:
-    """Return the style name of an entry of the TOC."""
-    return f"odfto_toc_level_{level}"
-
-
-class IndexTitle(Element):
-    """The "text:index-title" element contains the title of an index.
-
-    The element has the following attributes:
-    text:name, text:protected, text:protection-key,
-    text:protection-key-digest-algorithm, text:style-name, xml:id.
-
-    The actual title is stored in a child element
-    """
-
-    _tag = "text:index-title"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "text:style-name"),
-        PropDef("xml_id", "xml:id"),
-        PropDef("protected", "text:protected"),
-        PropDef("protection_key", "text:protection-key"),
-        PropDef(
-            "protection_key_digest_algorithm", "text:protection-key-digest-algorithm"
-        ),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        style: str | None = None,
-        title_text: str | None = None,
-        title_text_style: str | None = None,
-        xml_id: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if style:
-                self.style = style
-            if xml_id:
-                self.xml_id = xml_id
-            if title_text:
-                self.set_title_text(title_text, title_text_style)
-
-    def set_title_text(
-        self,
-        title_text: str,
-        title_text_style: str | None = None,
-    ) -> None:
-        title = Paragraph(title_text, style=title_text_style)
-        self.append(title)
-
-
-IndexTitle._define_attribut_property()
-
-
-class TabStopStyle(Element):
-    """ODF "style:tab-stop"
-    Base style for a TOC entryBase style for a TOC entry
-    """
-
-    _tag = "style:tab-stop"
-    _properties = (
-        PropDef("style_char", "style:char"),
-        PropDef("leader_color", "style:leader-color"),
-        PropDef("leader_style", "style:leader-style"),
-        PropDef("leader_text", "style:leader-text"),
-        PropDef("leader_text_style", "style:leader-text-style"),
-        PropDef("leader_type", "style:leader-type"),
-        PropDef("leader_width", "style:leader-width"),
-        PropDef("style_position", "style:position"),
-        PropDef("style_type", "style:type"),
-    )
-
-    def __init__(  # noqa: C901
-        self,
-        style_char: str | None = None,
-        leader_color: str | None = None,
-        leader_style: str | None = None,
-        leader_text: str | None = None,
-        leader_text_style: str | None = None,
-        leader_type: str | None = None,
-        leader_width: str | None = None,
-        style_position: str | None = None,
-        style_type: str | None = None,
-        **kwargs: Any,
-    ):
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style_char:
-                self.style_char = style_char
-            if leader_color:
-                self.leader_color = leader_color
-            if leader_style:
-                self.leader_style = leader_style
-            if leader_text:
-                self.leader_text = leader_text
-            if leader_text_style:
-                self.leader_text_style = leader_text_style
-            if leader_type:
-                self.leader_type = leader_type
-            if leader_width:
-                self.leader_width = leader_width
-            if style_position:
-                self.style_position = style_position
-            if style_type:
-                self.style_type = style_type
-
-
-TabStopStyle._define_attribut_property()
-
-
-def default_toc_level_style(level: int) -> Style:
-    """Generate an automatic default style for the given TOC level."""
-    tab_stop = TabStopStyle(style_type="right", leader_style="dotted", leader_text=".")
-    position = 17.5 - (0.5 * level)
-    tab_stop.style_position = f"{position}cm"
-    tab_stops = Element.from_tag("style:tab-stops")
-    tab_stops.append(tab_stop)
-    properties = Element.from_tag("style:paragraph-properties")
-    properties.append(tab_stops)
-    toc_style_level = Style(
-        family="paragraph",
-        name=_toc_entry_style_name(level),
-        parent=f"Contents_20_{level}",
-    )
-    toc_style_level.append(properties)
-    return toc_style_level
-
-
-class TOC(Element):
-    """Table of content.
-    The "text:table-of-content" element represents a table of contents for a
-    document. The items that can be listed in a table of contents are:
-      - Headings (as defined by the outline structure of the document), up to
-        a selected level.
-      - Table of contents index marks.
-      - Paragraphs formatted with specified paragraph styles.
-
-
-    Implementation:
-    Default parameters are what most people use: protected from manual
-    modifications and not limited in title levels.
-
-    The name is mandatory and derived automatically from the title if not
-    given. Provide one in case of a conflict with other TOCs in the same
-    document.
-
-    The "text:table-of-content" element has the following attributes:
-    text:name, text:protected, text:protection-key,
-    text:protection-key-digest-algorithm, text:style-name and xml:id.
-
-    Arguments:
-
-        title -- str
-
-        name -- str
-
-        protected -- bool
-
-        outline_level -- int
-
-        style -- str
-
-        title_style -- str
-
-        entry_style -- str
-    """
-
-    _tag = "text:table-of-content"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "text:style-name"),
-        PropDef("xml_id", "xml:id"),
-        PropDef("protected", "text:protected"),
-        PropDef("protection_key", "text:protection-key"),
-        PropDef(
-            "protection_key_digest_algorithm", "text:protection-key-digest-algorithm"
-        ),
-    )
-
-    def __init__(
-        self,
-        title: str = "Table of Contents",
-        name: str | None = None,
-        protected: bool = True,
-        outline_level: int = 0,
-        style: str | None = None,
-        title_style: str = "Contents_20_Heading",
-        entry_style: str = "Contents_20_%d",
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style:
-                self.style = style
-            if protected:
-                self.protected = protected
-            if name is None:
-                self.name = f"{title}1"
-            # Create the source template
-            toc_source = self.create_toc_source(
-                title, outline_level, title_style, entry_style
-            )
-            self.append(toc_source)
-            # Create the index body automatically with the index title
-            if title:
-                # This style is in the template document
-                self.set_toc_title(title, text_style=title_style)
-
-    @staticmethod
-    def create_toc_source(
-        title: str,
-        outline_level: int,
-        title_style: str,
-        entry_style: str,
-    ) -> Element:
-        toc_source = Element.from_tag("text:table-of-content-source")
-        toc_source.set_attribute("text:outline-level", str(outline_level))
-        if title:
-            title_template = IndexTitleTemplate()
-            if title_style:
-                # This style is in the template document
-                title_template.style = title_style
-            title_template.text = title
-            toc_source.append(title_template)
-        for level in range(1, 11):
-            template = TocEntryTemplate(outline_level=level)
-            if entry_style:
-                template.style = entry_style % level
-            toc_source.append(template)
-        return toc_source
-
-    def __str__(self) -> str:
-        return self.get_formatted_text()
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        index_body = self.get_element("text:index-body")
-
-        if index_body is None:
-            return ""
-        if context is None:
-            context = {}
-        if context.get("rst_mode"):
-            return "\n.. contents::\n\n"
-
-        result = []
-        for element in index_body.children:
-            if element.tag == "text:index-title":
-                for child_element in element.children:
-                    result.append(child_element.get_formatted_text(context).strip())
-            else:
-                result.append(element.get_formatted_text(context).strip())
-        return "\n".join(result)
-
-    @property
-    def outline_level(self) -> int | None:
-        source = self.get_element("text:table-of-content-source")
-        if source is None:
-            return None
-        return source.get_attribute_integer("text:outline-level")
-
-    @outline_level.setter
-    def outline_level(self, level: int) -> None:
-        source = self.get_element("text:table-of-content-source")
-        if source is None:
-            source = Element.from_tag("text:table-of-content-source")
-            self.insert(source, FIRST_CHILD)
-        source.set_attribute("text:outline-level", str(level))
-
-    @property
-    def body(self) -> Element | None:
-        return self.get_element("text:index-body")
-
-    @body.setter
-    def body(self, body: Element | None = None) -> Element | None:
-        old_body = self.body
-        if old_body is not None:
-            self.delete(old_body)
-        if body is None:
-            body = Element.from_tag("text:index-body")
-        self.append(body)
-        return body
-
-    def get_title(self) -> str:
-        index_body = self.body
-        if index_body is None:
-            return ""
-        index_title = index_body.get_element(IndexTitle._tag)
-        if index_title is None:
-            return ""
-        return index_title.text_content
-
-    def set_toc_title(
-        self,
-        title: str,
-        style: str | None = None,
-        text_style: str | None = None,
-    ) -> None:
-        index_body = self.body
-        if index_body is None:
-            self.body = None
-            index_body = self.body
-        index_title = index_body.get_element(IndexTitle._tag)  # type: ignore
-        if index_title is None:
-            name = f"{self.name}_Head"
-            index_title = IndexTitle(
-                name=name, style=style, title_text=title, text_style=text_style
-            )
-            index_body.append(index_title)  # type: ignore
-        else:
-            if style:
-                index_title.style = style  # type: ignore
-            paragraph = index_title.get_paragraph()
-            if paragraph is None:
-                paragraph = Paragraph()
-                index_title.append(paragraph)
-            if text_style:
-                paragraph.style = text_style  # type: ignore
-            paragraph.text = title
-
-    @staticmethod
-    def _header_numbering(level_indexes: dict[int, int], level: int) -> str:
-        """Return the header hierarchical number (like "1.2.3.")."""
-        numbers: list[int] = []
-        # before header level
-        for idx in range(1, level):
-            numbers.append(level_indexes.setdefault(idx, 1))
-        # header level
-        index = level_indexes.get(level, 0) + 1
-        level_indexes[level] = index
-        numbers.append(index)
-        # after header level
-        idx = level + 1
-        while idx in level_indexes:
-            del level_indexes[idx]
-            idx += 1
-        return ".".join(str(x) for x in numbers) + "."
-
-    def fill(  # noqa: C901
-        self,
-        document: Document | None = None,
-        use_default_styles: bool = True,
-    ) -> None:
-        """Fill the TOC with the titles found in the document. A TOC is not
-        contextual so it will catch all titles before and after its insertion.
-        If the TOC is not attached to a document, attach it beforehand or
-        provide one as argument.
-
-        For having a pretty TOC, let use_default_styles by default.
-
-        Arguments:
-
-            document -- Document
-
-            use_default_styles -- bool
-        """
-        # Find the body
-        if document is not None:
-            body: Element | None = document.body
-        else:
-            body = self.document_body
-        if body is None:
-            raise ValueError("The TOC must be related to a document somehow")
-
-        # Save the title
-        index_body = self.body
-        title = index_body.get_element("text:index-title")  # type: ignore
-
-        # Clean the old index-body
-        self.body = None
-        index_body = self.body
-
-        # Restore the title
-        if title and str(title):
-            index_body.insert(title, position=0)  # type: ignore
-
-        # Insert default TOC style
-        if use_default_styles:
-            automatic_styles = body.get_element("//office:automatic-styles")
-            if isinstance(automatic_styles, Element):
-                for level in range(1, 11):
-                    if (
-                        automatic_styles.get_style(
-                            "paragraph", _toc_entry_style_name(level)
-                        )
-                        is None
-                    ):
-                        level_style = default_toc_level_style(level)
-                        automatic_styles.append(level_style)
-
-        # Auto-fill the index
-        outline_level = self.outline_level or 10
-        level_indexes: dict[int, int] = {}
-        for header in body.get_headers():
-            level = header.get_attribute_integer("text:outline-level") or 0
-            if level is None or level > outline_level:
-                continue
-            number_str = self._header_numbering(level_indexes, level)
-            # Make the title with "1.2.3. Title" format
-            paragraph = Paragraph(f"{number_str} {header}")
-            if use_default_styles:
-                paragraph.style = _toc_entry_style_name(level)
-            index_body.append(paragraph)  # type: ignore
-
-
-TOC._define_attribut_property()
-
-
-class IndexTitleTemplate(Element):
-    """ODF "text:index-title-template"
-
-    Arguments:
-
-        style -- str
-    """
-
-    _tag = "text:index-title-template"
-    _properties = (PropDef("style", "text:style-name"),)
-
-    def __init__(self, style: str | None = None, **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init and style:
-            self.style = style
-
-
-IndexTitleTemplate._define_attribut_property()
-
-
-class TocEntryTemplate(Element):
-    """ODF "text:table-of-content-entry-template"
-
-    Arguments:
-
-        style -- str
-    """
-
-    _tag = "text:table-of-content-entry-template"
-    _properties = (PropDef("style", "text:style-name"),)
-
-    def __init__(
-        self,
-        style: str | None = None,
-        outline_level: int | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style:
-                self.style = style
-            if outline_level:
-                self.outline_level = outline_level
-
-    @property
-    def outline_level(self) -> int | None:
-        return self.get_attribute_integer("text:outline-level")
-
-    @outline_level.setter
-    def outline_level(self, level: int) -> None:
-        self.set_attribute("text:outline-level", str(level))
-
-    def complete_defaults(self) -> None:
-        self.append(Element.from_tag("text:index-entry-chapter"))
-        self.append(Element.from_tag("text:index-entry-text"))
-        self.append(Element.from_tag("text:index-entry-text"))
-        ts = Element.from_tag("text:index-entry-text")
-        ts.set_style_attribute("style:type", "right")
-        ts.set_style_attribute("style:leader-char", ".")
-        self.append(ts)
-        self.append(Element.from_tag("text:index-entry-page-number"))
-
-
-TocEntryTemplate._define_attribut_property()
-
-register_element_class(IndexTitle)
-register_element_class(IndexTitleTemplate)
-register_element_class(TocEntryTemplate)
-register_element_class(TabStopStyle)
-register_element_class(TOC)
-
-
-
-
-
-
-
-

Functions

-
-
-def default_toc_level_style(level: int) ‑> Style -
-
-

Generate an automatic default style for the given TOC level.

-
- -Expand source code - -
def default_toc_level_style(level: int) -> Style:
-    """Generate an automatic default style for the given TOC level."""
-    tab_stop = TabStopStyle(style_type="right", leader_style="dotted", leader_text=".")
-    position = 17.5 - (0.5 * level)
-    tab_stop.style_position = f"{position}cm"
-    tab_stops = Element.from_tag("style:tab-stops")
-    tab_stops.append(tab_stop)
-    properties = Element.from_tag("style:paragraph-properties")
-    properties.append(tab_stops)
-    toc_style_level = Style(
-        family="paragraph",
-        name=_toc_entry_style_name(level),
-        parent=f"Contents_20_{level}",
-    )
-    toc_style_level.append(properties)
-    return toc_style_level
-
-
-
-
-
-

Classes

-
-
-class IndexTitle -(name: str | None = None, style: str | None = None, title_text: str | None = None, title_text_style: str | None = None, xml_id: str | None = None, **kwargs: Any) -
-
-

The "text:index-title" element contains the title of an index.

-

The element has the following attributes: -text:name, text:protected, text:protection-key, -text:protection-key-digest-algorithm, text:style-name, xml:id.

-

The actual title is stored in a child element

-
- -Expand source code - -
class IndexTitle(Element):
-    """The "text:index-title" element contains the title of an index.
-
-    The element has the following attributes:
-    text:name, text:protected, text:protection-key,
-    text:protection-key-digest-algorithm, text:style-name, xml:id.
-
-    The actual title is stored in a child element
-    """
-
-    _tag = "text:index-title"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "text:style-name"),
-        PropDef("xml_id", "xml:id"),
-        PropDef("protected", "text:protected"),
-        PropDef("protection_key", "text:protection-key"),
-        PropDef(
-            "protection_key_digest_algorithm", "text:protection-key-digest-algorithm"
-        ),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        style: str | None = None,
-        title_text: str | None = None,
-        title_text_style: str | None = None,
-        xml_id: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if style:
-                self.style = style
-            if xml_id:
-                self.xml_id = xml_id
-            if title_text:
-                self.set_title_text(title_text, title_text_style)
-
-    def set_title_text(
-        self,
-        title_text: str,
-        title_text_style: str | None = None,
-    ) -> None:
-        title = Paragraph(title_text, style=title_text_style)
-        self.append(title)
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var protected : str | bool | None
-
-

Get/set the attribute text:protected

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var protection_key : str | bool | None
-
-

Get/set the attribute text:protection-key

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var protection_key_digest_algorithm : str | bool | None
-
-

Get/set the attribute text:protection-key-digest-algorithm

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var xml_id : str | bool | None
-
-

Get/set the attribute xml:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def set_title_text(self, title_text: str, title_text_style: str | None = None) ‑> None -
-
-
-
- -Expand source code - -
def set_title_text(
-    self,
-    title_text: str,
-    title_text_style: str | None = None,
-) -> None:
-    title = Paragraph(title_text, style=title_text_style)
-    self.append(title)
-
-
-
-

Inherited members

- -
-
-class IndexTitleTemplate -(style: str | None = None, **kwargs: Any) -
-
-

ODF "text:index-title-template"

-

Arguments

-

style – str

-
- -Expand source code - -
class IndexTitleTemplate(Element):
-    """ODF "text:index-title-template"
-
-    Arguments:
-
-        style -- str
-    """
-
-    _tag = "text:index-title-template"
-    _properties = (PropDef("style", "text:style-name"),)
-
-    def __init__(self, style: str | None = None, **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init and style:
-            self.style = style
-
-

Ancestors

- -

Instance variables

-
-
var style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class TOC -(title: str = 'Table of Contents', name: str | None = None, protected: bool = True, outline_level: int = 0, style: str | None = None, title_style: str = 'Contents_20_Heading', entry_style: str = 'Contents_20_%d', **kwargs: Any) -
-
-

Table of content. -The "text:table-of-content" element represents a table of contents for a -document. The items that can be listed in a table of contents are: -- Headings (as defined by the outline structure of the document), up to -a selected level. -- Table of contents index marks. -- Paragraphs formatted with specified paragraph styles.

-

Implementation: -Default parameters are what most people use: protected from manual -modifications and not limited in title levels.

-

The name is mandatory and derived automatically from the title if not -given. Provide one in case of a conflict with other TOCs in the same -document.

-

The "text:table-of-content" element has the following attributes: -text:name, text:protected, text:protection-key, -text:protection-key-digest-algorithm, text:style-name and xml:id.

-

Arguments

-

title – str

-

name – str

-

protected – bool

-

outline_level – int

-

style – str

-

title_style – str

-

entry_style – str

-
- -Expand source code - -
class TOC(Element):
-    """Table of content.
-    The "text:table-of-content" element represents a table of contents for a
-    document. The items that can be listed in a table of contents are:
-      - Headings (as defined by the outline structure of the document), up to
-        a selected level.
-      - Table of contents index marks.
-      - Paragraphs formatted with specified paragraph styles.
-
-
-    Implementation:
-    Default parameters are what most people use: protected from manual
-    modifications and not limited in title levels.
-
-    The name is mandatory and derived automatically from the title if not
-    given. Provide one in case of a conflict with other TOCs in the same
-    document.
-
-    The "text:table-of-content" element has the following attributes:
-    text:name, text:protected, text:protection-key,
-    text:protection-key-digest-algorithm, text:style-name and xml:id.
-
-    Arguments:
-
-        title -- str
-
-        name -- str
-
-        protected -- bool
-
-        outline_level -- int
-
-        style -- str
-
-        title_style -- str
-
-        entry_style -- str
-    """
-
-    _tag = "text:table-of-content"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "text:style-name"),
-        PropDef("xml_id", "xml:id"),
-        PropDef("protected", "text:protected"),
-        PropDef("protection_key", "text:protection-key"),
-        PropDef(
-            "protection_key_digest_algorithm", "text:protection-key-digest-algorithm"
-        ),
-    )
-
-    def __init__(
-        self,
-        title: str = "Table of Contents",
-        name: str | None = None,
-        protected: bool = True,
-        outline_level: int = 0,
-        style: str | None = None,
-        title_style: str = "Contents_20_Heading",
-        entry_style: str = "Contents_20_%d",
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style:
-                self.style = style
-            if protected:
-                self.protected = protected
-            if name is None:
-                self.name = f"{title}1"
-            # Create the source template
-            toc_source = self.create_toc_source(
-                title, outline_level, title_style, entry_style
-            )
-            self.append(toc_source)
-            # Create the index body automatically with the index title
-            if title:
-                # This style is in the template document
-                self.set_toc_title(title, text_style=title_style)
-
-    @staticmethod
-    def create_toc_source(
-        title: str,
-        outline_level: int,
-        title_style: str,
-        entry_style: str,
-    ) -> Element:
-        toc_source = Element.from_tag("text:table-of-content-source")
-        toc_source.set_attribute("text:outline-level", str(outline_level))
-        if title:
-            title_template = IndexTitleTemplate()
-            if title_style:
-                # This style is in the template document
-                title_template.style = title_style
-            title_template.text = title
-            toc_source.append(title_template)
-        for level in range(1, 11):
-            template = TocEntryTemplate(outline_level=level)
-            if entry_style:
-                template.style = entry_style % level
-            toc_source.append(template)
-        return toc_source
-
-    def __str__(self) -> str:
-        return self.get_formatted_text()
-
-    def get_formatted_text(self, context: dict | None = None) -> str:
-        index_body = self.get_element("text:index-body")
-
-        if index_body is None:
-            return ""
-        if context is None:
-            context = {}
-        if context.get("rst_mode"):
-            return "\n.. contents::\n\n"
-
-        result = []
-        for element in index_body.children:
-            if element.tag == "text:index-title":
-                for child_element in element.children:
-                    result.append(child_element.get_formatted_text(context).strip())
-            else:
-                result.append(element.get_formatted_text(context).strip())
-        return "\n".join(result)
-
-    @property
-    def outline_level(self) -> int | None:
-        source = self.get_element("text:table-of-content-source")
-        if source is None:
-            return None
-        return source.get_attribute_integer("text:outline-level")
-
-    @outline_level.setter
-    def outline_level(self, level: int) -> None:
-        source = self.get_element("text:table-of-content-source")
-        if source is None:
-            source = Element.from_tag("text:table-of-content-source")
-            self.insert(source, FIRST_CHILD)
-        source.set_attribute("text:outline-level", str(level))
-
-    @property
-    def body(self) -> Element | None:
-        return self.get_element("text:index-body")
-
-    @body.setter
-    def body(self, body: Element | None = None) -> Element | None:
-        old_body = self.body
-        if old_body is not None:
-            self.delete(old_body)
-        if body is None:
-            body = Element.from_tag("text:index-body")
-        self.append(body)
-        return body
-
-    def get_title(self) -> str:
-        index_body = self.body
-        if index_body is None:
-            return ""
-        index_title = index_body.get_element(IndexTitle._tag)
-        if index_title is None:
-            return ""
-        return index_title.text_content
-
-    def set_toc_title(
-        self,
-        title: str,
-        style: str | None = None,
-        text_style: str | None = None,
-    ) -> None:
-        index_body = self.body
-        if index_body is None:
-            self.body = None
-            index_body = self.body
-        index_title = index_body.get_element(IndexTitle._tag)  # type: ignore
-        if index_title is None:
-            name = f"{self.name}_Head"
-            index_title = IndexTitle(
-                name=name, style=style, title_text=title, text_style=text_style
-            )
-            index_body.append(index_title)  # type: ignore
-        else:
-            if style:
-                index_title.style = style  # type: ignore
-            paragraph = index_title.get_paragraph()
-            if paragraph is None:
-                paragraph = Paragraph()
-                index_title.append(paragraph)
-            if text_style:
-                paragraph.style = text_style  # type: ignore
-            paragraph.text = title
-
-    @staticmethod
-    def _header_numbering(level_indexes: dict[int, int], level: int) -> str:
-        """Return the header hierarchical number (like "1.2.3.")."""
-        numbers: list[int] = []
-        # before header level
-        for idx in range(1, level):
-            numbers.append(level_indexes.setdefault(idx, 1))
-        # header level
-        index = level_indexes.get(level, 0) + 1
-        level_indexes[level] = index
-        numbers.append(index)
-        # after header level
-        idx = level + 1
-        while idx in level_indexes:
-            del level_indexes[idx]
-            idx += 1
-        return ".".join(str(x) for x in numbers) + "."
-
-    def fill(  # noqa: C901
-        self,
-        document: Document | None = None,
-        use_default_styles: bool = True,
-    ) -> None:
-        """Fill the TOC with the titles found in the document. A TOC is not
-        contextual so it will catch all titles before and after its insertion.
-        If the TOC is not attached to a document, attach it beforehand or
-        provide one as argument.
-
-        For having a pretty TOC, let use_default_styles by default.
-
-        Arguments:
-
-            document -- Document
-
-            use_default_styles -- bool
-        """
-        # Find the body
-        if document is not None:
-            body: Element | None = document.body
-        else:
-            body = self.document_body
-        if body is None:
-            raise ValueError("The TOC must be related to a document somehow")
-
-        # Save the title
-        index_body = self.body
-        title = index_body.get_element("text:index-title")  # type: ignore
-
-        # Clean the old index-body
-        self.body = None
-        index_body = self.body
-
-        # Restore the title
-        if title and str(title):
-            index_body.insert(title, position=0)  # type: ignore
-
-        # Insert default TOC style
-        if use_default_styles:
-            automatic_styles = body.get_element("//office:automatic-styles")
-            if isinstance(automatic_styles, Element):
-                for level in range(1, 11):
-                    if (
-                        automatic_styles.get_style(
-                            "paragraph", _toc_entry_style_name(level)
-                        )
-                        is None
-                    ):
-                        level_style = default_toc_level_style(level)
-                        automatic_styles.append(level_style)
-
-        # Auto-fill the index
-        outline_level = self.outline_level or 10
-        level_indexes: dict[int, int] = {}
-        for header in body.get_headers():
-            level = header.get_attribute_integer("text:outline-level") or 0
-            if level is None or level > outline_level:
-                continue
-            number_str = self._header_numbering(level_indexes, level)
-            # Make the title with "1.2.3. Title" format
-            paragraph = Paragraph(f"{number_str} {header}")
-            if use_default_styles:
-                paragraph.style = _toc_entry_style_name(level)
-            index_body.append(paragraph)  # type: ignore
-
-

Ancestors

- -

Static methods

-
-
-def create_toc_source(title: str, outline_level: int, title_style: str, entry_style: str) ‑> Element -
-
-
-
- -Expand source code - -
@staticmethod
-def create_toc_source(
-    title: str,
-    outline_level: int,
-    title_style: str,
-    entry_style: str,
-) -> Element:
-    toc_source = Element.from_tag("text:table-of-content-source")
-    toc_source.set_attribute("text:outline-level", str(outline_level))
-    if title:
-        title_template = IndexTitleTemplate()
-        if title_style:
-            # This style is in the template document
-            title_template.style = title_style
-        title_template.text = title
-        toc_source.append(title_template)
-    for level in range(1, 11):
-        template = TocEntryTemplate(outline_level=level)
-        if entry_style:
-            template.style = entry_style % level
-        toc_source.append(template)
-    return toc_source
-
-
-
-

Instance variables

-
-
var bodyElement | None
-
-
-
- -Expand source code - -
@property
-def body(self) -> Element | None:
-    return self.get_element("text:index-body")
-
-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var outline_level : int | None
-
-
-
- -Expand source code - -
@property
-def outline_level(self) -> int | None:
-    source = self.get_element("text:table-of-content-source")
-    if source is None:
-        return None
-    return source.get_attribute_integer("text:outline-level")
-
-
-
var protected : str | bool | None
-
-

Get/set the attribute text:protected

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var protection_key : str | bool | None
-
-

Get/set the attribute text:protection-key

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var protection_key_digest_algorithm : str | bool | None
-
-

Get/set the attribute text:protection-key-digest-algorithm

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var xml_id : str | bool | None
-
-

Get/set the attribute xml:id

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def fill(self, document: Document | None = None, use_default_styles: bool = True) ‑> None -
-
-

Fill the TOC with the titles found in the document. A TOC is not -contextual so it will catch all titles before and after its insertion. -If the TOC is not attached to a document, attach it beforehand or -provide one as argument.

-

For having a pretty TOC, let use_default_styles by default.

-

Arguments

-

document – Document

-

use_default_styles – bool

-
- -Expand source code - -
def fill(  # noqa: C901
-    self,
-    document: Document | None = None,
-    use_default_styles: bool = True,
-) -> None:
-    """Fill the TOC with the titles found in the document. A TOC is not
-    contextual so it will catch all titles before and after its insertion.
-    If the TOC is not attached to a document, attach it beforehand or
-    provide one as argument.
-
-    For having a pretty TOC, let use_default_styles by default.
-
-    Arguments:
-
-        document -- Document
-
-        use_default_styles -- bool
-    """
-    # Find the body
-    if document is not None:
-        body: Element | None = document.body
-    else:
-        body = self.document_body
-    if body is None:
-        raise ValueError("The TOC must be related to a document somehow")
-
-    # Save the title
-    index_body = self.body
-    title = index_body.get_element("text:index-title")  # type: ignore
-
-    # Clean the old index-body
-    self.body = None
-    index_body = self.body
-
-    # Restore the title
-    if title and str(title):
-        index_body.insert(title, position=0)  # type: ignore
-
-    # Insert default TOC style
-    if use_default_styles:
-        automatic_styles = body.get_element("//office:automatic-styles")
-        if isinstance(automatic_styles, Element):
-            for level in range(1, 11):
-                if (
-                    automatic_styles.get_style(
-                        "paragraph", _toc_entry_style_name(level)
-                    )
-                    is None
-                ):
-                    level_style = default_toc_level_style(level)
-                    automatic_styles.append(level_style)
-
-    # Auto-fill the index
-    outline_level = self.outline_level or 10
-    level_indexes: dict[int, int] = {}
-    for header in body.get_headers():
-        level = header.get_attribute_integer("text:outline-level") or 0
-        if level is None or level > outline_level:
-            continue
-        number_str = self._header_numbering(level_indexes, level)
-        # Make the title with "1.2.3. Title" format
-        paragraph = Paragraph(f"{number_str} {header}")
-        if use_default_styles:
-            paragraph.style = _toc_entry_style_name(level)
-        index_body.append(paragraph)  # type: ignore
-
-
-
-def get_title(self) ‑> str -
-
-
-
- -Expand source code - -
def get_title(self) -> str:
-    index_body = self.body
-    if index_body is None:
-        return ""
-    index_title = index_body.get_element(IndexTitle._tag)
-    if index_title is None:
-        return ""
-    return index_title.text_content
-
-
-
-def set_toc_title(self, title: str, style: str | None = None, text_style: str | None = None) ‑> None -
-
-
-
- -Expand source code - -
def set_toc_title(
-    self,
-    title: str,
-    style: str | None = None,
-    text_style: str | None = None,
-) -> None:
-    index_body = self.body
-    if index_body is None:
-        self.body = None
-        index_body = self.body
-    index_title = index_body.get_element(IndexTitle._tag)  # type: ignore
-    if index_title is None:
-        name = f"{self.name}_Head"
-        index_title = IndexTitle(
-            name=name, style=style, title_text=title, text_style=text_style
-        )
-        index_body.append(index_title)  # type: ignore
-    else:
-        if style:
-            index_title.style = style  # type: ignore
-        paragraph = index_title.get_paragraph()
-        if paragraph is None:
-            paragraph = Paragraph()
-            index_title.append(paragraph)
-        if text_style:
-            paragraph.style = text_style  # type: ignore
-        paragraph.text = title
-
-
-
-

Inherited members

- -
-
-class TabStopStyle -(style_char: str | None = None, leader_color: str | None = None, leader_style: str | None = None, leader_text: str | None = None, leader_text_style: str | None = None, leader_type: str | None = None, leader_width: str | None = None, style_position: str | None = None, style_type: str | None = None, **kwargs: Any) -
-
-

ODF "style:tab-stop" -Base style for a TOC entryBase style for a TOC entry

-
- -Expand source code - -
class TabStopStyle(Element):
-    """ODF "style:tab-stop"
-    Base style for a TOC entryBase style for a TOC entry
-    """
-
-    _tag = "style:tab-stop"
-    _properties = (
-        PropDef("style_char", "style:char"),
-        PropDef("leader_color", "style:leader-color"),
-        PropDef("leader_style", "style:leader-style"),
-        PropDef("leader_text", "style:leader-text"),
-        PropDef("leader_text_style", "style:leader-text-style"),
-        PropDef("leader_type", "style:leader-type"),
-        PropDef("leader_width", "style:leader-width"),
-        PropDef("style_position", "style:position"),
-        PropDef("style_type", "style:type"),
-    )
-
-    def __init__(  # noqa: C901
-        self,
-        style_char: str | None = None,
-        leader_color: str | None = None,
-        leader_style: str | None = None,
-        leader_text: str | None = None,
-        leader_text_style: str | None = None,
-        leader_type: str | None = None,
-        leader_width: str | None = None,
-        style_position: str | None = None,
-        style_type: str | None = None,
-        **kwargs: Any,
-    ):
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style_char:
-                self.style_char = style_char
-            if leader_color:
-                self.leader_color = leader_color
-            if leader_style:
-                self.leader_style = leader_style
-            if leader_text:
-                self.leader_text = leader_text
-            if leader_text_style:
-                self.leader_text_style = leader_text_style
-            if leader_type:
-                self.leader_type = leader_type
-            if leader_width:
-                self.leader_width = leader_width
-            if style_position:
-                self.style_position = style_position
-            if style_type:
-                self.style_type = style_type
-
-

Ancestors

- -

Instance variables

-
-
var leader_color : str | bool | None
-
-

Get/set the attribute style:leader-color

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_style : str | bool | None
-
-

Get/set the attribute style:leader-style

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_text : str | bool | None
-
-

Get/set the attribute style:leader-text

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_text_style : str | bool | None
-
-

Get/set the attribute style:leader-text-style

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_type : str | bool | None
-
-

Get/set the attribute style:leader-type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var leader_width : str | bool | None
-
-

Get/set the attribute style:leader-width

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style_char : str | bool | None
-
-

Get/set the attribute style:char

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style_position : str | bool | None
-
-

Get/set the attribute style:position

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style_type : str | bool | None
-
-

Get/set the attribute style:type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class TocEntryTemplate -(style: str | None = None, outline_level: int | None = None, **kwargs: Any) -
-
-

ODF "text:table-of-content-entry-template"

-

Arguments

-

style – str

-
- -Expand source code - -
class TocEntryTemplate(Element):
-    """ODF "text:table-of-content-entry-template"
-
-    Arguments:
-
-        style -- str
-    """
-
-    _tag = "text:table-of-content-entry-template"
-    _properties = (PropDef("style", "text:style-name"),)
-
-    def __init__(
-        self,
-        style: str | None = None,
-        outline_level: int | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if style:
-                self.style = style
-            if outline_level:
-                self.outline_level = outline_level
-
-    @property
-    def outline_level(self) -> int | None:
-        return self.get_attribute_integer("text:outline-level")
-
-    @outline_level.setter
-    def outline_level(self, level: int) -> None:
-        self.set_attribute("text:outline-level", str(level))
-
-    def complete_defaults(self) -> None:
-        self.append(Element.from_tag("text:index-entry-chapter"))
-        self.append(Element.from_tag("text:index-entry-text"))
-        self.append(Element.from_tag("text:index-entry-text"))
-        ts = Element.from_tag("text:index-entry-text")
-        ts.set_style_attribute("style:type", "right")
-        ts.set_style_attribute("style:leader-char", ".")
-        self.append(ts)
-        self.append(Element.from_tag("text:index-entry-page-number"))
-
-

Ancestors

- -

Instance variables

-
-
var outline_level : int | None
-
-
-
- -Expand source code - -
@property
-def outline_level(self) -> int | None:
-    return self.get_attribute_integer("text:outline-level")
-
-
-
var style : str | bool | None
-
-

Get/set the attribute text:style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def complete_defaults(self) ‑> None -
-
-
-
- -Expand source code - -
def complete_defaults(self) -> None:
-    self.append(Element.from_tag("text:index-entry-chapter"))
-    self.append(Element.from_tag("text:index-entry-text"))
-    self.append(Element.from_tag("text:index-entry-text"))
-    ts = Element.from_tag("text:index-entry-text")
-    ts.set_style_attribute("style:type", "right")
-    ts.set_style_attribute("style:leader-char", ".")
-    self.append(ts)
-    self.append(Element.from_tag("text:index-entry-page-number"))
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/tracked_changes.html b/doc/tracked_changes.html deleted file mode 100644 index e5ea5bf..0000000 --- a/doc/tracked_changes.html +++ /dev/null @@ -1,3811 +0,0 @@ - - - - - - -odfdo.tracked_changes API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.tracked_changes

-
-
-

TrackedChanges class for "text:tracked-changes" and related classes -(ChangeInfo, TextInsertion, TextChange…).

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""TrackedChanges class for "text:tracked-changes" and related classes
-(ChangeInfo, TextInsertion, TextChange...).
-"""
-from __future__ import annotations
-
-from datetime import datetime
-from typing import Any
-
-from .datatype import DateTime
-from .element import FIRST_CHILD, LAST_CHILD, Element, register_element_class
-from .paragraph import Paragraph
-
-
-class ChangeInfo(Element):
-    """The "office:change-info" element represents who made a change and when.
-    It may also contain a comment (one or more Paragrah "text:p" elements)
-    on the change.
-
-    The comments available in the ChangeInfo are available through:
-      - get_paragraphs and get_paragraph methods for actual Paragraph.
-      - get_comments for a plain text version
-
-      Arguments:
-
-         creator -- str (or None)
-
-         date -- datetime (or None)
-    """
-
-    _tag = "office:change-info"
-
-    def __init__(
-        self,
-        creator: str | None = None,
-        date: datetime | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.set_dc_creator(creator)
-            self.set_dc_date(date)
-
-    def set_dc_creator(self, creator: str | None = None) -> None:
-        """Set the creator of the change. Default for creator is 'Unknown'.
-
-        Arguments:
-
-            creator -- str (or None)
-        """
-        element = self.get_element("dc:creator")
-        if element is None:
-            element = Element.from_tag("dc:creator")
-            self.insert(element, xmlposition=FIRST_CHILD)
-        if not creator:
-            creator = "Unknown"
-        element.text = creator
-
-    def set_dc_date(self, date: datetime | None = None) -> None:
-        """Set the date of the change. If date is None, use current time.
-
-        Arguments:
-
-            date -- datetime (or None)
-        """
-        if date is None:
-            date = datetime.now()
-        dcdate = DateTime.encode(date)
-        element = self.get_element("dc:date")
-        if element is None:
-            element = Element.from_tag("dc:date")
-            self.insert(element, xmlposition=LAST_CHILD)
-        element.text = dcdate
-
-    def get_comments(self, joined: bool = True) -> str | list[str]:
-        """Get text content of the comments. If joined is True (default), the
-        text of different paragraphs is concatenated, else a list of strings,
-        one per paragraph, is returned.
-
-        Arguments:
-
-            joined -- boolean (default is True)
-
-        Return: str or list of str.
-        """
-        content = self.get_paragraphs()
-        if content is None:
-            content = []
-        text = [para.get_formatted_text(simple=True) for para in content]  # type: ignore
-        if joined:
-            return "\n".join(text)
-        return text
-
-    def set_comments(self, text: str = "", replace: bool = True) -> None:
-        """Set the text content of the comments. If replace is True (default),
-        the new text replace old comments, else it is added at the end.
-
-        Arguments:
-
-            text -- str
-
-            replace -- boolean
-        """
-        if replace:
-            for para in self.get_paragraphs():
-                self.delete(para)
-        para = Paragraph()
-        para.append_plain_text(text)
-        self.insert(para, xmlposition=LAST_CHILD)
-
-
-class TextInsertion(Element):
-    """The TextInsertion "text:insertion" element contains the information
-    that identifies the person responsible for a change and the date of
-    that change. This information may also contain one or more "text:p"
-    Paragraph which contain a comment on the insertion. The
-    TextInsertion element's parent "text:changed-region" element has an
-    xml:id or text:id attribute, the value of which binds that parent
-    element to the text:change-id attribute on the "text:change-start"
-    and "text:change-end" elements.
-    """
-
-    _tag = "text:insertion"
-
-    def get_deleted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-    ) -> str | list[Element] | None:
-        """Return: None."""
-        if as_text:
-            return ""
-        return None
-
-    def get_inserted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> str | Element | list[Element] | None:
-        """Shortcut to text:change-start.get_inserted(). Return the content
-        between text:change-start and text:change-end.
-
-        If as_text is True: returns the text content.
-        If no_header is True: existing Heading are changed in Paragraph
-        If no_header is True: existing text:h are changed in text:p
-        By default: returns a list of Element, cleaned and with headers
-
-        Arguments:
-
-            as_text -- boolean
-
-            clean -- boolean
-
-            no_header -- boolean
-
-        Return: list or Element or text
-        """
-        current = self.parent  # text:changed-region
-        if not current:
-            raise ValueError
-        idx = current.get_id()  # type: ignore
-        body = self.document_body
-        if not body:
-            body = self.root
-        text_change = body.get_text_change_start(idx=idx)
-        if not text_change:
-            raise ValueError
-        return text_change.get_inserted(  # type: ignore
-            as_text=as_text, no_header=no_header, clean=clean
-        )
-
-    def get_change_info(self) -> Element | None:
-        """Get the ChangeInfo child of the element.
-
-        Return: ChangeInfo element.
-        """
-        return self.get_element("descendant::office:change-info")
-
-    def set_change_info(
-        self,
-        change_info: Element | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-        comments: Element | list[Element] | None = None,
-    ) -> None:
-        """Set the ChangeInfo element for the change element. If change_info
-        is not provided, creator, date and comments will be used to build a
-        suitable change info element. Default for creator is 'Unknown',
-        default for date is current time and default for comments is no
-        comment at all.
-        The new change info element will replace any existant ChangeInfo.
-
-        Arguments:
-
-             change_info -- ChangeInfo element (or None)
-
-             cretor -- str (or None)
-
-             date -- datetime (or None)
-
-             comments -- Paragraph or list of Paragraph elements (or None)
-        """
-        if change_info is None:
-            new_change_info = ChangeInfo(creator, date)
-            if comments is not None:
-                if isinstance(comments, Element):
-                    # single pararagraph comment
-                    comments_list = [comments]
-                else:
-                    comments_list = comments
-                # assume iterable of Paragraph
-                for paragraph in comments_list:
-                    if not isinstance(paragraph, Paragraph):
-                        raise TypeError(f"Not a Paragraph: '{paragraph!r}'")
-                    new_change_info.insert(paragraph, xmlposition=LAST_CHILD)
-        else:
-            if not isinstance(change_info, ChangeInfo):
-                raise TypeError(f"Not a ChangeInfo: '{change_info!r}'")
-            new_change_info = change_info
-
-        old = self.get_change_info()
-        if old is not None:
-            self.replace_element(old, new_change_info)
-        else:
-            self.insert(new_change_info, xmlposition=FIRST_CHILD)
-
-
-class TextDeletion(TextInsertion):
-    """The TextDeletion "text:deletion" contains information that identifies
-    the person responsible for a deletion and the date of that deletion.
-    This information may also contain one or more Paragraph which contains
-    a comment on the deletion. The TextDeletion element may also contain
-    content that was deleted while change tracking was enabled. The position
-    where the text was deleted is marked by a "text:change" element. Deleted
-    text is contained in a paragraph element. To reconstruct the original
-    text, the paragraph containing the deleted text is merged with its
-    surrounding paragraph or heading element. To reconstruct the text before
-    a deletion took place:
-      - If the change mark is inside a paragraph, insert the content that was
-      deleted, but remove all leading start tags up to and including the
-      first "text:p" element and all trailing end tags up to and including
-      the last "/text:p" or "/text:h" element. If the last trailing element
-      is a "/text:h", change the end tag "/text:p" following this insertion
-      to a "/text:h" element.
-      - If the change mark is inside a heading, insert the content that was
-      deleted, but remove all leading start tags up to and including the
-      first "text:h" element and all trailing end tags up to and including
-      the last "/text:h" or "/text:p" element. If the last trailing element
-      is a "/text:p", change the end tag "/text:h" following this insertion
-      to a "/text:p" element.
-      - Otherwise, copy the text content of the "text:deletion" element in
-      place of the change mark.
-    """
-
-    _tag = "text:deletion"
-
-    def get_deleted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-    ) -> str | list[Element] | None:
-        """Get the deleted informations stored in the TextDeletion.
-        If as_text is True: returns the text content.
-        If no_header is True: existing Heading are changed in Paragraph
-
-        Arguments:
-
-            as_text -- boolean
-
-            no_header -- boolean
-
-        Return: Paragraph and Header list
-        """
-        children = self.children
-        inner = [elem for elem in children if elem.tag != "office:change-info"]
-        if no_header:  # crude replace t:h by t:p
-            new_inner = []
-            for element in inner:
-                if element.tag == "text:h":
-                    children = element.children
-                    text = element.text
-                    para = Element.from_tag("text:p")
-                    para.text = text
-                    for child in children:
-                        para.append(child)
-                    new_inner.append(para)
-                else:
-                    new_inner.append(element)
-            inner = new_inner
-        if as_text:
-            return "\n".join([elem.get_formatted_text(context=None) for elem in inner])
-        return inner
-
-    def set_deleted(self, paragraph_or_list: Element | list[Element]) -> None:
-        """Set the deleted informations stored in the TextDeletion. An
-        actual content that was deleted is expected, embeded in a Paragraph
-        element or Header.
-
-        Arguments:
-
-            paragraph_or_list -- Paragraph or Header element (or list)
-        """
-        for element in self.get_deleted():  # type: ignore
-            self.delete(element)  # type: ignore
-        if isinstance(paragraph_or_list, Element):
-            paragraph_or_list = [paragraph_or_list]
-        for element in paragraph_or_list:
-            self.append(element)
-
-    def get_inserted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> str | Element | list[Element] | None:
-        """Return None."""
-        if as_text:
-            return ""
-        return None
-
-
-class TextFormatChange(TextInsertion):
-    """The TextFormatChange "text:format-change" element represents any change
-    in formatting attributes. The region where the change took place is
-    marked by "text:change-start", "text:change-end" or "text:change"
-    elements.
-
-    Note: This element does not contain formatting changes that have taken
-    place.
-    """
-
-    _tag = "text:format-change"
-
-
-class TextChangedRegion(Element):
-    """Each TextChangedRegion "text:changed-region" element contains a single
-    element, one of TextInsertion, TextDeletion or TextFormatChange that
-    corresponds to a change being tracked within the scope of the
-    "text:tracked-changes" element that contains the "text:changed-region"
-    instance.
-    The xml:id attribute of the TextChangedRegion is referenced
-    from the "text:change", "text:change-start" and "text:change-end"
-    elements that identify where the change applies to markup in the scope of
-    the "text:tracked-changes" element.
-
-    Warning : for this implementation, text:change should be referenced only
-              once in the scope, which is different from ODF 1.2 requirement:
-             " A "text:changed-region" can be referenced by more than one
-             change, but the corresponding referencing change mark elements
-             shall be of the same change type - insertion, format change or
-             deletion. "
-    """
-
-    _tag = "text:changed-region"
-
-    def get_change_info(self) -> Element | None:
-        """Shortcut to get the ChangeInfo element of the change
-        element child.
-
-        Return: ChangeInfo element.
-        """
-        return self.get_element("descendant::office:change-info")
-
-    def set_change_info(
-        self,
-        change_info: Element | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-        comments: Element | list[Element] | None = None,
-    ) -> None:
-        """Shortcut to set the ChangeInfo element of the sub change element.
-        See TextInsertion.set_change_info() for details.
-
-        Arguments:
-
-             change_info -- ChangeInfo element (or None)
-
-             cretor -- str (or None)
-
-             date -- datetime (or None)
-
-             comments -- Paragraph or list of Paragraph elements (or None)
-        """
-        child = self.get_change_element()
-        if not child:
-            raise ValueError
-        child.set_change_info(  # type: ignore
-            change_info=change_info, creator=creator, date=date, comments=comments
-        )
-
-    def get_change_element(self) -> Element | None:
-        """Get the change element child. It can be either: TextInsertion,
-        TextDeletion, or TextFormatChange as an Element object.
-
-        Return: Element.
-        """
-        request = (
-            "descendant::text:insertion "
-            "| descendant::text:deletion"
-            "| descendant::text:format-change"
-        )
-        return self._filtered_element(request, 0)
-
-    def _get_text_id(self) -> str | None:
-        return self.get_attribute_string("text:id")
-
-    def _set_text_id(self, text_id: str) -> None:
-        self.set_attribute("text:id", text_id)
-
-    def _get_xml_id(self) -> str | None:
-        return self.get_attribute_string("xml:id")
-
-    def _set_xml_id(self, xml_id: str) -> None:
-        self.set_attribute("xml:id", xml_id)
-
-    def get_id(self) -> str | None:
-        """Get the "text:id" attribute.
-
-        Return: str
-        """
-        return self._get_text_id()
-
-    def set_id(self, idx: str) -> None:
-        """Set both the "text:id" and "xml:id" attributes with same value."""
-        self._set_text_id(idx)
-        self._set_xml_id(idx)
-
-
-class TrackedChanges(Element):
-    """The TrackedChanges "text:tracked-changes" element acts as a container
-    for TextChangedRegion elements that represent changes in a certain
-    scope of an OpenDocument document. This scope is the element in which
-    the TrackedChanges element occurs. Changes in this scope shall be
-    tracked by TextChangedRegion elements contained in the
-    TrackedChanges element in this scope. If a TrackedChanges
-    element is absent, there are no tracked changes in the corresponding
-    scope. In this case, all change mark elements in this scope shall be
-    ignored.
-    """
-
-    _tag = "text:tracked-changes"
-
-    def get_changed_regions(
-        self,
-        creator: str | None = None,
-        date: datetime | None = None,
-        content: str | None = None,
-        role: str | None = None,
-    ) -> list[Element]:
-        changed_regions = self._filtered_elements(
-            "text:changed-region",
-            dc_creator=creator,
-            dc_date=date,
-            content=content,
-        )
-        if role is None:
-            return changed_regions
-        result: list[Element] = []
-        for regien in changed_regions:
-            changed = regien.get_change_element()  # type: ignore
-            if not changed:
-                continue
-            if changed.tag.endswith(role):
-                result.append(regien)
-        return result
-
-    def get_changed_region(
-        self,
-        position: int = 0,
-        text_id: str | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        return self._filtered_element(
-            "text:changed-region",
-            position,
-            text_id=text_id,
-            dc_creator=creator,
-            dc_date=date,
-            content=content,
-        )
-
-
-class TextChange(Element):
-    """The TextChange "text:change" element marks a position in an empty
-    region where text has been deleted.
-    """
-
-    _tag = "text:change"
-
-    def get_id(self) -> str | None:
-        return self.get_attribute_string("text:change-id")
-
-    def set_id(self, idx: str) -> None:
-        self.set_attribute("text:change-id", idx)
-
-    def _get_tracked_changes(self) -> Element | None:
-        body = self.document_body
-        if not body:
-            raise ValueError
-        return body.get_tracked_changes()
-
-    def get_changed_region(
-        self,
-        tracked_changes: Element | None = None,
-    ) -> Element | None:
-        if not tracked_changes:
-            tracked_changes = self._get_tracked_changes()
-        idx = self.get_id()
-        return tracked_changes.get_changed_region(text_id=idx)  # type: ignore
-
-    def get_change_info(
-        self,
-        tracked_changes: Element | None = None,
-    ) -> Element | None:
-        changed_region = self.get_changed_region(tracked_changes=tracked_changes)
-        if not changed_region:
-            return None
-        return changed_region.get_change_info()  # type: ignore
-
-    def get_change_element(
-        self,
-        tracked_changes: Element | None = None,
-    ) -> Element | None:
-        changed_region = self.get_changed_region(tracked_changes=tracked_changes)
-        if not changed_region:
-            return None
-        return changed_region.get_change_element()  # type: ignore
-
-    def get_deleted(
-        self,
-        tracked_changes: Element | None = None,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> Element | None:
-        """Shortcut to get the deleted informations stored in the
-        TextDeletion stored in the tracked changes.
-
-        Return: Paragraph (or None)."
-        """
-        changed = self.get_change_element(tracked_changes=tracked_changes)
-        if not changed:
-            return None
-        return changed.get_deleted(  # type: ignore
-            as_text=as_text,
-            no_header=no_header,
-            clean=clean,
-        )
-
-    def get_inserted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> str | Element | list[Element] | None:
-        """Return None."""
-        return None
-
-    def get_start(self) -> TextChangeStart | None:
-        """Return None."""
-        return None
-
-    def get_end(self) -> TextChangeEnd | None:
-        """Return None."""
-        return None
-
-
-class TextChangeEnd(TextChange):
-    """The TextChangeEnd "text:change-end" element marks the end of a region
-    with content where text has been inserted or the format has been
-    changed.
-    """
-
-    _tag = "text:change-end"
-
-    def get_start(self) -> TextChangeStart | None:
-        """Return the corresponding annotation starting tag or None."""
-        idx = self.get_id()
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can not find end tag: no parent available.")
-        body = self.document_body
-        if not body:
-            body = self.root
-        return body.get_text_change_start(idx=idx)  # type: ignore
-
-    def get_end(self) -> TextChangeEnd | None:
-        """Return self."""
-        return self
-
-    def get_deleted(self, *args: Any, **kwargs: Any) -> Element | None:
-        """Return None."""
-        return None
-
-    def get_inserted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> str | Element | list[Element] | None:
-        """Return the content between text:change-start and text:change-end.
-
-        If no content exists (deletion tag), returns None (or '' if text flag
-        is True).
-        If as_text is True: returns the text content.
-        If clean is True: suppress unwanted tags (deletions marks, ...)
-        If no_header is True: existing text:h are changed in text:p
-        By default: returns a list of Element, cleaned and with headers
-
-        Arguments:
-
-            as_text -- boolean
-
-            clean -- boolean
-
-            no_header -- boolean
-
-        Return: list or Element or text
-        """
-
-        # idx = self.get_id()
-        start = self.get_start()
-        end = self.get_end()
-        if end is None or start is None:
-            if as_text:
-                return ""
-            return None
-        body = self.document_body
-        if not body:
-            body = self.root
-        return body.get_between(
-            start, end, as_text=as_text, no_header=no_header, clean=clean
-        )
-
-
-class TextChangeStart(TextChangeEnd):
-    """The TextChangeStart "text:change-start" element marks the start of a
-    region with content where text has been inserted or the format has
-    been changed.
-    """
-
-    _tag = "text:change-start"
-
-    def get_start(self) -> TextChangeStart:
-        """Return self."""
-        return self
-
-    def get_end(self) -> TextChangeEnd:
-        """Return the corresponding change-end tag or None."""
-        idx = self.get_id()
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can not find end tag: no parent available.")
-        body = self.document_body
-        if not body:
-            body = self.root
-        return body.get_text_change_end(idx=idx)  # type: ignore
-
-    def delete(
-        self,
-        child: Element | None = None,
-        keep_tail: bool = True,
-    ) -> None:
-        """Delete the given element from the XML tree. If no element is given,
-        "self" is deleted. The XML library may allow to continue to use an
-        element now "orphan" as long as you have a reference to it.
-
-        For TextChangeStart : delete also the end tag if exists.
-
-        Arguments:
-
-            child -- Element
-
-            keep_tail -- boolean (default to True), True for most usages.
-        """
-        if child is not None:  # act like normal delete
-            return super().delete(child, keep_tail)
-        idx = self.get_id()
-        parent = self.parent
-        if parent is None:
-            raise ValueError("cannot delete the root element")
-        body = self.document_body
-        if not body:
-            body = parent
-        end = body.get_text_change_end(idx=idx)
-        if end:
-            end.delete()
-        # act like normal delete
-        super().delete()
-
-
-register_element_class(ChangeInfo)
-register_element_class(TextInsertion)
-register_element_class(TextDeletion)
-register_element_class(TextFormatChange)
-register_element_class(TextChangedRegion)
-register_element_class(TrackedChanges)
-register_element_class(TextChange)
-register_element_class(TextChangeEnd)
-register_element_class(TextChangeStart)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class ChangeInfo -(creator: str | None = None, date: datetime | None = None, **kwargs: Any) -
-
-

The "office:change-info" element represents who made a change and when. -It may also contain a comment (one or more Paragrah "text:p" elements) -on the change.

-

The comments available in the ChangeInfo are available through: -- get_paragraphs and get_paragraph methods for actual Paragraph. -- get_comments for a plain text version

-

Arguments:

-
 creator -- str (or None)
-
- date -- datetime (or None)
-
-
- -Expand source code - -
class ChangeInfo(Element):
-    """The "office:change-info" element represents who made a change and when.
-    It may also contain a comment (one or more Paragrah "text:p" elements)
-    on the change.
-
-    The comments available in the ChangeInfo are available through:
-      - get_paragraphs and get_paragraph methods for actual Paragraph.
-      - get_comments for a plain text version
-
-      Arguments:
-
-         creator -- str (or None)
-
-         date -- datetime (or None)
-    """
-
-    _tag = "office:change-info"
-
-    def __init__(
-        self,
-        creator: str | None = None,
-        date: datetime | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.set_dc_creator(creator)
-            self.set_dc_date(date)
-
-    def set_dc_creator(self, creator: str | None = None) -> None:
-        """Set the creator of the change. Default for creator is 'Unknown'.
-
-        Arguments:
-
-            creator -- str (or None)
-        """
-        element = self.get_element("dc:creator")
-        if element is None:
-            element = Element.from_tag("dc:creator")
-            self.insert(element, xmlposition=FIRST_CHILD)
-        if not creator:
-            creator = "Unknown"
-        element.text = creator
-
-    def set_dc_date(self, date: datetime | None = None) -> None:
-        """Set the date of the change. If date is None, use current time.
-
-        Arguments:
-
-            date -- datetime (or None)
-        """
-        if date is None:
-            date = datetime.now()
-        dcdate = DateTime.encode(date)
-        element = self.get_element("dc:date")
-        if element is None:
-            element = Element.from_tag("dc:date")
-            self.insert(element, xmlposition=LAST_CHILD)
-        element.text = dcdate
-
-    def get_comments(self, joined: bool = True) -> str | list[str]:
-        """Get text content of the comments. If joined is True (default), the
-        text of different paragraphs is concatenated, else a list of strings,
-        one per paragraph, is returned.
-
-        Arguments:
-
-            joined -- boolean (default is True)
-
-        Return: str or list of str.
-        """
-        content = self.get_paragraphs()
-        if content is None:
-            content = []
-        text = [para.get_formatted_text(simple=True) for para in content]  # type: ignore
-        if joined:
-            return "\n".join(text)
-        return text
-
-    def set_comments(self, text: str = "", replace: bool = True) -> None:
-        """Set the text content of the comments. If replace is True (default),
-        the new text replace old comments, else it is added at the end.
-
-        Arguments:
-
-            text -- str
-
-            replace -- boolean
-        """
-        if replace:
-            for para in self.get_paragraphs():
-                self.delete(para)
-        para = Paragraph()
-        para.append_plain_text(text)
-        self.insert(para, xmlposition=LAST_CHILD)
-
-

Ancestors

- -

Methods

-
-
-def get_comments(self, joined: bool = True) ‑> str | list[str] -
-
-

Get text content of the comments. If joined is True (default), the -text of different paragraphs is concatenated, else a list of strings, -one per paragraph, is returned.

-

Arguments

-

joined – boolean (default is True)

-

Return: str or list of str.

-
- -Expand source code - -
def get_comments(self, joined: bool = True) -> str | list[str]:
-    """Get text content of the comments. If joined is True (default), the
-    text of different paragraphs is concatenated, else a list of strings,
-    one per paragraph, is returned.
-
-    Arguments:
-
-        joined -- boolean (default is True)
-
-    Return: str or list of str.
-    """
-    content = self.get_paragraphs()
-    if content is None:
-        content = []
-    text = [para.get_formatted_text(simple=True) for para in content]  # type: ignore
-    if joined:
-        return "\n".join(text)
-    return text
-
-
-
-def set_comments(self, text: str = '', replace: bool = True) ‑> None -
-
-

Set the text content of the comments. If replace is True (default), -the new text replace old comments, else it is added at the end.

-

Arguments

-

text – str

-

replace – boolean

-
- -Expand source code - -
def set_comments(self, text: str = "", replace: bool = True) -> None:
-    """Set the text content of the comments. If replace is True (default),
-    the new text replace old comments, else it is added at the end.
-
-    Arguments:
-
-        text -- str
-
-        replace -- boolean
-    """
-    if replace:
-        for para in self.get_paragraphs():
-            self.delete(para)
-    para = Paragraph()
-    para.append_plain_text(text)
-    self.insert(para, xmlposition=LAST_CHILD)
-
-
-
-def set_dc_creator(self, creator: str | None = None) ‑> None -
-
-

Set the creator of the change. Default for creator is 'Unknown'.

-

Arguments

-

creator – str (or None)

-
- -Expand source code - -
def set_dc_creator(self, creator: str | None = None) -> None:
-    """Set the creator of the change. Default for creator is 'Unknown'.
-
-    Arguments:
-
-        creator -- str (or None)
-    """
-    element = self.get_element("dc:creator")
-    if element is None:
-        element = Element.from_tag("dc:creator")
-        self.insert(element, xmlposition=FIRST_CHILD)
-    if not creator:
-        creator = "Unknown"
-    element.text = creator
-
-
-
-def set_dc_date(self, date: datetime | None = None) ‑> None -
-
-

Set the date of the change. If date is None, use current time.

-

Arguments

-

date – datetime (or None)

-
- -Expand source code - -
def set_dc_date(self, date: datetime | None = None) -> None:
-    """Set the date of the change. If date is None, use current time.
-
-    Arguments:
-
-        date -- datetime (or None)
-    """
-    if date is None:
-        date = datetime.now()
-    dcdate = DateTime.encode(date)
-    element = self.get_element("dc:date")
-    if element is None:
-        element = Element.from_tag("dc:date")
-        self.insert(element, xmlposition=LAST_CHILD)
-    element.text = dcdate
-
-
-
-

Inherited members

- -
-
-class TextChange -(**kwargs: Any) -
-
-

The TextChange "text:change" element marks a position in an empty -region where text has been deleted.

-
- -Expand source code - -
class TextChange(Element):
-    """The TextChange "text:change" element marks a position in an empty
-    region where text has been deleted.
-    """
-
-    _tag = "text:change"
-
-    def get_id(self) -> str | None:
-        return self.get_attribute_string("text:change-id")
-
-    def set_id(self, idx: str) -> None:
-        self.set_attribute("text:change-id", idx)
-
-    def _get_tracked_changes(self) -> Element | None:
-        body = self.document_body
-        if not body:
-            raise ValueError
-        return body.get_tracked_changes()
-
-    def get_changed_region(
-        self,
-        tracked_changes: Element | None = None,
-    ) -> Element | None:
-        if not tracked_changes:
-            tracked_changes = self._get_tracked_changes()
-        idx = self.get_id()
-        return tracked_changes.get_changed_region(text_id=idx)  # type: ignore
-
-    def get_change_info(
-        self,
-        tracked_changes: Element | None = None,
-    ) -> Element | None:
-        changed_region = self.get_changed_region(tracked_changes=tracked_changes)
-        if not changed_region:
-            return None
-        return changed_region.get_change_info()  # type: ignore
-
-    def get_change_element(
-        self,
-        tracked_changes: Element | None = None,
-    ) -> Element | None:
-        changed_region = self.get_changed_region(tracked_changes=tracked_changes)
-        if not changed_region:
-            return None
-        return changed_region.get_change_element()  # type: ignore
-
-    def get_deleted(
-        self,
-        tracked_changes: Element | None = None,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> Element | None:
-        """Shortcut to get the deleted informations stored in the
-        TextDeletion stored in the tracked changes.
-
-        Return: Paragraph (or None)."
-        """
-        changed = self.get_change_element(tracked_changes=tracked_changes)
-        if not changed:
-            return None
-        return changed.get_deleted(  # type: ignore
-            as_text=as_text,
-            no_header=no_header,
-            clean=clean,
-        )
-
-    def get_inserted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> str | Element | list[Element] | None:
-        """Return None."""
-        return None
-
-    def get_start(self) -> TextChangeStart | None:
-        """Return None."""
-        return None
-
-    def get_end(self) -> TextChangeEnd | None:
-        """Return None."""
-        return None
-
-

Ancestors

- -

Subclasses

- -

Methods

-
-
-def get_change_element(self, tracked_changes: Element | None = None) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_change_element(
-    self,
-    tracked_changes: Element | None = None,
-) -> Element | None:
-    changed_region = self.get_changed_region(tracked_changes=tracked_changes)
-    if not changed_region:
-        return None
-    return changed_region.get_change_element()  # type: ignore
-
-
-
-def get_change_info(self, tracked_changes: Element | None = None) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_change_info(
-    self,
-    tracked_changes: Element | None = None,
-) -> Element | None:
-    changed_region = self.get_changed_region(tracked_changes=tracked_changes)
-    if not changed_region:
-        return None
-    return changed_region.get_change_info()  # type: ignore
-
-
-
-def get_changed_region(self, tracked_changes: Element | None = None) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_changed_region(
-    self,
-    tracked_changes: Element | None = None,
-) -> Element | None:
-    if not tracked_changes:
-        tracked_changes = self._get_tracked_changes()
-    idx = self.get_id()
-    return tracked_changes.get_changed_region(text_id=idx)  # type: ignore
-
-
-
-def get_deleted(self, tracked_changes: Element | None = None, as_text: bool = False, no_header: bool = False, clean: bool = True) ‑> Element | None -
-
-

Shortcut to get the deleted informations stored in the -TextDeletion stored in the tracked changes.

-

Return: Paragraph (or None)."

-
- -Expand source code - -
def get_deleted(
-    self,
-    tracked_changes: Element | None = None,
-    as_text: bool = False,
-    no_header: bool = False,
-    clean: bool = True,
-) -> Element | None:
-    """Shortcut to get the deleted informations stored in the
-    TextDeletion stored in the tracked changes.
-
-    Return: Paragraph (or None)."
-    """
-    changed = self.get_change_element(tracked_changes=tracked_changes)
-    if not changed:
-        return None
-    return changed.get_deleted(  # type: ignore
-        as_text=as_text,
-        no_header=no_header,
-        clean=clean,
-    )
-
-
-
-def get_end(self) ‑> TextChangeEnd | None -
-
-

Return None.

-
- -Expand source code - -
def get_end(self) -> TextChangeEnd | None:
-    """Return None."""
-    return None
-
-
-
-def get_id(self) ‑> str | None -
-
-
-
- -Expand source code - -
def get_id(self) -> str | None:
-    return self.get_attribute_string("text:change-id")
-
-
-
-def get_inserted(self, as_text: bool = False, no_header: bool = False, clean: bool = True) ‑> str | Element | list[Element] | None -
-
-

Return None.

-
- -Expand source code - -
def get_inserted(
-    self,
-    as_text: bool = False,
-    no_header: bool = False,
-    clean: bool = True,
-) -> str | Element | list[Element] | None:
-    """Return None."""
-    return None
-
-
-
-def get_start(self) ‑> TextChangeStart | None -
-
-

Return None.

-
- -Expand source code - -
def get_start(self) -> TextChangeStart | None:
-    """Return None."""
-    return None
-
-
-
-def set_id(self, idx: str) ‑> None -
-
-
-
- -Expand source code - -
def set_id(self, idx: str) -> None:
-    self.set_attribute("text:change-id", idx)
-
-
-
-

Inherited members

- -
-
-class TextChangeEnd -(**kwargs: Any) -
-
-

The TextChangeEnd "text:change-end" element marks the end of a region -with content where text has been inserted or the format has been -changed.

-
- -Expand source code - -
class TextChangeEnd(TextChange):
-    """The TextChangeEnd "text:change-end" element marks the end of a region
-    with content where text has been inserted or the format has been
-    changed.
-    """
-
-    _tag = "text:change-end"
-
-    def get_start(self) -> TextChangeStart | None:
-        """Return the corresponding annotation starting tag or None."""
-        idx = self.get_id()
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can not find end tag: no parent available.")
-        body = self.document_body
-        if not body:
-            body = self.root
-        return body.get_text_change_start(idx=idx)  # type: ignore
-
-    def get_end(self) -> TextChangeEnd | None:
-        """Return self."""
-        return self
-
-    def get_deleted(self, *args: Any, **kwargs: Any) -> Element | None:
-        """Return None."""
-        return None
-
-    def get_inserted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> str | Element | list[Element] | None:
-        """Return the content between text:change-start and text:change-end.
-
-        If no content exists (deletion tag), returns None (or '' if text flag
-        is True).
-        If as_text is True: returns the text content.
-        If clean is True: suppress unwanted tags (deletions marks, ...)
-        If no_header is True: existing text:h are changed in text:p
-        By default: returns a list of Element, cleaned and with headers
-
-        Arguments:
-
-            as_text -- boolean
-
-            clean -- boolean
-
-            no_header -- boolean
-
-        Return: list or Element or text
-        """
-
-        # idx = self.get_id()
-        start = self.get_start()
-        end = self.get_end()
-        if end is None or start is None:
-            if as_text:
-                return ""
-            return None
-        body = self.document_body
-        if not body:
-            body = self.root
-        return body.get_between(
-            start, end, as_text=as_text, no_header=no_header, clean=clean
-        )
-
-

Ancestors

- -

Subclasses

- -

Methods

-
-
-def get_deleted(self, *args: Any, **kwargs: Any) ‑> Element | None -
-
-

Return None.

-
- -Expand source code - -
def get_deleted(self, *args: Any, **kwargs: Any) -> Element | None:
-    """Return None."""
-    return None
-
-
-
-def get_end(self) ‑> TextChangeEnd | None -
-
-

Return self.

-
- -Expand source code - -
def get_end(self) -> TextChangeEnd | None:
-    """Return self."""
-    return self
-
-
-
-def get_inserted(self, as_text: bool = False, no_header: bool = False, clean: bool = True) ‑> str | Element | list[Element] | None -
-
-

Return the content between text:change-start and text:change-end.

-

If no content exists (deletion tag), returns None (or '' if text flag -is True). -If as_text is True: returns the text content. -If clean is True: suppress unwanted tags (deletions marks, …) -If no_header is True: existing text:h are changed in text:p -By default: returns a list of Element, cleaned and with headers

-

Arguments

-

as_text – boolean

-

clean – boolean

-

no_header – boolean

-

Return: list or Element or text

-
- -Expand source code - -
def get_inserted(
-    self,
-    as_text: bool = False,
-    no_header: bool = False,
-    clean: bool = True,
-) -> str | Element | list[Element] | None:
-    """Return the content between text:change-start and text:change-end.
-
-    If no content exists (deletion tag), returns None (or '' if text flag
-    is True).
-    If as_text is True: returns the text content.
-    If clean is True: suppress unwanted tags (deletions marks, ...)
-    If no_header is True: existing text:h are changed in text:p
-    By default: returns a list of Element, cleaned and with headers
-
-    Arguments:
-
-        as_text -- boolean
-
-        clean -- boolean
-
-        no_header -- boolean
-
-    Return: list or Element or text
-    """
-
-    # idx = self.get_id()
-    start = self.get_start()
-    end = self.get_end()
-    if end is None or start is None:
-        if as_text:
-            return ""
-        return None
-    body = self.document_body
-    if not body:
-        body = self.root
-    return body.get_between(
-        start, end, as_text=as_text, no_header=no_header, clean=clean
-    )
-
-
-
-def get_start(self) ‑> TextChangeStart | None -
-
-

Return the corresponding annotation starting tag or None.

-
- -Expand source code - -
def get_start(self) -> TextChangeStart | None:
-    """Return the corresponding annotation starting tag or None."""
-    idx = self.get_id()
-    parent = self.parent
-    if parent is None:
-        raise ValueError("Can not find end tag: no parent available.")
-    body = self.document_body
-    if not body:
-        body = self.root
-    return body.get_text_change_start(idx=idx)  # type: ignore
-
-
-
-

Inherited members

- -
-
-class TextChangeStart -(**kwargs: Any) -
-
-

The TextChangeStart "text:change-start" element marks the start of a -region with content where text has been inserted or the format has -been changed.

-
- -Expand source code - -
class TextChangeStart(TextChangeEnd):
-    """The TextChangeStart "text:change-start" element marks the start of a
-    region with content where text has been inserted or the format has
-    been changed.
-    """
-
-    _tag = "text:change-start"
-
-    def get_start(self) -> TextChangeStart:
-        """Return self."""
-        return self
-
-    def get_end(self) -> TextChangeEnd:
-        """Return the corresponding change-end tag or None."""
-        idx = self.get_id()
-        parent = self.parent
-        if parent is None:
-            raise ValueError("Can not find end tag: no parent available.")
-        body = self.document_body
-        if not body:
-            body = self.root
-        return body.get_text_change_end(idx=idx)  # type: ignore
-
-    def delete(
-        self,
-        child: Element | None = None,
-        keep_tail: bool = True,
-    ) -> None:
-        """Delete the given element from the XML tree. If no element is given,
-        "self" is deleted. The XML library may allow to continue to use an
-        element now "orphan" as long as you have a reference to it.
-
-        For TextChangeStart : delete also the end tag if exists.
-
-        Arguments:
-
-            child -- Element
-
-            keep_tail -- boolean (default to True), True for most usages.
-        """
-        if child is not None:  # act like normal delete
-            return super().delete(child, keep_tail)
-        idx = self.get_id()
-        parent = self.parent
-        if parent is None:
-            raise ValueError("cannot delete the root element")
-        body = self.document_body
-        if not body:
-            body = parent
-        end = body.get_text_change_end(idx=idx)
-        if end:
-            end.delete()
-        # act like normal delete
-        super().delete()
-
-

Ancestors

- -

Methods

-
-
-def delete(self, child: Element | None = None, keep_tail: bool = True) ‑> None -
-
-

Delete the given element from the XML tree. If no element is given, -"self" is deleted. The XML library may allow to continue to use an -element now "orphan" as long as you have a reference to it.

-

For TextChangeStart : delete also the end tag if exists.

-

Arguments

-

child – Element

-

keep_tail – boolean (default to True), True for most usages.

-
- -Expand source code - -
def delete(
-    self,
-    child: Element | None = None,
-    keep_tail: bool = True,
-) -> None:
-    """Delete the given element from the XML tree. If no element is given,
-    "self" is deleted. The XML library may allow to continue to use an
-    element now "orphan" as long as you have a reference to it.
-
-    For TextChangeStart : delete also the end tag if exists.
-
-    Arguments:
-
-        child -- Element
-
-        keep_tail -- boolean (default to True), True for most usages.
-    """
-    if child is not None:  # act like normal delete
-        return super().delete(child, keep_tail)
-    idx = self.get_id()
-    parent = self.parent
-    if parent is None:
-        raise ValueError("cannot delete the root element")
-    body = self.document_body
-    if not body:
-        body = parent
-    end = body.get_text_change_end(idx=idx)
-    if end:
-        end.delete()
-    # act like normal delete
-    super().delete()
-
-
-
-def get_end(self) ‑> TextChangeEnd -
-
-

Return the corresponding change-end tag or None.

-
- -Expand source code - -
def get_end(self) -> TextChangeEnd:
-    """Return the corresponding change-end tag or None."""
-    idx = self.get_id()
-    parent = self.parent
-    if parent is None:
-        raise ValueError("Can not find end tag: no parent available.")
-    body = self.document_body
-    if not body:
-        body = self.root
-    return body.get_text_change_end(idx=idx)  # type: ignore
-
-
-
-def get_start(self) ‑> TextChangeStart -
-
-

Return self.

-
- -Expand source code - -
def get_start(self) -> TextChangeStart:
-    """Return self."""
-    return self
-
-
-
-

Inherited members

- -
-
-class TextChangedRegion -(**kwargs: Any) -
-
-

Each TextChangedRegion "text:changed-region" element contains a single -element, one of TextInsertion, TextDeletion or TextFormatChange that -corresponds to a change being tracked within the scope of the -"text:tracked-changes" element that contains the "text:changed-region" -instance. -The xml:id attribute of the TextChangedRegion is referenced -from the "text:change", "text:change-start" and "text:change-end" -elements that identify where the change applies to markup in the scope of -the "text:tracked-changes" element.

-

Warning : for this implementation, text:change should be referenced only -once in the scope, which is different from ODF 1.2 requirement: -" A "text:changed-region" can be referenced by more than one -change, but the corresponding referencing change mark elements -shall be of the same change type - insertion, format change or -deletion. "

-
- -Expand source code - -
class TextChangedRegion(Element):
-    """Each TextChangedRegion "text:changed-region" element contains a single
-    element, one of TextInsertion, TextDeletion or TextFormatChange that
-    corresponds to a change being tracked within the scope of the
-    "text:tracked-changes" element that contains the "text:changed-region"
-    instance.
-    The xml:id attribute of the TextChangedRegion is referenced
-    from the "text:change", "text:change-start" and "text:change-end"
-    elements that identify where the change applies to markup in the scope of
-    the "text:tracked-changes" element.
-
-    Warning : for this implementation, text:change should be referenced only
-              once in the scope, which is different from ODF 1.2 requirement:
-             " A "text:changed-region" can be referenced by more than one
-             change, but the corresponding referencing change mark elements
-             shall be of the same change type - insertion, format change or
-             deletion. "
-    """
-
-    _tag = "text:changed-region"
-
-    def get_change_info(self) -> Element | None:
-        """Shortcut to get the ChangeInfo element of the change
-        element child.
-
-        Return: ChangeInfo element.
-        """
-        return self.get_element("descendant::office:change-info")
-
-    def set_change_info(
-        self,
-        change_info: Element | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-        comments: Element | list[Element] | None = None,
-    ) -> None:
-        """Shortcut to set the ChangeInfo element of the sub change element.
-        See TextInsertion.set_change_info() for details.
-
-        Arguments:
-
-             change_info -- ChangeInfo element (or None)
-
-             cretor -- str (or None)
-
-             date -- datetime (or None)
-
-             comments -- Paragraph or list of Paragraph elements (or None)
-        """
-        child = self.get_change_element()
-        if not child:
-            raise ValueError
-        child.set_change_info(  # type: ignore
-            change_info=change_info, creator=creator, date=date, comments=comments
-        )
-
-    def get_change_element(self) -> Element | None:
-        """Get the change element child. It can be either: TextInsertion,
-        TextDeletion, or TextFormatChange as an Element object.
-
-        Return: Element.
-        """
-        request = (
-            "descendant::text:insertion "
-            "| descendant::text:deletion"
-            "| descendant::text:format-change"
-        )
-        return self._filtered_element(request, 0)
-
-    def _get_text_id(self) -> str | None:
-        return self.get_attribute_string("text:id")
-
-    def _set_text_id(self, text_id: str) -> None:
-        self.set_attribute("text:id", text_id)
-
-    def _get_xml_id(self) -> str | None:
-        return self.get_attribute_string("xml:id")
-
-    def _set_xml_id(self, xml_id: str) -> None:
-        self.set_attribute("xml:id", xml_id)
-
-    def get_id(self) -> str | None:
-        """Get the "text:id" attribute.
-
-        Return: str
-        """
-        return self._get_text_id()
-
-    def set_id(self, idx: str) -> None:
-        """Set both the "text:id" and "xml:id" attributes with same value."""
-        self._set_text_id(idx)
-        self._set_xml_id(idx)
-
-

Ancestors

- -

Methods

-
-
-def get_change_element(self) ‑> Element | None -
-
-

Get the change element child. It can be either: TextInsertion, -TextDeletion, or TextFormatChange as an Element object.

-

Return: Element.

-
- -Expand source code - -
def get_change_element(self) -> Element | None:
-    """Get the change element child. It can be either: TextInsertion,
-    TextDeletion, or TextFormatChange as an Element object.
-
-    Return: Element.
-    """
-    request = (
-        "descendant::text:insertion "
-        "| descendant::text:deletion"
-        "| descendant::text:format-change"
-    )
-    return self._filtered_element(request, 0)
-
-
-
-def get_change_info(self) ‑> Element | None -
-
-

Shortcut to get the ChangeInfo element of the change -element child.

-

Return: ChangeInfo element.

-
- -Expand source code - -
def get_change_info(self) -> Element | None:
-    """Shortcut to get the ChangeInfo element of the change
-    element child.
-
-    Return: ChangeInfo element.
-    """
-    return self.get_element("descendant::office:change-info")
-
-
-
-def get_id(self) ‑> str | None -
-
-

Get the "text:id" attribute.

-

Return: str

-
- -Expand source code - -
def get_id(self) -> str | None:
-    """Get the "text:id" attribute.
-
-    Return: str
-    """
-    return self._get_text_id()
-
-
-
-def set_change_info(self, change_info: Element | None = None, creator: str | None = None, date: datetime | None = None, comments: Element | list[Element] | None = None) ‑> None -
-
-

Shortcut to set the ChangeInfo element of the sub change element. -See TextInsertion.set_change_info() for details.

-

Arguments

-

change_info – ChangeInfo element (or None)

-

cretor – str (or None)

-

date – datetime (or None)

-

comments – Paragraph or list of Paragraph elements (or None)

-
- -Expand source code - -
def set_change_info(
-    self,
-    change_info: Element | None = None,
-    creator: str | None = None,
-    date: datetime | None = None,
-    comments: Element | list[Element] | None = None,
-) -> None:
-    """Shortcut to set the ChangeInfo element of the sub change element.
-    See TextInsertion.set_change_info() for details.
-
-    Arguments:
-
-         change_info -- ChangeInfo element (or None)
-
-         cretor -- str (or None)
-
-         date -- datetime (or None)
-
-         comments -- Paragraph or list of Paragraph elements (or None)
-    """
-    child = self.get_change_element()
-    if not child:
-        raise ValueError
-    child.set_change_info(  # type: ignore
-        change_info=change_info, creator=creator, date=date, comments=comments
-    )
-
-
-
-def set_id(self, idx: str) ‑> None -
-
-

Set both the "text:id" and "xml:id" attributes with same value.

-
- -Expand source code - -
def set_id(self, idx: str) -> None:
-    """Set both the "text:id" and "xml:id" attributes with same value."""
-    self._set_text_id(idx)
-    self._set_xml_id(idx)
-
-
-
-

Inherited members

- -
-
-class TextDeletion -(**kwargs: Any) -
-
-

The TextDeletion "text:deletion" contains information that identifies -the person responsible for a deletion and the date of that deletion. -This information may also contain one or more Paragraph which contains -a comment on the deletion. The TextDeletion element may also contain -content that was deleted while change tracking was enabled. The position -where the text was deleted is marked by a "text:change" element. Deleted -text is contained in a paragraph element. To reconstruct the original -text, the paragraph containing the deleted text is merged with its -surrounding paragraph or heading element. To reconstruct the text before -a deletion took place: -- If the change mark is inside a paragraph, insert the content that was -deleted, but remove all leading start tags up to and including the -first "text:p" element and all trailing end tags up to and including -the last "/text:p" or "/text:h" element. If the last trailing element -is a "/text:h", change the end tag "/text:p" following this insertion -to a "/text:h" element. -- If the change mark is inside a heading, insert the content that was -deleted, but remove all leading start tags up to and including the -first "text:h" element and all trailing end tags up to and including -the last "/text:h" or "/text:p" element. If the last trailing element -is a "/text:p", change the end tag "/text:h" following this insertion -to a "/text:p" element. -- Otherwise, copy the text content of the "text:deletion" element in -place of the change mark.

-
- -Expand source code - -
class TextDeletion(TextInsertion):
-    """The TextDeletion "text:deletion" contains information that identifies
-    the person responsible for a deletion and the date of that deletion.
-    This information may also contain one or more Paragraph which contains
-    a comment on the deletion. The TextDeletion element may also contain
-    content that was deleted while change tracking was enabled. The position
-    where the text was deleted is marked by a "text:change" element. Deleted
-    text is contained in a paragraph element. To reconstruct the original
-    text, the paragraph containing the deleted text is merged with its
-    surrounding paragraph or heading element. To reconstruct the text before
-    a deletion took place:
-      - If the change mark is inside a paragraph, insert the content that was
-      deleted, but remove all leading start tags up to and including the
-      first "text:p" element and all trailing end tags up to and including
-      the last "/text:p" or "/text:h" element. If the last trailing element
-      is a "/text:h", change the end tag "/text:p" following this insertion
-      to a "/text:h" element.
-      - If the change mark is inside a heading, insert the content that was
-      deleted, but remove all leading start tags up to and including the
-      first "text:h" element and all trailing end tags up to and including
-      the last "/text:h" or "/text:p" element. If the last trailing element
-      is a "/text:p", change the end tag "/text:h" following this insertion
-      to a "/text:p" element.
-      - Otherwise, copy the text content of the "text:deletion" element in
-      place of the change mark.
-    """
-
-    _tag = "text:deletion"
-
-    def get_deleted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-    ) -> str | list[Element] | None:
-        """Get the deleted informations stored in the TextDeletion.
-        If as_text is True: returns the text content.
-        If no_header is True: existing Heading are changed in Paragraph
-
-        Arguments:
-
-            as_text -- boolean
-
-            no_header -- boolean
-
-        Return: Paragraph and Header list
-        """
-        children = self.children
-        inner = [elem for elem in children if elem.tag != "office:change-info"]
-        if no_header:  # crude replace t:h by t:p
-            new_inner = []
-            for element in inner:
-                if element.tag == "text:h":
-                    children = element.children
-                    text = element.text
-                    para = Element.from_tag("text:p")
-                    para.text = text
-                    for child in children:
-                        para.append(child)
-                    new_inner.append(para)
-                else:
-                    new_inner.append(element)
-            inner = new_inner
-        if as_text:
-            return "\n".join([elem.get_formatted_text(context=None) for elem in inner])
-        return inner
-
-    def set_deleted(self, paragraph_or_list: Element | list[Element]) -> None:
-        """Set the deleted informations stored in the TextDeletion. An
-        actual content that was deleted is expected, embeded in a Paragraph
-        element or Header.
-
-        Arguments:
-
-            paragraph_or_list -- Paragraph or Header element (or list)
-        """
-        for element in self.get_deleted():  # type: ignore
-            self.delete(element)  # type: ignore
-        if isinstance(paragraph_or_list, Element):
-            paragraph_or_list = [paragraph_or_list]
-        for element in paragraph_or_list:
-            self.append(element)
-
-    def get_inserted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> str | Element | list[Element] | None:
-        """Return None."""
-        if as_text:
-            return ""
-        return None
-
-

Ancestors

- -

Methods

-
-
-def get_deleted(self, as_text: bool = False, no_header: bool = False) ‑> str | list[Element] | None -
-
-

Get the deleted informations stored in the TextDeletion. -If as_text is True: returns the text content. -If no_header is True: existing Heading are changed in Paragraph

-

Arguments

-

as_text – boolean

-

no_header – boolean

-

Return: Paragraph and Header list

-
- -Expand source code - -
def get_deleted(
-    self,
-    as_text: bool = False,
-    no_header: bool = False,
-) -> str | list[Element] | None:
-    """Get the deleted informations stored in the TextDeletion.
-    If as_text is True: returns the text content.
-    If no_header is True: existing Heading are changed in Paragraph
-
-    Arguments:
-
-        as_text -- boolean
-
-        no_header -- boolean
-
-    Return: Paragraph and Header list
-    """
-    children = self.children
-    inner = [elem for elem in children if elem.tag != "office:change-info"]
-    if no_header:  # crude replace t:h by t:p
-        new_inner = []
-        for element in inner:
-            if element.tag == "text:h":
-                children = element.children
-                text = element.text
-                para = Element.from_tag("text:p")
-                para.text = text
-                for child in children:
-                    para.append(child)
-                new_inner.append(para)
-            else:
-                new_inner.append(element)
-        inner = new_inner
-    if as_text:
-        return "\n".join([elem.get_formatted_text(context=None) for elem in inner])
-    return inner
-
-
-
-def get_inserted(self, as_text: bool = False, no_header: bool = False, clean: bool = True) ‑> str | Element | list[Element] | None -
-
-

Return None.

-
- -Expand source code - -
def get_inserted(
-    self,
-    as_text: bool = False,
-    no_header: bool = False,
-    clean: bool = True,
-) -> str | Element | list[Element] | None:
-    """Return None."""
-    if as_text:
-        return ""
-    return None
-
-
-
-def set_deleted(self, paragraph_or_list: Element | list[Element]) ‑> None -
-
-

Set the deleted informations stored in the TextDeletion. An -actual content that was deleted is expected, embeded in a Paragraph -element or Header.

-

Arguments

-

paragraph_or_list – Paragraph or Header element (or list)

-
- -Expand source code - -
def set_deleted(self, paragraph_or_list: Element | list[Element]) -> None:
-    """Set the deleted informations stored in the TextDeletion. An
-    actual content that was deleted is expected, embeded in a Paragraph
-    element or Header.
-
-    Arguments:
-
-        paragraph_or_list -- Paragraph or Header element (or list)
-    """
-    for element in self.get_deleted():  # type: ignore
-        self.delete(element)  # type: ignore
-    if isinstance(paragraph_or_list, Element):
-        paragraph_or_list = [paragraph_or_list]
-    for element in paragraph_or_list:
-        self.append(element)
-
-
-
-

Inherited members

- -
-
-class TextFormatChange -(**kwargs: Any) -
-
-

The TextFormatChange "text:format-change" element represents any change -in formatting attributes. The region where the change took place is -marked by "text:change-start", "text:change-end" or "text:change" -elements.

-

Note: This element does not contain formatting changes that have taken -place.

-
- -Expand source code - -
class TextFormatChange(TextInsertion):
-    """The TextFormatChange "text:format-change" element represents any change
-    in formatting attributes. The region where the change took place is
-    marked by "text:change-start", "text:change-end" or "text:change"
-    elements.
-
-    Note: This element does not contain formatting changes that have taken
-    place.
-    """
-
-    _tag = "text:format-change"
-
-

Ancestors

- -

Inherited members

- -
-
-class TextInsertion -(**kwargs: Any) -
-
-

The TextInsertion "text:insertion" element contains the information -that identifies the person responsible for a change and the date of -that change. This information may also contain one or more "text:p" -Paragraph which contain a comment on the insertion. The -TextInsertion element's parent "text:changed-region" element has an -xml:id or text:id attribute, the value of which binds that parent -element to the text:change-id attribute on the "text:change-start" -and "text:change-end" elements.

-
- -Expand source code - -
class TextInsertion(Element):
-    """The TextInsertion "text:insertion" element contains the information
-    that identifies the person responsible for a change and the date of
-    that change. This information may also contain one or more "text:p"
-    Paragraph which contain a comment on the insertion. The
-    TextInsertion element's parent "text:changed-region" element has an
-    xml:id or text:id attribute, the value of which binds that parent
-    element to the text:change-id attribute on the "text:change-start"
-    and "text:change-end" elements.
-    """
-
-    _tag = "text:insertion"
-
-    def get_deleted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-    ) -> str | list[Element] | None:
-        """Return: None."""
-        if as_text:
-            return ""
-        return None
-
-    def get_inserted(
-        self,
-        as_text: bool = False,
-        no_header: bool = False,
-        clean: bool = True,
-    ) -> str | Element | list[Element] | None:
-        """Shortcut to text:change-start.get_inserted(). Return the content
-        between text:change-start and text:change-end.
-
-        If as_text is True: returns the text content.
-        If no_header is True: existing Heading are changed in Paragraph
-        If no_header is True: existing text:h are changed in text:p
-        By default: returns a list of Element, cleaned and with headers
-
-        Arguments:
-
-            as_text -- boolean
-
-            clean -- boolean
-
-            no_header -- boolean
-
-        Return: list or Element or text
-        """
-        current = self.parent  # text:changed-region
-        if not current:
-            raise ValueError
-        idx = current.get_id()  # type: ignore
-        body = self.document_body
-        if not body:
-            body = self.root
-        text_change = body.get_text_change_start(idx=idx)
-        if not text_change:
-            raise ValueError
-        return text_change.get_inserted(  # type: ignore
-            as_text=as_text, no_header=no_header, clean=clean
-        )
-
-    def get_change_info(self) -> Element | None:
-        """Get the ChangeInfo child of the element.
-
-        Return: ChangeInfo element.
-        """
-        return self.get_element("descendant::office:change-info")
-
-    def set_change_info(
-        self,
-        change_info: Element | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-        comments: Element | list[Element] | None = None,
-    ) -> None:
-        """Set the ChangeInfo element for the change element. If change_info
-        is not provided, creator, date and comments will be used to build a
-        suitable change info element. Default for creator is 'Unknown',
-        default for date is current time and default for comments is no
-        comment at all.
-        The new change info element will replace any existant ChangeInfo.
-
-        Arguments:
-
-             change_info -- ChangeInfo element (or None)
-
-             cretor -- str (or None)
-
-             date -- datetime (or None)
-
-             comments -- Paragraph or list of Paragraph elements (or None)
-        """
-        if change_info is None:
-            new_change_info = ChangeInfo(creator, date)
-            if comments is not None:
-                if isinstance(comments, Element):
-                    # single pararagraph comment
-                    comments_list = [comments]
-                else:
-                    comments_list = comments
-                # assume iterable of Paragraph
-                for paragraph in comments_list:
-                    if not isinstance(paragraph, Paragraph):
-                        raise TypeError(f"Not a Paragraph: '{paragraph!r}'")
-                    new_change_info.insert(paragraph, xmlposition=LAST_CHILD)
-        else:
-            if not isinstance(change_info, ChangeInfo):
-                raise TypeError(f"Not a ChangeInfo: '{change_info!r}'")
-            new_change_info = change_info
-
-        old = self.get_change_info()
-        if old is not None:
-            self.replace_element(old, new_change_info)
-        else:
-            self.insert(new_change_info, xmlposition=FIRST_CHILD)
-
-

Ancestors

- -

Subclasses

- -

Methods

-
-
-def get_change_info(self) ‑> Element | None -
-
-

Get the ChangeInfo child of the element.

-

Return: ChangeInfo element.

-
- -Expand source code - -
def get_change_info(self) -> Element | None:
-    """Get the ChangeInfo child of the element.
-
-    Return: ChangeInfo element.
-    """
-    return self.get_element("descendant::office:change-info")
-
-
-
-def get_deleted(self, as_text: bool = False, no_header: bool = False) ‑> str | list[Element] | None -
-
-

Return: None.

-
- -Expand source code - -
def get_deleted(
-    self,
-    as_text: bool = False,
-    no_header: bool = False,
-) -> str | list[Element] | None:
-    """Return: None."""
-    if as_text:
-        return ""
-    return None
-
-
-
-def get_inserted(self, as_text: bool = False, no_header: bool = False, clean: bool = True) ‑> str | Element | list[Element] | None -
-
-

Shortcut to text:change-start.get_inserted(). Return the content -between text:change-start and text:change-end.

-

If as_text is True: returns the text content. -If no_header is True: existing Heading are changed in Paragraph -If no_header is True: existing text:h are changed in text:p -By default: returns a list of Element, cleaned and with headers

-

Arguments

-

as_text – boolean

-

clean – boolean

-

no_header – boolean

-

Return: list or Element or text

-
- -Expand source code - -
def get_inserted(
-    self,
-    as_text: bool = False,
-    no_header: bool = False,
-    clean: bool = True,
-) -> str | Element | list[Element] | None:
-    """Shortcut to text:change-start.get_inserted(). Return the content
-    between text:change-start and text:change-end.
-
-    If as_text is True: returns the text content.
-    If no_header is True: existing Heading are changed in Paragraph
-    If no_header is True: existing text:h are changed in text:p
-    By default: returns a list of Element, cleaned and with headers
-
-    Arguments:
-
-        as_text -- boolean
-
-        clean -- boolean
-
-        no_header -- boolean
-
-    Return: list or Element or text
-    """
-    current = self.parent  # text:changed-region
-    if not current:
-        raise ValueError
-    idx = current.get_id()  # type: ignore
-    body = self.document_body
-    if not body:
-        body = self.root
-    text_change = body.get_text_change_start(idx=idx)
-    if not text_change:
-        raise ValueError
-    return text_change.get_inserted(  # type: ignore
-        as_text=as_text, no_header=no_header, clean=clean
-    )
-
-
-
-def set_change_info(self, change_info: Element | None = None, creator: str | None = None, date: datetime | None = None, comments: Element | list[Element] | None = None) ‑> None -
-
-

Set the ChangeInfo element for the change element. If change_info -is not provided, creator, date and comments will be used to build a -suitable change info element. Default for creator is 'Unknown', -default for date is current time and default for comments is no -comment at all. -The new change info element will replace any existant ChangeInfo.

-

Arguments

-

change_info – ChangeInfo element (or None)

-

cretor – str (or None)

-

date – datetime (or None)

-

comments – Paragraph or list of Paragraph elements (or None)

-
- -Expand source code - -
def set_change_info(
-    self,
-    change_info: Element | None = None,
-    creator: str | None = None,
-    date: datetime | None = None,
-    comments: Element | list[Element] | None = None,
-) -> None:
-    """Set the ChangeInfo element for the change element. If change_info
-    is not provided, creator, date and comments will be used to build a
-    suitable change info element. Default for creator is 'Unknown',
-    default for date is current time and default for comments is no
-    comment at all.
-    The new change info element will replace any existant ChangeInfo.
-
-    Arguments:
-
-         change_info -- ChangeInfo element (or None)
-
-         cretor -- str (or None)
-
-         date -- datetime (or None)
-
-         comments -- Paragraph or list of Paragraph elements (or None)
-    """
-    if change_info is None:
-        new_change_info = ChangeInfo(creator, date)
-        if comments is not None:
-            if isinstance(comments, Element):
-                # single pararagraph comment
-                comments_list = [comments]
-            else:
-                comments_list = comments
-            # assume iterable of Paragraph
-            for paragraph in comments_list:
-                if not isinstance(paragraph, Paragraph):
-                    raise TypeError(f"Not a Paragraph: '{paragraph!r}'")
-                new_change_info.insert(paragraph, xmlposition=LAST_CHILD)
-    else:
-        if not isinstance(change_info, ChangeInfo):
-            raise TypeError(f"Not a ChangeInfo: '{change_info!r}'")
-        new_change_info = change_info
-
-    old = self.get_change_info()
-    if old is not None:
-        self.replace_element(old, new_change_info)
-    else:
-        self.insert(new_change_info, xmlposition=FIRST_CHILD)
-
-
-
-

Inherited members

- -
-
-class TrackedChanges -(**kwargs: Any) -
-
-

The TrackedChanges "text:tracked-changes" element acts as a container -for TextChangedRegion elements that represent changes in a certain -scope of an OpenDocument document. This scope is the element in which -the TrackedChanges element occurs. Changes in this scope shall be -tracked by TextChangedRegion elements contained in the -TrackedChanges element in this scope. If a TrackedChanges -element is absent, there are no tracked changes in the corresponding -scope. In this case, all change mark elements in this scope shall be -ignored.

-
- -Expand source code - -
class TrackedChanges(Element):
-    """The TrackedChanges "text:tracked-changes" element acts as a container
-    for TextChangedRegion elements that represent changes in a certain
-    scope of an OpenDocument document. This scope is the element in which
-    the TrackedChanges element occurs. Changes in this scope shall be
-    tracked by TextChangedRegion elements contained in the
-    TrackedChanges element in this scope. If a TrackedChanges
-    element is absent, there are no tracked changes in the corresponding
-    scope. In this case, all change mark elements in this scope shall be
-    ignored.
-    """
-
-    _tag = "text:tracked-changes"
-
-    def get_changed_regions(
-        self,
-        creator: str | None = None,
-        date: datetime | None = None,
-        content: str | None = None,
-        role: str | None = None,
-    ) -> list[Element]:
-        changed_regions = self._filtered_elements(
-            "text:changed-region",
-            dc_creator=creator,
-            dc_date=date,
-            content=content,
-        )
-        if role is None:
-            return changed_regions
-        result: list[Element] = []
-        for regien in changed_regions:
-            changed = regien.get_change_element()  # type: ignore
-            if not changed:
-                continue
-            if changed.tag.endswith(role):
-                result.append(regien)
-        return result
-
-    def get_changed_region(
-        self,
-        position: int = 0,
-        text_id: str | None = None,
-        creator: str | None = None,
-        date: datetime | None = None,
-        content: str | None = None,
-    ) -> Element | None:
-        return self._filtered_element(
-            "text:changed-region",
-            position,
-            text_id=text_id,
-            dc_creator=creator,
-            dc_date=date,
-            content=content,
-        )
-
-

Ancestors

- -

Methods

-
-
-def get_changed_region(self, position: int = 0, text_id: str | None = None, creator: str | None = None, date: datetime | None = None, content: str | None = None) ‑> Element | None -
-
-
-
- -Expand source code - -
def get_changed_region(
-    self,
-    position: int = 0,
-    text_id: str | None = None,
-    creator: str | None = None,
-    date: datetime | None = None,
-    content: str | None = None,
-) -> Element | None:
-    return self._filtered_element(
-        "text:changed-region",
-        position,
-        text_id=text_id,
-        dc_creator=creator,
-        dc_date=date,
-        content=content,
-    )
-
-
-
-def get_changed_regions(self, creator: str | None = None, date: datetime | None = None, content: str | None = None, role: str | None = None) ‑> list[Element] -
-
-
-
- -Expand source code - -
def get_changed_regions(
-    self,
-    creator: str | None = None,
-    date: datetime | None = None,
-    content: str | None = None,
-    role: str | None = None,
-) -> list[Element]:
-    changed_regions = self._filtered_elements(
-        "text:changed-region",
-        dc_creator=creator,
-        dc_date=date,
-        content=content,
-    )
-    if role is None:
-        return changed_regions
-    result: list[Element] = []
-    for regien in changed_regions:
-        changed = regien.get_change_element()  # type: ignore
-        if not changed:
-            continue
-        if changed.tag.endswith(role):
-            result.append(regien)
-    return result
-
-
-
-

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/utils/cache_map.html b/doc/utils/cache_map.html deleted file mode 100644 index 67af4e9..0000000 --- a/doc/utils/cache_map.html +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - -odfdo.utils.cache_map API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.utils.cache_map

-
-
-

Table class for "table:table" and HeaderRows, Cell, Row, Column, -NamedRange related classes.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2012 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Table class for "table:table" and HeaderRows, Cell, Row, Column,
-NamedRange related classes.
-"""
-from __future__ import annotations
-
-from bisect import bisect_left, insort
-
-from lxml.etree import XPath
-
-from .cached_element import CachedElement
-
-
-def set_item_in_vault(  # noqa: C901
-    position: int,
-    item: CachedElement,
-    vault: CachedElement,
-    vault_scheme: XPath,
-    vault_map_name: str,
-    clone: bool = True,
-) -> CachedElement:
-    """Set the item (cell, row) in its vault (row, table), updating the
-    cache map.
-    """
-    try:
-        vault_map = getattr(vault, vault_map_name)
-    except Exception as e:
-        raise ValueError from e
-    odf_idx = find_odf_idx(vault_map, position)
-    if odf_idx is None:
-        raise ValueError
-    repeated = item.repeated or 1  # type: ignore
-    current_cache = vault_map[odf_idx]
-    cache = vault._indexes[vault_map_name]
-    if odf_idx in cache:
-        current_item = cache[odf_idx]
-    else:
-        current_item = vault._get_element_idx2(vault_scheme, odf_idx)
-    vault._indexes[vault_map_name] = {}
-    target_idx = vault.index(current_item)
-    if odf_idx > 0:
-        before_cache = vault_map[odf_idx - 1]
-    else:
-        before_cache = -1
-    current_pos = before_cache + 1
-    current_repeated = current_cache - before_cache
-    repeated_before = position - current_pos
-    repeated_after = current_repeated - repeated_before - repeated
-    if repeated_before >= 1:
-        # Update repetition
-        current_item._set_repeated(repeated_before)
-        target_idx += 1
-    else:
-        # Replacing the first occurence
-        vault.delete(current_item)
-    # Insert new element
-    if clone:
-        new_item = item.clone
-    else:
-        new_item = item
-    vault.insert(new_item, position=target_idx)
-    # Insert the remaining repetitions
-    if repeated_after >= 1:
-        after_item = current_item.clone
-        after_item._set_repeated(repeated_after)
-        vault.insert(after_item, position=target_idx + 1)
-    # setting a repeated item !
-    if repeated_after < 0:
-        # deleting some overlapped items
-        deleting = repeated_after
-        while deleting < 0:
-            delete_item = vault._get_element_idx2(vault_scheme, target_idx + 1)
-            if delete_item is None:
-                break
-            is_repeated = delete_item.repeated or 1  # type: ignore
-            is_repeated += deleting
-            if is_repeated > 1:
-                delete_item._set_repeated(is_repeated)  # type: ignore
-            else:
-                vault.delete(delete_item)
-            deleting = is_repeated
-    # update cache
-    # remove existing
-    idx = odf_idx
-    emap = _erase_map_once(vault_map, idx)
-    # add before if any:
-    if repeated_before >= 1:
-        emap = insert_map_once(emap, idx, repeated_before)
-        idx += 1
-    # add our slot
-    emap = insert_map_once(emap, idx, repeated)
-    # add after if any::
-    if repeated_after >= 1:
-        idx += 1
-        emap = insert_map_once(emap, idx, repeated_after)
-    if repeated_after < 0:
-        idx += 1
-        while repeated_after < 0:
-            if idx < len(emap):
-                emap = _erase_map_once(emap, idx)
-            repeated_after += 1
-    setattr(vault, vault_map_name, emap)
-    return new_item
-
-
-def insert_item_in_vault(
-    position: int,
-    item: CachedElement,
-    vault: CachedElement,
-    vault_scheme: XPath,
-    vault_map_name: str,
-) -> CachedElement:
-    try:
-        vault_map = getattr(vault, vault_map_name)
-    except Exception as e:
-        raise ValueError from e
-    odf_idx = find_odf_idx(vault_map, position)
-    if odf_idx is None:
-        raise ValueError
-    repeated = item.repeated or 1  # type: ignore
-    current_cache = vault_map[odf_idx]
-    cache = vault._indexes[vault_map_name]
-    if odf_idx in cache:
-        current_item = cache[odf_idx]
-    else:
-        current_item = vault._get_element_idx2(vault_scheme, odf_idx)
-    vault._indexes[vault_map_name] = {}
-    target_idx = vault.index(current_item)
-    if odf_idx > 0:
-        before_cache = vault_map[odf_idx - 1]
-    else:
-        before_cache = -1
-    current_pos = before_cache + 1
-    current_repeated = current_cache - before_cache
-    repeated_before = position - current_pos
-    repeated_after = current_repeated - repeated_before
-    new_item = item.clone
-    if repeated_before >= 1:
-        current_item._set_repeated(repeated_before)
-        vault.insert(new_item, position=target_idx + 1)
-        after_item = current_item.clone
-        after_item._set_repeated(repeated_after)
-        vault.insert(after_item, position=target_idx + 2)
-    else:
-        # only insert new cell
-        vault.insert(new_item, position=target_idx)
-    # update cache
-    if repeated_before >= 1:
-        emap = _erase_map_once(vault_map, odf_idx)
-        emap = insert_map_once(emap, odf_idx, repeated_before)
-        emap = insert_map_once(emap, odf_idx + 1, repeated)
-        setattr(
-            vault, vault_map_name, insert_map_once(emap, odf_idx + 2, repeated_after)
-        )
-    else:
-        setattr(vault, vault_map_name, insert_map_once(vault_map, odf_idx, repeated))
-    return new_item
-
-
-def delete_item_in_vault(
-    position: int,
-    vault: CachedElement,
-    vault_scheme: XPath,
-    vault_map_name: str,
-) -> None:
-    try:
-        vault_map = getattr(vault, vault_map_name)
-    except Exception as e:
-        raise ValueError from e
-    odf_idx = find_odf_idx(vault_map, position)
-    if odf_idx is None:
-        raise ValueError
-    current_cache = vault_map[odf_idx]
-    cache = vault._indexes[vault_map_name]
-    if odf_idx in cache:
-        current_item = cache[odf_idx]
-    else:
-        current_item = vault._get_element_idx2(vault_scheme, odf_idx)
-    vault._indexes[vault_map_name] = {}
-    if odf_idx > 0:
-        before_cache = vault_map[odf_idx - 1]
-    else:
-        before_cache = -1
-    # current_pos = before_cache + 1
-    current_repeated = current_cache - before_cache
-    new_repeated = current_repeated - 1
-    if new_repeated >= 1:
-        current_item._set_repeated(new_repeated)
-        setattr(
-            vault,
-            vault_map_name,
-            vault_map[:odf_idx] + [(x - 1) for x in vault_map[odf_idx:]],
-        )
-    else:
-        # actual erase
-        vault.delete(current_item)
-        setattr(
-            vault,
-            vault_map_name,
-            vault_map[:odf_idx] + [(x - 1) for x in vault_map[odf_idx + 1 :]],
-        )
-
-
-def insert_map_once(orig_map: list, odf_idx: int, repeated: int) -> list[int]:
-    """Add an item (cell or row) to the map
-
-        map  --  cache map
-
-        odf_idx  --  index in ODF XML
-
-        repeated  --  repeated value of item, 1 or more
-
-    odf_idx is NOT position (col or row), neither raw XML position, but ODF index
-    """
-    repeated = repeated or 1
-    if odf_idx > len(orig_map):
-        raise IndexError
-    if odf_idx > 0:
-        before = orig_map[odf_idx - 1]
-    else:
-        before = -1
-    juska = before + repeated  # aka max position value for item
-    if odf_idx == len(orig_map):
-        insort(orig_map, juska)
-        return orig_map
-    new_map = orig_map[:odf_idx]
-    new_map.append(juska)
-    new_map.extend([(x + repeated) for x in orig_map[odf_idx:]])
-    return new_map
-
-
-def _erase_map_once(orig_map: list, odf_idx: int) -> list[int]:
-    """Remove an item (cell or row) from the map
-
-    map  --  cache map
-
-    odf_idx  --  index in ODF XML
-    """
-    if odf_idx >= len(orig_map):
-        raise IndexError
-    if odf_idx > 0:
-        before = orig_map[odf_idx - 1]
-    else:
-        before = -1
-    current = orig_map[odf_idx]
-    repeated = current - before
-    orig_map = orig_map[:odf_idx] + [(x - repeated) for x in orig_map[odf_idx + 1 :]]
-    return orig_map
-
-
-def make_cache_map(idx_repeated_seq: list[tuple[int, int]]) -> list[int]:
-    """Build the initial cache map of the table."""
-    cache_amp: list[int] = []
-    for odf_idx, repeated in idx_repeated_seq:
-        cache_amp = insert_map_once(cache_amp, odf_idx, repeated)
-    return cache_amp
-
-
-def find_odf_idx(cache_map: list, position: int) -> int | None:
-    """Find odf_idx in the map from the position (col or row)."""
-    odf_idx = bisect_left(cache_map, position)
-    if odf_idx < len(cache_map):
-        return odf_idx
-    return None
-
-
-
-
-
-
-
-

Functions

-
-
-def delete_item_in_vault(position: int, vault: CachedElement, vault_scheme: XPath, vault_map_name: str) ‑> None -
-
-
-
- -Expand source code - -
def delete_item_in_vault(
-    position: int,
-    vault: CachedElement,
-    vault_scheme: XPath,
-    vault_map_name: str,
-) -> None:
-    try:
-        vault_map = getattr(vault, vault_map_name)
-    except Exception as e:
-        raise ValueError from e
-    odf_idx = find_odf_idx(vault_map, position)
-    if odf_idx is None:
-        raise ValueError
-    current_cache = vault_map[odf_idx]
-    cache = vault._indexes[vault_map_name]
-    if odf_idx in cache:
-        current_item = cache[odf_idx]
-    else:
-        current_item = vault._get_element_idx2(vault_scheme, odf_idx)
-    vault._indexes[vault_map_name] = {}
-    if odf_idx > 0:
-        before_cache = vault_map[odf_idx - 1]
-    else:
-        before_cache = -1
-    # current_pos = before_cache + 1
-    current_repeated = current_cache - before_cache
-    new_repeated = current_repeated - 1
-    if new_repeated >= 1:
-        current_item._set_repeated(new_repeated)
-        setattr(
-            vault,
-            vault_map_name,
-            vault_map[:odf_idx] + [(x - 1) for x in vault_map[odf_idx:]],
-        )
-    else:
-        # actual erase
-        vault.delete(current_item)
-        setattr(
-            vault,
-            vault_map_name,
-            vault_map[:odf_idx] + [(x - 1) for x in vault_map[odf_idx + 1 :]],
-        )
-
-
-
-def find_odf_idx(cache_map: list, position: int) ‑> int | None -
-
-

Find odf_idx in the map from the position (col or row).

-
- -Expand source code - -
def find_odf_idx(cache_map: list, position: int) -> int | None:
-    """Find odf_idx in the map from the position (col or row)."""
-    odf_idx = bisect_left(cache_map, position)
-    if odf_idx < len(cache_map):
-        return odf_idx
-    return None
-
-
-
-def insert_item_in_vault(position: int, item: CachedElement, vault: CachedElement, vault_scheme: XPath, vault_map_name: str) ‑> CachedElement -
-
-
-
- -Expand source code - -
def insert_item_in_vault(
-    position: int,
-    item: CachedElement,
-    vault: CachedElement,
-    vault_scheme: XPath,
-    vault_map_name: str,
-) -> CachedElement:
-    try:
-        vault_map = getattr(vault, vault_map_name)
-    except Exception as e:
-        raise ValueError from e
-    odf_idx = find_odf_idx(vault_map, position)
-    if odf_idx is None:
-        raise ValueError
-    repeated = item.repeated or 1  # type: ignore
-    current_cache = vault_map[odf_idx]
-    cache = vault._indexes[vault_map_name]
-    if odf_idx in cache:
-        current_item = cache[odf_idx]
-    else:
-        current_item = vault._get_element_idx2(vault_scheme, odf_idx)
-    vault._indexes[vault_map_name] = {}
-    target_idx = vault.index(current_item)
-    if odf_idx > 0:
-        before_cache = vault_map[odf_idx - 1]
-    else:
-        before_cache = -1
-    current_pos = before_cache + 1
-    current_repeated = current_cache - before_cache
-    repeated_before = position - current_pos
-    repeated_after = current_repeated - repeated_before
-    new_item = item.clone
-    if repeated_before >= 1:
-        current_item._set_repeated(repeated_before)
-        vault.insert(new_item, position=target_idx + 1)
-        after_item = current_item.clone
-        after_item._set_repeated(repeated_after)
-        vault.insert(after_item, position=target_idx + 2)
-    else:
-        # only insert new cell
-        vault.insert(new_item, position=target_idx)
-    # update cache
-    if repeated_before >= 1:
-        emap = _erase_map_once(vault_map, odf_idx)
-        emap = insert_map_once(emap, odf_idx, repeated_before)
-        emap = insert_map_once(emap, odf_idx + 1, repeated)
-        setattr(
-            vault, vault_map_name, insert_map_once(emap, odf_idx + 2, repeated_after)
-        )
-    else:
-        setattr(vault, vault_map_name, insert_map_once(vault_map, odf_idx, repeated))
-    return new_item
-
-
-
-def insert_map_once(orig_map: list, odf_idx: int, repeated: int) ‑> list[int] -
-
-

Add an item (cell or row) to the map

-
map  --  cache map
-
-odf_idx  --  index in ODF XML
-
-repeated  --  repeated value of item, 1 or more
-
-

odf_idx is NOT position (col or row), neither raw XML position, but ODF index

-
- -Expand source code - -
def insert_map_once(orig_map: list, odf_idx: int, repeated: int) -> list[int]:
-    """Add an item (cell or row) to the map
-
-        map  --  cache map
-
-        odf_idx  --  index in ODF XML
-
-        repeated  --  repeated value of item, 1 or more
-
-    odf_idx is NOT position (col or row), neither raw XML position, but ODF index
-    """
-    repeated = repeated or 1
-    if odf_idx > len(orig_map):
-        raise IndexError
-    if odf_idx > 0:
-        before = orig_map[odf_idx - 1]
-    else:
-        before = -1
-    juska = before + repeated  # aka max position value for item
-    if odf_idx == len(orig_map):
-        insort(orig_map, juska)
-        return orig_map
-    new_map = orig_map[:odf_idx]
-    new_map.append(juska)
-    new_map.extend([(x + repeated) for x in orig_map[odf_idx:]])
-    return new_map
-
-
-
-def make_cache_map(idx_repeated_seq: list[tuple[int, int]]) ‑> list[int] -
-
-

Build the initial cache map of the table.

-
- -Expand source code - -
def make_cache_map(idx_repeated_seq: list[tuple[int, int]]) -> list[int]:
-    """Build the initial cache map of the table."""
-    cache_amp: list[int] = []
-    for odf_idx, repeated in idx_repeated_seq:
-        cache_amp = insert_map_once(cache_amp, odf_idx, repeated)
-    return cache_amp
-
-
-
-def set_item_in_vault(position: int, item: CachedElement, vault: CachedElement, vault_scheme: XPath, vault_map_name: str, clone: bool = True) ‑> CachedElement -
-
-

Set the item (cell, row) in its vault (row, table), updating the -cache map.

-
- -Expand source code - -
def set_item_in_vault(  # noqa: C901
-    position: int,
-    item: CachedElement,
-    vault: CachedElement,
-    vault_scheme: XPath,
-    vault_map_name: str,
-    clone: bool = True,
-) -> CachedElement:
-    """Set the item (cell, row) in its vault (row, table), updating the
-    cache map.
-    """
-    try:
-        vault_map = getattr(vault, vault_map_name)
-    except Exception as e:
-        raise ValueError from e
-    odf_idx = find_odf_idx(vault_map, position)
-    if odf_idx is None:
-        raise ValueError
-    repeated = item.repeated or 1  # type: ignore
-    current_cache = vault_map[odf_idx]
-    cache = vault._indexes[vault_map_name]
-    if odf_idx in cache:
-        current_item = cache[odf_idx]
-    else:
-        current_item = vault._get_element_idx2(vault_scheme, odf_idx)
-    vault._indexes[vault_map_name] = {}
-    target_idx = vault.index(current_item)
-    if odf_idx > 0:
-        before_cache = vault_map[odf_idx - 1]
-    else:
-        before_cache = -1
-    current_pos = before_cache + 1
-    current_repeated = current_cache - before_cache
-    repeated_before = position - current_pos
-    repeated_after = current_repeated - repeated_before - repeated
-    if repeated_before >= 1:
-        # Update repetition
-        current_item._set_repeated(repeated_before)
-        target_idx += 1
-    else:
-        # Replacing the first occurence
-        vault.delete(current_item)
-    # Insert new element
-    if clone:
-        new_item = item.clone
-    else:
-        new_item = item
-    vault.insert(new_item, position=target_idx)
-    # Insert the remaining repetitions
-    if repeated_after >= 1:
-        after_item = current_item.clone
-        after_item._set_repeated(repeated_after)
-        vault.insert(after_item, position=target_idx + 1)
-    # setting a repeated item !
-    if repeated_after < 0:
-        # deleting some overlapped items
-        deleting = repeated_after
-        while deleting < 0:
-            delete_item = vault._get_element_idx2(vault_scheme, target_idx + 1)
-            if delete_item is None:
-                break
-            is_repeated = delete_item.repeated or 1  # type: ignore
-            is_repeated += deleting
-            if is_repeated > 1:
-                delete_item._set_repeated(is_repeated)  # type: ignore
-            else:
-                vault.delete(delete_item)
-            deleting = is_repeated
-    # update cache
-    # remove existing
-    idx = odf_idx
-    emap = _erase_map_once(vault_map, idx)
-    # add before if any:
-    if repeated_before >= 1:
-        emap = insert_map_once(emap, idx, repeated_before)
-        idx += 1
-    # add our slot
-    emap = insert_map_once(emap, idx, repeated)
-    # add after if any::
-    if repeated_after >= 1:
-        idx += 1
-        emap = insert_map_once(emap, idx, repeated_after)
-    if repeated_after < 0:
-        idx += 1
-        while repeated_after < 0:
-            if idx < len(emap):
-                emap = _erase_map_once(emap, idx)
-            repeated_after += 1
-    setattr(vault, vault_map_name, emap)
-    return new_item
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/utils/cached_element.html b/doc/utils/cached_element.html deleted file mode 100644 index 31aca2c..0000000 --- a/doc/utils/cached_element.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - -odfdo.utils.cached_element API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.utils.cached_element

-
-
-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2012 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-from __future__ import annotations
-
-from abc import ABC
-
-
-class CachedElement(ABC):
-    _caching: bool = False
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class CachedElement -
-
-

Helper class that provides a standard way to create an ABC using -inheritance.

-
- -Expand source code - -
class CachedElement(ABC):
-    _caching: bool = False
-
-

Ancestors

-
    -
  • abc.ABC
  • -
-

Subclasses

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/utils/coordinates.html b/doc/utils/coordinates.html deleted file mode 100644 index 7fce9c3..0000000 --- a/doc/utils/coordinates.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - - -odfdo.utils.coordinates API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.utils.coordinates

-
-
-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2012 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-from __future__ import annotations
-
-from .isiterable import isiterable
-
-
-def translate_from_any(x: str | int, length: int, idx: int) -> int:
-    if isinstance(x, str):
-        value_int = convert_coordinates(x)[idx]
-        if value_int is None:
-            raise TypeError(f"Wrong value: {x!r}")
-    elif isinstance(x, int):
-        value_int = x
-    else:
-        raise TypeError(f"Wrong value: {x!r}")
-    if value_int < 0:
-        return increment(value_int, length)
-    return value_int
-
-
-def alpha_to_digit(alpha: str) -> int:
-    """Translates A to 0, B to 1, etc. So "AB" is value 27."""
-    if isinstance(alpha, int):
-        return alpha
-    if not alpha.isalpha():
-        raise ValueError(f'column name "{alpha}" is malformed')
-    column = 0
-    for c in alpha.lower():
-        v = ord(c) - ord("a") + 1
-        column = column * 26 + v
-    return column - 1
-
-
-def digit_to_alpha(digit: int | str) -> str:
-    if isinstance(digit, str) and digit.isalpha():
-        return digit
-    if not isinstance(digit, int):
-        raise TypeError(f'column number "{digit}" is invalid')
-    digit += 1
-    column = ""
-    while digit:
-        column = chr(65 + ((digit - 1) % 26)) + column
-        digit = (digit - 1) // 26
-    return column
-
-
-# def _coordinates_to_alpha_area(coord: str | tuple | list) -> tuple[str, str, str]:
-#     # assuming : either (x,y) or (x,y,z,t), with positive values
-#     if isinstance(coord, str):
-#         # either A1 or A1:B2, returns A1:A1 if needed
-#         parts = coord.strip().split(":")
-#         if len(parts) == 1:
-#             start = end = parts[0]
-#         else:
-#             start = parts[0]
-#             end = parts[1]
-#     elif isiterable(coord):
-#         if len(coord) == 2:
-#             x, y = coord
-#             z, t = coord
-#         else:
-#             # should be 4 int
-#             x, y, z, t = coord
-#         start = digit_to_alpha(x) + str(y + 1)
-#         end = digit_to_alpha(z) + str(t + 1)
-#     else:
-#         raise ValueError
-#     crange = start + ":" + end
-#     return (start, end, crange)
-
-
-def increment(value: int, step: int) -> int:
-    while value < 0:
-        if step == 0:
-            return 0
-        value += step
-    return value
-
-
-def convert_coordinates(
-    obj: tuple | list | str,
-) -> tuple[int | None, ...]:
-    """Translates "D3" to (3, 2) or return (1, 2) untouched.
-    Translates "A1:B3" to (0,0,1,2)
-    """
-    # By (1, 2) ?
-    if isiterable(obj):
-        return tuple(obj)  # type:ignore
-    # Or by 'B3' notation ?
-    if not isinstance(obj, str):
-        raise TypeError(f'Bad coordinates type: "{type(obj)}"')
-    coordinates = []
-    for coord in [x.strip() for x in obj.split(":", 1)]:
-        # First "A"
-        alpha = ""
-        for c in coord:
-            if c.isalpha():
-                alpha += c
-            else:
-                break
-        try:
-            column = alpha_to_digit(alpha)
-        except ValueError:
-            # raise ValueError, 'coordinates "%s" malformed' % obj
-            # maybe '1:4' table row coordinates
-            column = None
-        coordinates.append(column)
-        # Then "1"
-        try:
-            line = int(coord[len(alpha) :]) - 1
-        except ValueError:
-            # raise ValueError, 'coordinates "%s" malformed' % obj
-            # maybe 'A:C' row coordinates
-            line = None
-        if line and line <= 0:
-            raise ValueError(f'Coordinates "{obj}" malformed')
-        coordinates.append(line)
-    return tuple(coordinates)
-
-
-
-
-
-
-
-

Functions

-
-
-def alpha_to_digit(alpha: str) ‑> int -
-
-

Translates A to 0, B to 1, etc. So "AB" is value 27.

-
- -Expand source code - -
def alpha_to_digit(alpha: str) -> int:
-    """Translates A to 0, B to 1, etc. So "AB" is value 27."""
-    if isinstance(alpha, int):
-        return alpha
-    if not alpha.isalpha():
-        raise ValueError(f'column name "{alpha}" is malformed')
-    column = 0
-    for c in alpha.lower():
-        v = ord(c) - ord("a") + 1
-        column = column * 26 + v
-    return column - 1
-
-
-
-def convert_coordinates(obj: tuple | list | str) ‑> tuple[int | None, ...] -
-
-

Translates "D3" to (3, 2) or return (1, 2) untouched. -Translates "A1:B3" to (0,0,1,2)

-
- -Expand source code - -
def convert_coordinates(
-    obj: tuple | list | str,
-) -> tuple[int | None, ...]:
-    """Translates "D3" to (3, 2) or return (1, 2) untouched.
-    Translates "A1:B3" to (0,0,1,2)
-    """
-    # By (1, 2) ?
-    if isiterable(obj):
-        return tuple(obj)  # type:ignore
-    # Or by 'B3' notation ?
-    if not isinstance(obj, str):
-        raise TypeError(f'Bad coordinates type: "{type(obj)}"')
-    coordinates = []
-    for coord in [x.strip() for x in obj.split(":", 1)]:
-        # First "A"
-        alpha = ""
-        for c in coord:
-            if c.isalpha():
-                alpha += c
-            else:
-                break
-        try:
-            column = alpha_to_digit(alpha)
-        except ValueError:
-            # raise ValueError, 'coordinates "%s" malformed' % obj
-            # maybe '1:4' table row coordinates
-            column = None
-        coordinates.append(column)
-        # Then "1"
-        try:
-            line = int(coord[len(alpha) :]) - 1
-        except ValueError:
-            # raise ValueError, 'coordinates "%s" malformed' % obj
-            # maybe 'A:C' row coordinates
-            line = None
-        if line and line <= 0:
-            raise ValueError(f'Coordinates "{obj}" malformed')
-        coordinates.append(line)
-    return tuple(coordinates)
-
-
-
-def digit_to_alpha(digit: int | str) ‑> str -
-
-
-
- -Expand source code - -
def digit_to_alpha(digit: int | str) -> str:
-    if isinstance(digit, str) and digit.isalpha():
-        return digit
-    if not isinstance(digit, int):
-        raise TypeError(f'column number "{digit}" is invalid')
-    digit += 1
-    column = ""
-    while digit:
-        column = chr(65 + ((digit - 1) % 26)) + column
-        digit = (digit - 1) // 26
-    return column
-
-
-
-def increment(value: int, step: int) ‑> int -
-
-
-
- -Expand source code - -
def increment(value: int, step: int) -> int:
-    while value < 0:
-        if step == 0:
-            return 0
-        value += step
-    return value
-
-
-
-def translate_from_any(x: str | int, length: int, idx: int) ‑> int -
-
-
-
- -Expand source code - -
def translate_from_any(x: str | int, length: int, idx: int) -> int:
-    if isinstance(x, str):
-        value_int = convert_coordinates(x)[idx]
-        if value_int is None:
-            raise TypeError(f"Wrong value: {x!r}")
-    elif isinstance(x, int):
-        value_int = x
-    else:
-        raise TypeError(f"Wrong value: {x!r}")
-    if value_int < 0:
-        return increment(value_int, length)
-    return value_int
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/utils/formula.html b/doc/utils/formula.html deleted file mode 100644 index f8ae931..0000000 --- a/doc/utils/formula.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - -odfdo.utils.formula API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.utils.formula

-
-
-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-from __future__ import annotations
-
-
-def oooc_to_ooow(formula: str) -> str:
-    """Convert (proprietary) formula from calc format to writer format.
-
-    Arguments:
-
-        formula -- str
-
-    Return: str
-    """
-    prefix, formula = formula.split(":=", 1)
-    # assert "oooc" in prefix
-    # Convert cell addresses
-    formula = formula.replace("[.", "<").replace(":.", ":").replace("]", ">")
-    # Convert functions
-    formula = formula.replace("SUM(", "sum ").replace(")", "")
-    return f"ooow:{formula}"
-
-
-
-
-
-
-
-

Functions

-
-
-def oooc_to_ooow(formula: str) ‑> str -
-
-

Convert (proprietary) formula from calc format to writer format.

-

Arguments

-

formula – str

-

Return: str

-
- -Expand source code - -
def oooc_to_ooow(formula: str) -> str:
-    """Convert (proprietary) formula from calc format to writer format.
-
-    Arguments:
-
-        formula -- str
-
-    Return: str
-    """
-    prefix, formula = formula.split(":=", 1)
-    # assert "oooc" in prefix
-    # Convert cell addresses
-    formula = formula.replace("[.", "<").replace(":.", ":").replace("]", ">")
-    # Convert functions
-    formula = formula.replace("SUM(", "sum ").replace(")", "")
-    return f"ooow:{formula}"
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/utils/index.html b/doc/utils/index.html deleted file mode 100644 index 82d6c06..0000000 --- a/doc/utils/index.html +++ /dev/null @@ -1,852 +0,0 @@ - - - - - - -odfdo.utils API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.utils

-
-
-
- -Expand source code - -
from .cache_map import (
-    delete_item_in_vault,
-    find_odf_idx,
-    insert_item_in_vault,
-    insert_map_once,
-    make_cache_map,
-    set_item_in_vault,
-)
-from .cached_element import CachedElement
-from .coordinates import (
-    alpha_to_digit,
-    convert_coordinates,
-    digit_to_alpha,
-    increment,
-    translate_from_any,
-)
-from .formula import oooc_to_ooow
-from .isiterable import isiterable
-from .str_convert import bytes_to_str, str_to_bytes, to_bytes, to_str
-from .style_constants import (
-    FALSE_FAMILY_MAP_REVERSE,
-    FAMILY_MAPPING,
-    FAMILY_ODF_STD,
-    STYLES_TO_REGISTER,
-    SUBCLASSED_STYLES,
-)
-from .xpath_query import make_xpath_query
-
-__all__ = [
-    "CachedElement",
-    "FALSE_FAMILY_MAP_REVERSE",
-    "FAMILY_MAPPING",
-    "FAMILY_ODF_STD",
-    "STYLES_TO_REGISTER",
-    "SUBCLASSED_STYLES",
-    "alpha_to_digit",
-    "bytes_to_str",
-    "convert_coordinates",
-    "delete_item_in_vault",
-    "digit_to_alpha",
-    "find_odf_idx",
-    "increment",
-    "insert_item_in_vault",
-    "insert_map_once",
-    "isiterable",
-    "make_cache_map",
-    "make_xpath_query",
-    "oooc_to_ooow",
-    "set_item_in_vault",
-    "str_to_bytes",
-    "to_bytes",
-    "to_str",
-    "translate_from_any",
-]
-
-
-
-

Sub-modules

-
-
odfdo.utils.cache_map
-
-

Table class for "table:table" and HeaderRows, Cell, Row, Column, -NamedRange related classes.

-
-
odfdo.utils.cached_element
-
-
-
-
odfdo.utils.coordinates
-
-
-
-
odfdo.utils.formula
-
-
-
-
odfdo.utils.str_convert
-
-
-
-
odfdo.utils.style_constants
-
-
-
-
odfdo.utils.xpath_query
-
-
-
-
-
-
-
-
-

Functions

-
-
-def alpha_to_digit(alpha: str) ‑> int -
-
-

Translates A to 0, B to 1, etc. So "AB" is value 27.

-
- -Expand source code - -
def alpha_to_digit(alpha: str) -> int:
-    """Translates A to 0, B to 1, etc. So "AB" is value 27."""
-    if isinstance(alpha, int):
-        return alpha
-    if not alpha.isalpha():
-        raise ValueError(f'column name "{alpha}" is malformed')
-    column = 0
-    for c in alpha.lower():
-        v = ord(c) - ord("a") + 1
-        column = column * 26 + v
-    return column - 1
-
-
-
-def bytes_to_str(text: bytes) ‑> str -
-
-
-
- -Expand source code - -
def bytes_to_str(text: bytes) -> str:
-    return text.decode("utf-8", "ignore")
-
-
-
-def convert_coordinates(obj: tuple | list | str) ‑> tuple[int | None, ...] -
-
-

Translates "D3" to (3, 2) or return (1, 2) untouched. -Translates "A1:B3" to (0,0,1,2)

-
- -Expand source code - -
def convert_coordinates(
-    obj: tuple | list | str,
-) -> tuple[int | None, ...]:
-    """Translates "D3" to (3, 2) or return (1, 2) untouched.
-    Translates "A1:B3" to (0,0,1,2)
-    """
-    # By (1, 2) ?
-    if isiterable(obj):
-        return tuple(obj)  # type:ignore
-    # Or by 'B3' notation ?
-    if not isinstance(obj, str):
-        raise TypeError(f'Bad coordinates type: "{type(obj)}"')
-    coordinates = []
-    for coord in [x.strip() for x in obj.split(":", 1)]:
-        # First "A"
-        alpha = ""
-        for c in coord:
-            if c.isalpha():
-                alpha += c
-            else:
-                break
-        try:
-            column = alpha_to_digit(alpha)
-        except ValueError:
-            # raise ValueError, 'coordinates "%s" malformed' % obj
-            # maybe '1:4' table row coordinates
-            column = None
-        coordinates.append(column)
-        # Then "1"
-        try:
-            line = int(coord[len(alpha) :]) - 1
-        except ValueError:
-            # raise ValueError, 'coordinates "%s" malformed' % obj
-            # maybe 'A:C' row coordinates
-            line = None
-        if line and line <= 0:
-            raise ValueError(f'Coordinates "{obj}" malformed')
-        coordinates.append(line)
-    return tuple(coordinates)
-
-
-
-def delete_item_in_vault(position: int, vault: CachedElement, vault_scheme: XPath, vault_map_name: str) ‑> None -
-
-
-
- -Expand source code - -
def delete_item_in_vault(
-    position: int,
-    vault: CachedElement,
-    vault_scheme: XPath,
-    vault_map_name: str,
-) -> None:
-    try:
-        vault_map = getattr(vault, vault_map_name)
-    except Exception as e:
-        raise ValueError from e
-    odf_idx = find_odf_idx(vault_map, position)
-    if odf_idx is None:
-        raise ValueError
-    current_cache = vault_map[odf_idx]
-    cache = vault._indexes[vault_map_name]
-    if odf_idx in cache:
-        current_item = cache[odf_idx]
-    else:
-        current_item = vault._get_element_idx2(vault_scheme, odf_idx)
-    vault._indexes[vault_map_name] = {}
-    if odf_idx > 0:
-        before_cache = vault_map[odf_idx - 1]
-    else:
-        before_cache = -1
-    # current_pos = before_cache + 1
-    current_repeated = current_cache - before_cache
-    new_repeated = current_repeated - 1
-    if new_repeated >= 1:
-        current_item._set_repeated(new_repeated)
-        setattr(
-            vault,
-            vault_map_name,
-            vault_map[:odf_idx] + [(x - 1) for x in vault_map[odf_idx:]],
-        )
-    else:
-        # actual erase
-        vault.delete(current_item)
-        setattr(
-            vault,
-            vault_map_name,
-            vault_map[:odf_idx] + [(x - 1) for x in vault_map[odf_idx + 1 :]],
-        )
-
-
-
-def digit_to_alpha(digit: int | str) ‑> str -
-
-
-
- -Expand source code - -
def digit_to_alpha(digit: int | str) -> str:
-    if isinstance(digit, str) and digit.isalpha():
-        return digit
-    if not isinstance(digit, int):
-        raise TypeError(f'column number "{digit}" is invalid')
-    digit += 1
-    column = ""
-    while digit:
-        column = chr(65 + ((digit - 1) % 26)) + column
-        digit = (digit - 1) // 26
-    return column
-
-
-
-def find_odf_idx(cache_map: list, position: int) ‑> int | None -
-
-

Find odf_idx in the map from the position (col or row).

-
- -Expand source code - -
def find_odf_idx(cache_map: list, position: int) -> int | None:
-    """Find odf_idx in the map from the position (col or row)."""
-    odf_idx = bisect_left(cache_map, position)
-    if odf_idx < len(cache_map):
-        return odf_idx
-    return None
-
-
-
-def increment(value: int, step: int) ‑> int -
-
-
-
- -Expand source code - -
def increment(value: int, step: int) -> int:
-    while value < 0:
-        if step == 0:
-            return 0
-        value += step
-    return value
-
-
-
-def insert_item_in_vault(position: int, item: CachedElement, vault: CachedElement, vault_scheme: XPath, vault_map_name: str) ‑> CachedElement -
-
-
-
- -Expand source code - -
def insert_item_in_vault(
-    position: int,
-    item: CachedElement,
-    vault: CachedElement,
-    vault_scheme: XPath,
-    vault_map_name: str,
-) -> CachedElement:
-    try:
-        vault_map = getattr(vault, vault_map_name)
-    except Exception as e:
-        raise ValueError from e
-    odf_idx = find_odf_idx(vault_map, position)
-    if odf_idx is None:
-        raise ValueError
-    repeated = item.repeated or 1  # type: ignore
-    current_cache = vault_map[odf_idx]
-    cache = vault._indexes[vault_map_name]
-    if odf_idx in cache:
-        current_item = cache[odf_idx]
-    else:
-        current_item = vault._get_element_idx2(vault_scheme, odf_idx)
-    vault._indexes[vault_map_name] = {}
-    target_idx = vault.index(current_item)
-    if odf_idx > 0:
-        before_cache = vault_map[odf_idx - 1]
-    else:
-        before_cache = -1
-    current_pos = before_cache + 1
-    current_repeated = current_cache - before_cache
-    repeated_before = position - current_pos
-    repeated_after = current_repeated - repeated_before
-    new_item = item.clone
-    if repeated_before >= 1:
-        current_item._set_repeated(repeated_before)
-        vault.insert(new_item, position=target_idx + 1)
-        after_item = current_item.clone
-        after_item._set_repeated(repeated_after)
-        vault.insert(after_item, position=target_idx + 2)
-    else:
-        # only insert new cell
-        vault.insert(new_item, position=target_idx)
-    # update cache
-    if repeated_before >= 1:
-        emap = _erase_map_once(vault_map, odf_idx)
-        emap = insert_map_once(emap, odf_idx, repeated_before)
-        emap = insert_map_once(emap, odf_idx + 1, repeated)
-        setattr(
-            vault, vault_map_name, insert_map_once(emap, odf_idx + 2, repeated_after)
-        )
-    else:
-        setattr(vault, vault_map_name, insert_map_once(vault_map, odf_idx, repeated))
-    return new_item
-
-
-
-def insert_map_once(orig_map: list, odf_idx: int, repeated: int) ‑> list[int] -
-
-

Add an item (cell or row) to the map

-
map  --  cache map
-
-odf_idx  --  index in ODF XML
-
-repeated  --  repeated value of item, 1 or more
-
-

odf_idx is NOT position (col or row), neither raw XML position, but ODF index

-
- -Expand source code - -
def insert_map_once(orig_map: list, odf_idx: int, repeated: int) -> list[int]:
-    """Add an item (cell or row) to the map
-
-        map  --  cache map
-
-        odf_idx  --  index in ODF XML
-
-        repeated  --  repeated value of item, 1 or more
-
-    odf_idx is NOT position (col or row), neither raw XML position, but ODF index
-    """
-    repeated = repeated or 1
-    if odf_idx > len(orig_map):
-        raise IndexError
-    if odf_idx > 0:
-        before = orig_map[odf_idx - 1]
-    else:
-        before = -1
-    juska = before + repeated  # aka max position value for item
-    if odf_idx == len(orig_map):
-        insort(orig_map, juska)
-        return orig_map
-    new_map = orig_map[:odf_idx]
-    new_map.append(juska)
-    new_map.extend([(x + repeated) for x in orig_map[odf_idx:]])
-    return new_map
-
-
-
-def isiterable(instance: Any) ‑> bool -
-
-

Return True if instance is iterable, but considering str and bytes as not iterable.

-
- -Expand source code - -
def isiterable(instance: Any) -> bool:
-    """Return True if instance is iterable, but considering str and bytes as not iterable."""
-    if isinstance(instance, (str, bytes)):
-        return False
-    try:
-        iter(instance)
-    except TypeError:
-        return False
-    return True
-
-
-
-def make_cache_map(idx_repeated_seq: list[tuple[int, int]]) ‑> list[int] -
-
-

Build the initial cache map of the table.

-
- -Expand source code - -
def make_cache_map(idx_repeated_seq: list[tuple[int, int]]) -> list[int]:
-    """Build the initial cache map of the table."""
-    cache_amp: list[int] = []
-    for odf_idx, repeated in idx_repeated_seq:
-        cache_amp = insert_map_once(cache_amp, odf_idx, repeated)
-    return cache_amp
-
-
-
-def make_xpath_query(query_string: str, family: str | None = None, text_style: str | None = None, draw_id: str | None = None, draw_name: str | None = None, draw_style: str | None = None, draw_text_style: str | None = None, table_name: str | None = None, table_style: str | None = None, style_name: str | None = None, display_name: str | None = None, note_class: str | None = None, text_id: str | None = None, text_name: str | None = None, change_id: str | None = None, office_name: str | None = None, office_title: str | None = None, outline_level: str | int | None = None, level: str | int | None = None, page_layout: str | None = None, master_page: str | None = None, parent_style: str | None = None, presentation_class: str | None = None, position: int | None = None, **kwargs: str) ‑> str -
-
-
-
- -Expand source code - -
def make_xpath_query(  # noqa: C901
-    query_string: str,
-    family: str | None = None,
-    text_style: str | None = None,
-    draw_id: str | None = None,
-    draw_name: str | None = None,
-    draw_style: str | None = None,
-    draw_text_style: str | None = None,
-    table_name: str | None = None,
-    table_style: str | None = None,
-    style_name: str | None = None,
-    display_name: str | None = None,
-    note_class: str | None = None,
-    text_id: str | None = None,
-    text_name: str | None = None,
-    change_id: str | None = None,
-    office_name: str | None = None,
-    office_title: str | None = None,
-    outline_level: str | int | None = None,
-    level: str | int | None = None,
-    page_layout: str | None = None,
-    master_page: str | None = None,
-    parent_style: str | None = None,
-    presentation_class: str | None = None,
-    position: int | None = None,
-    **kwargs: str,
-) -> str:
-    query = [query_string]
-    attributes = kwargs
-    if text_style:
-        attributes["text:style-name"] = text_style
-    if family and family in FAMILY_ODF_STD:
-        attributes["style:family"] = family
-    if draw_id:
-        attributes["draw:id"] = draw_id
-    if draw_name:
-        attributes["draw:name"] = draw_name
-    if draw_style:
-        attributes["draw:style-name"] = draw_style
-    if draw_text_style:
-        attributes["draw:text-style-name"] = draw_text_style
-    if table_name:
-        attributes["table:name"] = table_name
-    if table_style:
-        attributes["table:style-name"] = table_style
-    if style_name:
-        attributes["style:name"] = style_name
-    if display_name:
-        attributes["style:display-name"] = display_name
-    if note_class:
-        attributes["text:note-class"] = note_class
-    if text_id:
-        attributes["text:id"] = text_id
-    if text_name:
-        attributes["text:name"] = text_name
-    if change_id:
-        attributes["text:change-id"] = change_id
-    if office_name:
-        attributes["office:name"] = office_name
-    if office_title:
-        attributes["office:title"] = office_title
-    if outline_level:
-        attributes["text:outline-level"] = str(outline_level)
-    if level:
-        attributes["text:level"] = str(level)
-    if page_layout:
-        attributes["style:page-layout-name"] = page_layout
-    if master_page:
-        attributes["draw:master-page-name"] = master_page
-    if parent_style:
-        attributes["style:parent-style-name"] = parent_style
-    if presentation_class:
-        attributes["presentation:class"] = presentation_class
-    # Sort attributes for reproducible test cases
-    for qname in sorted(attributes):
-        value = attributes[qname]
-        if value is True:
-            query.append(f"[@{qname}]")
-        else:
-            query.append(f'[@{qname}="{value}"]')
-    query_str = "".join(query)
-    if position is not None:
-        # A position argument that mimics the behaviour of a python's list
-        if position >= 0:
-            position_str = str(position + 1)
-        elif position == -1:
-            position_str = "last()"
-        else:
-            position_str = f"last()-{abs(position) - 1}"
-        query_str = f"({query_str})[{position_str}]"
-    # print(query)
-    return query_str
-
-
-
-def oooc_to_ooow(formula: str) ‑> str -
-
-

Convert (proprietary) formula from calc format to writer format.

-

Arguments

-

formula – str

-

Return: str

-
- -Expand source code - -
def oooc_to_ooow(formula: str) -> str:
-    """Convert (proprietary) formula from calc format to writer format.
-
-    Arguments:
-
-        formula -- str
-
-    Return: str
-    """
-    prefix, formula = formula.split(":=", 1)
-    # assert "oooc" in prefix
-    # Convert cell addresses
-    formula = formula.replace("[.", "<").replace(":.", ":").replace("]", ">")
-    # Convert functions
-    formula = formula.replace("SUM(", "sum ").replace(")", "")
-    return f"ooow:{formula}"
-
-
-
-def set_item_in_vault(position: int, item: CachedElement, vault: CachedElement, vault_scheme: XPath, vault_map_name: str, clone: bool = True) ‑> CachedElement -
-
-

Set the item (cell, row) in its vault (row, table), updating the -cache map.

-
- -Expand source code - -
def set_item_in_vault(  # noqa: C901
-    position: int,
-    item: CachedElement,
-    vault: CachedElement,
-    vault_scheme: XPath,
-    vault_map_name: str,
-    clone: bool = True,
-) -> CachedElement:
-    """Set the item (cell, row) in its vault (row, table), updating the
-    cache map.
-    """
-    try:
-        vault_map = getattr(vault, vault_map_name)
-    except Exception as e:
-        raise ValueError from e
-    odf_idx = find_odf_idx(vault_map, position)
-    if odf_idx is None:
-        raise ValueError
-    repeated = item.repeated or 1  # type: ignore
-    current_cache = vault_map[odf_idx]
-    cache = vault._indexes[vault_map_name]
-    if odf_idx in cache:
-        current_item = cache[odf_idx]
-    else:
-        current_item = vault._get_element_idx2(vault_scheme, odf_idx)
-    vault._indexes[vault_map_name] = {}
-    target_idx = vault.index(current_item)
-    if odf_idx > 0:
-        before_cache = vault_map[odf_idx - 1]
-    else:
-        before_cache = -1
-    current_pos = before_cache + 1
-    current_repeated = current_cache - before_cache
-    repeated_before = position - current_pos
-    repeated_after = current_repeated - repeated_before - repeated
-    if repeated_before >= 1:
-        # Update repetition
-        current_item._set_repeated(repeated_before)
-        target_idx += 1
-    else:
-        # Replacing the first occurence
-        vault.delete(current_item)
-    # Insert new element
-    if clone:
-        new_item = item.clone
-    else:
-        new_item = item
-    vault.insert(new_item, position=target_idx)
-    # Insert the remaining repetitions
-    if repeated_after >= 1:
-        after_item = current_item.clone
-        after_item._set_repeated(repeated_after)
-        vault.insert(after_item, position=target_idx + 1)
-    # setting a repeated item !
-    if repeated_after < 0:
-        # deleting some overlapped items
-        deleting = repeated_after
-        while deleting < 0:
-            delete_item = vault._get_element_idx2(vault_scheme, target_idx + 1)
-            if delete_item is None:
-                break
-            is_repeated = delete_item.repeated or 1  # type: ignore
-            is_repeated += deleting
-            if is_repeated > 1:
-                delete_item._set_repeated(is_repeated)  # type: ignore
-            else:
-                vault.delete(delete_item)
-            deleting = is_repeated
-    # update cache
-    # remove existing
-    idx = odf_idx
-    emap = _erase_map_once(vault_map, idx)
-    # add before if any:
-    if repeated_before >= 1:
-        emap = insert_map_once(emap, idx, repeated_before)
-        idx += 1
-    # add our slot
-    emap = insert_map_once(emap, idx, repeated)
-    # add after if any::
-    if repeated_after >= 1:
-        idx += 1
-        emap = insert_map_once(emap, idx, repeated_after)
-    if repeated_after < 0:
-        idx += 1
-        while repeated_after < 0:
-            if idx < len(emap):
-                emap = _erase_map_once(emap, idx)
-            repeated_after += 1
-    setattr(vault, vault_map_name, emap)
-    return new_item
-
-
-
-def str_to_bytes(text: str) ‑> bytes -
-
-
-
- -Expand source code - -
def str_to_bytes(text: str) -> bytes:
-    return text.encode("utf-8", "replace")
-
-
-
-def to_bytes(value: Any) ‑> Any -
-
-
-
- -Expand source code - -
def to_bytes(value: Any) -> Any:
-    if isinstance(value, str):
-        return value.encode("utf-8")
-    return value
-
-
-
-def to_str(value: Any) ‑> Any -
-
-
-
- -Expand source code - -
def to_str(value: Any) -> Any:
-    if isinstance(value, bytes):
-        return value.decode("utf-8")
-    return value
-
-
-
-def translate_from_any(x: str | int, length: int, idx: int) ‑> int -
-
-
-
- -Expand source code - -
def translate_from_any(x: str | int, length: int, idx: int) -> int:
-    if isinstance(x, str):
-        value_int = convert_coordinates(x)[idx]
-        if value_int is None:
-            raise TypeError(f"Wrong value: {x!r}")
-    elif isinstance(x, int):
-        value_int = x
-    else:
-        raise TypeError(f"Wrong value: {x!r}")
-    if value_int < 0:
-        return increment(value_int, length)
-    return value_int
-
-
-
-
-
-

Classes

-
-
-class CachedElement -
-
-

Helper class that provides a standard way to create an ABC using -inheritance.

-
- -Expand source code - -
class CachedElement(ABC):
-    _caching: bool = False
-
-

Ancestors

-
    -
  • abc.ABC
  • -
-

Subclasses

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/utils/str_convert.html b/doc/utils/str_convert.html deleted file mode 100644 index 9197ecc..0000000 --- a/doc/utils/str_convert.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -odfdo.utils.str_convert API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.utils.str_convert

-
-
-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-from __future__ import annotations
-
-from typing import Any
-
-
-def to_bytes(value: Any) -> Any:
-    if isinstance(value, str):
-        return value.encode("utf-8")
-    return value
-
-
-def to_str(value: Any) -> Any:
-    if isinstance(value, bytes):
-        return value.decode("utf-8")
-    return value
-
-
-def str_to_bytes(text: str) -> bytes:
-    return text.encode("utf-8", "replace")
-
-
-def bytes_to_str(text: bytes) -> str:
-    return text.decode("utf-8", "ignore")
-
-
-
-
-
-
-
-

Functions

-
-
-def bytes_to_str(text: bytes) ‑> str -
-
-
-
- -Expand source code - -
def bytes_to_str(text: bytes) -> str:
-    return text.decode("utf-8", "ignore")
-
-
-
-def str_to_bytes(text: str) ‑> bytes -
-
-
-
- -Expand source code - -
def str_to_bytes(text: str) -> bytes:
-    return text.encode("utf-8", "replace")
-
-
-
-def to_bytes(value: Any) ‑> Any -
-
-
-
- -Expand source code - -
def to_bytes(value: Any) -> Any:
-    if isinstance(value, str):
-        return value.encode("utf-8")
-    return value
-
-
-
-def to_str(value: Any) ‑> Any -
-
-
-
- -Expand source code - -
def to_str(value: Any) -> Any:
-    if isinstance(value, bytes):
-        return value.decode("utf-8")
-    return value
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/utils/style_constants.html b/doc/utils/style_constants.html deleted file mode 100644 index 9838fce..0000000 --- a/doc/utils/style_constants.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - -odfdo.utils.style_constants API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.utils.style_constants

-
-
-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-from __future__ import annotations
-
-# style:family as defined by ODF 1.2, e.g. xxx possibily for:
-# 'style:style style:family="xxx"'
-FAMILY_ODF_STD = {
-    "chart",
-    "drawing-page",
-    "graphic",
-    "paragraph",
-    "presentation",
-    "ruby",
-    "section",
-    "table",
-    "table-cell",
-    "table-column",
-    "table-row",
-    "text",
-}
-
-_BASE_FAMILY_MAP = {k: "style:style" for k in FAMILY_ODF_STD}
-
-_FALSE_FAMILY_MAP = {
-    "background-image": "style:background-image",
-    "date": "number:date-style",
-    "font-face": "style:font-face",
-    "list": "text:list-style",
-    "master-page": "style:master-page",
-    "marker": "draw:marker",
-    "number": "number:number-style",
-    "outline": "text:outline-style",
-    "page-layout": "style:page-layout",
-    "percentage": "number:percentage-style",
-    "presentation-page-layout": "style:presentation-page-layout",
-    "time": "number:time-style",
-    "boolean": "number:boolean-style",
-    "currency": "number:currency-style",
-    "tab-stop": "style:tab-stop",
-}
-
-OTHER_STYLES = {
-    "style:default-style",
-    "style:footer-style",
-    "style:header-style",
-    "text:list-level-style-bullet",
-    "text:list-level-style-image",
-    "text:list-level-style-number",
-}
-
-SUBCLASS_STYLES = {"background-image"}
-
-FAMILY_MAPPING = {**_BASE_FAMILY_MAP, **_FALSE_FAMILY_MAP}
-
-FALSE_FAMILY_MAP_REVERSE = {v: k for k, v in _FALSE_FAMILY_MAP.items()}
-SUBCLASSED_STYLES = {"style:background-image"}
-STYLES_TO_REGISTER = (set(FAMILY_MAPPING.values()) | OTHER_STYLES) - SUBCLASSED_STYLES
-
-
-
-
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/utils/xpath_query.html b/doc/utils/xpath_query.html deleted file mode 100644 index 59abbbf..0000000 --- a/doc/utils/xpath_query.html +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - -odfdo.utils.xpath_query API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.utils.xpath_query

-
-
-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-#          Romain Gauthier <romain@itaapy.com>
-from __future__ import annotations
-
-from .style_constants import FAMILY_ODF_STD
-
-
-def make_xpath_query(  # noqa: C901
-    query_string: str,
-    family: str | None = None,
-    text_style: str | None = None,
-    draw_id: str | None = None,
-    draw_name: str | None = None,
-    draw_style: str | None = None,
-    draw_text_style: str | None = None,
-    table_name: str | None = None,
-    table_style: str | None = None,
-    style_name: str | None = None,
-    display_name: str | None = None,
-    note_class: str | None = None,
-    text_id: str | None = None,
-    text_name: str | None = None,
-    change_id: str | None = None,
-    office_name: str | None = None,
-    office_title: str | None = None,
-    outline_level: str | int | None = None,
-    level: str | int | None = None,
-    page_layout: str | None = None,
-    master_page: str | None = None,
-    parent_style: str | None = None,
-    presentation_class: str | None = None,
-    position: int | None = None,
-    **kwargs: str,
-) -> str:
-    query = [query_string]
-    attributes = kwargs
-    if text_style:
-        attributes["text:style-name"] = text_style
-    if family and family in FAMILY_ODF_STD:
-        attributes["style:family"] = family
-    if draw_id:
-        attributes["draw:id"] = draw_id
-    if draw_name:
-        attributes["draw:name"] = draw_name
-    if draw_style:
-        attributes["draw:style-name"] = draw_style
-    if draw_text_style:
-        attributes["draw:text-style-name"] = draw_text_style
-    if table_name:
-        attributes["table:name"] = table_name
-    if table_style:
-        attributes["table:style-name"] = table_style
-    if style_name:
-        attributes["style:name"] = style_name
-    if display_name:
-        attributes["style:display-name"] = display_name
-    if note_class:
-        attributes["text:note-class"] = note_class
-    if text_id:
-        attributes["text:id"] = text_id
-    if text_name:
-        attributes["text:name"] = text_name
-    if change_id:
-        attributes["text:change-id"] = change_id
-    if office_name:
-        attributes["office:name"] = office_name
-    if office_title:
-        attributes["office:title"] = office_title
-    if outline_level:
-        attributes["text:outline-level"] = str(outline_level)
-    if level:
-        attributes["text:level"] = str(level)
-    if page_layout:
-        attributes["style:page-layout-name"] = page_layout
-    if master_page:
-        attributes["draw:master-page-name"] = master_page
-    if parent_style:
-        attributes["style:parent-style-name"] = parent_style
-    if presentation_class:
-        attributes["presentation:class"] = presentation_class
-    # Sort attributes for reproducible test cases
-    for qname in sorted(attributes):
-        value = attributes[qname]
-        if value is True:
-            query.append(f"[@{qname}]")
-        else:
-            query.append(f'[@{qname}="{value}"]')
-    query_str = "".join(query)
-    if position is not None:
-        # A position argument that mimics the behaviour of a python's list
-        if position >= 0:
-            position_str = str(position + 1)
-        elif position == -1:
-            position_str = "last()"
-        else:
-            position_str = f"last()-{abs(position) - 1}"
-        query_str = f"({query_str})[{position_str}]"
-    # print(query)
-    return query_str
-
-
-
-
-
-
-
-

Functions

-
-
-def make_xpath_query(query_string: str, family: str | None = None, text_style: str | None = None, draw_id: str | None = None, draw_name: str | None = None, draw_style: str | None = None, draw_text_style: str | None = None, table_name: str | None = None, table_style: str | None = None, style_name: str | None = None, display_name: str | None = None, note_class: str | None = None, text_id: str | None = None, text_name: str | None = None, change_id: str | None = None, office_name: str | None = None, office_title: str | None = None, outline_level: str | int | None = None, level: str | int | None = None, page_layout: str | None = None, master_page: str | None = None, parent_style: str | None = None, presentation_class: str | None = None, position: int | None = None, **kwargs: str) ‑> str -
-
-
-
- -Expand source code - -
def make_xpath_query(  # noqa: C901
-    query_string: str,
-    family: str | None = None,
-    text_style: str | None = None,
-    draw_id: str | None = None,
-    draw_name: str | None = None,
-    draw_style: str | None = None,
-    draw_text_style: str | None = None,
-    table_name: str | None = None,
-    table_style: str | None = None,
-    style_name: str | None = None,
-    display_name: str | None = None,
-    note_class: str | None = None,
-    text_id: str | None = None,
-    text_name: str | None = None,
-    change_id: str | None = None,
-    office_name: str | None = None,
-    office_title: str | None = None,
-    outline_level: str | int | None = None,
-    level: str | int | None = None,
-    page_layout: str | None = None,
-    master_page: str | None = None,
-    parent_style: str | None = None,
-    presentation_class: str | None = None,
-    position: int | None = None,
-    **kwargs: str,
-) -> str:
-    query = [query_string]
-    attributes = kwargs
-    if text_style:
-        attributes["text:style-name"] = text_style
-    if family and family in FAMILY_ODF_STD:
-        attributes["style:family"] = family
-    if draw_id:
-        attributes["draw:id"] = draw_id
-    if draw_name:
-        attributes["draw:name"] = draw_name
-    if draw_style:
-        attributes["draw:style-name"] = draw_style
-    if draw_text_style:
-        attributes["draw:text-style-name"] = draw_text_style
-    if table_name:
-        attributes["table:name"] = table_name
-    if table_style:
-        attributes["table:style-name"] = table_style
-    if style_name:
-        attributes["style:name"] = style_name
-    if display_name:
-        attributes["style:display-name"] = display_name
-    if note_class:
-        attributes["text:note-class"] = note_class
-    if text_id:
-        attributes["text:id"] = text_id
-    if text_name:
-        attributes["text:name"] = text_name
-    if change_id:
-        attributes["text:change-id"] = change_id
-    if office_name:
-        attributes["office:name"] = office_name
-    if office_title:
-        attributes["office:title"] = office_title
-    if outline_level:
-        attributes["text:outline-level"] = str(outline_level)
-    if level:
-        attributes["text:level"] = str(level)
-    if page_layout:
-        attributes["style:page-layout-name"] = page_layout
-    if master_page:
-        attributes["draw:master-page-name"] = master_page
-    if parent_style:
-        attributes["style:parent-style-name"] = parent_style
-    if presentation_class:
-        attributes["presentation:class"] = presentation_class
-    # Sort attributes for reproducible test cases
-    for qname in sorted(attributes):
-        value = attributes[qname]
-        if value is True:
-            query.append(f"[@{qname}]")
-        else:
-            query.append(f'[@{qname}="{value}"]')
-    query_str = "".join(query)
-    if position is not None:
-        # A position argument that mimics the behaviour of a python's list
-        if position >= 0:
-            position_str = str(position + 1)
-        elif position == -1:
-            position_str = "last()"
-        else:
-            position_str = f"last()-{abs(position) - 1}"
-        query_str = f"({query_str})[{position_str}]"
-    # print(query)
-    return query_str
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/variable.html b/doc/variable.html deleted file mode 100644 index e02aeba..0000000 --- a/doc/variable.html +++ /dev/null @@ -1,4972 +0,0 @@ - - - - - - -odfdo.variable API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.variable

-
-
-

User fields and variable fields classes.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2013 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Hervé Cauwelier <herve@itaapy.com>
-#          Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""User fields and variable fields classes.
-"""
-from __future__ import annotations
-
-from datetime import datetime, timedelta
-from typing import Any
-
-from .datatype import Date, DateTime, Duration
-from .document import Document
-from .element import Element, PropDef, register_element_class
-from .element_typed import ElementTyped
-
-
-class VarDecls(Element):
-    _tag = "text:variable-decls"
-
-
-class VarDecl(Element):
-    _tag = "text:variable-decl"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("value_type", "office:value-type"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value_type: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if value_type:
-                self.value_type = value_type
-
-
-VarDecl._define_attribut_property()
-
-
-class VarSet(ElementTyped):
-    _tag = "text:variable-set"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "style:data-style-name"),
-        PropDef("display", "text:display"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value: Any = None,
-        value_type: str | None = None,
-        display: str | bool = False,
-        text: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if style:
-                self.style = style
-            text = self.set_value_and_type(
-                value=value, value_type=value_type, text=text
-            )
-            if not display:
-                self.display = "none"
-            else:
-                self.text = text  # type: ignore
-
-    def set_value(self, value: Any) -> None:
-        name = self.get_attribute("text:name")
-        display = self.get_attribute("text:display")
-        self.clear()
-        text = self.set_value_and_type(value=value)
-        self.set_attribute("text:name", name)
-        if display is not None:
-            self.set_attribute("text:display", display)
-        if isinstance(text, str):
-            self.text = text
-
-
-VarSet._define_attribut_property()
-
-
-class VarGet(ElementTyped):
-    _tag = "text:variable-get"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value: Any = None,
-        value_type: str | None = None,
-        text: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if style:
-                self.style = style
-            text = self.set_value_and_type(
-                value=value, value_type=value_type, text=text
-            )
-            self.text = text  # type: ignore
-
-
-VarGet._define_attribut_property()
-
-
-class UserFieldDecls(Element):
-    _tag = "text:user-field-decls"
-
-
-class UserFieldDecl(ElementTyped):
-    _tag = "text:user-field-decl"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value: Any = None,
-        value_type: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            self.set_value_and_type(value=value, value_type=value_type)
-
-    def set_value(self, value: Any) -> None:
-        name = self.get_attribute("text:name")
-        self.clear()
-        self.set_value_and_type(value=value)
-        self.set_attribute("text:name", name)
-
-
-UserFieldDecl._define_attribut_property()
-
-
-class UserFieldGet(ElementTyped):
-    _tag = "text:user-field-get"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value: Any = None,
-        value_type: str | None = None,
-        text: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            text = self.set_value_and_type(
-                value=value, value_type=value_type, text=text
-            )
-            self.text = text  # type: ignore
-
-            if style:
-                self.style = style
-
-
-UserFieldGet._define_attribut_property()
-
-
-class UserFieldInput(UserFieldGet):
-    _tag = "text:user-field-input"
-
-
-UserFieldInput._define_attribut_property()
-
-
-class UserDefined(ElementTyped):
-    """Return a user defined field "text:user-defined". If the current
-    document is provided, try to extract the content of the meta user defined
-    field of same name.
-
-    Arguments:
-
-        name -- str, name of the user defined field
-
-        value -- python typed value, value of the field
-
-        value_type -- str, office:value-type known type
-
-        text -- str
-
-        style -- str
-
-        from_document -- ODF document
-    """
-
-    _tag = "text:user-defined"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        name: str = "",
-        value: Any = None,
-        value_type: str | None = None,
-        text: str | None = None,
-        style: str | None = None,
-        from_document: Document | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if style:
-                self.style = style
-            if from_document is not None:
-                meta_infos = from_document.meta
-                content = meta_infos.get_user_defined_metadata_of_name(name)
-                if content is not None:
-                    value = content.get("value", None)
-                    value_type = content.get("value_type", None)
-                    text = content.get("text", None)
-            text = self.set_value_and_type(
-                value=value, value_type=value_type, text=text
-            )
-            self.text = text  # type: ignore
-
-
-UserDefined._define_attribut_property()
-
-
-class VarPageNumber(Element):
-    """
-    select_page -- string in ('previous', 'current', 'next')
-
-    page_adjust -- int (to add or subtract to the page number)
-    """
-
-    _tag = "text:page-number"
-    _properties = (
-        PropDef("select_page", "text:select-page"),
-        PropDef("page_adjust", "text:page-adjust"),
-    )
-
-    def __init__(
-        self,
-        select_page: str | None = None,
-        page_adjust: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if select_page is None:
-                select_page = "current"
-            self.select_page = select_page
-            if page_adjust is not None:
-                self.page_adjust = page_adjust
-
-
-VarPageNumber._define_attribut_property()
-
-
-class VarPageCount(Element):
-    _tag = "text:page-count"
-
-
-class VarDate(Element):
-    _tag = "text:date"
-    _properties = (
-        PropDef("date", "text:date-value"),
-        PropDef("fixed", "text:fixed"),
-        PropDef("data_style", "style:data-style-name"),
-        PropDef("date_adjust", "text:date-adjust"),
-    )
-
-    def __init__(
-        self,
-        date: datetime | None = None,
-        fixed: bool = False,
-        data_style: str | None = None,
-        text: str | None = None,
-        date_adjust: timedelta | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if date:
-                self.date = DateTime.encode(date)
-            if fixed:
-                self.fixed = True
-            if data_style is not None:
-                self.data_style = data_style
-            if text is None and date is not None:
-                text = Date.encode(date)
-            self.text = text  # type: ignore
-            if date_adjust is not None:
-                self.date_adjust = Duration.encode(date_adjust)
-
-
-VarDate._define_attribut_property()
-
-
-class VarTime(Element):
-    _tag = "text:time"
-    _properties = (
-        PropDef("time", "text:time-value"),
-        PropDef("fixed", "text:fixed"),
-        PropDef("data_style", "style:data-style-name"),
-        PropDef("time_adjust", "text:time-adjust"),
-    )
-
-    def __init__(
-        self,
-        time: datetime,
-        fixed: bool = False,
-        data_style: str | None = None,
-        text: str | None = None,
-        time_adjust: timedelta | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.time = DateTime.encode(time)
-            if fixed:
-                self.fixed = True
-            if data_style is not None:
-                self.data_style = data_style
-            if text is None:
-                text = time.strftime("%H:%M:%S")
-            self.text = text
-            if time_adjust is not None:
-                self.date_adjust = Duration.encode(time_adjust)
-
-
-VarTime._define_attribut_property()
-
-
-class VarChapter(Element):
-    _tag = "text:chapter"
-    _properties = (
-        PropDef("display", "text:display"),
-        PropDef("outline_level", "text:outline-level"),
-    )
-    DISPLAY_VALUE_CHOICE = {  # noqa: RUF012
-        "number",
-        "name",
-        "number-and-name",
-        "plain-number",
-        "plain-number-and-name",
-    }
-
-    def __init__(
-        self,
-        display: str | None = "name",
-        outline_level: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """display can be: 'number', 'name', 'number-and-name', 'plain-number' or
-        'plain-number-and-name'
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if display not in VarChapter.DISPLAY_VALUE_CHOICE:
-                raise ValueError("unknown display value: %s" % display)
-            self.display = display
-            if outline_level is not None:
-                self.outline_level = outline_level
-
-
-VarChapter._define_attribut_property()
-
-
-class VarFileName(Element):
-    _tag = "text:file-name"
-    _properties = (
-        PropDef("display", "text:display"),
-        PropDef("fixed", "text:fixed"),
-    )
-    DISPLAY_VALUE_CHOICE = {  # noqa: RUF012
-        "full",
-        "path",
-        "name",
-        "name-and-extension",
-    }
-
-    def __init__(
-        self,
-        display: str | None = "full",
-        fixed: bool = False,
-        **kwargs: Any,
-    ) -> None:
-        """display can be: 'full', 'path', 'name' or 'name-and-extension'"""
-        super().__init__(**kwargs)
-        if self._do_init:
-            if display not in VarFileName.DISPLAY_VALUE_CHOICE:
-                raise ValueError("unknown display value: %s" % display)
-            self.display = display
-            if fixed:
-                self.fixed = True
-
-
-VarFileName._define_attribut_property()
-
-
-class VarInitialCreator(Element):
-    _tag = "text:initial-creator"
-    _properties = (PropDef("fixed", "text:fixed"),)
-
-    def __init__(self, fixed: bool = False, **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init and fixed:
-            self.fixed = True
-
-
-VarInitialCreator._define_attribut_property()
-
-
-class VarCreationDate(Element):
-    _tag = "text:creation-date"
-    _properties = (
-        PropDef("fixed", "text:fixed"),
-        PropDef("data_style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        fixed: bool = False,
-        data_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if fixed:
-                self.fixed = True
-            if data_style:
-                self.data_style = data_style
-
-
-VarCreationDate._define_attribut_property()
-
-
-class VarCreationTime(Element):
-    _tag = "text:creation-time"
-    _properties = (
-        PropDef("fixed", "text:fixed"),
-        PropDef("data_style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        fixed: bool = False,
-        data_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if fixed:
-                self.fixed = True
-            if data_style:
-                self.data_style = data_style
-
-
-VarCreationTime._define_attribut_property()
-
-
-class VarDescription(VarInitialCreator):
-    _tag = "text:description"
-
-
-VarDescription._define_attribut_property()
-
-
-class VarTitle(VarInitialCreator):
-    _tag = "text:title"
-
-
-VarTitle._define_attribut_property()
-
-
-class VarSubject(VarInitialCreator):
-    _tag = "text:subject"
-
-
-VarSubject._define_attribut_property()
-
-
-class VarKeywords(VarInitialCreator):
-    _tag = "text:keywords"
-
-
-VarKeywords._define_attribut_property()
-
-register_element_class(VarDecls)
-register_element_class(VarDecl)
-register_element_class(VarSet)
-register_element_class(VarGet)
-register_element_class(UserFieldDecls)
-register_element_class(UserFieldDecl)
-register_element_class(UserFieldGet)
-register_element_class(UserFieldInput)
-register_element_class(UserDefined)
-register_element_class(VarPageNumber)
-register_element_class(VarPageCount)
-register_element_class(VarDate)
-register_element_class(VarTime)
-register_element_class(VarChapter)
-register_element_class(VarFileName)
-register_element_class(VarInitialCreator)
-register_element_class(VarCreationDate)
-register_element_class(VarCreationTime)
-register_element_class(VarDescription)
-register_element_class(VarTitle)
-register_element_class(VarSubject)
-register_element_class(VarKeywords)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class UserDefined -(name: str = '', value: Any = None, value_type: str | None = None, text: str | None = None, style: str | None = None, from_document: Document | None = None, **kwargs: Any) -
-
-

Return a user defined field "text:user-defined". If the current -document is provided, try to extract the content of the meta user defined -field of same name.

-

Arguments

-

name – str, name of the user defined field

-

value – python typed value, value of the field

-

value_type – str, office:value-type known type

-

text – str

-

style – str

-

from_document – ODF document

-
- -Expand source code - -
class UserDefined(ElementTyped):
-    """Return a user defined field "text:user-defined". If the current
-    document is provided, try to extract the content of the meta user defined
-    field of same name.
-
-    Arguments:
-
-        name -- str, name of the user defined field
-
-        value -- python typed value, value of the field
-
-        value_type -- str, office:value-type known type
-
-        text -- str
-
-        style -- str
-
-        from_document -- ODF document
-    """
-
-    _tag = "text:user-defined"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        name: str = "",
-        value: Any = None,
-        value_type: str | None = None,
-        text: str | None = None,
-        style: str | None = None,
-        from_document: Document | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if style:
-                self.style = style
-            if from_document is not None:
-                meta_infos = from_document.meta
-                content = meta_infos.get_user_defined_metadata_of_name(name)
-                if content is not None:
-                    value = content.get("value", None)
-                    value_type = content.get("value_type", None)
-                    text = content.get("text", None)
-            text = self.set_value_and_type(
-                value=value, value_type=value_type, text=text
-            )
-            self.text = text  # type: ignore
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class UserFieldDecl -(name: str | None = None, value: Any = None, value_type: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class UserFieldDecl(ElementTyped):
-    _tag = "text:user-field-decl"
-    _properties = (PropDef("name", "text:name"),)
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value: Any = None,
-        value_type: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            self.set_value_and_type(value=value, value_type=value_type)
-
-    def set_value(self, value: Any) -> None:
-        name = self.get_attribute("text:name")
-        self.clear()
-        self.set_value_and_type(value=value)
-        self.set_attribute("text:name", name)
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def set_value(self, value: Any) ‑> None -
-
-
-
- -Expand source code - -
def set_value(self, value: Any) -> None:
-    name = self.get_attribute("text:name")
-    self.clear()
-    self.set_value_and_type(value=value)
-    self.set_attribute("text:name", name)
-
-
-
-

Inherited members

- -
-
-class UserFieldDecls -(**kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class UserFieldDecls(Element):
-    _tag = "text:user-field-decls"
-
-

Ancestors

- -

Inherited members

- -
-
-class UserFieldGet -(name: str | None = None, value: Any = None, value_type: str | None = None, text: str | None = None, style: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class UserFieldGet(ElementTyped):
-    _tag = "text:user-field-get"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value: Any = None,
-        value_type: str | None = None,
-        text: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            text = self.set_value_and_type(
-                value=value, value_type=value_type, text=text
-            )
-            self.text = text  # type: ignore
-
-            if style:
-                self.style = style
-
-

Ancestors

- -

Subclasses

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class UserFieldInput -(name: str | None = None, value: Any = None, value_type: str | None = None, text: str | None = None, style: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class UserFieldInput(UserFieldGet):
-    _tag = "text:user-field-input"
-
-

Ancestors

- -

Inherited members

- -
-
-class VarChapter -(display: str | None = 'name', outline_level: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-

display can be: 'number', 'name', 'number-and-name', 'plain-number' or -'plain-number-and-name'

-
- -Expand source code - -
class VarChapter(Element):
-    _tag = "text:chapter"
-    _properties = (
-        PropDef("display", "text:display"),
-        PropDef("outline_level", "text:outline-level"),
-    )
-    DISPLAY_VALUE_CHOICE = {  # noqa: RUF012
-        "number",
-        "name",
-        "number-and-name",
-        "plain-number",
-        "plain-number-and-name",
-    }
-
-    def __init__(
-        self,
-        display: str | None = "name",
-        outline_level: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        """display can be: 'number', 'name', 'number-and-name', 'plain-number' or
-        'plain-number-and-name'
-        """
-        super().__init__(**kwargs)
-        if self._do_init:
-            if display not in VarChapter.DISPLAY_VALUE_CHOICE:
-                raise ValueError("unknown display value: %s" % display)
-            self.display = display
-            if outline_level is not None:
-                self.outline_level = outline_level
-
-

Ancestors

- -

Class variables

-
-
var DISPLAY_VALUE_CHOICE
-
-
-
-
-

Instance variables

-
-
var display : str | bool | None
-
-

Get/set the attribute text:display

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var outline_level : str | bool | None
-
-

Get/set the attribute text:outline-level

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarCreationDate -(fixed: bool = False, data_style: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarCreationDate(Element):
-    _tag = "text:creation-date"
-    _properties = (
-        PropDef("fixed", "text:fixed"),
-        PropDef("data_style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        fixed: bool = False,
-        data_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if fixed:
-                self.fixed = True
-            if data_style:
-                self.data_style = data_style
-
-

Ancestors

- -

Instance variables

-
-
var data_style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var fixed : str | bool | None
-
-

Get/set the attribute text:fixed

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarCreationTime -(fixed: bool = False, data_style: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarCreationTime(Element):
-    _tag = "text:creation-time"
-    _properties = (
-        PropDef("fixed", "text:fixed"),
-        PropDef("data_style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        fixed: bool = False,
-        data_style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if fixed:
-                self.fixed = True
-            if data_style:
-                self.data_style = data_style
-
-

Ancestors

- -

Instance variables

-
-
var data_style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var fixed : str | bool | None
-
-

Get/set the attribute text:fixed

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarDate -(date: datetime | None = None, fixed: bool = False, data_style: str | None = None, text: str | None = None, date_adjust: timedelta | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarDate(Element):
-    _tag = "text:date"
-    _properties = (
-        PropDef("date", "text:date-value"),
-        PropDef("fixed", "text:fixed"),
-        PropDef("data_style", "style:data-style-name"),
-        PropDef("date_adjust", "text:date-adjust"),
-    )
-
-    def __init__(
-        self,
-        date: datetime | None = None,
-        fixed: bool = False,
-        data_style: str | None = None,
-        text: str | None = None,
-        date_adjust: timedelta | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if date:
-                self.date = DateTime.encode(date)
-            if fixed:
-                self.fixed = True
-            if data_style is not None:
-                self.data_style = data_style
-            if text is None and date is not None:
-                text = Date.encode(date)
-            self.text = text  # type: ignore
-            if date_adjust is not None:
-                self.date_adjust = Duration.encode(date_adjust)
-
-

Ancestors

- -

Instance variables

-
-
var data_style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var date : str | bool | None
-
-

Get/set the attribute text:date-value

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var date_adjust : str | bool | None
-
-

Get/set the attribute text:date-adjust

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var fixed : str | bool | None
-
-

Get/set the attribute text:fixed

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarDecl -(name: str | None = None, value_type: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarDecl(Element):
-    _tag = "text:variable-decl"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("value_type", "office:value-type"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value_type: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if value_type:
-                self.value_type = value_type
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var value_type : str | bool | None
-
-

Get/set the attribute office:value-type

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarDecls -(**kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarDecls(Element):
-    _tag = "text:variable-decls"
-
-

Ancestors

- -

Inherited members

- -
-
-class VarDescription -(fixed: bool = False, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarDescription(VarInitialCreator):
-    _tag = "text:description"
-
-

Ancestors

- -

Inherited members

- -
-
-class VarFileName -(display: str | None = 'full', fixed: bool = False, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-

display can be: 'full', 'path', 'name' or 'name-and-extension'

-
- -Expand source code - -
class VarFileName(Element):
-    _tag = "text:file-name"
-    _properties = (
-        PropDef("display", "text:display"),
-        PropDef("fixed", "text:fixed"),
-    )
-    DISPLAY_VALUE_CHOICE = {  # noqa: RUF012
-        "full",
-        "path",
-        "name",
-        "name-and-extension",
-    }
-
-    def __init__(
-        self,
-        display: str | None = "full",
-        fixed: bool = False,
-        **kwargs: Any,
-    ) -> None:
-        """display can be: 'full', 'path', 'name' or 'name-and-extension'"""
-        super().__init__(**kwargs)
-        if self._do_init:
-            if display not in VarFileName.DISPLAY_VALUE_CHOICE:
-                raise ValueError("unknown display value: %s" % display)
-            self.display = display
-            if fixed:
-                self.fixed = True
-
-

Ancestors

- -

Class variables

-
-
var DISPLAY_VALUE_CHOICE
-
-
-
-
-

Instance variables

-
-
var display : str | bool | None
-
-

Get/set the attribute text:display

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var fixed : str | bool | None
-
-

Get/set the attribute text:fixed

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarGet -(name: str | None = None, value: Any = None, value_type: str | None = None, text: str | None = None, style: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarGet(ElementTyped):
-    _tag = "text:variable-get"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "style:data-style-name"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value: Any = None,
-        value_type: str | None = None,
-        text: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if style:
-                self.style = style
-            text = self.set_value_and_type(
-                value=value, value_type=value_type, text=text
-            )
-            self.text = text  # type: ignore
-
-

Ancestors

- -

Instance variables

-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarInitialCreator -(fixed: bool = False, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarInitialCreator(Element):
-    _tag = "text:initial-creator"
-    _properties = (PropDef("fixed", "text:fixed"),)
-
-    def __init__(self, fixed: bool = False, **kwargs: Any) -> None:
-        super().__init__(**kwargs)
-        if self._do_init and fixed:
-            self.fixed = True
-
-

Ancestors

- -

Subclasses

- -

Instance variables

-
-
var fixed : str | bool | None
-
-

Get/set the attribute text:fixed

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarKeywords -(fixed: bool = False, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarKeywords(VarInitialCreator):
-    _tag = "text:keywords"
-
-

Ancestors

- -

Inherited members

- -
-
-class VarPageCount -(**kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarPageCount(Element):
-    _tag = "text:page-count"
-
-

Ancestors

- -

Inherited members

- -
-
-class VarPageNumber -(select_page: str | None = None, page_adjust: str | None = None, **kwargs: Any) -
-
-

select_page – string in ('previous', 'current', 'next')

-

page_adjust – int (to add or subtract to the page number)

-
- -Expand source code - -
class VarPageNumber(Element):
-    """
-    select_page -- string in ('previous', 'current', 'next')
-
-    page_adjust -- int (to add or subtract to the page number)
-    """
-
-    _tag = "text:page-number"
-    _properties = (
-        PropDef("select_page", "text:select-page"),
-        PropDef("page_adjust", "text:page-adjust"),
-    )
-
-    def __init__(
-        self,
-        select_page: str | None = None,
-        page_adjust: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if select_page is None:
-                select_page = "current"
-            self.select_page = select_page
-            if page_adjust is not None:
-                self.page_adjust = page_adjust
-
-

Ancestors

- -

Instance variables

-
-
var page_adjust : str | bool | None
-
-

Get/set the attribute text:page-adjust

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var select_page : str | bool | None
-
-

Get/set the attribute text:select-page

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarSet -(name: str | None = None, value: Any = None, value_type: str | None = None, display: str | bool = False, text: str | None = None, style: str | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarSet(ElementTyped):
-    _tag = "text:variable-set"
-    _properties = (
-        PropDef("name", "text:name"),
-        PropDef("style", "style:data-style-name"),
-        PropDef("display", "text:display"),
-    )
-
-    def __init__(
-        self,
-        name: str | None = None,
-        value: Any = None,
-        value_type: str | None = None,
-        display: str | bool = False,
-        text: str | None = None,
-        style: str | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            if name:
-                self.name = name
-            if style:
-                self.style = style
-            text = self.set_value_and_type(
-                value=value, value_type=value_type, text=text
-            )
-            if not display:
-                self.display = "none"
-            else:
-                self.text = text  # type: ignore
-
-    def set_value(self, value: Any) -> None:
-        name = self.get_attribute("text:name")
-        display = self.get_attribute("text:display")
-        self.clear()
-        text = self.set_value_and_type(value=value)
-        self.set_attribute("text:name", name)
-        if display is not None:
-            self.set_attribute("text:display", display)
-        if isinstance(text, str):
-            self.text = text
-
-

Ancestors

- -

Instance variables

-
-
var display : str | bool | None
-
-

Get/set the attribute text:display

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var name : str | bool | None
-
-

Get/set the attribute text:name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Methods

-
-
-def set_value(self, value: Any) ‑> None -
-
-
-
- -Expand source code - -
def set_value(self, value: Any) -> None:
-    name = self.get_attribute("text:name")
-    display = self.get_attribute("text:display")
-    self.clear()
-    text = self.set_value_and_type(value=value)
-    self.set_attribute("text:name", name)
-    if display is not None:
-        self.set_attribute("text:display", display)
-    if isinstance(text, str):
-        self.text = text
-
-
-
-

Inherited members

- -
-
-class VarSubject -(fixed: bool = False, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarSubject(VarInitialCreator):
-    _tag = "text:subject"
-
-

Ancestors

- -

Inherited members

- -
-
-class VarTime -(time: datetime, fixed: bool = False, data_style: str | None = None, text: str | None = None, time_adjust: timedelta | None = None, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarTime(Element):
-    _tag = "text:time"
-    _properties = (
-        PropDef("time", "text:time-value"),
-        PropDef("fixed", "text:fixed"),
-        PropDef("data_style", "style:data-style-name"),
-        PropDef("time_adjust", "text:time-adjust"),
-    )
-
-    def __init__(
-        self,
-        time: datetime,
-        fixed: bool = False,
-        data_style: str | None = None,
-        text: str | None = None,
-        time_adjust: timedelta | None = None,
-        **kwargs: Any,
-    ) -> None:
-        super().__init__(**kwargs)
-        if self._do_init:
-            self.time = DateTime.encode(time)
-            if fixed:
-                self.fixed = True
-            if data_style is not None:
-                self.data_style = data_style
-            if text is None:
-                text = time.strftime("%H:%M:%S")
-            self.text = text
-            if time_adjust is not None:
-                self.date_adjust = Duration.encode(time_adjust)
-
-

Ancestors

- -

Instance variables

-
-
var data_style : str | bool | None
-
-

Get/set the attribute style:data-style-name

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var fixed : str | bool | None
-
-

Get/set the attribute text:fixed

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var time : str | bool | None
-
-

Get/set the attribute text:time-value

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
var time_adjust : str | bool | None
-
-

Get/set the attribute text:time-adjust

-
- -Expand source code - -
def getter(self: Element) -> str | bool | None:
-    try:
-        if family and self.family != family:  # type: ignore
-            return None
-    except AttributeError:
-        return None
-    value = self.__element.get(name)
-    if value is None:
-        return None
-    elif value in ("true", "false"):
-        return Boolean.decode(value)
-    return str(value)
-
-
-
-

Inherited members

- -
-
-class VarTitle -(fixed: bool = False, **kwargs: Any) -
-
-

Super class of all ODF classes.

-

Representation of an XML element. Abstraction of the XML library behind.

-
- -Expand source code - -
class VarTitle(VarInitialCreator):
-    _tag = "text:title"
-
-

Ancestors

- -

Inherited members

- -
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/version.html b/doc/version.html deleted file mode 100644 index ae28993..0000000 --- a/doc/version.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - -odfdo.version API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.version

-
-
-

Version number of the package.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2012 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: Jerome Dumonteil <jerome.dumonteil@itaapy.com>
-"""Version number of the package.
-"""
-from __future__ import annotations
-
-try:
-    from importlib.metadata import version as __version
-except (AttributeError, ImportError):  # pragma: no cover
-    import importlib
-
-    __version = importlib.metadata.version
-
-__version__ = __version("odfdo")
-
-
-
-
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/doc/xmlpart.html b/doc/xmlpart.html deleted file mode 100644 index 42f6fda..0000000 --- a/doc/xmlpart.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - -odfdo.xmlpart API documentation - - - - - - - - - - - -
-
-
-

Module odfdo.xmlpart

-
-
-

XmlPart base class for XML parts.

-
- -Expand source code - -
# Copyright 2018-2024 Jérôme Dumonteil
-# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-# Authors (odfdo project): jerome.dumonteil@gmail.com
-# The odfdo project is a derivative work of the lpod-python project:
-# https://github.com/lpod/lpod-python
-# Authors: David Versmisse <david.versmisse@itaapy.com>
-#          Hervé Cauwelier <herve@itaapy.com>
-"""XmlPart base class for XML parts.
-"""
-from __future__ import annotations
-
-from copy import deepcopy
-from io import BytesIO
-from typing import Any
-
-from lxml.etree import _ElementTree, parse, tostring
-
-from .container import Container
-from .element import Element, Text
-
-
-class XmlPart:
-    """Representation of an XML part.
-
-    Abstraction of the XML library behind.
-    """
-
-    def __init__(self, part_name: str, container: Container) -> None:
-        self.part_name = part_name
-        self.container = container
-
-        # Internal state
-        self.__tree: _ElementTree | None = None
-        self.__root: Element | None = None
-
-    def _get_tree(self) -> _ElementTree:
-        if self.__tree is None:
-            part = self.container.get_part(self.part_name)
-            self.__tree = parse(BytesIO(part))  # type: ignore
-        return self.__tree
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} part_name={self.part_name}>"
-
-    # Public API
-
-    @property
-    def root(self) -> Element:
-        if self.__root is None:
-            tree = self._get_tree()
-            self.__root = Element.from_tag(tree.getroot())
-        return self.__root
-
-    def get_elements(self, xpath_query: str) -> list[Element | Text]:
-        root = self.root
-        return root.xpath(xpath_query)
-
-    def get_element(self, xpath_query: str) -> Any:
-        result = self.get_elements(xpath_query)
-        if not result:
-            return None
-        return result[0]
-
-    def delete_element(self, child: Element) -> None:
-        child.delete()
-
-    def xpath(self, xpath_query: str) -> list[Element | Text]:
-        """Apply XPath query to the XML part. Return list of Element or
-        Text instances translated from the nodes found.
-        """
-        root = self.root
-        return root.xpath(xpath_query)
-
-    @property
-    def clone(self) -> XmlPart:
-        clone = object.__new__(self.__class__)
-        for name in self.__dict__:
-            if name == "container":
-                setattr(clone, name, self.container.clone)
-            elif name in ("_XmlPart__tree",):
-                setattr(clone, name, None)
-            else:
-                value = getattr(self, name)
-                value = deepcopy(value)
-                setattr(clone, name, value)
-        return clone
-
-    def serialize(self, pretty: bool = False) -> bytes:
-        tree = self._get_tree()
-        # Lxml declaration is too exotic to me
-        data = [b'<?xml version="1.0" encoding="UTF-8"?>']
-        bytes_tree = tostring(tree, pretty_print=pretty, encoding="utf-8")
-        # Lxml with pretty_print is adding a empty line
-        if pretty:
-            bytes_tree = bytes_tree.strip()
-        data.append(bytes_tree)
-        return b"\n".join(data)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class XmlPart -(part_name: str, container: Container) -
-
-

Representation of an XML part.

-

Abstraction of the XML library behind.

-
- -Expand source code - -
class XmlPart:
-    """Representation of an XML part.
-
-    Abstraction of the XML library behind.
-    """
-
-    def __init__(self, part_name: str, container: Container) -> None:
-        self.part_name = part_name
-        self.container = container
-
-        # Internal state
-        self.__tree: _ElementTree | None = None
-        self.__root: Element | None = None
-
-    def _get_tree(self) -> _ElementTree:
-        if self.__tree is None:
-            part = self.container.get_part(self.part_name)
-            self.__tree = parse(BytesIO(part))  # type: ignore
-        return self.__tree
-
-    def __repr__(self) -> str:
-        return f"<{self.__class__.__name__} part_name={self.part_name}>"
-
-    # Public API
-
-    @property
-    def root(self) -> Element:
-        if self.__root is None:
-            tree = self._get_tree()
-            self.__root = Element.from_tag(tree.getroot())
-        return self.__root
-
-    def get_elements(self, xpath_query: str) -> list[Element | Text]:
-        root = self.root
-        return root.xpath(xpath_query)
-
-    def get_element(self, xpath_query: str) -> Any:
-        result = self.get_elements(xpath_query)
-        if not result:
-            return None
-        return result[0]
-
-    def delete_element(self, child: Element) -> None:
-        child.delete()
-
-    def xpath(self, xpath_query: str) -> list[Element | Text]:
-        """Apply XPath query to the XML part. Return list of Element or
-        Text instances translated from the nodes found.
-        """
-        root = self.root
-        return root.xpath(xpath_query)
-
-    @property
-    def clone(self) -> XmlPart:
-        clone = object.__new__(self.__class__)
-        for name in self.__dict__:
-            if name == "container":
-                setattr(clone, name, self.container.clone)
-            elif name in ("_XmlPart__tree",):
-                setattr(clone, name, None)
-            else:
-                value = getattr(self, name)
-                value = deepcopy(value)
-                setattr(clone, name, value)
-        return clone
-
-    def serialize(self, pretty: bool = False) -> bytes:
-        tree = self._get_tree()
-        # Lxml declaration is too exotic to me
-        data = [b'<?xml version="1.0" encoding="UTF-8"?>']
-        bytes_tree = tostring(tree, pretty_print=pretty, encoding="utf-8")
-        # Lxml with pretty_print is adding a empty line
-        if pretty:
-            bytes_tree = bytes_tree.strip()
-        data.append(bytes_tree)
-        return b"\n".join(data)
-
-

Subclasses

- -

Instance variables

-
-
var cloneXmlPart
-
-
-
- -Expand source code - -
@property
-def clone(self) -> XmlPart:
-    clone = object.__new__(self.__class__)
-    for name in self.__dict__:
-        if name == "container":
-            setattr(clone, name, self.container.clone)
-        elif name in ("_XmlPart__tree",):
-            setattr(clone, name, None)
-        else:
-            value = getattr(self, name)
-            value = deepcopy(value)
-            setattr(clone, name, value)
-    return clone
-
-
-
var rootElement
-
-
-
- -Expand source code - -
@property
-def root(self) -> Element:
-    if self.__root is None:
-        tree = self._get_tree()
-        self.__root = Element.from_tag(tree.getroot())
-    return self.__root
-
-
-
-

Methods

-
-
-def delete_element(self, child: Element) ‑> None -
-
-
-
- -Expand source code - -
def delete_element(self, child: Element) -> None:
-    child.delete()
-
-
-
-def get_element(self, xpath_query: str) ‑> Any -
-
-
-
- -Expand source code - -
def get_element(self, xpath_query: str) -> Any:
-    result = self.get_elements(xpath_query)
-    if not result:
-        return None
-    return result[0]
-
-
-
-def get_elements(self, xpath_query: str) ‑> list[Element | Text] -
-
-
-
- -Expand source code - -
def get_elements(self, xpath_query: str) -> list[Element | Text]:
-    root = self.root
-    return root.xpath(xpath_query)
-
-
-
-def serialize(self, pretty: bool = False) ‑> bytes -
-
-
-
- -Expand source code - -
def serialize(self, pretty: bool = False) -> bytes:
-    tree = self._get_tree()
-    # Lxml declaration is too exotic to me
-    data = [b'<?xml version="1.0" encoding="UTF-8"?>']
-    bytes_tree = tostring(tree, pretty_print=pretty, encoding="utf-8")
-    # Lxml with pretty_print is adding a empty line
-    if pretty:
-        bytes_tree = bytes_tree.strip()
-    data.append(bytes_tree)
-    return b"\n".join(data)
-
-
-
-def xpath(self, xpath_query: str) ‑> list[Element | Text] -
-
-

Apply XPath query to the XML part. Return list of Element or -Text instances translated from the nodes found.

-
- -Expand source code - -
def xpath(self, xpath_query: str) -> list[Element | Text]:
-    """Apply XPath query to the XML part. Return list of Element or
-    Text instances translated from the nodes found.
-    """
-    root = self.root
-    return root.xpath(xpath_query)
-
-
-
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 473b310..2f5f13e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "build" @@ -559,6 +559,23 @@ files = [ test = ["async-timeout", "pytest", "pytest-asyncio (>=0.17)", "pytest-trio", "testpath", "trio"] trio = ["async_generator", "trio"] +[[package]] +name = "jinja2" +version = "3.1.3" +description = "A very fast and expressive template engine." +optional = false +python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, + {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, +] + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + [[package]] name = "keyring" version = "24.3.1" @@ -685,43 +702,6 @@ files = [ [package.extras] test = ["coverage[toml] (>=7.2.5)", "mypy (>=1.2.0)", "pytest (>=7.3.0)", "pytest-mypy-plugins (>=1.10.1)"] -[[package]] -name = "mako" -version = "1.3.2" -description = "A super-fast templating language that borrows the best ideas from the existing templating languages." -optional = false -python-versions = ">=3.8" -files = [ - {file = "Mako-1.3.2-py3-none-any.whl", hash = "sha256:32a99d70754dfce237019d17ffe4a282d2d3351b9c476e90d8a60e63f133b80c"}, - {file = "Mako-1.3.2.tar.gz", hash = "sha256:2a0c8ad7f6274271b3bb7467dd37cf9cc6dab4bc19cb69a4ef10669402de698e"}, -] - -[package.dependencies] -MarkupSafe = ">=0.9.2" - -[package.extras] -babel = ["Babel"] -lingua = ["lingua"] -testing = ["pytest"] - -[[package]] -name = "markdown" -version = "3.5.2" -description = "Python implementation of John Gruber's Markdown." -optional = false -python-versions = ">=3.8" -files = [ - {file = "Markdown-3.5.2-py3-none-any.whl", hash = "sha256:d43323865d89fc0cb9b20c75fc8ad313af307cc087e84b657d9eec768eddeadd"}, - {file = "Markdown-3.5.2.tar.gz", hash = "sha256:e1ac7b3dc550ee80e602e71c1d168002f062e49f1b11e26a36264dafd4df2ef8"}, -] - -[package.dependencies] -importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} - -[package.extras] -docs = ["mdx-gh-links (>=0.2)", "mkdocs (>=1.5)", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-nature (>=0.6)", "mkdocs-section-index", "mkdocstrings[python]"] -testing = ["coverage", "pyyaml"] - [[package]] name = "markupsafe" version = "2.1.5" @@ -880,19 +860,23 @@ files = [ ] [[package]] -name = "pdoc3" -version = "0.10.0" -description = "Auto-generate API documentation for Python projects." +name = "pdoc" +version = "14.4.0" +description = "API Documentation for Python Projects" optional = false -python-versions = ">= 3.6" +python-versions = ">=3.8" files = [ - {file = "pdoc3-0.10.0-py3-none-any.whl", hash = "sha256:ba45d1ada1bd987427d2bf5cdec30b2631a3ff5fb01f6d0e77648a572ce6028b"}, - {file = "pdoc3-0.10.0.tar.gz", hash = "sha256:5f22e7bcb969006738e1aa4219c75a32f34c2d62d46dc9d2fb2d3e0b0287e4b7"}, + {file = "pdoc-14.4.0-py3-none-any.whl", hash = "sha256:6ea4fe07620b1f7601e2708a307a257636ec206e20b5611640b30f2e3cab47d6"}, + {file = "pdoc-14.4.0.tar.gz", hash = "sha256:c92edc425429ccbe287ace2a027953c24f13de53eab484c1a6d31ca72dd2fda9"}, ] [package.dependencies] -mako = "*" -markdown = ">=3.0" +Jinja2 = ">=2.11.0" +MarkupSafe = "*" +pygments = ">=2.12.0" + +[package.extras] +dev = ["hypothesis", "mypy", "pdoc-pyo3-sample-library (==1.0.11)", "pygments (>=2.14.0)", "pytest", "pytest-cov", "pytest-timeout", "ruff", "tox", "types-pygments"] [[package]] name = "pexpect" @@ -1122,6 +1106,21 @@ files = [ {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] +[[package]] +name = "pygments" +version = "2.17.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.7" +files = [ + {file = "pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"}, + {file = "pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"}, +] + +[package.extras] +plugins = ["importlib-metadata"] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pyproject-api" version = "1.6.1" @@ -1565,4 +1564,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.9,<4" -content-hash = "565a5854b3defe25c7d26f9a2222a3f6bfff8f51ecfa7252b1438811a8ededa6" +content-hash = "8a4339c4cf5279e37bb78c126def47b10ac5ed067584bb260ce5f70a2a9985f9" diff --git a/pyproject.toml b/pyproject.toml index e606106..802c659 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "odfdo" -version = "3.7.1" +version = "3.7.2" description = "Python library for OpenDocument Format" license = "Apache-2.0" keywords = ["python", "library", "ODF", "OpenDocument"]