Kaydet (Commit) a76bd41c authored tarafından Ocke Janssen's avatar Ocke Janssen

#105154# insert the handling for BLOB and CLOB

üst 0da8092d
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: FValue.cxx,v $ * $RCSfile: FValue.cxx,v $
* *
* $Revision: 1.20 $ * $Revision: 1.21 $
* *
* last change: $Author: fs $ $Date: 2002-09-06 12:11:35 $ * last change: $Author: oj $ $Date: 2002-11-15 08:59:05 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -129,6 +129,14 @@ namespace { ...@@ -129,6 +129,14 @@ namespace {
bIsCompatible = (DataType::BIT == _eType2); bIsCompatible = (DataType::BIT == _eType2);
break; break;
case DataType::BLOB:
case DataType::CLOB:
case DataType::OBJECT:
bIsCompatible = (DataType::BLOB == _eType2)
|| (DataType::CLOB == _eType2)
|| (DataType::OBJECT == _eType2);
break;
default: default:
bIsCompatible = sal_False; bIsCompatible = sal_False;
} }
...@@ -271,6 +279,11 @@ void ORowSetValue::setTypeKind(sal_Int32 _eType) ...@@ -271,6 +279,11 @@ void ORowSetValue::setTypeKind(sal_Int32 _eType)
case DataType::LONGVARBINARY: case DataType::LONGVARBINARY:
(*this) = getSequence(); (*this) = getSequence();
break; break;
case DataType::BLOB:
case DataType::CLOB:
case DataType::OBJECT:
(*this) = getAny();
break;
default: default:
OSL_ENSURE(0,"ORowSetValue:operator==(): UNSPUPPORTED TYPE!"); OSL_ENSURE(0,"ORowSetValue:operator==(): UNSPUPPORTED TYPE!");
} }
...@@ -333,6 +346,8 @@ void ORowSetValue::free() ...@@ -333,6 +346,8 @@ void ORowSetValue::free()
TRACE_FREE( Sequence_sal_Int8 ) TRACE_FREE( Sequence_sal_Int8 )
m_aValue.m_pValue = NULL; m_aValue.m_pValue = NULL;
break; break;
case DataType::BLOB:
case DataType::CLOB:
case DataType::OBJECT: case DataType::OBJECT:
delete (Any*)m_aValue.m_pValue; delete (Any*)m_aValue.m_pValue;
TRACE_FREE( Any ) TRACE_FREE( Any )
...@@ -672,10 +687,10 @@ ORowSetValue& ORowSetValue::operator=(const Sequence<sal_Int8>& _rRH) ...@@ -672,10 +687,10 @@ ORowSetValue& ORowSetValue::operator=(const Sequence<sal_Int8>& _rRH)
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
ORowSetValue& ORowSetValue::operator=(const Any& _rAny) ORowSetValue& ORowSetValue::operator=(const Any& _rAny)
{ {
if (DataType::OBJECT != m_eTypeKind && !m_bNull) if (!isStorageCompatible(DataType::OBJECT,m_eTypeKind))
free(); free();
if(m_bNull) if ( m_bNull )
{ {
m_aValue.m_pValue = new Any(_rAny); m_aValue.m_pValue = new Any(_rAny);
TRACE_ALLOC( Any ) TRACE_ALLOC( Any )
...@@ -769,6 +784,11 @@ ORowSetValue::operator==(const ORowSetValue& _rRH) const ...@@ -769,6 +784,11 @@ ORowSetValue::operator==(const ORowSetValue& _rRH) const
case DataType::LONGVARBINARY: case DataType::LONGVARBINARY:
bRet = sal_False; bRet = sal_False;
break; break;
case DataType::BLOB:
case DataType::CLOB:
case DataType::OBJECT:
bRet = sal_False;
break;
default: default:
OSL_ENSURE(0,"ORowSetValue::operator==(): UNSPUPPORTED TYPE!"); OSL_ENSURE(0,"ORowSetValue::operator==(): UNSPUPPORTED TYPE!");
} }
...@@ -821,6 +841,8 @@ Any ORowSetValue::makeAny() const ...@@ -821,6 +841,8 @@ Any ORowSetValue::makeAny() const
OSL_ENSURE(m_aValue.m_pValue,"Value is null!"); OSL_ENSURE(m_aValue.m_pValue,"Value is null!");
rValue <<= *(Sequence<sal_Int8>*)m_aValue.m_pValue; rValue <<= *(Sequence<sal_Int8>*)m_aValue.m_pValue;
break; break;
case DataType::BLOB:
case DataType::CLOB:
case DataType::OBJECT: case DataType::OBJECT:
rValue = getAny(); rValue = getAny();
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment