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#ifndef __com_sun_star_accessibility_XAccessibleTable_idl__ 23#define __com_sun_star_accessibility_XAccessibleTable_idl__ 24 25#ifndef __com_sun_star_uno_XInterface_idl__ 26#include <com/sun/star/uno/XInterface.idl> 27#endif 28#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 29#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 30#endif 31 32module com { module sun { module star { module accessibility { 33 34 published interface XAccessible; 35 36/** Implement this interface to give access to a two-dimensional table. 37 38 <p>The <type>XAccessibleTable</type> interface is used to represent 39 two-dimensional tables. This interface combines the two interfaces 40 <code>javax.accessibility.AccessibleTable</code> and 41 <code>javax.accessibility.AccessibleExtendedTable</code> of the Java Accessibility API 42 (version 1.4).</p> 43 44 <p>All <type>XAccessible</type> objects that represent cells or 45 cell-clusters of a table have to be at the same time children of the 46 table. This is necessary to be able to convert row and column indices 47 into child indices and vice versa with the methods 48 <member>XAccessibleTable::getAccessibleIndex</member>, 49 <member>XAccessibleTable::getAccessibleRow</member>, and 50 <member>XAccessibleTable::getAccessibleColumn</member>.</p> 51 52 <p>The range of valid coordinates for this interface are implementation 53 dependent. However, that range includes at least the intervals from the 54 from the first row or column with the index 0 up to the last (but not 55 including) used row or column as returned by 56 <member>XAccessibleTable::getAccessibleRowCount</member> and 57 <member>XAccessibleTable::getAccessibleColumnCount</member>. In case of 58 the Calc the current range of valid indices for retrieving data include 59 the maximal table size--256 columns and 32000 rows--minus one.</p> 60 61 @since OpenOffice 1.1.2 62*/ 63published interface XAccessibleTable : ::com::sun::star::uno::XInterface 64{ 65 /** Returns the number of used rows in the table. 66 67 <p>The implementation, however, may allow the access of columns 68 beyond this number.</p> 69 70 @return 71 Returns the number of used rows in the table or 0 for an empty 72 table. 73 */ 74 long getAccessibleRowCount (); 75 76 /** Returns the number of used columns in the table. 77 78 <p>The implementation, however, may allow the access of columns 79 beyond this number.</p> 80 81 @return 82 Returns the number of used columns in the table or 0 for an empty 83 table. 84 */ 85 long getAccessibleColumnCount (); 86 87 /** Returns the description text of the specified row in the 88 table. 89 90 @param nRow 91 The index of the row for which to retrieve the description. 92 93 @return 94 Returns the description text of the specified row in the table 95 if such a description exists. Otherwise an empty string is 96 returned. 97 @throws ::com::sun::star::lang::IndexOutOfBoundsException 98 if the specified row index is not valid, i.e. lies not inside 99 the valide range of 0 up to 100 <member>XAccessibleTable::getAccessibleRowCount()</member> - 1. 101 102 */ 103 string getAccessibleRowDescription ([in] long nRow) 104 raises (::com::sun::star::lang::IndexOutOfBoundsException); 105 106 /** Returns the description text of the specified column in the 107 table. 108 109 @param nColumn 110 The index of the column for which to retrieve the description. 111 112 @return 113 Returns the description text of the specified row in the table 114 if such a description exists. Otherwise an empty string is 115 returned. 116 @throws ::com::sun::star::lang::IndexOutOfBoundsException 117 if the specified column index is not valid, i.e. lies not inside 118 the valide range of 0 up to 119 <member>XAccessibleTable::getAccessibleColumnCount()</member> - 1. 120 */ 121 string getAccessibleColumnDescription ([in] long nColumn) 122 raises (::com::sun::star::lang::IndexOutOfBoundsException); 123 124 /** Returns the number of rows occupied by the Accessible at the 125 specified row and column in the table. 126 127 <p>The result differs from 1 if the specified cell spans multiple 128 rows.</p> 129 130 @param nRow 131 Row index of the accessible for which to return the column 132 extent. 133 134 @param nColumn 135 Column index of the accessible for which to return the column 136 extent. 137 138 @return 139 Returns the row extent of the specified cell. 140 141 @throws ::com::sun::star::lang::IndexOutOfBoundsException 142 if the specified row index is not valid, i.e. lies not inside 143 the valide range of 0 up to 144 <member>XAccessibleTable::getAccessibleRowCount()</member> - 1. 145 */ 146 long getAccessibleRowExtentAt ([in] long nRow, [in] long nColumn) 147 raises (::com::sun::star::lang::IndexOutOfBoundsException); 148 149 /** Returns the number of columns occupied by the Accessible at the 150 specified row and column in the table. 151 152 <p>The result differs from 1 if the specified cell spans multiple 153 columns.</p> 154 155 @param nRow 156 Row index of the accessible for which to return the column 157 extent. 158 159 @param nColumn 160 Column index of the accessible for which to return the column 161 extent. 162 163 @return 164 Returns the column extent of the specified. 165 166 @throws ::com::sun::star::lang::IndexOutOfBoundsException 167 if the specified column index is not valid, i.e. lies not inside 168 the valide range of 0 up to 169 <member>XAccessibleTable::getAccessibleColumnCount()</member> - 1. 170 */ 171 long getAccessibleColumnExtentAt ([in] long nRow, [in] long nColumn) 172 raises (::com::sun::star::lang::IndexOutOfBoundsException); 173 174 /** Returns the row headers as an <type>XAccessibleTable</type> 175 object. 176 177 <p>Content and size of the returned table are implementation 178 dependent.</p> 179 180 @return 181 Returns allways a valid reference to an 182 <type>XAccessibleTable</type> object. 183 */ 184 XAccessibleTable getAccessibleRowHeaders (); 185 186 /** Returns the column headers as an <type>XAccessibleTable</type> 187 object. 188 189 <p>Content and size of the returned table are implementation 190 dependent.</p> 191 192 @return 193 Returns allways a valid reference to an 194 <type>XAccessibleTable</type> object. 195 */ 196 XAccessibleTable getAccessibleColumnHeaders (); 197 198 /** Returns a list of the indices of completely selected rows in a 199 table. 200 201 @return 202 The returned sequence contains indices of all completely 203 selected rows in the table. This sequence is in ascending 204 order. If no row is selected then the sequence is empty. 205 */ 206 sequence<long> getSelectedAccessibleRows (); 207 208 /** Returns a list of the indices of completely selected columns in a 209 table. 210 211 @return 212 The returned sequence contains indices of all completely 213 selected columns in the table. This sequence is in ascending 214 order. If no column is selected then the sequence is empty. 215 */ 216 sequence<long> getSelectedAccessibleColumns (); 217 218 /** Returns a boolean value indicating whether the specified row is 219 completely selected. 220 221 @param nRow 222 Index of the row for which to determine whether it is selected. 223 224 @return 225 Returns <TRUE/> if the specified row is selected completely and 226 <FALSE/> otherwise. 227 228 @throws ::com::sun::star::lang::IndexOutOfBoundsException 229 if the specified row index is not valid, i.e. lies not inside 230 the valide range of 0 up to 231 <member>XAccessibleTable::getAccessibleRowCount()</member> - 1. 232 */ 233 boolean isAccessibleRowSelected ([in] long nRow) 234 raises (::com::sun::star::lang::IndexOutOfBoundsException); 235 236 /** Returns a boolean value indicating whether the specified column 237 is completely selected. 238 239 @param nColumn 240 Index of the column for which to determine whether it is 241 selected. 242 243 @return 244 Returns <TRUE/> if the specified column is selected completely 245 and <FALSE/> otherwise. 246 247 @throws ::com::sun::star::lang::IndexOutOfBoundsException 248 if the specified column index is not valid, i.e. lies not inside 249 the valide range of 0 up to 250 <member>XAccessibleTable::getAccessibleColumnCount()</member> - 1. 251 */ 252 boolean isAccessibleColumnSelected ([in] long nColumn) 253 raises (::com::sun::star::lang::IndexOutOfBoundsException); 254 255 /** Returns the <type>XAccessible</type> object at the specified row 256 and column in the table. 257 258 <p>This method has been renamed from the Java name 259 <code>getAccessibleAt</code> to 260 <member>XAccessibleTable::getAccessibleCellAt</member> to avoid 261 ambiguities with the 262 <member>XAccessibleComponent::getAccessibleAt</member> method when 263 accessed, for instance, from StarBasic.</p> 264 265 @param nRow 266 The row index for which to retrieve the cell. 267 268 @param nColumn 269 The column index for which to retrieve the cell. 270 271 @return 272 If both row and column index are valid then the corresponding 273 <type>XAccessible</type> object is returned that represents the 274 requested cell regardless of whether the cell is currently 275 visible (on the screen). 276 277 @throws ::com::sun::star::lang::IndexOutOfBoundsException 278 if the specified column and/or row index is not valid, i.e. lies not inside 279 the valide range of 0 up to 280 <member>XAccessibleTable::getAccessibleColumnCount()</member> - 1. 281 */ 282 XAccessible getAccessibleCellAt ([in] long nRow, [in] long nColumn) 283 raises (::com::sun::star::lang::IndexOutOfBoundsException); 284 285 /** Returns the caption for the table. 286 287 @return 288 If the table has a caption then a reference to it is returned, 289 else an empty reference is returned. 290 */ 291 XAccessible getAccessibleCaption (); 292 293 /** Returns the summary description of the table. 294 295 @return 296 Returns a reference to an implementation dependent 297 <type>XAccessible</type> object representing the table's summary 298 or an empty reference if the table does not support a summary. 299 */ 300 XAccessible getAccessibleSummary (); 301 302 /** Returns a boolean value indicating whether the accessible at the 303 specified row and column is selected. 304 305 @param nRow 306 Row index of the cell for which to determine if the accessible 307 object that spans that cell is selected. 308 309 @param nColumn 310 Column index of the cell for which to determine if the 311 accessible object that spans that cell is selected. 312 313 @return 314 Returns <TRUE/> if the given row and column indices are valid 315 and the specified accessible object is selected. Otherwise 316 <FALSE/> is returned. 317 */ 318 boolean isAccessibleSelected ([in] long nRow, [in] long nColumn) 319 raises (::com::sun::star::lang::IndexOutOfBoundsException); 320 321 /** Returns the child index of the accessible object that spans the 322 specified cell. 323 324 <p>This is the same index that would be returned by calling 325 <member>XAccessibleContext::getAccessibleIndexInParent</member> for 326 that accessible object.</p> 327 328 @param nRow 329 Row index of the accessible object for which to return the child 330 index. 331 332 @param nColumn 333 Row index of the accessible object for which to return the child 334 index. 335 336 @return 337 Child index of the specified accessible object or -1 if one or 338 both of the given indices is/are invalid. 339 */ 340 long getAccessibleIndex ([in] long nRow, [in] long nColumn) 341 raises (::com::sun::star::lang::IndexOutOfBoundsException); 342 343 /** Translate the given child index into the corresponding row 344 index. 345 346 @param nChildIndex 347 Index of the child of the table for which to return the row 348 index. 349 350 @return 351 Returns the row index of the cell of the specified child or the 352 index of the first row if the child spans multiple rows. 353 354 @throws ::com::sun::star::lang::IndexOutOfBoundsException 355 if nChildIndex addresses an invalid row. 356 */ 357 long getAccessibleRow ([in] long nChildIndex) 358 raises (::com::sun::star::lang::IndexOutOfBoundsException); 359 360 /** Translate the given child index into the corresponding column 361 index. 362 363 @param nChildIndex 364 Index of the child of the table for which to return the column 365 index. 366 367 @return 368 Returns the column index of the cell of the specified child or 369 the index of the first column if the child spans multiple 370 columns. 371 372 @throws ::com::sun::star::lang::IndexOutOfBoundsException 373 if nChildIndex addresses an invalid column. 374 */ 375 long getAccessibleColumn ([in] long nChildIndex) 376 raises (::com::sun::star::lang::IndexOutOfBoundsException); 377}; 378 379}; }; }; }; 380 381#endif 382