2012-06-21 05:53:00 -05:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2003-04-11 11:09:06 -05:00
|
|
|
|
|
|
|
import com.sun.star.uno.UnoRuntime;
|
2003-04-25 08:49:42 -05:00
|
|
|
import com.sun.star.accessibility.XAccessibleContext;
|
|
|
|
import com.sun.star.accessibility.XAccessibleHypertext;
|
2003-04-11 11:09:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
class AccessibleHypertextHandler extends AccessibleTreeHandler
|
|
|
|
{
|
|
|
|
public NodeHandler createHandler (XAccessibleContext xContext)
|
|
|
|
{
|
|
|
|
XAccessibleHypertext xText =
|
2012-08-21 01:47:59 -05:00
|
|
|
UnoRuntime.queryInterface (
|
|
|
|
XAccessibleHypertext.class, xContext);
|
2003-04-11 11:09:06 -05:00
|
|
|
if (xText != null)
|
|
|
|
return new AccessibleHypertextHandler (xText);
|
|
|
|
else
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public AccessibleHypertextHandler ()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public AccessibleHypertextHandler (XAccessibleHypertext xText)
|
|
|
|
{
|
|
|
|
if (xText != null)
|
|
|
|
maChildList.setSize (1);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected static XAccessibleHypertext getHypertext (AccTreeNode aNode)
|
|
|
|
{
|
|
|
|
XAccessibleHypertext xHypertext =
|
2012-08-21 01:47:59 -05:00
|
|
|
UnoRuntime.queryInterface (
|
|
|
|
XAccessibleHypertext.class, aNode.getContext());
|
2003-04-11 11:09:06 -05:00
|
|
|
return xHypertext;
|
|
|
|
}
|
|
|
|
|
|
|
|
public AccessibleTreeNode getChild (AccessibleTreeNode aParent, int nIndex)
|
|
|
|
{
|
|
|
|
return new StringNode ("interface XAccessibleHypertext is supported", aParent);
|
|
|
|
}
|
|
|
|
}
|