Apache OpenOffice (AOO) Bugzilla – Issue 126028
XAccessible Object of DrawPage doesn't have children
Last modified: 2018-07-01 08:52:27 UTC
Created attachment 84406 [details] the simple example document the properties are from The accessible implementation of a com.sun.star.drawing.DrawPage has now access to the children – which means the shapes at the page. The XAccessibleContext of the PageShape allows access to the following information. But it doesn't give access to the children. Role: SHAPE | Name: 'PageShape: Folie 1' Description: ' ' (has 0 children) State: EDITABLE State: ENABLED State: FOCUSABLE State: RESIZABLE State: SELECTABLE State: SENSITIVE State: SHOWING State: VISIBLE State: MOVEABLE 12 Types: Type: unoidl.com.sun.star.accessibility.XAccessible Type: unoidl.com.sun.star.accessibility.XAccessibleContext Type: unoidl.com.sun.star.accessibility.XAccessibleEventBroadcaster Type: unoidl.com.sun.star.lang.XServiceInfo Type: unoidl.com.sun.star.lang.XTypeProvider Type: unoidl.com.sun.star.uno.XWeak Type: unoidl.com.sun.star.lang.XComponent Type: unoidl.com.sun.star.accessibility.XAccessibleComponent Type: unoidl.com.sun.star.accessibility.XAccessibleExtendedComponent Type: unoidl.com.sun.star.lang.XEventListener Type: unoidl.com.sun.star.document.XEventListener Type: unoidl.com.sun.star.lang.XUnoTunnel The corresponding DrawPage has the following properties 5 Services: Service: com.sun.star.drawing.ShapeCollection Service: com.sun.star.drawing.GenericDrawPage Service: com.sun.star.document.LinkTarget Service: com.sun.star.document.LinkTargetSupplier Service: com.sun.star.drawing.DrawPage 20 Types: Type: unoidl.com.sun.star.drawing.XDrawPage Type: unoidl.com.sun.star.beans.XPropertySet Type: unoidl.com.sun.star.container.XNamed Type: unoidl.com.sun.star.drawing.XMasterPageTarget Type: unoidl.com.sun.star.lang.XServiceInfo Type: unoidl.com.sun.star.util.XReplaceable Type: unoidl.com.sun.star.document.XLinkTargetSupplier Type: unoidl.com.sun.star.drawing.XShapeCombiner Type: unoidl.com.sun.star.drawing.XShapeBinder Type: unoidl.com.sun.star.office.XAnnotationAccess Type: unoidl.com.sun.star.beans.XMultiPropertySet Type: unoidl.com.sun.star.drawing.XDrawPage Type: unoidl.com.sun.star.drawing.XShapeGrouper Type: unoidl.com.sun.star.lang.XServiceInfo Type: unoidl.com.sun.star.lang.XUnoTunnel Type: unoidl.com.sun.star.lang.XComponent Type: unoidl.com.sun.star.lang.XTypeProvider Type: unoidl.com.sun.star.uno.XWeak Type: unoidl.com.sun.star.uno.XAggregation Type: unoidl.com.sun.star.form.XFormsSupplier Object [Uno object proxy. OID: 6e8d270;msci[0];e558ed6d599f4c8990275192886f6b] has 17 Properties: Property: BookmarkURL = uno.Any { Type= System.String, Value=} Property: PreviewBitmap = uno.Any { Type= System.Byte[], Value=System.Byte[]} Property: Preview = uno.Any { Type= System.Byte[], Value=System.Byte[]} Property: LinkDisplayBitmap = uno.Any { Type= unoidl.com.sun.star.awt.XBitmap, Value=Uno object proxy. OID: 13021160;msci[0];e558ed6d599f4c8990275192886f6b} Property: NavigationOrder = uno.Any { Type= unoidl.com.sun.star.container.XIndexAccess, Value=Uno object proxy. OID: 6e8d270;msci[0];e558ed6d599f4c8990275192886f6b} Property: Orientation = uno.Any { Type= unoidl.com.sun.star.view.PaperOrientation, Value=PORTRAIT} Property: Height = uno.Any { Type= System.Int32, Value=29700} Property: BorderRight = uno.Any { Type= System.Int32, Value=1000} Property: LinkDisplayName = uno.Any { Type= System.String, Value=Folie 1} Property: Width = uno.Any { Type= System.Int32, Value=21000} Property: IsBackgroundDark = uno.Any { Type= System.Boolean, Value=False} Property: UserDefinedAttributes = uno.Any { Type= unoidl.com.sun.star.container.XNameContainer, Value=Uno object proxy. OID: 6e9c7d8;msci[0];e558ed6d599f4c8990275192886f6b} Property: BorderTop = uno.Any { Type= System.Int32, Value=1000} Can't get property - Background Property: Number = uno.Any { Type= System.Int16, Value=1} Property: BorderLeft = uno.Any { Type= System.Int32, Value=1000} Property: BorderBottom = uno.Any { Type= System.Int32, Value=1000}
To access at the shape, you must access at the layout before. The objects tree is: XDrawPages > XDrawPage > XShape
There is a misunderstanding in the problem description. The problem is not to access the XShapes – the problem is to access the accessible elements of a page. This is impossible! You cannot directly change from the accessible view to the XShapes. The elements of a page are accessible through the document but not through the page they are related to. This is a conception error I think. The accessible tree structure should be the same as the XShapes tree structure, but that isn't.