1*cdf0e10cSrcweir/************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir#ifndef __com_sun_star_sdb_DocumentDefinition2_idl__ 28*cdf0e10cSrcweir#define __com_sun_star_sdb_DocumentDefinition2_idl__ 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySet_idl__ 31*cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySet.idl> 32*cdf0e10cSrcweir#endif 33*cdf0e10cSrcweir#ifndef __com_sun_star_sdb_DefinitionContent_idl__ 34*cdf0e10cSrcweir#include <com/sun/star/sdb/DefinitionContent.idl> 35*cdf0e10cSrcweir#endif 36*cdf0e10cSrcweir 37*cdf0e10cSrcweirmodule com { module sun { module star { module sdb { 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir interface XSubDocument; 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir/** specifies a sub document of a <type>OfficeDatabaseDocument</type>. 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir <p>Usual instances of a <code>DocumentDefinition</code> are forms and reports.</p> 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir <p>Note that the <code>DocumentDefinition</code> does not denote the actual document 46*cdf0e10cSrcweir (i.e. an object supporting the <type scope="com::sun::star::frame">XModel</type> interface), 47*cdf0e10cSrcweir but only a shortcut to access and load those actual documents.</p> 48*cdf0e10cSrcweir*/ 49*cdf0e10cSrcweirservice DocumentDefinition 50*cdf0e10cSrcweir{ 51*cdf0e10cSrcweir /** provides functionality for treating the object as part of a hierarchy 52*cdf0e10cSrcweir of a database document's sub documents. 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir <p>The <member scope="com::sun::star::ucb">XCommandProcessor::execute</member> method 55*cdf0e10cSrcweir of a <code>DocumentDefinition</code> supports at least the following commands, additionally to 56*cdf0e10cSrcweir the ones already supported by the DefinitionContent: 57*cdf0e10cSrcweir <ul> 58*cdf0e10cSrcweir <li><strong>open</strong>: loads the sub document in an own frame. The return value of 59*cdf0e10cSrcweir the <code>execute</code> method is the model of the loaded document.</li> 60*cdf0e10cSrcweir <li><strong>store</strong>: stores the document.</li> 61*cdf0e10cSrcweir <li><strong>openDesign</strong>: opens the sub document in an own frame, in design mode. 62*cdf0e10cSrcweir The user can make changes to the document, and save those changes. The return value of 63*cdf0e10cSrcweir the <code>execute</code> method is the model of the loaded document.</li> 64*cdf0e10cSrcweir <li><strong>preview</strong>: retrieves an image showing a preview of the sub document.</li> 65*cdf0e10cSrcweir <li><strong>getDocumentInfo</strong>: retrieves the document information, as 66*cdf0e10cSrcweir <type scope="com::sun::star::document">XDocumentInfo</type> instance, of the sub document.</li> 67*cdf0e10cSrcweir <li><strong>delete</strong>: deletes the sub document from the database document.</li> 68*cdf0e10cSrcweir <li><strong>close</strong>: closes the sub document, if it had previously been opened 69*cdf0e10cSrcweir using either the <code>open</code> or <code>openDesign</code> command. The return value 70*cdf0e10cSrcweir of the <code>execute</code> command is a <code>boolean</code> value indicating whether 71*cdf0e10cSrcweir the sub document could be closed. Reasons for not closing the document include vetos by 72*cdf0e10cSrcweir third parties, for instance, because the user opened a dialog modal to the sub document, 73*cdf0e10cSrcweir or a long-running task such as printing is currently running.</li> 74*cdf0e10cSrcweir <li><strong>show</strong>: shows the sub document. This is useful if you previously opened the 75*cdf0e10cSrcweir document hidden, or if you previously hide it using the <em>hide</em> command.<br/> 76*cdf0e10cSrcweir The <em>open</em> command is not available if the sub document has not been loaded, yet.</li> 77*cdf0e10cSrcweir <li><strong>hide</strong>: hides the sub document. In opposite to the <em>close</em> command, 78*cdf0e10cSrcweir only the document window is hidden, but the document is kept loaded. A subsequent execution 79*cdf0e10cSrcweir of the <em>show</em> command will show the window, again.</li> 80*cdf0e10cSrcweir </ul> 81*cdf0e10cSrcweir */ 82*cdf0e10cSrcweir service DefinitionContent; 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir interface ::com::sun::star::beans::XPropertySet; 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir interface ::com::sun::star::sdb::XSubDocument; 87*cdf0e10cSrcweir 88*cdf0e10cSrcweir /** is the name of the document. If the document is part of the container, 89*cdf0e10cSrcweir it is not possible to alter the name.*/ 90*cdf0e10cSrcweir [readonly, property] string Name; 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir /** Indicates if the document is to be used as template, for example, if a report is to be filled with data. */ 93*cdf0e10cSrcweir [readonly, property] boolean AsTemplate; 94*cdf0e10cSrcweir}; 95*cdf0e10cSrcweir 96*cdf0e10cSrcweir//============================================================================= 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir}; }; }; }; 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir#endif 101