cid#1636693 COPY_INSTEAD_OF_MOVE
[LibreOffice.git] / offapi / com / sun / star / accessibility / XAccessibleHypertext.idl
blob7b7c4d81e2fe37ed853767448abe872fc536f6e9
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 module com { module sun { module star { module accessibility {
22 interface XAccessibleHyperlink;
25 /** Implement this interface to expose the hypertext structure of a document.
27 <p>The XAccessibleHypertext interface is the main interface
28 to expose hyperlinks in a document, typically a text document, that are
29 used to reference other (parts of) documents. For supporting the
30 XAccessibleHypertext::getLinkIndex() method of this
31 interface and other character related methods of the
32 XAccessibleHyperlink interface, it is necessary to also
33 support the XAccessibleText interface.</p>
35 @see XAccessibleHyperlink, XAccessibleText
37 @since OOo 1.1.2
39 interface XAccessibleHypertext
40 : ::com::sun::star::accessibility::XAccessibleText
42 /** Returns the number of links and link groups contained within this
43 hypertext document.
45 @return
46 The number of links and link groups within this hypertext
47 document. Returns 0 if there is no link.
49 long getHyperLinkCount ();
51 /** Return the specified link.
53 <p>The returned XAccessibleHyperlink object
54 encapsulates the hyperlink and provides several kinds of information
55 describing it.</p>
57 @param nLinkIndex
58 This index specifies the hyperlink to return.
60 @return
61 If the given index is valid, i.e. lies in the interval from 0
62 to the number of links minus one, a reference to the specified
63 hyperlink object is returned. If the index is invalid then an
64 empty reference is returned.
66 XAccessibleHyperlink getHyperLink ([in] long nLinkIndex)
67 raises (::com::sun::star::lang::IndexOutOfBoundsException);
70 /** Returns the index of the hyperlink that is associated with this
71 character index.
73 <p>In a HTML document this is the case when a &lt;a href&gt; tag
74 spans (includes) the given character index.</p>
76 @param nCharIndex
77 Index of the character for which to return the link index. If
78 the XAccessibleText interface is used to represent
79 the text containing the link, then the character index is only
80 valid if it is greater than or equal to zero and lower than the
81 number of characters in the text. See that interface's
82 documentation for more details.
84 @return
85 Returns the index of the hyperlink that is associated with this
86 character index, or throws an exception if there is no hyperlink
87 associated with this index.
89 @see XAccessibleText.
91 long getHyperLinkIndex ([in] long nCharIndex)
92 raises (::com::sun::star::lang::IndexOutOfBoundsException);
95 }; }; }; };
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */