User: vg      
Date: 05/03/10 07:21:21

Modified:
 /dba/connectivity/source/drivers/adabas/
  BTables.cxx

Log:
 INTEGRATION: CWS dba24 (1.29.32); FILE MERGED
 2005/02/09 08:07:37 oj 1.29.32.1: #i26950# remove the need for XNamed

File Changes:

Directory: /dba/connectivity/source/drivers/adabas/
===================================================

File [changed]: BTables.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/adabas/BTables.cxx?r1=1.29&r2=1.30
Delta lines:  +19 -10
---------------------
--- BTables.cxx 22 Oct 2004 08:41:50 -0000      1.29
+++ BTables.cxx 10 Mar 2005 15:21:18 -0000      1.30
@@ -106,7 +106,7 @@
 #endif
 
 using namespace ::comphelper;
-
+using namespace connectivity;
 using namespace ::cppu;
 using namespace connectivity::adabas;
 using namespace ::com::sun::star::uno;
@@ -118,7 +118,7 @@
 using namespace dbtools;
 typedef connectivity::sdbcx::OCollection OCollection_TYPE;
 
-Reference< XNamed > OTables::createObject(const ::rtl::OUString& _rName)
+sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName)
 {
        ::rtl::OUString aName,aSchema;
        sal_Int32 nLen = _rName.indexOf('.');
@@ -132,7 +132,7 @@
 
     Reference< XResultSet > xResult = 
m_xMetaData->getTables(Any(),aSchema,aName,aTypes);
 
-    Reference< XNamed > xRet = NULL;
+    sdbcx::ObjectType xRet = NULL;
        if(xResult.is())
        {
         Reference< XRow > xRow(xResult,UNO_QUERY);
@@ -163,13 +163,6 @@
 {
        return new 
OAdabasTable(this,static_cast<OAdabasCatalog&>(m_rParent).getConnection());
 }
-// 
-----------------------------------------------------------------------------
-Reference< XNamed > OTables::cloneObject(const Reference< XPropertySet >& 
_xDescriptor)
-{
-       Reference< XNamed > xName(_xDescriptor,UNO_QUERY);
-       OSL_ENSURE(xName.is(),"Must be a XName interface here !");
-       return xName.is() ? createObject(xName->getName()) : Reference< XNamed 
>();
-}
 // -------------------------------------------------------------------------
 // XAppend
 void OTables::appendObject( const Reference< XPropertySet >& descriptor )
@@ -581,4 +574,20 @@
        return aValue;
 }
 // 
-----------------------------------------------------------------------------
+::rtl::OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject)
+{
+    OSL_ENSURE(_xObject.is(),"OTables::getNameForObject: Object is NULL!");
+    ::rtl::OUString sName,sTemp;
+    
_xObject->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME))
 >>= sName;
+    if( sName.getLength() )
+       {
+               const ::rtl::OUString& sDot = OAdabasCatalog::getDot();
+               sName += sDot;
+       }
+
+    
_xObject->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))
 >>= sTemp;
+    sName += sTemp;
 
+    return sName;
+}
+// 
-----------------------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to