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