Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / accessibility / XAccessibleHyperlink.idl
blob4efacf2874d8e900112d299be6885dfe3c046c65
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XAccessibleHyperlink.idl,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_accessibility_XAccessibleHyperlink_idl__
32 #define __com_sun_star_accessibility_XAccessibleHyperlink_idl__
34 #ifndef __com_sun_star_accessibility_XAccessibleAction_idl__
35 #include <com/sun/star/accessibility/XAccessibleAction.idl>
36 #endif
37 #ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
38 #include <com/sun/star/lang/IndexOutOfBoundsException.idl>
39 #endif
41 module com { module sun { module star { module accessibility {
43 /** Implement this interface to represent a hyperlink or a group of
44 hyperlinks.
46 <p>Single hyperlinks correspond to simple &lt;a href&gt; tags. Groups
47 of hyperlinks are contained in client side image maps. Linked objects
48 and anchors are implementation dependent. This interface inherits the
49 <type>XAccessibleAction</type> interface. Especially that interface's
50 <member>XAccessibleAction::getActionCount</member> method is needed to
51 obtain a maximum value for the indices passed to the
52 <member>XAccessibleHyperlink::getAccessibleActionAnchor</member> and
53 <member>XAccessibleHyperlink::getAccessibleActionObject</member>
54 methods.</p>
56 <p>Furhtermore, the object that implements this interface has to be
57 connected implicitely or explicitely with an object that implements the
58 the <type>XAccessibleText</type> interface. The
59 <member>XAccessibleHyperlink::getStartIndex</member> and
60 <member>XAccessibleHyperlink::getEndIndex</member> methods return
61 indices with respect to the text exposed by that interface.</p>
63 @since OOo 1.1.2
65 published interface XAccessibleHyperlink :
66 ::com::sun::star::accessibility::XAccessibleAction
68 /** Returns an object that represents the link anchor, as appropriate
69 for that link.
71 <p>For an HTML link for example, this method would return the string
72 enclosed by the &lt&a href&gt; tag.</p>
74 @param nIndex
75 This index identifies the anchor when, as in the case of an
76 image map, there is more than one link represented by this
77 object. The valid maximal index can be determinded by calling
78 the <member>XAccessibleAction::getActionCount</member> method.
80 @return
81 If the index is not valid then an exception is thrown.
82 Otherwise it returns an implementation dependent value.
84 any getAccessibleActionAnchor ([in] long nIndex)
85 raises (::com::sun::star::lang::IndexOutOfBoundsException);
87 /** Returns an object that represents the link anchor, as appropriate
88 for that link.
90 <p>For an HTML link for example, this method would return the URL of
91 the &lt&a href&gt; tag.</p>
93 @param nIndex
94 This index identifies the action object when, as in the case of
95 an image map, there is more than one link represented by this
96 object. The valid maximal index can be determinded by calling
97 the <member>XAccessibleAction::getActionCount</member> method.
99 @return
100 If the index is not valid then an exception is thrown.
101 Otherwise it returns an implementation dependent value.
103 any getAccessibleActionObject ([in] long nIndex)
104 raises (::com::sun::star::lang::IndexOutOfBoundsException);
106 /** Returns the index at which the textual representation of the
107 hyperlink (group) starts.
109 <p>The returned value relates to the <type>XAccessibleText</type>
110 interface that ownes this hyperlink.</p>
112 @return
113 The index relates to the text exposed by the
114 <type>XAccessibleHypertext</type> interface.
116 long getStartIndex ();
118 /** Returns the index at which the textual rerpesentation of the
119 hyperlink (group) ends.
121 <p>The returned value relates to the <type>XAccessibleText</type>
122 interface that ownes this hyperlink.</p>
124 @return
125 The index relates to the text exposed by the
126 <type>XAccessibleText</type> interface.
128 long getEndIndex ();
130 /** Returns whether the document referenced by this links is
131 still valid.
133 <p>This is a volatile state that may change without further warning
134 like e.g. sending an appropriate event.</p>
136 @return
137 Returns <TRUE/> if the referenced document is still valid and
138 <FALSE/> otherwise.
140 boolean isValid ();
143 }; }; }; };
145 #endif