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