summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/ado/AKey.cxx
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2000-11-03 13:21:22 +0000
committerOcke Janssen <oj@openoffice.org>2000-11-03 13:21:22 +0000
commit4ac2c6bc34802a5db6b08cbe393c324c190abc24 (patch)
tree09db322b522b5e3f43b80dff6ac96e1d87963825 /connectivity/source/drivers/ado/AKey.cxx
parent60d02225043e82c9c4933980675c304aef94fa46 (diff)
some changes in refcount
Diffstat (limited to 'connectivity/source/drivers/ado/AKey.cxx')
-rw-r--r--connectivity/source/drivers/ado/AKey.cxx84
1 files changed, 32 insertions, 52 deletions
diff --git a/connectivity/source/drivers/ado/AKey.cxx b/connectivity/source/drivers/ado/AKey.cxx
index f5c8669a4d05..c9edfdcde560 100644
--- a/connectivity/source/drivers/ado/AKey.cxx
+++ b/connectivity/source/drivers/ado/AKey.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AKey.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: oj $ $Date: 2000-10-30 08:00:28 $
+ * last change: $Author: oj $ $Date: 2000-11-03 14:09:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -111,7 +111,7 @@ void WpADOKey::Create()
}
}
// -------------------------------------------------------------------------
-OAdoKeyDescriptor::OAdoKeyDescriptor(sal_Bool _bCase, ADOKey* _pKey) : OKey_ADO(_bCase)
+OAdoKey::OAdoKey(sal_Bool _bCase, ADOKey* _pKey) : OKey_ADO(_bCase)
{
construct();
if(_pKey)
@@ -122,36 +122,30 @@ OAdoKeyDescriptor::OAdoKeyDescriptor(sal_Bool _bCase, ADOKey* _pKey) : OKey_ADO(
refreshColumns();
}
// -------------------------------------------------------------------------
-//OAdoKeyDescriptor::OAdoKeyDescriptor( const ::rtl::OUString& _Name,
-// const ::rtl::OUString& _ReferencedTable,
-// sal_Int32 _Type,
-// sal_Int32 _UpdateRule,
-// sal_Int32 _DeleteRule,
-// sal_Bool _bCase
-// ) : OKey_ADO(_Name,
-// _ReferencedTable,
-// _Type,
-// _UpdateRule,
-// _DeleteRule,_bCase)
-//{
-// construct();
-// m_aKey.Create();
-// m_aKey.put_Name(_Name);
-// m_aKey.put_UpdateRule(Map2Rule(_UpdateRule));
-// m_aKey.put_DeleteRule(Map2Rule(_DeleteRule));
-// m_aKey.put_RelatedTable(_ReferencedTable);
-// m_aKey.put_Type((KeyTypeEnum)_Type);
-//
-// refreshColumns();
-//}
-IMPLEMENT_SERVICE_INFO(OAdoKey,"com.sun.star.sdbcx.OAdoKey","com.sun.star.sdbcx.Key");
-// -------------------------------------------------------------------------
-OAdoKey::OAdoKey(sal_Bool _bCase, ADOKey* _pKey) : OAdoKeyDescriptor(_bCase,_pKey)
+OAdoKey::OAdoKey( const ::rtl::OUString& _Name,
+ const ::rtl::OUString& _ReferencedTable,
+ sal_Int32 _Type,
+ sal_Int32 _UpdateRule,
+ sal_Int32 _DeleteRule,
+ sal_Bool _bCase
+ ) : OKey_ADO(_Name,
+ _ReferencedTable,
+ _Type,
+ _UpdateRule,
+ _DeleteRule,_bCase)
{
-}
+ construct();
+ m_aKey.Create();
+ m_aKey.put_Name(_Name);
+ m_aKey.put_UpdateRule(Map2Rule(_UpdateRule));
+ m_aKey.put_DeleteRule(Map2Rule(_DeleteRule));
+ m_aKey.put_RelatedTable(_ReferencedTable);
+ m_aKey.put_Type((KeyTypeEnum)_Type);
+ refreshColumns();
+}
// -------------------------------------------------------------------------
-void OAdoKeyDescriptor::refreshColumns()
+void OAdoKey::refreshColumns()
{
::std::vector< ::rtl::OUString> aVector;
@@ -177,22 +171,7 @@ void OAdoKeyDescriptor::refreshColumns()
m_pColumns = new OColumns(*this,m_aMutex,aVector,pColumns,isCaseSensitive());
}
// -------------------------------------------------------------------------
-Any SAL_CALL OAdoKeyDescriptor::queryInterface( const Type & rType ) throw(RuntimeException)
-{
- Any aRet = ::cppu::queryInterface(rType,static_cast< ::com::sun::star::lang::XUnoTunnel*> (this));
- if(aRet.hasValue())
- return aRet;
- return OKey_ADO::queryInterface(rType);
-}
-// -------------------------------------------------------------------------
-::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OAdoKeyDescriptor::getTypes( ) throw(::com::sun::star::uno::RuntimeException)
-{
- ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > *)0 ));
-
- return ::comphelper::concatSequences(aTypes.getTypes(),OKey_ADO::getTypes());
-}
-//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OAdoKeyDescriptor::getUnoTunnelImplementationId()
+Sequence< sal_Int8 > OAdoKey::getUnoTunnelImplementationId()
{
static ::cppu::OImplementationId * pId = 0;
if (! pId)
@@ -209,15 +188,15 @@ Sequence< sal_Int8 > OAdoKeyDescriptor::getUnoTunnelImplementationId()
// com::sun::star::lang::XUnoTunnel
//------------------------------------------------------------------
-sal_Int64 OAdoKeyDescriptor::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException)
+sal_Int64 OAdoKey::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException)
{
if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return (sal_Int64)this;
- return 0;
+ return OKey_ADO::getSomething(rId);
}
// -------------------------------------------------------------------------
-void OAdoKeyDescriptor::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)throw (Exception)
+void OAdoKey::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)throw (Exception)
{
if(m_aKey.IsValid())
{
@@ -263,7 +242,7 @@ void OAdoKeyDescriptor::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const
}
}
// -------------------------------------------------------------------------
-void OAdoKeyDescriptor::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
+void OAdoKey::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
{
if(m_aKey.IsValid())
{
@@ -288,7 +267,7 @@ void OAdoKeyDescriptor::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) cons
}
}
// -------------------------------------------------------------------------
-sal_Int32 OAdoKeyDescriptor::MapRule(const RuleEnum& _eNum) const
+sal_Int32 OAdoKey::MapRule(const RuleEnum& _eNum) const
{
sal_Int32 eNum = KeyRule::NO_ACTION;
switch(_eNum)
@@ -309,7 +288,7 @@ sal_Int32 OAdoKeyDescriptor::MapRule(const RuleEnum& _eNum) const
return eNum;
}
// -------------------------------------------------------------------------
-RuleEnum OAdoKeyDescriptor::Map2Rule(const sal_Int32& _eNum) const
+RuleEnum OAdoKey::Map2Rule(const sal_Int32& _eNum) const
{
RuleEnum eNum = adRINone;
switch(_eNum)
@@ -329,5 +308,6 @@ RuleEnum OAdoKeyDescriptor::Map2Rule(const sal_Int32& _eNum) const
}
return eNum;
}
+// -----------------------------------------------------------------------------