User: hr Date: 06/06/19 18:11:06 Modified: /dba/connectivity/source/drivers/adabas/ BTables.cxx
Log: INTEGRATION: CWS warnings01 (1.31.30); FILE MERGED 2005/11/16 12:58:50 fs 1.31.30.2: #i57457# warning free code 2005/11/07 14:43:03 fs 1.31.30.1: #i57457# warning-free code 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&r2=1.32 Delta lines: +16 -22 --------------------- --- BTables.cxx 8 Sep 2005 05:24:25 -0000 1.31 +++ BTables.cxx 20 Jun 2006 01:11:03 -0000 1.32 @@ -202,14 +202,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(); @@ -222,7 +216,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 "); @@ -294,9 +288,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))); @@ -313,9 +307,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(","); } @@ -330,9 +324,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(","); } @@ -358,9 +352,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]
