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_sheet_XCellRangesAccess_idl__ 29#define __com_sun_star_sheet_XCellRangesAccess_idl__ 30 31#ifndef __com_sun_star_uno_XInterface_idl__ 32#include <com/sun/star/uno/XInterface.idl> 33#endif 34 35#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 36#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 37#endif 38 39#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 40#include <com/sun/star/lang/IllegalArgumentException.idl> 41#endif 42 43#ifndef __com_sun_star_table_XCell_idl__ 44#include <com/sun/star/table/XCell.idl> 45#endif 46 47#ifndef __com_sun_star_table_XCellRange_idl__ 48#include <com/sun/star/table/XCellRange.idl> 49#endif 50 51//============================================================================= 52 53module com { module sun { module star { module sheet { 54 55//============================================================================= 56 57/** provides access to the cells or to sub-ranges of all sheets. 58 59 @see com::sun::star::sheet::Spreadsheets 60 */ 61published interface XCellRangesAccess: com::sun::star::uno::XInterface 62{ 63 //------------------------------------------------------------------------- 64 65 /** Returns a single cell within the range. 66 67 @param nColumn 68 is the column index of the cell inside the sheet. 69 70 @param nRow 71 is the row index of the cell inside the sheet. 72 73 @param nSheet 74 is the sheet index of the sheet inside the document. 75 76 @returns 77 the specified cell. 78 79 @throws <type scope="com::sun::star::lang">IndexOutOfBoundsException</type> 80 if an index is outside the dimensions of this range. 81 82 @see com::sun::star::table::Cell 83 */ 84 com::sun::star::table::XCell getCellByPosition( 85 [in] long nColumn, 86 [in] long nRow, 87 [in] long nSheet ) 88 raises( com::sun::star::lang::IndexOutOfBoundsException ); 89 90 //------------------------------------------------------------------------- 91 92 /** Returns a sub-range of cells within the range. 93 94 @param nLeft 95 is the column index of the first cell inside the range. 96 97 @param nTop 98 is the row index of the first cell inside the range. 99 100 @param nRight 101 is the column index of the last cell inside the range. 102 103 @param nBottom 104 is the row index of the last cell inside the range. 105 106 @param nSheet 107 is the sheet index of the sheet inside the document. 108 109 @returns 110 the specified cell range. 111 112 @throws <type scope="com::sun::star::lang">IndexOutOfBoundsException</type> 113 if an index is outside the dimensions of this range. 114 115 @see com::sun::star::table::CellRange 116 */ 117 com::sun::star::table::XCellRange getCellRangeByPosition( 118 [in] long nLeft, 119 [in] long nTop, 120 [in] long nRight, 121 [in] long nBottom, 122 [in] long nSheet ) 123 raises( com::sun::star::lang::IndexOutOfBoundsException ); 124 125 //------------------------------------------------------------------------- 126 127 /** Returns a sub-range of cells within the range. 128 129 <p>The sub-range is specified by its name. The format of the range 130 name is dependent of the context of the table. In spreadsheets valid 131 names may be "Sheet1.A1:C5" or "$Sheet1.$B$2" or even defined names for cell ranges 132 such as "MySpecialCell".</p> 133 134 @param aRange 135 the name of the sub-range. 136 137 @returns 138 the specified cell ranges. 139 140 @see com::sun::star::table::CellRange 141 */ 142 sequence <com::sun::star::table::XCellRange> getCellRangesByName( [in] string aRange ) 143 raises( com::sun::star::lang::IllegalArgumentException ); 144 145}; 146 147//============================================================================= 148 149}; }; }; }; 150 151#endif 152 153