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