summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-06-28 00:43:19 +0200
committerMichael Stahl <mstahl@redhat.com>2013-07-15 16:54:56 +0200
commitdd780228cca25dc818ca7fdb628ff607c109618e (patch)
treecec08040b1cd42296773a557fc821951615e9c3b /offapi
parenteb426753811befc69b3929146ac68cb97f92f7b0 (diff)
i#108348 API CHANGE: add IsUTC to css.util.DateTime etc.
Add IsUTC member to: com.sun.star.util.DateTime com.sun.star.util.DateTimeRange com.sun.star.util.Time Add new stucts with explicit time zones: com.sun.star.util.DateTimeWithTimezone com.sun.star.util.DateWithTimezone com.sun.star.util.TimeWithTimezone Adapt the sax::Converter to read/write timezones, and fix the unit test. Everything else just uses default (no time zone), this commit is just to fix the API. STRUCT: /UCR/com/sun/star/util/DateTime nFields1 = 7 != nFields2 = 8 Registry2 contains 1 more fields STRUCT: /UCR/com/sun/star/util/DateTimeRange nFields1 = 14 != nFields2 = 15 Registry2 contains 1 more fields STRUCT: /UCR/com/sun/star/util/Time nFields1 = 4 != nFields2 = 5 Registry2 contains 1 more fields Conflicts: sc/source/filter/oox/unitconverter.cxx Reviewed-on: https://gerrit.libreoffice.org/4833 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 652ccbdf3111766fadc379a8cf4650b744e1e19c) i#108348: fix TimeZone -> Timezone in struct names (cherry picked from commit 604aae1fd240254fe851d93dc35b5408bd13296c) Signed-off-by: Michael Stahl <mstahl@redhat.com> Signed-off-by: Lionel Elie Mamane <lionel@mamane.lu> Signed-off-by: Michael Meeks <michael.meeks@suse.com> Conflicts: forms/source/xforms/convert.cxx offapi/type_reference/offapi.rdb reportdesign/source/core/sdr/RptObject.cxx sc/source/filter/oox/unitconverter.cxx
Diffstat (limited to 'offapi')
-rw-r--r--offapi/UnoApi_offapi.mk3
-rw-r--r--offapi/com/sun/star/util/Date.idl3
-rw-r--r--offapi/com/sun/star/util/DateTime.idl7
-rw-r--r--offapi/com/sun/star/util/DateTimeRange.idl8
-rw-r--r--offapi/com/sun/star/util/DateTimeWithTimezone.idl43
-rw-r--r--offapi/com/sun/star/util/DateWithTimezone.idl43
-rw-r--r--offapi/com/sun/star/util/Time.idl7
-rw-r--r--offapi/com/sun/star/util/TimeWithTimezone.idl44
-rw-r--r--offapi/type_reference/offapi.rdbbin6862336 -> 6888448 bytes
9 files changed, 152 insertions, 6 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 4ebb0438c4c4..50e68bca15ee 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -4020,7 +4020,9 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/util,\
DataEditorEvent \
DataEditorEventType \
Date \
+ DateWithTimezone \
DateTime \
+ DateTimeWithTimezone \
DateTimeRange \
Duration \
ElementChange \
@@ -4041,6 +4043,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/util,\
SortField \
SortFieldType \
Time \
+ TimeWithTimezone \
TriState \
URL \
VetoException \
diff --git a/offapi/com/sun/star/util/Date.idl b/offapi/com/sun/star/util/Date.idl
index f8bc2ddc3be0..7b38b05d1aa5 100644
--- a/offapi/com/sun/star/util/Date.idl
+++ b/offapi/com/sun/star/util/Date.idl
@@ -20,11 +20,12 @@
#define __com_sun_star_util_Date_idl__
-
module com { module sun { module star { module util {
/** represents a date value.
+
+ The time zone is unknown.
*/
published struct Date
{
diff --git a/offapi/com/sun/star/util/DateTime.idl b/offapi/com/sun/star/util/DateTime.idl
index 397f9d768f13..443e62053f61 100644
--- a/offapi/com/sun/star/util/DateTime.idl
+++ b/offapi/com/sun/star/util/DateTime.idl
@@ -20,7 +20,6 @@
#define __com_sun_star_util_DateTime_idl__
-
module com { module sun { module star { module util {
@@ -61,7 +60,11 @@ published struct DateTime
*/
short Year;
- /** TODO: timezone **/
+ /** true: time zone is UTC false: unknown time zone.
+
+ @since LibreOffice 4.1
+ */
+ boolean IsUTC;
};
diff --git a/offapi/com/sun/star/util/DateTimeRange.idl b/offapi/com/sun/star/util/DateTimeRange.idl
index 0e01883ecb87..12aea4f0fd82 100644
--- a/offapi/com/sun/star/util/DateTimeRange.idl
+++ b/offapi/com/sun/star/util/DateTimeRange.idl
@@ -20,7 +20,6 @@
#define __com_sun_star_util_DateTimeRange_idl__
-
module com { module sun { module star { module util {
@@ -84,7 +83,12 @@ published struct DateTimeRange
*/
short EndYear;
- /** TODO timezones **/
+ /** true: time zone is UTC false: unknown time zone.
+
+ @since LibreOffice 4.1
+ */
+ boolean IsUTC;
+
};
diff --git a/offapi/com/sun/star/util/DateTimeWithTimezone.idl b/offapi/com/sun/star/util/DateTimeWithTimezone.idl
new file mode 100644
index 000000000000..398ed5efea83
--- /dev/null
+++ b/offapi/com/sun/star/util/DateTimeWithTimezone.idl
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __com_sun_star_util_DateTimeTZ_idl__
+#define __com_sun_star_util_DateTimeTZ_idl__
+
+#include <com/sun/star/util/DateTime.idl>
+
+
+module com { module sun { module star { module util {
+
+/** represents a combined date+time value with time zone.
+
+ @since LibreOffice 4.1
+ */
+struct DateTimeWithTimezone
+{
+ /** the date and time (in TimeZone)
+ */
+ DateTime DateTimeInTZ;
+
+ /** contains the time zone, as signed offset in minutes *from* UTC,
+ that is *east* of UTC, that is the amount of minutes that should
+ be added to UTC time to obtain the time in that timezone.
+
+ To obtain UTC datetime from DateTimeInTZ, you need to *subtract*
+ TimeZone minutes.
+ */
+ short Timezone;
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/util/DateWithTimezone.idl b/offapi/com/sun/star/util/DateWithTimezone.idl
new file mode 100644
index 000000000000..e60bcb7b8cfc
--- /dev/null
+++ b/offapi/com/sun/star/util/DateWithTimezone.idl
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __com_sun_star_util_DateTZ_idl__
+#define __com_sun_star_util_DateTZ_idl__
+
+#include <com/sun/star/util/Date.idl>
+
+
+module com { module sun { module star { module util {
+
+/** represents a date value with time zone.
+
+ @since LibreOffice 4.1
+ */
+struct DateWithTimezone
+{
+ /** the date.
+ @note XMLSchema-2 defines this as a 24 hour interval.
+ The TimeZone shifts the interval along the UTC time line.
+ */
+ Date DateInTZ;
+
+ /** contains the time zone, as signed offset in minutes *from* UTC,
+ that is *east* of UTC, that is the amount of minutes that should
+ be added to UTC time to obtain time in that timezone.
+ */
+ short Timezone;
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+
diff --git a/offapi/com/sun/star/util/Time.idl b/offapi/com/sun/star/util/Time.idl
index fce062daadbd..31a67b31bf85 100644
--- a/offapi/com/sun/star/util/Time.idl
+++ b/offapi/com/sun/star/util/Time.idl
@@ -20,7 +20,6 @@
#define __com_sun_star_util_Time_idl__
-
module com { module sun { module star { module util {
@@ -44,6 +43,12 @@ published struct Time
*/
unsigned short Hours;
+ /** true: time zone is UTC false: unknown time zone.
+
+ @since LibreOffice 4.1
+ */
+ boolean IsUTC;
+
};
diff --git a/offapi/com/sun/star/util/TimeWithTimezone.idl b/offapi/com/sun/star/util/TimeWithTimezone.idl
new file mode 100644
index 000000000000..70442ec0a147
--- /dev/null
+++ b/offapi/com/sun/star/util/TimeWithTimezone.idl
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __com_sun_star_util_TimeTZ_idl__
+#define __com_sun_star_util_TimeTZ_idl__
+
+#include <com/sun/star/util/Time.idl>
+
+
+module com { module sun { module star { module util {
+
+/** represents a combined time value with time zone.
+
+ @since LibreOffice 4.1
+ */
+struct TimeWithTimezone
+{
+ /** the time (in TimeZone)
+ */
+ Time TimeInTZ;
+
+ /** contains the time zone, as signed offset in minutes *from* UTC,
+ that is *east* of UTC, that is the amount of minutes that should
+ be added to UTC time to obtain the time in that timezone.
+
+ To obtain UTC time from TimeInTZ, you need to *subtract* TimeZone
+ minutes.
+ */
+ short Timezone;
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+
diff --git a/offapi/type_reference/offapi.rdb b/offapi/type_reference/offapi.rdb
index f2d883f3aa31..51c80d3b501d 100644
--- a/offapi/type_reference/offapi.rdb
+++ b/offapi/type_reference/offapi.rdb
Binary files differ