merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / sdb / DocumentDefinition.idl
blobc3bd9a6cca9a60698b01aab61ccf7824ff754e7e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: DocumentDefinition.idl,v $
10 * $Revision: 1.15 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_sdb_DocumentDefinition2_idl__
31 #define __com_sun_star_sdb_DocumentDefinition2_idl__
33 #ifndef __com_sun_star_beans_XPropertySet_idl__
34 #include <com/sun/star/beans/XPropertySet.idl>
35 #endif
36 #ifndef __com_sun_star_sdb_DefinitionContent_idl__
37 #include <com/sun/star/sdb/DefinitionContent.idl>
38 #endif
40 module com { module sun { module star { module sdb {
42 interface XSubDocument;
44 /** specifies a sub document of a <type>OfficeDatabaseDocument</type>.
46 <p>Usual instances of a <code>DocumentDefinition</code> are forms and reports.</p>
48 <p>Note that the <code>DocumentDefinition</code> does not denote the actual document
49 (i.e. an object supporting the <type scope="com::sun::star::frame">XModel</type> interface),
50 but only a shortcut to access and load those actual documents.</p>
52 service DocumentDefinition
54 /** provides functionality for treating the object as part of a hierarchy
55 of a database document's sub documents.
57 <p>The <member scope="com::sun::star::ucb">XCommandProcessor::execute</member> method
58 of a <code>DocumentDefinition</code> supports at least the following commands, additionally to
59 the ones already supported by the DefinitionContent:
60 <ul>
61 <li><strong>open</strong>: loads the sub document in an own frame. The return value of
62 the <code>execute</code> method is the model of the loaded document.</li>
63 <li><strong>store</strong>: stores the document.</li>
64 <li><strong>openDesign</strong>: opens the sub document in an own frame, in design mode.
65 The user can make changes to the document, and save those changes. The return value of
66 the <code>execute</code> method is the model of the loaded document.</li>
67 <li><strong>preview</strong>: retrieves an image showing a preview of the sub document.</li>
68 <li><strong>getDocumentInfo</strong>: retrieves the document information, as
69 <type scope="com::sun::star::document">XDocumentInfo</type> instance, of the sub document.</li>
70 <li><strong>delete</strong>: deletes the sub document from the database document.</li>
71 <li><strong>close</strong>: closes the sub document, if it had previously been opened
72 using either the <code>open</code> or <code>openDesign</code> command. The return value
73 of the <code>execute</code> command is a <code>boolean</code> value indicating whether
74 the sub document could be closed. Reasons for not closing the document include vetos by
75 third parties, for instance, because the user opened a dialog modal to the sub document,
76 or a long-running task such as printing is currently running.</li>
77 </ul>
79 service DefinitionContent;
81 interface ::com::sun::star::beans::XPropertySet;
83 interface ::com::sun::star::sdb::XSubDocument;
85 /** is the name of the document. If the document is part of the container,
86 it is not possible to alter the name.*/
87 [readonly, property] string Name;
89 /** Indicates if the document is to be used as template, for example, if a report is to be filled with data. */
90 [readonly, property] boolean AsTemplate;
93 //=============================================================================
95 }; }; }; };
97 #endif