diff options
author | Noel Grandin <noel@peralex.com> | 2012-12-03 13:55:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2012-12-10 08:05:49 +0200 |
commit | b9a4a0b9658015a0d55c42de1f5e56941e20d268 (patch) | |
tree | d5d377f24ee3377fdf6f912415b382b2d3e85070 /dbaccess | |
parent | 9fc4553b6433fbb6565a5b946c4256c0bfe345f1 (diff) |
fdo#46808, Convert connectivity::SQLError to use XComponentContext...
...instead of comphelper::ComponentContext.
Change-Id: I40384c2d7cfcabd06506321d686dd8e7c7c5f266
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/RowSetBase.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/ContentHelper.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/documentcontainer.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/sdbtools/connection/objectnames.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppControllerGen.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 2 |
6 files changed, 11 insertions, 10 deletions
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index 8b4087d97b30..e9a12dad5ff7 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -91,7 +91,7 @@ ORowSetBase::ORowSetBase( const ::comphelper::ComponentContext& _rContext, ::cpp ,m_rBHelper(_rBHelper) ,m_pEmptyCollection( NULL ) ,m_aContext( _rContext ) - ,m_aErrors( _rContext ) + ,m_aErrors( _rContext.getUNOContext() ) ,m_nLastColumnIndex(-1) ,m_nDeletedPosition(-1) ,m_nResultSetType( ResultSetType::FORWARD_ONLY ) diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index 204cee0c1bdf..20a535f83cf4 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -69,7 +69,7 @@ OContentHelper::OContentHelper(const Reference< XMultiServiceFactory >& _xORB ,m_aPropertyChangeListeners(m_aMutex) ,m_xParentContainer(_xParentContainer) ,m_aContext( _xORB ) - ,m_aErrorHelper( m_aContext ) + ,m_aErrorHelper( m_aContext.getUNOContext() ) ,m_pImpl(_pImpl) ,m_nCommandId(0) { diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx index 54cda9269439..311263d71965 100644 --- a/dbaccess/source/core/dataaccess/documentcontainer.cxx +++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx @@ -34,6 +34,7 @@ #include "datasource.hxx" #include <comphelper/classids.hxx> #include <comphelper/mimeconfighelper.hxx> +#include <comphelper/processfactory.hxx> #include <connectivity/sqlerror.hxx> #include "core_resource.hxx" #include "core_resource.hrc" @@ -66,8 +67,8 @@ class LocalNameApproval : public IContainerApprove ::connectivity::SQLError m_aErrors; public: - LocalNameApproval( const Reference< XMultiServiceFactory >& _rxFactory ) - :m_aErrors( ::comphelper::ComponentContext( _rxFactory ) ) + LocalNameApproval( const Reference< XComponentContext >& _rxContext ) + :m_aErrors( _rxContext ) { } virtual ~LocalNameApproval() @@ -105,7 +106,7 @@ ODocumentContainer::ODocumentContainer(const Reference< XMultiServiceFactory >& registerProperty(PROPERTY_NAME, PROPERTY_ID_NAME, PropertyAttribute::BOUND | PropertyAttribute::READONLY | PropertyAttribute::CONSTRAINED, &m_pImpl->m_aProps.aTitle, ::getCppuType(&m_pImpl->m_aProps.aTitle)); - setElementApproval( PContainerApprove( new LocalNameApproval ( _xORB ) ) ); + setElementApproval( PContainerApprove( new LocalNameApproval ( comphelper::getComponentContext(_xORB) ) ) ); } ODocumentContainer::~ODocumentContainer() diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx index a4c1e5e77df9..edad066c1c1a 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.cxx +++ b/dbaccess/source/sdbtools/connection/objectnames.cxx @@ -108,7 +108,7 @@ namespace sdbtools if ( validateName( _rName ) ) return; - ::connectivity::SQLError aErrors( m_aContext ); + ::connectivity::SQLError aErrors( m_aContext.getUNOContext() ); SQLException aError( aErrors.getSQLException( ErrorCondition::DB_OBJECT_NAME_IS_USED, m_xConnection, _rName ) ); ::dbtools::DatabaseMetaData aMeta( m_xConnection ); @@ -162,7 +162,7 @@ namespace sdbtools if ( validateName( _rName ) ) return; - ::connectivity::SQLError aErrors( m_aContext ); + ::connectivity::SQLError aErrors( m_aContext.getUNOContext() ); aErrors.raiseException( ErrorCondition::DB_INVALID_SQL_NAME, m_xConnection, _rName ); } }; @@ -211,7 +211,7 @@ namespace sdbtools ::connectivity::ErrorCondition nErrorCondition = validateName_getErrorCondition( _rName ); if ( nErrorCondition != 0 ) { - ::connectivity::SQLError aErrors( m_aContext ); + ::connectivity::SQLError aErrors( m_aContext.getUNOContext() ); aErrors.raiseException( nErrorCondition, m_xConnection ); } } diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index cb846688e707..659ff0f9438b 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -449,7 +449,7 @@ void OApplicationController::impl_validateObjectTypeAndName_throw( const sal_Int // ensure we're connected if ( !isConnected() ) { - SQLError aError( getORB() ); + SQLError aError( comphelper::getComponentContext(getORB()) ); aError.raiseException( ErrorCondition::DB_NOT_CONNECTED, *this ); } diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index ccd75ae01d0d..fc7237eb1f24 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -697,7 +697,7 @@ void SbaXDataBrowserController::onStartLoading( const Reference< XLoadable >& _r // ----------------------------------------------------------------------------- void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLExceptionInfo& _rError ) { - ::connectivity::SQLError aError( getORB() ); + ::connectivity::SQLError aError( comphelper::getComponentContext(getORB()) ); ::connectivity::ErrorCode nErrorCode( aError.getErrorCode( ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED ) ); if ( ((const SQLException*)_rError)->ErrorCode == nErrorCode ) { |