1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef __ooo_vba_XDocumentProperties_idl__
29#define __ooo_vba_XDocumentProperties_idl__
30
31#ifndef __com_sun_star_script_BasicErrorException_idl__
32#include <com/sun/star/script/BasicErrorException.idl>
33#endif
34#ifndef __ooo_vba_XHelperInterface_idl__
35#include <ooo/vba/XHelperInterface.idl>
36#endif
37#ifndef __ooo_vba_XCollection_idl__
38#include <ooo/vba/XCollection.idl>
39#endif
40
41module ooo { module vba {
42interface XDocumentProperty;
43interface XDocumentProperties
44{
45    interface XCollection;
46    /** Creates a new custom document property.
47     * You can only add a new document property to the custom DocumentProperties collection. Depending on value of
48     * boolean LinkSource, either (False) Value or (True) LinkSource must be provided.
49     * @param Name (Required String. The name of the property.
50     * @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.
51     * @param Type The data type of the property. Can be one of the following MsoDocProperties constants:
52     * msoPropertyTypeBoolean, msoPropertyTypeDate, msoPropertyTypeFloat, msoPropertyTypeNumber, or msoPropertyTypeString.
53     * @param Value The value of the property, if it's not linked to the contents of the container document.
54     * The value is converted to match the data type specified by the type argument, if it can't be converted, an error occurs.
55     * If LinkToContent is True, the Value argument is ignored and the new document property is assigned a default value
56     * until the linked property values are updated by the container application (usually when the document is saved).
57     * @param LinkSource Ignored if LinkToContent is False. The source of the linked property. The container application determines
58     * what types of source linking you can use.
59     */
60    XDocumentProperty Add([in] string Name, [in] boolean LinkToContent, [in] /* MsoDocProperties */ byte Type, [in] any Value,
61        [in] /*optional*/ any LinkSource)
62        raises (com::sun::star::script::BasicErrorException);
63};
64
65}; };
66
67#endif
68
69