diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-09-09 20:00:48 +0200 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-09-11 20:40:19 +0000 |
commit | b31f33bcc1e5b8d1f791867358b5b4ad1df6e71e (patch) | |
tree | 50b297ee4a5187e120b7898afff52fcde18f3c52 /basic/source/inc/date.hxx | |
parent | CID#707531 silence coverity (diff) | |
download | core-b31f33bcc1e5b8d1f791867358b5b4ad1df6e71e.tar.gz core-b31f33bcc1e5b8d1f791867358b5b4ad1df6e71e.zip |
Easier conversion between Basic Date and UNO Date/Time
Utility functions to convert between Basic Date type
and the representations of Date and Time in UNO, namely:
- com.sun.star.util.Date
- com.sun.star.util.Time
- com.sun.star.util.DateTime
Name of new functions:
- CDateToUnoDate
- CDateFromUnoDate
- CDateToUnoTime
- CDateFromUnoTime
- CDateToUnoDateTime
- CDateFromUnoDateTime
Change-Id: I2b971df20df1c0351d071023e042169b548894f1
Reviewed-on: https://gerrit.libreoffice.org/5897
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'basic/source/inc/date.hxx')
-rw-r--r-- | basic/source/inc/date.hxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/basic/source/inc/date.hxx b/basic/source/inc/date.hxx index cd38c896d1df..cb7070284164 100644 --- a/basic/source/inc/date.hxx +++ b/basic/source/inc/date.hxx @@ -20,7 +20,15 @@ #ifndef _SBDATE_HXX #define _SBDATE_HXX +#include <com/sun/star/util/Date.hpp> +#include <com/sun/star/util/Time.hpp> +#include <com/sun/star/util/DateTime.hpp> + bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet ); +double implTimeSerial( sal_Int16 nHour, sal_Int16 nMinute, sal_Int16 nSecond); +bool implDateTimeSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, + sal_Int16 nHour, sal_Int16 nMinute, sal_Int16 nSecond, + double& rdRet ); sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 ); @@ -32,6 +40,13 @@ sal_Int16 implGetHour( double dDate ); sal_Int16 implGetMinute( double dDate ); sal_Int16 implGetSecond( double dDate ); +::com::sun::star::util::Date SbxDateToUNODate( const SbxValue* ); +void SbxDateFromUNODate( SbxValue*, const ::com::sun::star::util::Date& ); +::com::sun::star::util::Time SbxDateToUNOTime( const SbxValue* ); +void SbxDateFromUNOTime( SbxValue*, const ::com::sun::star::util::Time& ); +::com::sun::star::util::DateTime SbxDateToUNODateTime( const SbxValue* ); +void SbxDateFromUNODateTime( SbxValue*, const ::com::sun::star::util::DateTime& ); + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |