1*d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10*d1766043SAndrew Rist *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*d1766043SAndrew Rist *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19*d1766043SAndrew Rist *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_text_XTextTableCursor_idl__
24cdf0e10cSrcweir#define __com_sun_star_text_XTextTableCursor_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir
31cdf0e10cSrcweir//=============================================================================
32cdf0e10cSrcweir
33cdf0e10cSrcweirmodule com {  module sun {  module star {  module text {
34cdf0e10cSrcweir
35cdf0e10cSrcweir//=============================================================================
36cdf0e10cSrcweir
37cdf0e10cSrcweir/** The TextTableCursor provide methods to navigate throught the table structure, to merge and split cells
38cdf0e10cSrcweir
39cdf0e10cSrcweir    @see com::sun::star::text::TextTable
40cdf0e10cSrcweir    @see com::sun::star::text::TextTableCursor
41cdf0e10cSrcweir    @see com::sun::star::text::Cell
42cdf0e10cSrcweir    @see com::sun::star::text::XTextTable
43cdf0e10cSrcweir */
44cdf0e10cSrcweirpublished interface XTextTableCursor: com::sun::star::uno::XInterface
45cdf0e10cSrcweir{
46cdf0e10cSrcweir	//-------------------------------------------------------------------------
47cdf0e10cSrcweir
48cdf0e10cSrcweir	/** @returns
49cdf0e10cSrcweir				the name of the cell range that is selected by this cursor.
50cdf0e10cSrcweir				<p>The name is the cell name of the top left table cell of the range
51cdf0e10cSrcweir			 	contatenated by ':' with the table cell name of the bottom left table cell of the cell range.
52cdf0e10cSrcweir				If the range consists of one table cell only then the name of that table cell is returned.
53cdf0e10cSrcweir			 </p>
54cdf0e10cSrcweir        @see com::sun:star::text::CellRange
55cdf0e10cSrcweir	 */
56cdf0e10cSrcweir	string getRangeName();
57cdf0e10cSrcweir
58cdf0e10cSrcweir	//-------------------------------------------------------------------------
59cdf0e10cSrcweir
60cdf0e10cSrcweir	/** moves the cursor to the cell with the specified name.
61cdf0e10cSrcweir
62cdf0e10cSrcweir		@param aCellName
63cdf0e10cSrcweir			specifies the name of the cell to go to.
64cdf0e10cSrcweir
65cdf0e10cSrcweir		@param bExpand
66cdf0e10cSrcweir			determines wether the selection is to be expanded.
67cdf0e10cSrcweir
68cdf0e10cSrcweir        @see com::sun::star::text::Cell
69cdf0e10cSrcweir	 */
70cdf0e10cSrcweir	boolean gotoCellByName( [in] string aCellName,
71cdf0e10cSrcweir			 [in] boolean bExpand );
72cdf0e10cSrcweir
73cdf0e10cSrcweir	//-------------------------------------------------------------------------
74cdf0e10cSrcweir
75cdf0e10cSrcweir	/** moves the cursor to the left neighbor.
76cdf0e10cSrcweir
77cdf0e10cSrcweir		@param nCount
78cdf0e10cSrcweir			the number of cells to move.
79cdf0e10cSrcweir
80cdf0e10cSrcweir		@param bExpand
81cdf0e10cSrcweir			determines wether the selection is to be expanded.
82cdf0e10cSrcweir	 */
83cdf0e10cSrcweir	boolean goLeft( [in] short nCount,
84cdf0e10cSrcweir			 [in] boolean bExpand );
85cdf0e10cSrcweir
86cdf0e10cSrcweir	//-------------------------------------------------------------------------
87cdf0e10cSrcweir
88cdf0e10cSrcweir	/** moves the cursor to the right neighbor.
89cdf0e10cSrcweir
90cdf0e10cSrcweir		@param nCount
91cdf0e10cSrcweir			the number of cells to move.
92cdf0e10cSrcweir
93cdf0e10cSrcweir		@param bExpand
94cdf0e10cSrcweir			determines wether the selection is to be expanded.
95cdf0e10cSrcweir	 */
96cdf0e10cSrcweir	boolean goRight( [in] short nCount,
97cdf0e10cSrcweir			 [in] boolean bExpand );
98cdf0e10cSrcweir
99cdf0e10cSrcweir	//-------------------------------------------------------------------------
100cdf0e10cSrcweir
101cdf0e10cSrcweir	/** moves the cursor to the top neighbor.
102cdf0e10cSrcweir
103cdf0e10cSrcweir		@param nCount
104cdf0e10cSrcweir			the number of cells to move.
105cdf0e10cSrcweir
106cdf0e10cSrcweir		@param bExpand
107cdf0e10cSrcweir			determines wether the selection is to be expanded.
108cdf0e10cSrcweir	 */
109cdf0e10cSrcweir	boolean goUp( [in] short nCount,
110cdf0e10cSrcweir			 [in] boolean bExpand );
111cdf0e10cSrcweir
112cdf0e10cSrcweir	//-------------------------------------------------------------------------
113cdf0e10cSrcweir
114cdf0e10cSrcweir	/** moves the cursor to the bottom neighbor cell.
115cdf0e10cSrcweir
116cdf0e10cSrcweir		@param nCount
117cdf0e10cSrcweir			the number of cells to move.
118cdf0e10cSrcweir
119cdf0e10cSrcweir		@param bExpand
120cdf0e10cSrcweir			determines wether the selection is to be expanded.
121cdf0e10cSrcweir	 */
122cdf0e10cSrcweir	boolean goDown( [in] short nCount,
123cdf0e10cSrcweir			 [in] boolean bExpand );
124cdf0e10cSrcweir
125cdf0e10cSrcweir	//-------------------------------------------------------------------------
126cdf0e10cSrcweir
127cdf0e10cSrcweir	/** moves the cursor to the top left cell of the table.
128cdf0e10cSrcweir
129cdf0e10cSrcweir		@param bExpand
130cdf0e10cSrcweir			determines wether the selection is to be expanded.
131cdf0e10cSrcweir	 */
132cdf0e10cSrcweir	void gotoStart( [in] boolean bExpand );
133cdf0e10cSrcweir
134cdf0e10cSrcweir	//-------------------------------------------------------------------------
135cdf0e10cSrcweir
136cdf0e10cSrcweir	/** moves the cursor to the bottom right cell of the table.
137cdf0e10cSrcweir
138cdf0e10cSrcweir		@param bExpand
139cdf0e10cSrcweir			determines wether the selection is to be expanded.
140cdf0e10cSrcweir	 */
141cdf0e10cSrcweir	void gotoEnd( [in] boolean bExpand );
142cdf0e10cSrcweir
143cdf0e10cSrcweir	//-------------------------------------------------------------------------
144cdf0e10cSrcweir
145cdf0e10cSrcweir	/** merges the selected range of cells.
146cdf0e10cSrcweir
147cdf0e10cSrcweir        @see com:sun::star::CellRange
148cdf0e10cSrcweir	 */
149cdf0e10cSrcweir	boolean mergeRange();
150cdf0e10cSrcweir
151cdf0e10cSrcweir	//-------------------------------------------------------------------------
152cdf0e10cSrcweir
153cdf0e10cSrcweir	/** splits the range of cells.
154cdf0e10cSrcweir
155cdf0e10cSrcweir		@param nCount
156cdf0e10cSrcweir			specifies the number of new cells that will be created
157cdf0e10cSrcweir			for each cell contained in the range.
158cdf0e10cSrcweir
159cdf0e10cSrcweir        @param bHorizontal
160cdf0e10cSrcweir            <true/> if the range should be split vertically.
161cdf0e10cSrcweir            Otherwise it will be split horizontally.
162cdf0e10cSrcweir
163cdf0e10cSrcweir        @see com:sun::star::Cell
164cdf0e10cSrcweir        @see com:sun::star::CellRange
165cdf0e10cSrcweir	 */
166cdf0e10cSrcweir	boolean splitRange( [in] short nCount,
167cdf0e10cSrcweir			 [in] boolean bHorizontal );
168cdf0e10cSrcweir
169cdf0e10cSrcweir};
170cdf0e10cSrcweir
171cdf0e10cSrcweir//=============================================================================
172cdf0e10cSrcweir
173cdf0e10cSrcweir}; }; }; };
174cdf0e10cSrcweir
175cdf0e10cSrcweir#endif
176