nvda
38d28f9c - Allow access to Microsoft Word documents via UIAutomation, providing a significant speed improvement, and ability to access documents when in-process injection is impossible. (#7849)

Commit
7 years ago
Allow access to Microsoft Word documents via UIAutomation, providing a significant speed improvement, and ability to access documents when in-process injection is impossible. (#7849) * Add support for table navigation (control+alt+arrows) to MS word with UIA support, by abstracting existing browseMode table navigation code even further. Specifically: Add a new documentBase module which contains: * TextContainerObject, which is an object that can make a textInfo. It contains a TextInfo class property, as well as makeTextInfo, and selection getter and setter. This is now inherited by NVDAObject and documentTreeInterceptor. * DocumentWithTableNavigation: a TextContainerObject that contains table navigation scripts, implemented by abstraction table code that used to exist in browseMode. Now BrowseModeDocument inherits from this. UIABrowseModeDocument's _getTableCellAt was moved into its own UIADocumentWithTableNavigation class, which UIABrowseModeDocument now inherits from, and so dos the UIA WordDocument NVDAObject class, thus now giving UIA word document support table navigation outside browse mode. * Allow browse mode in Microsoft Word using UIA * UIATextInfo: detect spelling errors when they are a part of multiple annotation types, such as for Microsoft Word. UIATextInfo: support reporting of comments. UIATextInfo: support reporting of style name (E.g. Microsoft Word styles) UIATextInfo: report insertion and deletion revisions (Though Edge and MS Word don't seem to implement this yet). UIATextInfo: report linespacing. * UIA WordDocumentTextInfo: announce lists correctly and stop announcing edit in tables of contents. UIA wordDocumentTextInfo: support page numbers. UIA Word document support: Always at least split by unit format when fetching formatting. Fetching formatting for the entire text chunk may not be good as some annotationTypes such as spelling return valid results for the total range, and therefore do not give the greatest resolution UIA WordDocumentTextInfo: remove som old code that detected annoying editable text nodes which no longer works. UIA word document: report existance of footnotes and endnotes within text. UIA WordDocument: add reportCurrentComment script * Move some Windows Winword NVDAObject stuff into IAccessible WinWord NVDAObject. Use UIA with Microsoft word if NVDA connot inject, or NVDA is specifically configured to do so. Choose WordDocument with IAccessible Outlook appModule: grab WordDocument code from IAccessible rather than Window * UIA NVDAObject: rowHeaderText and columnHeaderText now filter out the current cell from the headers if inappropriately put there by the UIA implementation. * Winword's script_tab: when we have a collapsed range on a table cell, expand to paragraph rather than cell, as not all implementations can support cell (such as UIA). Paragraph is certainly enough info to speak anyway. * Allow editableText's newLine script to announce the entire new line if announceEntireNewLine class viarable is true. This is false by default, but UIA WordDocument sets this to true for better list bullet reading. * UIA NVDAObject: add the EditableTextWithOutAutoSelectDetection mixin class at the very end before the base UIA class, so that subclasses of UIA can override methods and properties of EditableTextWithoutAutoSelectDetection (such as for controlling of announcement of new line text). * UIA WordDocument: for now suppress announcement of entering and exiting lists. this ensures compatibility with the older MS Word implementation, and stops confusion when pressing enter for new bullets where NVDA was announcing exiting and then entering a new list. * UIA browseMode: add support for quicknav and elements list for spelling errors. * UIA WordDocument support: add quicknav / elements list for comments (currently under annotations like old MS Word). * Add support for grammar errors to UIA (inline reading, quicknav and elements list.) * Fix comment * UIA WordDocument: initial support for track changes in elements list. Unable to fetch author and date info at this point in time. * UIA MS Word support: allow backspace to work again. Seems like range comparison is now broken in MS Word's UIA implementation as well. * UIA MS Word support: don't list charts in elements list as this cannot be supported currently. * UIATextInfo: fix an AttributeError on Windows 7 by defining the fetchAnnotationTypes variable before any point where it can be used. Specifically: If the IUIAutomationTextRange3 interface was missing, fetchAnnotationTypes was never set. It should be set to False by default.
Parents
Loading