1/*************************************************************************
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * Copyright 2000, 2010 Oracle and/or its affiliates.
5 *
6 * OpenOffice.org - a multi-platform office productivity suite
7 *
8 * This file is part of OpenOffice.org.
9 *
10 * OpenOffice.org is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License version 3
12 * only, as published by the Free Software Foundation.
13 *
14 * OpenOffice.org is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU Lesser General Public License version 3 for more details
18 * (a copy is included in the LICENSE file that accompanied this code).
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * version 3 along with OpenOffice.org.  If not, see
22 * <http://www.openoffice.org/license.html>
23 * for a copy of the LGPLv3 License.
24 *
25************************************************************************/
26
27#ifndef __com_sun_star_sdb_XSubDocument_idl__
28#define __com_sun_star_sdb_XSubDocument_idl__
29
30#include <com/sun/star/lang/WrappedTargetException.idl>
31#include <com/sun/star/lang/XComponent.idl>
32
33//=============================================================================
34
35module com { module sun { module star { module sdb {
36
37//=============================================================================
38
39/** allows operating on a sub document of an <type>OfficeDatabaseDocument</type>
40
41    @since OOo 3.1
42 */
43published interface XSubDocument
44{
45    /** opens the sub document
46
47        <p>Note that opening the document means it is displayed in an own top-level frame
48        on the desktop.</p>
49
50        @return
51            the sub document, usually an <type scope="com::sun::star::frame">XModel</type>,
52            or an <type scope="com::sun::star::frame">XController</type> if the sub document
53            does not have an own model.
54
55        @throws ::com::sun::star::lang::WrappedTargetException
56            if an error occurs during opening the document
57    */
58    ::com::sun::star::lang::XComponent
59            open()
60                raises( ::com::sun::star::lang::WrappedTargetException );
61
62    /** opens the sub document in design mode
63
64        @return
65            the sub document, usually an <type scope="com::sun::star::frame">XModel</type>,
66            or an <type scope="com::sun::star::frame">XController</type> if the sub document
67            does not have an own model.
68
69        @throws ::com::sun::star::lang::WrappedTargetException
70            if an error occurs during opening the document
71    */
72    ::com::sun::star::lang::XComponent
73            openDesign()
74                raises( ::com::sun::star::lang::WrappedTargetException );
75
76    /** stores the sub document, if it had previously been opened in either mode
77
78        @throws ::com::sun::star::lang::WrappedTargetException
79            if an error occurs during storing the document
80    */
81    void    store()
82                raises( ::com::sun::star::lang::WrappedTargetException );
83
84    /** closes the sub document, if it had previously been opened in either mode
85
86        @return <TRUE/> if and only if the document could be closed, <FALSE/> otherwise,
87            e.g. if the closing has been vetoed by the user.
88
89        @throws ::com::sun::star::lang::WrappedTargetException
90            if an error occurs during closing the document
91    */
92    boolean close()
93                raises( ::com::sun::star::lang::WrappedTargetException );
94};
95
96//=============================================================================
97
98}; }; }; };
99
100//=============================================================================
101
102#endif
103