1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10d1766043SAndrew Rist *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12d1766043SAndrew Rist *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19d1766043SAndrew Rist *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __com_sun_star_accessibility_XAccessibleHypertext_idl__
25cdf0e10cSrcweir#define __com_sun_star_accessibility_XAccessibleHypertext_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
28cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
31cdf0e10cSrcweir#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir#ifndef __com_sun_star_accessibility_XAccessibleText_idl__
34cdf0e10cSrcweir#include <com/sun/star/accessibility/XAccessibleText.idl>
35cdf0e10cSrcweir#endif
36cdf0e10cSrcweir
37cdf0e10cSrcweirmodule com { module sun { module star { module accessibility {
38cdf0e10cSrcweir
39cdf0e10cSrcweir published interface XAccessibleHyperlink;
40cdf0e10cSrcweir
41cdf0e10cSrcweir
42cdf0e10cSrcweir/** Implement this interface to expose the hypertext structure of a document.
43cdf0e10cSrcweir
44cdf0e10cSrcweir    <p>The <type>XAccessibleHypertext</type> interface is the main interface
45cdf0e10cSrcweir    to expose hyperlinks in a document, typically a text document, that are
46cdf0e10cSrcweir    used to reference other (parts of) documents.  For supporting the
47cdf0e10cSrcweir    <member>XAccessibleHypertext::getLinkIndex</member> method of this
48cdf0e10cSrcweir    interface and other character related methods of the
49cdf0e10cSrcweir    <type>XAccessibleHyperlink</type> interface, it is necessary to also
50cdf0e10cSrcweir    support the <type>XAccessibleText</type> interface.</p>
51cdf0e10cSrcweir
52cdf0e10cSrcweir    @see XAccessibleHyperlink, XAccessibleText
53cdf0e10cSrcweir
54*0d3a54ffSJürgen Schmidt    @since OpenOffice 1.1.2
55cdf0e10cSrcweir*/
56cdf0e10cSrcweirpublished interface XAccessibleHypertext
57cdf0e10cSrcweir    : ::com::sun::star::accessibility::XAccessibleText
58cdf0e10cSrcweir{
59cdf0e10cSrcweir    /** Returns the number of links and link groups contained within this
60cdf0e10cSrcweir        hypertext document.
61cdf0e10cSrcweir
62cdf0e10cSrcweir        @return
63cdf0e10cSrcweir            The number of links and link groups within this hypertext
64cdf0e10cSrcweir            document.  Returns 0 if there is no link.
65cdf0e10cSrcweir    */
66cdf0e10cSrcweir    long getHyperLinkCount ();
67cdf0e10cSrcweir
68cdf0e10cSrcweir    /** Return the specified link.
69cdf0e10cSrcweir
70cdf0e10cSrcweir        <p>The returned <type>XAccessibleHyperlink</type> object
71cdf0e10cSrcweir        encapsulates the hyperlink and provides several kinds of information
72cdf0e10cSrcweir        describing it.</p>
73cdf0e10cSrcweir
74cdf0e10cSrcweir        @param nLinkIndex
75cdf0e10cSrcweir            This index specifies the hyperlink to return.
76cdf0e10cSrcweir
77cdf0e10cSrcweir        @return
78cdf0e10cSrcweir            If the given index is valid, i.e. lies in the intervall from 0
79cdf0e10cSrcweir            to the number of links minus one, a reference to the specified
80cdf0e10cSrcweir            hyperlink object is returned.  If the index is invalid then an
81cdf0e10cSrcweir            empty reference is returned.
82cdf0e10cSrcweir    */
83cdf0e10cSrcweir    XAccessibleHyperlink getHyperLink ([in] long nLinkIndex)
84cdf0e10cSrcweir        raises (::com::sun::star::lang::IndexOutOfBoundsException);
85cdf0e10cSrcweir
86cdf0e10cSrcweir
87cdf0e10cSrcweir    /** Returns the index of the hyperlink that is associated with this
88cdf0e10cSrcweir        character index.
89cdf0e10cSrcweir
90cdf0e10cSrcweir        <p>In a HTML document this is the case when a &lt;a href&gt; tag
91cdf0e10cSrcweir        spans (includes) the given character index.</p>
92cdf0e10cSrcweir
93cdf0e10cSrcweir        @param nCharIndex
94cdf0e10cSrcweir            Index of the character for which to return the link index.  If
95cdf0e10cSrcweir            the <type>XAccessibleText</type> interface is used to represent
96cdf0e10cSrcweir            the text containting the link, then the character index is only
97cdf0e10cSrcweir            valid if it is greater than or equal to zero and lower then the
98cdf0e10cSrcweir            number of characters in the text.  See that interface's
99cdf0e10cSrcweir            documentation for more details.
100cdf0e10cSrcweir
101cdf0e10cSrcweir        @return
102cdf0e10cSrcweir            Returns the index of the hyperlink that is associated with this
103cdf0e10cSrcweir            character index, or throws an exception if there is no hyperlink
104cdf0e10cSrcweir            associated with this index.
105cdf0e10cSrcweir
106cdf0e10cSrcweir        @see XAccessibleText.
107cdf0e10cSrcweir    */
108cdf0e10cSrcweir    long getHyperLinkIndex ([in] long nCharIndex)
109cdf0e10cSrcweir        raises (::com::sun::star::lang::IndexOutOfBoundsException);
110cdf0e10cSrcweir};
111cdf0e10cSrcweir
112cdf0e10cSrcweir}; }; }; };
113cdf0e10cSrcweir
114cdf0e10cSrcweir#endif
115