+
    Qi`  c                  s    R t ^ RIHt RtRtRtRtRt^ RIH	t	 ^ RI
Ht ^ R	I
Ht ^ R
I
Ht ^ RIHt ^ RIHt ^ RIHt ]	'       d$   ^ RIt]P*                  ! RR4       ^ RIHt ^ RIHt  ! R R]P4                  4      tR# )1Customized support for spellcheck in LibreOffice.)annotationsz$Id$z
$Revision$z$Date$zCopyright (c) 2015 Igalia, S.L.ZLGPL)TYPE_CHECKING)debug)messages)
spellcheck)AXObject)AXText)AXUtilitiesNAtspiz2.0)r	   )defaultc                  sn   a  ] tR t^1tRtR V 3R lltR R ltR R ltR R	 ltR
 R lt	R R lt
RtV ;t# )
SpellCheckr    c                    V ^8  d   QhRRRR/# )   scriptzdefault.ScriptreturnZNone Zformat   "I/usr/lib/python3.14/site-packages/orca/scripts/apps/soffice/spellcheck.py__annotate__SpellCheck.__annotate__4   s     , ,~ ,$ ,    c                	s8   < \         SV `  VR R7       / V n        R# )F)Zhas_change_to_entryN)Zsuper__init___windows)selfr   	__class__s   &&r   r   ZSpellCheck.__init__4   s    U;)+r   c               s     V ^8  d   QhRRRR/# )r   rootzAtspi.Accessible | Noner   r   r   r   r   r   r   8   s      D D'> DCZ Dr   c                	s    Vf   R # \         P                  ! V4      '       d   V# V P                  \        P                  ! V^ 4      4      # )N)r   Z	is_dialog_find_child_dialogr   Z	get_child)r   r   s   &&r   r   ZSpellCheck._find_child_dialog8   s>    <  &&K&&x'9'9$'BCCr   c               r   )r   windowAtspi.Accessibler   boolr   r   r   r   r   r   A   s     ! !+; ! !r   c                	s   \         P                  ! V4      '       d.   R VR.p\        P                  ! \        P                  VR4       R# V P
                  P                  \        V4      4      pVe/   R VRV.p\        P                  ! \        P                  VR4       V# V P                  V4      pV'       gF   RV P
                  \        V4      &   R VR.p\        P                  ! \        P                  VR4       R# \         P                  ! V\        P                  4      e^   RV P
                  \        V4      &   RV P
                  \        V4      &   R VR.p\        P                  ! \        P                  VR4       R# \         P                  ! V\        P                  4      RJpR VRV.p\        P                  ! \        P                  VR4       W0P
                  \        V4      &   V# )	zSOFFICE SPELL CHECK:z+is not spellcheck window because it's dead.TFNzis spellcheck window:z:is not spellcheck window because the dialog was not found.z;is not spellcheck dialog because a page tab list was found.z2is spellcheck dialog based on combobox descendant:)r   Zis_deadr   print_tokens
LEVEL_INFOr   getZhashr   Zfind_descendantr   Zis_page_tab_listZis_combo_box)r   r   tokensZrvZdialogs   &&   r   _is_candidate_windowZSpellCheck._is_candidate_windowA   s   F##,f6cdFu//>]]tF|,>,f6MrRFu//>I((0*/DMM$v,',fRTFu//>##FK,H,HIU*/DMM$v,'*/DMM$v,',fSUFu//>%%fk.F.FGtS(&FL5++VT:&(d6l#	r   c               r   )r   objr   r   r   r   r   r   r   r   r   d   s     	P 	P$4 	P 	Pr   c                	s~   \         P                  ! V4      pVP                  4       P                  R 4      '       d2   RVRV R2.p\        P
                  ! \        P                  VR4       R# \         P                  ! V4      '       g   R# \        P                  ! V4      ;'       d    \        P                  ! V4      # )ZerrorzSPELL CHECK:z
with id: 'z' is the error widgetTF)r   Zget_accessible_idZlowerZ
startswithr   r    r!   Zsupports_editable_textr   Zis_focusableZis_multi_line)r   r%   Zobj_idr#   s   &&  r   _is_error_widgetZSpellCheck._is_error_widgetd   s    ++C0<<>$$W--$cZx?T+UVFu//>..s33'',OO1J1J31OOr   c                   V ^8  d   QhRR/# )r   r   Zstrr   r   r   r   r   r   o   s     	 	S 	r   c                	sr   \         P                  ! V P                  4      p^ Rr2^ Tu;8:  d   V8  d   M V# \         P                  ! V P                  V4      w  rEpVP	                  RR4      P                  RR4      R8X  d"   \         P                  ! V P                  WV4      # \        Wb^,           4      pK  V# )i    Z zfg-colorZ z255,0,0)r   Zget_character_count_error_widgetZget_text_attributes_at_offsetr"   ZreplaceZget_substringZmax)r   ZlengthZoffsetstringZattrsZstartZends   &      r   get_misspelled_wordZSpellCheck.get_misspelled_wordo   s    ++D,>,>?B6"F"  !' D DTEWEWY_ `E#yyR(00b9YF++D,>,>KKqj)Fr   c               r'   )r   r   r   r   r   r   r   r   r   z   s       r   c                	s<   V P                  4       '       g   R # \        P                  ! V P                  4      pV'       g   R # \        P
                  V,          pV P                  P                  P                  VR7      pV P                  P                  W#R7       R# )F)r)   )voiceT)
Z	is_activer   Zget_all_textr(   r   ZMISSPELLED_WORD_CONTEXTZ_scriptZspeech_generatorr+   Zspeak_message)r   r)   Zmsgr+   s   &   r   present_contextZSpellCheck.present_contextz   ss    ~~$$T%7%78..7--3333?""3"4r   )r   )Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__r   r   r$   r&   r*   r,   Z__static_attributes__Z__classcell__)r   s   @r   r   r   1   s1    ;, ,D!F	P	 r   r   )r-   Z
__future__r   Z__id__Z__version__Z__date__Z__copyright__Z__license__Ztypingr   Zorcar   r   r   Zorca.ax_objectr   Zorca.ax_textr   Zorca.ax_utilitiesr   ZgiZrequire_versionZgi.repositoryr	   Zorca.scriptsr
   r   r   r   r   <module>r.      sk   . 8 "	1      #  )w&#$T&& Tr   