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