o
    ðäj®  ã                   @   s`   d dl mZmZmZmZ d dlmZ d dlmZ d dl	m
Z
 G dd„ dƒZG dd„ deeƒZd	S )
é    )ÚBoolÚStringÚAliasÚInteger)ÚSerialisable)ÚBase64Binary)Úhash_passwordc                   @   s4   e Zd ZdZd	dd„Zedd„ ƒZejdd„ ƒZdS )
Ú
_ProtectedNÚ Fc                 C   s   |st |ƒ}|| _dS )zSet a password on this sheet.N)r   Ú	_password©ÚselfÚvalueÚalready_hashed© r   úa/var/www/ticemtrilhas/avaliacao_env/lib/python3.10/site-packages/openpyxl/worksheet/protection.pyÚset_password   s   
z_Protected.set_passwordc                 C   ó   | j S )z.Return the password value, regardless of hash.)r   ©r   r   r   r   Úpassword   s   z_Protected.passwordc                 C   s   |   |¡ dS )z-Set a password directly, forcing a hash step.N)r   )r   r   r   r   r   r      s   ©r
   F)Ú__name__Ú
__module__Ú__qualname__r   r   Úpropertyr   Úsetterr   r   r   r   r	      s    

r	   c                       sè   e Zd ZdZdZeƒ ZedƒZeƒ Z	eƒ Z
eƒ Zeƒ Zeƒ Zeƒ Zeƒ Zeƒ Zeƒ Zeƒ Zeƒ Zeƒ Zeƒ Zeƒ Zeƒ Zedd�Zedd�Zedd�Zedd�ZdZ						dd	d
„Z d‡ fdd„	Z!dd„ Z"dd„ Z#dd„ Z$‡  Z%S )ÚSheetProtectionzâ
    Information about protection of various aspects of a sheet. True values
    mean that protection for the object or action is active This is the
    **default** when protection is active, ie. users cannot do something
    ÚsheetProtectionÚsheetT)Ú
allow_none)ÚselectLockedCellsÚselectUnlockedCellsÚalgorithmNamer   ÚobjectsÚ
insertRowsÚinsertHyperlinksÚ
autoFilterÚ	scenariosÚformatColumnsÚdeleteColumnsÚinsertColumnsÚpivotTablesÚ
deleteRowsÚformatCellsÚ	saltValueÚ
formatRowsÚsortÚ	spinCountr   Ú	hashValueFNc                 C   sŠ   || _ || _|| _|| _|| _|| _|| _|| _|	| _|
| _	|| _
|| _|| _|| _|| _|| _|d ur7|| _|| _|| _|| _|| _d S ©N)r   r#   r'   r-   r(   r/   r*   r$   r%   r)   r,   r    r!   r0   r&   r+   r   r"   r.   r1   r2   )r   r   r#   r'   r-   r/   r(   r*   r$   r%   r)   r,   r    r!   r0   r&   r+   r   r"   r.   r1   r2   r   r   r   Ú__init__K   s,   
zSheetProtection.__init__r
   c                    s   t ƒ  ||¡ |  ¡  d S r3   )Úsuperr   Úenabler   ©Ú	__class__r   r   r   i   s   zSheetProtection.set_passwordc                 C   ó
   d| _ d S )NT©r   r   r   r   r   r6   n   ó   
zSheetProtection.enablec                 C   r9   )NFr:   r   r   r   r   Údisabler   r;   zSheetProtection.disablec                 C   r   r3   r:   r   r   r   r   Ú__bool__v   s   zSheetProtection.__bool__)FFFTTTTTTTTFFTTTNNNNNr   )&r   r   r   Ú__doc__Útagnamer   r   r   Úenabledr#   r'   r-   r(   r/   r*   r$   r%   r)   r,   r    r!   r0   r&   r+   r   r.   r   r1   r   r"   r2   Ú	__attrs__r4   r   r6   r<   r=   Ú__classcell__r   r   r7   r   r   $   sH    




ûr   N)Úopenpyxl.descriptorsr   r   r   r   Ú!openpyxl.descriptors.serialisabler   Úopenpyxl.descriptors.excelr   Úopenpyxl.utils.protectionr   r	   r   r   r   r   r   Ú<module>   s   