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#ifndef __com_sun_star_text_XTextTable_idl__
24#define __com_sun_star_text_XTextTable_idl__
25
26#ifndef __com_sun_star_text_XTextContent_idl__
27#include <com/sun/star/text/XTextContent.idl>
28#endif
29
30#ifndef __com_sun_star_table_XTableRows_idl__
31#include <com/sun/star/table/XTableRows.idl>
32#endif
33
34#ifndef __com_sun_star_table_XTableColumns_idl__
35#include <com/sun/star/table/XTableColumns.idl>
36#endif
37
38#ifndef __com_sun_star_table_XCell_idl__
39#include <com/sun/star/table/XCell.idl>
40#endif
41
42#ifndef __com_sun_star_text_XTextTableCursor_idl__
43#include <com/sun/star/text/XTextTableCursor.idl>
44#endif
45
46
47//=============================================================================
48
49 module com {  module sun {  module star {  module text {
50
51//=============================================================================
52
53/** manages a text table.
54
55    @see com::sun::star::text::TextTable
56    @see com::sun::star::text::Cell
57 */
58published interface XTextTable: com::sun::star::text::XTextContent
59{
60	//-------------------------------------------------------------------------
61
62	/** determines the numbers of rows and columns of the text table.
63
64        <p> This method must be called after the object is created and
65            before the object is insert or attached elsewhere.
66		</p>
67	 */
68	void initialize( [in] long nRows,
69			 [in] long nColumns );
70
71	//-------------------------------------------------------------------------
72
73	/** @returns
74            the access object for the text table rows.
75
76        @see com::sun::star::table::XTableRows
77	 */
78	com::sun::star::table::XTableRows getRows();
79
80	//-------------------------------------------------------------------------
81
82	/** @returns
83            the access object for the text table columns.
84
85        @see com::sun::star::table::XTableColumns
86	 */
87	com::sun::star::table::XTableColumns getColumns();
88
89	//-------------------------------------------------------------------------
90
91	/** @returns
92            the <type scope="com::sun::star::table">XCell</type> interface of the cell with the specified name.
93
94        @param aCellName
95            is a concatenation of the alphanumeric column name and the
96            index of the row.
97
98            <p>Example: The cell in the 4th column and third row has the name "D3".
99
100            <p>In cells that are split, the naming convention is more complex.
101            In this case the name is a concatenation of the former cell name
102            (i.e. "D3") and the number of the new column and row index inside
103            of the original table cell separated by dots. This is done
104            recursively.
105
106            <p>Example: If the cell "D3" is horizontally split, it now contains
107            the cells "D3.1.1" and "D3.1.2"
108
109        @see com::sun::star::table::Cell
110        @see com::sun::star::table::XCell
111	 */
112	com::sun::star::table::XCell getCellByName( [in] string aCellName );
113
114	//-------------------------------------------------------------------------
115
116	/** @returns
117            the names of all cells of this text table.
118	 */
119	sequence<string> getCellNames();
120
121	//-------------------------------------------------------------------------
122
123	/** creates a text table cursor and returns the
124		<type>XTextTableCursor</type> interface.
125
126		<p>Initially the cursor is positioned in the cell with the specified name.
127		</p>
128
129        @see com::sun::star::text::TextTableCursor
130	 */
131	com::sun::star::text::XTextTableCursor createCursorByCellName( [in] string aCellName );
132
133};
134
135//=============================================================================
136
137}; }; }; };
138
139#endif
140