summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@oracle.com>2011-02-23 11:36:11 +0100
committerOcke Janssen [oj] <Ocke.Janssen@oracle.com>2011-02-23 11:36:11 +0100
commitc3d9cd5435a4ff1d98fbd12482b04ccf5d322067 (patch)
tree38f0836bd3ade24d333324436c7d344fd569ef2f /connectivity
parent0115de354333f0607c1db021447b4393772684db (diff)
dba34c: #i117043# fix modified state of rowset
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/FValue.cxx26
1 files changed, 18 insertions, 8 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;