1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_accessibility_XAccessibleHyperlink_idl__ 25#define __com_sun_star_accessibility_XAccessibleHyperlink_idl__ 26 27#ifndef __com_sun_star_accessibility_XAccessibleAction_idl__ 28#include <com/sun/star/accessibility/XAccessibleAction.idl> 29#endif 30#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 31#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 32#endif 33 34module com { module sun { module star { module accessibility { 35 36/** Implement this interface to represent a hyperlink or a group of 37 hyperlinks. 38 39 <p>Single hyperlinks correspond to simple <a href> tags. Groups 40 of hyperlinks are contained in client side image maps. Linked objects 41 and anchors are implementation dependent. This interface inherits the 42 <type>XAccessibleAction</type> interface. Especially that interface's 43 <member>XAccessibleAction::getActionCount</member> method is needed to 44 obtain a maximum value for the indices passed to the 45 <member>XAccessibleHyperlink::getAccessibleActionAnchor</member> and 46 <member>XAccessibleHyperlink::getAccessibleActionObject</member> 47 methods.</p> 48 49 <p>Furhtermore, the object that implements this interface has to be 50 connected implicitely or explicitely with an object that implements the 51 the <type>XAccessibleText</type> interface. The 52 <member>XAccessibleHyperlink::getStartIndex</member> and 53 <member>XAccessibleHyperlink::getEndIndex</member> methods return 54 indices with respect to the text exposed by that interface.</p> 55 56 @since OpenOffice 1.1.2 57*/ 58published interface XAccessibleHyperlink : 59 ::com::sun::star::accessibility::XAccessibleAction 60{ 61 /** Returns an object that represents the link anchor, as appropriate 62 for that link. 63 64 <p>For an HTML link for example, this method would return the string 65 enclosed by the <&a href> tag.</p> 66 67 @param nIndex 68 This index identifies the anchor when, as in the case of an 69 image map, there is more than one link represented by this 70 object. The valid maximal index can be determinded by calling 71 the <member>XAccessibleAction::getActionCount</member> method. 72 73 @return 74 If the index is not valid then an exception is thrown. 75 Otherwise it returns an implementation dependent value. 76 */ 77 any getAccessibleActionAnchor ([in] long nIndex) 78 raises (::com::sun::star::lang::IndexOutOfBoundsException); 79 80 /** Returns an object that represents the link anchor, as appropriate 81 for that link. 82 83 <p>For an HTML link for example, this method would return the URL of 84 the <&a href> tag.</p> 85 86 @param nIndex 87 This index identifies the action object when, as in the case of 88 an image map, there is more than one link represented by this 89 object. The valid maximal index can be determinded by calling 90 the <member>XAccessibleAction::getActionCount</member> method. 91 92 @return 93 If the index is not valid then an exception is thrown. 94 Otherwise it returns an implementation dependent value. 95 */ 96 any getAccessibleActionObject ([in] long nIndex) 97 raises (::com::sun::star::lang::IndexOutOfBoundsException); 98 99 /** Returns the index at which the textual representation of the 100 hyperlink (group) starts. 101 102 <p>The returned value relates to the <type>XAccessibleText</type> 103 interface that ownes this hyperlink.</p> 104 105 @return 106 The index relates to the text exposed by the 107 <type>XAccessibleHypertext</type> interface. 108 */ 109 long getStartIndex (); 110 111 /** Returns the index at which the textual rerpesentation of the 112 hyperlink (group) ends. 113 114 <p>The returned value relates to the <type>XAccessibleText</type> 115 interface that ownes this hyperlink.</p> 116 117 @return 118 The index relates to the text exposed by the 119 <type>XAccessibleText</type> interface. 120 */ 121 long getEndIndex (); 122 123 /** Returns whether the document referenced by this links is 124 still valid. 125 126 <p>This is a volatile state that may change without further warning 127 like e.g. sending an appropriate event.</p> 128 129 @return 130 Returns <TRUE/> if the referenced document is still valid and 131 <FALSE/> otherwise. 132 */ 133 boolean isValid (); 134}; 135 136}; }; }; }; 137 138#endif 139