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
25#include <com/sun/star/uno/XInterface.idl>
26#include <com/sun/star/beans/XPropertySet.idl>
27#include <com/sun/star/sheet/LocalizedName.idl>
28
29module com
30{
31module sun
32{
33module star
34{
35module sheet
36{
37module addin
38{
39    interface XCompatibilityNames  : com::sun::star::uno::XInterface
40    {
41        /// @return a sequence with all localized names for a programmatic name
42        sequence< com::sun::star::sheet::LocalizedName > getCompatibilityNames ( [in] string aProgrammaticName );
43    };
44
45    /**
46     * Interface with date functions.
47     */
48    interface XDateFunctions : com::sun::star::uno::XInterface
49    {
50        /// calculates the number of weeks between two dates.
51        long getDiffWeeks(
52                    [in] com::sun::star::beans::XPropertySet xOptions,
53                    [in] long nStartDate, [in] long nEndDate, [in] long nMode )
54            raises( com::sun::star::lang::IllegalArgumentException );
55
56        /// calculates the number of months between two dates.
57        long getDiffMonths(
58                    [in] com::sun::star::beans::XPropertySet xOptions,
59                    [in] long nStartDate, [in] long nEndDate, [in] long nMode )
60            raises( com::sun::star::lang::IllegalArgumentException );
61
62        /// calculates the number of years between two dates.
63        long getDiffYears(
64                    [in] com::sun::star::beans::XPropertySet xOptions,
65                    [in] long nStartDate, [in] long nEndDate, [in] long nMode )
66            raises( com::sun::star::lang::IllegalArgumentException );
67
68        /// checks if a date is in a leap year.
69        long getIsLeapYear(
70                    [in] com::sun::star::beans::XPropertySet xOptions,
71                    [in] long nDate )
72            raises( com::sun::star::lang::IllegalArgumentException );
73
74        /// calculates the number of days in a month.
75        long getDaysInMonth(
76                    [in] com::sun::star::beans::XPropertySet xOptions,
77                    [in] long nDate )
78            raises( com::sun::star::lang::IllegalArgumentException );
79
80        /// calculates the number of days in a year.
81        long getDaysInYear(
82                    [in] com::sun::star::beans::XPropertySet xOptions,
83                    [in] long nDate )
84            raises( com::sun::star::lang::IllegalArgumentException );
85
86        /// calculates the number of weeks in a year.
87        long getWeeksInYear(
88                    [in] com::sun::star::beans::XPropertySet xOptions,
89                    [in] long nDate )
90            raises( com::sun::star::lang::IllegalArgumentException );
91    };
92
93    /**
94     * Interface with miscellaneous functions.
95     */
96    interface XMiscFunctions : com::sun::star::uno::XInterface
97    {
98        /// Encrypts or decrypts a string using the ROT13 algorithm.
99        string getRot13( [in] string aSrcString )
100            raises( com::sun::star::lang::IllegalArgumentException );
101    };
102
103    service DateFunctions
104    {
105        // exported interfaces:
106        interface XDateFunctions;
107        interface XMiscFunctions;
108    };
109};
110};
111};
112};
113};
114
115