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