diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-10-14 18:05:06 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-10-16 18:45:19 +0200 |
commit | 1883d4f10f4d6df0da27b5659724188adbf1d3a8 (patch) | |
tree | e9e350e81333206a7cdbddb223162b92b60b72fd /dbaccess | |
parent | b9fac5769d831989dcff7bd815ca5630a916075d (diff) |
when reading a bool from a database, treat is as a bool
This in particular allows recognition of strings "true" and "false".
Change-Id: I590a5357206e4fb0b92b78b8ee4655e445e6f152
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/RowSet.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index f451f9894c9a..18a1cb02025c 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -1312,7 +1312,8 @@ OUString SAL_CALL ORowSet::getString( sal_Int32 columnIndex ) throw(SQLException sal_Bool SAL_CALL ORowSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( *m_pMutex ); - return getInsertValue(columnIndex); + // the extra cast is to recognise the "true" or "false" strings + return static_cast<bool>(getInsertValue(columnIndex)); } sal_Int8 SAL_CALL ORowSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) |