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_XCellRangesQuery_idl__
29#define __com_sun_star_sheet_XCellRangesQuery_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_sheet_XSheetCellRanges_idl__
36#include <com/sun/star/sheet/XSheetCellRanges.idl>
37#endif
38
39#ifndef __com_sun_star_table_CellAddress_idl__
40#include <com/sun/star/table/CellAddress.idl>
41#endif
42
43#ifndef __com_sun_star_table_CellRangeAddress_idl__
44#include <com/sun/star/table/CellRangeAddress.idl>
45#endif
46
47//=============================================================================
48
49module com {  module sun {  module star {  module sheet {
50
51//=============================================================================
52
53/** provides methods to query for cell ranges with specific contents.
54
55	<p>All methods return a collection of cell ranges.</p>
56
57	@see com::sun::star::sheet::SheetRangesQuery
58	@see com::sun::star::sheet::SheetCellRanges
59 */
60published interface XCellRangesQuery: com::sun::star::uno::XInterface
61{
62	//-------------------------------------------------------------------------
63
64	/** queries all visible cells.
65
66		@returns
67			the visible (not hidden) cells of the current cell range(s).
68	 */
69	com::sun::star::sheet::XSheetCellRanges queryVisibleCells();
70
71	//-------------------------------------------------------------------------
72
73	/** queries all empty cells.
74
75		@returns
76			the empty cells of the current cell range(s).
77	 */
78	com::sun::star::sheet::XSheetCellRanges queryEmptyCells();
79
80	//-------------------------------------------------------------------------
81
82	/** queries all cells with the specified content type(s).
83
84		@param nContentFlags
85			a combination of <type>CellFlags</type> flags.
86
87			<p>Attention: Despite the <type>CellFlags</type> flags are
88			<atom>long</atom> values, this method expects a <atom>short</atom>
89			parameter.
90
91		@returns
92			all cells of the current cell range(s) with the specified
93			content type(s).
94	 */
95	com::sun::star::sheet::XSheetCellRanges queryContentCells(
96			[in] short nContentFlags );
97
98	//-------------------------------------------------------------------------
99
100	/** queries all formula cells with the specified result type.
101
102		@param nResultFlags
103			a combination of <type>FormulaResult</type> flags.
104
105		@returns
106			all formula cells of the current cell range(s) with the
107			specified result type(s).
108	 */
109	com::sun::star::sheet::XSheetCellRanges queryFormulaCells(
110			[in] long nResultFlags );
111
112	//-------------------------------------------------------------------------
113
114	/** queries all cells with different values in a specified row.
115
116		<p>This method takes each column of the current cell range(s) and
117		compares all cells with the cell in the specified row. All cells
118		which are different to this comparison cell will be returned.</p>
119
120		@param aCompare
121			contains a cell address with the row index used for comparison.
122			Only this row index is of interest.
123
124		@returns
125			all cells of the current cell range(s) which are different
126			to the comparison cell of each column.
127	 */
128	com::sun::star::sheet::XSheetCellRanges queryColumnDifferences(
129			[in] com::sun::star::table::CellAddress aCompare );
130
131	//-------------------------------------------------------------------------
132
133	/** queries all cells with different values in a specified column.
134
135		<p>This method takes each row of the current cell range(s) and
136		compares all cells with the cell in the specified column. All cells
137		which are different to this comparison cell will be returned.</p>
138
139		@param aCompare
140			contains a cell address with the column index used for
141			comparison. Only this column index is of interest.
142
143		@returns
144			all cells of the current cell range(s) which are different
145			to the comparison cell of each row.
146	 */
147	com::sun::star::sheet::XSheetCellRanges queryRowDifferences(
148			[in] com::sun::star::table::CellAddress aCompare );
149
150	//-------------------------------------------------------------------------
151
152	/** intersects the current cell range(s) with the specified cell range.
153
154		@param aRange
155			contains the cell range for intersection.
156
157		@return
158			all cells of the current cell range(s) which are contained
159			in the passed cell range.
160
161	 */
162	com::sun::star::sheet::XSheetCellRanges queryIntersection(
163			[in] com::sun::star::table::CellRangeAddress aRange );
164
165};
166
167//=============================================================================
168
169}; }; }; };
170
171#endif
172
173