%PDF- %PDF-
Direktori : /lib/python3/dist-packages/orca/scripts/apps/soffice/__pycache__/ |
Current File : //lib/python3/dist-packages/orca/scripts/apps/soffice/__pycache__/speech_generator.cpython-312.pyc |
� g f26 � �� � d Z dZdZdZdZdZddlZ ej dd � dd lm Z ddl mZ ddlm Z ddlmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ G d� dej4 � Zy)z,Custom script for StarOffice and OpenOffice.z$Id$z $Revision$z$Date$z-Copyright (c) 2005-2009 Sun Microsystems Inc.�LGPL� N�Atspiz2.0)r )�AXComponent)�AXObject)�AXTable)�AXText)�AXUtilitiesc � � � e Zd Zd� Zd� Z� fd�Z� fd�Z� fd�Zd� Zd� Z � fd�Z d � Zd � Zd� Z � fd�Z� fd �Z� fd�Z� fd�Z� fd�Z� fd�Z� xZS )�SpeechGeneratorc �D � t j j | |� y �N)�speech_generatorr �__init__)�self�scripts �L/usr/lib/python3/dist-packages/orca/scripts/apps/soffice/speech_generator.pyr zSpeechGenerator.__init__+ s � ��(�(�1�1�$��?� c �~ � g }| j j j |� xs d}|s<| j j j t j |� � xs d}|rQ|j |j � � |j | j t j fd|i|��� |S )a Returns the label for an object as an array of strings (and possibly voice and audio specifications). The label is determined by the displayedLabel method of the script utility, and an empty array will be returned if no label can be found. � �obj)�_script� utilities�displayedLabelr � get_parent�append�strip�extend�voicer �DEFAULT)r r �args�result�labels r �_generateLabelzSpeechGenerator._generateLabel. s� � � �����&�&�5�5�c�:�@�b����L�L�*�*�9�9�(�:M�:M�c�:R�S�Y�WY�E���M�M�%�+�+�-�(��M�M�*�$�*�*�%5�%=�%=�O�3�O�$�O�P�� r c �� �� t j |� rJt j |� g}|j | j t j fd|i|��� |S t �| � |fi |��S )a� Returns an array of strings for use by speech and braille that represent the name of the object. If the object is directly displaying any text, that text will be treated as the name. Otherwise, the accessible name of the object will be used. If there is no accessible name, then the description of the object will be used. This method will return an empty array if nothing can be found. r )r �get_namer r r r �super� _generateName)r r r r! � __class__s �r r'