1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __ooo_vba_XDocumentProperties_idl__
25#define __ooo_vba_XDocumentProperties_idl__
26
27#ifndef __com_sun_star_script_BasicErrorException_idl__
28#include <com/sun/star/script/BasicErrorException.idl>
29#endif
30#ifndef __ooo_vba_XHelperInterface_idl__
31#include <ooo/vba/XHelperInterface.idl>
32#endif
33#ifndef __ooo_vba_XCollection_idl__
34#include <ooo/vba/XCollection.idl>
35#endif
36
37module ooo { module vba {
38interface XDocumentProperty;
39interface XDocumentProperties
40{
41    interface XCollection;
42    /** Creates a new custom document property.
43     * You can only add a new document property to the custom DocumentProperties collection. Depending on value of
44     * boolean LinkSource, either (False) Value or (True) LinkSource must be provided.
45     * @param Name (Required String. The name of the property.
46     * @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.
47     * @param Type The data type of the property. Can be one of the following MsoDocProperties constants:
48     * msoPropertyTypeBoolean, msoPropertyTypeDate, msoPropertyTypeFloat, msoPropertyTypeNumber, or msoPropertyTypeString.
49     * @param Value The value of the property, if it's not linked to the contents of the container document.
50     * The value is converted to match the data type specified by the type argument, if it can't be converted, an error occurs.
51     * If LinkToContent is True, the Value argument is ignored and the new document property is assigned a default value
52     * until the linked property values are updated by the container application (usually when the document is saved).
53     * @param LinkSource Ignored if LinkToContent is False. The source of the linked property. The container application determines
54     * what types of source linking you can use.
55     */
56    XDocumentProperty Add([in] string Name, [in] boolean LinkToContent, [in] /* MsoDocProperties */ byte Type, [in] any Value,
57        [in] /*optional*/ any LinkSource)
58        raises (com::sun::star::script::BasicErrorException);
59};
60
61}; };
62
63#endif
64
65