XUnoTunnel->dynamic_cast in connectivityy

Change-Id: Ibe5e87a1ef1bdc11451e8fe240d017f1ef60dfe6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145556
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2023-01-16 10:41:34 +02:00 committed by Noel Grandin
parent 0250d6c643
commit f025dcc44c
50 changed files with 28 additions and 348 deletions

View File

@ -66,20 +66,6 @@ OAdoColumn::OAdoColumn(bool _bCase,OConnection* _pConnection)
} }
Sequence< sal_Int8 > OAdoColumn::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
// css::lang::XUnoTunnel
sal_Int64 OAdoColumn::getSomething( const Sequence< sal_Int8 > & rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<OColumn_ADO>{});
}
void OAdoColumn::construct() void OAdoColumn::construct()
{ {
sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY; sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY;

View File

@ -62,7 +62,7 @@ Reference< XPropertySet > OColumns::createDescriptor()
// XAppend // XAppend
sdbcx::ObjectType OColumns::appendObject( const OUString&, const Reference< XPropertySet >& descriptor ) sdbcx::ObjectType OColumns::appendObject( const OUString&, const Reference< XPropertySet >& descriptor )
{ {
rtl::Reference<OAdoColumn> pColumn = getFromUnoTunnel<OAdoColumn>( descriptor ); rtl::Reference<OAdoColumn> pColumn = dynamic_cast<OAdoColumn*>( descriptor.get() );
Reference< XPropertySet > xColumn; Reference< XPropertySet > xColumn;
if ( !pColumn.is() ) if ( !pColumn.is() )
{ {

View File

@ -69,21 +69,6 @@ void OAdoGroup::refreshUsers()
m_pUsers.reset(new OUsers(m_pCatalog, m_aMutex, aVector, aUsers, isCaseSensitive())); m_pUsers.reset(new OUsers(m_pCatalog, m_aMutex, aVector, aUsers, isCaseSensitive()));
} }
Sequence< sal_Int8 > OAdoGroup::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
// css::lang::XUnoTunnel
sal_Int64 OAdoGroup::getSomething( const Sequence< sal_Int8 > & rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<OGroup_ADO>{});
}
void OAdoGroup::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) void OAdoGroup::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)
{ {
if(m_aGroup.IsValid()) if(m_aGroup.IsValid())

View File

@ -58,7 +58,7 @@ Reference< XPropertySet > OGroups::createDescriptor()
// XAppend // XAppend
sdbcx::ObjectType OGroups::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) sdbcx::ObjectType OGroups::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
{ {
OAdoGroup* pGroup = getFromUnoTunnel<OAdoGroup>(descriptor); OAdoGroup* pGroup = dynamic_cast<OAdoGroup*>(descriptor.get());
if ( pGroup == nullptr ) if ( pGroup == nullptr )
m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_GROUP_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_GROUP_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );

View File

@ -70,20 +70,6 @@ void OAdoIndex::refreshColumns()
} }
Sequence< sal_Int8 > OAdoIndex::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
// css::lang::XUnoTunnel
sal_Int64 OAdoIndex::getSomething( const Sequence< sal_Int8 > & rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<sdbcx::OIndex>{});
}
void SAL_CALL OAdoIndex::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) void SAL_CALL OAdoIndex::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)
{ {
if(m_aIndex.IsValid()) if(m_aIndex.IsValid())

View File

@ -58,7 +58,7 @@ Reference< XPropertySet > OIndexes::createDescriptor()
// XAppend // XAppend
sdbcx::ObjectType OIndexes::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) sdbcx::ObjectType OIndexes::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
{ {
OAdoIndex* pIndex = getFromUnoTunnel<OAdoIndex>(descriptor); OAdoIndex* pIndex = dynamic_cast<OAdoIndex*>(descriptor.get());
if ( pIndex == nullptr ) if ( pIndex == nullptr )
m_pConnection->throwGenericSQLException( STR_INVALID_INDEX_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); m_pConnection->throwGenericSQLException( STR_INVALID_INDEX_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );

View File

@ -66,20 +66,6 @@ void OAdoKey::refreshColumns()
m_pColumns.reset(new OColumns(*this, m_aMutex, aVector, aColumns, isCaseSensitive(), m_pConnection)); m_pColumns.reset(new OColumns(*this, m_aMutex, aVector, aColumns, isCaseSensitive(), m_pConnection));
} }
Sequence< sal_Int8 > OAdoKey::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
// css::lang::XUnoTunnel
sal_Int64 OAdoKey::getSomething( const Sequence< sal_Int8 > & rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<OKey_ADO>{});
}
void OAdoKey::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) void OAdoKey::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)
{ {
if(m_aKey.IsValid()) if(m_aKey.IsValid())

View File

@ -58,7 +58,7 @@ Reference< XPropertySet > OKeys::createDescriptor()
// XAppend // XAppend
sdbcx::ObjectType OKeys::appendObject( const OUString&, const Reference< XPropertySet >& descriptor ) sdbcx::ObjectType OKeys::appendObject( const OUString&, const Reference< XPropertySet >& descriptor )
{ {
OAdoKey* pKey = getFromUnoTunnel<OAdoKey>( descriptor ); OAdoKey* pKey = dynamic_cast<OAdoKey*>( descriptor.get() );
if ( pKey == nullptr) if ( pKey == nullptr)
m_pConnection->throwGenericSQLException( STR_INVALID_KEY_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); m_pConnection->throwGenericSQLException( STR_INVALID_KEY_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );

View File

@ -127,20 +127,6 @@ void OAdoTable::refreshIndexes()
m_xIndexes.reset(new OIndexes(*this,m_aMutex,aVector,aIndexes,isCaseSensitive(),m_pCatalog->getConnection())); m_xIndexes.reset(new OIndexes(*this,m_aMutex,aVector,aIndexes,isCaseSensitive(),m_pCatalog->getConnection()));
} }
Sequence< sal_Int8 > OAdoTable::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
// css::lang::XUnoTunnel
sal_Int64 OAdoTable::getSomething( const Sequence< sal_Int8 > & rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<OTable_TYPEDEF>{});
}
// XRename // XRename
void SAL_CALL OAdoTable::rename( const OUString& newName ) void SAL_CALL OAdoTable::rename( const OUString& newName )
{ {
@ -165,7 +151,7 @@ void SAL_CALL OAdoTable::alterColumnByName( const OUString& colName, const Refer
checkDisposed(OTableDescriptor_BASE_TYPEDEF::rBHelper.bDisposed); checkDisposed(OTableDescriptor_BASE_TYPEDEF::rBHelper.bDisposed);
bool bError = true; bool bError = true;
OAdoColumn* pColumn = comphelper::getFromUnoTunnel<OAdoColumn>(descriptor); OAdoColumn* pColumn = dynamic_cast<OAdoColumn*>(descriptor.get());
if(pColumn != nullptr) if(pColumn != nullptr)
{ {
WpADOColumns aColumns = m_aTable.get_Columns(); WpADOColumns aColumns = m_aTable.get_Columns();

View File

@ -65,7 +65,7 @@ Reference< XPropertySet > OTables::createDescriptor()
// XAppend // XAppend
sdbcx::ObjectType OTables::appendObject( const OUString&, const Reference< XPropertySet >& descriptor ) sdbcx::ObjectType OTables::appendObject( const OUString&, const Reference< XPropertySet >& descriptor )
{ {
OAdoTable* pTable = getFromUnoTunnel<OAdoTable>( descriptor ); OAdoTable* pTable = dynamic_cast<OAdoTable*>( descriptor.get() );
if ( pTable == nullptr ) if ( pTable == nullptr )
m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_TABLE_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_TABLE_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );

View File

@ -65,21 +65,6 @@ void OAdoUser::refreshGroups()
m_pGroups.reset(new OGroups(m_pCatalog, m_aMutex, aVector, aGroups, isCaseSensitive())); m_pGroups.reset(new OGroups(m_pCatalog, m_aMutex, aVector, aGroups, isCaseSensitive()));
} }
Sequence< sal_Int8 > OAdoUser::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
// css::lang::XUnoTunnel
sal_Int64 OAdoUser::getSomething( const Sequence< sal_Int8 > & rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<OUser_TYPEDEF>{});
}
void OAdoUser::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) void OAdoUser::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)
{ {
if(m_aUser.IsValid()) if(m_aUser.IsValid())

View File

@ -57,7 +57,7 @@ Reference< XPropertySet > OUsers::createDescriptor()
// XAppend // XAppend
sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
{ {
OUserExtend* pUser = getFromUnoTunnel<OUserExtend>( descriptor ); OUserExtend* pUser = dynamic_cast<OUserExtend*>( descriptor.get() );
if ( pUser == nullptr ) if ( pUser == nullptr )
m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_USER_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_USER_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );

View File

@ -42,21 +42,6 @@ OAdoView::OAdoView(bool _bCase,ADOView* _pView) : OView_ADO(_bCase,nullptr)
{ {
} }
Sequence< sal_Int8 > OAdoView::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
// css::lang::XUnoTunnel
sal_Int64 OAdoView::getSomething( const Sequence< sal_Int8 > & rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<OView_ADO>{});
}
void OAdoView::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const void OAdoView::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
{ {
if(m_aView.IsValid()) if(m_aView.IsValid())

View File

@ -63,7 +63,7 @@ Reference< XPropertySet > OViews::createDescriptor()
// XAppend // XAppend
sdbcx::ObjectType OViews::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) sdbcx::ObjectType OViews::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
{ {
OAdoView* pView = getFromUnoTunnel<OAdoView>( descriptor ); OAdoView* pView = dynamic_cast<OAdoView*>( descriptor.get() );
if ( pView == nullptr ) if ( pView == nullptr )
m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_VIEW_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_VIEW_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );

View File

@ -608,20 +608,6 @@ void SAL_CALL OCalcTable::disposing()
} }
const Sequence< sal_Int8 > & OCalcTable::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
// css::lang::XUnoTunnel
sal_Int64 OCalcTable::getSomething( const Sequence< sal_Int8 > & rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<OCalcTable_BASE>{});
}
bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols, bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols,
bool bRetrieveData ) bool bRetrieveData )
{ {

View File

@ -104,8 +104,7 @@ Any SAL_CALL OComponentTable::queryInterface( const Type & rType )
rType == cppu::UnoType<XDataDescriptorFactory>::get()) rType == cppu::UnoType<XDataDescriptorFactory>::get())
return Any(); return Any();
const Any aRet = ::cppu::queryInterface(rType,static_cast< css::lang::XUnoTunnel*> (this)); return OTable_TYPEDEF::queryInterface(rType);
return aRet.hasValue() ? aRet : OTable_TYPEDEF::queryInterface(rType);
} }

View File

@ -294,7 +294,7 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo(
aRow[4] = new ORowSetValueDecorator(ORowSetValue(getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE))))); aRow[4] = new ORowSetValueDecorator(ORowSetValue(getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE)))));
aRow[6] = new ORowSetValueDecorator(*pBegin); aRow[6] = new ORowSetValueDecorator(*pBegin);
auto pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(xIndex); auto pIndex = dynamic_cast<ODbaseIndex*>(xIndex.get());
if(pIndex) if(pIndex)
{ {
aRow[11] = new ORowSetValueDecorator(static_cast<sal_Int32>(pIndex->getHeader().db_maxkeys)); aRow[11] = new ORowSetValueDecorator(static_cast<sal_Int32>(pIndex->getHeader().db_maxkeys));

View File

@ -99,20 +99,6 @@ void ODbaseIndex::refreshColumns()
m_pColumns.reset(new ODbaseIndexColumns(this,m_aMutex,aVector)); m_pColumns.reset(new ODbaseIndexColumns(this,m_aMutex,aVector));
} }
const Sequence< sal_Int8 > & ODbaseIndex::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
// XUnoTunnel
sal_Int64 ODbaseIndex::getSomething( const Sequence< sal_Int8 > & rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<ODbaseIndex_BASE>{});
}
ONDXPagePtr const & ODbaseIndex::getRoot() ONDXPagePtr const & ODbaseIndex::getRoot()
{ {
openIndexFile(); openIndexFile();

View File

@ -92,14 +92,9 @@ Reference< XPropertySet > ODbaseIndexes::createDescriptor()
// XAppend // XAppend
sdbcx::ObjectType ODbaseIndexes::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) sdbcx::ObjectType ODbaseIndexes::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
{ {
Reference<XUnoTunnel> xTunnel(descriptor,UNO_QUERY); ODbaseIndex* pIndex = dynamic_cast<ODbaseIndex*>(descriptor.get());
if(xTunnel.is()) if(pIndex)
{
ODbaseIndex* pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(xTunnel);
if(!pIndex)
throw SQLException();
pIndex->CreateImpl(); pIndex->CreateImpl();
}
return createObject( _rForName ); return createObject( _rForName );
} }
@ -107,7 +102,7 @@ sdbcx::ObjectType ODbaseIndexes::appendObject( const OUString& _rForName, const
// XDrop // XDrop
void ODbaseIndexes::dropObject(sal_Int32 _nPos, const OUString& /*_sElementName*/) void ODbaseIndexes::dropObject(sal_Int32 _nPos, const OUString& /*_sElementName*/)
{ {
auto pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(getObject(_nPos)); rtl::Reference<ODbaseIndex> pIndex = dynamic_cast<ODbaseIndex*>(getObject(_nPos).get());
if ( pIndex ) if ( pIndex )
pIndex->DropImpl(); pIndex->DropImpl();
} }

View File

@ -155,7 +155,7 @@ Sequence< sal_Int32 > SAL_CALL ODbaseResultSet::deleteRows( const Sequence< An
bool ODbaseResultSet::fillIndexValues(const Reference< XColumnsSupplier> &_xIndex) bool ODbaseResultSet::fillIndexValues(const Reference< XColumnsSupplier> &_xIndex)
{ {
auto pIndex = comphelper::getFromUnoTunnel<dbase::ODbaseIndex>(_xIndex); auto pIndex = dynamic_cast<dbase::ODbaseIndex*>(_xIndex.get());
if(pIndex) if(pIndex)
{ {
std::unique_ptr<dbase::OIndexIterator> pIter = pIndex->createIterator(); std::unique_ptr<dbase::OIndexIterator> pIter = pIndex->createIterator();

View File

@ -761,24 +761,10 @@ Any SAL_CALL ODbaseTable::queryInterface( const Type & rType )
return Any(); return Any();
Any aRet = OTable_TYPEDEF::queryInterface(rType); Any aRet = OTable_TYPEDEF::queryInterface(rType);
return aRet.hasValue() ? aRet : ::cppu::queryInterface(rType,static_cast< css::lang::XUnoTunnel*> (this)); return aRet;
} }
const Sequence< sal_Int8 > & ODbaseTable::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
// css::lang::XUnoTunnel
sal_Int64 ODbaseTable::getSomething( const Sequence< sal_Int8 > & rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<ODbaseTable_BASE>{});
}
bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool bRetrieveData) bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool bRetrieveData)
{ {
if (!m_pBuffer) if (!m_pBuffer)
@ -1597,9 +1583,7 @@ bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
{ {
xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName; xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName;
Reference<XUnoTunnel> xTunnel(xIndex,UNO_QUERY); ODbaseIndex* pIndex = dynamic_cast<ODbaseIndex*>(xIndex.get());
OSL_ENSURE(xTunnel.is(),"No TunnelImplementation!");
ODbaseIndex* pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(xTunnel);
assert(pIndex && "ODbaseTable::DeleteRow: No Index returned!"); assert(pIndex && "ODbaseTable::DeleteRow: No Index returned!");
OSQLColumns::const_iterator aIter = std::find_if(_rCols.begin(), _rCols.end(), OSQLColumns::const_iterator aIter = std::find_if(_rCols.begin(), _rCols.end(),
@ -1703,9 +1687,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
continue; continue;
else else
{ {
Reference<XUnoTunnel> xTunnel(xIndex,UNO_QUERY); ODbaseIndex* pIndex = dynamic_cast<ODbaseIndex*>(xIndex.get());
OSL_ENSURE(xTunnel.is(),"No TunnelImplementation!");
ODbaseIndex* pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(xTunnel);
assert(pIndex && "ODbaseTable::UpdateBuffer: No Index returned!"); assert(pIndex && "ODbaseTable::UpdateBuffer: No Index returned!");
if (pIndex->Find(0,*rRow[nPos])) if (pIndex->Find(0,*rRow[nPos]))
@ -1811,9 +1793,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
} }
if (aIndexedCols[i].is()) if (aIndexedCols[i].is())
{ {
Reference<XUnoTunnel> xTunnel(aIndexedCols[i],UNO_QUERY); ODbaseIndex* pIndex = dynamic_cast<ODbaseIndex*>(aIndexedCols[i].get());
OSL_ENSURE(xTunnel.is(),"No TunnelImplementation!");
ODbaseIndex* pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(xTunnel);
assert(pIndex && "ODbaseTable::UpdateBuffer: No Index returned!"); assert(pIndex && "ODbaseTable::UpdateBuffer: No Index returned!");
// Update !! // Update !!
if (pOrgRow.is() && !thisColIsNull) if (pOrgRow.is() && !thisColIsNull)

View File

@ -65,7 +65,7 @@ Reference< XPropertySet > ODbaseTables::createDescriptor()
// XAppend // XAppend
sdbcx::ObjectType ODbaseTables::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) sdbcx::ObjectType ODbaseTables::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
{ {
auto pTable = comphelper::getFromUnoTunnel<ODbaseTable>(descriptor); auto pTable = dynamic_cast<ODbaseTable*>(descriptor.get());
if(pTable) if(pTable)
{ {
pTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),Any(_rForName)); pTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),Any(_rForName));
@ -90,7 +90,7 @@ sdbcx::ObjectType ODbaseTables::appendObject( const OUString& _rForName, const R
// XDrop // XDrop
void ODbaseTables::dropObject(sal_Int32 _nPos, const OUString& _sElementName) void ODbaseTables::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
{ {
Reference< XUnoTunnel> xTunnel; Reference< XInterface > xTunnel;
try try
{ {
xTunnel.set(getObject(_nPos),UNO_QUERY); xTunnel.set(getObject(_nPos),UNO_QUERY);
@ -103,7 +103,7 @@ void ODbaseTables::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
if ( xTunnel.is() ) if ( xTunnel.is() )
{ {
ODbaseTable* pTable = comphelper::getFromUnoTunnel<ODbaseTable>(xTunnel); ODbaseTable* pTable = dynamic_cast<ODbaseTable*>(xTunnel.get());
if(pTable) if(pTable)
pTable->DropImpl(); pTable->DropImpl();
} }

View File

@ -401,7 +401,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
xNames->getByName(*pBegin), css::uno::UNO_QUERY); xNames->getByName(*pBegin), css::uno::UNO_QUERY);
if(xTable.is()) if(xTable.is())
{ {
auto pTable = comphelper::getFromUnoTunnel<OFileTable>(xTable); auto pTable = dynamic_cast<OFileTable*>(xTable.get());
if(pTable && !pTable->isReadOnly()) if(pTable && !pTable->isReadOnly())
{ {
aRow[6] = ODatabaseMetaDataResultSet::getInsertValue(); aRow[6] = ODatabaseMetaDataResultSet::getInsertValue();

View File

@ -1528,8 +1528,7 @@ Reference< css::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInf
void OResultSet::doTableSpecials(const OSQLTable& _xTable) void OResultSet::doTableSpecials(const OSQLTable& _xTable)
{ {
Reference<css::lang::XUnoTunnel> xTunnel(_xTable, UNO_QUERY_THROW); m_pTable = dynamic_cast<OFileTable*>(_xTable.get());
m_pTable = comphelper::getFromUnoTunnel<OFileTable>(xTunnel);
assert(m_pTable.is()); assert(m_pTable.is());
} }

View File

@ -408,7 +408,7 @@ void OStatement_Base::construct(const OUString& sql)
} }
// at this moment we support only one table per select statement // at this moment we support only one table per select statement
m_pTable = comphelper::getFromUnoTunnel<OFileTable>(rTabs.begin()->second); m_pTable = dynamic_cast<OFileTable*>(rTabs.begin()->second.get());
OSL_ENSURE(m_pTable.is(),"No table!"); OSL_ENSURE(m_pTable.is(),"No table!");
if ( m_pTable.is() ) if ( m_pTable.is() )
m_xColNames = m_pTable->getColumns(); m_xColNames = m_pTable->getColumns();

View File

@ -118,20 +118,6 @@ void SAL_CALL OFileTable::disposing()
FileClose(); FileClose();
} }
const Sequence< sal_Int8 > & OFileTable::getUnoTunnelId()
{
static const comphelper::UnoIdInit s_Id;
return s_Id.getSeq();
}
// css::lang::XUnoTunnel
sal_Int64 OFileTable::getSomething( const Sequence< sal_Int8 > & rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<OTable_TYPEDEF>{});
}
void OFileTable::FileClose() void OFileTable::FileClose()
{ {
::osl::MutexGuard aGuard(m_aMutex); ::osl::MutexGuard aGuard(m_aMutex);

View File

@ -545,24 +545,10 @@ Any SAL_CALL OFlatTable::queryInterface( const Type & rType )
return Any(); return Any();
Any aRet = OTable_TYPEDEF::queryInterface(rType); Any aRet = OTable_TYPEDEF::queryInterface(rType);
return aRet.hasValue() ? aRet : ::cppu::queryInterface(rType,static_cast< css::lang::XUnoTunnel*> (this)); return aRet;
} }
const Sequence< sal_Int8 > & OFlatTable::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
// css::lang::XUnoTunnel
sal_Int64 OFlatTable::getSomething( const Sequence< sal_Int8 > & rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<OFlatTable_BASE>{});
}
bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool bRetrieveData) bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool bRetrieveData)
{ {
*(*_rRow)[0] = m_nFilePos; *(*_rRow)[0] = m_nFilePos;

View File

@ -115,19 +115,6 @@ sdbcx::OCollection* OHSQLTable::createIndexes(const ::std::vector< OUString>& _r
return new OIndexesHelper(this,m_aMutex,_rNames); return new OIndexesHelper(this,m_aMutex,_rNames);
} }
const Sequence< sal_Int8 > & OHSQLTable::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
// css::lang::XUnoTunnel
sal_Int64 OHSQLTable::getSomething( const Sequence< sal_Int8 > & rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<OTable_TYPEDEF>{});
}
// XAlterTable // XAlterTable
void SAL_CALL OHSQLTable::alterColumnByName( const OUString& colName, const Reference< XPropertySet >& descriptor ) void SAL_CALL OHSQLTable::alterColumnByName( const OUString& colName, const Reference< XPropertySet >& descriptor )

View File

@ -116,20 +116,6 @@ sdbcx::OCollection* OMySQLTable::createIndexes(const ::std::vector<OUString>& _r
return new OIndexesHelper(this, m_aMutex, _rNames); return new OIndexesHelper(this, m_aMutex, _rNames);
} }
const Sequence<sal_Int8>& OMySQLTable::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
// css::lang::XUnoTunnel
sal_Int64 OMySQLTable::getSomething(const Sequence<sal_Int8>& rId)
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<OTable_TYPEDEF>{});
}
// XAlterTable // XAlterTable
void SAL_CALL OMySQLTable::alterColumnByName(const OUString& colName, void SAL_CALL OMySQLTable::alterColumnByName(const OUString& colName,
const Reference<XPropertySet>& descriptor) const Reference<XPropertySet>& descriptor)

View File

@ -207,18 +207,6 @@ void SAL_CALL OWriterTable::disposing()
m_pWriterConnection = nullptr; m_pWriterConnection = nullptr;
} }
const uno::Sequence<sal_Int8>& OWriterTable::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
sal_Int64 OWriterTable::getSomething(const uno::Sequence<sal_Int8>& rId)
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<OWriterTable_BASE>{});
}
bool OWriterTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns& _rCols, bool bRetrieveData) bool OWriterTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns& _rCols, bool bRetrieveData)
{ {
// read the bookmark // read the bookmark

View File

@ -44,9 +44,6 @@ namespace connectivity::ado
OAdoColumn(bool _bCase,OConnection* _pConnection); OAdoColumn(bool _bCase,OConnection* _pConnection);
// ODescriptor // ODescriptor
virtual void construct() override; virtual void construct() override;
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
WpADOColumn getColumnImpl() const; WpADOColumn getColumnImpl() const;
}; };

View File

@ -45,10 +45,6 @@ namespace connectivity::ado
OAdoGroup(OCatalog* _pParent,bool _bCase, ADOGroup* _pGroup=nullptr); OAdoGroup(OCatalog* _pParent,bool _bCase, ADOGroup* _pGroup=nullptr);
OAdoGroup(OCatalog* _pParent,bool _bCase, const OUString& Name); OAdoGroup(OCatalog* _pParent,bool _bCase, const OUString& Name);
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
// XAuthorizable // XAuthorizable
virtual sal_Int32 SAL_CALL getPrivileges( const OUString& objName, sal_Int32 objType ) override; virtual sal_Int32 SAL_CALL getPrivileges( const OUString& objName, sal_Int32 objType ) override;
virtual sal_Int32 SAL_CALL getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) override; virtual sal_Int32 SAL_CALL getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) override;

View File

@ -38,9 +38,6 @@ namespace connectivity::ado
public: public:
OAdoIndex(bool _bCase, OConnection* _pConnection,ADOIndex* _pIndex); OAdoIndex(bool _bCase, OConnection* _pConnection,ADOIndex* _pIndex);
OAdoIndex(bool _bCase, OConnection* _pConnection); OAdoIndex(bool _bCase, OConnection* _pConnection);
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
WpADOIndex getImpl() const { return m_aIndex;} WpADOIndex getImpl() const { return m_aIndex;}
}; };

View File

@ -41,10 +41,6 @@ namespace connectivity::ado
OAdoKey(bool _bCase,OConnection* _pConnection,ADOKey* _pKey); OAdoKey(bool _bCase,OConnection* _pConnection,ADOKey* _pKey);
OAdoKey(bool _bCase,OConnection* _pConnection); OAdoKey(bool _bCase,OConnection* _pConnection);
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
WpADOKey getImpl() const { return m_aKey;} WpADOKey getImpl() const { return m_aKey;}
// map the update/delete rules // map the update/delete rules
static RuleEnum Map2Rule(sal_Int32 _eNum); static RuleEnum Map2Rule(sal_Int32 _eNum);

View File

@ -53,9 +53,6 @@ namespace connectivity::ado
virtual OUString SAL_CALL getName() override; virtual OUString SAL_CALL getName() override;
OUString getSchema() const { return m_SchemaName; } OUString getSchema() const { return m_SchemaName; }
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData> getMetaData() const override; virtual css::uno::Reference< css::sdbc::XDatabaseMetaData> getMetaData() const override;
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
// XRename // XRename
virtual void SAL_CALL rename( const OUString& newName ) override; virtual void SAL_CALL rename( const OUString& newName ) override;

View File

@ -48,9 +48,6 @@ namespace connectivity::ado
OAdoUser(OCatalog* _pParent,bool _bCase, ADOUser* _pUser=nullptr); OAdoUser(OCatalog* _pParent,bool _bCase, ADOUser* _pUser=nullptr);
OAdoUser(OCatalog* _pParent,bool _bCase, const OUString& Name); OAdoUser(OCatalog* _pParent,bool _bCase, const OUString& Name);
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
// XUser // XUser
virtual void SAL_CALL changePassword( const OUString& objPassword, const OUString& newPassword ) override; virtual void SAL_CALL changePassword( const OUString& objPassword, const OUString& newPassword ) override;
// XAuthorizable // XAuthorizable

View File

@ -40,10 +40,6 @@ namespace connectivity::ado
public: public:
OAdoView(bool _bCase, ADOView* _pView=nullptr); OAdoView(bool _bCase, ADOView* _pView=nullptr);
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
WpADOView getImpl() const { return m_aView;} WpADOView getImpl() const { return m_aView;}
}; };
} }

View File

@ -64,10 +64,6 @@ namespace connectivity::calc
virtual void SAL_CALL disposing() override; virtual void SAL_CALL disposing() override;
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
void construct() override; void construct() override;
}; };

View File

@ -91,10 +91,6 @@ namespace connectivity::dbase
void openIndexFile(); void openIndexFile();
virtual void refreshColumns() override; virtual void refreshColumns() override;
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
const ODbaseTable* getTable() const { return m_pTable; } const ODbaseTable* getTable() const { return m_pTable; }
const NDXHeader& getHeader() const { return m_aHeader; } const NDXHeader& getHeader() const { return m_aHeader; }
std::unique_ptr<OIndexIterator> createIterator(); std::unique_ptr<OIndexIterator> createIterator();

View File

@ -161,9 +161,6 @@ namespace connectivity::dbase
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
virtual void SAL_CALL disposing() override; virtual void SAL_CALL disposing() override;
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
// XAlterTable // XAlterTable
virtual void SAL_CALL alterColumnByName( const OUString& colName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; virtual void SAL_CALL alterColumnByName( const OUString& colName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override;
virtual void SAL_CALL alterColumnByIndex( sal_Int32 index, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; virtual void SAL_CALL alterColumnByIndex( sal_Int32 index, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override;

View File

@ -83,10 +83,6 @@ namespace connectivity::file
const OUString& getSchema() const { return m_SchemaName; } const OUString& getSchema() const { return m_SchemaName; }
bool isReadOnly() const { return !m_bWriteable; } bool isReadOnly() const { return !m_bWriteable; }
// m_pFileStream && !m_pFileStream->IsWritable(); } // m_pFileStream && !m_pFileStream->IsWritable(); }
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
sal_Int32 getFilePos() const { return m_nFilePos; } sal_Int32 getFilePos() const { return m_nFilePos; }

View File

@ -92,10 +92,6 @@ namespace connectivity::flat
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
virtual void SAL_CALL disposing() override; virtual void SAL_CALL disposing() override;
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
OUString getEntry() const; OUString getEntry() const;
}; };

View File

@ -85,9 +85,6 @@ namespace connectivity::hsqldb
// ODescriptor // ODescriptor
virtual void construct() override; virtual void construct() override;
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
//XTypeProvider //XTypeProvider

View File

@ -92,9 +92,6 @@ namespace connectivity::mysql
// ODescriptor // ODescriptor
virtual void construct() override; virtual void construct() override;
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
// XAlterTable // XAlterTable
virtual void SAL_CALL alterColumnByName( const OUString& colName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; virtual void SAL_CALL alterColumnByName( const OUString& colName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override;

View File

@ -54,10 +54,6 @@ public:
void SAL_CALL disposing() override; void SAL_CALL disposing() override;
// css::lang::XUnoTunnel
sal_Int64 SAL_CALL getSomething(const css::uno::Sequence<sal_Int8>& rId) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
void construct() override; void construct() override;
}; };

View File

@ -374,7 +374,7 @@ void SAL_CALL OCollection::appendByDescriptor( const Reference< XPropertySet >&
if ( !xNewlyCreated.is() ) if ( !xNewlyCreated.is() )
throw RuntimeException(); throw RuntimeException();
ODescriptor* pDescriptor = comphelper::getFromUnoTunnel<ODescriptor>( xNewlyCreated ); ODescriptor* pDescriptor = dynamic_cast<ODescriptor*>( xNewlyCreated.get() );
if ( pDescriptor ) if ( pDescriptor )
pDescriptor->setNew( false ); pDescriptor->setNew( false );

View File

@ -44,12 +44,6 @@ namespace connectivity::sdbcx
// css::lang::XUnoTunnel // css::lang::XUnoTunnel
sal_Int64 SAL_CALL ODescriptor::getSomething( const Sequence< sal_Int8 >& rId )
{
return comphelper::getSomethingImpl(rId, this);
}
namespace namespace
{ {
struct ResetROAttribute struct ResetROAttribute
@ -86,25 +80,11 @@ namespace connectivity::sdbcx
bool ODescriptor::isNew( const Reference< XInterface >& _rxDescriptor ) bool ODescriptor::isNew( const Reference< XInterface >& _rxDescriptor )
{ {
ODescriptor* pImplementation = comphelper::getFromUnoTunnel<ODescriptor>( _rxDescriptor ); ODescriptor* pImplementation = dynamic_cast<ODescriptor*>( _rxDescriptor.get() );
return pImplementation && pImplementation->isNew(); return pImplementation && pImplementation->isNew();
} }
const Sequence< sal_Int8 > & ODescriptor::getUnoTunnelId()
{
static const comphelper::UnoIdInit implId;
return implId.getSeq();
}
Any SAL_CALL ODescriptor::queryInterface( const Type & rType )
{
Any aRet = ::cppu::queryInterface(rType,static_cast< XUnoTunnel*> (this));
return aRet.hasValue() ? aRet : ODescriptor_PBASE::queryInterface(rType);
}
void ODescriptor::setNew(bool _bNew) void ODescriptor::setNew(bool _bNew)
{ {
m_bNew = _bNew; m_bNew = _bNew;
@ -115,8 +95,7 @@ namespace connectivity::sdbcx
{ {
::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(), ::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(),
cppu::UnoType<XFastPropertySet>::get(), cppu::UnoType<XFastPropertySet>::get(),
cppu::UnoType<XPropertySet>::get(), cppu::UnoType<XPropertySet>::get());
cppu::UnoType<XUnoTunnel>::get());
return aTypes.getTypes(); return aTypes.getTypes();
} }

View File

@ -309,18 +309,6 @@ void SAL_CALL ODBTable::alterColumnByName( const OUString& _rName, const Referen
m_xColumns->refresh(); m_xColumns->refresh();
} }
sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId )
{
return comphelper::getSomethingImpl(rId, this,
comphelper::FallbackToGetSomethingOf<OTable_Base>{});
}
const Sequence< sal_Int8 > & ODBTable::getUnoTunnelId()
{
static const comphelper::UnoIdInit s_Id;
return s_Id.getSeq();
}
Reference< XPropertySet > ODBTable::createColumnDescriptor() Reference< XPropertySet > ODBTable::createColumnDescriptor()
{ {
return new OTableColumnDescriptor( true ); return new OTableColumnDescriptor( true );

View File

@ -128,9 +128,6 @@ namespace dbaccess
// css::sdbcx::XAlterTable, // css::sdbcx::XAlterTable,
virtual void SAL_CALL alterColumnByName( const OUString& _rName, const css::uno::Reference< css::beans::XPropertySet >& _rxDescriptor ) override; virtual void SAL_CALL alterColumnByName( const OUString& _rName, const css::uno::Reference< css::beans::XPropertySet >& _rxDescriptor ) override;
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
private: private:
using OTable_Base::createArrayHelper; using OTable_Base::createArrayHelper;
using OTable_Base::getFastPropertyValue; using OTable_Base::getFastPropertyValue;

View File

@ -21,7 +21,6 @@
#define INCLUDED_CONNECTIVITY_SDBCX_VDESCRIPTOR_HXX #define INCLUDED_CONNECTIVITY_SDBCX_VDESCRIPTOR_HXX
#include <comphelper/propertycontainer.hxx> #include <comphelper/propertycontainer.hxx>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/stl_types.hxx> #include <comphelper/stl_types.hxx>
#include <connectivity/dbtoolsdllapi.hxx> #include <connectivity/dbtoolsdllapi.hxx>
@ -33,7 +32,6 @@ namespace connectivity::sdbcx
typedef ::comphelper::OPropertyContainer ODescriptor_PBASE; typedef ::comphelper::OPropertyContainer ODescriptor_PBASE;
class OOO_DLLPUBLIC_DBTOOLS ODescriptor class OOO_DLLPUBLIC_DBTOOLS ODescriptor
:public ODescriptor_PBASE :public ODescriptor_PBASE
,public css::lang::XUnoTunnel
{ {
protected: protected:
OUString m_Name; OUString m_Name;
@ -63,15 +61,9 @@ namespace connectivity::sdbcx
virtual void construct(); virtual void construct();
// XInterface
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
/// @throws css::uno::RuntimeException /// @throws css::uno::RuntimeException
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ); virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( );
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
// retrieves the ODescriptor implementation of a given UNO component, and returns its ->isNew flag // retrieves the ODescriptor implementation of a given UNO component, and returns its ->isNew flag
static bool isNew( const css::uno::Reference< css::uno::XInterface >& _rxDescriptor ); static bool isNew( const css::uno::Reference< css::uno::XInterface >& _rxDescriptor );
}; };