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