/**************************************************************
 * 
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 * 
 *************************************************************/




#include <com/sun/star/uno/XInterface.idl>
#include <com/sun/star/beans/XPropertySet.idl>
#include <com/sun/star/sheet/LocalizedName.idl>

module com
{
module sun
{
module star
{
module sheet
{
module addin
{
    interface XCompatibilityNames  : com::sun::star::uno::XInterface
    {
        /// @return a sequence with all localized names for a programmatic name
        sequence< com::sun::star::sheet::LocalizedName > getCompatibilityNames ( [in] string aProgrammaticName );
    };

    /**
     * Interface with date functions.
     */
    interface XDateFunctions : com::sun::star::uno::XInterface
    {
        /// calculates the number of weeks between two dates.
        long getDiffWeeks(
                    [in] com::sun::star::beans::XPropertySet xOptions,
                    [in] long nStartDate, [in] long nEndDate, [in] long nMode )
            raises( com::sun::star::lang::IllegalArgumentException );

        /// calculates the number of months between two dates.
        long getDiffMonths(
                    [in] com::sun::star::beans::XPropertySet xOptions,
                    [in] long nStartDate, [in] long nEndDate, [in] long nMode )
            raises( com::sun::star::lang::IllegalArgumentException );

        /// calculates the number of years between two dates.
        long getDiffYears(
                    [in] com::sun::star::beans::XPropertySet xOptions,
                    [in] long nStartDate, [in] long nEndDate, [in] long nMode )
            raises( com::sun::star::lang::IllegalArgumentException );

        /// checks if a date is in a leap year.
        long getIsLeapYear(
                    [in] com::sun::star::beans::XPropertySet xOptions,
                    [in] long nDate )
            raises( com::sun::star::lang::IllegalArgumentException );

        /// calculates the number of days in a month.
        long getDaysInMonth(
                    [in] com::sun::star::beans::XPropertySet xOptions,
                    [in] long nDate )
            raises( com::sun::star::lang::IllegalArgumentException );

        /// calculates the number of days in a year.
        long getDaysInYear(
                    [in] com::sun::star::beans::XPropertySet xOptions,
                    [in] long nDate )
            raises( com::sun::star::lang::IllegalArgumentException );

        /// calculates the number of weeks in a year.
        long getWeeksInYear(
                    [in] com::sun::star::beans::XPropertySet xOptions,
                    [in] long nDate )
            raises( com::sun::star::lang::IllegalArgumentException );
    };

    /**
     * Interface with miscellaneous functions.
     */
    interface XMiscFunctions : com::sun::star::uno::XInterface
    {
        /// Encrypts or decrypts a string using the ROT13 algorithm.
        string getRot13( [in] string aSrcString )
            raises( com::sun::star::lang::IllegalArgumentException );
    };

    service DateFunctions
    {
        // exported interfaces:
        interface XDateFunctions;
        interface XMiscFunctions;
    };
};
};
};
};
};

