1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XAccessibleHypertext.idl,v $
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_XAccessibleHypertext_idl__
32 #define __com_sun_star_accessibility_XAccessibleHypertext_idl__
34 #ifndef __com_sun_star_uno_XInterface_idl__
35 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 #ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
38 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
40 #ifndef __com_sun_star_accessibility_XAccessibleText_idl__
41 #include
<com
/sun
/star
/accessibility
/XAccessibleText.idl
>
44 module com
{ module sun
{ module star
{ module accessibility
{
46 published
interface XAccessibleHyperlink
;
49 /** Implement this interface to expose the hypertext structure of a document.
51 <p>The <type>XAccessibleHypertext</type> interface is the main interface
52 to expose hyperlinks in a document, typically a text document, that are
53 used to reference other (parts of) documents. For supporting the
54 <member>XAccessibleHypertext::getLinkIndex</member> method of this
55 interface and other character related methods of the
56 <type>XAccessibleHyperlink</type> interface, it is necessary to also
57 support the <type>XAccessibleText</type> interface.</p>
59 @see XAccessibleHyperlink, XAccessibleText
63 published
interface XAccessibleHypertext
64 : ::com
::sun
::star
::accessibility
::XAccessibleText
66 /** Returns the number of links and link groups contained within this
70 The number of links and link groups within this hypertext
71 document. Returns 0 if there is no link.
73 long getHyperLinkCount
();
75 /** Return the specified link.
77 <p>The returned <type>XAccessibleHyperlink</type> object
78 encapsulates the hyperlink and provides several kinds of information
82 This index specifies the hyperlink to return.
85 If the given index is valid, i.e. lies in the intervall from 0
86 to the number of links minus one, a reference to the specified
87 hyperlink object is returned. If the index is invalid then an
88 empty reference is returned.
90 XAccessibleHyperlink getHyperLink
([in] long nLinkIndex
)
91 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
94 /** Returns the index of the hyperlink that is associated with this
97 <p>In a HTML document this is the case when a <a href> tag
98 spans (includes) the given character index.</p>
101 Index of the character for which to return the link index. If
102 the <type>XAccessibleText</type> interface is used to represent
103 the text containting the link, then the character index is only
104 valid if it is greater than or equal to zero and lower then the
105 number of characters in the text. See that interface's
106 documentation for more details.
109 Returns the index of the hyperlink that is associated with this
110 character index, or throws an exception if there is no hyperlink
111 associated with this index.
113 @see XAccessibleText.
115 long getHyperLinkIndex
([in] long nCharIndex
)
116 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);