File: //home/arjun/projects/env/lib/python3.10/site-packages/docx/oxml/__pycache__/styles.cpython-310.pyc
o
$we�) � @ s� d Z ddlmZ ddlmZ ddlmZmZmZ ddl m
Z
mZmZm
Z
mZ dd� ZG dd � d e
�ZG d
d� de
�ZG dd
� d
e
�ZG dd� de
�ZdS )z2Custom element classes related to the styles part.� )�annotations)�
WD_STYLE_TYPE)�ST_DecimalNumber�ST_OnOff� ST_String)�BaseOxmlElement�OptionalAttribute�RequiredAttribute�
ZeroOrMore� ZeroOrOnec C s* ddddddddd d
d�
� | | �dd
��S )zlReturn the style id corresponding to `name`, taking into account special-case
names such as 'Heading 1'.�Caption�Heading1�Heading2�Heading3�Heading4�Heading5�Heading6�Heading7�Heading8�Heading9)
�captionz heading 1z heading 2z heading 3z heading 4z heading 5z heading 6z heading 7z heading 8z heading 9� � )�get�replace)�name� r �I/home/arjun/projects/env/lib/python3.10/site-packages/docx/oxml/styles.py�styleId_from_name s ��r c @ sp e Zd ZdZeddd�Zede�Zede �Z
ede �Zede �Zed e�Z
ed
e �Zdd� Zd
d� Zdd� ZdS )�CT_LatentStylesz�`w:latentStyles` element, defining behavior defaults for latent styles and
containing `w:lsdException` child elements that each override those defaults for a
named latent style.zw:lsdExceptionr ��
successorszw:countzw:defLockedStatezw:defQFormatzw:defSemiHiddenzw:defUIPriorityzw:defUnhideWhenUsedc C s t | |�}|du rdS |S )z`Return the boolean value of the attribute having `attr_name`, or |False| if
not present.NF��getattr��self� attr_name�valuer r r � bool_prop/ s
zCT_LatentStyles.bool_propc C s | � d| �}|sdS |d S )zHReturn the `w:lsdException` child having `name`, or |None| if not found.zw:lsdException[@w:name="%s"]Nr ��xpath)r% r �foundr r r �get_by_name7 s zCT_LatentStyles.get_by_namec C s t | |t|�� dS �z7Set the on/off attribute having `attr_name` to `value`.N)�setattr�boolr$ r r r �
set_bool_prop>