File: //home/arjun/projects/env/lib/python3.10/site-packages/docx/text/__pycache__/parfmt.cpython-310.pyc
o
$wec( � @ sP d Z ddlmZ ddlmZmZmZmZmZm Z ddl
mZ G dd� de�ZdS )zParagraph-related proxy types.� )�WD_LINE_SPACING)�ElementProxy�Emu�Length�Pt�Twips�lazyproperty)�TabStopsc @ sl e Zd ZdZedd� �Zejdd� �Zedd� �Zejdd� �Zedd � �Zejd
d � �Zedd� �Z e jd
d� �Z edd� �Z
e
jdd� �Z
edd� �Zejdd� �Zedd� �Zejdd� �Zedd� �Z
e
jdd� �Z
edd� �Zejdd� �Zedd� �Zejdd� �Zed d!� �Zejd"d!� �Zed#d$� �Zed%d&� �Zejd'd&� �Zed(d)� �Zed*d+� �Zd,S )-�ParagraphFormatz�Provides access to paragraph formatting such as justification, indentation, line
spacing, space before and after, and widow/orphan control.c C � | j j}|du r
dS |jS )z�A member of the :ref:`WdParagraphAlignment` enumeration specifying the
justification setting for this paragraph.
A value of |None| indicates paragraph alignment is inherited from the style
hierarchy.
N)�_element�pPr�jc_val��selfr
� r �I/home/arjun/projects/env/lib/python3.10/site-packages/docx/text/parfmt.py� alignment s zParagraphFormat.alignmentc C � | j �� }||_d S �N)r �get_or_add_pPrr �r �valuer
r r r r �
c C r )aA |Length| value specifying the relative difference in indentation for the
first line of the paragraph.
A positive value causes the first line to be indented. A negative value produces
a hanging indent. |None| indicates first line indentation is inherited from the
style hierarchy.
N)r r
�first_line_indentr r r r r � z!ParagraphFormat.first_line_indentc C r r )r r r r r r r r , r c C r )z�|True| if the paragraph should be kept "in one piece" and not broken across a
page boundary when the document is rendered.
|None| indicates its effective value is inherited from the style hierarchy.
N)r r
�
keepLines_valr r r r �
keep_together1 � zParagraphFormat.keep_togetherc C � || j �� _d S r )r r r �r r r r r r = � c C r )aT |True| if the paragraph should be kept on the same page as the subsequent
paragraph when the document is rendered.
For example, this property could be used to keep a section heading on the same
page as its first paragraph. |None| indicates its effective value is inherited
from the style hierarchy.
N)r r
�keepNext_valr r r r �keep_with_nextA r zParagraphFormat.keep_with_nextc C r r )r r r"