cid#1640468 Dereference after null check
[LibreOffice.git] / offapi / com / sun / star / sdb / OfficeDatabaseDocument.idl
blobe7e1502935a552d57a52597f58b587dbbd1841a8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 module com { module sun { module star { module sdb {
22 /** specifies an office database document which is a storable document.
24 <p>These documents contain information about forms, and reports, and the properties of a data source.</p>
26 <p>The database document contains no data per default. The following is stored inside the document:
27 <ul>
28 <li>forms</li>
29 <li>reports</li>
30 <li>The table settings defined in DataSettings</li>
31 <li>The query settings defined in DataSettings</li>
32 <li>All properties of the service DataSource</li>
33 </ul></p>
35 @see com::sun::star::sdb::XOfficeDatabaseDocument
36 @see com::sun::star::document::OfficeDocument
37 @since OOo 2.0
39 service OfficeDatabaseDocument
41 /** specifies basic functionality of a document in OpenOffice.org
43 <p>Note that a database document actually does not support the com::sun::star::view::XPrintable interface.
44 The non-optional requirement of this interface in the com::sun::star::document::OfficeDocument
45 service is considered a documentation error.</p>
47 service com::sun::star::document::OfficeDocument;
49 interface XOfficeDatabaseDocument;
51 /** allows access to the Basic macros and dialogs possibly embedded in the document
52 @since OOo 3.1
54 interface ::com::sun::star::document::XEmbeddedScripts;
56 /** supplies a script provider which can be used to execute macros and scripts
57 embedded in the document
58 @since OOo 3.1
60 interface ::com::sun::star::script::provider::XScriptProviderSupplier;
62 /** allows to initialize the document, either from scratch, or from a stored
63 database document.
65 <p>A newly instantiated database document cannot be operated until it is fully
66 initialized. There are three possible means to do this initialization:
67 <ul><li>calling <code>XLoadable::initNew</code></li>
68 <li>calling <code>XLoadable::load</code></li>
69 <li>calling <code>XStorable::storeAsURL</code></li>
70 </ul>
71 The third option was added for compatibility reasons, since a DatabaseDocument
72 in earlier versions of OpenOffice.org did not support the <code>XLoadable</code> interface,
73 so the usual way of creating a document from scratch was to create it, set properties as
74 needed, and store it.</p>
76 @since OOo 3.1
78 interface ::com::sun::star::frame::XLoadable;
80 /** allows to register for notifications happening in the document
82 <p>The following events are broadcasted by a database document
83 <table border="1" frame="all">
84 <tr><td><strong>Event Name</strong></td>
85 <td><strong>broadcasted when</strong></td>
86 <td align="center"><strong>broadcasted synchronously</strong></td>
87 </tr>
88 <tr><td valign="top"><em>OnCreate</em></td>
89 <td>the document has been newly created. This does not imply that the document has
90 been loaded into a frame, it just means the initialization has been finished.</td>
91 <td align="center">yes</td>
92 </tr>
93 <tr><td valign="top"><em>OnLoadFinished</em></td>
94 <td>the document has been completely loaded. This does not imply that the document
95 has been loaded into a frame, it just means the load process has been finished.</td>
96 <td align="center">yes</td>
97 </tr>
98 <tr><td valign="top"><em>OnNew</em></td>
99 <td>the document has been initialized from scratch, including plugging it into a frame.</td>
100 <td align="center">no</td>
101 </tr>
102 <tr><td valign="top"><em>OnLoad</em></td>
103 <td>the document has been completely loaded, including plugging it into a frame.</td>
104 <td align="center">no</td>
105 </tr>
106 <tr><td valign="top"><em>OnSave</em></td>
107 <td>the document is about to be saved.</td>
108 <td align="center">yes</td>
109 </tr>
110 <tr><td valign="top"><em>OnSaveDone</em></td>
111 <td>saving the document succeeded.</td>
112 <td align="center">no</td>
113 </tr>
114 <tr><td valign="top"><em>OnSaveFailed</em></td>
115 <td>saving the document failed.</td>
116 <td align="center">no</td>
117 </tr>
118 <tr><td valign="top"><em>OnSaveAs</em></td>
119 <td>the document is about to be saved under a new name.</td>
120 <td align="center">yes</td>
121 </tr>
122 <tr><td valign="top"><em>OnSaveAsDone</em></td>
123 <td>saving the document under a new name succeeded.</td>
124 <td align="center">no</td>
125 </tr>
126 <tr><td valign="top"><em>OnSaveAsFailed</em></td>
127 <td>saving the document under a new name failed.</td>
128 <td align="center">no</td>
129 </tr>
130 <tr><td valign="top"><em>OnSaveTo</em></td>
131 <td>the document is about to be saved to a location different from its
132 current location, but without adjusting the current location.</td>
133 <td align="center">yes</td>
134 </tr>
135 <tr><td valign="top"><em>OnSaveToDone</em></td>
136 <td>saving the document to a different location succeeded.</td>
137 <td align="center">no</td>
138 </tr>
139 <tr><td valign="top"><em>OnSaveToFailed</em></td>
140 <td>saving the document to a different location failed.</td>
141 <td align="center">no</td>
142 </tr>
143 <tr><td valign="top"><em>OnPrepareUnload</em></td>
144 <td>the document is about to be closed.</td>
145 <td align="center">yes</td>
146 </tr>
147 <tr><td valign="top"><em>OnUnload</em></td>
148 <td>the document is being closed.</td>
149 <td align="center">yes</td>
150 </tr>
151 <tr><td valign="top"><em>OnFocus</em></td>
152 <td>a view to the document obtained the focus.</td>
153 <td align="center">no</td>
154 </tr>
155 <tr><td valign="top"><em>OnUnfocus</em></td>
156 <td>a view to the document lost the focus.</td>
157 <td align="center">no</td>
158 </tr>
159 <tr><td valign="top"><em>OnModifyChanged</em></td>
160 <td>the <em>modified</em> state of the document changed.</td>
161 <td align="center">no</td>
162 </tr>
163 <tr><td valign="top"><em>OnViewCreated</em></td>
164 <td>a view to the document has been created, and attached to the document.</td>
165 <td align="center">no</td>
166 </tr>
167 <tr><td valign="top"><em>OnPrepareViewClosing</em></td>
168 <td>a view to the document is about to be closed.</td>
169 <td align="center">yes</td>
170 </tr>
171 <tr><td valign="top"><em>OnViewClosed</em></td>
172 <td>a view to the document has been closed.</td>
173 <td align="center">no</td>
174 </tr>
175 <tr><td valign="top"><em>OnTitleChanged</em></td>
176 <td>the title of the document changed.</td>
177 <td align="center">no</td>
178 </tr>
179 <tr><td valign="top"><em>OnSubComponentOpened</em></td>
180 <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>
181 <td align="center">no</td>
182 </tr>
183 <tr><td valign="top"><em>OnSubComponentClosed</em></td>
184 <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>
185 <td align="center">no</td>
186 </tr>
187 </table>
188 </p>
190 @since OOo 3.1
192 interface ::com::sun::star::document::XDocumentEventBroadcaster;
194 /** implements life time control
196 <p>Whoever retrieves an OfficeDatabaseDocument should be aware of
197 life time issues, since a document needs to be closed when nobody needs it anymore.</p>
199 <p>This implies that clients of a document need to ensure that as soon as they don't
200 need, they invoke com::sun::star::util::XCloseable::close().</p>
202 <p>Since this can be done by multiple clients, every client is additionally required
203 to register itself as com::sun::star::util::XCloseListener at
204 the document, to prevent some other client closing the model while it's still needed
205 by the first client.</p>
207 interface com::sun::star::util::XCloseable;
211 }; }; }; };
213 /*===========================================================================
214 ===========================================================================*/
216 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */