LibreOffice
LibreOffice 6.4 SDK API Reference
XCalendar.idl
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef __com_sun_star_i18n_XCalendar_idl__
21 #define __com_sun_star_i18n_XCalendar_idl__
22 
26 
27 
28 module com { module sun { module star { module i18n {
29 
30 
36 {
39 
41  void loadCalendar( [in] string uniqueID,
42  [in] ::com::sun::star::lang::Locale rLocale );
43 
46 
48  sequence< string > getAllCalendars( [in] ::com::sun::star::lang::Locale rLocale );
49 
53  string getUniqueID();
54 
61  void setDateTime( [in] double nTimeInDays );
62 
69  double getDateTime();
70 
80  void setValue( [in] short nCalendarFieldIndex, [in] short nValue );
81 
88  short getValue( [in] short nCalendarFieldIndex );
89 
96  boolean isValid();
97 
107  void addValue( [in] short nCalendarFieldIndex, [in] long nAmount );
108 
113 
117  void setFirstDayOfWeek( [in] short nDay );
118 
122  void setMinimumNumberOfDaysForFirstWeek( [in] short nDays );
123 
128 
131 
134 
138  sequence< CalendarItem > getMonths();
139 
143  sequence< CalendarItem > getDays();
144 
202  string getDisplayName( [in] short nCalendarDisplayIndex,
203  [in] short nIdx,
204  [in] short nNameType );
205 };
206 
207 }; }; }; };
208 
209 #endif
210 
211 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
com::sun::star::i18n::XCalendar::getMonths
sequence< CalendarItem > getMonths()
returns a sequence of CalendarItem describing the month names.
com::sun::star::i18n::XCalendar::loadCalendar
void loadCalendar([in] string uniqueID, [in] ::com::sun::star::lang::Locale rLocale)
Load a specific calendar for the given locale.
com::sun::star::i18n::XCalendar::getDays
sequence< CalendarItem > getDays()
returns a sequence of CalendarItem describing the day names.
com::sun::star::i18n::XCalendar::getFirstDayOfWeek
short getFirstDayOfWeek()
returns the first day of a week, one of Weekdays values.
com::sun::star::i18n::XCalendar::getNumberOfMonthsInYear
short getNumberOfMonthsInYear()
returns the number of months in a year, e.g. 12
com::sun::star::i18n::XCalendar::getDateTime
double getDateTime()
Get the UTC date/time as an offset to the start of the calendar at 1-Jan-1970 00:00.
com::sun::star::i18n::XCalendar::getDisplayName
string getDisplayName([in] short nCalendarDisplayIndex, [in] short nIdx, [in] short nNameType)
Returns a string (name to display) matching the given parameters.
com::sun::star::i18n::XCalendar::getValue
short getValue([in] short nCalendarFieldIndex)
Get the value of a field.
com::sun::star::i18n::XCalendar::getUniqueID
string getUniqueID()
Returns the ID string of the loaded calendar, for example, "Gregorian"
com::sun::star::i18n::XCalendar::setDateTime
void setDateTime([in] double nTimeInDays)
Set the UTC date/time as an offset to the start of the calendar at 1-Jan-1970 00:00.
com::sun::star::i18n::XCalendar::addValue
void addValue([in] short nCalendarFieldIndex, [in] long nAmount)
Add an amount to a field.
Locale.idl
Calendar.idl
com::sun::star::i18n::XCalendar::isValid
boolean isValid()
Verify if the date fields set by a combination of XCalendar::setValue() calls is valid.
com::sun::star::i18n::XCalendar::loadDefaultCalendar
void loadDefaultCalendar([in] ::com::sun::star::lang::Locale rLocale)
Load the default calendar for the given locale.
com::sun::star::i18n::XCalendar::getLoadedCalendar
Calendar getLoadedCalendar()
Get the currently loaded Calendar.
com::sun::star::lang::Locale
object represents a specific geographical, political, or cultural region.
Definition: Locale.idl:48
com::sun::star::i18n::Calendar
A calendar as returned in a sequence by XLocaleData::getAllCalendars().
Definition: Calendar.idl:38
com::sun::star::i18n::XCalendar::getNumberOfDaysInWeek
short getNumberOfDaysInWeek()
returns the number of days in a week, e.g. 7
com::sun::star::i18n::XCalendar::setFirstDayOfWeek
void setFirstDayOfWeek([in] short nDay)
Set the first day of a week, one of Weekdays values.
com
Definition: Ambiguous.idl:22
CalendarItem.idl
com::sun::star::i18n::XCalendar::getMinimumNumberOfDaysForFirstWeek
short getMinimumNumberOfDaysForFirstWeek()
returns how many days of a week must reside in the first week of a year.
com::sun::star::i18n::XCalendar::getAllCalendars
sequence< string > getAllCalendars([in] ::com::sun::star::lang::Locale rLocale)
Returns all available calendars for the given locale.
com::sun::star::uno::XInterface
base interface of all UNO interfaces
Definition: XInterface.idl:48
com::sun::star::i18n::XCalendar
Access to locale specific calendar systems.
Definition: XCalendar.idl:36
com::sun::star::i18n::XCalendar::setMinimumNumberOfDaysForFirstWeek
void setMinimumNumberOfDaysForFirstWeek([in] short nDays)
Set how many days of a week must reside in the first week of a year.
com::sun::star::i18n::XCalendar::setValue
void setValue([in] short nCalendarFieldIndex, [in] short nValue)
Set the value of a field.