Source code for ooodev.format.inner.modify.write.page.header.header

# region Import
from __future__ import annotations
import uno
from typing import Any, Tuple, cast, Type, TypeVar
from ooodev.format.inner.common.abstract.abstract_hf import AbstractHF
from ooodev.format.inner.common.props.hf_props import HfProps
from ooodev.format.inner.kind.format_kind import FormatKind
from ooodev.format.inner.modify.write.page.page_style_base_multi import PageStyleBaseMulti
from ooodev.format.writer.style.page.kind.writer_style_page_kind import WriterStylePageKind

# endregion Import

_THeader = TypeVar(name="_THeader", bound="Header")


[docs]class InnerStyle(AbstractHF): """ Page Header/Footer Inner Settings .. versionadded:: 0.9.0 """ def _supported_services(self) -> Tuple[str, ...]: try: return self._supported_services_values except AttributeError: self._supported_services_values = ("com.sun.star.style.PageProperties", "com.sun.star.style.PageStyle") return self._supported_services_values @property def _props(self) -> HfProps: try: return self._props_internal_attributes except AttributeError: self._props_internal_attributes = HfProps( on="HeaderIsOn", shared="HeaderIsShared", shared_first="FirstIsShared", margin_left="HeaderLeftMargin", margin_right="HeaderRightMargin", spacing="HeaderBodyDistance", spacing_dyn="HeaderDynamicSpacing", height="HeaderHeight", height_auto="HeaderIsDynamicHeight", ) return self._props_internal_attributes @property def prop_format_kind(self) -> FormatKind: """Gets the kind of style""" try: return self._format_kind_prop except AttributeError: self._format_kind_prop = FormatKind.DOC | FormatKind.STYLE | FormatKind.HEADER return self._format_kind_prop
# endregion Properties