1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_sdb_XSubDocument_idl__
25#define __com_sun_star_sdb_XSubDocument_idl__
26
27#include <com/sun/star/lang/WrappedTargetException.idl>
28#include <com/sun/star/lang/XComponent.idl>
29
30//=============================================================================
31
32module com { module sun { module star { module sdb {
33
34//=============================================================================
35
36/** allows operating on a sub document of an <type>OfficeDatabaseDocument</type>
37
38    @since OpenOffice 3.1
39 */
40published interface XSubDocument
41{
42    /** opens the sub document
43
44        <p>Note that opening the document means it is displayed in an own top-level frame
45        on the desktop.</p>
46
47        @return
48            the sub document, usually an <type scope="com::sun::star::frame">XModel</type>,
49            or an <type scope="com::sun::star::frame">XController</type> if the sub document
50            does not have an own model.
51
52        @throws ::com::sun::star::lang::WrappedTargetException
53            if an error occurs during opening the document
54    */
55    ::com::sun::star::lang::XComponent
56            open()
57                raises( ::com::sun::star::lang::WrappedTargetException );
58
59    /** opens the sub document in design mode
60
61        @return
62            the sub document, usually an <type scope="com::sun::star::frame">XModel</type>,
63            or an <type scope="com::sun::star::frame">XController</type> if the sub document
64            does not have an own model.
65
66        @throws ::com::sun::star::lang::WrappedTargetException
67            if an error occurs during opening the document
68    */
69    ::com::sun::star::lang::XComponent
70            openDesign()
71                raises( ::com::sun::star::lang::WrappedTargetException );
72
73    /** stores the sub document, if it had previously been opened in either mode
74
75        @throws ::com::sun::star::lang::WrappedTargetException
76            if an error occurs during storing the document
77    */
78    void    store()
79                raises( ::com::sun::star::lang::WrappedTargetException );
80
81    /** closes the sub document, if it had previously been opened in either mode
82
83        @return <TRUE/> if and only if the document could be closed, <FALSE/> otherwise,
84            e.g. if the closing has been vetoed by the user.
85
86        @throws ::com::sun::star::lang::WrappedTargetException
87            if an error occurs during closing the document
88    */
89    boolean close()
90                raises( ::com::sun::star::lang::WrappedTargetException );
91};
92
93//=============================================================================
94
95}; }; }; };
96
97//=============================================================================
98
99#endif
100