class PaneClassDC(Window):\r
"""Handles fetching of the Powerpoint object model."""\r
\r
+ def findOverlayClasses(self,clsList):\r
+ m=self.ppObjectModel\r
+ if m:\r
+ #If there is a selection then its an editable document (slide).\r
+ #Otherwize it must be a slide show.\r
+ try:\r
+ m.selection\r
+ clsList.append(DocumentWindow)\r
+ except comtypes.COMError:\r
+ clsList.append(SlideShowWindow)\r
+ clsList.append(PaneClassDC)\r
+\r
def _get_ppObjectModel(self):\r
"""Fetches and caches the Powerpoint DocumentWindow object for the current presentation."""\r
try:\r
\r
class AppModule(appModuleHandler.AppModule):\r
\r
- def chooseNVDAObjectOverlayClasses(self, obj, clsList):\r
+ def event_gainFocus(self,obj,nextHandler):\r
if obj.windowClassName=="paneClassDC" and isinstance(obj,Window) and not isinstance(obj,PpObject) and obj.role==controlTypes.ROLE_PANE:\r
- if obj.childCount==0:\r
- clsList.insert(0,DocumentWindow)\r
- else:\r
- clsList.insert(0,SlideShowWindow)\r
+ newObj=PaneClassDC(windowHandle=obj.windowHandle)\r
+ eventHandler.queueEvent("gainFocus",newObj)\r
+ else:\r
+ nextHandler()\r