summaryrefslogtreecommitdiff
path: root/tools/source/datetime
diff options
context:
space:
mode:
authorFrancois Tigeot <ftigeot@wolfpond.org>2011-05-01 07:49:30 +0200
committerFrancois Tigeot <ftigeot@wolfpond.org>2011-05-01 07:49:30 +0200
commit64cf70b4e4e488ae1f21d8e5254faedd38eb2081 (patch)
treea274463e9c426b22cc2d3a77c4c64a38906d31c6 /tools/source/datetime
parent3c4779bdebe2ce8ab750b19dddf95e14f0a2d272 (diff)
Remove some OS/2 code
Diffstat (limited to 'tools/source/datetime')
-rw-r--r--tools/source/datetime/tdate.cxx15
-rw-r--r--tools/source/datetime/ttime.cxx43
2 files changed, 5 insertions, 53 deletions
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index 5a5c524dd80d..66adb081b04d 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -29,10 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_tools.hxx"
-#if defined( OS2 )
-#define INCL_DOSDATETIME
-#include <svpm.h>
-#elif defined( WNT )
+#if defined( WNT )
#include <windows.h>
#else
#include <time.h>
@@ -140,15 +137,7 @@ static void DaysToDate( long nDays,
Date::Date()
{
-#if defined( OS2 )
- DATETIME aDateTime;
- DosGetDateTime( &aDateTime );
-
- // Datum zusammenbauen
- nDate = ((sal_uIntPtr)aDateTime.day) +
- (((sal_uIntPtr)aDateTime.month)*100) +
- (((sal_uIntPtr)aDateTime.year)*10000);
-#elif defined WNT
+#if defined WNT
SYSTEMTIME aDateTime;
GetLocalTime( &aDateTime );
diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx
index 5f12c47c54ad..43e1b65c82b6 100644
--- a/tools/source/datetime/ttime.cxx
+++ b/tools/source/datetime/ttime.cxx
@@ -31,11 +31,7 @@
#define _TOOLS_TIME_CXX
-#if defined( OS2 )
-#define INCL_DOSMISC
-#define INCL_DOSDATETIME
-#include <svpm.h>
-#elif defined( WNT )
+#if defined( WNT )
#include <windows.h>
#elif defined UNX
#include <unistd.h>
@@ -94,16 +90,7 @@ static Time Sec100ToTime( sal_Int32 nSec100 )
Time::Time()
{
-#if defined( OS2 )
- DATETIME aDateTime;
- DosGetDateTime( &aDateTime );
-
- // Zeit zusammenbauen
- nTime = (((sal_Int32)aDateTime.hours)*1000000) +
- (((sal_Int32)aDateTime.minutes)*10000) +
- (((sal_Int32)aDateTime.seconds)*100) +
- ((sal_Int32)aDateTime.hundredths);
-#elif defined( WNT )
+#if defined( WNT )
SYSTEMTIME aDateTime;
GetLocalTime( &aDateTime );
@@ -313,23 +300,7 @@ sal_Bool Time::IsEqualIgnore100Sec( const Time& rTime ) const
Time Time::GetUTCOffset()
{
-#if defined( OS2 )
-#undef timezone
- DATETIME aDateTime;
- DosGetDateTime( &aDateTime );
-
- // Zeit zusammenbauen
- if ( aDateTime.timezone != -1 )
- {
- short nTempTime = (short)Abs( aDateTime.timezone );
- Time aTime( 0, (sal_uInt16)nTempTime );
- if ( aDateTime.timezone > 0 )
- aTime = -aTime;
- return aTime;
- }
- else
- return Time( 0 );
-#elif defined( WNT )
+#if defined( WNT )
TIME_ZONE_INFORMATION aTimeZone;
aTimeZone.Bias = 0;
DWORD nTimeZoneRet = GetTimeZoneInformation( &aTimeZone );
@@ -391,10 +362,6 @@ sal_uIntPtr Time::GetSystemTicks()
{
#if defined WNT
return (sal_uIntPtr)GetTickCount();
-#elif defined( OS2 )
- sal_uIntPtr nClock;
- DosQuerySysInfo( QSV_MS_COUNT, QSV_MS_COUNT, &nClock, sizeof( nClock ) );
- return (sal_uIntPtr)nClock;
#else
timeval tv;
gettimeofday (&tv, 0);
@@ -414,10 +381,6 @@ sal_uIntPtr Time::GetProcessTicks()
{
#if defined WNT
return (sal_uIntPtr)GetTickCount();
-#elif defined( OS2 )
- sal_uIntPtr nClock;
- DosQuerySysInfo( QSV_MS_COUNT, QSV_MS_COUNT, &nClock, sizeof( nClock ) );
- return (sal_uIntPtr)nClock;
#else
static sal_uIntPtr nImplTicksPerSecond = 0;
static double dImplTicksPerSecond;