LibreOffice
LibreOffice 24.8 SDK API Reference
Loading...
Searching...
No Matches
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
21module com { module sun { module star { module i18n {
22
23
28published interface XCalendar : com::sun::star::uno::XInterface
29{
32
34 void loadCalendar( [in] string uniqueID,
35 [in] ::com::sun::star::lang::Locale rLocale );
36
39
41 sequence< string > getAllCalendars( [in] ::com::sun::star::lang::Locale rLocale );
42
46 string getUniqueID();
47
54 void setDateTime( [in] double nTimeInDays );
55
62 double getDateTime();
63
73 void setValue( [in] short nCalendarFieldIndex, [in] short nValue );
74
81 short getValue( [in] short nCalendarFieldIndex );
82
89 boolean isValid();
90
100 void addValue( [in] short nCalendarFieldIndex, [in] long nAmount );
101
106
110 void setFirstDayOfWeek( [in] short nDay );
111
115 void setMinimumNumberOfDaysForFirstWeek( [in] short nDays );
116
121
124
127
131 sequence< CalendarItem > getMonths();
132
136 sequence< CalendarItem > getDays();
137
195 string getDisplayName( [in] short nCalendarDisplayIndex,
196 [in] short nIdx,
197 [in] short nNameType );
198};
199
200}; }; }; };
201
202/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void loadDefaultCalendar([in] ::com::sun::star::lang::Locale rLocale)
Load the default calendar for the given locale.
sequence< CalendarItem > getDays()
returns a sequence of CalendarItem describing the day names.
short getMinimumNumberOfDaysForFirstWeek()
returns how many days of a week must reside in the first week of a year.
void setValue([in] short nCalendarFieldIndex, [in] short nValue)
Set the value of a field.
double getDateTime()
Get the UTC date/time as an offset to the start of the calendar at 1-Jan-1970 00:00.
boolean isValid()
Verify if the date fields set by a combination of XCalendar::setValue() calls is valid.
string getDisplayName([in] short nCalendarDisplayIndex, [in] short nIdx, [in] short nNameType)
Returns a string (name to display) matching the given parameters.
short getValue([in] short nCalendarFieldIndex)
Get the value of a field.
string getUniqueID()
Returns the ID string of the loaded calendar, for example, "Gregorian"
short getNumberOfMonthsInYear()
returns the number of months in a year, e.g. 12
sequence< CalendarItem > getMonths()
returns a sequence of CalendarItem describing the month names.
void setMinimumNumberOfDaysForFirstWeek([in] short nDays)
Set how many days of a week must reside in the first week of a year.
void addValue([in] short nCalendarFieldIndex, [in] long nAmount)
Add an amount to a field.
short getNumberOfDaysInWeek()
returns the number of days in a week, e.g. 7
short getFirstDayOfWeek()
returns the first day of a week, one of Weekdays values.
void setFirstDayOfWeek([in] short nDay)
Set the first day of a week, one of Weekdays values.
sequence< string > getAllCalendars([in] ::com::sun::star::lang::Locale rLocale)
Returns all available calendars for the given locale.
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.
Calendar getLoadedCalendar()
Get the currently loaded Calendar.
void loadCalendar([in] string uniqueID, [in] ::com::sun::star::lang::Locale rLocale)
Load a specific calendar for the given locale.
base interface of all UNO interfaces
Definition generated_idl_chapter_refs.idl:452
Definition Ambiguous.idl:20
A calendar as returned in a sequence by XLocaleData::getAllCalendars().
Definition Calendar.idl:33
object represents a specific geographical, political, or cultural region.
Definition Locale.idl:34