1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XDocumentDataSource.idl,v $
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_XDocumentDataSource_idl__
31 #define __com_sun_star_sdb_XDocumentDataSource_idl__
33 #ifndef __com_sun_star_sdb_XOfficeDatabaseDocument_idl__
34 #include
<com
/sun
/star
/sdb
/XOfficeDatabaseDocument.idl
>
37 //=============================================================================
39 module com
{ module sun
{ module star
{ module sdb
{
41 //=============================================================================
42 /** simplifies the accessing of data sources and their corresponding database document.
45 The interface can be used to access the data source of the database document.
47 @see OfficeDatabaseDocument
49 interface XDocumentDataSource
51 /** provides access to the one and only <type>OfficeDatabaseDocument</type>
52 which the data source is based on.
54 <p>The component returned by this attribute is an <type>OfficeDatabaseDocument</type>.</p>
56 <p>Though there is a 1-to-1 relationship between database documents and data sources,
57 each of the two can exist without its counterpart, but create this counterpart on request
58 only. As a consequence, the document obtained via this attribute might be newly created,
59 which implies that the caller is now responsible for it. In particular, the caller is
60 responsible for calling <member scope="com::sun::star::util">XCloseable::close</member>
61 on the document as soon as it's not needed anymore.</p>
63 <p>Additionally, if the caller does long-lasting processing on the document, it's advised
64 to add itself as <type scope="com::sun::star::util">XCloseListener</type> to the document,
65 to prevent closing as long as the processing lasts.</p>
67 [readonly, attribute
] XOfficeDatabaseDocument DatabaseDocument
;
70 //=============================================================================
74 /*=============================================================================
76 =============================================================================*/