From 1883d4f10f4d6df0da27b5659724188adbf1d3a8 Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Mon, 14 Oct 2013 18:05:06 +0200 Subject: 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 --- dbaccess/source/core/api/RowSet.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(getInsertValue(columnIndex)); } sal_Int8 SAL_CALL ORowSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) -- cgit