Ë
    \Rðic(  ã                   óV   — d Z ddlmZ ddlmZmZmZmZmZm	Z	 ddl
mZ  G d„ de«      Zy)zParagraph-related proxy types.é    )ÚWD_LINE_SPACING)ÚElementProxyÚEmuÚLengthÚPtÚTwipsÚlazyproperty)ÚTabStopsc                   ó°  — e Zd ZdZed„ «       Zej                  d„ «       Zed„ «       Zej                  d„ «       Zed„ «       Zej                  d„ «       Zed„ «       Z	e	j                  d	„ «       Z	ed
„ «       Z
e
j                  d„ «       Z
ed„ «       Zej                  d„ «       Zed„ «       Zej                  d„ «       Zed„ «       Zej                  d„ «       Zed„ «       Zej                  d„ «       Zed„ «       Zej                  d„ «       Zed„ «       Zej                  d„ «       Zed„ «       Zed„ «       Zej                  d„ «       Zed„ «       Zed„ «       Zy)ÚParagraphFormatz�Provides access to paragraph formatting such as justification, indentation, line
    spacing, space before and after, and widow/orphan control.c                 óL   — | j                   j                  }|€y|j                  S )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   s     úK/var/www/html/Extract/venv/lib/python3.12/site-packages/docx/text/parfmt.pyÚ	alignmentzParagraphFormat.alignment   s%   € ð �m‰m×ÑˆØˆ;ØØ�z‰zÐó    c                 óF   — | j                   j                  «       }||_        y ©N)r   Úget_or_add_pPrr   ©r   Úvaluer   s      r   r   zParagraphFormat.alignment   s   € à�m‰m×*Ñ*Ó,ˆØˆ�
r   c                 óL   — | j                   j                  }|€y|j                  S )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   s     r   r   z!ParagraphFormat.first_line_indent   s'   € ð �m‰m×ÑˆØˆ;ØØ×$Ñ$Ð$r   c                 óF   — | j                   j                  «       }||_        y r   )r   r   r   r   s      r   r   z!ParagraphFormat.first_line_indent,   s   € à�m‰m×*Ñ*Ó,ˆØ %ˆÕr   c                 óL   — | j                   j                  }|€y|j                  S )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   s     r   Úkeep_togetherzParagraphFormat.keep_together1   s'   € ð �m‰m×ÑˆØˆ;ØØ× Ñ Ð r   c                 óB   — || j                   j                  «       _        y r   )r   r   r   ©r   r   s     r   r    zParagraphFormat.keep_together=   ó   € à7<ˆ�‰×$Ñ$Ó&Õ4r   c                 óL   — | j                   j                  }|€y|j                  S )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   s     r   Úkeep_with_nextzParagraphFormat.keep_with_nextA   s'   € ð �m‰m×ÑˆØˆ;ØØ×ÑÐr   c                 óB   — || j                   j                  «       _        y r   )r   r   r%   r"   s     r   r&   zParagraphFormat.keep_with_nextO   s   € à6;ˆ�‰×$Ñ$Ó&Õ3r   c                 óL   — | j                   j                  }|€y|j                  S )a1  |Length| value specifying the space between the left margin and the left side
        of the paragraph.

        |None| indicates the left indent value is inherited from the style hierarchy.
        Use an |Inches| value object as a convenient way to apply indentation in units
        of inches.
        N)r   r   Úind_leftr   s     r   Úleft_indentzParagraphFormat.left_indentS   s%   € ð �m‰m×ÑˆØˆ;ØØ�|‰|Ðr   c                 óF   — | j                   j                  «       }||_        y r   )r   r   r)   r   s      r   r*   zParagraphFormat.left_indenta   s   € à�m‰m×*Ñ*Ó,ˆØˆ�r   c                 ó€   — | j                   j                  }|€y| j                  |j                  |j                  «      S )aB  |float| or |Length| value specifying the space between baselines in
        successive lines of the paragraph.

        A value of |None| indicates line spacing is inherited from the style hierarchy.
        A float value, e.g. ``2.0`` or ``1.75``, indicates spacing is applied in
        multiples of line heights. A |Length| value such as ``Pt(12)`` indicates spacing
        is a fixed height. The |Pt| value class is a convenient way to apply line
        spacing in units of points. Assigning |None| resets line spacing to inherit from
        the style hierarchy.
        N)r   r   Ú_line_spacingÚspacing_lineÚspacing_lineRuler   s     r   Úline_spacingzParagraphFormat.line_spacingf   s:   € ð �m‰m×ÑˆØˆ;ØØ×!Ñ! #×"2Ñ"2°C×4HÑ4HÓIÐIr   c                 óR  — | j                   j                  «       }|€d |_        d |_        y t	        |t
        «      r;||_        |j                  t        j                  k7  rt        j                  |_        y y t        |t        d«      z  «      |_        t        j                  |_        y )Néð   )r   r   r.   r/   Ú
isinstancer   r   ÚAT_LEASTÚEXACTLYr   r   ÚMULTIPLEr   s      r   r0   zParagraphFormat.line_spacingw   s‰   € à�m‰m×*Ñ*Ó,ˆØˆ=Ø#ˆCÔØ#'ˆCÕ Ü˜œvÔ&Ø$ˆCÔØ×#Ñ#¤×'?Ñ'?Ò?Ü'6×'>Ñ'>�Õ$ð @ô  # 5¬5°«:Ñ#5Ó6ˆCÔÜ#2×#;Ñ#;ˆCÕ r   c                 ó€   — | j                   j                  }|€y| j                  |j                  |j                  «      S )at  A member of the :ref:`WdLineSpacing` enumeration indicating how the value of
        :attr:`line_spacing` should be interpreted.

        Assigning any of the :ref:`WdLineSpacing` members :attr:`SINGLE`,
        :attr:`DOUBLE`, or :attr:`ONE_POINT_FIVE` will cause the value of
        :attr:`line_spacing` to be updated to produce the corresponding line spacing.
        N)r   r   Ú_line_spacing_ruler.   r/   r   s     r   Úline_spacing_rulez!ParagraphFormat.line_spacing_rule…   s:   € ð �m‰m×ÑˆØˆ;ØØ×&Ñ& s×'7Ñ'7¸×9MÑ9MÓNÐNr   c                 óœ  — | j                   j                  «       }|t        j                  k(  r&t	        d«      |_        t        j                  |_        y |t        j                  k(  r&t	        d«      |_        t        j                  |_        y |t        j                  k(  r&t	        d«      |_        t        j                  |_        y ||_        y )Nr2   éh  éà  )
r   r   r   ÚSINGLEr   r.   r6   r/   ÚONE_POINT_FIVEÚDOUBLEr   s      r   r9   z!ParagraphFormat.line_spacing_rule“   s”   € à�m‰m×*Ñ*Ó,ˆØ”O×*Ñ*Ò*Ü$ S›zˆCÔÜ#2×#;Ñ#;ˆCÕ Ø”o×4Ñ4Ò4Ü$ S›zˆCÔÜ#2×#;Ñ#;ˆCÕ Ø”o×,Ñ,Ò,Ü$ S›zˆCÔÜ#2×#;Ñ#;ˆCÕ à#(ˆCÕ r   c                 óL   — | j                   j                  }|€y|j                  S )zÁ|True| if the paragraph should appear at the top of the page following the
        prior paragraph.

        |None| indicates its effective value is inherited from the style hierarchy.
        N)r   r   ÚpageBreakBefore_valr   s     r   Úpage_break_beforez!ParagraphFormat.page_break_before¢   s'   € ð �m‰m×ÑˆØˆ;ØØ×&Ñ&Ð&r   c                 óB   — || j                   j                  «       _        y r   )r   r   rA   r"   s     r   rB   z!ParagraphFormat.page_break_before®   s   € à=Bˆ�‰×$Ñ$Ó&Õ:r   c                 óL   — | j                   j                  }|€y|j                  S )a4  |Length| value specifying the space between the right margin and the right
        side of the paragraph.

        |None| indicates the right indent value is inherited from the style hierarchy.
        Use a |Cm| value object as a convenient way to apply indentation in units of
        centimeters.
        N)r   r   Ú	ind_rightr   s     r   Úright_indentzParagraphFormat.right_indent²   s%   € ð �m‰m×ÑˆØˆ;ØØ�}‰}Ðr   c                 óF   — | j                   j                  «       }||_        y r   )r   r   rE   r   s      r   rF   zParagraphFormat.right_indentÀ   s   € à�m‰m×*Ñ*Ó,ˆØˆ�r   c                 óL   — | j                   j                  }|€y|j                  S )ao  |Length| value specifying the spacing to appear between this paragraph and
        the subsequent paragraph.

        |None| indicates this value is inherited from the style hierarchy. |Length|
        objects provide convenience properties, such as :attr:`~.Length.pt` and
        :attr:`~.Length.inches`, that allow easy conversion to various length units.
        N)r   r   Úspacing_afterr   s     r   Úspace_afterzParagraphFormat.space_afterÅ   s'   € ð �m‰m×ÑˆØˆ;ØØ× Ñ Ð r   c                 óB   — || j                   j                  «       _        y r   )r   r   rI   r"   s     r   rJ   zParagraphFormat.space_afterÓ   r#   r   c                 óL   — | j                   j                  }|€y|j                  S )af  |Length| value specifying the spacing to appear between this paragraph and
        the prior paragraph.

        |None| indicates this value is inherited from the style hierarchy. |Length|
        objects provide convenience properties, such as :attr:`~.Length.pt` and
        :attr:`~.Length.cm`, that allow easy conversion to various length units.
        N)r   r   Úspacing_beforer   s     r   Úspace_beforezParagraphFormat.space_before×   s'   € ð �m‰m×ÑˆØˆ;ØØ×!Ñ!Ð!r   c                 óB   — || j                   j                  «       _        y r   )r   r   rM   r"   s     r   rN   zParagraphFormat.space_beforeå   s   € à8=ˆ�‰×$Ñ$Ó&Õ5r   c                 óL   — | j                   j                  «       }t        |«      S )z^|TabStops| object providing access to the tab stops defined for this
        paragraph format.)r   r   r
   r   s     r   Ú	tab_stopszParagraphFormat.tab_stopsé   s    € ð �m‰m×*Ñ*Ó,ˆÜ˜‹}Ðr   c                 óL   — | j                   j                  }|€y|j                  S )zò|True| if the first and last lines in the paragraph remain on the same page
        as the rest of the paragraph when Word repaginates the document.

        |None| indicates its effective value is inherited from the style hierarchy.
        N)r   r   ÚwidowControl_valr   s     r   Úwidow_controlzParagraphFormat.widow_controlð   s'   € ð �m‰m×ÑˆØˆ;ØØ×#Ñ#Ð#r   c                 óB   — || j                   j                  «       _        y r   )r   r   rS   r"   s     r   rT   zParagraphFormat.widow_controlü   s   € à:?ˆ�‰×$Ñ$Ó&Õ7r   c                 óN   — | €y|t         j                  k(  r| t        d«      z  S | S )a[  Return the line spacing value calculated from the combination of
        `spacing_line` and `spacing_lineRule`.

        Returns a |float| number of lines when `spacing_lineRule` is
        ``WD_LINE_SPACING.MULTIPLE``, otherwise a |Length| object of absolute line
        height is returned. Returns |None| when `spacing_line` is |None|.
        Né   )r   r6   r   )r.   r/   s     r   r-   zParagraphFormat._line_spacing   s0   € ð ÐØØœ×7Ñ7Ò7Ø¤" R£&Ñ(Ð(ØÐr   c                 óà   — |t         j                  k(  rZ| t        d«      k(  rt         j                  S | t        d«      k(  rt         j                  S | t        d«      k(  rt         j
                  S |S )zñReturn the line spacing rule value calculated from the combination of `line`
        and `lineRule`.

        Returns special members of the :ref:`WdLineSpacing` enumeration when line
        spacing is single, double, or 1.5 lines.
        r2   r;   r<   )r   r6   r   r=   r>   r?   )ÚlineÚlineRules     r   r8   z"ParagraphFormat._line_spacing_rule  s_   € ð ”×/Ñ/Ò/Ø”u˜S“zÒ!Ü&×-Ñ-Ð-Ø”u˜S“zÒ!Ü&×5Ñ5Ð5Ø”u˜S“zÒ!Ü&×-Ñ-Ð-Øˆr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   Úsetterr   r    r&   r*   r0   r9   rB   rF   rJ   rN   r	   rQ   rT   Ústaticmethodr-   r8   © r   r   r   r      st  „ ñBð ñ
ó ð
ð ×Ññó ðð ñ%ó ð%ð ×Ññ&ó ð&ð ñ	!ó ð	!ð ×Ññ=ó ð=ð ñ ó ð ð ×Ññ<ó ð<ð ñó ðð ×Ññó ðð ñJó ðJð  ×Ññ<ó ð<ð ñOó ðOð ×Ññ)ó ð)ð ñ	'ó ð	'ð ×ÑñCó ðCð ñó ðð ×Ññó ðð ñ!ó ð!ð ×Ññ=ó ð=ð ñ"ó ð"ð ×Ññ>ó ð>ð ñó ðð ñ	$ó ð	$ð ×Ññ@ó ð@ð ñó ðð ñó ñr   r   N)r^   Údocx.enum.textr   Údocx.sharedr   r   r   r   r   r	   Údocx.text.tabstopsr
   r   rb   r   r   ú<module>rf      s"   ðÙ $å *ß J× JÝ 'ôV�lõ Vr   