HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/docx/oxml/__pycache__/table.cpython-310.pyc
o

$we1l�@s�dZddlmZddlmZmZmZddlmZm	Z	ddl
mZddlm
Z
mZddlmZddlmZmZmZmZmZdd	lmZmZmZmZmZmZmZdd
lm Z m!Z!erdddl"m#Z#ddlm$Z$Gd
d�de�Z%Gdd�de�Z&Gdd�de�Z'Gdd�de�Z(Gdd�de�Z)Gdd�de�Z*Gdd�de�Z+Gdd�de�Z,Gdd�de�Z-Gdd �d e�Z.Gd!d"�d"e�Z/Gd#d$�d$e�Z0Gd%d&�d&e�Z1d'S)(z"Custom element classes for tables.�)�annotations)�
TYPE_CHECKING�Callable�List)�WD_CELL_VERTICAL_ALIGNMENT�WD_ROW_HEIGHT_RULE)�InvalidSpanError)�nsdecls�qn)�	parse_xml)�ST_Merge�ST_TblLayoutType�ST_TblWidth�ST_TwipsMeasure�XsdInt)�BaseOxmlElement�
OneAndOnlyOne�	OneOrMore�OptionalAttribute�RequiredAttribute�
ZeroOrMore�	ZeroOrOne)�Emu�Twips)�CT_P)�Lengthc@s$eZdZdZede�Zede�ZdS)�	CT_HeightzFUsed for ``<w:trHeight>`` to specify a row height and row height rule.�w:valzw:hRuleN)	�__name__�
__module__�__qualname__�__doc__rr�valr�hRule�r$r$�H/home/arjun/projects/env/lib/python3.10/site-packages/docx/oxml/table.pyr"s
rc@s�eZdZdZed�Zed�Zed�Zdd�Z	e
dd��Ze
d	d
��Zej
dd
��Ze
dd
��Zej
dd
��Zdd�Zdd�Zdd�ZdS)�CT_Rowz``<w:tr>`` element.z	w:tblPrExzw:trPrzw:tccCsFd}|jD]}||kr|S||j7}||krtd|��qtd��)z�The ``<w:tc>`` element appearing at grid column `idx`.

        Raises |ValueError| if no ``w:tc`` element begins at that grid column.
        rzno cell on grid column %dzindex out of bounds)�tc_lst�	grid_span�
ValueError)�self�idx�grid_col�tcr$r$r%�tc_at_grid_col0s

�zCT_Row.tc_at_grid_colcC�|��j�|�S)zSThe index of this ``<w:tr>`` element within its parent ``<w:tbl>``
        element.)�	getparent�tr_lst�index�r*r$r$r%�tr_idx>�z
CT_Row.tr_idxcC�|j}|dur	dS|jS)zJReturn the value of `w:trPr/w:trHeight@w:hRule`, or |None| if not present.N)�trPr�trHeight_hRule�r*r7r$r$r%r8D�zCT_Row.trHeight_hRulecC�|��}||_dS�N)�get_or_add_trPrr8�r*�valuer7r$r$r%r8L�
cCr6)zHReturn the value of `w:trPr/w:trHeight@w:val`, or |None| if not present.N)r7�trHeight_valr9r$r$r%rAQr:zCT_Row.trHeight_valcCr;r<)r=rAr>r$r$r%rAYr@cCs|�d|�dS�Nr��insert)r*�tblPrExr$r$r%�_insert_tblPrEx^szCT_Row._insert_tblPrExcCs,|j}|dur|�|�dS|�d|�dSrB)rE�addnextrD)r*r7rEr$r$r%�_insert_trPraszCT_Row._insert_trPrcC�t��Sr<)�CT_Tc�newr3r$r$r%�_new_tch�zCT_Row._new_tcN)rrr r!rrEr7rr-r.�propertyr4r8�setterrArFrHrLr$r$r$r%r&)s&




r&c@s�eZdZdZed�Zed�Zed�Ze	dd��Z
e
jdd��Z
e	dd	��Zd
d�Z
ed!dd��Ze	dd��Zejdd��Zed"dd��Zedd��Zedd��Zedd��Zd S)#�CT_Tblz``<w:tbl>`` element.zw:tblPrz	w:tblGridzw:trcC�|jj}|dur
dS|jS)z�Value of `w:tblPr/w:bidiVisual/@w:val` or |None| if not present.

        Controls whether table cells are displayed right-to-left or left-to-right.
        N)�tblPr�
bidiVisualr")r*rSr$r$r%�bidiVisual_valsszCT_Tbl.bidiVisual_valcCs(|j}|dur
|��dS||��_dSr<)rR�_remove_bidiVisual�get_or_add_bidiVisualr")r*r?rRr$r$r%rT~scCst|jj�S)z)The number of grid columns in this table.)�len�tblGrid�gridCol_lstr3r$r$r%�	col_count�szCT_Tbl.col_countccs$�|jD]}|jD]}|Vq	qdS)z�Generate each of the `w:tc` elements in this table, left to right and top to
        bottom.

        Each cell in the first row is generated, followed by each cell in the second
        row, etc.
        N)r1r')r*�trr-r$r$r%�iter_tcs�s�

��zCT_Tbl.iter_tcs�rows�int�cols�widthr�returncCst|�|||��S)z�Return a new `w:tbl` element having `rows` rows and `cols` columns.

        `width` is distributed evenly between the columns.
        )r�_tbl_xml)�clsr]r_r`r$r$r%�new_tbl�szCT_Tbl.new_tblcCrQ)zYValue of `w:tblPr/w:tblStyle/@w:val` (a table style id) or |None| if not
        present.N)rR�tblStyler"�r*rer$r$r%�tblStyle_val�szCT_Tbl.tblStyle_valcCs(|j}|��|dur
dS||��_dS)z�Set the value of `w:tblPr/w:tblStyle/@w:val` (a table style id) to `styleId`.

        If `styleId` is None, remove the `w:tblStyle` element.
        N)rR�_remove_tblStyle�
_add_tblStyler")r*�styleIdrRr$r$r%rg�s
�strcCs@|dkr
t||�ntd�}dtd�|�||�|�|||�fS)Nrz�<w:tbl %s>
  <w:tblPr>
    <w:tblW w:type="auto" w:w="0"/>
    <w:tblLook w:firstColumn="1" w:firstRow="1"
               w:lastColumn="0" w:lastRow="0" w:noHBand="0"
               w:noVBand="1" w:val="04A0"/>
  </w:tblPr>
%s%s</w:tbl>
�w)rr	�_tblGrid_xml�_trs_xml)rcr]r_r`�	col_widthr$r$r%rb�s
��zCT_Tbl._tbl_xmlcCs,d}t|�D]	}|d|j7}q|d7}|S)Nz  <w:tblGrid>
z    <w:gridCol w:w="%d"/>
z  </w:tblGrid>
��range�twips�rcrZro�xml�ir$r$r%rm�s
zCT_Tbl._tblGrid_xmlcCs*d}t|�D]}|d|�||�7}q|S)N�z  <w:tr>
%s  </w:tr>
)rq�_tcs_xml)rc�	row_countrZrortrur$r$r%rn�s
�zCT_Tbl._trs_xmlcCs$d}t|�D]	}|d|j7}q|S)Nrvzj    <w:tc>
      <w:tcPr>
        <w:tcW w:type="dxa" w:w="%d"/>
      </w:tcPr>
      <w:p/>
    </w:tc>
rprsr$r$r%rw�s�zCT_Tbl._tcs_xmlN)r]r^r_r^r`rrarP)r]r^r_r^r`rrark)rrr r!rrRrXrr[rNrTrOrZr\�classmethodrdrgrbrmrnrwr$r$r$r%rPls4







rPc@seZdZdZeddd�ZdS)�
CT_TblGridzw``<w:tblGrid>`` element, child of ``<w:tbl>``, holds ``<w:gridCol>`` elements
    that define column count, width, etc.z	w:gridCol)zw:tblGridChange��
successorsN)rrr r!r�gridColr$r$r$r%rz�srzc@s&eZdZdZede�Zedd��ZdS)�
CT_TblGridColzJ``<w:gridCol>`` element, child of ``<w:tblGrid>``, defines a table column.�w:wcCr/)z\The index of this ``<w:gridCol>`` element within its parent ``<w:tblGrid>``
        element.)r0rYr2r3r$r$r%�gridCol_idx�r5zCT_TblGridCol.gridCol_idxN)	rrr r!rrrlrNr�r$r$r$r%r~�s

r~c@�eZdZdZede�ZdS)�CT_TblLayoutTypez|``<w:tblLayout>`` element, specifying whether column widths are fixed or can be
    automatically adjusted based on content.�w:typeN)rrr r!rr
�typer$r$r$r%r��sr�c@s�eZdZdZdZededd�d�Zededd�d�Zed	ed
d�d�Zededd�d�Z	[e
d
d��Zejdd��Ze
ddd��Z
e
jddd��Z
e
dd��Zejdd��ZdS)�CT_TblPrz}``<w:tblPr>`` element, child of ``<w:tbl>``, holds child elements that define
    table properties such as style and borders.)�
w:tblStylezw:tblpPrzw:tblOverlap�w:bidiVisualzw:tblStyleRowBandSizezw:tblStyleColBandSizezw:tblW�w:jc�w:tblCellSpacingzw:tblIndzw:tblBorders�w:shd�w:tblLayoutzw:tblCellMarz	w:tblLookzw:tblCaptionzw:tblDescriptionz
w:tblPrChanger��Nr{r��r��r��
cCr6)z�Member of :ref:`WdRowAlignment` enumeration or |None|, based on the contents
        of the `w:val` attribute of `./w:jc`.

        |None| if no `w:jc` element is present.
        N)�jcr")r*r�r$r$r%�	alignment�zCT_TblPr.alignmentcCs&|��|dur
dS|��}||_dSr<)�
_remove_jc�
get_or_add_jcr")r*r?r�r$r$r%r�+s

ra�boolcCs|j}|dur	dS|jdkS)zg|False| when there is a `w:tblLayout` child with `@w:type="fixed"`.

        Otherwise |True|.
        NT�fixed)�	tblLayoutr�)r*r�r$r$r%�autofit3szCT_TblPr.autofitr?cCs |��}|rd|_dSd|_dS)Nr�r�)�get_or_add_tblLayoutr�)r*r?r�r$r$r%r�<scCr6)ziReturn the value of the ``val`` attribute of the ``<w:tblStyle>`` child or
        |None| if not present.N)rer"rfr$r$r%�styleA�zCT_TblPr.stylecCs$|��|dur
dS|j|d�dS)N)r")rhri�r*r?r$r$r%r�Js)rar�)r?r�)rrr r!�_tag_seqrrerSr�r�rNr�rOr�r�r$r$r$r%r�s(


r�c@s>eZdZdZede�Zede�Ze	dd��Z
e
jdd��Z
dS)�CT_TblWidthzeUsed for ``<w:tblW>`` and ``<w:tcW>`` elements and many others, to specify a
    table-related width.rr�cCs|jdkrdSt|j�S)zbReturn the EMU length value represented by the combined ``w:w`` and
        ``w:type`` attributes.�dxaN)r�rrlr3r$r$r%r`\s

zCT_TblWidth.widthcCsd|_t|�j|_dS)Nr�)r�rrrrlr�r$r$r%r`dsN)rrr r!rrrlrr�rNr`rOr$r$r$r%r�Rs


r�c@s�eZdZUdZded<ded<ded<ded	<ed
�Zed�Zed�Z	e
d
d��Zdd�Ze
dd��Z
e
jdd��Z
e
dSdd��Zdd�Ze
dd��Zdd�Zedd��Ze
d d!��Ze
d"d#��Ze
d$d%��Zejd&d%��Ze
d'd(��Zejd)d(��Zd*d+�Ze
d,d-��ZdTd/d0�Zd1d2�Ze
d3d4��Zd5d6�Zd7d8�Ze
d9d:��Z d;d<�Z!d=d>�Z"d?d@�Z#dAdB�Z$dCdD�Z%e
dEdF��Z&e
dGdH��Z'e
dIdJ��Z(e
dKdL��Z)e
dMdN��Z*e
dOdP��Z+e
dQdR��Z,d.S)UrJz`w:tc` table cell element.zCallable[[], CT_P]�add_pz
List[CT_P]�p_lstzList[CT_Tbl]�tbl_lstzCallable[[CT_Tbl], CT_Tbl]�_insert_tblzw:tcPr�w:p�w:tblcCs4|jdur|j}|dur|jtjkr|jS|jdS)z�The row index that marks the bottom extent of the vertical span of this cell.

        This is one greater than the index of the bottom-most row of the span, similar
        to how a slice of the cell's rows would be specified.
        Nr�)�vMerge�	_tc_belowr�CONTINUE�bottom�_tr_idx)r*�tc_belowr$r$r%r�ws


zCT_Tc.bottomcCs,g}|j}|dur|�|�||dd�<dS)aMRemove all content child elements, preserving the ``<w:tcPr>`` element if
        present.

        Note that this leaves the ``<w:tc>`` element in an invalid state because it
        doesn't contain at least one block-level element. It's up to the caller to add a
        ``<w:p>``child element as the last content element.
        N)�tcPr�append)r*�new_childrenr�r$r$r%�
clear_content�s

zCT_Tc.clear_contentcC�|j}|dur	dS|jS)zzThe integer number of columns this cell spans.

        Determined by ./w:tcPr/w:gridSpan/@val, it defaults to 1.
        Nr�)r�r(�r*r�r$r$r%r(��zCT_Tc.grid_spancCr;r<)�get_or_add_tcPrr(�r*r?r�r$r$r%r(�r@ra�List[CT_P | CT_Tbl]cCs
|�d�S)z�Generate all `w:p` and `w:tbl` elements in this document-body.

        Elements appear in document order. Elements shaded by nesting in a `w:ins` or
        other "wrapper" element will not be included.
        z./w:p | ./w:tbl��xpathr3r$r$r%�inner_content_elements�s
zCT_Tc.inner_content_elementsccs6�td�td�td�f}|D]
}|j|vr|VqdS)zpGenerate a reference to each of the block-level content elements in this
        cell, in the order they appear.r�r�zw:sdtN)r
�tag)r*�block_item_tags�childr$r$r%�iter_block_items�s�
��zCT_Tc.iter_block_itemscCs|jS)z?The grid column index at which this ``<w:tc>`` element appears.)�	_grid_colr3r$r$r%�left�sz
CT_Tc.leftcCs4|�|�\}}}}|jj|�|�}|�||�|S)z�Return the top-left ``<w:tc>`` element of a new span formed by merging the
        rectangular region defined by using this tc element and `other_tc` as diagonal
        corners.)�_span_dimensions�_tblr1r.�_grow_to)r*�other_tc�topr��heightr`�top_tcr$r$r%�merge�szCT_Tc.mergecCstdtd��S)zhReturn a new ``<w:tc>`` element, containing an empty paragraph as the
        required EG_BlockLevelElt.z<w:tc %s>
  <w:p/>
</w:tc>rl)rr	)rcr$r$r%rK�r5z	CT_Tc.newcCs|j|jS)aThe grid column index that marks the right-side extent of the horizontal span
        of this cell.

        This is one greater than the index of the right-most column of the span, similar
        to how a slice of the cell's columns would be specified.
        )r�r(r3r$r$r%�right�szCT_Tc.rightcCs$|jdus|jtjkr|jS|jjS)z9The top-most row index in the vertical span of this cell.N)r�r�RESTARTr��	_tc_abover�r3r$r$r%r��sz	CT_Tc.topcCr6)zlThe value of the ./w:tcPr/w:vMerge/@val attribute, or |None| if the w:vMerge
        element is not present.N)r��
vMerge_valr�r$r$r%r��r�zCT_Tc.vMergecCr;r<)r�r�r�r$r$r%r��r@cCr6)zqReturn the EMU length value represented in the ``./w:tcPr/w:tcW`` child
        element or |None| if not present.N)r�r`r�r$r$r%r`�r�zCT_Tc.widthcCr;r<)r�r`r�r$r$r%r`�r@cCs(|jr|jr|j|j7_dSdSdS)z�Add the width of `other_tc` to this cell.

        Does nothing if either this tc or `other_tc` does not have a specified width.
        N)r`)r*r�r$r$r%�
_add_width_of�s�zCT_Tc._add_width_ofcCs2|j}|j�|�}|jd|�}tdd�|D��S)z*The grid column at which this cell begins.Ncss�|]}|jVqdSr<)r()�.0r-r$r$r%�	<genexpr>s�z"CT_Tc._grid_col.<locals>.<genexpr>)�_trr'r2�sum)r*r[r+�
preceding_tcsr$r$r%r��szCT_Tc._grid_colNcsT��fdd�}|dur
�n|}��||||���dkr(�j�|�d|�dSdS)z�Grow this cell to `width` grid columns and `height` rows by expanding
        horizontal spans and creating continuation cells to form vertical spans.cs |�urtjS�dkr
dStjS�Nr�)rr�r�)r��r�r*r$r%r�s
z"CT_Tc._grow_to.<locals>.vMerge_valNr�)�_span_to_widthr�r�)r*r`r�r�r�r$r�r%r�s�zCT_Tc._grow_tocCs|�d|�|S)z�``tcPr`` has a bunch of successors, but it comes first if it appears, so just
        overriding and using insert(0, ...) rather than spelling out successors.rrCr�r$r$r%�_insert_tcPrszCT_Tc._insert_tcPrcCs:t|���}t|�dkrdS|d}t|j�dkrdSdS)zATrue if this cell contains only a single empty ``<w:p>`` element.r�FrT)�listr�rW�r_lst)r*�block_items�pr$r$r%�	_is_emptyszCT_Tc._is_emptycCsH||urdS|jrdS|��|��D]}|�|�q|�|���dS)zoAppend the content of this cell to `other_tc`, leaving this cell with a
        single empty ``<w:p>`` element.N)r��_remove_trailing_empty_pr�r��_new_p)r*r��
block_elementr$r$r%�_move_content_to%szCT_Tc._move_content_tocCrIr<)rPrKr3r$r$r%�_new_tbl3rMzCT_Tc._new_tblcCs|�d�}|r|dSdS)zThe `w:tc` element immediately following this one in this row, or |None| if
        this is the last `w:tc` element in the row.z./following-sibling::w:tcrNr�)r*�
following_tcsr$r$r%�_next_tc6s
zCT_Tc._next_tccCs|���|�dS)z-Remove this `w:tc` element from the XML tree.N)r0�remover3r$r$r%�_remove=sz
CT_Tc._removecCsJt|���}|d}|jtd�krdS|}t|j�dkrdS|�|�dS)z[Remove the last content element from this cell if it is an empty ``<w:p>``
        element.���r�Nr)r�r�r�r
rWr�r�)r*r��last_content_elmr�r$r$r%r�AszCT_Tc._remove_trailing_empty_pcCspdd�}dd�}|||�|||�t|j|j�}t|j|j�}t|j|j�}t|j|j�}||||||fS)z�Return a (top, left, height, width) 4-tuple specifying the extents of the
        merged cell formed by using this tc and `other_tc` as opposite corner
        extents.cSsH|j|jkr|j|jkrtd��|j|jkr |j|jkr"td��dSdS�Nzrequested span not rectangular�r�r�rr�r�)�a�br$r$r%�raise_on_inverted_LRs
�z3CT_Tc._span_dimensions.<locals>.raise_on_inverted_LcSs�|j|jkr
||fn||f\}}|j|jkr |j|jkr td��|j|jkr*||fn||f\}}|j|jkr@|j|jkrBtd��dSdSr�r�)r�r��top_most�other�	left_mostr$r$r%�raise_on_tee_shapedXs  �z3CT_Tc._span_dimensions.<locals>.raise_on_tee_shaped)�minr�r��maxr�r�)r*r�r�r�r�r�r�r�r$r$r%r�Ms
	
zCT_Tc._span_dimensionscCs4|�|�|j|kr|�||�|j|ks
||_dS)aZIncorporate and then remove `w:tc` elements to the right of this one until
        this cell spans `grid_width`.

        Raises |ValueError| if `grid_width` cannot be exactly achieved, such as when a
        merged cell would drive the span width greater than `grid_width` or if not
        enough grid columns are available to make this cell that wide. All content from
        incorporated cells is appended to `top_tc`. The val attribute of the vMerge
        element on the single remaining cell is set to `vMerge`. If `vMerge` is |None|,
        the vMerge element is removed if present.
        N)r�r(�_swallow_next_tcr�)r*�
grid_widthr�r�r$r$r%r�ks



�
zCT_Tc._span_to_widthcsL��fdd�}�j}||�|�|���|��j|j7_|��dS)a�Extend the horizontal span of this `w:tc` element to incorporate the
        following `w:tc` element in the row and then delete that following `w:tc`
        element.

        Any content in the following `w:tc` element is appended to the content of
        `top_tc`. The width of the following `w:tc` element is added to this one, if
        present. Raises |InvalidSpanError| if the width of the resulting cell is greater
        than `grid_width` or if there is no next `<w:tc>` element in the row.
        cs,|durtd���j|j�krtd��dS)Nznot enough grid columnszspan is not rectangular)rr()�next_tc�r�r*r$r%�raise_on_invalid_swallow�s
�z8CT_Tc._swallow_next_tc.<locals>.raise_on_invalid_swallowN)r�r�r�r(r�)r*r�r�r�r�r$r�r%r�{s

zCT_Tc._swallow_next_tccC�|�d�dS)z+The tbl element this tc element appears in.z./ancestor::w:tbl[position()=1]rr�r3r$r$r%r���z
CT_Tc._tblcCs|j�|j�S)zAThe `w:tc` element immediately above this one in its grid column.)�	_tr_abover.r�r3r$r$r%r��r�zCT_Tc._tc_abovecCs|j}|dur	dS|�|j�S)z=The tc element immediately below this one in its grid column.N)�	_tr_belowr.r�)r*�tr_belowr$r$r%r��szCT_Tc._tc_belowcCr�)z*The tr element this tc element appears in.z./ancestor::w:tr[position()=1]rr�r3r$r$r%r��r�z	CT_Tc._trcCs0|jj}|�|j�}|dkrtd��||dS)z�The tr element prior in sequence to the tr this cell appears in.

        Raises |ValueError| if called on a cell in the top-most row.
        rzno tr above topmost trr�)r�r1r2r�r)�r*r1r4r$r$r%r��s
zCT_Tc._tr_abovecCs8|jj}|�|j�}z||dWStyYdSw)zzThe tr element next in sequence after the tr this cell appears in, or |None|
        if this cell appears in the last row.r�N)r�r1r2r��
IndexErrorr�r$r$r%r��s�zCT_Tc._tr_belowcCs|jj�|j�S)z;The row index of the tr element this tc element appears in.)r�r1r2r�r3r$r$r%r��sz
CT_Tc._tr_idx)rar�r<)-rrr r!�__annotations__rr�rr��tblrNr�r�r(rOr�r�r�r�ryrKr�r�r�r`r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r$r$r$r%rJjs�





	

	
















rJc@s�eZdZdZdZededd�d�Zededd�d�Zed	ed
d�d�Zededd�d�Z	[e
d
d��Zejdd��Ze
dd��Z
e
jdd��Z
e
dd��Zejdd��Ze
dd��Zejdd��ZdS)�CT_TcPrz5``<w:tcPr>`` element, defining table cell properties.)�
w:cnfStyle�w:tcW�
w:gridSpanzw:hMerge�w:vMergezw:tcBordersr�zw:noWrapzw:tcMarzw:textDirectionzw:tcFitText�w:vAlignz
w:hideMarkz	w:headersz	w:cellInsz	w:cellDelzw:cellMergezw:tcPrChanger�Nr{r�r�r�cCr�)zsThe integer number of columns this cell spans.

        Determined by ./w:gridSpan/@val, it defaults to 1.
        Nr�)�gridSpanr")r*rr$r$r%r(�r�zCT_TcPr.grid_spancCs"|��|dkr||��_dSdSr�)�_remove_gridSpan�get_or_add_gridSpanr"r�r$r$r%r(���cCr6)z�Value of `w:val` attribute on  `w:vAlign` child.

        Value is |None| if `w:vAlign` child is not present. The `w:val` attribute on
        `w:vAlign` is required.
        N)�vAlignr")r*rr$r$r%�
vAlign_val�r�zCT_TcPr.vAlign_valcCs"|dur
|��dS||��_dSr<)�_remove_vAlign�get_or_add_vAlignr"r�r$r$r%r
scCr6)zeThe value of the ./w:vMerge/@val attribute, or |None| if the w:vMerge element
        is not present.N)r�r")r*r�r$r$r%r�r�zCT_TcPr.vMerge_valcCs"|��|dur||��_dSdSr<)�_remove_vMerge�_add_vMerger"r�r$r$r%r�rcCr6)z�Return the EMU length value represented in the ``<w:tcW>`` child element or
        |None| if not present or its type is not 'dxa'.N)�tcWr`)r*rr$r$r%r`r�z
CT_TcPr.widthcCr;r<)�get_or_add_tcWr`)r*r?rr$r$r%r` r@)rrr r!r�rrrr�rrNr(rOr
r�r`r$r$r$r%r��s0







r�c@s^eZdZdZdZededd�d�Z[edd��Zej	d	d��Zed
d��Z
e
j	dd��Z
dS)
�CT_TrPrz4``<w:trPr>`` element, defining table row properties.)r�zw:divIdzw:gridBeforezw:gridAfterz	w:wBeforezw:wAfterzw:cantSplit�
w:trHeightzw:tblHeaderr�r�zw:hiddenzw:inszw:delzw:trPrChangerr�Nr{cCr6)zCReturn the value of `w:trHeight@w:hRule`, or |None| if not present.N)�trHeightr#�r*rr$r$r%r8=r:zCT_TrPr.trHeight_hRulecC�(|dur|jdurdS|��}||_dSr<)r�get_or_add_trHeightr#�r*r?rr$r$r%r8E�
cCr6)zAReturn the value of `w:trHeight@w:val`, or |None| if not present.N)rr"rr$r$r%rALr:zCT_TrPr.trHeight_valcCrr<)rrr"rr$r$r%rATr)rrr r!r�rrrNr8rOrAr$r$r$r%r&s


rc@r�)�
CT_VerticalJcz:`w:vAlign` element, specifying vertical alignment of cell.rN)rrr r!rrr"r$r$r$r%r\src@s eZdZdZedeejd�ZdS)�	CT_VMergezG``<w:vMerge>`` element, specifying vertical merging behavior of a cell.r)�defaultN)rrr r!rrr�r"r$r$r$r%rbsrN)2r!�
__future__r�typingrrr�docx.enum.tablerr�docx.exceptionsr�docx.oxml.nsr	r
�docx.oxml.parserr�docx.oxml.simpletypesrr
rrr�docx.oxml.xmlchemyrrrrrrr�docx.sharedrr�docx.oxml.text.paragraphrrrr&rPrzr~r�r�r�rJr�rrrr$r$r$r%�<module>s8$	C{Q__6