B
    ÔùÓ`Â  ã               @   s   G d d„ de ƒZdS )c               @   sh   e Zd ZdZddd„Zedd„ ƒZdd	„ Zd
d„ Zdd„ Z	dd„ Z
dd„ Zedd„ ƒZejdd„ ƒZdS )ÚCommentNéO   é�   c             C   s   || _ || _|| _|| _d S )N)ÚcontentÚauthorÚheightÚwidth)ÚselfÚtextr   r   r   © r
   ú>/tmp/pip-unpacked-wheel-zhp1095k/openpyxl/comments/comments.pyÚ__init__   s    zComment.__init__c             C   s   | j S )N)Ú_parent)r   r
   r
   r   Úparent   s    zComment.parentc             C   s   | j |j ko| j|jkS )N)r   r   )r   Úotherr
   r
   r   Ú__eq__   s    zComment.__eq__c             C   s   d  | j| j¡S )NzComment: {0} by {1})Úformatr   r   )r   r
   r
   r   Ú__repr__   s    zComment.__repr__c             C   s   |   | j| j| j| j¡}|S )z'Create a detached copy of this comment.)Ú	__class__r   r   r   r   )r   Úcloner
   r
   r   Ú__copy__   s    zComment.__copy__c             C   s@   |dk	r6| j dk	r6| j |kr6d}t| |j|jj¡ƒ‚|| _ dS )z3
        Bind comment to a particular cell
        Nz_Comment already assigned to {0} in worksheet {1}. Cannot assign a comment to more than one cell)r   ÚAttributeErrorr   Z
coordinater   Útitle)r   ÚcellÚfmtr
   r
   r   Úbind$   s    zComment.bindc             C   s
   d| _ dS )z.
        Unbind a comment from a cell
        N)r   )r   r
   r
   r   Úunbind.   s    zComment.unbindc             C   s   | j S )z>
        Any comment text stripped of all formatting.
        )r   )r   r
   r
   r   r	   5   s    zComment.textc             C   s
   || _ d S )N)r   )r   Úvaluer
   r
   r   r	   <   s    )r   r   )Ú__name__Ú
__module__Ú__qualname__r   r   Úpropertyr   r   r   r   r   r   r	   Úsetterr
   r
   r
   r   r      s   

r   N)Úobjectr   r
   r
   r
   r   Ú<module>   s    