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