diff options
author | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-02-23 13:24:44 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-02-23 13:24:44 +0100 |
commit | 63f0a7dccf1ca260f0d0bba74e89aa46b38489ea (patch) | |
tree | 2201f8815c84f970acf5307ffc13b337340efa91 /connectivity/source | |
parent | 7ac0c9bc14ac38a9c0d3bb3f117208464c719941 (diff) | |
parent | e80d8ed59936df66e30c8dc7501caa18b711af16 (diff) |
dba34d: merge from dba34c
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/commontools/FValue.cxx | 26 | ||||
-rw-r--r-- | connectivity/source/commontools/predicateinput.cxx | 6 |
2 files changed, 23 insertions, 9 deletions
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index 95aabb821b1a..2d9ef1a219f8 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -787,11 +787,8 @@ sal_Bool operator==(const DateTime& _rLH,const DateTime& _rRH) bool ORowSetValue::operator==(const ORowSetValue& _rRH) const { - if(m_eTypeKind != _rRH.m_eTypeKind) - return false; - if ( m_bSigned != _rRH.m_bSigned ) - return false; - if(m_bNull != _rRH.isNull()) + if ( m_eTypeKind != _rRH.m_eTypeKind || + m_bNull != _rRH.isNull()) return false; if(m_bNull && _rRH.isNull()) return true; @@ -802,16 +799,29 @@ bool ORowSetValue::operator==(const ORowSetValue& _rRH) const { case DataType::VARCHAR: case DataType::CHAR: - case DataType::DECIMAL: - case DataType::NUMERIC: case DataType::LONGVARCHAR: { ::rtl::OUString aVal1(m_aValue.m_pString); ::rtl::OUString aVal2(_rRH.m_aValue.m_pString); - bRet = aVal1 == aVal2; + return aVal1 == aVal2; break; } + default: + if ( m_bSigned != _rRH.m_bSigned ) + return false; + break; + } + switch(m_eTypeKind) + { + case DataType::DECIMAL: + case DataType::NUMERIC: + { + ::rtl::OUString aVal1(m_aValue.m_pString); + ::rtl::OUString aVal2(_rRH.m_aValue.m_pString); + bRet = aVal1 == aVal2; + } + break; case DataType::FLOAT: bRet = *(float*)m_aValue.m_pValue == *(float*)_rRH.m_aValue.m_pValue; break; diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index 9d088c903dcc..dbac44b72424 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -406,7 +406,11 @@ namespace dbtools } else { - pOdbcSpec->getChild(1)->parseNodeToStr(sReturn, m_xConnection, &m_aParser.getContext(), sal_False, sal_True); + OSQLParseNode* pValueNode = pOdbcSpec->getChild(1); + if ( SQL_NODE_STRING == pValueNode->getNodeType() ) + sReturn = pValueNode->getTokenValue(); + else + pValueNode->parseNodeToStr(sReturn, m_xConnection, &m_aParser.getContext(), sal_False, sal_True); // sReturn = pOdbcSpec->getChild(1)->getTokenValue(); } } |