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;
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 )
maTimeEdit.SetText( aTimeString );

View File

@ -382,7 +382,7 @@ void lcl_printTimeOutput( void )
{
// Overall time output
lcl_lineOut( "" );
lcl_lineOut( "***** Time Output *****" );
lcl_lineOut( "***** tools::Time Output *****" );
char TimeBuffer[500];
double dTotalTime = GpTimer->getElapsedTime() - GdStartTime;
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;
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
@ -802,7 +802,7 @@ void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, sal_Int32 nCallL
char TimeBuffer[200];
if( GbTimerOn && bLeave )
{
sprintf( TimeBuffer, " // Execution Time = %f ms", dExecutionTime*1000.0 );
sprintf( TimeBuffer, " // Execution tools::Time = %f ms", dExecutionTime*1000.0 );
pPostStr = TimeBuffer;
}
#endif

View File

@ -2360,7 +2360,7 @@ RTLFUNC(Second)
double Now_Impl()
{
Date aDate( Date::SYSTEM );
Time aTime( Time::SYSTEM );
tools::Time aTime( tools::Time::SYSTEM );
double aSerial = (double)GetDayDiff( aDate );
long nSeconds = aTime.GetHour();
nSeconds *= 3600;
@ -2388,7 +2388,7 @@ RTLFUNC(Time)
if ( !bWrite )
{
Time aTime( Time::SYSTEM );
tools::Time aTime( tools::Time::SYSTEM );
SbxVariable* pMeth = rPar.Get( 0 );
OUString aRes;
if( pMeth->IsFixed() )
@ -2442,7 +2442,7 @@ RTLFUNC(Timer)
(void)pBasic;
(void)bWrite;
Time aTime( Time::SYSTEM );
tools::Time aTime( tools::Time::SYSTEM );
long nSeconds = aTime.GetHour();
nSeconds *= 3600;
nSeconds += aTime.GetMin() * 60;
@ -3212,7 +3212,7 @@ RTLFUNC(FileDateTime)
else
{
OUString aPath = rPar.Get(1)->GetOUString();
Time aTime( Time::EMPTY );
tools::Time aTime( tools::Time::EMPTY );
Date aDate( Date::EMPTY );
if( hasUno() )
{
@ -3222,7 +3222,7 @@ RTLFUNC(FileDateTime)
try
{
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 );
}
catch(const Exception & )
@ -3241,7 +3241,7 @@ RTLFUNC(FileDateTime)
oslDateTime 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 );
}
@ -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 )
{
return
static_cast<double>( nHours * ::Time::secondPerHour +
nMinutes * ::Time::secondPerMinute +
static_cast<double>( nHours * ::tools::Time::secondPerHour +
nMinutes * ::tools::Time::secondPerMinute +
nSeconds)
/
static_cast<double>( ::Time::secondPerDay );
static_cast<double>( ::tools::Time::secondPerDay );
}
bool implDateTimeSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,

View File

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

View File

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

View File

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

View File

@ -293,7 +293,7 @@ void ORowSetValue::free()
break;
case DataType::TIME:
delete (::com::sun::star::util::Time*)m_aValue.m_pValue;
TRACE_FREE( Time )
TRACE_FREE( tools::Time )
m_aValue.m_pValue = NULL;
break;
case DataType::TIMESTAMP:
@ -369,7 +369,7 @@ ORowSetValue& ORowSetValue::operator=(const ORowSetValue& _rRH)
break;
case DataType::TIME:
m_aValue.m_pValue = new Time(*(Time*)_rRH.m_aValue.m_pValue);
TRACE_ALLOC( Time )
TRACE_ALLOC( tools::Time )
break;
case DataType::TIMESTAMP:
m_aValue.m_pValue = new DateTime(*(DateTime*)_rRH.m_aValue.m_pValue);
@ -512,7 +512,7 @@ ORowSetValue& ORowSetValue::operator=(const Date& _rRH)
return *this;
}
ORowSetValue& ORowSetValue::operator=(const Time& _rRH)
ORowSetValue& ORowSetValue::operator=(const css::util::Time& _rRH)
{
if(m_eTypeKind != DataType::TIME)
free();
@ -520,7 +520,7 @@ ORowSetValue& ORowSetValue::operator=(const Time& _rRH)
if(m_bNull)
{
m_aValue.m_pValue = new Time(_rRH);
TRACE_ALLOC( Time )
TRACE_ALLOC( tools::Time )
m_eTypeKind = DataType::TIME;
m_bNull = false;
}
@ -750,19 +750,19 @@ ORowSetValue& ORowSetValue::operator=(const Any& _rAny)
}
bool operator==(const Date& _rLH,const Date& _rRH)
bool operator==(const Date& _rLH, const Date& _rRH)
{
return _rLH.Day == _rRH.Day && _rLH.Month == _rRH.Month && _rLH.Year == _rRH.Year;
}
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;
}
bool operator==(const DateTime& _rLH,const DateTime& _rRH)
bool operator==(const DateTime& _rLH, const DateTime& _rRH)
{
return _rLH.Day == _rRH.Day && _rLH.Month == _rRH.Month && _rLH.Year == _rRH.Year &&
_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 double getDouble() 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 Sequence< sal_Int8 > getBytes() 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 double getDouble() const SAL_OVERRIDE { return m_xRow->getDouble( 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 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 ); };
@ -2214,7 +2214,7 @@ namespace detail
virtual float getFloat() const SAL_OVERRIDE { return m_xColumn->getFloat(); };
virtual double getDouble() const SAL_OVERRIDE { return m_xColumn->getDouble(); };
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 Sequence< sal_Int8 > getBytes() const SAL_OVERRIDE { return m_xColumn->getBytes(); };
virtual Reference< XBlob > getBlob() const SAL_OVERRIDE { return m_xColumn->getBlob(); };

View File

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

View File

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

View File

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

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 ];
const size_t buffer_size = sizeof( buffer );

View File

@ -189,66 +189,42 @@ 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)
{
::dbtools::throwFunctionNotSupportedSQLException("setObjectNull", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setObjectNull", NULL);
}
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)
{
::dbtools::throwFunctionNotSupportedSQLException("setByte", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setByte", NULL);
}
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)
{
::dbtools::throwFunctionNotSupportedSQLException("setInt", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setInt", NULL);
}
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)
{
::dbtools::throwFunctionNotSupportedSQLException("setFloat", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setFloat", NULL);
}
void SAL_CALL KabPreparedStatement::setDouble(sal_Int32, double) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException("setDouble", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setDouble", NULL);
}
void SAL_CALL KabPreparedStatement::setString(sal_Int32 parameterIndex, const OUString &x) throw(SQLException, RuntimeException, std::exception)
@ -263,50 +239,33 @@ 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)
{
::dbtools::throwFunctionNotSupportedSQLException("setBytes", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setBytes", NULL);
}
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)
{
::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)
{
::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)
{
::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", NULL);
}
void SAL_CALL KabPreparedStatement::setObject(sal_Int32 parameterIndex, const Any& x) throw(SQLException, RuntimeException, std::exception)
@ -319,47 +278,32 @@ 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)
{
::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", NULL);
}
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)
{
::dbtools::throwFunctionNotSupportedSQLException("setBlob", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setBlob", NULL);
}
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)
{
::dbtools::throwFunctionNotSupportedSQLException("setArray", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setArray", NULL);
}
void SAL_CALL KabPreparedStatement::clearParameters() throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException("clearParameters", NULL);
::dbtools::throwFunctionNotSupportedSQLException("clearParameters", NULL);
}
void KabPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception, std::exception)

View File

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

View File

@ -202,66 +202,42 @@ void SAL_CALL MacabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int3
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)
{
::dbtools::throwFunctionNotSupportedSQLException("setBoolean", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setBoolean", NULL);
}
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)
{
::dbtools::throwFunctionNotSupportedSQLException("setShort", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setShort", NULL);
}
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)
{
::dbtools::throwFunctionNotSupportedSQLException("setLong", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setLong", NULL);
}
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)
{
::dbtools::throwFunctionNotSupportedSQLException("setDouble", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setDouble", NULL);
}
void SAL_CALL MacabPreparedStatement::setString(sal_Int32 parameterIndex, const OUString &x) throw(SQLException, RuntimeException)
@ -276,50 +252,33 @@ void SAL_CALL MacabPreparedStatement::setString(sal_Int32 parameterIndex, const
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)
{
::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)
{
::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)
{
::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)
{
::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", NULL);
}
void SAL_CALL MacabPreparedStatement::setObject(sal_Int32 parameterIndex, const Any& x) throw(SQLException, RuntimeException)
@ -336,47 +295,32 @@ 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)
{
::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", NULL);
}
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)
{
::dbtools::throwFunctionNotSupportedSQLException("setBlob", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setBlob", NULL);
}
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)
{
::dbtools::throwFunctionNotSupportedSQLException("setArray", NULL);
::dbtools::throwFunctionNotSupportedSQLException("setArray", NULL);
}
void SAL_CALL MacabPreparedStatement::clearParameters() throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionNotSupportedSQLException("clearParameters", NULL);
::dbtools::throwFunctionNotSupportedSQLException("clearParameters", NULL);
}
void MacabPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)

View File

@ -377,7 +377,7 @@ Sequence< sal_Int8 > SAL_CALL MacabResultSet::getBytes(sal_Int32) throw(SQLExcep
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
::dbtools::throwFunctionNotSupportedSQLException("getBytes", NULL);
::dbtools::throwFunctionNotSupportedSQLException("getBytes", NULL);
return Sequence< sal_Int8 >();
}
@ -387,7 +387,7 @@ Date SAL_CALL MacabResultSet::getDate(sal_Int32) throw(SQLException, RuntimeExce
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
::dbtools::throwFunctionNotSupportedSQLException("getDate", NULL);
::dbtools::throwFunctionNotSupportedSQLException("getDate", NULL);
Date aRet;
return aRet;
@ -398,9 +398,9 @@ Time SAL_CALL MacabResultSet::getTime(sal_Int32) throw(SQLException, RuntimeExce
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
::dbtools::throwFunctionNotSupportedSQLException("getTime", NULL);
::dbtools::throwFunctionNotSupportedSQLException("getTime", NULL);
Time nRet;
css::util::Time nRet;
return nRet;
}
@ -436,7 +436,7 @@ Reference< XInputStream > SAL_CALL MacabResultSet::getBinaryStream(sal_Int32) th
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
::dbtools::throwFunctionNotSupportedSQLException("getBinaryStream", NULL);
::dbtools::throwFunctionNotSupportedSQLException("getBinaryStream", NULL);
return NULL;
}
@ -446,7 +446,7 @@ Reference< XInputStream > SAL_CALL MacabResultSet::getCharacterStream(sal_Int32)
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
::dbtools::throwFunctionNotSupportedSQLException("getCharacterStream", NULL);
::dbtools::throwFunctionNotSupportedSQLException("getCharacterStream", NULL);
return NULL;
}
@ -456,7 +456,7 @@ Any SAL_CALL MacabResultSet::getObject(sal_Int32, const Reference< ::com::sun::s
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
::dbtools::throwFunctionNotSupportedSQLException("getObject", NULL);
::dbtools::throwFunctionNotSupportedSQLException("getObject", NULL);
return Any();
}
@ -466,7 +466,7 @@ Reference< XRef > SAL_CALL MacabResultSet::getRef(sal_Int32) throw(SQLException,
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
::dbtools::throwFunctionNotSupportedSQLException("getRef", NULL);
::dbtools::throwFunctionNotSupportedSQLException("getRef", NULL);
return NULL;
}
@ -476,7 +476,7 @@ Reference< XBlob > SAL_CALL MacabResultSet::getBlob(sal_Int32) throw(SQLExceptio
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
::dbtools::throwFunctionNotSupportedSQLException("getBlob", NULL);
::dbtools::throwFunctionNotSupportedSQLException("getBlob", NULL);
return NULL;
}
@ -823,7 +823,7 @@ void SAL_CALL MacabResultSet::updateDate(sal_Int32, const Date&) throw(SQLExcept
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 );
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 );
}

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 );
}

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;
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);
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
{
Time aTime = DBTypeConversion::toTime(rString);
css::util::Time aTime = DBTypeConversion::toTime(rString);
Reference< XNumberFormatsSupplier > xSupplier(rParam.xFormatter->getNumberFormatsSupplier());
Reference< XNumberFormatTypes > xTypes(xSupplier->getNumberFormats(), UNO_QUERY);
@ -1065,7 +1065,7 @@ OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType)
}
case DataType::TIME:
{
Time aTime = DBTypeConversion::toTime(fValue);
css::util::Time aTime = DBTypeConversion::toTime(fValue);
OUString aString = DBTypeConversion::toTimeString(aTime);
pDateNode->append(new OSQLInternalNode(aEmptyString, SQL_NODE_KEYWORD, SQL_TOKEN_T));
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)
{
Date aDate( Date::SYSTEM );
Time aTime( Time::SYSTEM );
tools::Time aTime( tools::Time::SYSTEM );
OUString aTmp( SvtUserOptions().GetID() );
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
OUString aStr( m_pEditED->GetText() );

View File

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

View File

@ -108,7 +108,7 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
oslDateTime lastCheckedDT;
Date aDate( Date::EMPTY );
Time aTime( Time::EMPTY );
tools::Time aTime( tools::Time::EMPTY );
lastCheckedTV.Seconds = (sal_uInt32) lastChecked;
osl_getLocalTimeFromSystemTime( &lastCheckedTV, &lastCheckedTV );
@ -116,7 +116,7 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
if ( osl_getDateTimeFromTimeValue( &lastCheckedTV, &lastCheckedDT ) )
{
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();

View File

@ -81,7 +81,7 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe
if (nFieldType != text::textfield::Type::TIME)
{
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;
xPropSet->getPropertyValue(UNO_TC_PROP_IS_FIXED) >>= bIsFixed;
@ -787,7 +787,7 @@ SV_IMPL_PERSIST1( SvxExtTimeField, SvxFieldData );
SvxExtTimeField::SvxExtTimeField()
: m_nFixTime( Time(Time::SYSTEM).GetTime() )
: m_nFixTime( tools::Time(tools::Time::SYSTEM).GetTime() )
{
eType = SVXTIMETYPE_VAR;
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() )
{
eType = eT;
@ -849,15 +849,15 @@ void SvxExtTimeField::Save( SvPersistStream & rStm )
OUString SvxExtTimeField::GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLang ) const
{
Time aTime( Time::EMPTY );
tools::Time aTime( tools::Time::EMPTY );
if ( eType == SVXTIMETYPE_FIX )
aTime.SetTime(m_nFixTime);
else
aTime = Time( Time::SYSTEM ); // current time
aTime = tools::Time( tools::Time::SYSTEM ); // current time
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 )
{
@ -1269,7 +1269,7 @@ void SvxDateTimeField::Save( SvPersistStream & /*rStm*/ )
SvxDateTimeField::SvxDateTimeField() {}
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;

View File

@ -1551,7 +1551,7 @@ bool SvxAutoCorrect::CreateLanguageFile( const LanguageTag& rLanguageTag, bool b
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);
if(nFndPos != aLastFileTable.end() &&
@ -1925,8 +1925,8 @@ SvxAutoCorrectLanguageLists::SvxAutoCorrectLanguageLists(
: sShareAutoCorrFile( rShareAutoCorrectFile ),
sUserAutoCorrFile( rUserAutoCorrectFile ),
aModifiedDate( Date::EMPTY ),
aModifiedTime( Time::EMPTY ),
aLastCheckTime( Time::EMPTY ),
aModifiedTime( tools::Time::EMPTY ),
aLastCheckTime( tools::Time::EMPTY ),
pCplStt_ExcptLst( 0 ),
pWrdStt_ExcptLst( 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
bool bRet = false;
Time nMinTime( 0, 2 );
Time nAktTime( Time::SYSTEM );
tools::Time nMinTime( 0, 2 );
tools::Time nAktTime( tools::Time::SYSTEM );
if( aLastCheckTime > nAktTime || // overflow?
( 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,
&aTstDate, &aTstTime ) &&
( aModifiedDate != aTstDate || aModifiedTime != aTstTime ))
@ -1967,7 +1967,7 @@ bool SvxAutoCorrectLanguageLists::IsFileChanged_Imp()
delete pAutocorr_List, pAutocorr_List = 0;
nFlags &= ~(CplSttLstLoad | WrdSttLstLoad | ChgWordLstLoad );
}
aLastCheckTime = Time( Time::SYSTEM );
aLastCheckTime = tools::Time( tools::Time::SYSTEM );
}
return bRet;
}
@ -2038,7 +2038,7 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp(
// Set time stamp
FStatHelper::GetModifiedDateTimeOfFile( sShareAutoCorrFile,
&aModifiedDate, &aModifiedTime );
aLastCheckTime = Time( Time::SYSTEM );
aLastCheckTime = tools::Time( tools::Time::SYSTEM );
}
}
@ -2138,7 +2138,7 @@ SvxAutocorrWordList* SvxAutoCorrectLanguageLists::LoadAutocorrWordList()
// Set time stamp
FStatHelper::GetModifiedDateTimeOfFile( sShareAutoCorrFile,
&aModifiedDate, &aModifiedTime );
aLastCheckTime = Time( Time::SYSTEM );
aLastCheckTime = tools::Time( tools::Time::SYSTEM );
return pAutocorr_List;
}
@ -2184,7 +2184,7 @@ bool SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const OUString& rNew)
// Set time stamp
FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile,
&aModifiedDate, &aModifiedTime );
aLastCheckTime = Time( Time::SYSTEM );
aLastCheckTime = tools::Time( tools::Time::SYSTEM );
aRet = true;
}
return aRet;
@ -2205,7 +2205,7 @@ bool SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const OUString& rNew)
// Set time stamp
FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile,
&aModifiedDate, &aModifiedTime );
aLastCheckTime = Time( Time::SYSTEM );
aLastCheckTime = tools::Time( tools::Time::SYSTEM );
aRet = true;
}
return aRet;
@ -2238,7 +2238,7 @@ void SvxAutoCorrectLanguageLists::SaveCplSttExceptList()
// Set time stamp
FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile,
&aModifiedDate, &aModifiedTime );
aLastCheckTime = Time( Time::SYSTEM );
aLastCheckTime = tools::Time( tools::Time::SYSTEM );
}
void SvxAutoCorrectLanguageLists::SetCplSttExceptList( SvStringsISortDtor* pList )
@ -2282,7 +2282,7 @@ void SvxAutoCorrectLanguageLists::SaveWrdSttExceptList()
// Set time stamp
FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile,
&aModifiedDate, &aModifiedTime );
aLastCheckTime = Time( Time::SYSTEM );
aLastCheckTime = tools::Time( tools::Time::SYSTEM );
}
void SvxAutoCorrectLanguageLists::SetWrdSttExceptList( SvStringsISortDtor* pList )

View File

@ -201,7 +201,7 @@ static util::DateTime getTime(sal_Int64 const nTime)
util::DateTime aTime;
memset( &aTime, 0, sizeof( util::DateTime ) );
Time aTempTime( nTime );
tools::Time aTempTime( nTime );
aTime.NanoSeconds = aTempTime.GetNanoSec();
aTime.Seconds = aTempTime.GetSec();
@ -211,9 +211,9 @@ static util::DateTime getTime(sal_Int64 const nTime)
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 )
{
Time aTime( setTime( mpImpl->maDateTime ) );
tools::Time aTime( setTime( mpImpl->maDateTime ) );
pData = new SvxExtTimeField( aTime, mpImpl->mbBoolean1?SVXTIMETYPE_FIX:SVXTIMETYPE_VAR );
if( mpImpl->mnInt32 >= SVXTIMEFORMAT_APPDEFAULT && mpImpl->mnInt32 <= SVXTIMEFORMAT_AM_HMSH )

View File

@ -87,7 +87,7 @@ namespace pcr
}
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 );
}
}

View File

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

View File

@ -2661,7 +2661,7 @@ void ImportComment10( SvxMSDffManager& rMan, SvStream& rStCtrl, SdrPage* pPage,
.ReadInt32( nPosX )
.ReadInt32( nPosY );
aDateTime.NanoSeconds *= ::Time::nanoPerMilli;
aDateTime.NanoSeconds *= ::tools::Time::nanoPerMilli;
}
break;
}
@ -6299,7 +6299,7 @@ void PPTFieldEntry::SetDateTime( sal_uInt32 nVal )
pField1 = new SvxFieldItem( SvxDateField( Date( Date::SYSTEM ), SVXDATETYPE_VAR, eDateFormat ), EE_FEATURE_FIELD );
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 )
pField2 = pFieldItem;
else

View File

@ -64,7 +64,7 @@ DateTime DTTM2DateTime( long lDTTM )
Friday=5
Saturday=6)
*/
DateTime aDateTime(Date( 0 ), Time( 0 ));
DateTime aDateTime(Date( 0 ), ::tools::Time( 0 ));
if( lDTTM )
{
sal_uInt16 lMin = (sal_uInt16)(lDTTM & 0x0000003F);
@ -76,7 +76,7 @@ DateTime DTTM2DateTime( long lDTTM )
sal_uInt16 lMon = (sal_uInt16)(lDTTM & 0x0000000F);
lDTTM >>= 4;
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;
}

View File

@ -790,7 +790,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
} break;
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
if( hasProperty(PROPERTY_TIME, xComponentSet) )
{
@ -799,7 +799,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
sal_Int32 nInt32Val = 0;
if (aVal >>= nInt32Val)
{
::Time aTime(nInt32Val);
::tools::Time aTime(nInt32Val);
OUStringBuffer aBuffer;
appendDigits( aTime.GetHour(), 2, aBuffer );
aBuffer.append( '-' );

View File

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

View File

@ -804,11 +804,11 @@ namespace xforms
{
Any aTypedValue = Convert::get().toAny( value, getCppuType() );
Time aValue;
css::util::Time aValue;
if ( !( aTypedValue >>= aValue ) )
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
// has a mantissa of 53 bits; we need at the very most 50 bits:
// format of aToolsTime.GetTime() is (in decimal) hhmmssnnnnnnnnn
@ -830,9 +830,9 @@ namespace xforms
void OTimeType::normalizeValue( const Any& _rValue, double& _rDoubleValue ) const
{
Time aValue;
css::util::Time 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();
}
@ -855,7 +855,7 @@ namespace xforms
{
::DateTime aToolsValue(
::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;

View File

@ -233,7 +233,7 @@ void xforms_propertyFunction(xmlXPathParserContextPtr ctxt, int nargs)
xmlXPathReturnEmptyString(ctxt);
}
// Date and Time Functions
// Date and tools::Time Functions
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
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
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".
*/
DateTime aDateTime( DateTime::SYSTEM );
@ -317,7 +317,7 @@ static bool parseDateTime(const OUString& aString, DateTime& aDateTime)
sal_Int32 nSecond = aTimeString.getToken(0, ':', nIndex).toInt32();
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);
if (aString.indexOf(aUTCString) < 0)
tmpDateTime.ConvertToUTC();

View File

@ -113,7 +113,7 @@ using namespace InternalFilePickerElementIds;
#define GET_DECODED_NAME(aObj) \
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).
#define TRAVELFILTER_TIMEOUT 750

View File

@ -372,7 +372,7 @@ private:
bool m_bListenForConfigChanges;
/** @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;

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_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
// -3:30:52 (!) instead of -3:30
// 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;
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;
t3 = t2 * t;
@ -160,7 +160,7 @@ Calendar_hijri::NewMoon(sal_Int32 n)
+ 0.0010 * sin(tf - 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;
return (jd);

View File

@ -276,12 +276,12 @@ private:
public:
SV_DECL_PERSIST1( SvxExtTimeField, SvxFieldData, com::sun::star::text::textfield::Type::EXTENDED_TIME )
SvxExtTimeField();
explicit SvxExtTimeField( const Time& rTime,
explicit SvxExtTimeField( const tools::Time& rTime,
SvxTimeType eType = SVXTIMETYPE_VAR,
SvxTimeFormat eFormat = SVXTIMEFORMAT_STANDARD );
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; }
void SetType( SvxTimeType eTp ) { eType = eTp; }
@ -292,7 +292,7 @@ public:
// If eLanguage==LANGUAGE_DONTKNOW the language/country
// used in number formatter initialization is taken.
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 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 )
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 bool operator==( const SvxFieldData& ) const SAL_OVERRIDE;

View File

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

View File

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

View File

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

View File

@ -24,7 +24,7 @@
#include <svl/svldllapi.h>
class Date;
class Time;
namespace tools { class Time; }
namespace FStatHelper {
@ -39,7 +39,7 @@ namespace FStatHelper {
@return it was be able to get the date/time stamp
*/
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
UCB.IsContent.

View File

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

View File

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

View File

@ -23,7 +23,7 @@
#include <tools/date.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:
enum DateTimeInitSystem
@ -42,8 +42,8 @@ public:
DateTime( const DateTime& rDateTime ) :
Date( rDateTime ), Time( rDateTime ) {}
DateTime( const Date& rDate ) : Date( rDate ), Time(0) {}
DateTime( const Time& rTime ) : Date(0), Time( rTime ) {}
DateTime( const Date& rDate, const Time& rTime ) :
DateTime( const tools::Time& rTime ) : Date(0), Time( rTime ) {}
DateTime( const Date& rDate, const tools::Time& rTime ) :
Date( rDate ), Time( rTime ) {}
bool IsBetween( const DateTime& rFrom,
@ -79,16 +79,16 @@ public:
DateTime& operator +=( double fTimeInDays );
DateTime& operator -=( double fTimeInDays )
{ return operator+=( -fTimeInDays ); }
DateTime& operator +=( const Time& rTime );
DateTime& operator -=( const Time& rTime );
DateTime& operator +=( const tools::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, double fTimeInDays );
TOOLS_DLLPUBLIC friend DateTime operator -( const DateTime& rDateTime, double 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 Time& rTime );
TOOLS_DLLPUBLIC friend DateTime operator +( const DateTime& rDateTime, const tools::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 long operator -( const DateTime& rDateTime, const Date& 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.
*/
namespace tools {
class TOOLS_DLLPUBLIC SAL_WARN_UNUSED Time
{
private:
@ -68,7 +70,7 @@ public:
Time( TimeInitSystem );
Time( const ResId & rResId );
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( sal_uInt32 nHour, sal_uInt32 nMin,
sal_uInt32 nSec = 0, sal_uInt64 nNanoSec = 0 );
@ -103,22 +105,22 @@ public:
/// 12 hours == 0.5 days
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)); }
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); }
bool operator !=( const Time& rTime ) const
bool operator !=( const tools::Time& rTime ) const
{ return (nTime != rTime.nTime); }
bool operator >( const Time& rTime ) const
bool operator >( const tools::Time& rTime ) const
{ return (nTime > rTime.nTime); }
bool operator <( const Time& rTime ) const
bool operator <( const tools::Time& rTime ) const
{ return (nTime < rTime.nTime); }
bool operator >=( const Time& rTime ) const
bool operator >=( const tools::Time& rTime ) const
{ return (nTime >= rTime.nTime); }
bool operator <=( const Time& rTime ) const
bool operator <=( const tools::Time& rTime ) const
{ return (nTime <= rTime.nTime); }
static Time GetUTCOffset();
@ -127,15 +129,17 @@ public:
void ConvertToUTC() { *this -= Time::GetUTCOffset(); }
void ConvertToLocalTime() { *this += Time::GetUTCOffset(); }
Time& operator =( const Time& rTime );
tools::Time& operator =( const tools::Time& rTime );
Time operator -() const
{ return Time( -nTime ); }
Time& operator +=( const Time& rTime );
Time& operator -=( const Time& rTime );
TOOLS_DLLPUBLIC friend Time operator +( const Time& rTime1, const Time& rTime2 );
TOOLS_DLLPUBLIC friend Time operator -( const Time& rTime1, const Time& rTime2 );
tools::Time& operator +=( const tools::Time& rTime );
tools::Time& operator -=( const tools::Time& rTime );
TOOLS_DLLPUBLIC friend Time operator +( const tools::Time& rTime1, const tools::Time& rTime2 );
TOOLS_DLLPUBLIC friend Time operator -( const tools::Time& rTime1, const tools::Time& rTime2 );
};
} /* namespace tools */
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

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

View File

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

View File

@ -405,26 +405,26 @@ public:
class VCL_DLLPUBLIC TimeFormatter : public FormatterBase
{
private:
Time maLastTime;
Time maMin;
Time maMax;
Time maCorrectedTime;
tools::Time maLastTime;
tools::Time maMin;
tools::Time maMax;
tools::Time maCorrectedTime;
TimeFieldFormat meFormat;
sal_uInt16 mnTimeFormat;
sal_uInt16 mnTimeFormat;
bool mbDuration;
bool mbEnforceValidValue;
SAL_DLLPRIVATE void ImplInit();
protected:
Time maFieldTime;
tools::Time maFieldTime;
TimeFormatter();
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
SAL_DLLPRIVATE bool ImplTimeReformat( const OUString& rStr, OUString& rOutStr );
SAL_DLLPRIVATE void ImplNewFieldValue( const Time& rTime );
SAL_DLLPRIVATE void ImplSetUserTime( const Time& rNewTime, Selection* pNewSelection = NULL );
SAL_DLLPRIVATE void ImplNewFieldValue( const tools::Time& rTime );
SAL_DLLPRIVATE void ImplSetUserTime( const tools::Time& rNewTime, Selection* pNewSelection = NULL );
SAL_DLLPRIVATE bool ImplAllowMalformedInput() const;
public:
@ -439,10 +439,10 @@ public:
virtual void Reformat() SAL_OVERRIDE;
virtual void ReformatAll() SAL_OVERRIDE;
void SetMin( const Time& rNewMin );
const Time& GetMin() const { return maMin; }
void SetMax( const Time& rNewMax );
const Time& GetMax() const { return maMax; }
void SetMin( const tools::Time& rNewMin );
const tools::Time& GetMin() const { return maMin; }
void SetMax( const tools::Time& rNewMax );
const tools::Time& GetMax() const { return maMax; }
void SetTimeFormat( TimeFormat eNewFormat );
TimeFormat GetTimeFormat() const { return (TimeFormat)mnTimeFormat;}
@ -453,14 +453,14 @@ public:
void SetDuration( bool mbDuration );
bool IsDuration() const { return mbDuration; }
void SetTime( const Time& rNewTime );
void SetUserTime( const Time& rNewTime );
Time GetTime() const;
void SetTime( const tools::Time& rNewTime );
void SetUserTime( const tools::Time& rNewTime );
tools::Time GetTime() const;
void SetEmptyTime() { FormatterBase::SetEmptyFieldValue(); }
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
@ -662,8 +662,8 @@ public:
class VCL_DLLPUBLIC TimeField : public SpinField, public TimeFormatter
{
private:
Time maFirst;
Time maLast;
tools::Time maFirst;
tools::Time maLast;
protected:
SAL_DLLPRIVATE void ImplTimeSpinArea( bool bUp );
@ -685,10 +685,10 @@ public:
virtual void First() SAL_OVERRIDE;
virtual void Last() SAL_OVERRIDE;
void SetFirst( const Time& rNewFirst ) { maFirst = rNewFirst; }
Time GetFirst() const { return maFirst; }
void SetLast( const Time& rNewLast ) { maLast = rNewLast; }
Time GetLast() const { return maLast; }
void SetFirst( const tools::Time& rNewFirst ) { maFirst = rNewFirst; }
tools::Time GetFirst() const { return maFirst; }
void SetLast( const tools::Time& rNewLast ) { maLast = rNewLast; }
tools::Time GetLast() const { return maLast; }
void SetExtFormat( ExtTimeFieldFormat eFormat );
};

View File

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

View File

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

View File

@ -374,7 +374,7 @@ void SAL_CALL OPreparedStatement::setDate(sal_Int32 parameter, const Date& aData
/* {{{ 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)
{
OSL_TRACE("OPreparedStatement::setTime");

View File

@ -524,7 +524,7 @@ Time SAL_CALL OResultSet::getTime(sal_Int32 column)
MutexGuard aGuard(m_aMutex);
checkColumnIndex(column);
Time t;
tools::Time t;
OUString timeString = getString(column);
OUString token;
sal_Int32 nIndex, i=0;
@ -562,7 +562,7 @@ DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 column)
checkColumnIndex(column);
DateTime dt;
Date d = getDate(column);
Time t = getTime(column);
tools::Time t = getTime(column);
dt.Year = d.Year;
dt.Month = d.Month;
@ -1088,7 +1088,7 @@ void SAL_CALL OResultSet::updateDate(sal_Int32 column, const Date& /* x */)
/* }}} */
/* {{{ 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)
{
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 );
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);
::osl::MutexGuard aGuard( m_aMutex );
Time nRet;
css::util::Time 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 );
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
lclCreateTextFields( aFields, xModel, "datetime13" );
break;
case 10: // Time H:MM
case 10: // tools::Time H:MM
bIsDate = false;
break;
case 11: // Time H:MM:SS
case 11: // tools::Time H:MM:SS
bIsDate = false;
// this is the default format
break;
case 12: // Time H:MM PM
case 12: // tools::Time H:MM PM
bIsDate = false;
break;
case 13: // Time H:MM:SS PM
case 13: // tools::Time H:MM:SS PM
bIsDate = false;
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
nFileTime *= 100;
// entire days
sal_Int64 nDays = nFileTime / sal_Int64( ::Time::nanoSecPerDay );
sal_Int64 nDays = nFileTime / sal_Int64( ::tools::Time::nanoSecPerDay );
// number of entire years
sal_Int64 nYears = (nDays - (nDays / (4 * 365)) + (nDays / (100 * 365)) - (nDays / (400 * 365))) / 365;
// remaining days in the year
@ -2225,16 +2225,16 @@ util::DateTime InputObjectBase::dumpFileTime( const String& rName )
// the day
aDateTime.Day = static_cast< sal_uInt16 >( nDaysInYear + 1 );
// number of nanoseconds in the day
sal_Int64 nTimeInDay = nFileTime % sal_Int64( ::Time::nanoSecPerDay );
sal_Int64 nTimeInDay = nFileTime % sal_Int64( ::tools::Time::nanoSecPerDay );
// nanoseconds
aDateTime.NanoSeconds = static_cast< sal_uInt32 >( nTimeInDay % ::Time::nanoSecPerSec );
nTimeInDay /= ::Time::nanoSecPerSec;
aDateTime.NanoSeconds = static_cast< sal_uInt32 >( nTimeInDay % ::tools::Time::nanoSecPerSec );
nTimeInDay /= ::tools::Time::nanoSecPerSec;
// seconds
aDateTime.Seconds = static_cast< sal_uInt16 >( nTimeInDay % ::Time::secondPerMinute );
nTimeInDay /= ::Time::secondPerMinute;
aDateTime.Seconds = static_cast< sal_uInt16 >( nTimeInDay % ::tools::Time::secondPerMinute );
nTimeInDay /= ::tools::Time::secondPerMinute;
// minutes
aDateTime.Minutes = static_cast< sal_uInt16 >( nTimeInDay % ::Time::minutePerHour );
nTimeInDay /= ::Time::minutePerHour;
aDateTime.Minutes = static_cast< sal_uInt16 >( nTimeInDay % ::tools::Time::minutePerHour );
nTimeInDay /= ::tools::Time::minutePerHour;
// hours
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:
{
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);
}
break;

View File

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

View File

@ -86,7 +86,7 @@ public:
std::cout << "Unavailable" << std::endl;
currenttest++;
#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
}
};

View File

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

View File

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

View File

@ -419,9 +419,9 @@ private:
struct SrcShell
{
SfxObjectShellRef maShell;
Time maLastAccess;
tools::Time maLastAccess;
SrcShell() : maLastAccess( Time::SYSTEM ) {}
SrcShell() : maLastAccess( tools::Time::SYSTEM ) {}
};
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 );
util::Time aTime = xRow->getTime(nRowPos);
nVal = aTime.Hours / static_cast<double>(::Time::hourPerDay) +
aTime.Minutes / static_cast<double>(::Time::minutePerDay) +
aTime.Seconds / static_cast<double>(::Time::secondPerDay) +
aTime.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay);
nVal = aTime.Hours / static_cast<double>(::tools::Time::hourPerDay) +
aTime.Minutes / static_cast<double>(::tools::Time::minutePerDay) +
aTime.Seconds / static_cast<double>(::tools::Time::secondPerDay) +
aTime.NanoSeconds / static_cast<double>(::tools::Time::nanoSecPerDay);
bEmptyFlag = xRow->wasNull();
bValue = true;
}
@ -123,10 +123,10 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
util::DateTime aStamp = xRow->getTimestamp(nRowPos);
nVal = ( Date( aStamp.Day, aStamp.Month, aStamp.Year ) -
*pFormTable->GetNullDate() ) +
aStamp.Hours / static_cast<double>(::Time::hourPerDay) +
aStamp.Minutes / static_cast<double>(::Time::minutePerDay) +
aStamp.Seconds / static_cast<double>(::Time::secondPerDay) +
aStamp.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay);
aStamp.Hours / static_cast<double>(::tools::Time::hourPerDay) +
aStamp.Minutes / static_cast<double>(::tools::Time::minutePerDay) +
aStamp.Seconds / static_cast<double>(::tools::Time::secondPerDay) +
aStamp.NanoSeconds / static_cast<double>(::tools::Time::nanoSecPerDay);
bEmptyFlag = xRow->wasNull();
bValue = true;
}

View File

@ -474,7 +474,7 @@ public:
IdleCalcTextWidthScope(ScDocument& rDoc, ScAddress& rCalcPos) :
mrDoc(rDoc),
mrCalcPos(rCalcPos),
mnStartTime(Time::GetSystemTicks()),
mnStartTime(tools::Time::GetSystemTicks()),
mpStylePool(rDoc.GetStyleSheetPool()),
mnOldSearchMask(mpStylePool->GetSearchMask()),
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
// 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;
}

View File

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

View File

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

View File

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

View File

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

View File

@ -160,7 +160,7 @@ void XclImpPCItem::ReadSxdatetime( XclImpStream& rStrm )
sal_uInt16 nYear, nMonth;
sal_uInt8 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 )

View File

@ -156,7 +156,7 @@ static void lcl_AddStamp( OUString& rStr, const OUString& rName,
const LocaleDataWrapper& rLoc )
{
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);
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.
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
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;
sax::Converter::parseDateTime(aDateTime, 0, aDateTimeStr);
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.SetTime(aTime.GetTime());
}

View File

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

View File

@ -433,7 +433,7 @@ void ScXMLChangeTrackingImportHelper::EndChangeAction()
void ScXMLChangeTrackingImportHelper::ConvertInfo(const ScMyActionInfo& aInfo, OUString& rUser, DateTime& aDateTime)
{
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.SetTime( aTime.GetTime() );
@ -454,7 +454,7 @@ void ScXMLChangeTrackingImportHelper::ConvertInfo(const ScMyActionInfo& aInfo, O
ScChangeAction* ScXMLChangeTrackingImportHelper::CreateInsertAction(ScMyInsAction* pAction)
{
DateTime aDateTime( Date(0), Time(0) );
DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime);
@ -467,7 +467,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateInsertAction(ScMyInsActio
ScChangeAction* ScXMLChangeTrackingImportHelper::CreateDeleteAction(ScMyDelAction* pAction)
{
DateTime aDateTime( Date(0), Time(0) );
DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime);
@ -483,7 +483,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateMoveAction(ScMyMoveAction
OSL_ENSURE(pAction->pMoveRanges, "no move ranges");
if (pAction->pMoveRanges)
{
DateTime aDateTime( Date(0), Time(0) );
DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime);
@ -498,7 +498,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateMoveAction(ScMyMoveAction
ScChangeAction* ScXMLChangeTrackingImportHelper::CreateRejectionAction(ScMyRejAction* pAction)
{
DateTime aDateTime( Date(0), Time(0) );
DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime);
@ -519,7 +519,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateContentAction(ScMyContent
sInputString = pAction->pCellInfo->sInputString;
}
DateTime aDateTime( Date(0), Time(0) );
DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser;
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)
{
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);
rDateTime = aTempDateTime;
}

View File

@ -86,7 +86,7 @@ ScNewScenarioDlg::ScNewScenarioDlg( vcl::Window* pParent, const OUString& rName,
OUString aComment(sCreatedBy + " " + aUserOpt.GetFirstName() + " " +aUserOpt.GetLastName()
+ ", " + 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_pEdName->SetText(rName);

View File

@ -2071,7 +2071,7 @@ void ScExternalRefManager::enableDocTimer( bool bEnable )
{
DocShellMap::iterator it = maDocShells.begin(), itEnd = maDocShells.end();
for (; it != itEnd; ++it)
it->second.maLastAccess = Time(Time::SYSTEM);
it->second.maLastAccess = tools::Time(tools::Time::SYSTEM);
maSrcDocTimer.Start();
}
@ -2272,7 +2272,7 @@ ScDocument* ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId)
// document already loaded.
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();
}
@ -2283,7 +2283,7 @@ ScDocument* ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId)
//document is unsaved document
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();
}
@ -2747,13 +2747,13 @@ bool ScExternalRefManager::refreshSrcDocument(sal_uInt16 nFileId)
{
it->second.maShell->DoClose();
it->second.maShell = xDocShell;
it->second.maLastAccess = Time(Time::SYSTEM);
it->second.maLastAccess = tools::Time(tools::Time::SYSTEM);
}
else
{
SrcShell aSrcDoc;
aSrcDoc.maShell = xDocShell;
aSrcDoc.maLastAccess = Time(Time::SYSTEM);
aSrcDoc.maLastAccess = tools::Time(tools::Time::SYSTEM);
cacheNewDocShell(nFileId, aSrcDoc);
}
@ -2947,7 +2947,7 @@ void ScExternalRefManager::purgeStaleSrcDocument(sal_Int32 nTimeOut)
for (; itr != itrEnd; ++itr)
{
// 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)
{
// 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 nDisplayStart; // same as above, relative to the start of counting
Date aDate;
Time aTime;
tools::Time aTime;
long nTotalPages;
Size aPageSize; // for GetOptimalZoom
ScPrintState aState;

View File

@ -245,7 +245,7 @@ public:
void SetOffset( const Point& rOfs );
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 SetUseStyleColor( bool bFlag );

View File

@ -214,9 +214,9 @@ IMPL_LINK( ScHighlightChgDlg, OKBtnHdl, PushButton*, pOKBtn )
ScChgsDateMode eMode = (ScChgsDateMode) m_pFilterCtr->GetDateMode();
aChangeViewSet.SetTheDateMode( eMode );
Date aFirstDate( m_pFilterCtr->GetFirstDate() );
Time aFirstTime( m_pFilterCtr->GetFirstTime() );
tools::Time aFirstTime( m_pFilterCtr->GetFirstTime() );
Date aLastDate( m_pFilterCtr->GetLastDate() );
Time aLastTime( m_pFilterCtr->GetLastTime() );
tools::Time aLastTime( m_pFilterCtr->GetLastTime() );
aChangeViewSet.SetTheFirstDateTime( DateTime( aFirstDate, aFirstTime ) );
aChangeViewSet.SetTheLastDateTime( DateTime( aLastDate, aLastTime ) );
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 nMinutes = sal::static_int_cast< sal_uInt16 >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() );
Date aDate( nDay, nMonth, nYear );
Time aTime( nHours, nMinutes );
tools::Time aTime( nHours, nMinutes );
DateTime aDateTime( aDate, aTime );
OUString aString( aUser );
@ -229,7 +229,7 @@ void ScShareDocumentDlg::UpdateView()
util::DateTime uDT(xDocProps->getModificationDate());
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);
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)
{
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);
}
else if (rName == SC_UNONAME_NUMFMT)
@ -1043,7 +1043,7 @@ uno::Any ScEditFieldObj::getPropertyValueDateTime(const OUString& rName)
if (rName == SC_UNONAME_DATETIME)
{
Time aT(p->GetFixTime());
tools::Time aT(p->GetFixTime());
maDateTime.Year = 0;
maDateTime.Month = 0;
maDateTime.Day = 0;

View File

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

View File

@ -1032,7 +1032,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
else
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 )
aFieldData.aTitle = pDocShell->getDocProperties()->getTitle();
@ -1068,7 +1068,7 @@ void ScPrintFunc::GetScaleData( Size& rPhysSize, long& rDocHdr, long& rDocFtr )
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.aTime = rTime;

View File

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

View File

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

View File

@ -1326,7 +1326,7 @@ void SdPublishingDlg::SetDesign( SdPublishingDesign* pDesign )
pPage2_ChgDefault->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 );
pPage2_Duration->SetTime( aTime );

View File

@ -160,7 +160,7 @@ OUString getAnnotationDateTimeString( const Reference< XAnnotation >& xAnnotatio
else if (aDate.IsValidAndGregorian() )
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)
sRet = sRet + " " + rLocalData.getTime( aTime,false );
}

View File

@ -378,7 +378,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
else
{
Date aDate( Date::SYSTEM );
Time aTime( Time::SYSTEM );
tools::Time aTime( tools::Time::SYSTEM );
LanguageType eLang = pInfo->GetOutliner()->GetLanguage( pInfo->GetPara(), pInfo->GetPos() );
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) )
{
Time aTime( Time::SYSTEM );
tools::Time aTime( tools::Time::SYSTEM );
( (SvxExtTimeField*) pNewField )->SetFixTime( aTime );
}

View File

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

View File

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

View File

@ -467,7 +467,7 @@ void HeaderFooterTabPage::FillFormatList( int eFormat )
mpCBDateTimeFormat->Clear();
Date aDate( Date::SYSTEM );
Time aTime( Time::SYSTEM );
tools::Time aTime( tools::Time::SYSTEM );
int 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 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
Edit *pEdit = aTmfPause->GetField();
Selection aSel( pEdit->GetMaxTextLen(), pEdit->GetMaxTextLen() );

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