diff options
author | Santiago Martinez <smvarela@gmail.com> | 2012-03-28 21:48:52 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-29 13:16:13 +0100 |
commit | 63940b9214e5f1f44b74aaf689f5ee43f5473e0e (patch) | |
tree | 4ed18c5307b47a820b1b45c8c26912636291cd15 /connectivity | |
parent | 34366497a4c69ba77c47632e4c175f09363a3114 (diff) |
Remove unused code in connectiviy.
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/inc/connectivity/FValue.hxx | 2 | ||||
-rw-r--r-- | connectivity/source/commontools/FValue.cxx | 94 | ||||
-rw-r--r-- | connectivity/source/commontools/TSortIndex.cxx | 13 | ||||
-rw-r--r-- | connectivity/source/inc/TSortIndex.hxx | 5 |
4 files changed, 0 insertions, 114 deletions
diff --git a/connectivity/inc/connectivity/FValue.hxx b/connectivity/inc/connectivity/FValue.hxx index 64f44d487153..db46884972db 100644 --- a/connectivity/inc/connectivity/FValue.hxx +++ b/connectivity/inc/connectivity/FValue.hxx @@ -330,8 +330,6 @@ namespace connectivity sal_Int64 getLong() const; double getDouble() const; float getFloat() const; - // convert the double to the type _nDataType - void setFromDouble(const double& _rVal,sal_Int32 _nDatatype); ::rtl::OUString getString() const; // makes a automatic conversion if type isn't a string ::com::sun::star::util::Date getDate() const; diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index acd1ef0feef5..2de9ea3b806c 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -1616,100 +1616,6 @@ double ORowSetValue::getDouble() const } return nRet; } -// ------------------------------------------------------------------------- -void ORowSetValue::setFromDouble(const double& _rVal,sal_Int32 _nDatatype) -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbtools", "Ocke.Janssen@sun.com", "ORowSetValue::setFromDouble" ); - free(); - - m_bNull = sal_False; - switch(_nDatatype) - { - case DataType::CHAR: - case DataType::VARCHAR: - case DataType::DECIMAL: - case DataType::NUMERIC: - case DataType::LONGVARCHAR: - { - ::rtl::OUString aVal = ::rtl::OUString::valueOf(_rVal); - m_aValue.m_pString = aVal.pData; - rtl_uString_acquire(m_aValue.m_pString); - } - break; - case DataType::BIGINT: - if ( m_bSigned ) - { - m_aValue.m_pValue = new sal_Int64((sal_Int64)_rVal); - TRACE_ALLOC( sal_Int64 ) - } - else - { - ::rtl::OUString aVal = ::rtl::OUString::valueOf(_rVal); - m_aValue.m_pString = aVal.pData; - rtl_uString_acquire(m_aValue.m_pString); - } - break; - case DataType::FLOAT: - m_aValue.m_pValue = new float((float)_rVal); - TRACE_ALLOC( float ) - break; - case DataType::DOUBLE: - case DataType::REAL: - m_aValue.m_pValue = new double(_rVal); - TRACE_ALLOC( double ) - break; - case DataType::DATE: - m_aValue.m_pValue = new Date(dbtools::DBTypeConversion::toDate(_rVal)); - TRACE_ALLOC( Date ) - break; - case DataType::TIME: - m_aValue.m_pValue = new Time(dbtools::DBTypeConversion::toTime(_rVal)); - TRACE_ALLOC( Time ) - break; - case DataType::TIMESTAMP: - m_aValue.m_pValue = new DateTime(dbtools::DBTypeConversion::toDateTime(_rVal)); - TRACE_ALLOC( DateTime ) - break; - case DataType::BINARY: - case DataType::VARBINARY: - case DataType::LONGVARBINARY: - case DataType::BLOB: - case DataType::CLOB: - OSL_ASSERT(!"setFromDouble() for this type is not allowed!"); - break; - case DataType::BIT: - case DataType::BOOLEAN: - m_aValue.m_bBool = _rVal != 0.0; - break; - case DataType::TINYINT: - if ( m_bSigned ) - m_aValue.m_nInt8 = sal_Int8(_rVal); - else - m_aValue.m_nInt16 = sal_Int16(_rVal); - break; - case DataType::SMALLINT: - if ( m_bSigned ) - m_aValue.m_nInt16 = sal_Int16(_rVal); - else - m_aValue.m_nInt32 = sal_Int32(_rVal); - break; - case DataType::INTEGER: - if ( m_bSigned ) - m_aValue.m_nInt32 = sal_Int32(_rVal); - else - { - m_aValue.m_pValue = new sal_Int64((sal_Int64)_rVal); - TRACE_ALLOC( sal_Int64 ) - } - break; - default: - { - m_aValue.m_pValue = new Any(_rVal); - break; - } - } - m_eTypeKind = _nDatatype; -} // ----------------------------------------------------------------------------- Sequence<sal_Int8> ORowSetValue::getSequence() const { diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx index 5338648ca12d..68853762acb5 100644 --- a/connectivity/source/commontools/TSortIndex.cxx +++ b/connectivity/source/commontools/TSortIndex.cxx @@ -143,19 +143,6 @@ void OSortIndex::Freeze() m_bFrozen = sal_True; } -//------------------------------------------------------------------ -sal_Int32 OSortIndex::GetValue(sal_Int32 nPos) const -{ - OSL_ENSURE(nPos > 0,"OSortIndex::GetValue: nPos == 0"); - OSL_ENSURE((size_t)nPos <= m_aKeyValues.size(),"OSortIndex::GetValue: Zugriff ausserhalb der Array-Grenzen"); - - if (!m_bFrozen && m_aKeyType[0] != SQL_ORDERBYKEY_NONE) - { - OSL_FAIL("OSortIndex::GetValue: Invalid use of index!"); - return 0; - } - return m_aKeyValues[nPos-1].first; -} // ----------------------------------------------------------------------------- OKeyValue::OKeyValue() { diff --git a/connectivity/source/inc/TSortIndex.hxx b/connectivity/source/inc/TSortIndex.hxx index 419966f3e5b7..4a92d22dce50 100644 --- a/connectivity/source/inc/TSortIndex.hxx +++ b/connectivity/source/inc/TSortIndex.hxx @@ -107,11 +107,6 @@ namespace connectivity sal_Bool IsFrozen() const { return m_bFrozen; } // returns the current size of the keyvalues sal_Int32 Count() const { return m_aKeyValues.size(); } - /** GetValue returns the value at position nPos (1..n) [sorted access]. - It only allowed to call this method after the sortindex has been frozen. - */ - - sal_Int32 GetValue(sal_Int32 nPos) const; inline const ::std::vector<OKeyType>& getKeyType() const { return m_aKeyType; } inline TAscendingOrder getAscending(::std::vector<TAscendingOrder>::size_type _nPos) const { return m_aAscending[_nPos]; } |