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