nvda
e6eb9ae3 - Support for PowerPoint 2013 slide shows. Re #3602.

Commit
12 years ago
Support for PowerPoint 2013 slide shows. Re #3602. PowerPoint 2013 provides no window for a slide show that can give back the PowerPoint object model for that window using AccessibleObjectFromWindow. Therefore, PowerPoint support had to be greatly restructured to use GetActiveObject with powerpoint.application. and storing the application instance on the appModule. Its worth noting that when PowerPoint support was first written AccessibleObjectFromWindow had to be used as we back then had no way of using GetActiveObject if we were running with the UIAccess privilage. Specific changes: * Move the focus juggling code to make the COM object model be registered at startup, outof PaneClassDC's event_gainFocus and into its own helper method on the appModule. * replace the fetchPpObjectModel method on the appModule with a ppApplication getter on the appModule which retreaves and caches the PowerPoint application instance by using GetActiveObject. It also of course registers our Powerpoint Application event sink. If no longer therefore requires a window handle to fetch this. * Remove the getPpObjectModel global function as its no longer needed. * PaneClassDC's selection property: If there is no specific selection within the window, return a new copy of the NVDAObject for this document window, but rather than instanciating a DocumentWindow NVDAObject directly, just instanciate another IAccessible NVDAObject, forcing NVDA to do its overlay class magic and therefore make use of the appModule's chooseNVDAObjectOverLayClasses method. This means that all code for choosing the correct NVDAObject class can be in the one place, rather than duplicated across multiple places. * PaneClass DC: remove the ppObjectModel property getter as the ppObjectModel attribute is now always set by external code (chooseNVDAObjectOverlayClasses). * AppModule.chooseNVDAObjectOverlayClasses: rewrite to use the ppApplication property on the appModule rather than fetching the object model with fetchPpObjectModel. However, as this is the application, and no specifically a document window COM object, we check things in a different order. Specifically, we check if there is a slide show window and if its currently active, before simply resorting to the active window (current view of the active presentation). * Add a ppVersionMajor property to the appModule to make it easy to discover the major version of PowerPoint (e.g. 12 is PowerPoint 2007). * PaneClassDC's selection property: make sure the workarround for text selection in PowerPoint 2003/2007 only applies to those versions (by using the ppVersionMajor property on the appModule) and not higher, as this code was causing issues in PowerPoint 2013 (f6 from thumbnails to normal slide view was resulting in incorrect landing in a notes edit field).
Committer
Parents
Loading