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_XAccessibleHypertext_idl__
29 #define __com_sun_star_accessibility_XAccessibleHypertext_idl__
31 #ifndef __com_sun_star_uno_XInterface_idl__
32 #include
<com
/sun
/star
/uno
/XInterface.idl
>
34 #ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
35 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
37 #ifndef __com_sun_star_accessibility_XAccessibleText_idl__
38 #include
<com
/sun
/star
/accessibility
/XAccessibleText.idl
>
41 module com
{ module sun
{ module star
{ module accessibility
{
43 published
interface XAccessibleHyperlink
;
46 /** Implement this interface to expose the hypertext structure of a document.
48 <p>The <type>XAccessibleHypertext</type> interface is the main interface
49 to expose hyperlinks in a document, typically a text document, that are
50 used to reference other (parts of) documents. For supporting the
51 <member>XAccessibleHypertext::getLinkIndex</member> method of this
52 interface and other character related methods of the
53 <type>XAccessibleHyperlink</type> interface, it is necessary to also
54 support the <type>XAccessibleText</type> interface.</p>
56 @see XAccessibleHyperlink, XAccessibleText
60 published
interface XAccessibleHypertext
61 : ::com
::sun
::star
::accessibility
::XAccessibleText
63 /** Returns the number of links and link groups contained within this
67 The number of links and link groups within this hypertext
68 document. Returns 0 if there is no link.
70 long getHyperLinkCount
();
72 /** Return the specified link.
74 <p>The returned <type>XAccessibleHyperlink</type> object
75 encapsulates the hyperlink and provides several kinds of information
79 This index specifies the hyperlink to return.
82 If the given index is valid, i.e. lies in the intervall from 0
83 to the number of links minus one, a reference to the specified
84 hyperlink object is returned. If the index is invalid then an
85 empty reference is returned.
87 XAccessibleHyperlink getHyperLink
([in] long nLinkIndex
)
88 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
91 /** Returns the index of the hyperlink that is associated with this
94 <p>In a HTML document this is the case when a <a href> tag
95 spans (includes) the given character index.</p>
98 Index of the character for which to return the link index. If
99 the <type>XAccessibleText</type> interface is used to represent
100 the text containting the link, then the character index is only
101 valid if it is greater than or equal to zero and lower then the
102 number of characters in the text. See that interface's
103 documentation for more details.
106 Returns the index of the hyperlink that is associated with this
107 character index, or throws an exception if there is no hyperlink
108 associated with this index.
110 @see XAccessibleText.
112 long getHyperLinkIndex
([in] long nCharIndex
)
113 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);