fdo#82577: Handle Time

Put the TOOLS Time class in the tools namespace. Avoids clash with the X11
Time typedef.

Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866
Reviewed-on: https://gerrit.libreoffice.org/11684
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin 2014-09-28 15:49:26 +02:00 committed by Noel Grandin
parent eb4811590c
commit fc04f76336
203 changed files with 676 additions and 778 deletions

View File

@ -411,9 +411,9 @@ void MediaControl::implUpdateTimeField( double fCurTime )
SvtSysLocale aSysLocale; SvtSysLocale aSysLocale;
const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData(); const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData();
aTimeString += rLocaleData.getDuration( Time( 0, 0, static_cast< sal_uInt32 >( floor( fCurTime ) ) ) ) + aTimeString += rLocaleData.getDuration( tools::Time( 0, 0, static_cast< sal_uInt32 >( floor( fCurTime ) ) ) ) +
" / " + " / " +
rLocaleData.getDuration( Time( 0, 0, static_cast< sal_uInt32 >( floor( maItem.getDuration() ) )) ); rLocaleData.getDuration( tools::Time( 0, 0, static_cast< sal_uInt32 >( floor( maItem.getDuration() ) )) );
if( maTimeEdit.GetText() != aTimeString ) if( maTimeEdit.GetText() != aTimeString )
maTimeEdit.SetText( aTimeString ); maTimeEdit.SetText( aTimeString );

View File

@ -382,7 +382,7 @@ void lcl_printTimeOutput( void )
{ {
// Overall time output // Overall time output
lcl_lineOut( "" ); lcl_lineOut( "" );
lcl_lineOut( "***** Time Output *****" ); lcl_lineOut( "***** tools::Time Output *****" );
char TimeBuffer[500]; char TimeBuffer[500];
double dTotalTime = GpTimer->getElapsedTime() - GdStartTime; double dTotalTime = GpTimer->getElapsedTime() - GdStartTime;
sprintf( TimeBuffer, "Total execution time = %f ms", dTotalTime*1000.0 ); sprintf( TimeBuffer, "Total execution time = %f ms", dTotalTime*1000.0 );
@ -606,7 +606,7 @@ void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl )
{ {
double dDiffTime = dCurTime - GdLastTime; double dDiffTime = dCurTime - GdLastTime;
GdLastTime = dCurTime; GdLastTime = dCurTime;
sprintf( TimeBuffer, "\t\t// Time = %f ms / += %f ms", dCurTime*1000.0, dDiffTime*1000.0 ); sprintf( TimeBuffer, "\t\t// tools::Time = %f ms / += %f ms", dCurTime*1000.0, dDiffTime*1000.0 );
} }
#endif #endif
@ -802,7 +802,7 @@ void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, sal_Int32 nCallL
char TimeBuffer[200]; char TimeBuffer[200];
if( GbTimerOn && bLeave ) if( GbTimerOn && bLeave )
{ {
sprintf( TimeBuffer, " // Execution Time = %f ms", dExecutionTime*1000.0 ); sprintf( TimeBuffer, " // Execution tools::Time = %f ms", dExecutionTime*1000.0 );
pPostStr = TimeBuffer; pPostStr = TimeBuffer;
} }
#endif #endif

View File

@ -2360,7 +2360,7 @@ RTLFUNC(Second)
double Now_Impl() double Now_Impl()
{ {
Date aDate( Date::SYSTEM ); Date aDate( Date::SYSTEM );
Time aTime( Time::SYSTEM ); tools::Time aTime( tools::Time::SYSTEM );
double aSerial = (double)GetDayDiff( aDate ); double aSerial = (double)GetDayDiff( aDate );
long nSeconds = aTime.GetHour(); long nSeconds = aTime.GetHour();
nSeconds *= 3600; nSeconds *= 3600;
@ -2388,7 +2388,7 @@ RTLFUNC(Time)
if ( !bWrite ) if ( !bWrite )
{ {
Time aTime( Time::SYSTEM ); tools::Time aTime( tools::Time::SYSTEM );
SbxVariable* pMeth = rPar.Get( 0 ); SbxVariable* pMeth = rPar.Get( 0 );
OUString aRes; OUString aRes;
if( pMeth->IsFixed() ) if( pMeth->IsFixed() )
@ -2442,7 +2442,7 @@ RTLFUNC(Timer)
(void)pBasic; (void)pBasic;
(void)bWrite; (void)bWrite;
Time aTime( Time::SYSTEM ); tools::Time aTime( tools::Time::SYSTEM );
long nSeconds = aTime.GetHour(); long nSeconds = aTime.GetHour();
nSeconds *= 3600; nSeconds *= 3600;
nSeconds += aTime.GetMin() * 60; nSeconds += aTime.GetMin() * 60;
@ -3212,7 +3212,7 @@ RTLFUNC(FileDateTime)
else else
{ {
OUString aPath = rPar.Get(1)->GetOUString(); OUString aPath = rPar.Get(1)->GetOUString();
Time aTime( Time::EMPTY ); tools::Time aTime( tools::Time::EMPTY );
Date aDate( Date::EMPTY ); Date aDate( Date::EMPTY );
if( hasUno() ) if( hasUno() )
{ {
@ -3222,7 +3222,7 @@ RTLFUNC(FileDateTime)
try try
{ {
util::DateTime aUnoDT = xSFI->getDateTimeModified( aPath ); util::DateTime aUnoDT = xSFI->getDateTimeModified( aPath );
aTime = Time( aUnoDT.Hours, aUnoDT.Minutes, aUnoDT.Seconds, aUnoDT.NanoSeconds ); aTime = tools::Time( aUnoDT.Hours, aUnoDT.Minutes, aUnoDT.Seconds, aUnoDT.NanoSeconds );
aDate = Date( aUnoDT.Day, aUnoDT.Month, aUnoDT.Year ); aDate = Date( aUnoDT.Day, aUnoDT.Month, aUnoDT.Year );
} }
catch(const Exception & ) catch(const Exception & )
@ -3241,7 +3241,7 @@ RTLFUNC(FileDateTime)
oslDateTime aDT; oslDateTime aDT;
osl_getDateTimeFromTimeValue( &aTimeVal, &aDT ); osl_getDateTimeFromTimeValue( &aTimeVal, &aDT );
aTime = Time( aDT.Hours, aDT.Minutes, aDT.Seconds, aDT.NanoSeconds ); aTime = tools::Time( aDT.Hours, aDT.Minutes, aDT.Seconds, aDT.NanoSeconds );
aDate = Date( aDT.Day, aDT.Month, aDT.Year ); aDate = Date( aDT.Day, aDT.Month, aDT.Year );
} }
@ -4954,11 +4954,11 @@ bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double&
double implTimeSerial( sal_Int16 nHours, sal_Int16 nMinutes, sal_Int16 nSeconds ) double implTimeSerial( sal_Int16 nHours, sal_Int16 nMinutes, sal_Int16 nSeconds )
{ {
return return
static_cast<double>( nHours * ::Time::secondPerHour + static_cast<double>( nHours * ::tools::Time::secondPerHour +
nMinutes * ::Time::secondPerMinute + nMinutes * ::tools::Time::secondPerMinute +
nSeconds) nSeconds)
/ /
static_cast<double>( ::Time::secondPerDay ); static_cast<double>( ::tools::Time::secondPerDay );
} }
bool implDateTimeSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, bool implDateTimeSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,

View File

@ -1412,7 +1412,7 @@ RTLFUNC(GetSystemTicks)
StarBASIC::Error( SbERR_BAD_ARGUMENT ); StarBASIC::Error( SbERR_BAD_ARGUMENT );
return; return;
} }
rPar.Get(0)->PutLong( Time::GetSystemTicks() ); rPar.Get(0)->PutLong( tools::Time::GetSystemTicks() );
} }
RTLFUNC(GetPathSeparator) RTLFUNC(GetPathSeparator)

View File

@ -280,7 +280,7 @@ start:
// if the whole-number part is 0, we want no year! // if the whole-number part is 0, we want no year!
if( n <= -1.0 || n >= 1.0 ) if( n <= -1.0 || n >= 1.0 )
{ {
// Time only if != 00:00:00 // tools::Time only if != 00:00:00
if( floor( n ) == n ) if( floor( n ) == n )
{ {
switch( eDate ) switch( eDate )

View File

@ -173,7 +173,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b
} break; } break;
case DataType::TIME: case DataType::TIME:
{ {
Time aTime; css::util::Time aTime;
bool bOk = false; bool bOk = false;
if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_DOUBLE) if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_DOUBLE)
{ {

View File

@ -293,7 +293,7 @@ void ORowSetValue::free()
break; break;
case DataType::TIME: case DataType::TIME:
delete (::com::sun::star::util::Time*)m_aValue.m_pValue; delete (::com::sun::star::util::Time*)m_aValue.m_pValue;
TRACE_FREE( Time ) TRACE_FREE( tools::Time )
m_aValue.m_pValue = NULL; m_aValue.m_pValue = NULL;
break; break;
case DataType::TIMESTAMP: case DataType::TIMESTAMP:
@ -369,7 +369,7 @@ ORowSetValue& ORowSetValue::operator=(const ORowSetValue& _rRH)
break; break;
case DataType::TIME: case DataType::TIME:
m_aValue.m_pValue = new Time(*(Time*)_rRH.m_aValue.m_pValue); m_aValue.m_pValue = new Time(*(Time*)_rRH.m_aValue.m_pValue);
TRACE_ALLOC( Time ) TRACE_ALLOC( tools::Time )
break; break;
case DataType::TIMESTAMP: case DataType::TIMESTAMP:
m_aValue.m_pValue = new DateTime(*(DateTime*)_rRH.m_aValue.m_pValue); m_aValue.m_pValue = new DateTime(*(DateTime*)_rRH.m_aValue.m_pValue);
@ -512,7 +512,7 @@ ORowSetValue& ORowSetValue::operator=(const Date& _rRH)
return *this; return *this;
} }
ORowSetValue& ORowSetValue::operator=(const Time& _rRH) ORowSetValue& ORowSetValue::operator=(const css::util::Time& _rRH)
{ {
if(m_eTypeKind != DataType::TIME) if(m_eTypeKind != DataType::TIME)
free(); free();
@ -520,7 +520,7 @@ ORowSetValue& ORowSetValue::operator=(const Time& _rRH)
if(m_bNull) if(m_bNull)
{ {
m_aValue.m_pValue = new Time(_rRH); m_aValue.m_pValue = new Time(_rRH);
TRACE_ALLOC( Time ) TRACE_ALLOC( tools::Time )
m_eTypeKind = DataType::TIME; m_eTypeKind = DataType::TIME;
m_bNull = false; m_bNull = false;
} }
@ -756,7 +756,7 @@ bool operator==(const Date& _rLH,const Date& _rRH)
} }
bool operator==(const Time& _rLH,const Time& _rRH) bool operator==(const css::util::Time& _rLH, const css::util::Time& _rRH)
{ {
return _rLH.Minutes == _rRH.Minutes && _rLH.Hours == _rRH.Hours && _rLH.Seconds == _rRH.Seconds && _rLH.NanoSeconds == _rRH.NanoSeconds; return _rLH.Minutes == _rRH.Minutes && _rLH.Hours == _rRH.Hours && _rLH.Seconds == _rRH.Seconds && _rLH.NanoSeconds == _rRH.NanoSeconds;
} }
@ -2153,7 +2153,7 @@ namespace detail
virtual float getFloat() const = 0; virtual float getFloat() const = 0;
virtual double getDouble() const = 0; virtual double getDouble() const = 0;
virtual Date getDate() const = 0; virtual Date getDate() const = 0;
virtual Time getTime() const = 0; virtual css::util::Time getTime() const = 0;
virtual DateTime getTimestamp() const = 0; virtual DateTime getTimestamp() const = 0;
virtual Sequence< sal_Int8 > getBytes() const = 0; virtual Sequence< sal_Int8 > getBytes() const = 0;
virtual Reference< XBlob > getBlob() const = 0; virtual Reference< XBlob > getBlob() const = 0;
@ -2183,7 +2183,7 @@ namespace detail
virtual float getFloat() const SAL_OVERRIDE { return m_xRow->getFloat( m_nPos ); }; virtual float getFloat() const SAL_OVERRIDE { return m_xRow->getFloat( m_nPos ); };
virtual double getDouble() const SAL_OVERRIDE { return m_xRow->getDouble( m_nPos ); }; virtual double getDouble() const SAL_OVERRIDE { return m_xRow->getDouble( m_nPos ); };
virtual Date getDate() const SAL_OVERRIDE { return m_xRow->getDate( m_nPos ); }; virtual Date getDate() const SAL_OVERRIDE { return m_xRow->getDate( m_nPos ); };
virtual Time getTime() const SAL_OVERRIDE { return m_xRow->getTime( m_nPos ); }; virtual css::util::Time getTime() const SAL_OVERRIDE { return m_xRow->getTime( m_nPos ); };
virtual DateTime getTimestamp() const SAL_OVERRIDE { return m_xRow->getTimestamp( m_nPos ); }; virtual DateTime getTimestamp() const SAL_OVERRIDE { return m_xRow->getTimestamp( m_nPos ); };
virtual Sequence< sal_Int8 > getBytes() const SAL_OVERRIDE { return m_xRow->getBytes( m_nPos ); }; virtual Sequence< sal_Int8 > getBytes() const SAL_OVERRIDE { return m_xRow->getBytes( m_nPos ); };
virtual Reference< XBlob > getBlob() const SAL_OVERRIDE { return m_xRow->getBlob( m_nPos ); }; virtual Reference< XBlob > getBlob() const SAL_OVERRIDE { return m_xRow->getBlob( m_nPos ); };
@ -2214,7 +2214,7 @@ namespace detail
virtual float getFloat() const SAL_OVERRIDE { return m_xColumn->getFloat(); }; virtual float getFloat() const SAL_OVERRIDE { return m_xColumn->getFloat(); };
virtual double getDouble() const SAL_OVERRIDE { return m_xColumn->getDouble(); }; virtual double getDouble() const SAL_OVERRIDE { return m_xColumn->getDouble(); };
virtual Date getDate() const SAL_OVERRIDE { return m_xColumn->getDate(); }; virtual Date getDate() const SAL_OVERRIDE { return m_xColumn->getDate(); };
virtual Time getTime() const SAL_OVERRIDE { return m_xColumn->getTime(); }; virtual css::util::Time getTime() const SAL_OVERRIDE { return m_xColumn->getTime(); };
virtual DateTime getTimestamp() const SAL_OVERRIDE { return m_xColumn->getTimestamp(); }; virtual DateTime getTimestamp() const SAL_OVERRIDE { return m_xColumn->getTimestamp(); };
virtual Sequence< sal_Int8 > getBytes() const SAL_OVERRIDE { return m_xColumn->getBytes(); }; virtual Sequence< sal_Int8 > getBytes() const SAL_OVERRIDE { return m_xColumn->getBytes(); };
virtual Reference< XBlob > getBlob() const SAL_OVERRIDE { return m_xColumn->getBlob(); }; virtual Reference< XBlob > getBlob() const SAL_OVERRIDE { return m_xColumn->getBlob(); };

View File

@ -1080,7 +1080,7 @@ try
if (hasProperty(sPropDefaultTime, xNewProps) && !bIsString) if (hasProperty(sPropDefaultTime, xNewProps) && !bIsString)
{ // Completely analogous to time { // Completely analogous to time
Time aTime = DBTypeConversion::toTime(getDouble(aEffectiveDefault)); css::util::Time aTime = DBTypeConversion::toTime(getDouble(aEffectiveDefault));
xNewProps->setPropertyValue(sPropDefaultTime, makeAny(aTime)); xNewProps->setPropertyValue(sPropDefaultTime, makeAny(aTime));
} }

View File

@ -307,7 +307,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date&
setParameter(parameterIndex,adDBDate,sizeof(x),x); setParameter(parameterIndex,adDBDate,sizeof(x),x);
} }
void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& x ) throw(SQLException, RuntimeException) void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const css::util::Time& x ) throw(SQLException, RuntimeException)
{ {
setParameter(parameterIndex,adDBTime,sizeof(x),x); setParameter(parameterIndex,adDBTime,sizeof(x),x);
} }

View File

@ -362,12 +362,12 @@ static void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& x
{ {
double fCellVal = xCell->getValue(); double fCellVal = xCell->getValue();
double fTime = fCellVal - rtl::math::approxFloor( fCellVal ); double fTime = fCellVal - rtl::math::approxFloor( fCellVal );
sal_Int64 nIntTime = static_cast<sal_Int64>(rtl::math::round( fTime * static_cast<double>(::Time::nanoSecPerDay) )); sal_Int64 nIntTime = static_cast<sal_Int64>(rtl::math::round( fTime * static_cast<double>(::tools::Time::nanoSecPerDay) ));
if ( nIntTime == ::Time::nanoSecPerDay) if ( nIntTime == ::tools::Time::nanoSecPerDay)
nIntTime = 0; // 23:59:59.9999999995 and above is 00:00:00.00 nIntTime = 0; // 23:59:59.9999999995 and above is 00:00:00.00
::com::sun::star::util::Time aTime; ::com::sun::star::util::Time aTime;
aTime.NanoSeconds = (sal_uInt32)( nIntTime % ::Time::nanoSecPerSec ); aTime.NanoSeconds = (sal_uInt32)( nIntTime % ::tools::Time::nanoSecPerSec );
nIntTime /= ::Time::nanoSecPerSec; nIntTime /= ::tools::Time::nanoSecPerSec;
aTime.Seconds = (sal_uInt16)( nIntTime % 60 ); aTime.Seconds = (sal_uInt16)( nIntTime % 60 );
nIntTime /= 60; nIntTime /= 60;
aTime.Minutes = (sal_uInt16)( nIntTime % 60 ); aTime.Minutes = (sal_uInt16)( nIntTime % 60 );
@ -386,8 +386,8 @@ static void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& x
double fDays = ::rtl::math::approxFloor( fCellVal ); double fDays = ::rtl::math::approxFloor( fCellVal );
double fTime = fCellVal - fDays; double fTime = fCellVal - fDays;
long nIntDays = (long)fDays; long nIntDays = (long)fDays;
sal_Int64 nIntTime = ::rtl::math::round( fTime * static_cast<double>(::Time::nanoSecPerDay) ); sal_Int64 nIntTime = ::rtl::math::round( fTime * static_cast<double>(::tools::Time::nanoSecPerDay) );
if ( nIntTime == ::Time::nanoSecPerDay ) if ( nIntTime == ::tools::Time::nanoSecPerDay )
{ {
nIntTime = 0; // 23:59:59.9999999995 and above is 00:00:00.00 nIntTime = 0; // 23:59:59.9999999995 and above is 00:00:00.00
++nIntDays; // (next day) ++nIntDays; // (next day)
@ -395,8 +395,8 @@ static void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& x
::com::sun::star::util::DateTime aDateTime; ::com::sun::star::util::DateTime aDateTime;
aDateTime.NanoSeconds = (sal_uInt16)( nIntTime % ::Time::nanoSecPerSec ); aDateTime.NanoSeconds = (sal_uInt16)( nIntTime % ::tools::Time::nanoSecPerSec );
nIntTime /= ::Time::nanoSecPerSec; nIntTime /= ::tools::Time::nanoSecPerSec;
aDateTime.Seconds = (sal_uInt16)( nIntTime % 60 ); aDateTime.Seconds = (sal_uInt16)( nIntTime % 60 );
nIntTime /= 60; nIntTime /= 60;
aDateTime.Minutes = (sal_uInt16)( nIntTime % 60 ); aDateTime.Minutes = (sal_uInt16)( nIntTime % 60 );

View File

@ -187,7 +187,7 @@ void SAL_CALL OEvoabPreparedStatement::setDate( sal_Int32 /*parameterIndex*/, co
} }
void SAL_CALL OEvoabPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const Time& /*aVal*/ ) throw(SQLException, RuntimeException, std::exception) void SAL_CALL OEvoabPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const css::util::Time& /*aVal*/ ) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setTime", *this ); ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setTime", *this );
} }

View File

@ -262,7 +262,7 @@ ORowSetValue OOp_CurTime::operate(const ::std::vector<ORowSetValue>& lhs) const
if ( !lhs.empty() ) if ( !lhs.empty() )
return ORowSetValue(); return ORowSetValue();
Time aCurTime( Time::SYSTEM ); tools::Time aCurTime( tools::Time::SYSTEM );
return ::com::sun::star::util::Time(aCurTime.GetNanoSec(), return ::com::sun::star::util::Time(aCurTime.GetNanoSec(),
aCurTime.GetSec(), aCurTime.GetMin(), aCurTime.GetHour(), aCurTime.GetSec(), aCurTime.GetMin(), aCurTime.GetHour(),
false); false);

View File

@ -401,7 +401,7 @@ void SAL_CALL OPreparedStatement::setDate(sal_Int32 nIndex, const Date& rDate)
setValue< ISC_DATE >(nIndex, aISCDate, SQL_TYPE_DATE); setValue< ISC_DATE >(nIndex, aISCDate, SQL_TYPE_DATE);
} }
void SAL_CALL OPreparedStatement::setTime( sal_Int32 nIndex, const Time& rTime) void SAL_CALL OPreparedStatement::setTime( sal_Int32 nIndex, const css::util::Time& rTime)
throw(SQLException, RuntimeException, std::exception) throw(SQLException, RuntimeException, std::exception)
{ {
struct tm aCTime; struct tm aCTime;

View File

@ -621,7 +621,7 @@ Date SAL_CALL OResultSet::getDate(sal_Int32 nIndex)
Time SAL_CALL OResultSet::getTime(sal_Int32 nIndex) Time SAL_CALL OResultSet::getTime(sal_Int32 nIndex)
throw(SQLException, RuntimeException, std::exception) throw(SQLException, RuntimeException, std::exception)
{ {
return safelyRetrieveValue< Time >(nIndex, SQL_TYPE_TIME); return safelyRetrieveValue< css::util::Time >(nIndex, SQL_TYPE_TIME);
} }
DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 nIndex) DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 nIndex)

View File

@ -93,7 +93,7 @@ namespace comphelper { namespace log { namespace convert
} }
OUString convertLogArgToString( const Time& _rTime ) OUString convertLogArgToString( const css::util::Time& _rTime )
{ {
char buffer[ 30 ]; char buffer[ 30 ];
const size_t buffer_size = sizeof( buffer ); const size_t buffer_size = sizeof( buffer );

View File

@ -189,65 +189,41 @@ void SAL_CALL KabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int32)
void SAL_CALL KabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const OUString&) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const OUString&) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setObjectNull", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setObjectNull", NULL);
} }
void SAL_CALL KabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setBoolean", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setBoolean", NULL);
} }
void SAL_CALL KabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setByte", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setByte", NULL);
} }
void SAL_CALL KabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setShort", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setShort", NULL);
} }
void SAL_CALL KabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setInt", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setInt", NULL);
} }
void SAL_CALL KabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("", NULL); ::dbtools::throwFunctionNotSupportedSQLException("", NULL);
} }
void SAL_CALL KabPreparedStatement::setFloat(sal_Int32, float) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setFloat(sal_Int32, float) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setFloat", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setFloat", NULL);
} }
void SAL_CALL KabPreparedStatement::setDouble(sal_Int32, double) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setDouble(sal_Int32, double) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setDouble", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setDouble", NULL);
} }
@ -263,49 +239,32 @@ void SAL_CALL KabPreparedStatement::setString(sal_Int32 parameterIndex, const OU
void SAL_CALL KabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setBytes", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setBytes", NULL);
} }
void SAL_CALL KabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setDate", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setDate", NULL);
} }
void SAL_CALL KabPreparedStatement::setTime(sal_Int32, const Time&) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setTime(sal_Int32, const css::util::Time&) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setTime", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setTime", NULL);
} }
void SAL_CALL KabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setTimestamp", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setTimestamp", NULL);
} }
void SAL_CALL KabPreparedStatement::setBinaryStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setBinaryStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setBinaryStream", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setBinaryStream", NULL);
} }
void SAL_CALL KabPreparedStatement::setCharacterStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setCharacterStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", NULL);
} }
@ -319,41 +278,26 @@ void SAL_CALL KabPreparedStatement::setObject(sal_Int32 parameterIndex, const An
void SAL_CALL KabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, sal_Int32, sal_Int32) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, sal_Int32, sal_Int32) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", NULL);
} }
void SAL_CALL KabPreparedStatement::setRef(sal_Int32, const Reference< XRef >&) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setRef(sal_Int32, const Reference< XRef >&) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setRef", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setRef", NULL);
} }
void SAL_CALL KabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob >&) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob >&) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setBlob", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setBlob", NULL);
} }
void SAL_CALL KabPreparedStatement::setClob(sal_Int32, const Reference< XClob >&) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setClob(sal_Int32, const Reference< XClob >&) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setClob", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setClob", NULL);
} }
void SAL_CALL KabPreparedStatement::setArray(sal_Int32, const Reference< XArray >&) throw(SQLException, RuntimeException, std::exception) void SAL_CALL KabPreparedStatement::setArray(sal_Int32, const Reference< XArray >&) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setArray", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setArray", NULL);
} }

View File

@ -338,7 +338,7 @@ cssu::DateTime SAL_CALL KabResultSet::getTimestamp(sal_Int32 columnIndex) throw(
nRet.Hours = nRevision.time().hour(); nRet.Hours = nRevision.time().hour();
nRet.Minutes = nRevision.time().minute(); nRet.Minutes = nRevision.time().minute();
nRet.Seconds = nRevision.time().second(); nRet.Seconds = nRevision.time().second();
nRet.NanoSeconds = nRevision.time().msec() * ::Time::nanoPerMilli; nRet.NanoSeconds = nRevision.time().msec() * ::tools::Time::nanoPerMilli;
return nRet; return nRet;
} }
} }

View File

@ -202,65 +202,41 @@ void SAL_CALL MacabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int3
void SAL_CALL MacabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const OUString&) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const OUString&) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setObjectNull", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setObjectNull", NULL);
} }
void SAL_CALL MacabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setBoolean", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setBoolean", NULL);
} }
void SAL_CALL MacabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setByte", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setByte", NULL);
} }
void SAL_CALL MacabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setShort", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setShort", NULL);
} }
void SAL_CALL MacabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setInt", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setInt", NULL);
} }
void SAL_CALL MacabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setLong", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setLong", NULL);
} }
void SAL_CALL MacabPreparedStatement::setFloat(sal_Int32, float) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setFloat(sal_Int32, float) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setFloat", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setFloat", NULL);
} }
void SAL_CALL MacabPreparedStatement::setDouble(sal_Int32, double) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setDouble(sal_Int32, double) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setDouble", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setDouble", NULL);
} }
@ -276,49 +252,32 @@ void SAL_CALL MacabPreparedStatement::setString(sal_Int32 parameterIndex, const
void SAL_CALL MacabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setBytes", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setBytes", NULL);
} }
void SAL_CALL MacabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setDate", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setDate", NULL);
} }
void SAL_CALL MacabPreparedStatement::setTime(sal_Int32, const Time&) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setTime(sal_Int32, const css::util::Time&) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setTime", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setTime", NULL);
} }
void SAL_CALL MacabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setTimestamp", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setTimestamp", NULL);
} }
void SAL_CALL MacabPreparedStatement::setBinaryStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setBinaryStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setBinaryStream", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setBinaryStream", NULL);
} }
void SAL_CALL MacabPreparedStatement::setCharacterStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setCharacterStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", NULL);
} }
@ -336,41 +295,26 @@ void SAL_CALL MacabPreparedStatement::setObject(sal_Int32 parameterIndex, const
void SAL_CALL MacabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, sal_Int32, sal_Int32) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, sal_Int32, sal_Int32) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", NULL);
} }
void SAL_CALL MacabPreparedStatement::setRef(sal_Int32, const Reference< XRef >&) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setRef(sal_Int32, const Reference< XRef >&) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setRef", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setRef", NULL);
} }
void SAL_CALL MacabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob >&) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob >&) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setBlob", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setBlob", NULL);
} }
void SAL_CALL MacabPreparedStatement::setClob(sal_Int32, const Reference< XClob >&) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setClob(sal_Int32, const Reference< XClob >&) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setClob", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setClob", NULL);
} }
void SAL_CALL MacabPreparedStatement::setArray(sal_Int32, const Reference< XArray >&) throw(SQLException, RuntimeException) void SAL_CALL MacabPreparedStatement::setArray(sal_Int32, const Reference< XArray >&) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFunctionNotSupportedSQLException("setArray", NULL); ::dbtools::throwFunctionNotSupportedSQLException("setArray", NULL);
} }

View File

@ -400,7 +400,7 @@ Time SAL_CALL MacabResultSet::getTime(sal_Int32) throw(SQLException, RuntimeExce
::dbtools::throwFunctionNotSupportedSQLException("getTime", NULL); ::dbtools::throwFunctionNotSupportedSQLException("getTime", NULL);
Time nRet; css::util::Time nRet;
return nRet; return nRet;
} }
@ -823,7 +823,7 @@ void SAL_CALL MacabResultSet::updateDate(sal_Int32, const Date&) throw(SQLExcept
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
} }
void SAL_CALL MacabResultSet::updateTime(sal_Int32, const Time&) throw(SQLException, RuntimeException) void SAL_CALL MacabResultSet::updateTime(sal_Int32, const css::util::Time&) throw(SQLException, RuntimeException)
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);

View File

@ -228,7 +228,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 /*parameterIndex*/, const D
void SAL_CALL OPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const Time& /*aVal*/ ) throw(SQLException, RuntimeException, std::exception) void SAL_CALL OPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const css::util::Time& /*aVal*/ ) throw(SQLException, RuntimeException, std::exception)
{ {
::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setTime", *this ); ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setTime", *this );
} }

View File

@ -238,7 +238,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 /*parameterIndex*/, const D
void SAL_CALL OPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const Time& /*aVal*/ ) throw(SQLException, RuntimeException) void SAL_CALL OPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const css::util::Time& /*aVal*/ ) throw(SQLException, RuntimeException)
{ {
::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setTime", *this ); ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setTime", *this );
} }

View File

@ -428,7 +428,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date&
} }
void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& aVal ) throw(SQLException, RuntimeException, std::exception) void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const css::util::Time& aVal ) throw(SQLException, RuntimeException, std::exception)
{ {
SQLULEN nColSize; SQLULEN nColSize;
if(aVal.NanoSeconds == 0) if(aVal.NanoSeconds == 0)

View File

@ -1102,7 +1102,7 @@ void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const Date& x ) thr
} }
void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const Time& x ) throw(SQLException, RuntimeException, std::exception) void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const css::util::Time& x ) throw(SQLException, RuntimeException, std::exception)
{ {
TIME_STRUCT aVal = OTools::TimeToOdbcTime(x); TIME_STRUCT aVal = OTools::TimeToOdbcTime(x);
updateValue(columnIndex,SQL_TIME,&aVal); updateValue(columnIndex,SQL_TIME,&aVal);

View File

@ -252,7 +252,7 @@ OUString OSQLParseNode::convertDateTimeString(const SQLParseNodeParameter& rPara
OUString OSQLParseNode::convertTimeString(const SQLParseNodeParameter& rParam, const OUString& rString) const OUString OSQLParseNode::convertTimeString(const SQLParseNodeParameter& rParam, const OUString& rString) const
{ {
Time aTime = DBTypeConversion::toTime(rString); css::util::Time aTime = DBTypeConversion::toTime(rString);
Reference< XNumberFormatsSupplier > xSupplier(rParam.xFormatter->getNumberFormatsSupplier()); Reference< XNumberFormatsSupplier > xSupplier(rParam.xFormatter->getNumberFormatsSupplier());
Reference< XNumberFormatTypes > xTypes(xSupplier->getNumberFormats(), UNO_QUERY); Reference< XNumberFormatTypes > xTypes(xSupplier->getNumberFormats(), UNO_QUERY);
@ -1065,7 +1065,7 @@ OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType)
} }
case DataType::TIME: case DataType::TIME:
{ {
Time aTime = DBTypeConversion::toTime(fValue); css::util::Time aTime = DBTypeConversion::toTime(fValue);
OUString aString = DBTypeConversion::toTimeString(aTime); OUString aString = DBTypeConversion::toTimeString(aTime);
pDateNode->append(new OSQLInternalNode(aEmptyString, SQL_NODE_KEYWORD, SQL_TOKEN_T)); pDateNode->append(new OSQLInternalNode(aEmptyString, SQL_NODE_KEYWORD, SQL_TOKEN_T));
pDateNode->append(new OSQLInternalNode(aString, SQL_NODE_STRING)); pDateNode->append(new OSQLInternalNode(aString, SQL_NODE_STRING));

View File

@ -182,7 +182,7 @@ IMPL_LINK_NOARG_INLINE_END(SvxPostItDialog, NextHdl)
IMPL_LINK_NOARG(SvxPostItDialog, Stamp) IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
{ {
Date aDate( Date::SYSTEM ); Date aDate( Date::SYSTEM );
Time aTime( Time::SYSTEM ); tools::Time aTime( tools::Time::SYSTEM );
OUString aTmp( SvtUserOptions().GetID() ); OUString aTmp( SvtUserOptions().GetID() );
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
OUString aStr( m_pEditED->GetText() ); OUString aStr( m_pEditED->GetText() );

View File

@ -174,7 +174,7 @@ bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet* rSet )
officecfg::Office::Common::Cache::GraphicManager::ObjectCacheSize::set( officecfg::Office::Common::Cache::GraphicManager::ObjectCacheSize::set(
objectCacheSize, batch); objectCacheSize, batch);
const Time aTime( m_pTfGraphicObjectTime->GetTime() ); const tools::Time aTime( m_pTfGraphicObjectTime->GetTime() );
sal_Int32 objectReleaseTime = sal_Int32 objectReleaseTime =
aTime.GetSec() + aTime.GetMin() * 60 + aTime.GetHour() * 3600; aTime.GetSec() + aTime.GetMin() * 60 + aTime.GetHour() * 3600;
officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::set( officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::set(
@ -227,7 +227,7 @@ void OfaMemoryOptionsPage::Reset( const SfxItemSet* rSet )
sal_Int32 nTime = sal_Int32 nTime =
officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime:: officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::
get(); get();
Time aTime( (sal_uInt16)( nTime / 3600 ), (sal_uInt16)( ( nTime % 3600 ) / 60 ), (sal_uInt16)( ( nTime % 3600 ) % 60 ) ); tools::Time aTime( (sal_uInt16)( nTime / 3600 ), (sal_uInt16)( ( nTime % 3600 ) / 60 ), (sal_uInt16)( ( nTime % 3600 ) % 60 ) );
m_pTfGraphicObjectTime->SetTime( aTime ); m_pTfGraphicObjectTime->SetTime( aTime );
GraphicCacheConfigHdl(m_pNfGraphicCache); GraphicCacheConfigHdl(m_pNfGraphicCache);

View File

@ -108,7 +108,7 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
oslDateTime lastCheckedDT; oslDateTime lastCheckedDT;
Date aDate( Date::EMPTY ); Date aDate( Date::EMPTY );
Time aTime( Time::EMPTY ); tools::Time aTime( tools::Time::EMPTY );
lastCheckedTV.Seconds = (sal_uInt32) lastChecked; lastCheckedTV.Seconds = (sal_uInt32) lastChecked;
osl_getLocalTimeFromSystemTime( &lastCheckedTV, &lastCheckedTV ); osl_getLocalTimeFromSystemTime( &lastCheckedTV, &lastCheckedTV );
@ -116,7 +116,7 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
if ( osl_getDateTimeFromTimeValue( &lastCheckedTV, &lastCheckedDT ) ) if ( osl_getDateTimeFromTimeValue( &lastCheckedTV, &lastCheckedDT ) )
{ {
aDate = Date( lastCheckedDT.Day, lastCheckedDT.Month, lastCheckedDT.Year ); aDate = Date( lastCheckedDT.Day, lastCheckedDT.Month, lastCheckedDT.Year );
aTime = Time( lastCheckedDT.Hours, lastCheckedDT.Minutes ); aTime = ::tools::Time( lastCheckedDT.Hours, lastCheckedDT.Minutes );
} }
LanguageType eUILang = Application::GetSettings().GetUILanguageTag().getLanguageType(); LanguageType eUILang = Application::GetSettings().GetUILanguageTag().getLanguageType();

View File

@ -81,7 +81,7 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe
if (nFieldType != text::textfield::Type::TIME) if (nFieldType != text::textfield::Type::TIME)
{ {
util::DateTime aDateTime = xPropSet->getPropertyValue(UNO_TC_PROP_DATE_TIME).get<util::DateTime>(); util::DateTime aDateTime = xPropSet->getPropertyValue(UNO_TC_PROP_DATE_TIME).get<util::DateTime>();
Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds); tools::Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds);
bool bIsFixed = false; bool bIsFixed = false;
xPropSet->getPropertyValue(UNO_TC_PROP_IS_FIXED) >>= bIsFixed; xPropSet->getPropertyValue(UNO_TC_PROP_IS_FIXED) >>= bIsFixed;
@ -787,7 +787,7 @@ SV_IMPL_PERSIST1( SvxExtTimeField, SvxFieldData );
SvxExtTimeField::SvxExtTimeField() SvxExtTimeField::SvxExtTimeField()
: m_nFixTime( Time(Time::SYSTEM).GetTime() ) : m_nFixTime( tools::Time(tools::Time::SYSTEM).GetTime() )
{ {
eType = SVXTIMETYPE_VAR; eType = SVXTIMETYPE_VAR;
eFormat = SVXTIMEFORMAT_STANDARD; eFormat = SVXTIMEFORMAT_STANDARD;
@ -795,7 +795,7 @@ SvxExtTimeField::SvxExtTimeField()
SvxExtTimeField::SvxExtTimeField( const Time& rTime, SvxTimeType eT, SvxTimeFormat eF ) SvxExtTimeField::SvxExtTimeField( const tools::Time& rTime, SvxTimeType eT, SvxTimeFormat eF )
: m_nFixTime( rTime.GetTime() ) : m_nFixTime( rTime.GetTime() )
{ {
eType = eT; eType = eT;
@ -849,15 +849,15 @@ void SvxExtTimeField::Save( SvPersistStream & rStm )
OUString SvxExtTimeField::GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLang ) const OUString SvxExtTimeField::GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLang ) const
{ {
Time aTime( Time::EMPTY ); tools::Time aTime( tools::Time::EMPTY );
if ( eType == SVXTIMETYPE_FIX ) if ( eType == SVXTIMETYPE_FIX )
aTime.SetTime(m_nFixTime); aTime.SetTime(m_nFixTime);
else else
aTime = Time( Time::SYSTEM ); // current time aTime = tools::Time( tools::Time::SYSTEM ); // current time
return GetFormatted( aTime, eFormat, rFormatter, eLang ); return GetFormatted( aTime, eFormat, rFormatter, eLang );
} }
OUString SvxExtTimeField::GetFormatted( Time& aTime, SvxTimeFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLang ) OUString SvxExtTimeField::GetFormatted( tools::Time& aTime, SvxTimeFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLang )
{ {
switch( eFormat ) switch( eFormat )
{ {
@ -1269,7 +1269,7 @@ void SvxDateTimeField::Save( SvPersistStream & /*rStm*/ )
SvxDateTimeField::SvxDateTimeField() {} SvxDateTimeField::SvxDateTimeField() {}
OUString SvxDateTimeField::GetFormatted( OUString SvxDateTimeField::GetFormatted(
Date& rDate, Time& rTime, int eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ) Date& rDate, tools::Time& rTime, int eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage )
{ {
OUString aRet; OUString aRet;

View File

@ -1551,7 +1551,7 @@ bool SvxAutoCorrect::CreateLanguageFile( const LanguageTag& rLanguageTag, bool b
SvxAutoCorrectLanguageListsPtr pLists = 0; SvxAutoCorrectLanguageListsPtr pLists = 0;
Time nMinTime( 0, 2 ), nAktTime( Time::SYSTEM ), nLastCheckTime( Time::EMPTY ); tools::Time nMinTime( 0, 2 ), nAktTime( tools::Time::SYSTEM ), nLastCheckTime( tools::Time::EMPTY );
std::map<LanguageTag, long>::iterator nFndPos = aLastFileTable.find(rLanguageTag); std::map<LanguageTag, long>::iterator nFndPos = aLastFileTable.find(rLanguageTag);
if(nFndPos != aLastFileTable.end() && if(nFndPos != aLastFileTable.end() &&
@ -1925,8 +1925,8 @@ SvxAutoCorrectLanguageLists::SvxAutoCorrectLanguageLists(
: sShareAutoCorrFile( rShareAutoCorrectFile ), : sShareAutoCorrFile( rShareAutoCorrectFile ),
sUserAutoCorrFile( rUserAutoCorrectFile ), sUserAutoCorrFile( rUserAutoCorrectFile ),
aModifiedDate( Date::EMPTY ), aModifiedDate( Date::EMPTY ),
aModifiedTime( Time::EMPTY ), aModifiedTime( tools::Time::EMPTY ),
aLastCheckTime( Time::EMPTY ), aLastCheckTime( tools::Time::EMPTY ),
pCplStt_ExcptLst( 0 ), pCplStt_ExcptLst( 0 ),
pWrdStt_ExcptLst( 0 ), pWrdStt_ExcptLst( 0 ),
pAutocorr_List( 0 ), pAutocorr_List( 0 ),
@ -1947,12 +1947,12 @@ bool SvxAutoCorrectLanguageLists::IsFileChanged_Imp()
// Access the file system only every 2 minutes to check the date stamp // Access the file system only every 2 minutes to check the date stamp
bool bRet = false; bool bRet = false;
Time nMinTime( 0, 2 ); tools::Time nMinTime( 0, 2 );
Time nAktTime( Time::SYSTEM ); tools::Time nAktTime( tools::Time::SYSTEM );
if( aLastCheckTime > nAktTime || // overflow? if( aLastCheckTime > nAktTime || // overflow?
( nAktTime -= aLastCheckTime ) > nMinTime ) // min time past ( nAktTime -= aLastCheckTime ) > nMinTime ) // min time past
{ {
Date aTstDate( Date::EMPTY ); Time aTstTime( Time::EMPTY ); Date aTstDate( Date::EMPTY ); tools::Time aTstTime( tools::Time::EMPTY );
if( FStatHelper::GetModifiedDateTimeOfFile( sShareAutoCorrFile, if( FStatHelper::GetModifiedDateTimeOfFile( sShareAutoCorrFile,
&aTstDate, &aTstTime ) && &aTstDate, &aTstTime ) &&
( aModifiedDate != aTstDate || aModifiedTime != aTstTime )) ( aModifiedDate != aTstDate || aModifiedTime != aTstTime ))
@ -1967,7 +1967,7 @@ bool SvxAutoCorrectLanguageLists::IsFileChanged_Imp()
delete pAutocorr_List, pAutocorr_List = 0; delete pAutocorr_List, pAutocorr_List = 0;
nFlags &= ~(CplSttLstLoad | WrdSttLstLoad | ChgWordLstLoad ); nFlags &= ~(CplSttLstLoad | WrdSttLstLoad | ChgWordLstLoad );
} }
aLastCheckTime = Time( Time::SYSTEM ); aLastCheckTime = tools::Time( tools::Time::SYSTEM );
} }
return bRet; return bRet;
} }
@ -2038,7 +2038,7 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp(
// Set time stamp // Set time stamp
FStatHelper::GetModifiedDateTimeOfFile( sShareAutoCorrFile, FStatHelper::GetModifiedDateTimeOfFile( sShareAutoCorrFile,
&aModifiedDate, &aModifiedTime ); &aModifiedDate, &aModifiedTime );
aLastCheckTime = Time( Time::SYSTEM ); aLastCheckTime = tools::Time( tools::Time::SYSTEM );
} }
} }
@ -2138,7 +2138,7 @@ SvxAutocorrWordList* SvxAutoCorrectLanguageLists::LoadAutocorrWordList()
// Set time stamp // Set time stamp
FStatHelper::GetModifiedDateTimeOfFile( sShareAutoCorrFile, FStatHelper::GetModifiedDateTimeOfFile( sShareAutoCorrFile,
&aModifiedDate, &aModifiedTime ); &aModifiedDate, &aModifiedTime );
aLastCheckTime = Time( Time::SYSTEM ); aLastCheckTime = tools::Time( tools::Time::SYSTEM );
return pAutocorr_List; return pAutocorr_List;
} }
@ -2184,7 +2184,7 @@ bool SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const OUString& rNew)
// Set time stamp // Set time stamp
FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile, FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile,
&aModifiedDate, &aModifiedTime ); &aModifiedDate, &aModifiedTime );
aLastCheckTime = Time( Time::SYSTEM ); aLastCheckTime = tools::Time( tools::Time::SYSTEM );
aRet = true; aRet = true;
} }
return aRet; return aRet;
@ -2205,7 +2205,7 @@ bool SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const OUString& rNew)
// Set time stamp // Set time stamp
FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile, FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile,
&aModifiedDate, &aModifiedTime ); &aModifiedDate, &aModifiedTime );
aLastCheckTime = Time( Time::SYSTEM ); aLastCheckTime = tools::Time( tools::Time::SYSTEM );
aRet = true; aRet = true;
} }
return aRet; return aRet;
@ -2238,7 +2238,7 @@ void SvxAutoCorrectLanguageLists::SaveCplSttExceptList()
// Set time stamp // Set time stamp
FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile, FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile,
&aModifiedDate, &aModifiedTime ); &aModifiedDate, &aModifiedTime );
aLastCheckTime = Time( Time::SYSTEM ); aLastCheckTime = tools::Time( tools::Time::SYSTEM );
} }
void SvxAutoCorrectLanguageLists::SetCplSttExceptList( SvStringsISortDtor* pList ) void SvxAutoCorrectLanguageLists::SetCplSttExceptList( SvStringsISortDtor* pList )
@ -2282,7 +2282,7 @@ void SvxAutoCorrectLanguageLists::SaveWrdSttExceptList()
// Set time stamp // Set time stamp
FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile, FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile,
&aModifiedDate, &aModifiedTime ); &aModifiedDate, &aModifiedTime );
aLastCheckTime = Time( Time::SYSTEM ); aLastCheckTime = tools::Time( tools::Time::SYSTEM );
} }
void SvxAutoCorrectLanguageLists::SetWrdSttExceptList( SvStringsISortDtor* pList ) void SvxAutoCorrectLanguageLists::SetWrdSttExceptList( SvStringsISortDtor* pList )

View File

@ -201,7 +201,7 @@ static util::DateTime getTime(sal_Int64 const nTime)
util::DateTime aTime; util::DateTime aTime;
memset( &aTime, 0, sizeof( util::DateTime ) ); memset( &aTime, 0, sizeof( util::DateTime ) );
Time aTempTime( nTime ); tools::Time aTempTime( nTime );
aTime.NanoSeconds = aTempTime.GetNanoSec(); aTime.NanoSeconds = aTempTime.GetNanoSec();
aTime.Seconds = aTempTime.GetSec(); aTime.Seconds = aTempTime.GetSec();
@ -211,9 +211,9 @@ static util::DateTime getTime(sal_Int64 const nTime)
return aTime; return aTime;
} }
inline Time setTime( util::DateTime& rDate ) inline tools::Time setTime( util::DateTime& rDate )
{ {
return Time( rDate.Hours, rDate.Minutes, rDate.Seconds, rDate.NanoSeconds ); return tools::Time( rDate.Hours, rDate.Minutes, rDate.Seconds, rDate.NanoSeconds );
} }
@ -398,7 +398,7 @@ SvxFieldData* SvxUnoTextField::CreateFieldData() const throw()
{ {
if( mnServiceId != text::textfield::Type::TIME && mnServiceId != text::textfield::Type::DATE ) if( mnServiceId != text::textfield::Type::TIME && mnServiceId != text::textfield::Type::DATE )
{ {
Time aTime( setTime( mpImpl->maDateTime ) ); tools::Time aTime( setTime( mpImpl->maDateTime ) );
pData = new SvxExtTimeField( aTime, mpImpl->mbBoolean1?SVXTIMETYPE_FIX:SVXTIMETYPE_VAR ); pData = new SvxExtTimeField( aTime, mpImpl->mbBoolean1?SVXTIMETYPE_FIX:SVXTIMETYPE_VAR );
if( mpImpl->mnInt32 >= SVXTIMEFORMAT_APPDEFAULT && mpImpl->mnInt32 <= SVXTIMEFORMAT_AM_HMSH ) if( mpImpl->mnInt32 >= SVXTIMEFORMAT_APPDEFAULT && mpImpl->mnInt32 <= SVXTIMEFORMAT_AM_HMSH )

View File

@ -87,7 +87,7 @@ namespace pcr
} }
else else
{ {
::Time aTime( aUNOTime.Hours, aUNOTime.Minutes, aUNOTime.Seconds, aUNOTime.NanoSeconds ); ::tools::Time aTime( aUNOTime.Hours, aUNOTime.Minutes, aUNOTime.Seconds, aUNOTime.NanoSeconds );
getTypedControlWindow()->SetTime( aTime ); getTypedControlWindow()->SetTime( aTime );
} }
} }

View File

@ -130,7 +130,7 @@ namespace pcr
case NUMBERFORMAT_TIME: case NUMBERFORMAT_TIME:
case NUMBERFORMAT_DATETIME: case NUMBERFORMAT_DATETIME:
{ {
Time aCurrentTime( Time::SYSTEM ); tools::Time aCurrentTime( tools::Time::SYSTEM );
nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(aCurrentTime.GetTime())); nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(aCurrentTime.GetTime()));
} }
break; break;

View File

@ -2661,7 +2661,7 @@ void ImportComment10( SvxMSDffManager& rMan, SvStream& rStCtrl, SdrPage* pPage,
.ReadInt32( nPosX ) .ReadInt32( nPosX )
.ReadInt32( nPosY ); .ReadInt32( nPosY );
aDateTime.NanoSeconds *= ::Time::nanoPerMilli; aDateTime.NanoSeconds *= ::tools::Time::nanoPerMilli;
} }
break; break;
} }
@ -6299,7 +6299,7 @@ void PPTFieldEntry::SetDateTime( sal_uInt32 nVal )
pField1 = new SvxFieldItem( SvxDateField( Date( Date::SYSTEM ), SVXDATETYPE_VAR, eDateFormat ), EE_FEATURE_FIELD ); pField1 = new SvxFieldItem( SvxDateField( Date( Date::SYSTEM ), SVXDATETYPE_VAR, eDateFormat ), EE_FEATURE_FIELD );
if ( eTimeFormat != SVXTIMEFORMAT_APPDEFAULT ) if ( eTimeFormat != SVXTIMEFORMAT_APPDEFAULT )
{ {
SvxFieldItem* pFieldItem = new SvxFieldItem( SvxExtTimeField( Time( Time::SYSTEM ), SVXTIMETYPE_VAR, eTimeFormat ), EE_FEATURE_FIELD ); SvxFieldItem* pFieldItem = new SvxFieldItem( SvxExtTimeField( tools::Time( tools::Time::SYSTEM ), SVXTIMETYPE_VAR, eTimeFormat ), EE_FEATURE_FIELD );
if ( pField1 ) if ( pField1 )
pField2 = pFieldItem; pField2 = pFieldItem;
else else

View File

@ -64,7 +64,7 @@ DateTime DTTM2DateTime( long lDTTM )
Friday=5 Friday=5
Saturday=6) Saturday=6)
*/ */
DateTime aDateTime(Date( 0 ), Time( 0 )); DateTime aDateTime(Date( 0 ), ::tools::Time( 0 ));
if( lDTTM ) if( lDTTM )
{ {
sal_uInt16 lMin = (sal_uInt16)(lDTTM & 0x0000003F); sal_uInt16 lMin = (sal_uInt16)(lDTTM & 0x0000003F);
@ -76,7 +76,7 @@ DateTime DTTM2DateTime( long lDTTM )
sal_uInt16 lMon = (sal_uInt16)(lDTTM & 0x0000000F); sal_uInt16 lMon = (sal_uInt16)(lDTTM & 0x0000000F);
lDTTM >>= 4; lDTTM >>= 4;
sal_uInt16 lYear= (sal_uInt16)(lDTTM & 0x000001FF) + 1900; sal_uInt16 lYear= (sal_uInt16)(lDTTM & 0x000001FF) + 1900;
aDateTime = DateTime(Date(lDay, lMon, lYear), Time(lHour, lMin)); aDateTime = DateTime(Date(lDay, lMon, lYear), tools::Time(lHour, lMin));
} }
return aDateTime; return aDateTime;
} }

View File

@ -790,7 +790,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
} break; } break;
case FormComponentType::TIMEFIELD: case FormComponentType::TIMEFIELD:
{ {
// <name>=<value> // Value is a Time with the format HH:MM:SS // <name>=<value> // Value is a tools::Time with the format HH:MM:SS
// no value (NULL) means empty value // no value (NULL) means empty value
if( hasProperty(PROPERTY_TIME, xComponentSet) ) if( hasProperty(PROPERTY_TIME, xComponentSet) )
{ {
@ -799,7 +799,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
sal_Int32 nInt32Val = 0; sal_Int32 nInt32Val = 0;
if (aVal >>= nInt32Val) if (aVal >>= nInt32Val)
{ {
::Time aTime(nInt32Val); ::tools::Time aTime(nInt32Val);
OUStringBuffer aBuffer; OUStringBuffer aBuffer;
appendDigits( aTime.GetHour(), 2, aBuffer ); appendDigits( aTime.GetHour(), 2, aBuffer );
aBuffer.append( '-' ); aBuffer.append( '-' );

View File

@ -127,7 +127,7 @@ void OEditBaseModel::write(const Reference<XObjectOutputStream>& _rxOutStream) t
{ {
util::Time aTime; util::Time aTime;
OSL_VERIFY(m_aDefault >>= aTime); OSL_VERIFY(m_aDefault >>= aTime);
_rxOutStream->writeHyper(::Time(aTime).GetTime()); _rxOutStream->writeHyper(::tools::Time(aTime).GetTime());
} }
else if ((nAnyMask & DEFAULT_DATE) == DEFAULT_DATE) else if ((nAnyMask & DEFAULT_DATE) == DEFAULT_DATE)
{ {
@ -193,7 +193,7 @@ void OEditBaseModel::read(const Reference<XObjectInputStream>& _rxInStream) thro
} }
else if ((nAnyMask & DEFAULT_TIME) == DEFAULT_TIME) else if ((nAnyMask & DEFAULT_TIME) == DEFAULT_TIME)
{ {
m_aDefault <<= ::Time(_rxInStream->readHyper()).GetUNOTime(); m_aDefault <<= ::tools::Time(_rxInStream->readHyper()).GetUNOTime();
} }
else if ((nAnyMask & DEFAULT_DATE) == DEFAULT_DATE) else if ((nAnyMask & DEFAULT_DATE) == DEFAULT_DATE)
{ {

View File

@ -804,11 +804,11 @@ namespace xforms
{ {
Any aTypedValue = Convert::get().toAny( value, getCppuType() ); Any aTypedValue = Convert::get().toAny( value, getCppuType() );
Time aValue; css::util::Time aValue;
if ( !( aTypedValue >>= aValue ) ) if ( !( aTypedValue >>= aValue ) )
return false; return false;
::Time aToolsTime( aValue.Hours, aValue.Minutes, aValue.Seconds, aValue.NanoSeconds ); ::tools::Time aToolsTime( aValue.Hours, aValue.Minutes, aValue.Seconds, aValue.NanoSeconds );
// no loss/rounding; IEEE 754 double-precision floating-point // no loss/rounding; IEEE 754 double-precision floating-point
// has a mantissa of 53 bits; we need at the very most 50 bits: // has a mantissa of 53 bits; we need at the very most 50 bits:
// format of aToolsTime.GetTime() is (in decimal) hhmmssnnnnnnnnn // format of aToolsTime.GetTime() is (in decimal) hhmmssnnnnnnnnn
@ -830,9 +830,9 @@ namespace xforms
void OTimeType::normalizeValue( const Any& _rValue, double& _rDoubleValue ) const void OTimeType::normalizeValue( const Any& _rValue, double& _rDoubleValue ) const
{ {
Time aValue; css::util::Time aValue;
OSL_VERIFY( _rValue >>= aValue ); OSL_VERIFY( _rValue >>= aValue );
::Time aToolsTime( aValue.Hours, aValue.Minutes, aValue.Seconds, aValue.NanoSeconds ); ::tools::Time aToolsTime( aValue.Hours, aValue.Minutes, aValue.Seconds, aValue.NanoSeconds );
_rDoubleValue = aToolsTime.GetTime(); _rDoubleValue = aToolsTime.GetTime();
} }
@ -855,7 +855,7 @@ namespace xforms
{ {
::DateTime aToolsValue( ::DateTime aToolsValue(
::Date( _rValue.Day, _rValue.Month, _rValue.Year ), ::Date( _rValue.Day, _rValue.Month, _rValue.Year ),
::Time( _rValue.Hours, _rValue.Minutes, _rValue.Seconds, _rValue.NanoSeconds ) ::tools::Time( _rValue.Hours, _rValue.Minutes, _rValue.Seconds, _rValue.NanoSeconds )
); );
double fValue = 0; double fValue = 0;

View File

@ -233,7 +233,7 @@ void xforms_propertyFunction(xmlXPathParserContextPtr ctxt, int nargs)
xmlXPathReturnEmptyString(ctxt); xmlXPathReturnEmptyString(ctxt);
} }
// Date and Time Functions // Date and tools::Time Functions
static OString makeDateTimeString (const DateTime& aDateTime, bool bUTC = true) static OString makeDateTimeString (const DateTime& aDateTime, bool bUTC = true)
{ {
@ -277,7 +277,7 @@ void xforms_nowFunction(xmlXPathParserContextPtr ctxt, int /*nargs*/)
3.2.7.2 Canonical representation 3.2.7.2 Canonical representation
The canonical representation for dateTime is defined by prohibiting certain options The canonical representation for dateTime is defined by prohibiting certain options
from the Lexical representation (par.3.2.7.1). Specifically, either the time zone must from the Lexical representation (par.3.2.7.1). Specifically, either the time zone must
be omitted or, if present, the time zone must be Coordinated Universal Time (UTC) be omitted or, if present, the time zone must be Coordinated Universal tools::Time (UTC)
indicated by a "Z". indicated by a "Z".
*/ */
DateTime aDateTime( DateTime::SYSTEM ); DateTime aDateTime( DateTime::SYSTEM );
@ -317,7 +317,7 @@ static bool parseDateTime(const OUString& aString, DateTime& aDateTime)
sal_Int32 nSecond = aTimeString.getToken(0, ':', nIndex).toInt32(); sal_Int32 nSecond = aTimeString.getToken(0, ':', nIndex).toInt32();
Date tmpDate((sal_uInt16)nDay, (sal_uInt16)nMonth, (sal_uInt16)nYear); Date tmpDate((sal_uInt16)nDay, (sal_uInt16)nMonth, (sal_uInt16)nYear);
Time tmpTime(nHour, nMinute, nSecond); tools::Time tmpTime(nHour, nMinute, nSecond);
DateTime tmpDateTime(tmpDate, tmpTime); DateTime tmpDateTime(tmpDate, tmpTime);
if (aString.indexOf(aUTCString) < 0) if (aString.indexOf(aUTCString) < 0)
tmpDateTime.ConvertToUTC(); tmpDateTime.ConvertToUTC();

View File

@ -113,7 +113,7 @@ using namespace InternalFilePickerElementIds;
#define GET_DECODED_NAME(aObj) \ #define GET_DECODED_NAME(aObj) \
aObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ) aObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET )
// Time to wait while traveling in the filterbox until // tools::Time to wait while traveling in the filterbox until
// the browsebox gets filtered ( in ms). // the browsebox gets filtered ( in ms).
#define TRAVELFILTER_TIMEOUT 750 #define TRAVELFILTER_TIMEOUT 750

View File

@ -372,7 +372,7 @@ private:
bool m_bListenForConfigChanges; bool m_bListenForConfigChanges;
/** @short specify the time intervall between two save actions. /** @short specify the time intervall between two save actions.
@descr Time is measured in [min]. @descr tools::Time is measured in [min].
*/ */
sal_Int32 m_nAutoSaveTimeIntervall; sal_Int32 m_nAutoSaveTimeIntervall;

View File

@ -646,7 +646,7 @@ void Calendar_gregorian::setValue() throw(RuntimeException)
DUMP_ICU_CAL_MSG(("%s\n","setValue() after Zone/DST glitch resubmit")); DUMP_ICU_CAL_MSG(("%s\n","setValue() after Zone/DST glitch resubmit"));
DUMP_I18N_CAL_MSG(("%s\n","setValue() after Zone/DST glitch resubmit")); DUMP_I18N_CAL_MSG(("%s\n","setValue() after Zone/DST glitch resubmit"));
// Time zone transition => resubmit. // tools::Time zone transition => resubmit.
// TZ=America/St_Johns date <= 1935-03-30 // TZ=America/St_Johns date <= 1935-03-30
// -3:30:52 (!) instead of -3:30 // -3:30:52 (!) instead of -3:30
// if first submission included time zone -3:30 that would be wrong. // if first submission included time zone -3:30 that would be wrong.

View File

@ -115,7 +115,7 @@ Calendar_hijri::NewMoon(sal_Int32 n)
{ {
double jd, t, t2, t3, k, ma, sa, tf, xtra; double jd, t, t2, t3, k, ma, sa, tf, xtra;
k = n; k = n;
t = k/1236.85; // Time in Julian centuries from 1900 January 0.5 t = k/1236.85; // tools::Time in Julian centuries from 1900 January 0.5
t2 = t * t; t2 = t * t;
t3 = t2 * t; t3 = t2 * t;
@ -160,7 +160,7 @@ Calendar_hijri::NewMoon(sal_Int32 n)
+ 0.0010 * sin(tf - ma) + 0.0010 * sin(tf - ma)
+ 0.0005 * sin(sa + 2 * ma); + 0.0005 * sin(sa + 2 * ma);
// convert from Ephemeris Time (ET) to (approximate) Universal Time (UT) // convert from Ephemeris tools::Time (ET) to (approximate) Universal tools::Time (UT)
jd += xtra - (0.41 + 1.2053 * t + 0.4992 * t2)/1440; jd += xtra - (0.41 + 1.2053 * t + 0.4992 * t2)/1440;
return (jd); return (jd);

View File

@ -276,12 +276,12 @@ private:
public: public:
SV_DECL_PERSIST1( SvxExtTimeField, SvxFieldData, com::sun::star::text::textfield::Type::EXTENDED_TIME ) SV_DECL_PERSIST1( SvxExtTimeField, SvxFieldData, com::sun::star::text::textfield::Type::EXTENDED_TIME )
SvxExtTimeField(); SvxExtTimeField();
explicit SvxExtTimeField( const Time& rTime, explicit SvxExtTimeField( const tools::Time& rTime,
SvxTimeType eType = SVXTIMETYPE_VAR, SvxTimeType eType = SVXTIMETYPE_VAR,
SvxTimeFormat eFormat = SVXTIMEFORMAT_STANDARD ); SvxTimeFormat eFormat = SVXTIMEFORMAT_STANDARD );
sal_Int64 GetFixTime() const { return m_nFixTime; } sal_Int64 GetFixTime() const { return m_nFixTime; }
void SetFixTime( const Time& rTime ) { m_nFixTime = rTime.GetTime(); } void SetFixTime( const tools::Time& rTime ) { m_nFixTime = rTime.GetTime(); }
SvxTimeType GetType() const { return eType; } SvxTimeType GetType() const { return eType; }
void SetType( SvxTimeType eTp ) { eType = eTp; } void SetType( SvxTimeType eTp ) { eType = eTp; }
@ -292,7 +292,7 @@ public:
// If eLanguage==LANGUAGE_DONTKNOW the language/country // If eLanguage==LANGUAGE_DONTKNOW the language/country
// used in number formatter initialization is taken. // used in number formatter initialization is taken.
OUString GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLanguage ) const; OUString GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLanguage ) const;
static OUString GetFormatted( Time& rTime, SvxTimeFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); static OUString GetFormatted( tools::Time& rTime, SvxTimeFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage );
virtual SvxFieldData* Clone() const SAL_OVERRIDE; virtual SvxFieldData* Clone() const SAL_OVERRIDE;
virtual bool operator==( const SvxFieldData& ) const SAL_OVERRIDE; virtual bool operator==( const SvxFieldData& ) const SAL_OVERRIDE;
@ -418,7 +418,7 @@ public:
SV_DECL_PERSIST1( SvxDateTimeField, SvxFieldData, com::sun::star::text::textfield::Type::PRESENTATION_DATE_TIME ) SV_DECL_PERSIST1( SvxDateTimeField, SvxFieldData, com::sun::star::text::textfield::Type::PRESENTATION_DATE_TIME )
SvxDateTimeField(); SvxDateTimeField();
static OUString GetFormatted( Date& rDate, Time& rTime, int eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); static OUString GetFormatted( Date& rDate, tools::Time& rTime, int eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage );
virtual SvxFieldData* Clone() const SAL_OVERRIDE; virtual SvxFieldData* Clone() const SAL_OVERRIDE;
virtual bool operator==( const SvxFieldData& ) const SAL_OVERRIDE; virtual bool operator==( const SvxFieldData& ) const SAL_OVERRIDE;

View File

@ -171,7 +171,7 @@ class EDITENG_DLLPUBLIC SvxAutoCorrectLanguageLists
OUString sShareAutoCorrFile, sUserAutoCorrFile; OUString sShareAutoCorrFile, sUserAutoCorrFile;
// If the AutoCorr file is newer // If the AutoCorr file is newer
Date aModifiedDate; Date aModifiedDate;
Time aModifiedTime, aLastCheckTime; tools::Time aModifiedTime, aLastCheckTime;
SvStringsISortDtor* pCplStt_ExcptLst; SvStringsISortDtor* pCplStt_ExcptLst;
SvStringsISortDtor* pWrdStt_ExcptLst; SvStringsISortDtor* pWrdStt_ExcptLst;

View File

@ -26,7 +26,6 @@
/* X Types */ /* X Types */
#undef Icon #undef Icon
#undef Time
#undef Min #undef Min
#undef Max #undef Max

View File

@ -29,9 +29,6 @@
*/ */
#define Icon HIDE_XLIB_Icon #define Icon HIDE_XLIB_Icon
/* Types from <X11/X.h> that clash, but we do use. */
#define Time XLIB_Time
#if defined __cplusplus #if defined __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -24,7 +24,7 @@
#include <svl/svldllapi.h> #include <svl/svldllapi.h>
class Date; class Date;
class Time; namespace tools { class Time; }
namespace FStatHelper { namespace FStatHelper {
@ -39,7 +39,7 @@ namespace FStatHelper {
@return it was be able to get the date/time stamp @return it was be able to get the date/time stamp
*/ */
SVL_DLLPUBLIC bool GetModifiedDateTimeOfFile( const OUString& rURL, SVL_DLLPUBLIC bool GetModifiedDateTimeOfFile( const OUString& rURL,
Date* pDate, Time* pTime ); Date* pDate, tools::Time* pTime );
/** Return if under the URL a document exist. This is only a wrapper for the /** Return if under the URL a document exist. This is only a wrapper for the
UCB.IsContent. UCB.IsContent.

View File

@ -120,8 +120,8 @@ public:
void SetDateTimeMode(sal_uInt16 nMode); void SetDateTimeMode(sal_uInt16 nMode);
void SetFirstDate(const Date&); void SetFirstDate(const Date&);
void SetLastDate(const Date&); void SetLastDate(const Date&);
void SetFirstTime(const Time&); void SetFirstTime(const tools::Time&);
void SetLastTime(const Time&); void SetLastTime(const tools::Time&);
void SetFilterAuthor(bool bFlag=true); void SetFilterAuthor(bool bFlag=true);
void SetAuthor(const OUString &); void SetAuthor(const OUString &);
void SetFilterComment(bool bFlag=true); void SetFilterComment(bool bFlag=true);
@ -209,13 +209,13 @@ public:
Date GetFirstDate() const; Date GetFirstDate() const;
void SetFirstDate(const Date &aDate); void SetFirstDate(const Date &aDate);
Time GetFirstTime() const; tools::Time GetFirstTime() const;
void SetFirstTime(const Time &aTime); void SetFirstTime(const tools::Time &aTime);
Date GetLastDate() const; Date GetLastDate() const;
void SetLastDate(const Date &aDate); void SetLastDate(const Date &aDate);
Time GetLastTime() const; tools::Time GetLastTime() const;
void SetLastTime(const Time &aTime); void SetLastTime(const tools::Time &aTime);
void SetDateMode(sal_uInt16 nMode); void SetDateMode(sal_uInt16 nMode);
sal_uInt16 GetDateMode(); sal_uInt16 GetDateMode();

View File

@ -39,12 +39,12 @@ struct ExchangeData
GalleryTheme* pTheme; GalleryTheme* pTheme;
OUString aEditedTitle; OUString aEditedTitle;
Date aThemeChangeDate; Date aThemeChangeDate;
Time aThemeChangeTime; tools::Time aThemeChangeTime;
ExchangeData() ExchangeData()
: pTheme(NULL) : pTheme(NULL)
, aThemeChangeDate( Date::EMPTY ) , aThemeChangeDate( Date::EMPTY )
, aThemeChangeTime( Time::EMPTY ) , aThemeChangeTime( tools::Time::EMPTY )
{ {
} }
}; };

View File

@ -23,7 +23,7 @@
#include <tools/date.hxx> #include <tools/date.hxx>
#include <tools/time.hxx> #include <tools/time.hxx>
class TOOLS_DLLPUBLIC SAL_WARN_UNUSED DateTime : public Date, public Time class TOOLS_DLLPUBLIC SAL_WARN_UNUSED DateTime : public Date, public tools::Time
{ {
public: public:
enum DateTimeInitSystem enum DateTimeInitSystem
@ -42,8 +42,8 @@ public:
DateTime( const DateTime& rDateTime ) : DateTime( const DateTime& rDateTime ) :
Date( rDateTime ), Time( rDateTime ) {} Date( rDateTime ), Time( rDateTime ) {}
DateTime( const Date& rDate ) : Date( rDate ), Time(0) {} DateTime( const Date& rDate ) : Date( rDate ), Time(0) {}
DateTime( const Time& rTime ) : Date(0), Time( rTime ) {} DateTime( const tools::Time& rTime ) : Date(0), Time( rTime ) {}
DateTime( const Date& rDate, const Time& rTime ) : DateTime( const Date& rDate, const tools::Time& rTime ) :
Date( rDate ), Time( rTime ) {} Date( rDate ), Time( rTime ) {}
bool IsBetween( const DateTime& rFrom, bool IsBetween( const DateTime& rFrom,
@ -79,16 +79,16 @@ public:
DateTime& operator +=( double fTimeInDays ); DateTime& operator +=( double fTimeInDays );
DateTime& operator -=( double fTimeInDays ) DateTime& operator -=( double fTimeInDays )
{ return operator+=( -fTimeInDays ); } { return operator+=( -fTimeInDays ); }
DateTime& operator +=( const Time& rTime ); DateTime& operator +=( const tools::Time& rTime );
DateTime& operator -=( const Time& rTime ); DateTime& operator -=( const tools::Time& rTime );
TOOLS_DLLPUBLIC friend DateTime operator +( const DateTime& rDateTime, long nDays ); TOOLS_DLLPUBLIC friend DateTime operator +( const DateTime& rDateTime, long nDays );
TOOLS_DLLPUBLIC friend DateTime operator -( const DateTime& rDateTime, long nDays ); TOOLS_DLLPUBLIC friend DateTime operator -( const DateTime& rDateTime, long nDays );
TOOLS_DLLPUBLIC friend DateTime operator +( const DateTime& rDateTime, double fTimeInDays ); TOOLS_DLLPUBLIC friend DateTime operator +( const DateTime& rDateTime, double fTimeInDays );
TOOLS_DLLPUBLIC friend DateTime operator -( const DateTime& rDateTime, double fTimeInDays ) TOOLS_DLLPUBLIC friend DateTime operator -( const DateTime& rDateTime, double fTimeInDays )
{ return operator+( rDateTime, -fTimeInDays ); } { return operator+( rDateTime, -fTimeInDays ); }
TOOLS_DLLPUBLIC friend DateTime operator +( const DateTime& rDateTime, const Time& rTime ); TOOLS_DLLPUBLIC friend DateTime operator +( const DateTime& rDateTime, const tools::Time& rTime );
TOOLS_DLLPUBLIC friend DateTime operator -( const DateTime& rDateTime, const Time& rTime ); TOOLS_DLLPUBLIC friend DateTime operator -( const DateTime& rDateTime, const tools::Time& rTime );
TOOLS_DLLPUBLIC friend double operator -( const DateTime& rDateTime1, const DateTime& rDateTime2 ); TOOLS_DLLPUBLIC friend double operator -( const DateTime& rDateTime1, const DateTime& rDateTime2 );
TOOLS_DLLPUBLIC friend long operator -( const DateTime& rDateTime, const Date& rDate ) TOOLS_DLLPUBLIC friend long operator -( const DateTime& rDateTime, const Date& rDate )
{ return (const Date&) rDateTime - rDate; } { return (const Date&) rDateTime - rDate; }

View File

@ -31,6 +31,8 @@ class ResId;
25 hours or 10 minus 20 seconds being (non-negative) 10 seconds. 25 hours or 10 minus 20 seconds being (non-negative) 10 seconds.
*/ */
namespace tools {
class TOOLS_DLLPUBLIC SAL_WARN_UNUSED Time class TOOLS_DLLPUBLIC SAL_WARN_UNUSED Time
{ {
private: private:
@ -68,7 +70,7 @@ public:
Time( TimeInitSystem ); Time( TimeInitSystem );
Time( const ResId & rResId ); Time( const ResId & rResId );
Time( sal_Int64 _nTime ) { Time::nTime = _nTime; } Time( sal_Int64 _nTime ) { Time::nTime = _nTime; }
Time( const Time& rTime ); Time( const tools::Time& rTime );
Time( const ::com::sun::star::util::Time& rTime ); Time( const ::com::sun::star::util::Time& rTime );
Time( sal_uInt32 nHour, sal_uInt32 nMin, Time( sal_uInt32 nHour, sal_uInt32 nMin,
sal_uInt32 nSec = 0, sal_uInt64 nNanoSec = 0 ); sal_uInt32 nSec = 0, sal_uInt64 nNanoSec = 0 );
@ -103,22 +105,22 @@ public:
/// 12 hours == 0.5 days /// 12 hours == 0.5 days
double GetTimeInDays() const; double GetTimeInDays() const;
bool IsBetween( const Time& rFrom, const Time& rTo ) const bool IsBetween( const tools::Time& rFrom, const tools::Time& rTo ) const
{ return ((nTime >= rFrom.nTime) && (nTime <= rTo.nTime)); } { return ((nTime >= rFrom.nTime) && (nTime <= rTo.nTime)); }
bool IsEqualIgnoreNanoSec( const Time& rTime ) const; bool IsEqualIgnoreNanoSec( const tools::Time& rTime ) const;
bool operator ==( const Time& rTime ) const bool operator ==( const tools::Time& rTime ) const
{ return (nTime == rTime.nTime); } { return (nTime == rTime.nTime); }
bool operator !=( const Time& rTime ) const bool operator !=( const tools::Time& rTime ) const
{ return (nTime != rTime.nTime); } { return (nTime != rTime.nTime); }
bool operator >( const Time& rTime ) const bool operator >( const tools::Time& rTime ) const
{ return (nTime > rTime.nTime); } { return (nTime > rTime.nTime); }
bool operator <( const Time& rTime ) const bool operator <( const tools::Time& rTime ) const
{ return (nTime < rTime.nTime); } { return (nTime < rTime.nTime); }
bool operator >=( const Time& rTime ) const bool operator >=( const tools::Time& rTime ) const
{ return (nTime >= rTime.nTime); } { return (nTime >= rTime.nTime); }
bool operator <=( const Time& rTime ) const bool operator <=( const tools::Time& rTime ) const
{ return (nTime <= rTime.nTime); } { return (nTime <= rTime.nTime); }
static Time GetUTCOffset(); static Time GetUTCOffset();
@ -127,15 +129,17 @@ public:
void ConvertToUTC() { *this -= Time::GetUTCOffset(); } void ConvertToUTC() { *this -= Time::GetUTCOffset(); }
void ConvertToLocalTime() { *this += Time::GetUTCOffset(); } void ConvertToLocalTime() { *this += Time::GetUTCOffset(); }
Time& operator =( const Time& rTime ); tools::Time& operator =( const tools::Time& rTime );
Time operator -() const Time operator -() const
{ return Time( -nTime ); } { return Time( -nTime ); }
Time& operator +=( const Time& rTime ); tools::Time& operator +=( const tools::Time& rTime );
Time& operator -=( const Time& rTime ); tools::Time& operator -=( const tools::Time& rTime );
TOOLS_DLLPUBLIC friend Time operator +( const Time& rTime1, const Time& rTime2 ); TOOLS_DLLPUBLIC friend Time operator +( const tools::Time& rTime1, const tools::Time& rTime2 );
TOOLS_DLLPUBLIC friend Time operator -( const Time& rTime1, const Time& rTime2 ); TOOLS_DLLPUBLIC friend Time operator -( const tools::Time& rTime1, const tools::Time& rTime2 );
}; };
} /* namespace tools */
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -28,7 +28,7 @@
#include <com/sun/star/util/DateTime.hpp> #include <com/sun/star/util/DateTime.hpp>
class Date; class Date;
class Time; namespace tools { class Time; }
class DateTime; class DateTime;
namespace utl namespace utl

View File

@ -36,7 +36,7 @@ namespace com { namespace sun { namespace star {
} }
}}} }}}
class Date; class Date;
class Time; namespace tools { class Time; }
class CalendarWrapper; class CalendarWrapper;
enum DateFormat { enum DateFormat {
@ -241,9 +241,9 @@ public:
DateFormat getLongDateFormat() const; DateFormat getLongDateFormat() const;
/// only numerical values of Gregorian calendar /// only numerical values of Gregorian calendar
OUString getDate( const Date& rDate ) const; OUString getDate( const Date& rDate ) const;
OUString getTime( const Time& rTime, bool bSec = true, OUString getTime( const tools::Time& rTime, bool bSec = true,
bool b100Sec = false ) const; bool b100Sec = false ) const;
OUString getDuration( const Time& rTime, OUString getDuration( const tools::Time& rTime,
bool bSec = true, bool b100Sec = false ) const; bool bSec = true, bool b100Sec = false ) const;
/** The CalendarWrapper already <b>MUST</b> /** The CalendarWrapper already <b>MUST</b>

View File

@ -405,10 +405,10 @@ public:
class VCL_DLLPUBLIC TimeFormatter : public FormatterBase class VCL_DLLPUBLIC TimeFormatter : public FormatterBase
{ {
private: private:
Time maLastTime; tools::Time maLastTime;
Time maMin; tools::Time maMin;
Time maMax; tools::Time maMax;
Time maCorrectedTime; tools::Time maCorrectedTime;
TimeFieldFormat meFormat; TimeFieldFormat meFormat;
sal_uInt16 mnTimeFormat; sal_uInt16 mnTimeFormat;
bool mbDuration; bool mbDuration;
@ -417,14 +417,14 @@ private:
SAL_DLLPRIVATE void ImplInit(); SAL_DLLPRIVATE void ImplInit();
protected: protected:
Time maFieldTime; tools::Time maFieldTime;
TimeFormatter(); TimeFormatter();
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
SAL_DLLPRIVATE bool ImplTimeReformat( const OUString& rStr, OUString& rOutStr ); SAL_DLLPRIVATE bool ImplTimeReformat( const OUString& rStr, OUString& rOutStr );
SAL_DLLPRIVATE void ImplNewFieldValue( const Time& rTime ); SAL_DLLPRIVATE void ImplNewFieldValue( const tools::Time& rTime );
SAL_DLLPRIVATE void ImplSetUserTime( const Time& rNewTime, Selection* pNewSelection = NULL ); SAL_DLLPRIVATE void ImplSetUserTime( const tools::Time& rNewTime, Selection* pNewSelection = NULL );
SAL_DLLPRIVATE bool ImplAllowMalformedInput() const; SAL_DLLPRIVATE bool ImplAllowMalformedInput() const;
public: public:
@ -439,10 +439,10 @@ public:
virtual void Reformat() SAL_OVERRIDE; virtual void Reformat() SAL_OVERRIDE;
virtual void ReformatAll() SAL_OVERRIDE; virtual void ReformatAll() SAL_OVERRIDE;
void SetMin( const Time& rNewMin ); void SetMin( const tools::Time& rNewMin );
const Time& GetMin() const { return maMin; } const tools::Time& GetMin() const { return maMin; }
void SetMax( const Time& rNewMax ); void SetMax( const tools::Time& rNewMax );
const Time& GetMax() const { return maMax; } const tools::Time& GetMax() const { return maMax; }
void SetTimeFormat( TimeFormat eNewFormat ); void SetTimeFormat( TimeFormat eNewFormat );
TimeFormat GetTimeFormat() const { return (TimeFormat)mnTimeFormat;} TimeFormat GetTimeFormat() const { return (TimeFormat)mnTimeFormat;}
@ -453,14 +453,14 @@ public:
void SetDuration( bool mbDuration ); void SetDuration( bool mbDuration );
bool IsDuration() const { return mbDuration; } bool IsDuration() const { return mbDuration; }
void SetTime( const Time& rNewTime ); void SetTime( const tools::Time& rNewTime );
void SetUserTime( const Time& rNewTime ); void SetUserTime( const tools::Time& rNewTime );
Time GetTime() const; tools::Time GetTime() const;
void SetEmptyTime() { FormatterBase::SetEmptyFieldValue(); } void SetEmptyTime() { FormatterBase::SetEmptyFieldValue(); }
bool IsEmptyTime() const { return FormatterBase::IsEmptyFieldValue(); } bool IsEmptyTime() const { return FormatterBase::IsEmptyFieldValue(); }
Time GetCorrectedTime() const { return maCorrectedTime; } tools::Time GetCorrectedTime() const { return maCorrectedTime; }
static Time GetInvalidTime() { return Time( 99, 99, 99 ); } static tools::Time GetInvalidTime() { return tools::Time( 99, 99, 99 ); }
/** enables or disables the enforcement of valid values /** enables or disables the enforcement of valid values
@ -662,8 +662,8 @@ public:
class VCL_DLLPUBLIC TimeField : public SpinField, public TimeFormatter class VCL_DLLPUBLIC TimeField : public SpinField, public TimeFormatter
{ {
private: private:
Time maFirst; tools::Time maFirst;
Time maLast; tools::Time maLast;
protected: protected:
SAL_DLLPRIVATE void ImplTimeSpinArea( bool bUp ); SAL_DLLPRIVATE void ImplTimeSpinArea( bool bUp );
@ -685,10 +685,10 @@ public:
virtual void First() SAL_OVERRIDE; virtual void First() SAL_OVERRIDE;
virtual void Last() SAL_OVERRIDE; virtual void Last() SAL_OVERRIDE;
void SetFirst( const Time& rNewFirst ) { maFirst = rNewFirst; } void SetFirst( const tools::Time& rNewFirst ) { maFirst = rNewFirst; }
Time GetFirst() const { return maFirst; } tools::Time GetFirst() const { return maFirst; }
void SetLast( const Time& rNewLast ) { maLast = rNewLast; } void SetLast( const tools::Time& rNewLast ) { maLast = rNewLast; }
Time GetLast() const { return maLast; } tools::Time GetLast() const { return maLast; }
void SetExtFormat( ExtTimeFieldFormat eFormat ); void SetExtFormat( ExtTimeFieldFormat eFormat );
}; };

View File

@ -44,7 +44,7 @@
// predeclarations // predeclarations
class Time; namespace tools { class Time; }
namespace com { namespace sun { namespace star { namespace com { namespace sun { namespace star {
namespace util { struct DateTime; } namespace util { struct DateTime; }

View File

@ -55,7 +55,7 @@
************************************************************************/ ************************************************************************/
/************************************************************************* /*************************************************************************
* @file * @file
* Time style. The TIme format for time field. * tools::Time style. The TIme format for time field.
************************************************************************/ ************************************************************************/
#include "xftimestyle.hxx" #include "xftimestyle.hxx"

View File

@ -374,7 +374,7 @@ void SAL_CALL OPreparedStatement::setDate(sal_Int32 parameter, const Date& aData
/* {{{ OPreparedStatement::setTime() -I- */ /* {{{ OPreparedStatement::setTime() -I- */
void SAL_CALL OPreparedStatement::setTime(sal_Int32 parameter, const Time& aVal) void SAL_CALL OPreparedStatement::setTime(sal_Int32 parameter, const tools::Time& aVal)
throw(SQLException, RuntimeException, std::exception) throw(SQLException, RuntimeException, std::exception)
{ {
OSL_TRACE("OPreparedStatement::setTime"); OSL_TRACE("OPreparedStatement::setTime");

View File

@ -524,7 +524,7 @@ Time SAL_CALL OResultSet::getTime(sal_Int32 column)
MutexGuard aGuard(m_aMutex); MutexGuard aGuard(m_aMutex);
checkColumnIndex(column); checkColumnIndex(column);
Time t; tools::Time t;
OUString timeString = getString(column); OUString timeString = getString(column);
OUString token; OUString token;
sal_Int32 nIndex, i=0; sal_Int32 nIndex, i=0;
@ -562,7 +562,7 @@ DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 column)
checkColumnIndex(column); checkColumnIndex(column);
DateTime dt; DateTime dt;
Date d = getDate(column); Date d = getDate(column);
Time t = getTime(column); tools::Time t = getTime(column);
dt.Year = d.Year; dt.Year = d.Year;
dt.Month = d.Month; dt.Month = d.Month;
@ -1088,7 +1088,7 @@ void SAL_CALL OResultSet::updateDate(sal_Int32 column, const Date& /* x */)
/* }}} */ /* }}} */
/* {{{ OResultSet::updateTime() -U- */ /* {{{ OResultSet::updateTime() -U- */
void SAL_CALL OResultSet::updateTime(sal_Int32 column, const Time& /* x */) void SAL_CALL OResultSet::updateTime(sal_Int32 column, const tools::Time& /* x */)
throw(SQLException, RuntimeException, std::exception) throw(SQLException, RuntimeException, std::exception)
{ {
OSL_TRACE("OResultSet::updateTime"); OSL_TRACE("OResultSet::updateTime");

View File

@ -197,7 +197,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date&
void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& aVal ) throw(SQLException, RuntimeException) void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const css::util::Time& aVal ) throw(SQLException, RuntimeException)
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed); checkDisposed(OStatement_BASE::rBHelper.bDisposed);

View File

@ -326,13 +326,13 @@ sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLExcept
} }
Time SAL_CALL OResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) css::util::Time SAL_CALL OResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{ {
checkDisposed(OResultSet_BASE::rBHelper.bDisposed); checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
Time nRet; css::util::Time nRet;
return nRet; return nRet;
} }
@ -657,7 +657,7 @@ void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const Date& x ) thr
} }
void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const Time& x ) throw(SQLException, RuntimeException) void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const css::util::Time& x ) throw(SQLException, RuntimeException)
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OResultSet_BASE::rBHelper.bDisposed); checkDisposed(OResultSet_BASE::rBHelper.bDisposed);

View File

@ -97,17 +97,17 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields,
case 9: // DateTime dd/mm/yy H:MM:SS PM case 9: // DateTime dd/mm/yy H:MM:SS PM
lclCreateTextFields( aFields, xModel, "datetime13" ); lclCreateTextFields( aFields, xModel, "datetime13" );
break; break;
case 10: // Time H:MM case 10: // tools::Time H:MM
bIsDate = false; bIsDate = false;
break; break;
case 11: // Time H:MM:SS case 11: // tools::Time H:MM:SS
bIsDate = false; bIsDate = false;
// this is the default format // this is the default format
break; break;
case 12: // Time H:MM PM case 12: // tools::Time H:MM PM
bIsDate = false; bIsDate = false;
break; break;
case 13: // Time H:MM:SS PM case 13: // tools::Time H:MM:SS PM
bIsDate = false; bIsDate = false;
break; break;
} }

View File

@ -2202,7 +2202,7 @@ util::DateTime InputObjectBase::dumpFileTime( const String& rName )
// file time is in 10^-7 seconds (100 nanoseconds), convert to nanoseconds // file time is in 10^-7 seconds (100 nanoseconds), convert to nanoseconds
nFileTime *= 100; nFileTime *= 100;
// entire days // entire days
sal_Int64 nDays = nFileTime / sal_Int64( ::Time::nanoSecPerDay ); sal_Int64 nDays = nFileTime / sal_Int64( ::tools::Time::nanoSecPerDay );
// number of entire years // number of entire years
sal_Int64 nYears = (nDays - (nDays / (4 * 365)) + (nDays / (100 * 365)) - (nDays / (400 * 365))) / 365; sal_Int64 nYears = (nDays - (nDays / (4 * 365)) + (nDays / (100 * 365)) - (nDays / (400 * 365))) / 365;
// remaining days in the year // remaining days in the year
@ -2225,16 +2225,16 @@ util::DateTime InputObjectBase::dumpFileTime( const String& rName )
// the day // the day
aDateTime.Day = static_cast< sal_uInt16 >( nDaysInYear + 1 ); aDateTime.Day = static_cast< sal_uInt16 >( nDaysInYear + 1 );
// number of nanoseconds in the day // number of nanoseconds in the day
sal_Int64 nTimeInDay = nFileTime % sal_Int64( ::Time::nanoSecPerDay ); sal_Int64 nTimeInDay = nFileTime % sal_Int64( ::tools::Time::nanoSecPerDay );
// nanoseconds // nanoseconds
aDateTime.NanoSeconds = static_cast< sal_uInt32 >( nTimeInDay % ::Time::nanoSecPerSec ); aDateTime.NanoSeconds = static_cast< sal_uInt32 >( nTimeInDay % ::tools::Time::nanoSecPerSec );
nTimeInDay /= ::Time::nanoSecPerSec; nTimeInDay /= ::tools::Time::nanoSecPerSec;
// seconds // seconds
aDateTime.Seconds = static_cast< sal_uInt16 >( nTimeInDay % ::Time::secondPerMinute ); aDateTime.Seconds = static_cast< sal_uInt16 >( nTimeInDay % ::tools::Time::secondPerMinute );
nTimeInDay /= ::Time::secondPerMinute; nTimeInDay /= ::tools::Time::secondPerMinute;
// minutes // minutes
aDateTime.Minutes = static_cast< sal_uInt16 >( nTimeInDay % ::Time::minutePerHour ); aDateTime.Minutes = static_cast< sal_uInt16 >( nTimeInDay % ::tools::Time::minutePerHour );
nTimeInDay /= ::Time::minutePerHour; nTimeInDay /= ::tools::Time::minutePerHour;
// hours // hours
aDateTime.Hours = static_cast< sal_uInt16 >( nTimeInDay ); aDateTime.Hours = static_cast< sal_uInt16 >( nTimeInDay );

View File

@ -288,7 +288,7 @@ Any OXMLControlProperty::convertString(const ::com::sun::star::uno::Type& _rExpe
case TYPE_TIME: case TYPE_TIME:
{ {
OSL_ENSURE(((sal_uInt32)nValue) == 0, OSL_ENSURE(((sal_uInt32)nValue) == 0,
"OPropertyImport::convertString: a Time value with more than a fractional part?"); "OPropertyImport::convertString: a tools::Time value with more than a fractional part?");
aReturn <<= implGetTime(nValue); aReturn <<= implGetTime(nValue);
} }
break; break;

View File

@ -177,7 +177,7 @@ OUString ODateTimeDialog::getFormatStringByKey(::sal_Int32 _nNumberFormatKey,con
double nValue = 0; double nValue = 0;
if ( _bTime ) if ( _bTime )
{ {
Time aCurrentTime( Time::SYSTEM ); tools::Time aCurrentTime( tools::Time::SYSTEM );
nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(aCurrentTime.GetTime())); nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(aCurrentTime.GetTime()));
} }
else else

View File

@ -86,7 +86,7 @@ public:
std::cout << "Unavailable" << std::endl; std::cout << "Unavailable" << std::endl;
currenttest++; currenttest++;
#ifndef HAVE_CALLGRIND #ifndef HAVE_CALLGRIND
std::cout << " Elapsed Time is: " << m_nEndTime - m_nStartTime << "ms" << std::endl; std::cout << " Elapsed tools::Time is: " << m_nEndTime - m_nStartTime << "ms" << std::endl;
#endif #endif
} }
}; };

View File

@ -87,16 +87,16 @@ Timer::Timer()
{ {
} }
Timer::Timer( const TTimeValue& Time ) Timer::Timer( const TTimeValue& rTime )
: m_aTimeOut( Time ), : m_aTimeOut( rTime ),
m_aExpired( 0 ), m_aExpired( 0 ),
m_aRepeatDelta( 0 ), m_aRepeatDelta( 0 ),
m_pNext( NULL ) m_pNext( NULL )
{ {
} }
Timer::Timer( const TTimeValue& Time, const TTimeValue& Repeat ) Timer::Timer( const TTimeValue& rTime, const TTimeValue& Repeat )
: m_aTimeOut( Time ), : m_aTimeOut( rTime ),
m_aExpired( 0 ), m_aExpired( 0 ),
m_aRepeatDelta( Repeat ), m_aRepeatDelta( Repeat ),
m_pNext( NULL ) m_pNext( NULL )

View File

@ -196,7 +196,7 @@ struct ScHeaderFieldData
OUString aShortDocName; // pure file name OUString aShortDocName; // pure file name
OUString aTabName; OUString aTabName;
Date aDate; Date aDate;
Time aTime; tools::Time aTime;
long nPageNo; long nPageNo;
long nTotalPages; long nTotalPages;
SvxNumType eNumType; SvxNumType eNumType;

View File

@ -419,9 +419,9 @@ private:
struct SrcShell struct SrcShell
{ {
SfxObjectShellRef maShell; SfxObjectShellRef maShell;
Time maLastAccess; tools::Time maLastAccess;
SrcShell() : maLastAccess( Time::SYSTEM ) {} SrcShell() : maLastAccess( tools::Time::SYSTEM ) {}
}; };
typedef ::boost::unordered_map<sal_uInt16, SrcShell> DocShellMap; typedef ::boost::unordered_map<sal_uInt16, SrcShell> DocShellMap;

View File

@ -105,10 +105,10 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
NUMBERFORMAT_TIME, ScGlobal::eLnge ); NUMBERFORMAT_TIME, ScGlobal::eLnge );
util::Time aTime = xRow->getTime(nRowPos); util::Time aTime = xRow->getTime(nRowPos);
nVal = aTime.Hours / static_cast<double>(::Time::hourPerDay) + nVal = aTime.Hours / static_cast<double>(::tools::Time::hourPerDay) +
aTime.Minutes / static_cast<double>(::Time::minutePerDay) + aTime.Minutes / static_cast<double>(::tools::Time::minutePerDay) +
aTime.Seconds / static_cast<double>(::Time::secondPerDay) + aTime.Seconds / static_cast<double>(::tools::Time::secondPerDay) +
aTime.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay); aTime.NanoSeconds / static_cast<double>(::tools::Time::nanoSecPerDay);
bEmptyFlag = xRow->wasNull(); bEmptyFlag = xRow->wasNull();
bValue = true; bValue = true;
} }
@ -123,10 +123,10 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
util::DateTime aStamp = xRow->getTimestamp(nRowPos); util::DateTime aStamp = xRow->getTimestamp(nRowPos);
nVal = ( Date( aStamp.Day, aStamp.Month, aStamp.Year ) - nVal = ( Date( aStamp.Day, aStamp.Month, aStamp.Year ) -
*pFormTable->GetNullDate() ) + *pFormTable->GetNullDate() ) +
aStamp.Hours / static_cast<double>(::Time::hourPerDay) + aStamp.Hours / static_cast<double>(::tools::Time::hourPerDay) +
aStamp.Minutes / static_cast<double>(::Time::minutePerDay) + aStamp.Minutes / static_cast<double>(::tools::Time::minutePerDay) +
aStamp.Seconds / static_cast<double>(::Time::secondPerDay) + aStamp.Seconds / static_cast<double>(::tools::Time::secondPerDay) +
aStamp.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay); aStamp.NanoSeconds / static_cast<double>(::tools::Time::nanoSecPerDay);
bEmptyFlag = xRow->wasNull(); bEmptyFlag = xRow->wasNull();
bValue = true; bValue = true;
} }

View File

@ -474,7 +474,7 @@ public:
IdleCalcTextWidthScope(ScDocument& rDoc, ScAddress& rCalcPos) : IdleCalcTextWidthScope(ScDocument& rDoc, ScAddress& rCalcPos) :
mrDoc(rDoc), mrDoc(rDoc),
mrCalcPos(rCalcPos), mrCalcPos(rCalcPos),
mnStartTime(Time::GetSystemTicks()), mnStartTime(tools::Time::GetSystemTicks()),
mpStylePool(rDoc.GetStyleSheetPool()), mpStylePool(rDoc.GetStyleSheetPool()),
mnOldSearchMask(mpStylePool->GetSearchMask()), mnOldSearchMask(mpStylePool->GetSearchMask()),
meOldFamily(mpStylePool->GetSearchFamily()), meOldFamily(mpStylePool->GetSearchFamily()),
@ -683,7 +683,7 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
// Quit if either 1) its duration exceeds 50 ms, or 2) there is any // Quit if either 1) its duration exceeds 50 ms, or 2) there is any
// pending event after processing 32 cells. // pending event after processing 32 cells.
if ((50L < Time::GetSystemTicks() - aScope.getStartTime()) || (nCount > 31 && Application::AnyInput(ABORT_EVENTS))) if ((50L < tools::Time::GetSystemTicks() - aScope.getStartTime()) || (nCount > 31 && Application::AnyInput(ABORT_EVENTS)))
nCount = CALCMAX; nCount = CALCMAX;
} }

View File

@ -220,10 +220,10 @@ void DBConnector::getValue(long nCol, ScDPItemData &rData, short& rNumType) cons
rNumType = NUMBERFORMAT_TIME; rNumType = NUMBERFORMAT_TIME;
util::Time aTime = mxRow->getTime(nCol+1); util::Time aTime = mxRow->getTime(nCol+1);
fValue = aTime.Hours / static_cast<double>(::Time::hourPerDay) + fValue = aTime.Hours / static_cast<double>(::tools::Time::hourPerDay) +
aTime.Minutes / static_cast<double>(::Time::minutePerDay) + aTime.Minutes / static_cast<double>(::tools::Time::minutePerDay) +
aTime.Seconds / static_cast<double>(::Time::secondPerDay) + aTime.Seconds / static_cast<double>(::tools::Time::secondPerDay) +
aTime.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay); aTime.NanoSeconds / static_cast<double>(::tools::Time::nanoSecPerDay);
rData.SetValue(fValue); rData.SetValue(fValue);
break; break;
} }
@ -233,10 +233,10 @@ void DBConnector::getValue(long nCol, ScDPItemData &rData, short& rNumType) cons
util::DateTime aStamp = mxRow->getTimestamp(nCol+1); util::DateTime aStamp = mxRow->getTimestamp(nCol+1);
fValue = ( Date( aStamp.Day, aStamp.Month, aStamp.Year ) - maNullDate ) + fValue = ( Date( aStamp.Day, aStamp.Month, aStamp.Year ) - maNullDate ) +
aStamp.Hours / static_cast<double>(::Time::hourPerDay) + aStamp.Hours / static_cast<double>(::tools::Time::hourPerDay) +
aStamp.Minutes / static_cast<double>(::Time::minutePerDay) + aStamp.Minutes / static_cast<double>(::tools::Time::minutePerDay) +
aStamp.Seconds / static_cast<double>(::Time::secondPerDay) + aStamp.Seconds / static_cast<double>(::tools::Time::secondPerDay) +
aStamp.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay); aStamp.NanoSeconds / static_cast<double>(::tools::Time::nanoSecPerDay);
rData.SetValue(fValue); rData.SetValue(fValue);
break; break;
} }

View File

@ -135,7 +135,7 @@ void ScChangeViewSettings::AdjustDateMode( const ScDocument& rDoc )
// Set the next minute as the start time and assume that // Set the next minute as the start time and assume that
// the document isn't saved, reloaded, edited and filter set // the document isn't saved, reloaded, edited and filter set
// all together during the gap between those two times. // all together during the gap between those two times.
aFirstDateTime += Time( 0, 1 ); aFirstDateTime += tools::Time( 0, 1 );
aFirstDateTime.SetSec(0); aFirstDateTime.SetSec(0);
aFirstDateTime.SetNanoSec(0); aFirstDateTime.SetNanoSec(0);
} }

View File

@ -780,7 +780,7 @@ static OUString lcl_GetNumStr(sal_Int32 nNo, SvxNumType eType)
ScHeaderFieldData::ScHeaderFieldData() ScHeaderFieldData::ScHeaderFieldData()
: :
aDate( Date::EMPTY ), aDate( Date::EMPTY ),
aTime( Time::EMPTY ) aTime( tools::Time::EMPTY )
{ {
nPageNo = nTotalPages = 0; nPageNo = nTotalPages = 0;
eNumType = SVX_ARABIC; eNumType = SVX_ARABIC;

View File

@ -108,11 +108,11 @@ void ScInterpreter::ScGetActTime()
nFuncFmtType = NUMBERFORMAT_DATETIME; nFuncFmtType = NUMBERFORMAT_DATETIME;
Date aActDate( Date::SYSTEM ); Date aActDate( Date::SYSTEM );
long nDiff = aActDate - *(pFormatter->GetNullDate()); long nDiff = aActDate - *(pFormatter->GetNullDate());
Time aActTime( Time::SYSTEM ); tools::Time aActTime( tools::Time::SYSTEM );
double nTime = aActTime.GetHour() / static_cast<double>(::Time::hourPerDay) + double nTime = aActTime.GetHour() / static_cast<double>(::tools::Time::hourPerDay) +
aActTime.GetMin() / static_cast<double>(::Time::minutePerDay) + aActTime.GetMin() / static_cast<double>(::tools::Time::minutePerDay) +
aActTime.GetSec() / static_cast<double>(::Time::secondPerDay) + aActTime.GetSec() / static_cast<double>(::tools::Time::secondPerDay) +
aActTime.GetNanoSec() / static_cast<double>(::Time::nanoSecPerDay); aActTime.GetNanoSec() / static_cast<double>(::tools::Time::nanoSecPerDay);
PushDouble( (double) nDiff + nTime ); PushDouble( (double) nDiff + nTime );
} }
@ -141,15 +141,15 @@ void ScInterpreter::ScGetMin()
{ {
double fTime = GetDouble(); double fTime = GetDouble();
fTime -= ::rtl::math::approxFloor(fTime); // Datumsanteil weg fTime -= ::rtl::math::approxFloor(fTime); // Datumsanteil weg
long nVal = (long)::rtl::math::approxFloor(fTime*DATE_TIME_FACTOR+0.5) % ::Time::secondPerHour; long nVal = (long)::rtl::math::approxFloor(fTime*DATE_TIME_FACTOR+0.5) % ::tools::Time::secondPerHour;
PushDouble( (double) (nVal / ::Time::secondPerMinute) ); PushDouble( (double) (nVal / ::tools::Time::secondPerMinute) );
} }
void ScInterpreter::ScGetSec() void ScInterpreter::ScGetSec()
{ {
double fTime = GetDouble(); double fTime = GetDouble();
fTime -= ::rtl::math::approxFloor(fTime); // Datumsanteil weg fTime -= ::rtl::math::approxFloor(fTime); // Datumsanteil weg
long nVal = (long)::rtl::math::approxFloor(fTime*DATE_TIME_FACTOR+0.5) % ::Time::secondPerMinute; long nVal = (long)::rtl::math::approxFloor(fTime*DATE_TIME_FACTOR+0.5) % ::tools::Time::secondPerMinute;
PushDouble( (double) nVal ); PushDouble( (double) nVal );
} }
@ -157,7 +157,7 @@ void ScInterpreter::ScGetHour()
{ {
double fTime = GetDouble(); double fTime = GetDouble();
fTime -= ::rtl::math::approxFloor(fTime); // Datumsanteil weg fTime -= ::rtl::math::approxFloor(fTime); // Datumsanteil weg
long nVal = (long)::rtl::math::approxFloor(fTime*DATE_TIME_FACTOR+0.5) / ::Time::secondPerHour; long nVal = (long)::rtl::math::approxFloor(fTime*DATE_TIME_FACTOR+0.5) / ::tools::Time::secondPerHour;
PushDouble((double) nVal); PushDouble((double) nVal);
} }
@ -459,7 +459,7 @@ void ScInterpreter::ScGetTime()
double nSec = GetDouble(); double nSec = GetDouble();
double nMin = GetDouble(); double nMin = GetDouble();
double nHour = GetDouble(); double nHour = GetDouble();
double fTime = fmod( (nHour * ::Time::secondPerHour) + (nMin * ::Time::secondPerMinute) + nSec, DATE_TIME_FACTOR) / DATE_TIME_FACTOR; double fTime = fmod( (nHour * ::tools::Time::secondPerHour) + (nMin * ::tools::Time::secondPerMinute) + nSec, DATE_TIME_FACTOR) / DATE_TIME_FACTOR;
if (fTime < 0) if (fTime < 0)
PushIllegalArgument(); PushIllegalArgument();
else else

View File

@ -160,7 +160,7 @@ void XclImpPCItem::ReadSxdatetime( XclImpStream& rStrm )
sal_uInt16 nYear, nMonth; sal_uInt16 nYear, nMonth;
sal_uInt8 nDay, nHour, nMin, nSec; sal_uInt8 nDay, nHour, nMin, nSec;
rStrm >> nYear >> nMonth >> nDay >> nHour >> nMin >> nSec; rStrm >> nYear >> nMonth >> nDay >> nHour >> nMin >> nSec;
SetDateTime( DateTime( Date( nDay, nMonth, nYear ), Time( nHour, nMin, nSec ) ) ); SetDateTime( DateTime( Date( nDay, nMonth, nYear ), tools::Time( nHour, nMin, nSec ) ) );
} }
void XclImpPCItem::ReadSxempty( XclImpStream& rStrm ) void XclImpPCItem::ReadSxempty( XclImpStream& rStrm )

View File

@ -156,7 +156,7 @@ static void lcl_AddStamp( OUString& rStr, const OUString& rName,
const LocaleDataWrapper& rLoc ) const LocaleDataWrapper& rLoc )
{ {
Date aD(rDateTime.Day, rDateTime.Month, rDateTime.Year); Date aD(rDateTime.Day, rDateTime.Month, rDateTime.Year);
Time aT(rDateTime.Hours, rDateTime.Minutes, rDateTime.Seconds, tools::Time aT(rDateTime.Hours, rDateTime.Minutes, rDateTime.Seconds,
rDateTime.NanoSeconds); rDateTime.NanoSeconds);
DateTime aDateTime(aD,aT); DateTime aDateTime(aD,aT);

View File

@ -124,7 +124,7 @@ const sal_uInt16 BIFF_PCDEFINITION_ENABLEREFRESH = 0x0020;
/** Adjusts the weird date format read from binary streams. /** Adjusts the weird date format read from binary streams.
Dates before 1900-Mar-01 are stored including the non-existing leap day Dates before 1900-Mar-01 are stored including the non-existing leap day
1900-02-29. Time values (without date) are stored as times of day 1900-02-29. tools::Time values (without date) are stored as times of day
1900-Jan-00. Nothing has to be done when the workbook is stored in 1904 1900-Jan-00. Nothing has to be done when the workbook is stored in 1904
date mode (dates before 1904-Jan-01 will not occur in this case). date mode (dates before 1904-Jan-01 will not occur in this case).
*/ */

View File

@ -301,7 +301,7 @@ void RevisionHeadersFragment::importHeader( const AttributeList& rAttribs )
util::DateTime aDateTime; util::DateTime aDateTime;
sax::Converter::parseDateTime(aDateTime, 0, aDateTimeStr); sax::Converter::parseDateTime(aDateTime, 0, aDateTimeStr);
Date aDate(aDateTime.Day, aDateTime.Month, aDateTime.Year); Date aDate(aDateTime.Day, aDateTime.Month, aDateTime.Year);
Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds); tools::Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds);
aMetadata.maDateTime.SetDate(aDate.GetDate()); aMetadata.maDateTime.SetDate(aDate.GetDate());
aMetadata.maDateTime.SetTime(aTime.GetTime()); aMetadata.maDateTime.SetTime(aTime.GetTime());
} }

View File

@ -242,16 +242,16 @@ void ScOrcusSheet::set_date_time(
Date aDate(day, month, year); Date aDate(day, month, year);
sal_uInt32 nSec = floor(second); sal_uInt32 nSec = floor(second);
sal_uInt32 nNanoSec = (second - nSec) * ::Time::nanoSecPerSec; sal_uInt32 nNanoSec = (second - nSec) * ::tools::Time::nanoSecPerSec;
Time aTime(hour, minute, nSec, nNanoSec); tools::Time aTime(hour, minute, nSec, nNanoSec);
Date aNullDate(*pFormatter->GetNullDate()); Date aNullDate(*pFormatter->GetNullDate());
long nDateDiff = aDate - aNullDate; long nDateDiff = aDate - aNullDate;
double fTime = double fTime =
static_cast<double>(aTime.GetNanoSec()) / ::Time::nanoSecPerSec + static_cast<double>(aTime.GetNanoSec()) / ::tools::Time::nanoSecPerSec +
aTime.GetSec() + aTime.GetSec() +
aTime.GetMin() * ::Time::secondPerMinute + aTime.GetMin() * ::tools::Time::secondPerMinute +
aTime.GetHour() * ::Time::secondPerHour; aTime.GetHour() * ::tools::Time::secondPerHour;
fTime /= DATE_TIME_FACTOR; fTime /= DATE_TIME_FACTOR;

View File

@ -433,7 +433,7 @@ void ScXMLChangeTrackingImportHelper::EndChangeAction()
void ScXMLChangeTrackingImportHelper::ConvertInfo(const ScMyActionInfo& aInfo, OUString& rUser, DateTime& aDateTime) void ScXMLChangeTrackingImportHelper::ConvertInfo(const ScMyActionInfo& aInfo, OUString& rUser, DateTime& aDateTime)
{ {
Date aDate(aInfo.aDateTime.Day, aInfo.aDateTime.Month, aInfo.aDateTime.Year); Date aDate(aInfo.aDateTime.Day, aInfo.aDateTime.Month, aInfo.aDateTime.Year);
Time aTime(aInfo.aDateTime.Hours, aInfo.aDateTime.Minutes, aInfo.aDateTime.Seconds, aInfo.aDateTime.NanoSeconds); tools::Time aTime(aInfo.aDateTime.Hours, aInfo.aDateTime.Minutes, aInfo.aDateTime.Seconds, aInfo.aDateTime.NanoSeconds);
aDateTime.SetDate( aDate.GetDate() ); aDateTime.SetDate( aDate.GetDate() );
aDateTime.SetTime( aTime.GetTime() ); aDateTime.SetTime( aTime.GetTime() );
@ -454,7 +454,7 @@ void ScXMLChangeTrackingImportHelper::ConvertInfo(const ScMyActionInfo& aInfo, O
ScChangeAction* ScXMLChangeTrackingImportHelper::CreateInsertAction(ScMyInsAction* pAction) ScChangeAction* ScXMLChangeTrackingImportHelper::CreateInsertAction(ScMyInsAction* pAction)
{ {
DateTime aDateTime( Date(0), Time(0) ); DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser; OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime); ConvertInfo(pAction->aInfo, aUser, aDateTime);
@ -467,7 +467,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateInsertAction(ScMyInsActio
ScChangeAction* ScXMLChangeTrackingImportHelper::CreateDeleteAction(ScMyDelAction* pAction) ScChangeAction* ScXMLChangeTrackingImportHelper::CreateDeleteAction(ScMyDelAction* pAction)
{ {
DateTime aDateTime( Date(0), Time(0) ); DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser; OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime); ConvertInfo(pAction->aInfo, aUser, aDateTime);
@ -483,7 +483,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateMoveAction(ScMyMoveAction
OSL_ENSURE(pAction->pMoveRanges, "no move ranges"); OSL_ENSURE(pAction->pMoveRanges, "no move ranges");
if (pAction->pMoveRanges) if (pAction->pMoveRanges)
{ {
DateTime aDateTime( Date(0), Time(0) ); DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser; OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime); ConvertInfo(pAction->aInfo, aUser, aDateTime);
@ -498,7 +498,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateMoveAction(ScMyMoveAction
ScChangeAction* ScXMLChangeTrackingImportHelper::CreateRejectionAction(ScMyRejAction* pAction) ScChangeAction* ScXMLChangeTrackingImportHelper::CreateRejectionAction(ScMyRejAction* pAction)
{ {
DateTime aDateTime( Date(0), Time(0) ); DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser; OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime); ConvertInfo(pAction->aInfo, aUser, aDateTime);
@ -519,7 +519,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateContentAction(ScMyContent
sInputString = pAction->pCellInfo->sInputString; sInputString = pAction->pCellInfo->sInputString;
} }
DateTime aDateTime( Date(0), Time(0) ); DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser; OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime); ConvertInfo(pAction->aInfo, aUser, aDateTime);

View File

@ -331,7 +331,7 @@ void ScXMLConverter::ConvertCoreToAPIDateTime(const DateTime& aDateTime, util::D
void ScXMLConverter::ConvertAPIToCoreDateTime(const util::DateTime& aDateTime, DateTime& rDateTime) void ScXMLConverter::ConvertAPIToCoreDateTime(const util::DateTime& aDateTime, DateTime& rDateTime)
{ {
Date aDate(aDateTime.Day, aDateTime.Month, aDateTime.Year); Date aDate(aDateTime.Day, aDateTime.Month, aDateTime.Year);
Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds); tools::Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds);
DateTime aTempDateTime (aDate, aTime); DateTime aTempDateTime (aDate, aTime);
rDateTime = aTempDateTime; rDateTime = aTempDateTime;
} }

View File

@ -86,7 +86,7 @@ ScNewScenarioDlg::ScNewScenarioDlg( vcl::Window* pParent, const OUString& rName,
OUString aComment(sCreatedBy + " " + aUserOpt.GetFirstName() + " " +aUserOpt.GetLastName() OUString aComment(sCreatedBy + " " + aUserOpt.GetFirstName() + " " +aUserOpt.GetLastName()
+ ", " + sOn + " " + ScGlobal::GetpLocaleData()->getDate(Date(Date::SYSTEM)) + ", " + sOn + " " + ScGlobal::GetpLocaleData()->getDate(Date(Date::SYSTEM))
+ ", " + ScGlobal::GetpLocaleData()->getTime(Time(Time::SYSTEM))); + ", " + ScGlobal::GetpLocaleData()->getTime(tools::Time(tools::Time::SYSTEM)));
m_pEdComment->SetText(aComment); m_pEdComment->SetText(aComment);
m_pEdName->SetText(rName); m_pEdName->SetText(rName);

View File

@ -2071,7 +2071,7 @@ void ScExternalRefManager::enableDocTimer( bool bEnable )
{ {
DocShellMap::iterator it = maDocShells.begin(), itEnd = maDocShells.end(); DocShellMap::iterator it = maDocShells.begin(), itEnd = maDocShells.end();
for (; it != itEnd; ++it) for (; it != itEnd; ++it)
it->second.maLastAccess = Time(Time::SYSTEM); it->second.maLastAccess = tools::Time(tools::Time::SYSTEM);
maSrcDocTimer.Start(); maSrcDocTimer.Start();
} }
@ -2272,7 +2272,7 @@ ScDocument* ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId)
// document already loaded. // document already loaded.
SfxObjectShell* p = itr->second.maShell; SfxObjectShell* p = itr->second.maShell;
itr->second.maLastAccess = Time( Time::SYSTEM ); itr->second.maLastAccess = tools::Time( tools::Time::SYSTEM );
return &static_cast<ScDocShell*>(p)->GetDocument(); return &static_cast<ScDocShell*>(p)->GetDocument();
} }
@ -2283,7 +2283,7 @@ ScDocument* ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId)
//document is unsaved document //document is unsaved document
SfxObjectShell* p = itr->second.maShell; SfxObjectShell* p = itr->second.maShell;
itr->second.maLastAccess = Time( Time::SYSTEM ); itr->second.maLastAccess = tools::Time( tools::Time::SYSTEM );
return &static_cast<ScDocShell*>(p)->GetDocument(); return &static_cast<ScDocShell*>(p)->GetDocument();
} }
@ -2747,13 +2747,13 @@ bool ScExternalRefManager::refreshSrcDocument(sal_uInt16 nFileId)
{ {
it->second.maShell->DoClose(); it->second.maShell->DoClose();
it->second.maShell = xDocShell; it->second.maShell = xDocShell;
it->second.maLastAccess = Time(Time::SYSTEM); it->second.maLastAccess = tools::Time(tools::Time::SYSTEM);
} }
else else
{ {
SrcShell aSrcDoc; SrcShell aSrcDoc;
aSrcDoc.maShell = xDocShell; aSrcDoc.maShell = xDocShell;
aSrcDoc.maLastAccess = Time(Time::SYSTEM); aSrcDoc.maLastAccess = tools::Time(tools::Time::SYSTEM);
cacheNewDocShell(nFileId, aSrcDoc); cacheNewDocShell(nFileId, aSrcDoc);
} }
@ -2947,7 +2947,7 @@ void ScExternalRefManager::purgeStaleSrcDocument(sal_Int32 nTimeOut)
for (; itr != itrEnd; ++itr) for (; itr != itrEnd; ++itr)
{ {
// in 100th of a second. // in 100th of a second.
sal_Int32 nSinceLastAccess = (Time( Time::SYSTEM ) - itr->second.maLastAccess).GetTime(); sal_Int32 nSinceLastAccess = (tools::Time( tools::Time::SYSTEM ) - itr->second.maLastAccess).GetTime();
if (nSinceLastAccess >= nTimeOut) if (nSinceLastAccess >= nTimeOut)
{ {
// Timed out. Let's close this, and exit the loop. // Timed out. Let's close this, and exit the loop.

View File

@ -48,7 +48,7 @@ private:
long nTabStart; // First (real) page of the sheet long nTabStart; // First (real) page of the sheet
long nDisplayStart; // same as above, relative to the start of counting long nDisplayStart; // same as above, relative to the start of counting
Date aDate; Date aDate;
Time aTime; tools::Time aTime;
long nTotalPages; long nTotalPages;
Size aPageSize; // for GetOptimalZoom Size aPageSize; // for GetOptimalZoom
ScPrintState aState; ScPrintState aState;

View File

@ -245,7 +245,7 @@ public:
void SetOffset( const Point& rOfs ); void SetOffset( const Point& rOfs );
void SetManualZoom( sal_uInt16 nNewZoom ); void SetManualZoom( sal_uInt16 nNewZoom );
void SetDateTime( const Date& rDate, const Time& rTime ); void SetDateTime( const Date& rDate, const tools::Time& rTime );
void SetClearFlag( bool bFlag ); void SetClearFlag( bool bFlag );
void SetUseStyleColor( bool bFlag ); void SetUseStyleColor( bool bFlag );

View File

@ -214,9 +214,9 @@ IMPL_LINK( ScHighlightChgDlg, OKBtnHdl, PushButton*, pOKBtn )
ScChgsDateMode eMode = (ScChgsDateMode) m_pFilterCtr->GetDateMode(); ScChgsDateMode eMode = (ScChgsDateMode) m_pFilterCtr->GetDateMode();
aChangeViewSet.SetTheDateMode( eMode ); aChangeViewSet.SetTheDateMode( eMode );
Date aFirstDate( m_pFilterCtr->GetFirstDate() ); Date aFirstDate( m_pFilterCtr->GetFirstDate() );
Time aFirstTime( m_pFilterCtr->GetFirstTime() ); tools::Time aFirstTime( m_pFilterCtr->GetFirstTime() );
Date aLastDate( m_pFilterCtr->GetLastDate() ); Date aLastDate( m_pFilterCtr->GetLastDate() );
Time aLastTime( m_pFilterCtr->GetLastTime() ); tools::Time aLastTime( m_pFilterCtr->GetLastTime() );
aChangeViewSet.SetTheFirstDateTime( DateTime( aFirstDate, aFirstTime ) ); aChangeViewSet.SetTheFirstDateTime( DateTime( aFirstDate, aFirstTime ) );
aChangeViewSet.SetTheLastDateTime( DateTime( aLastDate, aLastTime ) ); aChangeViewSet.SetTheLastDateTime( DateTime( aLastDate, aLastTime ) );
aChangeViewSet.SetHasAuthor(m_pFilterCtr->IsAuthor()); aChangeViewSet.SetHasAuthor(m_pFilterCtr->IsAuthor());

View File

@ -174,7 +174,7 @@ void ScShareDocumentDlg::UpdateView()
sal_uInt16 nHours = sal::static_int_cast< sal_uInt16 >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() ); sal_uInt16 nHours = sal::static_int_cast< sal_uInt16 >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() );
sal_uInt16 nMinutes = sal::static_int_cast< sal_uInt16 >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() ); sal_uInt16 nMinutes = sal::static_int_cast< sal_uInt16 >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() );
Date aDate( nDay, nMonth, nYear ); Date aDate( nDay, nMonth, nYear );
Time aTime( nHours, nMinutes ); tools::Time aTime( nHours, nMinutes );
DateTime aDateTime( aDate, aTime ); DateTime aDateTime( aDate, aTime );
OUString aString( aUser ); OUString aString( aUser );
@ -229,7 +229,7 @@ void ScShareDocumentDlg::UpdateView()
util::DateTime uDT(xDocProps->getModificationDate()); util::DateTime uDT(xDocProps->getModificationDate());
Date d(uDT.Day, uDT.Month, uDT.Year); Date d(uDT.Day, uDT.Month, uDT.Year);
Time t(uDT.Hours, uDT.Minutes, uDT.Seconds, uDT.NanoSeconds); tools::Time t(uDT.Hours, uDT.Minutes, uDT.Seconds, uDT.NanoSeconds);
DateTime aDateTime(d,t); DateTime aDateTime(d,t);
aString += formatTime(aDateTime, *ScGlobal::pLocaleData); aString += formatTime(aDateTime, *ScGlobal::pLocaleData);

View File

@ -944,7 +944,7 @@ void ScEditFieldObj::setPropertyValueDateTime(const OUString& rName, const uno::
else if (rName == SC_UNONAME_DATETIME) else if (rName == SC_UNONAME_DATETIME)
{ {
maDateTime = rVal.get<util::DateTime>(); maDateTime = rVal.get<util::DateTime>();
Time aTime(maDateTime.Hours, maDateTime.Minutes, maDateTime.Seconds, maDateTime.NanoSeconds); tools::Time aTime(maDateTime.Hours, maDateTime.Minutes, maDateTime.Seconds, maDateTime.NanoSeconds);
p->SetFixTime(aTime); p->SetFixTime(aTime);
} }
else if (rName == SC_UNONAME_NUMFMT) else if (rName == SC_UNONAME_NUMFMT)
@ -1043,7 +1043,7 @@ uno::Any ScEditFieldObj::getPropertyValueDateTime(const OUString& rName)
if (rName == SC_UNONAME_DATETIME) if (rName == SC_UNONAME_DATETIME)
{ {
Time aT(p->GetFixTime()); tools::Time aT(p->GetFixTime());
maDateTime.Year = 0; maDateTime.Year = 0;
maDateTime.Month = 0; maDateTime.Month = 0;
maDateTime.Day = 0; maDateTime.Day = 0;

View File

@ -96,7 +96,7 @@ ScPreview::ScPreview( vcl::Window* pParent, ScDocShell* pDocSh, ScPreviewShell*
nTabStart( 0 ), nTabStart( 0 ),
nDisplayStart( 0 ), nDisplayStart( 0 ),
aDate( Date::SYSTEM ), aDate( Date::SYSTEM ),
aTime( Time::SYSTEM ), aTime( tools::Time::SYSTEM ),
nTotalPages( 0 ), nTotalPages( 0 ),
pLocationData( NULL ), pLocationData( NULL ),
pDrawView( NULL ), pDrawView( NULL ),
@ -695,7 +695,7 @@ void ScPreview::DataChanged(bool bNewTime)
if (bNewTime) if (bNewTime)
{ {
aDate = Date( Date::SYSTEM ); aDate = Date( Date::SYSTEM );
aTime = Time( Time::SYSTEM ); aTime = tools::Time( tools::Time::SYSTEM );
} }
bValid = false; bValid = false;

View File

@ -1032,7 +1032,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
else else
aFieldData.nTotalPages = nTotalPages; aFieldData.nTotalPages = nTotalPages;
SetDateTime( Date( Date::SYSTEM ), Time( Time::SYSTEM ) ); SetDateTime( Date( Date::SYSTEM ), tools::Time( tools::Time::SYSTEM ) );
if( pDocShell->getDocProperties()->getTitle().getLength() != 0 ) if( pDocShell->getDocProperties()->getTitle().getLength() != 0 )
aFieldData.aTitle = pDocShell->getDocProperties()->getTitle(); aFieldData.aTitle = pDocShell->getDocProperties()->getTitle();
@ -1068,7 +1068,7 @@ void ScPrintFunc::GetScaleData( Size& rPhysSize, long& rDocHdr, long& rDocFtr )
rDocFtr = aFtr.nHeight; rDocFtr = aFtr.nHeight;
} }
void ScPrintFunc::SetDateTime( const Date& rDate, const Time& rTime ) void ScPrintFunc::SetDateTime( const Date& rDate, const tools::Time& rTime )
{ {
aFieldData.aDate = rDate; aFieldData.aDate = rDate;
aFieldData.aTime = rTime; aFieldData.aTime = rTime;

View File

@ -281,7 +281,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
break; break;
case NUMBERFORMAT_TIME: case NUMBERFORMAT_TIME:
{ {
Time aActTime( Time::SYSTEM ); tools::Time aActTime( tools::Time::SYSTEM );
fVal = aActTime.GetTimeInDays(); fVal = aActTime.GetTimeInDays();
} }
break; break;
@ -394,7 +394,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
break; break;
case NUMBERFORMAT_TIME: case NUMBERFORMAT_TIME:
{ {
Time aActTime( Time::SYSTEM ); tools::Time aActTime( tools::Time::SYSTEM );
fVal = aActTime.GetTimeInDays(); fVal = aActTime.GetTimeInDays();
} }
break; break;
@ -404,7 +404,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
case NUMBERFORMAT_DATE: case NUMBERFORMAT_DATE:
{ {
double fDate = rtl::math::approxFloor( fCell); double fDate = rtl::math::approxFloor( fCell);
Time aActTime( Time::SYSTEM ); tools::Time aActTime( tools::Time::SYSTEM );
fVal = fDate + aActTime.GetTimeInDays(); fVal = fDate + aActTime.GetTimeInDays();
} }
break; break;

View File

@ -427,7 +427,7 @@ void lcl_Annotations( FixedText& aTimeText )
if (xPos && xControl) if (xPos && xControl)
{ {
sal_uLong nStart = Time::GetSystemTicks(); sal_uLong nStart = tools::Time::GetSystemTicks();
xAnnotationText->setText(L"bla"); xAnnotationText->setText(L"bla");
xCursor->gotoEnd(false); xCursor->gotoEnd(false);
@ -441,7 +441,7 @@ void lcl_Annotations( FixedText& aTimeText )
xPos->setText(L"dumdi"); xPos->setText(L"dumdi");
} }
sal_uLong nEnd = Time::GetSystemTicks(); sal_uLong nEnd = tools::Time::GetSystemTicks();
aTimeText.SetText(String(nEnd-nStart)+String(" ms")); aTimeText.SetText(String(nEnd-nStart)+String(" ms"));
} }
} }
@ -585,7 +585,7 @@ void lcl_Cells( FixedText& aTimeText )
if (xDoc) if (xDoc)
{ {
long nCount = 0; long nCount = 0;
sal_uLong nStart = Time::GetSystemTicks(); sal_uLong nStart = tools::Time::GetSystemTicks();
XActionLockableRef xLock = (XActionLockable*) XActionLockableRef xLock = (XActionLockable*)
xDoc->queryInterface(XActionLockable::getSmartUik()); xDoc->queryInterface(XActionLockable::getSmartUik());
@ -624,7 +624,7 @@ void lcl_Cells( FixedText& aTimeText )
} }
} }
sal_uLong nEnd = Time::GetSystemTicks(); sal_uLong nEnd = tools::Time::GetSystemTicks();
aTimeText.SetText(String(nCount)+String(" ")+String(nEnd-nStart)+String(" ms")); aTimeText.SetText(String(nCount)+String(" ")+String(nEnd-nStart)+String(" ms"));
// if (xLock) // if (xLock)
@ -1510,9 +1510,9 @@ IMPL_LINK_NOARG(MyWindow, CountHdl)
{ {
case 0: case 0:
{ {
sal_uLong nStart = Time::GetSystemTicks(); sal_uLong nStart = tools::Time::GetSystemTicks();
lcl_DoCount(); lcl_DoCount();
sal_uLong nEnd = Time::GetSystemTicks(); sal_uLong nEnd = tools::Time::GetSystemTicks();
aTimeText.SetText(String("Count: ")+String(nEnd-nStart)+String(" ms")); aTimeText.SetText(String("Count: ")+String(nEnd-nStart)+String(" ms"));
} }
break; break;

View File

@ -1326,7 +1326,7 @@ void SdPublishingDlg::SetDesign( SdPublishingDesign* pDesign )
pPage2_ChgDefault->Check( !pDesign->m_bAutoSlide ); pPage2_ChgDefault->Check( !pDesign->m_bAutoSlide );
pPage2_ChgAuto->Check( pDesign->m_bAutoSlide ); pPage2_ChgAuto->Check( pDesign->m_bAutoSlide );
Time aTime( Time::EMPTY ); tools::Time aTime( tools::Time::EMPTY );
aTime.MakeTimeFromMS( pDesign->m_nSlideDuration * 1000 ); aTime.MakeTimeFromMS( pDesign->m_nSlideDuration * 1000 );
pPage2_Duration->SetTime( aTime ); pPage2_Duration->SetTime( aTime );

View File

@ -160,7 +160,7 @@ OUString getAnnotationDateTimeString( const Reference< XAnnotation >& xAnnotatio
else if (aDate.IsValidAndGregorian() ) else if (aDate.IsValidAndGregorian() )
sRet = rLocalData.getDate(aDate); sRet = rLocalData.getDate(aDate);
Time aTime( aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds ); ::tools::Time aTime( aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds );
if(aTime.GetTime() != 0) if(aTime.GetTime() != 0)
sRet = sRet + " " + rLocalData.getTime( aTime,false ); sRet = sRet + " " + rLocalData.getTime( aTime,false );
} }

View File

@ -378,7 +378,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
else else
{ {
Date aDate( Date::SYSTEM ); Date aDate( Date::SYSTEM );
Time aTime( Time::SYSTEM ); tools::Time aTime( tools::Time::SYSTEM );
LanguageType eLang = pInfo->GetOutliner()->GetLanguage( pInfo->GetPara(), pInfo->GetPos() ); LanguageType eLang = pInfo->GetOutliner()->GetLanguage( pInfo->GetPara(), pInfo->GetPos() );
aRepresentation = SvxDateTimeField::GetFormatted( aDate, aTime, (SvxDateFormat)rSettings.meDateTimeFormat, *GetNumberFormatter(), eLang ); aRepresentation = SvxDateTimeField::GetFormatted( aDate, aTime, (SvxDateFormat)rSettings.meDateTimeFormat, *GetNumberFormatter(), eLang );
} }

View File

@ -227,7 +227,7 @@ SvxFieldData* SdFieldPopup::GetField()
if( (pTimeField->GetType() == SVXTIMETYPE_VAR) && (eType == SVXTIMETYPE_FIX) ) if( (pTimeField->GetType() == SVXTIMETYPE_VAR) && (eType == SVXTIMETYPE_FIX) )
{ {
Time aTime( Time::SYSTEM ); tools::Time aTime( tools::Time::SYSTEM );
( (SvxExtTimeField*) pNewField )->SetFixTime( aTime ); ( (SvxExtTimeField*) pNewField )->SetFixTime( aTime );
} }

View File

@ -252,7 +252,7 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, void *, p )
bool bBtnGetOneObjectEnabled = aBtnGetOneObject.IsEnabled(); bool bBtnGetOneObjectEnabled = aBtnGetOneObject.IsEnabled();
// calculate overall time // calculate overall time
Time aTime( 0 ); tools::Time aTime( 0 );
long nFullTime; long nFullTime;
if( aRbtBitmap.IsChecked() ) if( aRbtBitmap.IsChecked() )
{ {
@ -296,7 +296,7 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, void *, p )
if( aRbtBitmap.IsChecked() ) if( aRbtBitmap.IsChecked() )
{ {
Time *const pTime = m_FrameList[i].second; tools::Time *const pTime = m_FrameList[i].second;
assert(pTime); assert(pTime);
aTimeField.SetTime( *pTime ); aTimeField.SetTime( *pTime );
@ -378,7 +378,7 @@ IMPL_LINK( AnimationWindow, ClickRbtHdl, void *, p )
sal_uLong n = static_cast<sal_uLong>(aNumFldBitmap.GetValue()); sal_uLong n = static_cast<sal_uLong>(aNumFldBitmap.GetValue());
if( n > 0 ) if( n > 0 )
{ {
Time *const pTime = m_FrameList[n - 1].second; tools::Time *const pTime = m_FrameList[n - 1].second;
if( pTime ) if( pTime )
aTimeField.SetTime( *pTime ); aTimeField.SetTime( *pTime );
} }
@ -506,7 +506,7 @@ IMPL_LINK_NOARG(AnimationWindow, ModifyTimeHdl)
{ {
sal_uLong nPos = static_cast<sal_uLong>(aNumFldBitmap.GetValue() - 1); sal_uLong nPos = static_cast<sal_uLong>(aNumFldBitmap.GetValue() - 1);
Time *const pTime = m_FrameList[nPos].second; tools::Time *const pTime = m_FrameList[nPos].second;
*pTime = aTimeField.GetTime(); *pTime = aTimeField.GetTime();
@ -627,11 +627,11 @@ void AnimationWindow::ResetAttrs()
void AnimationWindow::WaitInEffect( sal_uLong nMilliSeconds, sal_uLong nTime, void AnimationWindow::WaitInEffect( sal_uLong nMilliSeconds, sal_uLong nTime,
SfxProgress* pProgress ) const SfxProgress* pProgress ) const
{ {
clock_t aEnd = Time::GetSystemTicks() + nMilliSeconds; clock_t aEnd = tools::Time::GetSystemTicks() + nMilliSeconds;
clock_t aCurrent = Time::GetSystemTicks(); clock_t aCurrent = tools::Time::GetSystemTicks();
while (aCurrent < aEnd) while (aCurrent < aEnd)
{ {
aCurrent = Time::GetSystemTicks(); aCurrent = tools::Time::GetSystemTicks();
if( pProgress ) if( pProgress )
pProgress->SetState( nTime + nMilliSeconds + aCurrent - aEnd ); pProgress->SetState( nTime + nMilliSeconds + aCurrent - aEnd );
@ -847,7 +847,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
} }
long nTime = rAnimBmp.nWait; long nTime = rAnimBmp.nWait;
Time* pTime = new Time( 0, 0, nTime / 100, nTime % 100 ); ::tools::Time* pTime = new ::tools::Time( 0, 0, nTime / 100, nTime % 100 );
m_FrameList.insert( m_FrameList.insert(
m_FrameList.begin() + m_nCurrentFrame + 1, m_FrameList.begin() + m_nCurrentFrame + 1,
::std::make_pair(pBitmapEx, pTime)); ::std::make_pair(pBitmapEx, pTime));
@ -874,7 +874,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
SdrExchangeView::GetObjGraphic( SdrExchangeView::GetObjGraphic(
pSnapShot->GetModel(), pSnapShot).GetBitmapEx() ); pSnapShot->GetModel(), pSnapShot).GetBitmapEx() );
Time* pTime = new Time( aTimeField.GetTime() ); ::tools::Time* pTime = new ::tools::Time( aTimeField.GetTime() );
m_FrameList.insert( m_FrameList.insert(
m_FrameList.begin() + m_nCurrentFrame + 1, m_FrameList.begin() + m_nCurrentFrame + 1,
@ -895,7 +895,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
BitmapEx *const pBitmapEx = BitmapEx *const pBitmapEx =
new BitmapEx(rView.GetAllMarkedGraphic().GetBitmapEx()); new BitmapEx(rView.GetAllMarkedGraphic().GetBitmapEx());
Time* pTime = new Time( aTimeField.GetTime() ); ::tools::Time* pTime = new ::tools::Time( aTimeField.GetTime() );
m_FrameList.insert( m_FrameList.insert(
m_FrameList.begin() + m_nCurrentFrame + 1, m_FrameList.begin() + m_nCurrentFrame + 1,
@ -925,7 +925,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
SdrExchangeView::GetObjGraphic( SdrExchangeView::GetObjGraphic(
pObject->GetModel(), pObject).GetBitmapEx() ); pObject->GetModel(), pObject).GetBitmapEx() );
Time* pTime = new Time( aTimeField.GetTime() ); ::tools::Time* pTime = new ::tools::Time( aTimeField.GetTime() );
m_FrameList.insert( m_FrameList.insert(
m_FrameList.begin() + m_nCurrentFrame + 1, m_FrameList.begin() + m_nCurrentFrame + 1,
@ -1015,7 +1015,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
for (size_t i = 0; i < nCount; ++i) for (size_t i = 0; i < nCount; ++i)
{ {
Time *const pTime = m_FrameList[i].second; tools::Time *const pTime = m_FrameList[i].second;
long nTime = pTime->GetNanoSec(); long nTime = pTime->GetNanoSec();
nTime += pTime->GetSec() * 100; nTime += pTime->GetSec() * 100;

View File

@ -521,9 +521,9 @@ AssistentDlgImpl::AssistentDlgImpl( vcl::Window* pWindow, const Link& rFinishLin
mpPage3PresTypeLiveRB->SetClickHdl( LINK(this,AssistentDlgImpl, PresTypeHdl )); mpPage3PresTypeLiveRB->SetClickHdl( LINK(this,AssistentDlgImpl, PresTypeHdl ));
mpPage3PresTypeKioskRB->SetClickHdl( LINK(this,AssistentDlgImpl, PresTypeHdl )); mpPage3PresTypeKioskRB->SetClickHdl( LINK(this,AssistentDlgImpl, PresTypeHdl ));
mpPage3PresTimeTMF->SetFormat( TIMEF_SEC ); mpPage3PresTimeTMF->SetFormat( TIMEF_SEC );
mpPage3PresTimeTMF->SetTime( Time( 0, 0, 10 ) ); mpPage3PresTimeTMF->SetTime( ::tools::Time( 0, 0, 10 ) );
mpPage3BreakTMF->SetFormat( TIMEF_SEC ); mpPage3BreakTMF->SetFormat( TIMEF_SEC );
mpPage3BreakTMF->SetTime( Time( 0, 0, 10 ) ); mpPage3BreakTMF->SetTime( ::tools::Time( 0, 0, 10 ) );
mpPage3LogoCB->Check(); mpPage3LogoCB->Check();
// set cursor in timefield // set cursor in timefield

View File

@ -467,7 +467,7 @@ void HeaderFooterTabPage::FillFormatList( int eFormat )
mpCBDateTimeFormat->Clear(); mpCBDateTimeFormat->Clear();
Date aDate( Date::SYSTEM ); Date aDate( Date::SYSTEM );
Time aTime( Time::SYSTEM ); tools::Time aTime( tools::Time::SYSTEM );
int nFormat; int nFormat;
for( nFormat = 0; nFormat < nDateTimeFormatsCount; nFormat++ ) for( nFormat = 0; nFormat < nDateTimeFormatsCount; nFormat++ )

View File

@ -127,7 +127,7 @@ SdStartPresentationDlg::SdStartPresentationDlg( vcl::Window* pWindow,
const bool bWindow = !( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_FULLSCREEN ) ).GetValue(); const bool bWindow = !( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_FULLSCREEN ) ).GetValue();
const long nPause = ( ( const SfxUInt32Item& ) rOutAttrs.Get( ATTR_PRESENT_PAUSE_TIMEOUT ) ).GetValue(); const long nPause = ( ( const SfxUInt32Item& ) rOutAttrs.Get( ATTR_PRESENT_PAUSE_TIMEOUT ) ).GetValue();
aTmfPause->SetTime( Time( 0, 0, nPause ) ); aTmfPause->SetTime( tools::Time( 0, 0, nPause ) );
// set cursor in timefield // set cursor in timefield
Edit *pEdit = aTmfPause->GetField(); Edit *pEdit = aTmfPause->GetField();
Selection aSel( pEdit->GetMaxTextLen(), pEdit->GetMaxTextLen() ); Selection aSel( pEdit->GetMaxTextLen(), pEdit->GetMaxTextLen() );

Some files were not shown because too many files have changed in this diff Show More