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: XDocument.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 ************************************************************************/
31 #ifndef __ooo_vba_XDocumentProperties_idl__
32 #define __ooo_vba_XDocumentProperties_idl__
34 #ifndef __com_sun_star_script_BasicErrorException_idl__
35 #include
<com
/sun
/star
/script
/BasicErrorException.idl
>
37 #ifndef __ooo_vba_XHelperInterface_idl__
38 #include
<ooo
/vba
/XHelperInterface.idl
>
40 #ifndef __ooo_vba_XCollection_idl__
41 #include
<ooo
/vba
/XCollection.idl
>
44 module ooo
{ module vba
{
45 interface XDocumentProperty
;
46 interface XDocumentProperties
48 interface XCollection
;
49 /** Creates a new custom document property.
50 * You can only add a new document property to the custom DocumentProperties collection. Depending on value of
51 * boolean LinkSource, either (False) Value or (True) LinkSource must be provided.
52 * @param Name (Required String. The name of the property.
53 * @param LinkToContent Specifies whether the property is linked to the contents of the container document. If this argument is True, the LinkSource argument is required; if it's False, the value argument is required.
54 * @param Type The data type of the property. Can be one of the following MsoDocProperties constants:
55 * msoPropertyTypeBoolean, msoPropertyTypeDate, msoPropertyTypeFloat, msoPropertyTypeNumber, or msoPropertyTypeString.
56 * @param Value The value of the property, if it's not linked to the contents of the container document.
57 * The value is converted to match the data type specified by the type argument, if it can't be converted, an error occurs.
58 * If LinkToContent is True, the Value argument is ignored and the new document property is assigned a default value
59 * until the linked property values are updated by the container application (usually when the document is saved).
60 * @param LinkSource Ignored if LinkToContent is False. The source of the linked property. The container application determines
61 * what types of source linking you can use.
63 XDocumentProperty Add
([in] string Name
, [in] boolean LinkToContent
, [in] /* MsoDocProperties */ byte Type
, [in] any Value
,
64 [in] /*optional*/ any LinkSource
)
65 raises
(com
::sun
::star
::script
::BasicErrorException
);