Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / sdb / OfficeDatabaseDocument.idl
blobd618003207409234b05863e3fba8aa350ebbd326
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: OfficeDatabaseDocument.idl,v $
10 * $Revision: 1.7.12.2 $
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_OfficeDatabaseDocument_idl__
31 #define __com_sun_star_sdb_OfficeDatabaseDocument_idl__
33 #ifndef __com_sun_star_document_OfficeDocument_idl__
34 #include <com/sun/star/document/OfficeDocument.idl>
35 #endif
36 #ifndef __com_sun_star_sdb_XOfficeDatabaseDocument_idl__
37 #include <com/sun/star/sdb/XOfficeDatabaseDocument.idl>
38 #endif
39 #ifndef __com_sun_star_document_XDocumentEventBroadcaster_idl__
40 #include <com/sun/star/document/XDocumentEventBroadcaster.idl>
41 #endif
42 #ifndef __com_sun_star_script_provider_XScriptProviderSupplier_idl__
43 #include <com/sun/star/script/provider/XScriptProviderSupplier.idl>
44 #endif
45 #ifndef __com_sun_star_frame_XLoadable_idl__
46 #include <com/sun/star/frame/XLoadable.idl>
47 #endif
48 #ifndef __com_sun_star_util_XCloseable_idl__
49 #include <com/sun/star/util/XCloseable.idl>
50 #endif
52 module com { module sun { module star { module sdb {
54 /** specifies a office database document which is a storable document.
56 <p>These documents contain information about forms, and reports, and the properties of a data source.</p>
58 <p>The database document contains no data per default. The following is stored inside the document:
59 <ul>
60 <li>forms</li>
61 <li>reports</li>
62 <li>The table settings defined in <type>DataSettings</type></li>
63 <li>The query settings defined in <type>DataSettings</type></li>
64 <li>All properties of the service <type>DataSource</type></li>
65 </ul></p>
67 @see com::sun::star::sdb::XOfficeDatabaseDocument
68 @see com::sun::star::document::OfficeDocument
69 @since OOo 2.0.0
71 service OfficeDatabaseDocument
73 /** specifies basic functionality of a document in OpenOffice.org
75 <p>Note that a database document actually does not support the <type scope="com::sun::star::view">XPrintable</type> interface.
76 The non-optional requirement of this interface in the <type scope="com::sun::star::document">OfficeDocument</type>
77 service is considered a documentation error.</p>
79 service com::sun::star::document::OfficeDocument;
81 interface XOfficeDatabaseDocument;
83 /** allows access to the Basic macros and dialogs possibly embedded in the document
84 @since OOo 3.1
86 interface ::com::sun::star::document::XEmbeddedScripts;
88 /** supplies a script provider which can be used to execute macros and scripts
89 embedded in the document
90 @since OOo 3.1
92 interface ::com::sun::star::script::provider::XScriptProviderSupplier;
94 /** allows to initialize the the document, either from scratch, or from a stored
95 database document.
97 <p>A newly instantiated database document cannot be operated until it is fully
98 initialized. There are three possible means to do this initialization:
99 <ul><li>calling <code>XLoadable::initNew</code></li>
100 <li>calling <code>XLoadable::load</code></li>
101 <li>calling <code>XStorable::storeAsURL</code></li>
102 </ul>
103 The third option was added for compatibility reasons, since a <type>DatabaseDocument</type>
104 in earlier versions of OpenOffice.org did not support the <code>XLoadable</code> interface,
105 so the usual way of creating a document from scratch was to create it, set properties as
106 needed, and store it.</p>
108 @since OOo 3.1
110 interface ::com::sun::star::frame::XLoadable;
112 /** allows to register for notifications happening in the document
114 <p>The following events are broadcasted by a database document
115 <table border="1" frame="all">
116 <thead>
117 <tr><td><strong>Event Name</strong></td>
118 <td><strong>broadcasted when</strong></td>
119 <td align="center"><strong>broadcasted synchronously</strong></td>
120 </tr>
121 </thead>
122 <tbody>
123 <tr><td valign="top"><em>OnCreate</em></td>
124 <td>the document has been newly created. This does not imply that the document has
125 been loaded into a frame, it just means the initialization has been finished.</td>
126 <td align="center">yes</td>
127 </tr>
128 <tr><td valign="top"><em>OnLoadFinished</em></td>
129 <td>the document has been completely loaded. This does not imply that the document
130 has been loaded into a frame, it just means the load process has been finished.</td>
131 <td align="center">yes</td>
132 </tr>
133 <tr><td valign="top"><em>OnNew</em></td>
134 <td>the document has been initialized from scratch, including plugging it into a frame.</td>
135 <td align="center">no</td>
136 </tr>
137 <tr><td valign="top"><em>OnLoad</em></td>
138 <td>the document has been completely loaded, including plugging it into a frame.</td>
139 <td align="center">no</td>
140 </tr>
141 <tr><td valign="top"><em>OnSave</em></td>
142 <td>the document is about to be saved.</td>
143 <td align="center">yes</td>
144 </tr>
145 <tr><td valign="top"><em>OnSaveDone</em></td>
146 <td>saving the document succeeeded.</td>
147 <td align="center">no</td>
148 </tr>
149 <tr><td valign="top"><em>OnSaveFailed</em></td>
150 <td>saving the document failed.</td>
151 <td align="center">no</td>
152 </tr>
153 <tr><td valign="top"><em>OnSaveAs</em></td>
154 <td>the document is about to be saved under a new name.</td>
155 <td align="center">yes</td>
156 </tr>
157 <tr><td valign="top"><em>OnSaveAsDone</em></td>
158 <td>saving the document under a new name succeeeded.</td>
159 <td align="center">no</td>
160 </tr>
161 <tr><td valign="top"><em>OnSaveAsFailed</em></td>
162 <td>saving the document under a new name failed.</td>
163 <td align="center">no</td>
164 </tr>
165 <tr><td valign="top"><em>OnSaveTo</em></td>
166 <td>the document is about to be saved to a location different from its
167 current location, but without adjusting the current location.</td>
168 <td align="center">yes</td>
169 </tr>
170 <tr><td valign="top"><em>OnSaveToDone</em></td>
171 <td>saving the document to a different location succeeeded.</td>
172 <td align="center">no</td>
173 </tr>
174 <tr><td valign="top"><em>OnSaveToFailed</em></td>
175 <td>saving the document to a different location failed.</td>
176 <td align="center">no</td>
177 </tr>
178 <tr><td valign="top"><em>OnPrepareUnload</em></td>
179 <td>the document is about to be closed.</td>
180 <td align="center">yes</td>
181 </tr>
182 <tr><td valign="top"><em>OnUnload</em></td>
183 <td>the document is being closed.</td>
184 <td align="center">yes</td>
185 </tr>
186 <tr><td valign="top"><em>OnFocus</em></td>
187 <td>a view to the document obtained the focus.</td>
188 <td align="center">no</td>
189 </tr>
190 <tr><td valign="top"><em>OnUnfocus</em></td>
191 <td>a view to the document lost the focus.</td>
192 <td align="center">no</td>
193 </tr>
194 <tr><td valign="top"><em>OnModifyChanged</em></td>
195 <td>the <quot>modified</quot> state of the document changed.</td>
196 <td align="center">no</td>
197 </tr>
198 <tr><td valign="top"><em>OnViewCreated</em></td>
199 <td>a view to the document has been created, and attached to the document.</td>
200 <td align="center">no</td>
201 </tr>
202 <tr><td valign="top"><em>OnPrepareViewClosing</em></td>
203 <td>a view to the document is about to be closed.</td>
204 <td align="center">yes</td>
205 </tr>
206 <tr><td valign="top"><em>OnViewClosed</em></td>
207 <td>a view to the document has been closed.</td>
208 <td align="center">no</td>
209 </tr>
210 <tr><td valign="top"><em>OnTitleChanged</em></td>
211 <td>the title of the document changed.</td>
212 <td align="center">no</td>
213 </tr>
214 <tr><td valign="top"><em>OnSubComponentOpened</em></td>
215 <td>From with a view to the document, a view to a sub component (e.g. a table or a report) has been opened.</td>
216 <td align="center">no</td>
217 </tr>
218 <tr><td valign="top"><em>OnSubComponentClosed</em></td>
219 <td>From with a view to the document, a view to a sub component (e.g. a table or a report) has been closed.</td>
220 <td align="center">no</td>
221 </tr>
222 </tbody>
223 </table>
224 </p>
226 @since OOo 3.1
228 interface ::com::sun::star::document::XDocumentEventBroadcaster;
230 /** implements life time control
232 <p>Whoever retrieves a <type>OfficeDatabaseDocument</type> should be aware of
233 life time issues, since a document needs to be closed when nobody needs it anymore.</p>
235 <p>This implies that clients of a document need to ensure that as soon as they don't
236 need, they invoke <member scope="com::sun::star::util">XCloseable::close</member>.</p>
238 <p>Since this can be done by multiple clients, every client is additionally required
239 to register itself as <type scope="com::sun::star::util">XCloseListener</type> at
240 the document, to prevent some other client closing the model while it's still needed
241 by the first client.</p>
243 interface com::sun::star::util::XCloseable;
246 //=============================================================================
248 }; }; }; };
250 /*===========================================================================
251 ===========================================================================*/
252 #endif