summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-11-21 13:58:30 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-11-21 13:58:30 +0000
commit6f120164ede32b4287ee13a51f39140b339fbe60 (patch)
tree74b433d824e6d8c8d5f35eef1780769c3689c601 /connectivity/source
parentfd42ad2917c0418a8c8174fe9b62084754cb0fb4 (diff)
INTEGRATION: CWS dba24c (1.30.132); FILE MERGED
2007/10/15 12:00:37 oj 1.30.132.1: #i78438# convert string to bool extended
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/commontools/FValue.cxx23
1 files changed, 20 insertions, 3 deletions
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 84b2cfdc393b..bf5368744ca9 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: FValue.cxx,v $
*
- * $Revision: 1.30 $
+ * $Revision: 1.31 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 01:58:37 $
+ * last change: $Author: ihi $ $Date: 2007-11-21 14:58:30 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1035,9 +1035,26 @@ sal_Bool ORowSetValue::getBool() const
{
case DataType::CHAR:
case DataType::VARCHAR:
+ case DataType::LONGVARCHAR:
+ {
+ const ::rtl::OUString sValue(m_aValue.m_pString);
+ const static ::rtl::OUString s_sTrue(RTL_CONSTASCII_USTRINGPARAM("true"));
+ const static ::rtl::OUString s_sFalse(RTL_CONSTASCII_USTRINGPARAM("false"));
+ if ( sValue.equalsIgnoreAsciiCase(s_sTrue) )
+ {
+ bRet = sal_True;
+ break;
+ }
+ else if ( sValue.equalsIgnoreAsciiCase(s_sFalse) )
+ {
+ bRet = sal_False;
+ break;
+ }
+ }
+ // run through
case DataType::DECIMAL:
case DataType::NUMERIC:
- case DataType::LONGVARCHAR:
+
bRet = ::rtl::OUString(m_aValue.m_pString).toInt32() != 0;
break;
case DataType::BIGINT: