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