diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-11-24 18:50:17 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-11-24 18:50:17 +0100 |
commit | b5d2cb0a2c20db106facf299c0271bce5223810a (patch) | |
tree | 394f532aadd23d4b9935435c4e62dbf8ab71ef5f /connectivity/source/commontools/FValue.cxx | |
parent | 2b1b6ec0a537571bd7367446e5592d8954c10bbe (diff) | |
parent | 94753953df87e4d761ff9fa30333dc02994f6d3f (diff) |
merge with DEV300_m94
Diffstat (limited to 'connectivity/source/commontools/FValue.cxx')
-rw-r--r-- | connectivity/source/commontools/FValue.cxx | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index aca181916b47..1e39befaf5f7 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -1753,7 +1753,7 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const } // ----------------------------------------------------------------------------- -::com::sun::star::util::Date ORowSetValue::getDate() const +::com::sun::star::util::Date ORowSetValue::getDate() const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbtools", "Ocke.Janssen@sun.com", "ORowSetValue::getDate" ); ::com::sun::star::util::Date aValue; @@ -1768,8 +1768,6 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const break; case DataType::DECIMAL: case DataType::NUMERIC: - aValue = DBTypeConversion::toDate((double)*this); - break; case DataType::FLOAT: case DataType::DOUBLE: case DataType::REAL: @@ -1787,12 +1785,28 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const aValue.Year = pDateTime->Year; } break; + case DataType::BIT: + case DataType::BOOLEAN: + case DataType::TINYINT: + case DataType::SMALLINT: + case DataType::INTEGER: + case DataType::BIGINT: + aValue = DBTypeConversion::toDate( double( sal_Int64( *this ) ) ); + break; + + case DataType::BLOB: + case DataType::CLOB: + case DataType::OBJECT: default: - { - Any aAnyValue = getAny(); - aAnyValue >>= aValue; - break; - } + OSL_ENSURE( false, "ORowSetValue::getDate: cannot retrieve the data!" ); + // NO break! + + case DataType::BINARY: + case DataType::VARBINARY: + case DataType::LONGVARBINARY: + case DataType::TIME: + aValue = DBTypeConversion::toDate( (double)0 ); + break; } } return aValue; |