merge the formfield patch from ooo-build
[ooovba.git] / toolkit / test / accessibility / AccessibleHypertextHandler.java
blobddfd5ebef9101c066ab842020be59a9ce92cf59d
2 import com.sun.star.uno.UnoRuntime;
3 import com.sun.star.accessibility.XAccessibleContext;
4 import com.sun.star.accessibility.XAccessibleHypertext;
7 class AccessibleHypertextHandler extends AccessibleTreeHandler
9 public NodeHandler createHandler (XAccessibleContext xContext)
11 XAccessibleHypertext xText =
12 (XAccessibleHypertext) UnoRuntime.queryInterface (
13 XAccessibleHypertext.class, xContext);
14 if (xText != null)
15 return new AccessibleHypertextHandler (xText);
16 else
17 return null;
20 public AccessibleHypertextHandler ()
24 public AccessibleHypertextHandler (XAccessibleHypertext xText)
26 if (xText != null)
27 maChildList.setSize (1);
30 protected static XAccessibleHypertext getHypertext (AccTreeNode aNode)
32 XAccessibleHypertext xHypertext =
33 (XAccessibleHypertext) UnoRuntime.queryInterface (
34 XAccessibleHypertext.class, aNode.getContext());
35 return xHypertext;
38 public AccessibleTreeNode getChild (AccessibleTreeNode aParent, int nIndex)
40 return new StringNode ("interface XAccessibleHypertext is supported", aParent);