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_report_XReportComponent_idl__
24#define __com_sun_star_report_XReportComponent_idl__
25
26#ifndef __com_sun_star_container_XChild_idl__
27#include <com/sun/star/container/XChild.idl>
28#endif
29
30#ifndef __com_sun_star_lang_XComponent_idl__
31#include <com/sun/star/lang/XComponent.idl>
32#endif
33
34#ifndef __com_sun_star_container_XNamed_idl__
35#include <com/sun/star/container/XNamed.idl>
36#endif
37
38#ifndef __com_sun_star_beans_XPropertySet_idl__
39#include <com/sun/star/beans/XPropertySet.idl>
40#endif
41#ifndef __com_sun_star_util_XCloneable_idl__
42#include <com/sun/star/util/XCloneable.idl>
43#endif
44#ifndef __com_sun_star_awt_XControlModel_idl__
45#include <com/sun/star/awt/XControlModel.idl>
46#endif
47#ifndef __com_sun_star_drawing_XShape_idl__
48#include <com/sun/star/drawing/XShape.idl>
49#endif
50
51//=============================================================================
52
53 module com {  module sun {  module star {  module report {
54
55published interface XSection;
56
57//=============================================================================
58/** describes a component which may be part of a report.
59
60    @see XReportDefinition
61 */
62published interface XReportComponent
63{
64    interface com::sun::star::util::XCloneable;
65    /** identifies the component as a candidate for being part of a report.
66        <p>This interface also provides the access to the component's parent.</p>
67     */
68    interface com::sun::star::container::XChild;
69
70    /** allows life-time control of report components.
71     */
72    interface com::sun::star::lang::XComponent;
73
74    interface com::sun::star::drawing::XShape;
75
76    /** gives access to the properties.
77    */
78    interface com::sun::star::beans::XPropertySet;
79
80    /** the name of the component.
81     */
82    [attribute,bound] string Name
83    {
84        set raises ( com::sun::star::beans::PropertyVetoException );
85    };
86
87    /** specifies the height of the control.
88     */
89    [attribute,bound] long Height;
90
91    /** specifies the horizontal position of the control.
92     */
93    [attribute,bound] long PositionX;
94
95    /** specifies the vertical position of the control.
96     */
97    [attribute,bound] long PositionY;
98
99    /** specifies the width of the control.
100     */
101    [attribute,bound] long Width;
102
103    /** specifies the border style of the control.
104
105        <pre>
106        0: No border
107        2: simple border
108        </pre>
109     */
110    [attribute,bound] short ControlBorder
111    {
112        set raises ( com::sun::star::lang::IllegalArgumentException,com::sun::star::beans::UnknownPropertyException );
113        get raises ( com::sun::star::beans::UnknownPropertyException );
114    };
115
116    //-------------------------------------------------------------------------
117
118    /** specifies the color of the border, if present
119
120        <p>Not every border style (see <member>Border</member>) may support coloring.
121        For instance, usually a border with 3D effect will ignore the BorderColor setting.</p>
122     */
123    [attribute,bound] long ControlBorderColor
124    {
125        set raises ( com::sun::star::lang::IllegalArgumentException,com::sun::star::beans::UnknownPropertyException );
126        get raises ( com::sun::star::beans::UnknownPropertyException );
127    };
128
129    /** Specifies that recurring values are printed.
130        If set to <TRUE/> then the value will be printed every time. If set to <FALSE/> then the value will only be printed once.
131        The default value is <TRUE/>.
132    */
133    [attribute,bound] boolean PrintRepeatedValues
134    {
135        set raises ( com::sun::star::beans::UnknownPropertyException );
136        get raises ( com::sun::star::beans::UnknownPropertyException );
137    };
138
139        /** is used for subreports and contains the names of columns of the parent report.
140    <p> These columns are typically the foreign key fields of the parent report.
141    The values of theses columns are used to identify the data for the subreport.
142    Each time the parent report changes it's current row, the subreport requeries
143    it's data based on the values of the master fields.</p>
144    <p>If the report is no sub report (e.g. it's parent is not a report itself), this
145    property is not evaluated.</p>
146
147    */
148    [attribute,bound] sequence<string> MasterFields
149    {
150        set raises ( com::sun::star::beans::UnknownPropertyException );
151        get raises ( com::sun::star::beans::UnknownPropertyException );
152    };
153
154    /**is used for subreports and contains the names of the columns of the subreport
155    which are related to the master fields of the parent report.
156    <p>Entries in this sequence can either denote column names in the sub report,
157    or paramater names.<br/>
158    For instance, you could base the report on the SQL statement
159    <code>SELECT * FROM invoices WHERE cust_ref = :cid</code>, and add <code>cid</code>
160    to the DetailFields property. In this case, the parameter will be filled from
161    the corresponding master field.<br/>
162    Alternatively, you could simply base your report on the table <code>invoices</code>,
163    and add the column name <code>cust_ref</code> to the DetailFields. In this case,
164    and implicit filter clause <code>WHERE cust_ref = :&lt;new_param_name&gt;</code> will
165    be created, and the artificial parameter will be filled from the corresponding
166    master field.<br/>
167    If a string in this property denotes both a column name and a parameter name, it
168    is undefined which way it is interpreted, but implementations of the service are required
169    to either decide for the parameter or the column, and proceed as usual.
170    </p>
171    <p>The columns specified herein typically represent a part of the primary key
172    fields or their aliases of the detail report.</p>
173    <p>If the report is no sub report (e.g. it's parent is not a report itself), this
174    property is not evaluated.</p>
175    *
176    */
177    [attribute,bound] sequence<string> DetailFields
178    {
179        set raises ( com::sun::star::beans::UnknownPropertyException );
180        get raises ( com::sun::star::beans::UnknownPropertyException );
181    };
182
183
184    /** Specifies the section where the control belongs to.
185        This is a shortcut to get control hierarchy up.
186        This value is <NULL/> when the control was not inserted in any section.
187    */
188    [attribute,readonly] com::sun::star::report::XSection Section;
189};
190
191//=============================================================================
192
193}; }; }; };
194
195/*=============================================================================
196
197=============================================================================*/
198#endif
199