Tag: cws_src680_qiq
User: fs      
Date: 2006/06/27 07:05:21

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

Log:
 RESYNC: (1.31-1.32); FILE MERGED

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.31.104.1&r2=1.31.104.2
Delta lines:  +19 -25
---------------------
--- BTables.cxx 16 Jun 2006 11:32:30 -0000      1.31.104.1
+++ BTables.cxx 27 Jun 2006 14:05:18 -0000      1.31.104.2
@@ -199,14 +199,8 @@
 // XDrop
 void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
 {
-    Reference< ::com::sun::star::lang::XUnoTunnel> 
xTunnel(getObject(_nPos),UNO_QUERY);
-       sal_Bool bIsNew = sal_False;
-       if(xTunnel.is())
-       {
-               connectivity::sdbcx::ODescriptor* pTable = 
(connectivity::sdbcx::ODescriptor*)xTunnel->getSomething(connectivity::sdbcx::ODescriptor::getUnoTunnelImplementationId());
-               if(pTable)
-                       bIsNew = pTable->isNew();
-       }
+    Reference< XInterface > xObject( getObject( _nPos ) );
+    sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject );
        if (!bIsNew)
        {
                OAdabasConnection* pConnection = 
static_cast<OAdabasCatalog&>(m_rParent).getConnection();
@@ -219,7 +213,7 @@
                ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP 
");
                const ::rtl::OUString& sDot = OAdabasCatalog::getDot();
 
-               Reference<XPropertySet> xProp(xTunnel,UNO_QUERY);
+               Reference<XPropertySet> xProp(xObject,UNO_QUERY);
                sal_Bool bIsView;
                if(bIsView = (xProp.is() && 
::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)))
 == ::rtl::OUString::createFromAscii("VIEW"))) // here we have a view
                        aSql += ::rtl::OUString::createFromAscii("VIEW ");
@@ -291,9 +285,9 @@
        if(xKeys.is())
        {
                sal_Bool bPKey = sal_False;
-               for(sal_Int32 i=0;i<xKeys->getCount();++i)
+               for( sal_Int32 key=0; key<xKeys->getCount(); ++key )
                {
-                       
if(::cppu::extractInterface(xColProp,xKeys->getByIndex(i)) && xColProp.is())
+                       
if(::cppu::extractInterface(xColProp,xKeys->getByIndex(key)) && xColProp.is())
                        {
 
                                sal_Int32 nKeyType              = 
getINT32(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)));
@@ -310,9 +304,9 @@
                         throw SQLException();
 
                                        aSql += 
::rtl::OUString::createFromAscii(" PRIMARY KEY (");
-                                       for(sal_Int32 
i=0;i<xColumns->getCount();++i)
+                                       for( sal_Int32 column=0; 
column<xColumns->getCount(); ++column )
                                        {
-                                               
if(::cppu::extractInterface(xColProp,xColumns->getByIndex(i)) && xColProp.is())
+                                               
if(::cppu::extractInterface(xColProp,xColumns->getByIndex(column)) && 
xColProp.is())
                                                        aSql += aQuote + 
getString(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)))
 + aQuote
                                                                                
+       ::rtl::OUString::createFromAscii(",");
                                        }
@@ -327,9 +321,9 @@
                         throw SQLException();
 
                                        aSql += 
::rtl::OUString::createFromAscii(" UNIQUE (");
-                                       for(sal_Int32 
i=0;i<xColumns->getCount();++i)
+                                       for( sal_Int32 column=0; 
column<xColumns->getCount(); ++column )
                                        {
-                                               
if(::cppu::extractInterface(xColProp,xColumns->getByIndex(i)) && xColProp.is())
+                                               
if(::cppu::extractInterface(xColProp,xColumns->getByIndex(column)) && 
xColProp.is())
                                                        aSql += aQuote + 
getString(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)))
 + aQuote
                                                                                
+ ::rtl::OUString::createFromAscii(",");
                                        }
@@ -355,9 +349,9 @@
                                                                + aQuote + 
aName + aQuote
                                                                + 
::rtl::OUString::createFromAscii(" (");
 
-                                       for(sal_Int32 
i=0;i<xColumns->getCount();++i)
+                                       for ( sal_Int32 column=0; 
column<xColumns->getCount(); ++column )
                                        {
-                                               
if(::cppu::extractInterface(xColProp,xColumns->getByIndex(i)) && xColProp.is())
+                                               
if(::cppu::extractInterface(xColProp,xColumns->getByIndex(column)) && 
xColProp.is())
                                                        aSql += aQuote + 
getString(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)))
 + aQuote
                                                                                
+ ::rtl::OUString::createFromAscii(",");
                                        }




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

Reply via email to