xref: /trunk/main/offapi/com/sun/star/text/TextTable.idl (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
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_TextTable_idl__
28#define __com_sun_star_text_TextTable_idl__
29
30#ifndef __com_sun_star_text_TextContent_idl__
31#include <com/sun/star/text/TextContent.idl>
32#endif
33
34#ifndef __com_sun_star_util_Color_idl__
35#include <com/sun/star/util/Color.idl>
36#endif
37
38#ifndef __com_sun_star_text_XTextTable_idl__
39#include <com/sun/star/text/XTextTable.idl>
40#endif
41#ifndef __com_sun_star_text_TableColumnSeparator_idl__
42#include <com/sun/star/text/TableColumnSeparator.idl>
43#endif
44
45#ifndef __com_sun_star_container_XNamed_idl__
46#include <com/sun/star/container/XNamed.idl>
47#endif
48
49#ifndef __com_sun_star_beans_XPropertySet_idl__
50#include <com/sun/star/beans/XPropertySet.idl>
51#endif
52
53#ifndef __com_sun_star_style_GraphicLocation_idl__
54#include <com/sun/star/style/GraphicLocation.idl>
55#endif
56#ifndef __com_sun_star_style_BreakType_idl__
57#include <com/sun/star/style/BreakType.idl>
58#endif
59#ifndef __com_sun_star_table_ShadowFormat_idl__
60#include <com/sun/star/table/ShadowFormat.idl>
61#endif
62#ifndef __com_sun_star_table_TableBorder_idl__
63#include <com/sun/star/table/TableBorder.idl>
64#endif
65#ifndef __com_sun_star_table_XCellRange_idl__
66#include <com/sun/star/table/XCellRange.idl>
67#endif
68#ifndef __com_sun_star_table_XAutoFormattable_idl__
69#include <com/sun/star/table/XAutoFormattable.idl>
70#endif
71#ifndef __com_sun_star_chart_XChartDataArray_idl__
72#include <com/sun/star/chart/XChartDataArray.idl>
73#endif
74#ifndef __com_sun_star_util_XSortable_idl__
75#include <com/sun/star/util/XSortable.idl>
76#endif
77#ifndef __com_sun_star_sheet_XCellRangeData_idl__
78#include <com/sun/star/sheet/XCellRangeData.idl>
79#endif
80#ifndef _com_sun_star_xml_UserDefinedAttributesSupplier_idl_
81#include <com/sun/star/xml/UserDefinedAttributesSupplier.idl>
82#endif
83
84
85//=============================================================================
86
87 module com {  module sun {  module star {  module text {
88
89//=============================================================================
90
91/** is a table of text cells which is anchored to a surrounding text.
92
93    <p>Note: The anchor of the actual implementation for text tables
94    does not have a position in the text. Thus that anchor can not be
95    used for some operation like <member>XTextContent::attach</member> or
96    <member>XText::insertTextContent</member>
97    or other function that require the object to have a position in the text.</p>
98
99    <p>The reason why a text table still needs an anchor is that for example
100    tables should be insertable via <member>XText::insertTextContent</member>
101    and that interface uses a parameter of that type.</p>
102
103    @example
104
105    <p>Create and insert a TextTable:</p>
106
107    <listing>
108    xTable = xTextDoc.createInstance( "com.sun.star.text.TextTable" )
109    xTable.initialize(5, 8)
110    xTable.HoriOrient = 0 'com::sun::star::text::HoriOrientation::NONE
111    xTable.LeftMargin = 2000
112    xTable.RightMargin = 1500
113    xTextDoc.getText.insertTextContent( xTextRange, xTable, false )
114    </listing>
115
116    @see    com::sun::star::text::Cell
117    @see    com::sun::star::text::CellRange
118    @see    com::sun::star::text::TableColumns
119    @see    com::sun::star::text::TableRows
120    @see    com::sun::star::text::TextTableCursor
121 */
122published service TextTable
123{
124    service com::sun::star::text::TextContent;
125
126    [optional] service com::sun::star::xml::UserDefinedAttributesSupplier;
127
128    interface com::sun::star::text::XTextTable;
129
130    interface com::sun::star::container::XNamed;
131
132    interface com::sun::star::table::XCellRange;
133
134    interface com::sun::star::chart::XChartDataArray;
135
136    interface com::sun::star::table::XAutoFormattable;
137
138    interface com::sun::star::util::XSortable;
139
140    [optional] interface com::sun::star::sheet::XCellRangeData;
141
142    /** determins the type of break that is applied at the beginning of the table.@see com.sun.star.style.BreakType
143     */
144    [property] com::sun::star::style::BreakType BreakType;
145    //-------------------------------------------------------------------------
146
147    /** contains the left margin of the table.
148     */
149    [property] long LeftMargin;
150    //-------------------------------------------------------------------------
151
152    /** contains the right margin of the table.
153     */
154    [property] long RightMargin;
155    //-------------------------------------------------------------------------
156
157    /** contains the horizontal orientation.@see com.sun.star.text.HoriOrientation
158     */
159    [property] short HoriOrient;
160    //-------------------------------------------------------------------------
161
162    /** Setting this property to TRUE prevents page or column
163        breaks between this table and the following paragraph or text table.
164     */
165    [property] boolean KeepTogether;
166    //-------------------------------------------------------------------------
167
168    /** Setting this property to FALSE prevents the table from
169        getting spread on two pages.
170     */
171    [property] boolean Split;
172    //-------------------------------------------------------------------------
173
174    /** If a page break property is set at the table,
175        this property contains the new value for the page number.
176     */
177    [property] short PageNumberOffset;
178    //-------------------------------------------------------------------------
179
180    /** If this property is set, it creates a page break before the
181        table and assigns the value as the name of the new page style sheet to use.
182     */
183    [property] string PageDescName;
184    //-------------------------------------------------------------------------
185
186    /** determins the width of the table relative to its environment.
187     */
188    [property] short RelativeWidth;
189    //-------------------------------------------------------------------------
190    /** determins if the value of the relative width is valid.
191     */
192    [property] boolean IsWidthRelative;
193    //-------------------------------------------------------------------------
194
195    /** determins if the first row of the table is repeated on every new page.
196     */
197    [property] boolean RepeatHeadline;
198        //-------------------------------------------------------------------------
199        /** determins the number of rows of the table repeated on every new page.
200         */
201        [optional, property] long HeaderRowCount;
202        //-------------------------------------------------------------------------
203
204    /** determins the type, color and size of the shadow.@see com.sun.star.table.ShadowFormat
205     */
206    [property] com::sun::star::table::ShadowFormat ShadowFormat;
207    //-------------------------------------------------------------------------
208
209    /** determins the top margin.
210     */
211    [property] long TopMargin;
212    //-------------------------------------------------------------------------
213
214    /** determins the bottom margin.
215     */
216    [property] long BottomMargin;
217    //-------------------------------------------------------------------------
218
219    /** determins if the background color is transparent.
220     */
221    [property] boolean BackTransparent;
222    //-------------------------------------------------------------------------
223
224    /** contains the absolute table width.
225
226        <p>As this is only a describing property the value of the actual table may vary depending on the
227        environment the table is located in and the settings of LeftMargin,
228        RightMargin and HoriOrient. </p>
229     */
230    [property] long Width;
231    //-------------------------------------------------------------------------
232
233    /** determins if the first row of the table should be treated as
234        axis labels when a chart is to be created.
235     */
236    [property] boolean ChartRowAsLabel;
237    //-------------------------------------------------------------------------
238
239    /** determins if the first column of the table should be treated as
240        axis labels when a chart is to be created.
241     */
242    [property] boolean ChartColumnAsLabel;
243    //-------------------------------------------------------------------------
244
245    /** contains the description of the table borders.@see com.sun.star.table.TableBorder
246     */
247    [property] com::sun::star::table::TableBorder TableBorder;
248    //-------------------------------------------------------------------------
249
250    /** contains the column description of the table.
251             @see com.sun.star.text.TableColumnSeparator
252     */
253    [property] sequence<com::sun::star::text::TableColumnSeparator> TableColumnSeparators;
254    //-------------------------------------------------------------------------
255
256    /** contains the sum of the column width values used in TableColumnSeparators.
257     */
258    [property] short TableColumnRelativeSum;
259    //-------------------------------------------------------------------------
260
261    /** contains the color of the background.
262     */
263    [property] com::sun::star::util::Color BackColor;
264    //-------------------------------------------------------------------------
265
266    /** contains the URL for the background graphic.
267     */
268    [property] string BackGraphicURL;
269
270    //-------------------------------------------------------------------------
271
272    /** contains the name of the file filter for the background graphic.
273     */
274    [property] string BackGraphicFilter;
275
276    //-------------------------------------------------------------------------
277
278    /** determines the position of the background graphic.@see GraphicLocation
279     */
280    [property] com::sun::star::style::GraphicLocation BackGraphicLocation;
281
282    //-------------------------------------------------------------------------
283
284    /** determines whether borders of neighbouring table cells are
285     * collapsed into one
286     */
287    [optional, property] boolean CollapsingBorders;
288
289};
290
291//=============================================================================
292
293}; }; }; };
294
295#endif
296