summaryrefslogtreecommitdiff
path: root/include/tools/time.hxx
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-08-04 01:14:22 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2013-08-04 06:51:31 +0000
commit8ee69b0ba13f74d1515fac71df92947eb6328ab1 (patch)
tree5d5e95bb877e5e961cd02eee47011548af94bca1 /include/tools/time.hxx
parentaa5683e18de07c9e86325595ead4574efa685c3a (diff)
fdo#67235 adapt form control code to time nanosecond API change, step 3
Change-Id: I4899c89ee5b2a54c9c05b531ab284365f1558e3d Reviewed-on: https://gerrit.libreoffice.org/5270 Tested-by: Lionel Elie Mamane <lionel@mamane.lu> Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Diffstat (limited to 'include/tools/time.hxx')
-rw-r--r--include/tools/time.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/tools/time.hxx b/include/tools/time.hxx
index 31a8f94d23b9..d04652d0a77f 100644
--- a/include/tools/time.hxx
+++ b/include/tools/time.hxx
@@ -21,6 +21,7 @@
#include "tools/toolsdllapi.h"
#include <tools/solar.h>
+#include <com/sun/star/util/Time.hpp>
class ResId;
@@ -34,6 +35,8 @@ class TOOLS_DLLPUBLIC SAL_WARN_UNUSED Time
{
private:
sal_Int64 nTime;
+ void init( sal_uInt32 nHour, sal_uInt32 nMin,
+ sal_uInt32 nSec, sal_uInt64 nNanoSec);
public:
enum TimeInitSystem
@@ -66,11 +69,13 @@ public:
Time( const ResId & rResId );
Time( sal_Int64 _nTime ) { Time::nTime = _nTime; }
Time( const Time& rTime );
+ Time( const ::com::sun::star::util::Time& rTime );
Time( sal_uInt32 nHour, sal_uInt32 nMin,
sal_uInt32 nSec = 0, sal_uInt64 nNanoSec = 0 );
void SetTime( sal_Int64 nNewTime ) { nTime = nNewTime; }
sal_Int64 GetTime() const { return nTime; }
+ ::com::sun::star::util::Time GetUNOTime() const { return ::com::sun::star::util::Time(GetNanoSec(),GetSec(),GetMin(),GetHour(),false); }
void SetHour( sal_uInt16 nNewHour );
void SetMin( sal_uInt16 nNewMin );