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

# region Import
from __future__ import annotations
from typing import Tuple, cast, Type, TypeVar
import uno

from ooodev.format.calc.style.page.kind.calc_style_page_kind import CalcStylePageKind
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.calc.cell_style_base_multi import CellStyleBaseMulti
from ooodev.meta.deleted_attrib import DeletedAttrib
from ooodev.meta.disabled_method import DisabledMethod

# endregion Import

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


[docs]class InnerStyle(AbstractHF): """ Page Header/Footer Inner Settings .. versionadded:: 0.9.0 """ # region Overrides 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 # endregion Overrides # region Properties @property def _props(self) -> HfProps: try: return self._props_internal_attributes except AttributeError: self._props_internal_attributes = HfProps( on="HeaderIsOn", shared="HeaderIsShared", shared_first="FirstPageHeaderIsShared", margin_left="HeaderLeftMargin", margin_right="HeaderRightMargin", spacing="HeaderBodyDistance", spacing_dyn="HeaderDynamic", 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 # endregion Properties