1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27 28#ifndef __com_sun_star_accessibility_XAccessibleHypertext_idl__ 29#define __com_sun_star_accessibility_XAccessibleHypertext_idl__ 30 31#ifndef __com_sun_star_uno_XInterface_idl__ 32#include <com/sun/star/uno/XInterface.idl> 33#endif 34#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 35#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 36#endif 37#ifndef __com_sun_star_accessibility_XAccessibleText_idl__ 38#include <com/sun/star/accessibility/XAccessibleText.idl> 39#endif 40 41module com { module sun { module star { module accessibility { 42 43 published interface XAccessibleHyperlink; 44 45 46/** Implement this interface to expose the hypertext structure of a document. 47 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> 55 56 @see XAccessibleHyperlink, XAccessibleText 57 58 @since OOo 1.1.2 59*/ 60published interface XAccessibleHypertext 61 : ::com::sun::star::accessibility::XAccessibleText 62{ 63 /** Returns the number of links and link groups contained within this 64 hypertext document. 65 66 @return 67 The number of links and link groups within this hypertext 68 document. Returns 0 if there is no link. 69 */ 70 long getHyperLinkCount (); 71 72 /** Return the specified link. 73 74 <p>The returned <type>XAccessibleHyperlink</type> object 75 encapsulates the hyperlink and provides several kinds of information 76 describing it.</p> 77 78 @param nLinkIndex 79 This index specifies the hyperlink to return. 80 81 @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. 86 */ 87 XAccessibleHyperlink getHyperLink ([in] long nLinkIndex) 88 raises (::com::sun::star::lang::IndexOutOfBoundsException); 89 90 91 /** Returns the index of the hyperlink that is associated with this 92 character index. 93 94 <p>In a HTML document this is the case when a <a href> tag 95 spans (includes) the given character index.</p> 96 97 @param nCharIndex 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. 104 105 @return 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. 109 110 @see XAccessibleText. 111 */ 112 long getHyperLinkIndex ([in] long nCharIndex) 113 raises (::com::sun::star::lang::IndexOutOfBoundsException); 114}; 115 116}; }; }; }; 117 118#endif 119