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