#virtualBuffers/adobeAcrobat.py #A part of NonVisual Desktop Access (NVDA) #This file is covered by the GNU General Public License. #See the file COPYING for more details. #Copyright (C) 2009-2012 NV Access Limited, Aleksey Sadovoy from . import VirtualBuffer, VirtualBufferTextInfo import browseMode import controlTypes import NVDAObjects.IAccessible from NVDAObjects.IAccessible.adobeAcrobat import normalizeStdName, AcrobatNode import winUser import IAccessibleHandler import oleacc from logHandler import log import textInfos import languageHandler class AdobeAcrobat_TextInfo(VirtualBufferTextInfo): def _normalizeControlField(self,attrs): stdName = attrs.get("acrobat::stdname", "") try: role, level = normalizeStdName(stdName) except LookupError: role, level = None, None if not role: accRole=attrs['IAccessible::role'] if accRole.isdigit(): accRole=int(accRole) else: accRole = accRole.lower() role=IAccessibleHandler.IAccessibleRolesToNVDARoles.get(accRole,controlTypes.ROLE_UNKNOWN) states=set(IAccessibleHandler.IAccessibleStatesToNVDAStates[x] for x in [1<