§
    £”jc(  ã                   ó^   — 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dS )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dS )ÚParagraphFormatz�Provides access to paragraph formatting such as justification, indentation, line
    spacing, space before and after, and widow/orphan control.c                 ó0   — | j         j        }|€dS |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     ú_/var/www/finuniver-perm.ru/html/portfolio/venv/lib/python3.11/site-packages/docx/text/parfmt.pyÚ	alignmentzParagraphFormat.alignment   s    € ð ŒmÔˆØˆ;Ø�4ØŒzÐó    c                 óF   — | j                              ¦   «         }||_        d S ©N)r   Úget_or_add_pPrr   ©r   Úvaluer   s      r   r   zParagraphFormat.alignment   s    € àŒm×*Ò*Ñ,Ô,ˆØˆŒ
ˆ
ˆ
r   c                 ó0   — | j         j        }|€dS |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ÔˆØˆ;Ø�4ØÔ$Ð$r   c                 óF   — | j                              ¦   «         }||_        d S r   )r   r   r   r   s      r   r   z!ParagraphFormat.first_line_indent,   s#   € àŒm×*Ò*Ñ,Ô,ˆØ %ˆÔÐÐr   c                 ó0   — | j         j        }|€dS |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ÔˆØˆ;Ø�4ØÔ Ð r   c                 óB   — || j                              ¦   «         _        d S r   )r   r   r   ©r   r   s     r   r    zParagraphFormat.keep_together=   ó   € à7<ˆŒ×$Ò$Ñ&Ô&Ô4Ð4Ð4r   c                 ó0   — | j         j        }|€dS |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ÔˆØˆ;Ø�4ØÔÐr   c                 óB   — || j                              ¦   «         _        d S r   )r   r   r%   r"   s     r   r&   zParagraphFormat.keep_with_nextO   s   € à6;ˆŒ×$Ò$Ñ&Ô&Ô3Ð3Ð3r   c                 ó0   — | j         j        }|€dS |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ÔˆØˆ;Ø�4ØŒ|Ðr   c                 óF   — | j                              ¦   «         }||_        d S r   )r   r   r)   r   s      r   r*   zParagraphFormat.left_indenta   s    € àŒm×*Ò*Ñ,Ô,ˆØˆŒˆˆr   c                 ób   — | j         j        }|€dS |                      |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   s4   € ð ŒmÔˆØˆ;Ø�4Ø×!Ò! #Ô"2°CÔ4HÑIÔIÐIr   c                 óR  — | j                              ¦   «         }|€d |_        d |_        d S t	          |t
          ¦  «        r1||_        |j        t          j        k    rt          j        |_        d S d S t          |t          d¦  «        z  ¦  «        |_        t          j        |_        d S )Néð   )r   r   r.   r/   Ú
isinstancer   r   ÚAT_LEASTÚEXACTLYr   r   ÚMULTIPLEr   s      r   r0   zParagraphFormat.line_spacingw   s£   € àŒm×*Ò*Ñ,Ô,ˆØˆ=Ø#ˆCÔØ#'ˆCÔ Ð Ð Ý˜�vÑ&Ô&ð 	<Ø$ˆCÔØÔ#¥Ô'?Ò?Ð?Ý'6Ô'>�Ô$Ð$Ð$ð @Ð?õ  # 5­5°©:¬:Ñ#5Ñ6Ô6ˆCÔÝ#2Ô#;ˆCÔ Ð Ð r   c                 ób   — | j         j        }|€dS |                      |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…   s4   € ð ŒmÔˆØˆ;Ø�4Ø×&Ò& sÔ'7¸Ô9MÑNÔNÐNr   c                 ó�  — | j                              ¦   «         }|t          j        k    r't	          d¦  «        |_        t          j        |_        d S |t          j        k    r't	          d¦  «        |_        t          j        |_        d S |t          j	        k    r't	          d¦  «        |_        t          j        |_        d S ||_        d S )Nr2   éh  éà  )
r   r   r   ÚSINGLEr   r.   r6   r/   ÚONE_POINT_FIVEÚDOUBLEr   s      r   r9   z!ParagraphFormat.line_spacing_rule“   sª   € àŒm×*Ò*Ñ,Ô,ˆØ•OÔ*Ò*Ð*Ý$ S™zœzˆCÔÝ#2Ô#;ˆCÔ Ð Ð Ø•oÔ4Ò4Ð4Ý$ S™zœzˆCÔÝ#2Ô#;ˆCÔ Ð Ð Ø•oÔ,Ò,Ð,Ý$ S™zœzˆCÔÝ#2Ô#;ˆCÔ Ð Ð à#(ˆCÔ Ð Ð r   c                 ó0   — | j         j        }|€dS |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ÔˆØˆ;Ø�4ØÔ&Ð&r   c                 óB   — || j                              ¦   «         _        d S r   )r   r   rA   r"   s     r   rB   z!ParagraphFormat.page_break_before®   s   € à=BˆŒ×$Ò$Ñ&Ô&Ô:Ð:Ð:r   c                 ó0   — | j         j        }|€dS |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ÔˆØˆ;Ø�4ØŒ}Ðr   c                 óF   — | j                              ¦   «         }||_        d S r   )r   r   rE   r   s      r   rF   zParagraphFormat.right_indentÀ   s    € àŒm×*Ò*Ñ,Ô,ˆØˆŒˆˆr   c                 ó0   — | j         j        }|€dS |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ÔˆØˆ;Ø�4ØÔ Ð r   c                 óB   — || j                              ¦   «         _        d S r   )r   r   rI   r"   s     r   rJ   zParagraphFormat.space_afterÓ   r#   r   c                 ó0   — | j         j        }|€dS |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ÔˆØˆ;Ø�4ØÔ!Ð!r   c                 óB   — || j                              ¦   «         _        d S r   )r   r   rM   r"   s     r   rN   zParagraphFormat.space_beforeå   s   € à8=ˆŒ×$Ò$Ñ&Ô&Ô5Ð5Ð5r   c                 óR   — | 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×*Ò*Ñ,Ô,ˆÝ˜‰}Œ}Ðr   c                 ó0   — | j         j        }|€dS |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ÔˆØˆ;Ø�4ØÔ#Ð#r   c                 óB   — || j                              ¦   «         _        d S r   )r   r   rS   r"   s     r   rT   zParagraphFormat.widow_controlü   s   € à:?ˆŒ×$Ò$Ñ&Ô&Ô7Ð7Ð7r   c                 óR   — | €dS |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   s4   € ð ÐØ�4Ø�Ô7Ò7Ð7Ø¥" R¡&¤&Ñ(Ð(ØÐr   c                 óà   — |t           j        k    r]| 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  se   € ð •Ô/Ò/Ð/Ø•u˜S‘z”zÒ!Ð!Ý&Ô-Ð-Ø•u˜S‘z”zÒ!Ð!Ý&Ô5Ð5Ø•u˜S‘z”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      s5  € € € € € ðBð Bð ð
ð 
ñ „Xð
ð Ôðð ñ Ôðð ð%ð %ñ „Xð%ð Ôð&ð &ñ Ôð&ð ð	!ð 	!ñ „Xð	!ð Ôð=ð =ñ Ôð=ð ð ð  ñ „Xð ð Ôð<ð <ñ Ôð<ð ðð ñ „Xðð Ôðð ñ Ôðð ðJð Jñ „XðJð  Ôð<ð <ñ Ôð<ð ðOð Oñ „XðOð Ôð)ð )ñ Ôð)ð ð	'ð 	'ñ „Xð	'ð ÔðCð Cñ ÔðCð ðð ñ „Xðð Ôðð ñ Ôðð ð!ð !ñ „Xð!ð Ôð=ð =ñ Ôð=ð ð"ð "ñ „Xð"ð Ôð>ð >ñ Ôð>ð ðð ñ „\ðð ð	$ð 	$ñ „Xð	$ð Ôð@ð @ñ Ôð@ð ðð ñ „\ðð ðð ñ „\ðð ð 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Ð JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JØ 'Ð 'Ð 'Ð 'Ð 'Ð 'ðVð Vð Vð Vð V�lñ Vô Vð Vð Vð Vr   