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