summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools/FValue.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/commontools/FValue.cxx')
-rwxr-xr-x[-rw-r--r--]connectivity/source/commontools/FValue.cxx32
1 files changed, 23 insertions, 9 deletions
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 45f171e081..80cabb15ef 100644..100755
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -33,7 +33,7 @@
#include "connectivity/FValue.hxx"
#include "connectivity/CommonTools.hxx"
#include <connectivity/dbconversion.hxx>
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
#include <com/sun/star/io/XInputStream.hpp>
#include <rtl/ustrbuf.hxx>
#include <rtl/logfile.hxx>
@@ -1754,7 +1754,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;
@@ -1769,8 +1769,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:
@@ -1788,12 +1786,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;