diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-28 15:49:26 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-10-01 07:34:23 +0000 |
commit | fc04f76336fdf8c96e35382cdeb497e2f939705c (patch) | |
tree | 70c9bbd054a34a9bca9d22bb7afbb9c4349beff0 /connectivity | |
parent | eb4811590c85895ce531674596bdd6afb3397725 (diff) |
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>
Diffstat (limited to 'connectivity')
19 files changed, 85 insertions, 197 deletions
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 0e31e4f1cb84..24e41dd9ab93 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -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) { diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index cd1365c08cba..38626ba58988 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -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(); }; diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index e1c2d5fff040..b385eb7ac7f4 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -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)); } diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx index 12577dfd70ea..c862d05b694f 100644 --- a/connectivity/source/drivers/ado/APreparedStatement.cxx +++ b/connectivity/source/drivers/ado/APreparedStatement.cxx @@ -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); } diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 1d6db8d1d625..ee201ee3c0b4 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -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 ); diff --git a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx index ece475a29484..7994275976fe 100644 --- a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx +++ b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx @@ -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 ); } diff --git a/connectivity/source/drivers/file/FDateFunctions.cxx b/connectivity/source/drivers/file/FDateFunctions.cxx index f6bfca8af207..8e7e5f21ddfc 100644 --- a/connectivity/source/drivers/file/FDateFunctions.cxx +++ b/connectivity/source/drivers/file/FDateFunctions.cxx @@ -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); diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx index bd8fdaa27b14..065440716bfd 100644 --- a/connectivity/source/drivers/firebird/PreparedStatement.cxx +++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx @@ -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; diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx index 6d702b2b3cb2..caf5c7ad7a3b 100644 --- a/connectivity/source/drivers/firebird/ResultSet.cxx +++ b/connectivity/source/drivers/firebird/ResultSet.cxx @@ -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) diff --git a/connectivity/source/drivers/jdbc/ConnectionLog.cxx b/connectivity/source/drivers/jdbc/ConnectionLog.cxx index e8eddc4e87dc..87f58b491032 100644 --- a/connectivity/source/drivers/jdbc/ConnectionLog.cxx +++ b/connectivity/source/drivers/jdbc/ConnectionLog.cxx @@ -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 ); diff --git a/connectivity/source/drivers/kab/KPreparedStatement.cxx b/connectivity/source/drivers/kab/KPreparedStatement.cxx index 300bd261e5ca..6b1c9d741d2c 100644 --- a/connectivity/source/drivers/kab/KPreparedStatement.cxx +++ b/connectivity/source/drivers/kab/KPreparedStatement.cxx @@ -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) diff --git a/connectivity/source/drivers/kab/KResultSet.cxx b/connectivity/source/drivers/kab/KResultSet.cxx index ab79cfcd795f..8db816f9ddfb 100644 --- a/connectivity/source/drivers/kab/KResultSet.cxx +++ b/connectivity/source/drivers/kab/KResultSet.cxx @@ -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; } } diff --git a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx index 71508eac57fc..cdcb8f10ffe4 100644 --- a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx +++ b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx @@ -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) diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx index 17ea20ca5dde..35a8717254f2 100644 --- a/connectivity/source/drivers/macab/MacabResultSet.cxx +++ b/connectivity/source/drivers/macab/MacabResultSet.cxx @@ -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); diff --git a/connectivity/source/drivers/mork/MPreparedStatement.cxx b/connectivity/source/drivers/mork/MPreparedStatement.cxx index 7d96805fd520..55fdee52d5bb 100644 --- a/connectivity/source/drivers/mork/MPreparedStatement.cxx +++ b/connectivity/source/drivers/mork/MPreparedStatement.cxx @@ -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 ); } diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.cxx b/connectivity/source/drivers/mozab/MPreparedStatement.cxx index 0de6749dfd78..402c65646461 100644 --- a/connectivity/source/drivers/mozab/MPreparedStatement.cxx +++ b/connectivity/source/drivers/mozab/MPreparedStatement.cxx @@ -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 ); } diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx index 54f6a2638f26..a99900e88344 100644 --- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx +++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx @@ -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) diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx index a4073000bd76..a53e94503490 100644 --- a/connectivity/source/drivers/odbc/OResultSet.cxx +++ b/connectivity/source/drivers/odbc/OResultSet.cxx @@ -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); diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index c20ad8608c82..622809553614 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -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)); |