Kaydet (Commit) 1883d4f1 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

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
üst b9fac576
...@@ -1312,7 +1312,8 @@ OUString SAL_CALL ORowSet::getString( sal_Int32 columnIndex ) throw(SQLException ...@@ -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) sal_Bool SAL_CALL ORowSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{ {
::osl::MutexGuard aGuard( *m_pMutex ); ::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) sal_Int8 SAL_CALL ORowSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment