xref: /aoo42x/main/offapi/com/sun/star/text/MailMerge.idl (revision 2a413f17)
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_MailMerge_idl__
24#define __com_sun_star_text_MailMerge_idl__
25
26#ifndef __com_sun_star_task_XJob_idl__
27#include <com/sun/star/task/XJob.idl>
28#endif
29#ifndef __com_sun_star_sdbc_XResultSet_idl__
30#include <com/sun/star/sdbc/XResultSet.idl>
31#endif
32#ifndef __com_sun_star_sdbc_XConnection_idl__
33#include <com/sun/star/sdbc/XConnection.idl>
34#endif
35#ifndef __com_sun_star_frame_XModel_idl__
36#include <com/sun/star/frame/XModel.idl>
37#endif
38#ifndef __com_sun_star_beans_XPropertySet_idl__
39#include <com/sun/star/beans/XPropertySet.idl>
40#endif
41#ifndef __com_sun_star_text_XMailMergeBroadcaster_idl__
42#include <com/sun/star/text/XMailMergeBroadcaster.idl>
43#endif
44#ifndef __com_sun_star_sdb_DataAccessDescriptor_idl__
45#include <com/sun/star/sdb/DataAccessDescriptor.idl>
46#endif
47
48//=============================================================================
49
50 module com {  module sun {  module star {  module text {
51
52//=============================================================================
53
54/** Gives access to mail merge functionality.
55
56    @since OpenOffice 1.1.2
57 */
58published service MailMerge
59{
60    /** interface to execute the mail merge action.
61
62        <p>The <member scope="com::sun::star::task">XJob::execute</member>
63        method of the interface accepts exactly the same properties
64        as provided by this service in its argument sequence.</p>
65
66        <p>The default values for the properties to be used in the method
67        call are those given by this service. If a property is also listed
68        in the argument sequence that value will be used for the call.
69        The value of the property in this service will remain unchanged
70        by that.</p>
71     */
72    interface com::sun::star::task::XJob;
73
74    /** interface to access the services properties.
75     */
76    interface com::sun::star::beans::XPropertySet;
77
78    /** interface to notify mail merge listeners.
79     */
80    [optional] interface com::sun::star::text::XMailMergeBroadcaster;
81
82    //=============================================================================
83
84    /* database properties */
85
86    //=============================================================================
87	/** allows to specify the data which the mail merge should be based on.
88
89		<p>This service describe the interaction between all data access related properties,
90		namely <member>DataSourceName</member>, <member>Command</member>, <member>CommandType</member>,
91		<member>Connection</member>, <member>Selection</member>, <member>ResultSet</member>,
92		<member>Filter</member> and <member>EscapeProcessing</member>
93	*/
94	service com::sun::star::sdb::DataAccessDescriptor;
95
96    /** contains the name of the data source that is to be used for merging.
97
98        <p>For the interaction of this property with other data access relevant properties, see
99		the <type scope="com::sun::star::sdb">DataAccessDescriptor</type> service.</p>
100     */
101    [property] string DataSourceName;
102
103    //=============================================================================
104
105    /** determines the type of the database command as
106        described in <type scope="com::sun::star::sdb">CommandType</type>
107
108        <p>For the interaction of this property with other data access relevant properties, see
109		the <type scope="com::sun::star::sdb">DataAccessDescriptor</type> service.</p>
110     */
111    [property] long CommandType;
112
113    //=============================================================================
114
115    /** contains the database command.
116
117        <p>For the interaction of this property with other data access relevant properties, see
118		the <type scope="com::sun::star::sdb">DataAccessDescriptor</type> service.</p>
119     */
120    [property] string Command;
121
122    //=============================================================================
123
124    /** provides access to a
125        <type scope="com::sun::star::sdbc">XResultSet</type> of
126        a <type scope="com::sun::star::sdbc">ResultSet</type> service.
127
128		<p>Note that any superservices of <type scope="com::sun::star::sdbc">ResultSet</type>
129		are also allowed. Especially, this member can denote an instance of the
130		<type scope="com::sun::star::sdb">RowSet</type>, or an instance obtained
131		by calling <member scope="com::sun::star::sdb">XResultSetAccess::createResultSet</member>
132		on such a <type scope="com::sun::star::sdb">RowSet</type>. This becomes important in
133		conjunction with the <member>Selection</member> property.</p>
134
135        <p>For the interaction of this property with other data access relevant properties, see
136		the <type scope="com::sun::star::sdb">DataAccessDescriptor</type> service.</p>
137     */
138    [property] com::sun::star::sdbc::XResultSet ResultSet;
139
140    //=============================================================================
141
142    /** contains the connection to the database.
143
144        <p>For the interaction of this property with other data access relevant properties, see
145		the <type scope="com::sun::star::sdb">DataAccessDescriptor</type> service.</p>
146     */
147    [property] com::sun::star::sdbc::XConnection ActiveConnection;
148
149    //=============================================================================
150
151    /** contains a selection that refers to bookmarks of the ResultSet.
152
153		<p>This property is relevant in conjunction with the <member>ResultSet</member>
154		only. A single element of this array describes a bookmark relative to the result set.<br/>
155		Note that this implies that the <member>ResultSet</member> needs to support the
156		<type scope="com::sun::star::sdbcx">XRowLocate</type> interface.</p>
157
158		<p>If this array is empty, the whole result set, as described by <member>ResultSet</member>
159		respectively the triple (<member>DataSourceName</member>, <member>DataCommandType</member>,
160		<member>DataCommand</member>).</p>
161
162        <p>For the interaction of this property with other data access relevant properties, see
163		the <type scope="com::sun::star::sdb">DataAccessDescriptor</type> service.</p>
164     */
165    [property] sequence< any > Selection;
166
167    //=============================================================================
168
169    /** returns if escape processing is on or off.
170
171        <p>For the interaction of this property with other data access relevant properties, see
172		the <type scope="com::sun::star::sdb">DataAccessDescriptor</type> service.</p>
173     */
174    [property] boolean EscapeProcessing;
175
176    //=============================================================================
177
178    /** contains a filter expression for an SQL statement.
179
180        <p>For the interaction of this property with other data access relevant properties, see
181		the <type scope="com::sun::star::sdb">DataAccessDescriptor</type> service.</p>
182     */
183    [property] string Filter;
184
185    //=============================================================================
186
187    /* input properties */
188
189    //=============================================================================
190
191    /** contains the URL of a text document that is to be processed.
192
193        <p>If this property is not set an empty document is created.</p>
194     */
195    [property] string DocumentURL;
196
197    //=============================================================================
198
199    /** provides access to the model of the document to be processed.
200
201        <p>This property will automatically be set to the documents model
202        if a document URL was set.</p>
203     */
204    [property, readonly] com::sun::star::frame::XModel Model;
205
206    //=============================================================================
207
208    /* output properties */
209
210    //=============================================================================
211
212    /** determines the destination of the mail merge action.
213
214        @see com::sun::star::text::MailMergeType
215     */
216    [property] short OutputType;
217
218    //=============================================================================
219
220    /** determines whether single print jobs will be generated per output document.
221
222        <p>This property is only evaluated for printer output.</p>
223     */
224    [property] boolean SinglePrintJobs;
225
226    //=============================================================================
227
228    /** contains the path where generated files are created.
229
230        <p>If "OutputURL" or "FileNamePrefix" are empty the missing value is
231        generated from the location or title of the source documents.</p>
232
233        <p>This property is only evaluated for file output.</p>
234     */
235    [property] string OutputURL;
236
237    //=============================================================================
238
239    /** determines whether file names of created files are generated using
240        the content of a database column.
241
242        <p>This property is only evaluated for file output.</p>
243     */
244    [property] boolean FileNameFromColumn;
245
246    //=============================================================================
247
248    /** contains the name of the column to generate the output file names.
249
250        <p>If FileNameFromColumn is true the content of the related column
251        is added to the OutputURL.</p>
252        <p>If "OutputURL" or "FileNamePrefix" are empty the missing value is
253        generated from the location or title of the source documents.</p>
254
255        <p>This property is only evaluated for file output.</p>
256     */
257    [property] string FileNamePrefix;
258
259    //=============================================================================
260
261    /** Contains the password of the outgoing mail server. It is necessary to set this
262        if the password is not already stored in the configuration for security reasons.
263
264        <p>This property is only evaluated for e-Mail output.</p>
265
266        @since OpenOffice 2.0
267    */
268    [property, optional] string OutServerPassword;
269    //=============================================================================
270
271    /** Contains the password of the incoming mail server. It is necessary to set this
272        if the mail server configuration is set to 'SMTP after POP' authentication and
273        the password is not already stored in the configuration for security reasons.
274
275        <p>This property is only evaluated for e-Mail output.</p>
276
277        @since OpenOffice 2.0
278    */
279    [property, optional] string InServerPassword;
280    //=============================================================================
281
282    /** contains the subject of the e-Mail message.
283
284        <p>This property is only evaluated for e-Mail output.</p>
285        @since OpenOffice 2.0
286    */
287    [property, optional] string Subject;
288
289    //=============================================================================
290
291    /** contains the name of the data base column that contains the e-Mail address
292        to the e-Mail to.
293
294        <p>This property is only evaluated for e-Mail output.</p>
295
296        @since OpenOffice 2.0
297    */
298    [property, optional] string AddressFromColumn;
299
300    //=============================================================================
301
302    /** determines that the created mail merge document is sent as body in HTML format.
303        This property is only valid if the propery "SendAsAttachment" is set to <false/>.
304
305        <p>This property is only evaluated for e-Mail output.</p>
306
307        @since OpenOffice 2.0
308    */
309    [property, optional] boolean SendAsHTML;
310
311    //=============================================================================
312
313
314    /** determines that the created mail merge document is sent as attachment.
315
316        <p>This property is only evaluated for e-Mail output.</p>
317
318        @since OpenOffice 2.0
319    */
320    [property, optional] boolean SendAsAttachment;
321
322    //=============================================================================
323
324    /** contains the text of the mail body.
325        This property is only valid if the property "SendAsAttachment" is set to <true/>
326        <p>This property is only evaluated for e-Mail output.</p>
327
328        @since OpenOffice 2.0
329    */
330    [property, optional] string MailBody;
331
332    //=============================================================================
333
334    /** contains the name of the attachment.
335        This property is only valid if "SendAsAttachment" is set to <true/>.
336
337        <p>This property is only evaluated for e-Mail output.</p>
338
339        @since OpenOffice 2.0
340    */
341    [property, optional] string AttachmentName;
342
343    //=============================================================================
344
345    /** contains the name of the document filter to save the attached mail merge document.
346        This property is only valid if "SendAsAttachment" is set to <true/>.
347
348        <p>This property is only evaluated for e-Mail output.</p>
349
350        @since OpenOffice 2.0
351    */
352    [property, optional] string AttachmentFilter;
353
354    //=============================================================================
355
356    /** contains a list of e-Mail addresses to
357        <p>This property is only evaluated for e-Mail output.</p>
358
359        @since OpenOffice 2.0
360    */
361    [property, optional] sequence< string > CopiesTo;
362
363    //=============================================================================
364
365    /**
366        <p>This property is only evaluated for e-Mail output.</p>
367
368        @since OpenOffice 2.0
369    */
370    [property, optional] sequence< string > BlindCopiesTo;
371
372
373    //=============================================================================
374
375    /** determines that the output of the mail merge is save in one single file.
376        <p>This property is only evaluated for file output.</p>
377
378        @since OpenOffice 2.0
379    */
380    [property, optional] boolean SaveAsSingleFile;
381
382    //=============================================================================
383
384    /** contains the name of the document filter to save the output file(s).
385        <p>This property is only evaluated for file output.</p>
386
387        @since OpenOffice 2.0
388    */
389    [property, optional] string SaveFilter;
390
391    //=============================================================================
392
393    /** contains the properties that are defined in <com::sun::star::view::PrintOptions>.
394
395        <p>This property is only evaluated for printer output.</p>
396
397        @since OpenOffice 2.0
398    */
399    [property, optional] sequence< com::sun::star::beans::PropertyValue > PrintOptions;
400
401};
402
403
404//=============================================================================
405
406}; }; }; };
407
408#endif
409