https://bugs.documentfoundation.org/show_bug.cgi?id=168409
--- Comment #10 from Michael Weghorn <[email protected]> --- (In reply to Jean-Pierre Ledure from comment #9) > Suggestion for a workaround > --------------------------- > > By reworking my own code, I can manage the list of buttons with the > com.sun.star.comp.framework.LayoutManager and derivatives. Great, thanks for looking into this! Does this mean you now have a potential alternative to get the information that the accessiblecontext = element.RealInterface.AccessibleContext ' com.sun.star.accessibility.XAccessibleContext settings = element.getSettings(True) ' com.sun.star.container.XIndexAccess For i = 0 To accessiblecontext.AccessibleChildCount - 1 print accessiblecontext.getAccessibleChild(i).AccessibleName, Next i logic mentioned in the initial comment was referring to? > However I could not find a way to identify the coordinates of the pushed > button. Is the challenge finding the coordinates of a known button in general, or related to the pushed button in particular? Do you have any UNO interface (X...) for the underlying button object, or only some name/text retrieved from the resource associated with the button? Since you mention com.sun.star.comp.framework.LayoutManager: Do you possibly have a com::sun::star::ui::XUIElement reference from which you can retrieve a com::sun::star::awt::XWindow reference of the corresponding button, or is only the toolbar available that way? (If you can get an XWindow, XWindow::getPosSize might be helpful to get the coordinates.) > OTOH a click on a button currently does not pass any event structure > (simply a zero integer value) to the invoked routine. > Would it be feasible to pass a structure identical or similar to a > com.sun.star.awt.MouseEvent ? In particular, containing the X and Y > coordinates of the mouse click vs. the parent toolbar position ? Can you possibly give a bit more detail on how that was implemented so far using the accessibility API, and how you register for the event you mention (that's apparently missing relevant information)? As I said, I'm not an expert when it comes to scripting, but with a bit more details on * how it was done so far * what is the part for which you already have a potential alternative (ideally with corresponding code) * what is the still missing part , I can try to also think a bit more about potential ways to achieve that. -- You are receiving this mail because: You are the assignee for the bug.
