diff options
author | Noel Grandin <noel@peralex.com> | 2013-03-19 13:08:47 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-03-20 07:32:53 +0200 |
commit | a066525b42a1ab8dc60e10a5d62819c259904f32 (patch) | |
tree | 0c21130ff82a482ab80de0fcc3c73be0125d06f5 /dbaccess/source/sdbtools | |
parent | 6999a50efaaf802ccd4c7eb7957af17cc32602be (diff) |
fdo#46808, Convert a bunch of comphelper::ComponentContext stuff
.. to Reference<XComponentContext>
mostly in the dbaccess module, but it also affected some other
modules.
Change-Id: I09b3f6fe7a9b33498b11d98b5521b5aeeb8882be
Diffstat (limited to 'dbaccess/source/sdbtools')
9 files changed, 29 insertions, 29 deletions
diff --git a/dbaccess/source/sdbtools/connection/connectiondependent.hxx b/dbaccess/source/sdbtools/connection/connectiondependent.hxx index 54d1eaff9a9b..4533520095d4 100644 --- a/dbaccess/source/sdbtools/connection/connectiondependent.hxx +++ b/dbaccess/source/sdbtools/connection/connectiondependent.hxx @@ -22,8 +22,8 @@ #include <com/sun/star/sdbc/XConnection.hpp> #include <com/sun/star/lang/DisposedException.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> -#include <comphelper/componentcontext.hxx> #include <cppuhelper/weakref.hxx> #include <osl/mutex.hxx> @@ -41,7 +41,7 @@ namespace sdbtools mutable ::osl::Mutex m_aMutex; ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XConnection > m_aConnection; - ::comphelper::ComponentContext + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_aContext; /** a hard reference to the connection we're working for @@ -56,14 +56,14 @@ namespace sdbtools protected: ::osl::Mutex& getMutex() const { return m_aMutex; } - const ::comphelper::ComponentContext& + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& getContext() const { return m_aContext; } protected: class EntryGuard; protected: - ConnectionDependentComponent( const ::comphelper::ComponentContext& _rContext ) + ConnectionDependentComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & _rContext ) :m_aContext( _rContext ) { } diff --git a/dbaccess/source/sdbtools/connection/connectiontools.cxx b/dbaccess/source/sdbtools/connection/connectiontools.cxx index 29798eea5769..55b6c0229dd2 100644 --- a/dbaccess/source/sdbtools/connection/connectiontools.cxx +++ b/dbaccess/source/sdbtools/connection/connectiontools.cxx @@ -59,7 +59,7 @@ namespace sdbtools //= ConnectionTools //==================================================================== //-------------------------------------------------------------------- - ConnectionTools::ConnectionTools( const ::comphelper::ComponentContext& _rContext ) + ConnectionTools::ConnectionTools( const Reference<XComponentContext>& _rContext ) :ConnectionDependentComponent( _rContext ) { } @@ -146,7 +146,7 @@ namespace sdbtools //-------------------------------------------------------------------- Reference< XInterface > SAL_CALL ConnectionTools::Create(const Reference< XComponentContext >& _rxContext ) { - return *( new ConnectionTools( ::comphelper::ComponentContext( _rxContext ) ) ); + return *( new ConnectionTools( Reference<XComponentContext>( _rxContext ) ) ); } //-------------------------------------------------------------------- diff --git a/dbaccess/source/sdbtools/connection/connectiontools.hxx b/dbaccess/source/sdbtools/connection/connectiontools.hxx index 087460e9b730..504944cb14ae 100644 --- a/dbaccess/source/sdbtools/connection/connectiontools.hxx +++ b/dbaccess/source/sdbtools/connection/connectiontools.hxx @@ -31,8 +31,6 @@ #include <cppuhelper/implbase3.hxx> -#include <comphelper/componentcontext.hxx> - //........................................................................ namespace sdbtools { @@ -59,7 +57,7 @@ namespace sdbtools @param _rxContext the context of the component */ - ConnectionTools( const ::comphelper::ComponentContext& _rContext ); + ConnectionTools( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rContext ); // XConnectionTools virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XTableName > SAL_CALL createTableName() throw (::com::sun::star::uno::RuntimeException); diff --git a/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx b/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx index 6b6d2798ec16..f5e2d0ecbfc1 100644 --- a/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx +++ b/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx @@ -34,6 +34,7 @@ namespace sdbtools using ::com::sun::star::sdbc::XConnection; using ::com::sun::star::lang::NullPointerException; using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::XComponentContext; /** === end UNO using === **/ //==================================================================== @@ -47,7 +48,7 @@ namespace sdbtools //= DataSourceMetaData //==================================================================== //-------------------------------------------------------------------- - DataSourceMetaData::DataSourceMetaData( const ::comphelper::ComponentContext& _rContext, const Reference< XConnection >& _rxConnection ) + DataSourceMetaData::DataSourceMetaData( const Reference<XComponentContext>& _rContext, const Reference< XConnection >& _rxConnection ) :ConnectionDependentComponent( _rContext ) ,m_pImpl( new DataSourceMetaData_Impl ) { diff --git a/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx b/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx index 7cddf4efd79e..fda74aa478b1 100644 --- a/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx +++ b/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx @@ -57,7 +57,7 @@ namespace sdbtools if _rxConnection is <NULL/> */ DataSourceMetaData( - const ::comphelper::ComponentContext& _rContext, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rContext, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection ); diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx index 73e305bfb675..f9cb51372f17 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.cxx +++ b/dbaccess/source/sdbtools/connection/objectnames.cxx @@ -59,6 +59,7 @@ namespace sdbtools using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::makeAny; using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::XComponentContext; /** === end UNO using === **/ namespace CommandType = ::com::sun::star::sdb::CommandType; @@ -83,12 +84,12 @@ namespace sdbtools class PlainExistenceCheck : public INameValidation { private: - const ::comphelper::ComponentContext m_aContext; + const Reference<XComponentContext> m_aContext; Reference< XConnection > m_xConnection; Reference< XNameAccess > m_xContainer; public: - PlainExistenceCheck( const ::comphelper::ComponentContext& _rContext, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxContainer ) + PlainExistenceCheck( const Reference<XComponentContext>& _rContext, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxContainer ) :m_aContext( _rContext ) ,m_xConnection( _rxConnection ) ,m_xContainer( _rxContainer ) @@ -107,7 +108,7 @@ namespace sdbtools if ( validateName( _rName ) ) return; - ::connectivity::SQLError aErrors( m_aContext.getUNOContext() ); + ::connectivity::SQLError aErrors( m_aContext ); SQLException aError( aErrors.getSQLException( ErrorCondition::DB_OBJECT_NAME_IS_USED, m_xConnection, _rName ) ); ::dbtools::DatabaseMetaData aMeta( m_xConnection ); @@ -126,11 +127,11 @@ namespace sdbtools //==================================================================== class TableValidityCheck : public INameValidation { - const ::comphelper::ComponentContext m_aContext; + const Reference<XComponentContext> m_aContext; const Reference< XConnection > m_xConnection; public: - TableValidityCheck( const ::comphelper::ComponentContext& _rContext, const Reference< XConnection >& _rxConnection ) + TableValidityCheck( const Reference<XComponentContext>& _rContext, const Reference< XConnection >& _rxConnection ) :m_aContext( _rContext ) ,m_xConnection( _rxConnection ) { @@ -161,7 +162,7 @@ namespace sdbtools if ( validateName( _rName ) ) return; - ::connectivity::SQLError aErrors( m_aContext.getUNOContext() ); + ::connectivity::SQLError aErrors( m_aContext ); aErrors.raiseException( ErrorCondition::DB_INVALID_SQL_NAME, m_xConnection, _rName ); } }; @@ -171,11 +172,11 @@ namespace sdbtools //==================================================================== class QueryValidityCheck : public INameValidation { - const ::comphelper::ComponentContext m_aContext; + const Reference<XComponentContext> m_aContext; const Reference< XConnection > m_xConnection; public: - QueryValidityCheck( const ::comphelper::ComponentContext& _rContext, const Reference< XConnection >& _rxConnection ) + QueryValidityCheck( const Reference<XComponentContext>& _rContext, const Reference< XConnection >& _rxConnection ) :m_aContext( _rContext ) ,m_xConnection( _rxConnection ) { @@ -210,7 +211,7 @@ namespace sdbtools ::connectivity::ErrorCondition nErrorCondition = validateName_getErrorCondition( _rName ); if ( nErrorCondition != 0 ) { - ::connectivity::SQLError aErrors( m_aContext.getUNOContext() ); + ::connectivity::SQLError aErrors( m_aContext ); aErrors.raiseException( nErrorCondition, m_xConnection ); } } @@ -270,7 +271,7 @@ namespace sdbtools if the given command type is neither CommandType::TABLE or CommandType::QUERY */ static PNameValidation createExistenceCheck( - const ::comphelper::ComponentContext& _rContext, + const Reference<XComponentContext>& _rContext, sal_Int32 _nCommandType, const Reference< XConnection >& _rxConnection ); @@ -293,7 +294,7 @@ namespace sdbtools if the given command type is neither CommandType::TABLE or CommandType::QUERY */ static PNameValidation createValidityCheck( - const ::comphelper::ComponentContext& _rContext, + const Reference<XComponentContext>& _rContext, const sal_Int32 _nCommandType, const Reference< XConnection >& _rxConnection ); @@ -319,7 +320,7 @@ namespace sdbtools } //-------------------------------------------------------------------- - PNameValidation NameCheckFactory::createExistenceCheck( const ::comphelper::ComponentContext& _rContext, sal_Int32 _nCommandType, const Reference< XConnection >& _rxConnection ) + PNameValidation NameCheckFactory::createExistenceCheck( const Reference<XComponentContext>& _rContext, sal_Int32 _nCommandType, const Reference< XConnection >& _rxConnection ) { verifyCommandType( _nCommandType ); @@ -356,7 +357,7 @@ namespace sdbtools } //-------------------------------------------------------------------- - PNameValidation NameCheckFactory::createValidityCheck( const ::comphelper::ComponentContext& _rContext, sal_Int32 _nCommandType, const Reference< XConnection >& _rxConnection ) + PNameValidation NameCheckFactory::createValidityCheck( const Reference<XComponentContext>& _rContext, sal_Int32 _nCommandType, const Reference< XConnection >& _rxConnection ) { verifyCommandType( _nCommandType ); @@ -391,7 +392,7 @@ namespace sdbtools //= ObjectNames //==================================================================== //-------------------------------------------------------------------- - ObjectNames::ObjectNames( const ::comphelper::ComponentContext& _rContext, const Reference< XConnection >& _rxConnection ) + ObjectNames::ObjectNames( const Reference<XComponentContext>& _rContext, const Reference< XConnection >& _rxConnection ) :ConnectionDependentComponent( _rContext ) ,m_pImpl( new ObjectNames_Impl ) { diff --git a/dbaccess/source/sdbtools/connection/objectnames.hxx b/dbaccess/source/sdbtools/connection/objectnames.hxx index 7faab22d3658..714156a9fafd 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.hxx +++ b/dbaccess/source/sdbtools/connection/objectnames.hxx @@ -24,7 +24,6 @@ #include <com/sun/star/sdb/tools/XObjectNames.hpp> -#include <comphelper/componentcontext.hxx> #include <cppuhelper/implbase1.hxx> #include <memory> @@ -60,7 +59,7 @@ namespace sdbtools if _rxConnection is <NULL/> */ ObjectNames( - const ::comphelper::ComponentContext& _rContext, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rContext, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection ); diff --git a/dbaccess/source/sdbtools/connection/tablename.cxx b/dbaccess/source/sdbtools/connection/tablename.cxx index 2c32044a4760..0bf1a31741be 100644 --- a/dbaccess/source/sdbtools/connection/tablename.cxx +++ b/dbaccess/source/sdbtools/connection/tablename.cxx @@ -51,6 +51,7 @@ namespace sdbtools using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::beans::XPropertySetInfo; + using ::com::sun::star::uno::XComponentContext; /** === end UNO using === **/ namespace CompositionType = ::com::sun::star::sdb::tools::CompositionType; @@ -73,7 +74,7 @@ namespace sdbtools //= TableName //==================================================================== //-------------------------------------------------------------------- - TableName::TableName( const ::comphelper::ComponentContext& _rContext, const Reference< XConnection >& _rxConnection ) + TableName::TableName( const Reference<XComponentContext>& _rContext, const Reference< XConnection >& _rxConnection ) :ConnectionDependentComponent( _rContext ) ,m_pImpl( new TableName_Impl ) { diff --git a/dbaccess/source/sdbtools/connection/tablename.hxx b/dbaccess/source/sdbtools/connection/tablename.hxx index 81ec29e34302..63c394a49402 100644 --- a/dbaccess/source/sdbtools/connection/tablename.hxx +++ b/dbaccess/source/sdbtools/connection/tablename.hxx @@ -59,7 +59,7 @@ namespace sdbtools if _rxConnection is <NULL/> */ TableName( - const ::comphelper::ComponentContext& _rContext, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rContext, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection ); |