[Libreoffice-commits] .: Branch 'libreoffice-3-5-0' - dbaccess/source
Petr Mladek
pmladek at kemper.freedesktop.org
Wed Feb 1 02:52:07 PST 2012
dbaccess/source/core/api/KeySet.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 7f0a631e043c2133af9463f3e22d33b502ef5b92
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Tue Jan 31 21:32:55 2012 +0100
fdo#45453: use integers rather than booleans
for always-true and always-false tests.
Some databases have poor or no support for booleans.
Signed-off-by: Jan Holesovsky <kendy at suse.cz>
Signed-off-by: Noel Power <nopower at suse.com>
Signed-off-by: Muthu Subramanian K <sumuthu at suse.com>
Signed-off-by: Petr Mladek <pmladek at suse.cz>
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index b41e68b..8e42b30 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -228,8 +228,8 @@ namespace
void appendOneKeyColumnClause( const ::rtl::OUString &tblName, const ::rtl::OUString &colName, ::rtl::OUStringBuffer &o_buf )
{
static ::rtl::OUString s_sDot(RTL_CONSTASCII_USTRINGPARAM("."));
- static ::rtl::OUString s_sParam0(RTL_CONSTASCII_USTRINGPARAM(" ( TRUE = ? AND "));
- static ::rtl::OUString s_sParam1(RTL_CONSTASCII_USTRINGPARAM(" = ? OR TRUE = ? AND "));
+ static ::rtl::OUString s_sParam0(RTL_CONSTASCII_USTRINGPARAM(" ( 1 = ? AND "));
+ static ::rtl::OUString s_sParam1(RTL_CONSTASCII_USTRINGPARAM(" = ? OR 1 = ? AND "));
static ::rtl::OUString s_sParam2(RTL_CONSTASCII_USTRINGPARAM(" IS NULL ) "));
o_buf.append(s_sParam0);
o_buf.append(tblName);
@@ -247,16 +247,16 @@ void OKeySet::setOneKeyColumnParameter( sal_Int32 &nPos, const Reference< XParam
{
if ( _rValue.isNull() )
{
- _xParameter->setBoolean( nPos++, false );
+ _xParameter->setByte( nPos++, 0 );
// We do the full call so that the right sqlType is passed to setNull
setParameter( nPos++, _xParameter, _rValue, _nType, _nScale );
- _xParameter->setBoolean( nPos++, true );
+ _xParameter->setByte( nPos++, 1 );
}
else
{
- _xParameter->setBoolean( nPos++, true );
+ _xParameter->setByte( nPos++, 1 );
setParameter( nPos++, _xParameter, _rValue, _nType, _nScale );
- _xParameter->setBoolean( nPos++, false );
+ _xParameter->setByte( nPos++, 0 );
}
}
More information about the Libreoffice-commits
mailing list