1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_sdb_OfficeDatabaseDocument_idl__
28 #define __com_sun_star_sdb_OfficeDatabaseDocument_idl__
30 #ifndef __com_sun_star_document_OfficeDocument_idl__
31 #include
<com
/sun
/star
/document
/OfficeDocument.idl
>
33 #ifndef __com_sun_star_sdb_XOfficeDatabaseDocument_idl__
34 #include
<com
/sun
/star
/sdb
/XOfficeDatabaseDocument.idl
>
36 #ifndef __com_sun_star_document_XDocumentEventBroadcaster_idl__
37 #include
<com
/sun
/star
/document
/XDocumentEventBroadcaster.idl
>
39 #ifndef __com_sun_star_script_provider_XScriptProviderSupplier_idl__
40 #include
<com
/sun
/star
/script
/provider
/XScriptProviderSupplier.idl
>
42 #ifndef __com_sun_star_frame_XLoadable_idl__
43 #include
<com
/sun
/star
/frame
/XLoadable.idl
>
45 #ifndef __com_sun_star_util_XCloseable_idl__
46 #include
<com
/sun
/star
/util
/XCloseable.idl
>
49 module com
{ module sun
{ module star
{ module sdb
{
51 /** specifies a office database document which is a storable document.
53 <p>These documents contain information about forms, and reports, and the properties of a data source.</p>
55 <p>The database document contains no data per default. The following is stored inside the document:
59 <li>The table settings defined in <type>DataSettings</type></li>
60 <li>The query settings defined in <type>DataSettings</type></li>
61 <li>All properties of the service <type>DataSource</type></li>
64 @see com::sun::star::sdb::XOfficeDatabaseDocument
65 @see com::sun::star::document::OfficeDocument
68 service OfficeDatabaseDocument
70 /** specifies basic functionality of a document in OpenOffice.org
72 <p>Note that a database document actually does not support the <type scope="com::sun::star::view">XPrintable</type> interface.
73 The non-optional requirement of this interface in the <type scope="com::sun::star::document">OfficeDocument</type>
74 service is considered a documentation error.</p>
76 service com
::sun
::star
::document
::OfficeDocument
;
78 interface XOfficeDatabaseDocument
;
80 /** allows access to the Basic macros and dialogs possibly embedded in the document
83 interface ::com
::sun
::star
::document
::XEmbeddedScripts
;
85 /** supplies a script provider which can be used to execute macros and scripts
86 embedded in the document
89 interface ::com
::sun
::star
::script
::provider
::XScriptProviderSupplier
;
91 /** allows to initialize the the document, either from scratch, or from a stored
94 <p>A newly instantiated database document cannot be operated until it is fully
95 initialized. There are three possible means to do this initialization:
96 <ul><li>calling <code>XLoadable::initNew</code></li>
97 <li>calling <code>XLoadable::load</code></li>
98 <li>calling <code>XStorable::storeAsURL</code></li>
100 The third option was added for compatibility reasons, since a <type>DatabaseDocument</type>
101 in earlier versions of OpenOffice.org did not support the <code>XLoadable</code> interface,
102 so the usual way of creating a document from scratch was to create it, set properties as
103 needed, and store it.</p>
107 interface ::com
::sun
::star
::frame
::XLoadable
;
109 /** allows to register for notifications happening in the document
111 <p>The following events are broadcasted by a database document
112 <table border="1" frame="all">
114 <tr><td><strong>Event Name</strong></td>
115 <td><strong>broadcasted when</strong></td>
116 <td align="center"><strong>broadcasted synchronously</strong></td>
120 <tr><td valign="top"><em>OnCreate</em></td>
121 <td>the document has been newly created. This does not imply that the document has
122 been loaded into a frame, it just means the initialization has been finished.</td>
123 <td align="center">yes</td>
125 <tr><td valign="top"><em>OnLoadFinished</em></td>
126 <td>the document has been completely loaded. This does not imply that the document
127 has been loaded into a frame, it just means the load process has been finished.</td>
128 <td align="center">yes</td>
130 <tr><td valign="top"><em>OnNew</em></td>
131 <td>the document has been initialized from scratch, including plugging it into a frame.</td>
132 <td align="center">no</td>
134 <tr><td valign="top"><em>OnLoad</em></td>
135 <td>the document has been completely loaded, including plugging it into a frame.</td>
136 <td align="center">no</td>
138 <tr><td valign="top"><em>OnSave</em></td>
139 <td>the document is about to be saved.</td>
140 <td align="center">yes</td>
142 <tr><td valign="top"><em>OnSaveDone</em></td>
143 <td>saving the document succeeeded.</td>
144 <td align="center">no</td>
146 <tr><td valign="top"><em>OnSaveFailed</em></td>
147 <td>saving the document failed.</td>
148 <td align="center">no</td>
150 <tr><td valign="top"><em>OnSaveAs</em></td>
151 <td>the document is about to be saved under a new name.</td>
152 <td align="center">yes</td>
154 <tr><td valign="top"><em>OnSaveAsDone</em></td>
155 <td>saving the document under a new name succeeeded.</td>
156 <td align="center">no</td>
158 <tr><td valign="top"><em>OnSaveAsFailed</em></td>
159 <td>saving the document under a new name failed.</td>
160 <td align="center">no</td>
162 <tr><td valign="top"><em>OnSaveTo</em></td>
163 <td>the document is about to be saved to a location different from its
164 current location, but without adjusting the current location.</td>
165 <td align="center">yes</td>
167 <tr><td valign="top"><em>OnSaveToDone</em></td>
168 <td>saving the document to a different location succeeeded.</td>
169 <td align="center">no</td>
171 <tr><td valign="top"><em>OnSaveToFailed</em></td>
172 <td>saving the document to a different location failed.</td>
173 <td align="center">no</td>
175 <tr><td valign="top"><em>OnPrepareUnload</em></td>
176 <td>the document is about to be closed.</td>
177 <td align="center">yes</td>
179 <tr><td valign="top"><em>OnUnload</em></td>
180 <td>the document is being closed.</td>
181 <td align="center">yes</td>
183 <tr><td valign="top"><em>OnFocus</em></td>
184 <td>a view to the document obtained the focus.</td>
185 <td align="center">no</td>
187 <tr><td valign="top"><em>OnUnfocus</em></td>
188 <td>a view to the document lost the focus.</td>
189 <td align="center">no</td>
191 <tr><td valign="top"><em>OnModifyChanged</em></td>
192 <td>the <quot>modified</quot> state of the document changed.</td>
193 <td align="center">no</td>
195 <tr><td valign="top"><em>OnViewCreated</em></td>
196 <td>a view to the document has been created, and attached to the document.</td>
197 <td align="center">no</td>
199 <tr><td valign="top"><em>OnPrepareViewClosing</em></td>
200 <td>a view to the document is about to be closed.</td>
201 <td align="center">yes</td>
203 <tr><td valign="top"><em>OnViewClosed</em></td>
204 <td>a view to the document has been closed.</td>
205 <td align="center">no</td>
207 <tr><td valign="top"><em>OnTitleChanged</em></td>
208 <td>the title of the document changed.</td>
209 <td align="center">no</td>
211 <tr><td valign="top"><em>OnSubComponentOpened</em></td>
212 <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>
213 <td align="center">no</td>
215 <tr><td valign="top"><em>OnSubComponentClosed</em></td>
216 <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>
217 <td align="center">no</td>
225 interface ::com
::sun
::star
::document
::XDocumentEventBroadcaster
;
227 /** implements life time control
229 <p>Whoever retrieves a <type>OfficeDatabaseDocument</type> should be aware of
230 life time issues, since a document needs to be closed when nobody needs it anymore.</p>
232 <p>This implies that clients of a document need to ensure that as soon as they don't
233 need, they invoke <member scope="com::sun::star::util">XCloseable::close</member>.</p>
235 <p>Since this can be done by multiple clients, every client is additionally required
236 to register itself as <type scope="com::sun::star::util">XCloseListener</type> at
237 the document, to prevent some other client closing the model while it's still needed
238 by the first client.</p>
240 interface com
::sun
::star
::util
::XCloseable
;
243 //=============================================================================
247 /*===========================================================================
248 ===========================================================================*/