Source code for ooodev.adapter.text.textfield.page_count_comp

from __future__ import annotations

from typing import cast, TYPE_CHECKING
import uno

from import NumberingTypeEnum
from ooodev.adapter.text.text_field_comp import TextFieldComp

    from import PageCount  # service
    from import XTextField

[docs]class PageCountComp(TextFieldComp): """ Class for managing PageCount Component. """ # pylint: disable=unused-argument
[docs] def __init__(self, component: XTextField) -> None: """ Constructor Args: component (XTextField): UNO PageCount Component that supports ```` service. """ TextFieldComp.__init__(self, component)
# region Overrides def _ComponentBase__get_supported_service_names(self) -> tuple[str, ...]: """Returns a tuple of supported service names.""" return ("",) # endregion Overrides # region Properties @property def number_type(self) -> NumberingTypeEnum: """Gets or sets the numbering type.""" return NumberingTypeEnum(self.component.NumberingType) @number_type.setter def number_type(self, value: NumberingTypeEnum) -> None: self.component.NumberingType = value.value if TYPE_CHECKING: @property def component(self) -> PageCount: """PageCount Component""" # pylint: disable=no-member return cast("PageCount", self._ComponentBase__get_component()) # type: ignore
# endregion Properties