actually i have problems with the very first line of code you sent: acc = ThisComponent.CurrentController.Frame.ComponentWindow.AccessibleContext
i am doing development right now using java. so i do get the ComponentWindow by: XWindow window = xController.getFrame().getComponentWindow(); but how do i get the AccessibleContext from XWindow? Neither XAccessibleContext accessibleContext = (XAccessibleContext) UnoRuntime.queryInterface(XAccessibleContext.class, window); works nor is there a method of XWindow for getting the AccessibleContext... Daniel Rentz wrote: > Max Giesbert schrieb: >> Thx again. feels like i am already there. i got the XCell now from the >> Target but how can i get the location of the cell on the screen. i read >> about XAccessibleComponent but XCell doesn't seem to implement it... > > I have written a tiny test script in Basic recently, that gets the > XAccessible for the first sheet in the first open Calc document. Maybe > this helps you to continue... Some ideas how to proceed: You can get the > parent of the sheet, this is the container of all sheets, to be able to > get the n-th sheet. From the sheet you can call > getAccessibleCellAt(row,column) to access the cells. Note that the lines > in the code below may be broken into several lines. > > > > Sub Main > acc = > ThisComponent.CurrentController.Frame.ComponentWindow.AccessibleContext > table = GetAccessibleForRole( acc, > com.sun.star.accessibility.AccessibleRole.TABLE ) > If Not IsNull( table ) Then > ... > EndIf > End Sub > > Function GetAccessibleForRole( acc As Object, role As Integer ) As Object > If IsNull( acc ) Then Exit Function > > count = acc.AccessibleChildCount > If count = 0 Then Exit Function > > For i = 0 To count - 1 > child = acc.getAccessibleChild( i ).AccessibleContext > If child.AccessibleRole = role Then > GetAccessibleForRole = child > Exit Function > EndIf > Next > > For i = 0 To count - 1 > child = GetAccessibleForRole( acc.getAccessibleChild( i > ).AccessibleContext, role ) > If Not IsNull( child ) Then > GetAccessibleForRole = child > Exit Function > EndIf > Next > End Function > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Max Giesbert - exactt technology Schießstättstr. 16 T: +49 17 75 07 53 44 D-80339 München F: +49 89 1 22 21 97 02 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
