To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=76767





------- Additional comments from [EMAIL PROTECTED] Tue May 22 17:18:02 +0000 
2007 -------
Finally I found a way to set the mouse motion listener to the right window as
follow :
        # access the current draw document
        if desktop.ActiveFrame.ActiveFrame:
            CONTROLLER = self.desktop.ActiveFrame.ActiveFrame.Controller
        else:
            CONTROLLER = self.desktop.ActiveFrame.Controller
        # find the window document and scroll bars
        self.scrollbars = []
        for i in
range(CONTROLLER.Frame.ComponentWindow.AccessibleContext.AccessibleChildCount):
            aChild =
CONTROLLER.Frame.ComponentWindow.AccessibleContext.getAccessibleChild(i)
            if aChild.AccessibleContext.AccessibleRole == SCROLL_PANE:
                for j in range(aChild.AccessibleContext.AccessibleChildCount):
                    aSubChild = aChild.AccessibleContext.getAccessibleChild(j)
                    if aSubChild.AccessibleContext.AccessibleRole == DOCUMENT:
                        aLocation = aSubChild.Location
                        aSize = aSubChild.Size
                    if aSubChild.AccessibleContext.AccessibleRole == SCROLL_BAR:
                        self.scrollbars.append(aSubChild)
                for w in aChild.Windows:
                    nWidth, nHeight = (aLocation.X-w.PosSize.X) / 2 +
aSize.Width, (aLocation.Y-w.PosSize.Y) / 2 + aSize.Height
                    if w.AccessibleContext.AccessibleRole == PANEL and nWidth ==
w.PosSize.Width and nHeight == w.PosSize.Height:
                        self.aEnv['COMPONENTWINDOW'] = w

So I get the window and I hope it will work under all context (not sure for now)

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to