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_XSheetCellCursor_idl__
25#define __com_sun_star_sheet_XSheetCellCursor_idl__
26
27#ifndef __com_sun_star_sheet_XSheetCellRange_idl__
28#include <com/sun/star/sheet/XSheetCellRange.idl>
29#endif
30
31//=============================================================================
32
33module com {  module sun {  module star {  module sheet {
34
35//=============================================================================
36
37/** provides advanced methods to control the position of a cursor in a
38	spreadsheet.
39
40	@see com::sun::star::sheet::SheetCellCursor
41 */
42published interface XSheetCellCursor: com::sun::star::sheet::XSheetCellRange
43{
44	//-------------------------------------------------------------------------
45
46	/** expands the cursor into the region containing the cells to which
47		it currently points.
48
49		<p>A region is a cell range bounded by empty cells.</p>
50	 */
51	void collapseToCurrentRegion();
52
53	//-------------------------------------------------------------------------
54
55	/** collapses the cursor into the range of the array formula to which
56		it is currently pointing.
57
58		<p>To get the correct result, the top left cell of the original
59		cursor must point to any cell containing an array formula.
60		If not, the cursor is left unchanged.</p>
61	 */
62	void collapseToCurrentArray();
63
64	//-------------------------------------------------------------------------
65
66	/** expands the cursor to merged cell ranges.
67
68		<p>Expands the current cursor range in a way so that all merged
69		cell ranges intersecting the current range will fit completely.
70		If the cursor does not point to any range with merged cells, it
71		is left unchanged.</p>
72	 */
73	void collapseToMergedArea();
74
75	//-------------------------------------------------------------------------
76
77	/** expands the cursor to include the entire columns of the cells
78		to which it is currently pointing.
79	 */
80	void expandToEntireColumns();
81
82	//-------------------------------------------------------------------------
83
84	/** expands the cursor to include the entire rows of the cells to
85		which it is currently pointing.
86	 */
87	void expandToEntireRows();
88
89	//-------------------------------------------------------------------------
90
91	/** changes the size of a cursor range.
92
93		<p>The top left cell of the cursor keeps unmodified. </p>
94
95		@param nColumns
96			the number of columns of the new cursor range.
97		@param nRows
98			the number of rows of the new cursor range.
99	 */
100	void collapseToSize( [in] long nColumns, [in] long nRows );
101
102};
103
104//=============================================================================
105
106}; }; }; };
107
108#endif
109
110