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