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