Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / accessibility / XAccessibleHypertext.idl
blob0e88a77071ab4aff0981ebb71e9201955bb8ba92
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_accessibility_XAccessibleHypertext_idl__
21 #define __com_sun_star_accessibility_XAccessibleHypertext_idl__
23 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/lang/IndexOutOfBoundsException.idl>
25 #include <com/sun/star/accessibility/XAccessibleText.idl>
27 module com { module sun { module star { module accessibility {
29 interface XAccessibleHyperlink;
32 /** Implement this interface to expose the hypertext structure of a document.
34 <p>The XAccessibleHypertext interface is the main interface
35 to expose hyperlinks in a document, typically a text document, that are
36 used to reference other (parts of) documents. For supporting the
37 XAccessibleHypertext::getLinkIndex() method of this
38 interface and other character related methods of the
39 XAccessibleHyperlink interface, it is necessary to also
40 support the XAccessibleText interface.</p>
42 @see XAccessibleHyperlink, XAccessibleText
44 @since OOo 1.1.2
46 interface XAccessibleHypertext
47 : ::com::sun::star::accessibility::XAccessibleText
49 /** Returns the number of links and link groups contained within this
50 hypertext document.
52 @return
53 The number of links and link groups within this hypertext
54 document. Returns 0 if there is no link.
56 long getHyperLinkCount ();
58 /** Return the specified link.
60 <p>The returned XAccessibleHyperlink object
61 encapsulates the hyperlink and provides several kinds of information
62 describing it.</p>
64 @param nLinkIndex
65 This index specifies the hyperlink to return.
67 @return
68 If the given index is valid, i.e. lies in the interval from 0
69 to the number of links minus one, a reference to the specified
70 hyperlink object is returned. If the index is invalid then an
71 empty reference is returned.
73 XAccessibleHyperlink getHyperLink ([in] long nLinkIndex)
74 raises (::com::sun::star::lang::IndexOutOfBoundsException);
77 /** Returns the index of the hyperlink that is associated with this
78 character index.
80 <p>In a HTML document this is the case when a &lt;a href&gt; tag
81 spans (includes) the given character index.</p>
83 @param nCharIndex
84 Index of the character for which to return the link index. If
85 the XAccessibleText interface is used to represent
86 the text containing the link, then the character index is only
87 valid if it is greater than or equal to zero and lower then the
88 number of characters in the text. See that interface's
89 documentation for more details.
91 @return
92 Returns the index of the hyperlink that is associated with this
93 character index, or throws an exception if there is no hyperlink
94 associated with this index.
96 @see XAccessibleText.
98 long getHyperLinkIndex ([in] long nCharIndex)
99 raises (::com::sun::star::lang::IndexOutOfBoundsException);
102 }; }; }; };
104 #endif
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */