tdf#39593 drop comphelper::getImplementation
Replace with comphelper::getUnoTunnelImplementation. Change-Id: I96277aa9c17532ea6e2781dbc3305b2dbaa4e5c2 Reviewed-on: https://gerrit.libreoffice.org/78733 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <com/sun/star/sdbc/DataType.hpp>
|
||||
#include <com/sun/star/sdbc/ColumnValue.hpp>
|
||||
#include <comphelper/property.hxx>
|
||||
#include <comphelper/servicehelper.hxx>
|
||||
#include <comphelper/types.hxx>
|
||||
#include <connectivity/dbexception.hxx>
|
||||
#include <algorithm>
|
||||
@@ -59,7 +60,7 @@ Reference< XPropertySet > OColumns::createDescriptor()
|
||||
// XAppend
|
||||
sdbcx::ObjectType OColumns::appendObject( const OUString&, const Reference< XPropertySet >& descriptor )
|
||||
{
|
||||
OAdoColumn* pColumn = getImplementation<OAdoColumn>( descriptor );
|
||||
OAdoColumn* pColumn = getUnoTunnelImplementation<OAdoColumn>( descriptor );
|
||||
Reference< XPropertySet > xColumn;
|
||||
if ( pColumn == nullptr )
|
||||
{
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include <com/sun/star/sdbc/XResultSet.hpp>
|
||||
#include <connectivity/sdbcx/IRefreshable.hxx>
|
||||
#include <TConnection.hxx>
|
||||
#include <comphelper/servicehelper.hxx>
|
||||
#include <comphelper/types.hxx>
|
||||
#include <connectivity/dbexception.hxx>
|
||||
#include <strings.hrc>
|
||||
@@ -57,7 +58,7 @@ Reference< XPropertySet > OGroups::createDescriptor()
|
||||
// XAppend
|
||||
sdbcx::ObjectType OGroups::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
|
||||
{
|
||||
OAdoGroup* pGroup = getImplementation<OAdoGroup>(descriptor);
|
||||
OAdoGroup* pGroup = getUnoTunnelImplementation<OAdoGroup>(descriptor);
|
||||
if ( pGroup == nullptr )
|
||||
m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_GROUP_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <com/sun/star/sdbc/XResultSet.hpp>
|
||||
#include <com/sun/star/sdbc/IndexType.hpp>
|
||||
#include <TConnection.hxx>
|
||||
#include <comphelper/servicehelper.hxx>
|
||||
#include <comphelper/types.hxx>
|
||||
#include <connectivity/dbexception.hxx>
|
||||
#include <strings.hrc>
|
||||
@@ -57,7 +58,7 @@ Reference< XPropertySet > OIndexes::createDescriptor()
|
||||
// XAppend
|
||||
sdbcx::ObjectType OIndexes::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
|
||||
{
|
||||
OAdoIndex* pIndex = getImplementation<OAdoIndex>(descriptor);
|
||||
OAdoIndex* pIndex = getUnoTunnelImplementation<OAdoIndex>(descriptor);
|
||||
if ( pIndex == nullptr )
|
||||
m_pConnection->throwGenericSQLException( STR_INVALID_INDEX_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <com/sun/star/sdbcx/KeyType.hpp>
|
||||
#include <com/sun/star/sdbc/KeyRule.hpp>
|
||||
#include <ado/AConnection.hxx>
|
||||
#include <comphelper/servicehelper.hxx>
|
||||
#include <comphelper/types.hxx>
|
||||
#include <ado/Awrapado.hxx>
|
||||
#include <connectivity/dbexception.hxx>
|
||||
@@ -57,7 +58,7 @@ Reference< XPropertySet > OKeys::createDescriptor()
|
||||
// XAppend
|
||||
sdbcx::ObjectType OKeys::appendObject( const OUString&, const Reference< XPropertySet >& descriptor )
|
||||
{
|
||||
OAdoKey* pKey = getImplementation<OAdoKey>( descriptor );
|
||||
OAdoKey* pKey = getUnoTunnelImplementation<OAdoKey>( descriptor );
|
||||
if ( pKey == nullptr)
|
||||
m_pConnection->throwGenericSQLException( STR_INVALID_KEY_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );
|
||||
|
||||
|
@@ -164,7 +164,7 @@ void SAL_CALL OAdoTable::alterColumnByName( const OUString& colName, const Refer
|
||||
checkDisposed(OTableDescriptor_BASE_TYPEDEF::rBHelper.bDisposed);
|
||||
|
||||
bool bError = true;
|
||||
OAdoColumn* pColumn = ::comphelper::getImplementation<OAdoColumn>(descriptor);
|
||||
OAdoColumn* pColumn = comphelper::getUnoTunnelImplementation<OAdoColumn>(descriptor);
|
||||
if(pColumn != nullptr)
|
||||
{
|
||||
WpADOColumns aColumns = m_aTable.get_Columns();
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include <ado/AConnection.hxx>
|
||||
#include <ado/Awrapado.hxx>
|
||||
#include <TConnection.hxx>
|
||||
#include <comphelper/servicehelper.hxx>
|
||||
#include <comphelper/types.hxx>
|
||||
#include <cppuhelper/interfacecontainer.h>
|
||||
#include <connectivity/dbexception.hxx>
|
||||
@@ -64,7 +65,7 @@ Reference< XPropertySet > OTables::createDescriptor()
|
||||
// XAppend
|
||||
sdbcx::ObjectType OTables::appendObject( const OUString&, const Reference< XPropertySet >& descriptor )
|
||||
{
|
||||
OAdoTable* pTable = getImplementation<OAdoTable>( descriptor );
|
||||
OAdoTable* pTable = getUnoTunnelImplementation<OAdoTable>( descriptor );
|
||||
if ( pTable == nullptr )
|
||||
m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_TABLE_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <com/sun/star/sdbc/XRow.hpp>
|
||||
#include <com/sun/star/sdbc/XResultSet.hpp>
|
||||
#include <connectivity/sdbcx/IRefreshable.hxx>
|
||||
#include <comphelper/servicehelper.hxx>
|
||||
#include <comphelper/types.hxx>
|
||||
#include <connectivity/dbexception.hxx>
|
||||
#include <strings.hrc>
|
||||
@@ -55,7 +56,7 @@ Reference< XPropertySet > OUsers::createDescriptor()
|
||||
// XAppend
|
||||
sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
|
||||
{
|
||||
OUserExtend* pUser = getImplementation<OUserExtend>( descriptor );
|
||||
OUserExtend* pUser = getUnoTunnelImplementation<OUserExtend>( descriptor );
|
||||
if ( pUser == nullptr )
|
||||
m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_USER_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <ado/AConnection.hxx>
|
||||
#include <ado/Awrapado.hxx>
|
||||
#include <TConnection.hxx>
|
||||
#include <comphelper/servicehelper.hxx>
|
||||
#include <comphelper/types.hxx>
|
||||
#include <connectivity/dbexception.hxx>
|
||||
#include <strings.hrc>
|
||||
@@ -59,7 +60,7 @@ Reference< XPropertySet > OViews::createDescriptor()
|
||||
// XAppend
|
||||
sdbcx::ObjectType OViews::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
|
||||
{
|
||||
OAdoView* pView = getImplementation<OAdoView>( descriptor );
|
||||
OAdoView* pView = getUnoTunnelImplementation<OAdoView>( descriptor );
|
||||
if ( pView == nullptr )
|
||||
m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_VIEW_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );
|
||||
|
||||
|
@@ -51,16 +51,6 @@ namespace comphelper
|
||||
}
|
||||
}
|
||||
|
||||
template <class TYPE>
|
||||
TYPE* getImplementation(const css::uno::Reference< css::uno::XInterface >& _rxIFace)
|
||||
{
|
||||
css::uno::Reference< css::lang::XUnoTunnel > xTunnel(_rxIFace, css::uno::UNO_QUERY);
|
||||
if (xTunnel.is())
|
||||
return reinterpret_cast< TYPE* >(xTunnel->getSomething(TYPE::getUnoTunnelId()));
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
/** get a css::awt::FontDescriptor that is fully initialized with
|
||||
the XXX_DONTKNOW enum values (which isn't the case if you instantiate it
|
||||
|
Reference in New Issue
Block a user