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
This commit is contained in:
Noel Grandin 2013-03-19 13:08:47 +02:00
parent 6999a50efa
commit a066525b42
139 changed files with 525 additions and 543 deletions

View File

@ -101,7 +101,7 @@ void ChartTypeUnoDlg::implInitialize(const uno::Any& _rValue)
//------------------------------------------------------------------------------
Dialog* ChartTypeUnoDlg::createDialog(Window* _pParent)
{
return new ChartTypeDialog( _pParent, m_xChartModel, m_aContext.getUNOContext() );
return new ChartTypeDialog( _pParent, m_xChartModel, m_aContext );
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------

View File

@ -259,7 +259,7 @@ jclass java_sql_Connection::theClass = 0;
java_sql_Connection::java_sql_Connection( const java_sql_Driver& _rDriver )
:java_lang_Object()
,OSubComponent<java_sql_Connection, java_sql_Connection_BASE>((::cppu::OWeakObject*)(&_rDriver), this)
,m_xContext( _rDriver.getContext().getUNOContext() )
,m_xContext( _rDriver.getContext() )
,m_pDriver( &_rDriver )
,m_pDriverobject(NULL)
,m_pDriverClassLoader()
@ -470,7 +470,7 @@ Reference< XStatement > SAL_CALL java_sql_Connection::createStatement( ) throw(
{
try
{
OSQLParser aParser( m_pDriver->getContext().getUNOContext() );
OSQLParser aParser( m_pDriver->getContext() );
::rtl::OUString sErrorMessage;
::rtl::OUString sNewSql;
OSQLParseNode* pNode = aParser.parseTree(sErrorMessage,_sSQL);
@ -702,7 +702,7 @@ void java_sql_Connection::loadDriverFromProperties( const ::rtl::OUString& _sDri
LocalRef< jobject > driverClassLoader(t.env());
loadClass(
m_pDriver->getContext().getUNOContext(),
m_pDriver->getContext(),
t.env(), _sDriverClassPath, _sDriverClass, &driverClassLoader, &driverClass );
m_pDriverClassLoader.set( driverClassLoader );
@ -759,7 +759,7 @@ void java_sql_Connection::loadDriverFromProperties( const ::rtl::OUString& _sDri
{
static const ::rtl::OUString s_sNodeName("org.openoffice.Office.DataAccess/JDBC/DriverClassPaths");
::utl::OConfigurationTreeRoot aNamesRoot = ::utl::OConfigurationTreeRoot::createWithComponentContext(
m_pDriver->getContext().getUNOContext(), s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
m_pDriver->getContext(), s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
::rtl::OUString sURL;
if ( aNamesRoot.isValid() && aNamesRoot.hasByName( _sDriverClass ) )
{

View File

@ -30,7 +30,7 @@
#include "resource/jdbc_log.hrc"
#include "resource/common_res.hrc"
#include "resource/sharedresources.hxx"
#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
using namespace connectivity;
using namespace ::com::sun::star::uno;
@ -40,9 +40,9 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
// -------------------------------------------------------------------------
java_sql_Driver::java_sql_Driver(const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory)
:m_aContext( _rxFactory )
,m_aLogger( m_aContext.getUNOContext(), "sdbcl", "org.openoffice.sdbc.jdbcBridge" )
java_sql_Driver::java_sql_Driver(const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext)
:m_aContext( _rxContext )
,m_aLogger( _rxContext, "sdbcl", "org.openoffice.sdbc.jdbcBridge" )
{
}
// --------------------------------------------------------------------------------
@ -68,7 +68,7 @@ Sequence< ::rtl::OUString > java_sql_Driver::getSupportedServiceNames_Static( )
//------------------------------------------------------------------
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::java_sql_Driver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception )
{
return *(new java_sql_Driver(_rxFactory));
return *(new java_sql_Driver( comphelper::getComponentContext(_rxFactory)));
}
// --------------------------------------------------------------------------------
::rtl::OUString SAL_CALL java_sql_Driver::getImplementationName( ) throw(RuntimeException)

View File

@ -24,10 +24,8 @@
#include "java/lang/Object.hxx"
#include <cppuhelper/implbase2.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/logging.hxx>
#include <comphelper/componentcontext.hxx>
namespace connectivity
{
@ -35,14 +33,14 @@ namespace connectivity
class java_sql_Driver : public ::cppu::WeakImplHelper2< ::com::sun::star::sdbc::XDriver,::com::sun::star::lang::XServiceInfo>
{
::comphelper::ComponentContext m_aContext;
css::uno::Reference<css::uno::XComponentContext> m_aContext;
::comphelper::ResourceBasedEventLogger m_aLogger;
protected:
virtual ~java_sql_Driver();
public:
java_sql_Driver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory);
java_sql_Driver(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext);
static rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static( ) throw (::com::sun::star::uno::RuntimeException);
@ -59,7 +57,7 @@ namespace connectivity
virtual sal_Int32 SAL_CALL getMajorVersion( ) throw(::com::sun::star::uno::RuntimeException) ;
virtual sal_Int32 SAL_CALL getMinorVersion( ) throw(::com::sun::star::uno::RuntimeException);
const ::comphelper::ComponentContext& getContext() const { return m_aContext; }
const css::uno::Reference<css::uno::XComponentContext>& getContext() const { return m_aContext; }
const ::comphelper::ResourceBasedEventLogger& getLogger() const { return m_aLogger; }
};

View File

@ -30,6 +30,7 @@
#include <tools/diagnose_ex.h>
#include <comphelper/extract.hxx>
#include <comphelper/stl_types.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/weakref.hxx>
#include <osl/diagnose.h>
@ -534,8 +535,7 @@ Sequence< ::rtl::OUString > SAL_CALL OSDBCDriverManager::getSupportedServiceName
//--------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OSDBCDriverManager::Create( const Reference< XMultiServiceFactory >& _rxFactory )
{
::comphelper::ComponentContext aContext( _rxFactory );
return *( new OSDBCDriverManager( aContext.getUNOContext() ) );
return *( new OSDBCDriverManager( comphelper::getComponentContext(_rxFactory) ) );
}
//--------------------------------------------------------------------------

View File

@ -286,7 +286,6 @@
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <comphelper/basicio.hxx>
#include <comphelper/classids.hxx>
#include <comphelper/componentcontext.hxx>
#include <comphelper/containermultiplexer.hxx>
#include <comphelper/enumhelper.hxx>
#include <comphelper/extract.hxx>

View File

@ -84,14 +84,14 @@ namespace
DBG_NAME(OptimisticSet)
OptimisticSet::OptimisticSet(const ::comphelper::ComponentContext& _rContext,
OptimisticSet::OptimisticSet(const Reference<XComponentContext>& _rContext,
const Reference< XConnection>& i_xConnection,
const Reference< XSingleSelectQueryAnalyzer >& _xComposer,
const ORowSetValueVector& _aParameterValueForCache,
sal_Int32 i_nMaxRows,
sal_Int32& o_nRowCount)
:OKeySet(NULL,NULL,::rtl::OUString(),_xComposer,_aParameterValueForCache,i_nMaxRows,o_nRowCount)
,m_aSqlParser( _rContext.getUNOContext() )
,m_aSqlParser( _rContext )
,m_aSqlIterator( i_xConnection, Reference<XTablesSupplier>(_xComposer,UNO_QUERY)->getTables(), m_aSqlParser, NULL )
,m_bResultSetChanged(false)
{

View File

@ -29,7 +29,6 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp>
#include <comphelper/stl_types.hxx>
#include <comphelper/componentcontext.hxx>
namespace dbaccess
{
@ -53,7 +52,7 @@ namespace dbaccess
virtual void makeNewStatement( );
virtual ~OptimisticSet();
public:
OptimisticSet(const ::comphelper::ComponentContext& _rContext,
OptimisticSet(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& i_xConnection,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryAnalyzer >& _xComposer,
const ORowSetValueVector& _aParameterValueForCache,

View File

@ -56,7 +56,7 @@
#include <com/sun/star/uno/XNamingService.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/property.hxx>
@ -130,12 +130,12 @@ namespace dbaccess
Reference< XInterface > ORowSet_CreateInstance(const Reference< XMultiServiceFactory >& _rxFactory)
{
return *(new ORowSet(_rxFactory));
return *(new ORowSet( comphelper::getComponentContext(_rxFactory) ));
}
ORowSet::ORowSet( const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB )
ORowSet::ORowSet( const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext )
:ORowSet_BASE1(m_aMutex)
,ORowSetBase( _rxORB, ORowSet_BASE1::rBHelper, &m_aMutex )
,ORowSetBase( _rxContext, ORowSet_BASE1::rBHelper, &m_aMutex )
,m_pParameters( NULL )
,m_aRowsetListeners(*m_pMutex)
,m_aApproveListeners(*m_pMutex)
@ -509,8 +509,7 @@ Sequence< OUString > SAL_CALL ORowSet::getSupportedServiceNames( ) throw(Runtim
Reference< XInterface > ORowSet::Create(const Reference< XComponentContext >& _rxContext)
{
::comphelper::ComponentContext aContext( _rxContext );
return ORowSet_CreateInstance( aContext.getLegacyServiceFactory() );
return *(new ORowSet( _rxContext ));
}
// OComponentHelper
@ -1464,7 +1463,7 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl
calcConnection( _rxHandler );
m_bRebuildConnOnExecute = sal_False;
Reference< XSingleSelectQueryComposer > xComposer = getCurrentSettingsComposer( this, m_aContext.getUNOContext() );
Reference< XSingleSelectQueryComposer > xComposer = getCurrentSettingsComposer( this, m_aContext );
Reference<XParametersSupplier> xParameters(xComposer, UNO_QUERY);
Reference<XIndexAccess> xParamsAsIndicies = xParameters.is() ? xParameters->getParameters() : Reference<XIndexAccess>();
@ -2159,7 +2158,7 @@ Reference< XConnection > ORowSet::calcConnection(const Reference< XInteractionH
Reference< XConnection > xNewConn;
if ( !m_aDataSourceName.isEmpty() )
{
Reference< XDatabaseContext > xDatabaseContext( DatabaseContext::create(m_aContext.getUNOContext()) );
Reference< XDatabaseContext > xDatabaseContext( DatabaseContext::create(m_aContext) );
try
{
Reference< XDataSource > xDataSource( xDatabaseContext->getByName( m_aDataSourceName ), UNO_QUERY_THROW );
@ -2721,7 +2720,7 @@ void ORowSet::impl_rebuild_throw(::osl::ResettableMutexGuard& _rGuard)
// ***********************************************************
DBG_NAME(ORowSetClone);
ORowSetClone::ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORowSet& rParent, ::osl::Mutex* _pMutex )
ORowSetClone::ORowSetClone( const Reference<XComponentContext>& _rContext, ORowSet& rParent, ::osl::Mutex* _pMutex )
:OSubComponent(m_aMutex, rParent)
,ORowSetBase( _rContext, OComponentHelper::rBHelper, _pMutex )
,m_pParent(&rParent)

View File

@ -243,7 +243,7 @@ namespace dbaccess
virtual ~ORowSet();
public:
ORowSet(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
ORowSet(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
// com::sun::star::lang::XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException);
@ -475,7 +475,7 @@ namespace dbaccess
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const ::com::sun::star::uno::Any& rValue) throw (::com::sun::star::uno::Exception);
public:
ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORowSet& rParent, ::osl::Mutex* _pMutex );
ORowSetClone( const css::uno::Reference<css::uno::XComponentContext>& _rContext, ORowSet& rParent, ::osl::Mutex* _pMutex );
virtual ~ORowSetClone();
// com::sun::star::lang::XTypeProvider

View File

@ -83,7 +83,7 @@ connectivity::sdbcx::ObjectType OEmptyCollection::createObject(const ::rtl::OUSt
// =========================================================================
DBG_NAME(ORowSetBase)
ORowSetBase::ORowSetBase( const ::comphelper::ComponentContext& _rContext, ::cppu::OBroadcastHelper& _rBHelper, ::osl::Mutex* _pMutex )
ORowSetBase::ORowSetBase( const Reference<XComponentContext>& _rContext, ::cppu::OBroadcastHelper& _rBHelper, ::osl::Mutex* _pMutex )
:OPropertyStateContainer(_rBHelper)
,m_pMutex(_pMutex)
,m_pCache(NULL)
@ -91,7 +91,7 @@ ORowSetBase::ORowSetBase( const ::comphelper::ComponentContext& _rContext, ::cpp
,m_rBHelper(_rBHelper)
,m_pEmptyCollection( NULL )
,m_aContext( _rContext )
,m_aErrors( _rContext.getUNOContext() )
,m_aErrors( _rContext )
,m_nLastColumnIndex(-1)
,m_nDeletedPosition(-1)
,m_nResultSetType( ResultSetType::FORWARD_ONLY )

View File

@ -41,7 +41,6 @@
#include <comphelper/broadcasthelper.hxx>
#include "RowSetCacheIterator.hxx"
#include "core_resource.hxx"
#include <comphelper/componentcontext.hxx>
#include <functional>
@ -97,7 +96,7 @@ namespace dbaccess
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatTypes> m_xNumberFormatTypes;
OEmptyCollection* m_pEmptyCollection;
::comphelper::ComponentContext m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_aContext;
::connectivity::SQLError m_aErrors;
sal_Int32 m_nLastColumnIndex; // the last column ask for, used for wasNull()
@ -112,7 +111,7 @@ namespace dbaccess
protected:
ORowSetBase(
const ::comphelper::ComponentContext& _rContext,
const css::uno::Reference<css::uno::XComponentContext>& _rContext,
::cppu::OBroadcastHelper& _rBHelper,
::osl::Mutex* _pMutex
);

View File

@ -82,7 +82,7 @@ DBG_NAME(ORowSetCache)
ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
const Reference< XSingleSelectQueryAnalyzer >& _xAnalyzer,
const ::comphelper::ComponentContext& _rContext,
const Reference<XComponentContext>& _rContext,
const ::rtl::OUString& _rUpdateTableName,
sal_Bool& _bModified,
sal_Bool& _bNew,
@ -1580,7 +1580,7 @@ sal_Bool ORowSetCache::checkJoin(const Reference< XConnection>& _xConnection,
sal_Bool bOk = sal_False;
::rtl::OUString sSql = _xAnalyzer->getQuery();
::rtl::OUString sErrorMsg;
::connectivity::OSQLParser aSqlParser( m_aContext.getUNOContext() );
::connectivity::OSQLParser aSqlParser( m_aContext );
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr< ::connectivity::OSQLParseNode> pSqlParseNode( aSqlParser.parseTree(sErrorMsg,sSql));
SAL_WNODEPRECATED_DECLARATIONS_POP

View File

@ -37,7 +37,6 @@
#include <com/sun/star/sdbcx/XDeleteRows.hpp>
#include <cppuhelper/compbase11.hxx>
#include <comphelper/propertycontainer.hxx>
#include <comphelper/componentcontext.hxx>
#include <cppuhelper/implbase5.hxx>
#include <comphelper/proparrhlp.hxx>
#include "RowSetRow.hxx"
@ -64,7 +63,7 @@ namespace dbaccess
//the set can be static, bookmarkable or keyset
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XResultSet> m_xSet;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData; // must be before m_aInsertRow
::comphelper::ComponentContext m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow> m_xCacheSet;
@ -137,7 +136,7 @@ namespace dbaccess
public:
ORowSetCache(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& _xRs,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryAnalyzer >& _xAnalyzer,
const ::comphelper::ComponentContext& _rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rContext,
const ::rtl::OUString& _rUpdateTableName,
sal_Bool& _bModified,
sal_Bool& _bNew,

View File

@ -223,10 +223,10 @@ DBG_NAME(OSingleSelectQueryComposer)
OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAccess>& _rxTables,
const Reference< XConnection>& _xConnection,
const ::comphelper::ComponentContext& _rContext )
const Reference<XComponentContext>& _rContext )
:OSubComponent(m_aMutex,_xConnection)
,OPropertyContainer(m_aBHelper)
,m_aSqlParser( _rContext.getUNOContext() )
,m_aSqlParser( _rContext )
,m_aSqlIterator( _xConnection, _rxTables, m_aSqlParser, NULL )
,m_aAdditiveIterator( _xConnection, _rxTables, m_aSqlParser, NULL )
,m_aElementaryParts( (size_t)SQLPartCount )
@ -249,8 +249,8 @@ OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAcc
m_aCurrentColumns.resize(4);
m_aLocale = SvtSysLocale().GetLanguageTag().getLocale();
m_xNumberFormatsSupplier = dbtools::getNumberFormats( m_xConnection, sal_True, m_aContext.getUNOContext() );
Reference< XLocaleData4 > xLocaleData( LocaleData::create(m_aContext.getUNOContext()) );
m_xNumberFormatsSupplier = dbtools::getNumberFormats( m_xConnection, sal_True, m_aContext );
Reference< XLocaleData4 > xLocaleData( LocaleData::create(m_aContext) );
LocaleDataItem aData = xLocaleData->getLocaleItem(m_aLocale);
m_sDecimalSep = aData.decimalSeparator;
OSL_ENSURE(m_sDecimalSep.getLength() == 1,"OSingleSelectQueryComposer::OSingleSelectQueryComposer decimal separator is not 1 length");
@ -1507,14 +1507,14 @@ namespace
void SAL_CALL OSingleSelectQueryComposer::setStructuredFilter( const Sequence< Sequence< PropertyValue > >& filter ) throw (SQLException, ::com::sun::star::lang::IllegalArgumentException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setStructuredFilter" );
OPredicateInputController aPredicateInput(m_aContext.getUNOContext(),m_xConnection);
OPredicateInputController aPredicateInput(m_aContext, m_xConnection);
setFilter(lcl_getCondition(filter,aPredicateInput,getColumns()));
}
void SAL_CALL OSingleSelectQueryComposer::setStructuredHavingClause( const Sequence< Sequence< PropertyValue > >& filter ) throw (SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setStructuredHavingClause" );
OPredicateInputController aPredicateInput(m_aContext.getUNOContext(),m_xConnection);
OPredicateInputController aPredicateInput(m_aContext, m_xConnection);
setHavingClause(lcl_getCondition(filter,aPredicateInput,getColumns()));
}
@ -1583,7 +1583,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
if ( aValue.hasValue() )
{
if( !m_xTypeConverter.is() )
m_xTypeConverter.set( Converter::create(m_aContext.getUNOContext()) );
m_xTypeConverter.set( Converter::create(m_aContext) );
OSL_ENSURE(m_xTypeConverter.is(),"NO typeconverter!");
if ( nType != DataType::BOOLEAN && DataType::BIT != nType )
@ -1736,7 +1736,7 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
if ( pCondition )
{
::std::vector< ::std::vector < PropertyValue > > aFilters;
Reference< XNumberFormatter > xFormatter( NumberFormatter::create(m_aContext.getUNOContext()), UNO_QUERY_THROW );
Reference< XNumberFormatter > xFormatter( NumberFormatter::create(m_aContext), UNO_QUERY_THROW );
xFormatter->attachNumberFormatsSupplier( m_xNumberFormatsSupplier );
if (setORCriteria(pCondition, m_aAdditiveIterator, aFilters, xFormatter))

View File

@ -73,7 +73,7 @@ DBG_NAME(OQuery)
OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition
,const Reference< XConnection >& _rxConn
,const Reference< XMultiServiceFactory >& _xORB)
,const Reference< XComponentContext >& _xORB)
:OContentHelper(_xORB,NULL,TContentPtr(new OContentHelper_Impl))
,OQueryDescriptor_Base(m_aMutex,*this)
,ODataSettings(OContentHelper::rBHelper,sal_True)

View File

@ -100,7 +100,7 @@ public:
OQuery(
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxCommandDefinition,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn,
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB
);
// com::sun::star::lang::XTypeProvider

View File

@ -66,7 +66,7 @@ DBG_NAME(OQueryContainer)
OQueryContainer::OQueryContainer(
const Reference< XNameContainer >& _rxCommandDefinitions
, const Reference< XConnection >& _rxConn
, const Reference< XMultiServiceFactory >& _rxORB,
, const Reference< XComponentContext >& _rxORB,
::dbtools::IWarningsContainer* _pWarnings)
:ODefinitionContainer(_rxORB,NULL,TContentPtr(new ODefinitionContainer_Impl))
,m_pWarnings( _pWarnings )
@ -154,7 +154,9 @@ void SAL_CALL OQueryContainer::appendByDescriptor( const Reference< XPropertySet
throw DisposedException( ::rtl::OUString(), *this );
// first clone this object's CommandDefinition part
Reference< XPropertySet > xCommandDefinitionPart( m_aContext.createComponent( (::rtl::OUString)SERVICE_SDB_QUERYDEFINITION ), UNO_QUERY_THROW );
Reference< XPropertySet > xCommandDefinitionPart(
m_aContext->getServiceManager()->createInstanceWithContext( SERVICE_SDB_QUERYDEFINITION, m_aContext),
UNO_QUERY_THROW );
::comphelper::copyProperties( _rxDesc, xCommandDefinitionPart );
// TODO : the columns part of the descriptor has to be copied
@ -343,11 +345,11 @@ Reference< XContent > OQueryContainer::implCreateWrapper(const Reference< XConte
Reference< XContent > xReturn;
if ( xContainer .is() )
{
xReturn = new OQueryContainer( xContainer, m_xConnection, m_aContext.getLegacyServiceFactory(), m_pWarnings );
xReturn = new OQueryContainer( xContainer, m_xConnection, m_aContext, m_pWarnings );
}
else
{
OQuery* pNewObject = new OQuery( Reference< XPropertySet >( _rxCommandDesc, UNO_QUERY ), m_xConnection, m_aContext.getLegacyServiceFactory() );
OQuery* pNewObject = new OQuery( Reference< XPropertySet >( _rxCommandDesc, UNO_QUERY ), m_xConnection, m_aContext );
xReturn = pNewObject;
pNewObject->setWarningsContainer( m_pWarnings );

View File

@ -31,7 +31,6 @@
#include <comphelper/property.hxx>
#include "definitioncolumn.hxx"
#include <cppuhelper/implbase1.hxx>
#include <comphelper/componentcontext.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdbc;
@ -126,7 +125,7 @@ void OComponentDefinition::registerProperties()
}
}
OComponentDefinition::OComponentDefinition(const Reference< XMultiServiceFactory >& _xORB
OComponentDefinition::OComponentDefinition(const Reference< XComponentContext >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl
,sal_Bool _bTable)
@ -146,7 +145,7 @@ OComponentDefinition::~OComponentDefinition()
OComponentDefinition::OComponentDefinition( const Reference< XInterface >& _rxContainer
,const ::rtl::OUString& _rElementName
,const Reference< XMultiServiceFactory >& _xORB
,const Reference< XComponentContext >& _xORB
,const TContentPtr& _pImpl
,sal_Bool _bTable)
:OContentHelper(_xORB,_rxContainer,_pImpl)
@ -190,8 +189,7 @@ Sequence< ::rtl::OUString > SAL_CALL OComponentDefinition::getSupportedServiceNa
Reference< XInterface > OComponentDefinition::Create( const Reference< XComponentContext >& _rxContext )
{
::comphelper::ComponentContext aContext( _rxContext );
return *(new OComponentDefinition( aContext.getLegacyServiceFactory(), NULL, TContentPtr( new OComponentDefinition_Impl ) ) );
return *(new OComponentDefinition( _rxContext, NULL, TContentPtr( new OComponentDefinition_Impl ) ) );
}
void SAL_CALL OComponentDefinition::disposing()

View File

@ -103,7 +103,7 @@ protected:
protected:
OComponentDefinition(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&
OComponentDefinition(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer
,const TContentPtr& _pImpl
,sal_Bool _bTable = sal_True);
@ -115,7 +115,7 @@ public:
OComponentDefinition(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContainer
,const ::rtl::OUString& _rElementName
,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
,const TContentPtr& _pImpl
,sal_Bool _bTable = sal_True
);

View File

@ -61,15 +61,15 @@ OContentHelper_Impl::~OContentHelper_Impl()
DBG_DTOR(OContentHelper_Impl,NULL);
}
OContentHelper::OContentHelper(const Reference< XMultiServiceFactory >& _xORB
OContentHelper::OContentHelper(const Reference< XComponentContext >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl)
: OContentHelper_COMPBASE(m_aMutex)
,m_aContentListeners(m_aMutex)
,m_aPropertyChangeListeners(m_aMutex)
,m_xParentContainer(_xParentContainer)
,m_xParentContainer( _xParentContainer )
,m_aContext( _xORB )
,m_aErrorHelper( m_aContext.getUNOContext() )
,m_aErrorHelper( m_aContext )
,m_pImpl(_pImpl)
,m_nCommandId(0)
{
@ -423,7 +423,7 @@ Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >&
{
// Note: Empty sequence means "get values of all supported properties".
rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( m_aContext.getUNOContext() );
rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( m_aContext );
sal_Int32 nCount = rProperties.getLength();
if ( nCount )

View File

@ -403,7 +403,7 @@ void SAL_CALL DocumentStorageAccess::disposing( const css::lang::EventObject& So
//============================================================
DBG_NAME(ODatabaseModelImpl)
ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XMultiServiceFactory >& _rxFactory, ODatabaseContext& _rDBContext )
ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XComponentContext >& _rxContext, ODatabaseContext& _rDBContext )
:m_xModel()
,m_xDataSource()
,m_pStorageAccess( NULL )
@ -417,7 +417,7 @@ ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XMultiServiceFactory >&
,m_aEmbeddedMacros()
,m_bModificationLock( false )
,m_bDocumentInitialized( false )
,m_aContext( _rxFactory )
,m_aContext( _rxContext )
,m_nLoginTimeout(0)
,m_bReadOnly(sal_False)
,m_bPasswordRequired(sal_False)
@ -437,7 +437,7 @@ ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XMultiServiceFactory >&
ODatabaseModelImpl::ODatabaseModelImpl(
const ::rtl::OUString& _rRegistrationName,
const Reference< XMultiServiceFactory >& _rxFactory,
const Reference< XComponentContext >& _rxContext,
ODatabaseContext& _rDBContext
)
:m_xModel()
@ -453,7 +453,7 @@ ODatabaseModelImpl::ODatabaseModelImpl(
,m_aEmbeddedMacros()
,m_bModificationLock( false )
,m_bDocumentInitialized( false )
,m_aContext( _rxFactory )
,m_aContext( _rxContext )
,m_sName(_rRegistrationName)
,m_nLoginTimeout(0)
,m_bReadOnly(sal_False)
@ -492,7 +492,7 @@ void ODatabaseModelImpl::impl_construct_nothrow()
aInitArgs[0] <<= NamedValue("AutomaticAddition", makeAny( (sal_Bool)sal_True ));
aInitArgs[1] <<= NamedValue("AllowedTypes", makeAny( aAllowedTypes ));
m_xSettings.set( m_aContext.createComponentWithArguments( "com.sun.star.beans.PropertyBag", aInitArgs ), UNO_QUERY_THROW );
m_xSettings.set( m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.beans.PropertyBag", aInitArgs, m_aContext), UNO_QUERY_THROW );
// insert the default settings
Reference< XPropertyContainer > xContainer( m_xSettings, UNO_QUERY_THROW );
@ -757,7 +757,7 @@ const Reference< XNumberFormatsSupplier > & ODatabaseModelImpl::getNumberFormats
UserInformation aUserInfo;
Locale aLocale = aUserInfo.getUserLanguage();
m_xNumberFormatsSupplier.set( NumberFormatsSupplier::createWithLocale( m_aContext.getUNOContext(), aLocale ) );
m_xNumberFormatsSupplier.set( NumberFormatsSupplier::createWithLocale( m_aContext, aLocale ) );
}
return m_xNumberFormatsSupplier;
}
@ -810,7 +810,7 @@ void ODatabaseModelImpl::disposeStorages() SAL_THROW(())
Reference< XSingleServiceFactory > ODatabaseModelImpl::createStorageFactory() const
{
return StorageFactory::create( m_aContext.getUNOContext() );
return StorageFactory::create( m_aContext );
}
void ODatabaseModelImpl::commitRootStorage()
@ -828,7 +828,7 @@ Reference< XStorage > ODatabaseModelImpl::getOrCreateRootStorage()
{
if ( !m_xDocumentStorage.is() )
{
Reference< XSingleServiceFactory> xStorageFactory = StorageFactory::create( m_aContext.getUNOContext() );
Reference< XSingleServiceFactory> xStorageFactory = StorageFactory::create( m_aContext );
Any aSource;
aSource = m_aMediaDescriptor.get( "Stream" );
if ( !aSource.hasValue() )
@ -965,7 +965,7 @@ Reference< XModel > ODatabaseModelImpl::createNewModel_deliverOwnership( bool _b
try
{
Reference< XGlobalEventBroadcaster > xModelCollection = GlobalEventBroadcaster::create( m_aContext.getUNOContext() );
Reference< XGlobalEventBroadcaster > xModelCollection = GlobalEventBroadcaster::create( m_aContext );
xModelCollection->insert( makeAny( xModel ) );
}
catch( const Exception& )
@ -1157,7 +1157,7 @@ Reference< XStorageBasedLibraryContainer > ODatabaseModelImpl::getLibraryContain
= _bScript ? &DocumentScriptLibraryContainer::create : &DocumentDialogLibraryContainer::create;
rxContainer.set(
(*Factory)( m_aContext.getUNOContext(), xDocument ),
(*Factory)( m_aContext, xDocument ),
UNO_QUERY_THROW
);
}

View File

@ -39,7 +39,6 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/lang/NotInitializedException.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/sdb/XBookmarksSupplier.hpp>
@ -225,7 +224,7 @@ private:
public:
OWeakConnectionArray m_aConnections;
const ::comphelper::ComponentContext m_aContext;
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_aContext;
public:
::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameAccess > m_xCommandDefinitions;
@ -277,14 +276,14 @@ public:
SAL_THROW(( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException ));
ODatabaseModelImpl(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
ODatabaseContext& _pDBContext
);
virtual ~ODatabaseModelImpl();
ODatabaseModelImpl(
const ::rtl::OUString& _rRegistrationName,
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
ODatabaseContext& _rDBContext
);

View File

@ -42,7 +42,7 @@ namespace dbaccess
//==========================================================================
DBG_NAME(OCommandContainer)
OCommandContainer::OCommandContainer( const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
OCommandContainer::OCommandContainer( const Reference< ::com::sun::star::uno::XComponentContext >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl
,sal_Bool _bTables
@ -68,8 +68,8 @@ Reference< XContent > OCommandContainer::createObject( const ::rtl::OUString& _r
const TContentPtr& pElementContent( rDefinitions.find( _rName )->second );
if ( m_bTables )
return new OComponentDefinition( *this, _rName, m_aContext.getLegacyServiceFactory(), pElementContent, m_bTables );
return new OCommandDefinition( *this, _rName, m_aContext.getLegacyServiceFactory(), pElementContent );
return new OComponentDefinition( *this, _rName, m_aContext, pElementContent, m_bTables );
return new OCommandDefinition( *this, _rName, m_aContext, pElementContent );
}
Reference< XInterface > SAL_CALL OCommandContainer::createInstanceWithArguments(const Sequence< Any >& /*aArguments*/ ) throw (Exception, RuntimeException)
@ -80,9 +80,9 @@ Reference< XInterface > SAL_CALL OCommandContainer::createInstanceWithArguments(
Reference< XInterface > SAL_CALL OCommandContainer::createInstance( ) throw (Exception, RuntimeException)
{
if(m_bTables)
return com::sun::star::sdb::TableDefinition::createDefault( m_aContext.getUNOContext() );
return com::sun::star::sdb::TableDefinition::createDefault( m_aContext );
else
return m_aContext.createComponent( (::rtl::OUString)( SERVICE_SDB_COMMAND_DEFINITION ) );
return m_aContext->getServiceManager()->createInstanceWithContext(SERVICE_SDB_COMMAND_DEFINITION, m_aContext);
}
OUString OCommandContainer::determineContentType() const

View File

@ -44,7 +44,7 @@ public:
/** constructs the container.<BR>
*/
OCommandContainer(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer
,const TContentPtr& _pImpl
,sal_Bool _bTables

View File

@ -28,7 +28,6 @@
#include <tools/debug.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/componentcontext.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdbc;
@ -73,7 +72,7 @@ void OCommandDefinition::registerProperties()
&rCommandDefinition.m_aLayoutInformation, ::getCppuType(&rCommandDefinition.m_aLayoutInformation));
}
OCommandDefinition::OCommandDefinition(const Reference< XMultiServiceFactory >& _xORB
OCommandDefinition::OCommandDefinition(const Reference< XComponentContext >& _xORB
,const Reference< XInterface >& _rxContainer
,const TContentPtr& _pImpl)
:OComponentDefinition(_xORB,_rxContainer,_pImpl,sal_False)
@ -89,7 +88,7 @@ OCommandDefinition::~OCommandDefinition()
OCommandDefinition::OCommandDefinition( const Reference< XInterface >& _rxContainer
,const ::rtl::OUString& _rElementName
,const Reference< XMultiServiceFactory >& _xORB
,const Reference< XComponentContext >& _xORB
,const TContentPtr& _pImpl)
:OComponentDefinition(_rxContainer,_rElementName,_xORB,_pImpl,sal_False)
{
@ -128,8 +127,7 @@ Sequence< ::rtl::OUString > SAL_CALL OCommandDefinition::getSupportedServiceName
Reference< XInterface > OCommandDefinition::Create(const Reference< XComponentContext >& _rxContext)
{
::comphelper::ComponentContext aContext( _rxContext );
return *(new OCommandDefinition( aContext.getLegacyServiceFactory(), NULL, TContentPtr( new OCommandDefinition_Impl ) ) );
return *(new OCommandDefinition( _rxContext, NULL, TContentPtr( new OCommandDefinition_Impl ) ) );
}
void SAL_CALL OCommandDefinition::rename( const ::rtl::OUString& newName ) throw (SQLException, ElementExistException, RuntimeException)

View File

@ -60,7 +60,7 @@ class OCommandDefinition :public OComponentDefinition
protected:
virtual ~OCommandDefinition();
OCommandDefinition(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&
OCommandDefinition(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer
,const TContentPtr& _pImpl
);
@ -73,7 +73,7 @@ public:
OCommandDefinition(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContainer
,const ::rtl::OUString& _rElementName
,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
,const TContentPtr& _pImpl
);

View File

@ -282,7 +282,7 @@ DBG_NAME(OConnection)
OConnection::OConnection(ODatabaseSource& _rDB
, Reference< XConnection >& _rxMaster
, const Reference< XMultiServiceFactory >& _rxORB)
, const Reference< XComponentContext >& _rxORB)
:OSubComponent(m_aMutex, static_cast< OWeakObject* >(&_rDB))
// as the queries reroute their refcounting to us, this m_aMutex is okey. If the queries
// container would do it's own refcounting, it would have to aquire m_pMutex
@ -305,8 +305,7 @@ OConnection::OConnection(ODatabaseSource& _rDB
try
{
Reference< XProxyFactory > xProxyFactory =
ProxyFactory::create( m_aContext.getUNOContext() );
Reference< XProxyFactory > xProxyFactory = ProxyFactory::create( m_aContext );
Reference<XAggregation> xAgg = xProxyFactory->createProxy(_rxMaster.get());
setDelegation(xAgg,m_refCount);
OSL_ENSURE(m_xConnection.is(), "OConnection::OConnection : invalid master connection !");
@ -320,7 +319,7 @@ OConnection::OConnection(ODatabaseSource& _rDB
try
{
m_xQueries = new OQueryContainer(Reference< XNameContainer >(_rDB.getQueryDefinitions( ),UNO_QUERY), this,_rxORB, &m_aWarnings);
m_xQueries = new OQueryContainer(Reference< XNameContainer >(_rDB.getQueryDefinitions(), UNO_QUERY), this, _rxORB, &m_aWarnings);
sal_Bool bCase = sal_True;
Reference<XDatabaseMetaData> xMeta;
@ -685,7 +684,11 @@ Reference< XInterface > SAL_CALL OConnection::createInstance( const OUString& _s
Sequence<Any> aArgs(1);
Reference<XConnection> xMy(this);
aArgs[0] <<= NamedValue("ActiveConnection",makeAny(xMy));
aFind = m_aSupportServices.insert(TSupportServices::value_type(_sServiceSpecifier,m_aContext.createComponentWithArguments(_sServiceSpecifier,aArgs))).first;
aFind = m_aSupportServices.insert(
TSupportServices::value_type(
_sServiceSpecifier,
m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(_sServiceSpecifier, aArgs, m_aContext)
)).first;
}
return aFind->second;
}
@ -717,7 +720,7 @@ Reference< XTablesSupplier > OConnection::getMasterTables()
{
Reference<XDatabaseMetaData> xMeta = getMetaData();
if ( xMeta.is() )
m_xMasterTables = ::dbtools::getDataDefinitionByURLAndConnection( xMeta->getURL(), m_xMasterConnection, m_aContext.getUNOContext() );
m_xMasterTables = ::dbtools::getDataDefinitionByURLAndConnection( xMeta->getURL(), m_xMasterConnection, m_aContext );
}
catch(const SQLException&)
{
@ -753,8 +756,9 @@ void OConnection::impl_loadConnectionTools_throw()
Sequence< Any > aArguments( 1 );
aArguments[0] <<= NamedValue( "Connection" , makeAny( Reference< XConnection >( this ) ) );
if ( !m_aContext.createComponentWithArguments( "com.sun.star.sdb.tools.ConnectionTools", aArguments, m_xConnectionTools ) )
throw RuntimeException( "service not registered: com.sun.star.sdb.tools.ConnectionTools" , *this );
m_xConnectionTools.set(
m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.sdb.tools.ConnectionTools", aArguments, m_aContext),
UNO_QUERY_THROW );
}
Reference< XTableName > SAL_CALL OConnection::createTableName( ) throw (RuntimeException)

View File

@ -43,7 +43,6 @@
#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 14
#include <comphelper/implbase_var.hxx>
#endif
#include <comphelper/componentcontext.hxx>
#include <comphelper/stl_types.hxx>
#include <connectivity/ConnectionWrapper.hxx>
#include <connectivity/warningscontainer.hxx>
@ -92,7 +91,7 @@ protected:
// the filter as set on the parent data link at construction of the connection
::com::sun::star::uno::Sequence< ::rtl::OUString > m_aTableFilter;
::com::sun::star::uno::Sequence< ::rtl::OUString > m_aTableTypeFilter;
::comphelper::ComponentContext m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xMasterConnection;
::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XConnectionTools > m_xConnectionTools;
::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XTableUIProvider > m_xTableUIProvider;
@ -116,7 +115,7 @@ protected:
public:
OConnection(ODatabaseSource& _rDB
,::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxMaster
,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
// com::sun::star::lang::XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException);

View File

@ -29,7 +29,6 @@
#include <com/sun/star/sdb/XDataAccessDescriptorFactory.hpp>
#include <comphelper/broadcasthelper.hxx>
#include <comphelper/componentcontext.hxx>
#include <comphelper/proparrhlp.hxx>
#include <comphelper/propertycontainer.hxx>
#include <comphelper/uno3.hxx>
@ -83,7 +82,7 @@ namespace dbaccess
,public ::comphelper::OPropertyArrayUsageHelper< DataAccessDescriptor >
{
public:
DataAccessDescriptor( const ::comphelper::ComponentContext& _rContext );
DataAccessDescriptor( const Reference<XComponentContext> & _rContext );
// UNO
DECLARE_XINTERFACE()
@ -106,7 +105,7 @@ namespace dbaccess
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
private:
::comphelper::ComponentContext m_aContext;
Reference<XComponentContext> m_xContext;
// </properties>
::rtl::OUString m_sDataSourceName;
@ -132,11 +131,11 @@ namespace dbaccess
#define REGISTER_PROPERTY( propname, member ) \
registerProperty( PROPERTY_##propname, PROPERTY_ID_##propname, PropertyAttribute::BOUND, &member, ::getCppuType( &member ) )
DataAccessDescriptor::DataAccessDescriptor( const ::comphelper::ComponentContext& _rContext )
DataAccessDescriptor::DataAccessDescriptor( const Reference<XComponentContext> & _rContext )
:DataAccessDescriptor_MutexBase()
,DataAccessDescriptor_TypeBase()
,DataAccessDescriptor_PropertyBase( m_aBHelper )
,m_aContext( _rContext )
,m_xContext( _rContext )
,m_sDataSourceName()
,m_sDatabaseLocation()
,m_sConnectionResource()
@ -248,11 +247,11 @@ namespace dbaccess
~DataAccessDescriptorFactory();
private:
::comphelper::ComponentContext m_aContext;
Reference<XComponentContext> m_xContext;
};
DataAccessDescriptorFactory::DataAccessDescriptorFactory( const Reference< XComponentContext >& _rxContext )
:m_aContext( _rxContext )
:m_xContext( _rxContext )
{
}
@ -302,7 +301,7 @@ namespace dbaccess
Reference< XPropertySet > SAL_CALL DataAccessDescriptorFactory::createDataAccessDescriptor( ) throw (RuntimeException)
{
return new DataAccessDescriptor( m_aContext );
return new DataAccessDescriptor( m_xContext );
}
} // namespace dbaccess

View File

@ -238,7 +238,7 @@ Sequence< OUString > ODatabaseContext::getSupportedServiceNames( ) throw (Runti
Reference< XInterface > ODatabaseContext::impl_createNewDataSource()
{
::rtl::Reference<ODatabaseModelImpl> pImpl( new ODatabaseModelImpl( m_aContext.getLegacyServiceFactory(), *this ) );
::rtl::Reference<ODatabaseModelImpl> pImpl( new ODatabaseModelImpl( m_aContext, *this ) );
Reference< XDataSource > xDataSource( pImpl->getOrCreateDataSource() );
return xDataSource.get();
@ -352,7 +352,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa
::rtl::Reference< ODatabaseModelImpl > pModelImpl;
{
pModelImpl.set( new ODatabaseModelImpl( _rName, m_aContext.getLegacyServiceFactory(), *this ) );
pModelImpl.set( new ODatabaseModelImpl( _rName, m_aContext, *this ) );
Reference< XModel > xModel( pModelImpl->createNewModel_deliverOwnership( false ), UNO_SET_THROW );
Reference< XLoadable > xLoad( xModel, UNO_QUERY_THROW );
@ -360,7 +360,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa
::comphelper::NamedValueCollection aArgs;
aArgs.put( "URL", _sURL );
aArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
aArgs.put( "InteractionHandler", task::InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
aArgs.put( "InteractionHandler", task::InteractionHandler::createWithParent(m_aContext, 0) );
Sequence< PropertyValue > aResource( aArgs.getPropertyValues() );
xLoad->load( aResource );

View File

@ -38,7 +38,6 @@
#include <com/sun/star/uno/XAggregation.hpp>
#include <basic/basicmanagerrepository.hxx>
#include <comphelper/componentcontext.hxx>
#include <comphelper/stl_types.hxx>
#include <cppuhelper/compbase3.hxx>
#include <cppuhelper/interfacecontainer.hxx>
@ -94,7 +93,8 @@ private:
protected:
::osl::Mutex m_aMutex;
::comphelper::ComponentContext m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >
m_xDBRegistrationAggregate;

View File

@ -487,7 +487,7 @@ void ODatabaseDocument::impl_reset_nothrow()
m_pImpl->m_bDocumentReadOnly = sal_False;
}
void ODatabaseDocument::impl_import_nolck_throw( const ::comphelper::ComponentContext _rContext, const Reference< XInterface >& _rxTargetComponent,
void ODatabaseDocument::impl_import_nolck_throw( const Reference< XComponentContext >& _rContext, const Reference< XInterface >& _rxTargetComponent,
const ::comphelper::NamedValueCollection& _rResource )
{
Sequence< Any > aFilterCreationArgs;
@ -510,7 +510,7 @@ void ODatabaseDocument::impl_import_nolck_throw( const ::comphelper::ComponentCo
aFilterCreationArgs[nCount] <<= xInfoSet;
Reference< XImporter > xImporter(
_rContext.createComponentWithArguments( "com.sun.star.comp.sdb.DBFilter", aFilterCreationArgs ),
_rContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.comp.sdb.DBFilter", aFilterCreationArgs, _rContext),
UNO_QUERY_THROW );
Reference< XComponent > xComponent( _rxTargetComponent, UNO_QUERY_THROW );
@ -534,8 +534,7 @@ void SAL_CALL ODatabaseDocument::initNew( ) throw (DoubleInitializationExceptio
impl_setInitializing();
// create a temporary storage
Reference< XStorage > xTempStor( ::comphelper::OStorageHelper::GetTemporaryStorage(
m_pImpl->m_aContext.getUNOContext() ) );
Reference< XStorage > xTempStor( ::comphelper::OStorageHelper::GetTemporaryStorage( m_pImpl->m_aContext ) );
// store therein
impl_storeToStorage_throw( xTempStor, Sequence< PropertyValue >(), aGuard );
@ -1125,7 +1124,7 @@ void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comph
Reference< XStorage > ODatabaseDocument::impl_createStorageFor_throw( const OUString& _rURL ) const
{
Reference< ucb::XSimpleFileAccess3 > xTempAccess(ucb::SimpleFileAccess::create(m_pImpl->m_aContext.getUNOContext()));
Reference< ucb::XSimpleFileAccess3 > xTempAccess(ucb::SimpleFileAccess::create(m_pImpl->m_aContext));
Reference< io::XStream > xStream = xTempAccess->openFileReadWrite( _rURL );
Reference< io::XTruncate > xTruncate(xStream,UNO_QUERY);
if ( xTruncate.is() )
@ -1415,14 +1414,16 @@ Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( ODa
{
Sequence<Any> aArgs(1);
aArgs[0] <<= NamedValue("DatabaseDocument",makeAny(xMy));
xContainer.set(m_pImpl->m_aContext.createComponentWithArguments(sSupportService,aArgs),UNO_QUERY);
xContainer.set(
m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(sSupportService, aArgs, m_pImpl->m_aContext),
UNO_QUERY);
rContainerRef = xContainer;
}
}
if ( !xContainer.is() )
{
TContentPtr& rContainerData( m_pImpl->getObjectContainer( _eType ) );
rContainerRef = xContainer = new ODocumentContainer( m_pImpl->m_aContext.getLegacyServiceFactory(), *this, rContainerData, bFormsContainer );
rContainerRef = xContainer = new ODocumentContainer( m_pImpl->m_aContext, *this, rContainerData, bFormsContainer );
}
impl_reparent_nothrow( xContainer );
}
@ -1582,7 +1583,7 @@ void ODatabaseDocument::WriteThroughComponent( const Reference< XOutputStream >&
OSL_ENSURE( NULL != pServiceName, "Need component name!" );
// get component
Reference< XWriter > xSaxWriter = xml::sax::Writer::create( m_pImpl->m_aContext.getUNOContext() );
Reference< XWriter > xSaxWriter = xml::sax::Writer::create( m_pImpl->m_aContext );
// connect XML writer to output stream
xSaxWriter->setOutputStream( xOutputStream );
@ -1595,10 +1596,7 @@ void ODatabaseDocument::WriteThroughComponent( const Reference< XOutputStream >&
aArgs[ i+1 ] = _rArguments[i];
// get filter component
Reference< XExporter > xExporter;
OSL_VERIFY( m_pImpl->m_aContext.createComponentWithArguments( pServiceName, aArgs, xExporter ) );
if ( !xExporter.is() )
return;
Reference< XExporter > xExporter( m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(OUString::createFromAscii(pServiceName), aArgs, m_pImpl->m_aContext), UNO_QUERY_THROW );
// connect model and filter
xExporter->setSourceDocument( xComponent );
@ -1677,7 +1675,7 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r
if ( xDlgs.is() )
{
Reference< XModel > xModel(const_cast< ODatabaseDocument*>(this));
lcl_uglyHackToStoreDialogeEmbedImages( m_pImpl->getLibraryContainer(false), _rxTargetStorage, xModel, m_pImpl->m_aContext.getUNOContext() );
lcl_uglyHackToStoreDialogeEmbedImages( m_pImpl->getLibraryContainer(false), _rxTargetStorage, xModel, m_pImpl->m_aContext );
}
}
catch ( const Exception& )
@ -1699,7 +1697,7 @@ Reference< XUIConfigurationManager2 > ODatabaseDocument::getUIConfigurationManag
if ( !m_xUIConfigurationManager.is() )
{
m_xUIConfigurationManager = UIConfigurationManager::create( m_pImpl->m_aContext.getUNOContext() );
m_xUIConfigurationManager = UIConfigurationManager::create( m_pImpl->m_aContext );
OUString aUIConfigFolderName( "Configurations2" );
Reference< XStorage > xConfigStorage;
@ -1865,11 +1863,10 @@ Sequence< OUString > ODatabaseDocument::getSupportedServiceNames( ) throw (Runt
Reference< XInterface > ODatabaseDocument::Create( const Reference< XComponentContext >& _rxContext )
{
::comphelper::ComponentContext aContext( _rxContext );
Reference< XUnoTunnel > xDBContextTunnel( DatabaseContext::create(_rxContext), UNO_QUERY_THROW );
ODatabaseContext* pContext = reinterpret_cast< ODatabaseContext* >( xDBContextTunnel->getSomething( ODatabaseContext::getUnoTunnelImplementationId() ) );
::rtl::Reference<ODatabaseModelImpl> pImpl( new ODatabaseModelImpl( aContext.getLegacyServiceFactory(), *pContext ) );
::rtl::Reference<ODatabaseModelImpl> pImpl( new ODatabaseModelImpl( _rxContext, *pContext ) );
Reference< XModel > xModel( pImpl->createNewModel_deliverOwnership( false ) );
return xModel.get();
}
@ -1969,7 +1966,7 @@ Reference< provider::XScriptProvider > SAL_CALL ODatabaseDocument::getScriptProv
if ( !xScriptProvider.is() )
{
Reference < XScriptProviderFactory > xFactory =
theMasterScriptProviderFactory::get( m_pImpl->m_aContext.getUNOContext() );
theMasterScriptProviderFactory::get( m_pImpl->m_aContext );
Any aScriptProviderContext;
if ( m_bAllowDocumentScripting )
@ -2036,11 +2033,11 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( cons
throw IllegalArgumentException( OUString(), *this, 3 );
DocumentGuard aGuard( *this );
::comphelper::ComponentContext aContext( m_pImpl->m_aContext );
aGuard.clear();
Reference< XController2 > xController;
aContext.createComponent( "org.openoffice.comp.dbu.OApplicationController", xController );
Reference< XController2 > xController(
m_pImpl->m_aContext->getServiceManager()->createInstanceWithContext("org.openoffice.comp.dbu.OApplicationController", m_pImpl->m_aContext),
UNO_QUERY_THROW );
::comphelper::NamedValueCollection aInitArgs( _Arguments );
aInitArgs.put( "Frame", _Frame );
@ -2056,10 +2053,10 @@ Reference< XTitle > ODatabaseDocument::impl_getTitleHelper_throw()
{
if ( ! m_xTitleHelper.is ())
{
Reference< XUntitledNumbers > xDesktop(Desktop::create(m_pImpl->m_aContext.getUNOContext()), uno::UNO_QUERY_THROW);
Reference< XUntitledNumbers > xDesktop(Desktop::create(m_pImpl->m_aContext), uno::UNO_QUERY_THROW);
Reference< frame::XModel > xThis (getThis(), uno::UNO_QUERY_THROW);
::framework::TitleHelper* pHelper = new ::framework::TitleHelper(m_pImpl->m_aContext.getUNOContext());
::framework::TitleHelper* pHelper = new ::framework::TitleHelper(m_pImpl->m_aContext);
m_xTitleHelper.set(static_cast< ::cppu::OWeakObject* >(pHelper), uno::UNO_QUERY_THROW);
pHelper->setOwner (xThis );
pHelper->connectWithUntitledNumbers (xDesktop);
@ -2071,7 +2068,7 @@ Reference< XTitle > ODatabaseDocument::impl_getTitleHelper_throw()
uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHelper_throw(const uno::Reference< uno::XInterface >& _xComponent)
{
if ( !m_xModuleManager.is() )
m_xModuleManager.set( ModuleManager::create(m_pImpl->m_aContext.getUNOContext()) );
m_xModuleManager.set( ModuleManager::create(m_pImpl->m_aContext) );
OUString sModuleId;
try

View File

@ -541,7 +541,7 @@ private:
*/
static void
impl_import_nolck_throw(
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::uno::XInterface >& _rxTargetComponent,
const ::comphelper::NamedValueCollection& _rResource
);

View File

@ -20,7 +20,6 @@
#include <com/sun/star/sdb/XDatabaseRegistrations.hpp>
#include <comphelper/componentcontext.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/implbase1.hxx>
@ -43,6 +42,7 @@ namespace dbaccess
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Type;
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::container::NoSuchElementException;
using ::com::sun::star::lang::IllegalArgumentException;
using ::com::sun::star::lang::IllegalAccessException;
@ -80,7 +80,7 @@ namespace dbaccess
,public DatabaseRegistrations_Base
{
public:
DatabaseRegistrations( const ::comphelper::ComponentContext& _rxContext );
DatabaseRegistrations( const Reference<XComponentContext>& _rxContext );
protected:
~DatabaseRegistrations();
@ -125,7 +125,7 @@ namespace dbaccess
impl_getNodeForName_nothrow( const ::rtl::OUString& _rName );
private:
::comphelper::ComponentContext m_aContext;
Reference<XComponentContext> m_aContext;
::utl::OConfigurationTreeRoot m_aConfigurationRoot;
::cppu::OInterfaceContainerHelper m_aRegistrationListeners;
};
@ -133,13 +133,13 @@ namespace dbaccess
//====================================================================
//= DatabaseRegistrations - implementation
//====================================================================
DatabaseRegistrations::DatabaseRegistrations( const ::comphelper::ComponentContext& _rxContext )
DatabaseRegistrations::DatabaseRegistrations( const Reference<XComponentContext> & _rxContext )
:m_aContext( _rxContext )
,m_aConfigurationRoot()
,m_aRegistrationListeners( m_aMutex )
{
m_aConfigurationRoot = ::utl::OConfigurationTreeRoot::createWithComponentContext(
m_aContext.getUNOContext(), getConfigurationRootPath(), -1, ::utl::OConfigurationTreeRoot::CM_UPDATABLE );
m_aContext, getConfigurationRootPath(), -1, ::utl::OConfigurationTreeRoot::CM_UPDATABLE );
}
DatabaseRegistrations::~DatabaseRegistrations()
@ -356,7 +356,7 @@ namespace dbaccess
//====================================================================
//= DatabaseRegistrations - factory
//====================================================================
Reference< XAggregation > createDataSourceRegistrations( const ::comphelper::ComponentContext& _rxContext )
Reference< XAggregation > createDataSourceRegistrations( const Reference<XComponentContext> & _rxContext )
{
return new DatabaseRegistrations( _rxContext );
}

View File

@ -22,16 +22,11 @@
#include <com/sun/star/uno/XAggregation.hpp>
namespace comphelper
{
class ComponentContext;
}
namespace dbaccess
{
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >
createDataSourceRegistrations( const ::comphelper::ComponentContext& _rxContext );
createDataSourceRegistrations( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext );
} // namespace dbaccess

View File

@ -644,11 +644,11 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
Reference< XDriverManager > xManager;
try {
xManager.set( ConnectionPool::create( m_pImpl->m_aContext.getUNOContext() ), UNO_QUERY_THROW );
xManager.set( ConnectionPool::create( m_pImpl->m_aContext ), UNO_QUERY_THROW );
} catch( const Exception& ) { }
if ( !xManager.is() )
// no connection pool installed, fall back to driver manager
xManager.set( DriverManager::create(m_pImpl->m_aContext.getUNOContext() ), UNO_QUERY_THROW );
xManager.set( DriverManager::create(m_pImpl->m_aContext ), UNO_QUERY_THROW );
OUString sUser(_rUid);
OUString sPwd(_rPwd);
@ -1197,7 +1197,7 @@ Reference< XConnection > ODatabaseSource::buildIsolatedConnection(const OUString
if ( xSdbcConn.is() )
{
// build a connection server and return it (no stubs)
xConn = new OConnection(*this, xSdbcConn, m_pImpl->m_aContext.getLegacyServiceFactory());
xConn = new OConnection(*this, xSdbcConn, m_pImpl->m_aContext);
}
return xConn;
}
@ -1216,7 +1216,7 @@ Reference< XConnection > ODatabaseSource::getConnection(const OUString& user, co
{ // create a new proxy for the connection
if ( !m_pImpl->m_xSharedConnectionManager.is() )
{
m_pImpl->m_pSharedConnectionManager = new OSharedConnectionManager( m_pImpl->m_aContext.getUNOContext() );
m_pImpl->m_pSharedConnectionManager = new OSharedConnectionManager( m_pImpl->m_aContext );
m_pImpl->m_xSharedConnectionManager = m_pImpl->m_pSharedConnectionManager;
}
xConn = m_pImpl->m_pSharedConnectionManager->getConnection(
@ -1259,13 +1259,13 @@ Reference< XNameAccess > SAL_CALL ODatabaseSource::getQueryDefinitions( ) throw(
{
Sequence<Any> aArgs(1);
aArgs[0] <<= NamedValue("DataSource",makeAny(xMy));
xContainer.set(m_pImpl->m_aContext.createComponentWithArguments(sSupportService,aArgs),UNO_QUERY);
xContainer.set( m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(sSupportService, aArgs, m_pImpl->m_aContext), UNO_QUERY);
}
}
if ( !xContainer.is() )
{
TContentPtr& rContainerData( m_pImpl->getObjectContainer( ODatabaseModelImpl::E_QUERY ) );
xContainer = new OCommandContainer( m_pImpl->m_aContext.getLegacyServiceFactory(), *this, rContainerData, sal_False );
xContainer = new OCommandContainer( m_pImpl->m_aContext, *this, rContainerData, sal_False );
}
m_pImpl->m_xCommandDefinitions = xContainer;
}
@ -1282,7 +1282,7 @@ Reference< XNameAccess > ODatabaseSource::getTables() throw( RuntimeException )
if ( !xContainer.is() )
{
TContentPtr& rContainerData( m_pImpl->getObjectContainer( ODatabaseModelImpl::E_TABLE ) );
xContainer = new OCommandContainer( m_pImpl->m_aContext.getLegacyServiceFactory(), *this, rContainerData, sal_True );
xContainer = new OCommandContainer( m_pImpl->m_aContext, *this, rContainerData, sal_True );
m_pImpl->m_xTableDefinitions = xContainer;
}
return xContainer;

View File

@ -93,7 +93,7 @@ ODefinitionContainer_Impl::iterator ODefinitionContainer_Impl::find( TContentPtr
//==========================================================================
DBG_NAME(ODefinitionContainer)
ODefinitionContainer::ODefinitionContainer( const Reference< XMultiServiceFactory >& _xORB
ODefinitionContainer::ODefinitionContainer( const Reference< XComponentContext >& _xORB
, const Reference< XInterface >& _xParentContainer
, const TContentPtr& _pImpl
, bool _bCheckSlash

View File

@ -94,7 +94,7 @@ void SAL_CALL LocalNameApproval::approveElement( const OUString& _rName, const R
//==========================================================================
DBG_NAME(ODocumentContainer)
ODocumentContainer::ODocumentContainer(const Reference< XMultiServiceFactory >& _xORB
ODocumentContainer::ODocumentContainer(const Reference< XComponentContext >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl
, sal_Bool _bFormsContainer
@ -107,7 +107,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 ( comphelper::getComponentContext(_xORB) ) ) );
setElementApproval( PContainerApprove( new LocalNameApproval ( _xORB ) ) );
}
ODocumentContainer::~ODocumentContainer()
@ -145,8 +145,8 @@ Reference< XContent > ODocumentContainer::createObject( const OUString& _rName)
ODefinitionContainer_Impl::const_iterator aFind = rDefinitions.find( _rName );
OSL_ENSURE( aFind != rDefinitions.end(), "ODocumentContainer::createObject:Invalid entry in map!" );
if ( aFind->second->m_aProps.bIsFolder )
return new ODocumentContainer( m_aContext.getLegacyServiceFactory(), *this, aFind->second, m_bFormsContainer );
return new ODocumentDefinition( *this, m_aContext.getLegacyServiceFactory(), aFind->second, m_bFormsContainer );
return new ODocumentContainer( m_aContext, *this, aFind->second, m_bFormsContainer );
return new ODocumentDefinition( *this, m_aContext, aFind->second, m_bFormsContainer );
}
Reference< XInterface > SAL_CALL ODocumentContainer::createInstance( const OUString& aServiceSpecifier ) throw (Exception, RuntimeException)
@ -254,7 +254,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
ODocumentDefinition::GetDocumentServiceFromMediaType( sMediaType, m_aContext, aClassID );
else if ( !sDocServiceName.isEmpty() )
{
::comphelper::MimeConfigurationHelper aConfigHelper( m_aContext.getUNOContext() );
::comphelper::MimeConfigurationHelper aConfigHelper( m_aContext );
const Sequence< NamedValue > aProps( aConfigHelper.GetObjectPropsByDocumentName( sDocServiceName ) );
const ::comphelper::NamedValueCollection aMediaTypeProps( aProps );
aClassID = aMediaTypeProps.getOrDefault( "ClassID", Sequence< sal_Int8 >() );
@ -278,7 +278,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
else
pElementImpl = aFind->second;
::rtl::Reference< ODocumentDefinition > pDocDef = new ODocumentDefinition( *this, m_aContext.getLegacyServiceFactory(), pElementImpl, m_bFormsContainer );
::rtl::Reference< ODocumentDefinition > pDocDef = new ODocumentDefinition( *this, m_aContext, pElementImpl, m_bFormsContainer );
if ( aClassID.getLength() )
{
pDocDef->initialLoad( aClassID, aCreationArgs, xConnection );
@ -335,7 +335,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
else
pElementImpl = aFind->second;
OSL_ENSURE( pElementImpl ," Invalid entry in map!");
xContent = new ODocumentContainer( m_aContext.getLegacyServiceFactory(), *this, pElementImpl, ServiceSpecifier == SERVICE_NAME_FORM_COLLECTION );
xContent = new ODocumentContainer( m_aContext, *this, pElementImpl, ServiceSpecifier == SERVICE_NAME_FORM_COLLECTION );
// copy children
if ( xCopyFrom.is() )
@ -429,7 +429,7 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com
// open as folder - return result set
Reference< XDynamicResultSet > xSet
= new DynamicResultSet( m_aContext.getUNOContext(),
= new DynamicResultSet( m_aContext,
this,
aOpenCommand,
Environment );

View File

@ -53,7 +53,7 @@ public:
/** constructs the container.<BR>
*/
ODocumentContainer(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB
, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer
,const TContentPtr& _pImpl
, sal_Bool _bFormsContainer

View File

@ -372,7 +372,7 @@ namespace dbaccess
}
::rtl::OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const Reference< XStorage >& _rxContainerStorage,
const ::rtl::OUString& _rEntityName, const ::comphelper::ComponentContext& _rContext,
const ::rtl::OUString& _rEntityName, const Reference< XComponentContext >& _rContext,
Sequence< sal_Int8 >& _rClassId )
{
return GetDocumentServiceFromMediaType(
@ -381,12 +381,12 @@ namespace dbaccess
}
::rtl::OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const ::rtl::OUString& _rMediaType,
const ::comphelper::ComponentContext& _rContext, Sequence< sal_Int8 >& _rClassId )
const Reference< XComponentContext >& _rContext, Sequence< sal_Int8 >& _rClassId )
{
::rtl::OUString sResult;
try
{
::comphelper::MimeConfigurationHelper aConfigHelper( _rContext.getUNOContext() );
::comphelper::MimeConfigurationHelper aConfigHelper( _rContext );
sResult = aConfigHelper.GetDocServiceNameFromMediaType( _rMediaType );
_rClassId = aConfigHelper.GetSequenceClassIDRepresentation(aConfigHelper.GetExplicitlyRegisteredObjClassID( _rMediaType ));
if ( !_rClassId.getLength() && !sResult.isEmpty() )
@ -432,7 +432,7 @@ namespace dbaccess
//==========================================================================
DBG_NAME(ODocumentDefinition)
ODocumentDefinition::ODocumentDefinition( const Reference< XInterface >& _rxContainer, const Reference< XMultiServiceFactory >& _xORB,
ODocumentDefinition::ODocumentDefinition( const Reference< XInterface >& _rxContainer, const Reference< XComponentContext >& _xORB,
const TContentPtr& _pImpl, sal_Bool _bForm )
:OContentHelper(_xORB,_rxContainer,_pImpl)
,OPropertyStateContainer(OContentHelper::rBHelper)
@ -631,7 +631,7 @@ void ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow( const bool i_bR
xTopWindow->toFront();
// remove the frame from the desktop's frame collection because we need full control of it.
impl_removeFrameFromDesktop_throw( m_aContext.getUNOContext(), xFrame );
impl_removeFrameFromDesktop_throw( m_aContext, xFrame );
// ensure that we ourself are kept alive as long as the embedded object's frame is
// opened
@ -961,7 +961,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
{
// we are in ReadOnly mode
// we would like to open the Writer or Calc with the report direct, without design it.
Reference< report::XReportEngine > xReportEngine( m_aContext.createComponent( "com.sun.star.comp.report.OReportEngineJFree" ), UNO_QUERY_THROW );
Reference< report::XReportEngine > xReportEngine( m_aContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.report.OReportEngineJFree", m_aContext), UNO_QUERY_THROW );
xReportEngine->setReportDefinition(xReportDefinition);
xReportEngine->setActiveConnection(m_xLastKnownConnection);
@ -1214,7 +1214,7 @@ void ODocumentDefinition::onCommandInsert( const ::rtl::OUString& _sURL, const R
Reference< XStorage> xStorage = getContainerStorage();
if ( xStorage.is() )
{
Reference< XEmbeddedObjectCreator> xEmbedFactory = EmbeddedObjectCreator::create(m_aContext.getUNOContext());
Reference< XEmbeddedObjectCreator> xEmbedFactory = EmbeddedObjectCreator::create(m_aContext);
Sequence<PropertyValue> aEmpty,aMediaDesc(1);
aMediaDesc[0].Name = PROPERTY_URL;
aMediaDesc[0].Value <<= _sURL;
@ -1296,7 +1296,7 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove)
pRequest->addContinuation(pAbort);
// create the handler, let it handle the request
Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext, 0) );
xHandler->handle(xRequest);
if ( pAbort->wasSelected() )
@ -1370,7 +1370,7 @@ sal_Bool ODocumentDefinition::saveAs()
pRequest->addContinuation(pAbort);
// create the handler, let it handle the request
Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext, 0) );
xHandler->handle(xRequest);
if ( pAbort->wasSelected() )
@ -1557,7 +1557,7 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC
xParentFrame = lcl_getDatabaseDocumentFrame( *m_pImpl->m_pDataSource );
if ( !xParentFrame.is() )
{ // i87957 we need a parent frame
Reference< XDesktop2 > xDesktop = Desktop::create( m_aContext.getUNOContext() );
Reference< XDesktop2 > xDesktop = Desktop::create( m_aContext );
xParentFrame.set( xDesktop, UNO_QUERY_THROW );
Reference<util::XCloseable> xCloseable(m_pImpl->m_pDataSource->getModel_noCreate(),UNO_QUERY);
if ( xCloseable.is() )
@ -1613,7 +1613,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_
Reference< XStorage> xStorage = getContainerStorage();
if ( xStorage.is() )
{
Reference< XEmbeddedObjectCreator> xEmbedFactory = OOoEmbeddedObjectFactory::create(m_aContext.getUNOContext());
Reference< XEmbeddedObjectCreator> xEmbedFactory = OOoEmbeddedObjectFactory::create(m_aContext);
::rtl::OUString sDocumentService;
sal_Bool bSetSize = sal_False;
sal_Int32 nEntryConnectionMode = EntryInitModes::DEFAULT_INIT;
@ -1631,8 +1631,8 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_
if ( !m_bForm && !(sDocumentService == "com.sun.star.text.TextDocument"))
{
// we seem to be a "new style" report, check if report extension is present.
Reference< XContentEnumerationAccess > xEnumAccess( m_aContext.getLegacyServiceFactory(), UNO_QUERY );
const ::rtl::OUString sReportEngineServiceName = ::dbtools::getDefaultReportEngineServiceName(m_aContext.getUNOContext());
Reference< XContentEnumerationAccess > xEnumAccess( m_aContext->getServiceManager(), UNO_QUERY );
const ::rtl::OUString sReportEngineServiceName = ::dbtools::getDefaultReportEngineServiceName(m_aContext);
Reference< XEnumeration > xEnumDrivers = xEnumAccess->createContentEnumeration(sReportEngineServiceName);
if ( !xEnumDrivers.is() || !xEnumDrivers->hasMoreElements() )
{
@ -2077,7 +2077,7 @@ bool ODocumentDefinition::prepareClose()
return true;
}
void ODocumentDefinition::fillReportData( const ::comphelper::ComponentContext& _rContext,
void ODocumentDefinition::fillReportData( const Reference< XComponentContext >& _rContext,
const Reference< util::XCloseable >& _rxComponent,
const Reference< XConnection >& _rxActiveConnection )
{
@ -2086,14 +2086,14 @@ void ODocumentDefinition::fillReportData( const ::comphelper::ComponentContext&
aValue.Name = "TextDocument";
aValue.Value <<= _rxComponent;
aArgs[0] <<= aValue;
aValue.Name = "ActiveConnection";
aValue.Value <<= _rxActiveConnection;
aArgs[1] <<= aValue;
aValue.Name = "ActiveConnection";
aValue.Value <<= _rxActiveConnection;
aArgs[1] <<= aValue;
try
{
Reference< XJobExecutor > xExecuteable(
_rContext.createComponentWithArguments( "com.sun.star.wizards.report.CallReportWizard", aArgs ), UNO_QUERY_THROW );
_rContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.wizards.report.CallReportWizard", aArgs, _rContext), UNO_QUERY_THROW );
xExecuteable->trigger( "fill" );
}
catch( const Exception& )

View File

@ -82,7 +82,7 @@ public:
ODocumentDefinition(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContainer,
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&,
const TContentPtr& _pImpl,
sal_Bool _bForm
);
@ -153,7 +153,7 @@ public:
inline sal_Bool isNewReport() const { return !m_bForm && !m_pImpl->m_aProps.bAsTemplate; }
static void fillReportData(
const ::comphelper::ComponentContext& _rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & _rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable >& _rxComponent,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxActiveConnection
);
@ -175,13 +175,13 @@ public:
static ::rtl::OUString GetDocumentServiceFromMediaType(
const ::rtl::OUString& _rMediaType,
const ::comphelper::ComponentContext& _rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & _rxContext,
::com::sun::star::uno::Sequence< sal_Int8 >& _rClassId
);
static ::rtl::OUString GetDocumentServiceFromMediaType(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _rxContainerStorage,
const ::rtl::OUString& _rEntityName,
const ::comphelper::ComponentContext& _rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & _rxContext,
::com::sun::star::uno::Sequence< sal_Int8 >& _rClassId
);

View File

@ -26,7 +26,6 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <comphelper/componentcontext.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <cppuhelper/weakref.hxx>
#include <tools/diagnose_ex.h>
@ -49,6 +48,7 @@ namespace dbaccess
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Type;
using ::com::sun::star::uno::WeakReference;
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::document::XDocumentEventBroadcaster;
using ::com::sun::star::document::XEventsSupplier;
using ::com::sun::star::container::XNameAccess;
@ -122,7 +122,7 @@ namespace dbaccess
//====================================================================
//= DocumentEventExecutor
//====================================================================
DocumentEventExecutor::DocumentEventExecutor( const ::comphelper::ComponentContext& _rContext,
DocumentEventExecutor::DocumentEventExecutor( const Reference<XComponentContext> & _rContext,
const Reference< XEventsSupplier >& _rxDocument )
:m_pData( new DocumentEventExecutor_Data( _rxDocument ) )
{
@ -136,7 +136,7 @@ namespace dbaccess
try
{
m_pData->xURLTransformer = URLTransformer::create(_rContext.getUNOContext());
m_pData->xURLTransformer = URLTransformer::create(_rContext);
}
catch( const Exception& )
{

View File

@ -27,11 +27,6 @@
#include <memory>
namespace comphelper
{
class ComponentContext;
}
namespace dbaccess
{
@ -45,7 +40,7 @@ namespace dbaccess
{
public:
DocumentEventExecutor(
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::document::XEventsSupplier >& _rxDocument );
protected:

View File

@ -33,7 +33,6 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <cppuhelper/compbase9.hxx>
#include <comphelper/broadcasthelper.hxx>
#include <comphelper/componentcontext.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/stl_types.hxx>
#include <com/sun/star/beans/Property.hpp>
@ -111,7 +110,8 @@ namespace dbaccess
PropertyChangeListenerContainer m_aPropertyChangeListeners;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
m_xParentContainer;
const ::comphelper::ComponentContext m_aContext;
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
m_aContext;
const ::connectivity::SQLError m_aErrorHelper;
TContentPtr m_pImpl;
sal_uInt32 m_nCommandId;
@ -132,7 +132,7 @@ namespace dbaccess
public:
OContentHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
OContentHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer
,const TContentPtr& _pImpl
);
@ -183,7 +183,7 @@ namespace dbaccess
getPropertyValues( const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::Property >& rProperties );
const ::comphelper::ComponentContext& getContext() const { return m_aContext; }
const css::uno::Reference< css::uno::XComponentContext >& getContext() const { return m_aContext; }
inline TContentPtr getImpl() const { return m_pImpl; }

View File

@ -33,7 +33,6 @@
#include <comphelper/uno3.hxx>
#include <comphelper/proparrhlp.hxx>
#include <comphelper/propertycontainer.hxx>
#include <comphelper/componentcontext.hxx>
#include <memory>
@ -92,7 +91,7 @@ namespace dbaccess
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xConnectionQueries;
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > m_xNumberFormatsSupplier;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xColumns;
::comphelper::ComponentContext m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::script::XTypeConverter > m_xTypeConverter;
::std::vector<OPrivateColumns*> m_aCurrentColumns;
@ -189,7 +188,7 @@ namespace dbaccess
OSingleSelectQueryComposer( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xTableSupplier,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
const ::comphelper::ComponentContext& _rContext);
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rContext);
void SAL_CALL disposing(void);

View File

@ -153,7 +153,7 @@ public:
/** constructs the container.
*/
ODefinitionContainer(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB
, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer
, const TContentPtr& _pImpl
, bool _bCheckSlash = true

View File

@ -112,7 +112,7 @@ namespace dbaccess
OQueryContainer(
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _rxCommandDefinitions,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn,
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB,
::dbtools::IWarningsContainer* _pWarnings
);

View File

@ -24,15 +24,11 @@
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <vector>
#include <memory>
namespace comphelper
{
class ComponentContext;
}
namespace dbaccess
{
@ -44,7 +40,7 @@ namespace dbaccess
{
public:
DatabaseDocumentRecovery(
const ::comphelper::ComponentContext& i_rContext
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext
);
~DatabaseDocumentRecovery();

View File

@ -26,11 +26,7 @@
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/lang/WrappedTargetException.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
namespace comphelper
{
class ComponentContext;
}
#include <com/sun/star/uno/XComponentContext.hpp>
namespace dbaccess
{
@ -42,7 +38,7 @@ namespace dbaccess
/** retrieves a to-be-displayed string for a given caught exception;
*/
::rtl::OUString extractExceptionMessage( const ::comphelper::ComponentContext& _rContext, const ::com::sun::star::uno::Any& _rError );
::rtl::OUString extractExceptionMessage( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rContext, const ::com::sun::star::uno::Any& _rError );
namespace tools
{

View File

@ -32,7 +32,6 @@
#include <tools/diagnose_ex.h>
#include <tools/debug.hxx>
#include <comphelper/componentcontext.hxx>
#include <comphelper/interaction.hxx>
#include <rtl/ref.hxx>
#include <rtl/ustrbuf.hxx>
@ -81,14 +80,16 @@ namespace dbaccess
}
// -----------------------------------------------------------------------------
::rtl::OUString extractExceptionMessage( const ::comphelper::ComponentContext& _rContext, const Any& _rError )
::rtl::OUString extractExceptionMessage( const Reference<XComponentContext> & _rContext, const Any& _rError )
{
::rtl::OUString sDisplayMessage;
try
{
Reference< XInteractionRequestStringResolver > xStringResolver;
if ( _rContext.createComponent( "com.sun.star.task.InteractionRequestStringResolver", xStringResolver ) )
Reference< XInteractionRequestStringResolver > xStringResolver(
_rContext->getServiceManager()->createInstanceWithContext("com.sun.star.task.InteractionRequestStringResolver", _rContext),
UNO_QUERY );
if ( xStringResolver.is() )
{
::rtl::Reference< ::comphelper::OInteractionRequest > pRequest( new ::comphelper::OInteractionRequest( _rError ) );
::rtl::Reference< ::comphelper::OInteractionApprove > pApprove( new ::comphelper::OInteractionApprove );

View File

@ -35,7 +35,6 @@
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <comphelper/componentcontext.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <rtl/ustrbuf.hxx>
#include <tools/diagnose_ex.h>
@ -75,7 +74,6 @@ namespace dbaccess
using ::com::sun::star::frame::XModel;
using ::com::sun::star::util::XModifiable;
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::lang::XMultiServiceFactory;
/** === end UNO using === **/
namespace ElementModes = ::com::sun::star::embed::ElementModes;
@ -135,7 +133,7 @@ namespace dbaccess
return s_sMapStreamEncodingName;
}
static void lcl_writeObjectMap_throw( const ::comphelper::ComponentContext& i_rContext, const Reference< XStorage >& i_rStorage,
static void lcl_writeObjectMap_throw( const Reference<XComponentContext> & i_rContext, const Reference< XStorage >& i_rStorage,
const MapStringToCompDesc& i_mapStorageToCompDesc )
{
if ( i_mapStorageToCompDesc.empty() )
@ -251,9 +249,9 @@ namespace dbaccess
//====================================================================
struct DBACCESS_DLLPRIVATE DatabaseDocumentRecovery_Data
{
const ::comphelper::ComponentContext aContext;
const Reference<XComponentContext> aContext;
DatabaseDocumentRecovery_Data( const ::comphelper::ComponentContext& i_rContext )
DatabaseDocumentRecovery_Data( const Reference<XComponentContext> & i_rContext )
:aContext( i_rContext )
{
}
@ -263,7 +261,7 @@ namespace dbaccess
//= DatabaseDocumentRecovery
//====================================================================
//--------------------------------------------------------------------
DatabaseDocumentRecovery::DatabaseDocumentRecovery( const ::comphelper::ComponentContext& i_rContext )
DatabaseDocumentRecovery::DatabaseDocumentRecovery( const Reference<XComponentContext> & i_rContext )
:m_pData( new DatabaseDocumentRecovery_Data( i_rContext ) )
{
}
@ -352,7 +350,7 @@ namespace dbaccess
Reference< XStorage > xComponentsStor( xRecoveryStorage->openStorageElement(
SubComponentRecovery::getComponentsStorageName( aKnownTypes[i] ), ElementModes::READ ) );
lcl_readObjectMap_throw( m_pData->aContext.getUNOContext(), xComponentsStor, aMapCompDescs[ aKnownTypes[i] ] );
lcl_readObjectMap_throw( m_pData->aContext, xComponentsStor, aMapCompDescs[ aKnownTypes[i] ] );
xComponentsStor->dispose();
}

View File

@ -41,6 +41,7 @@ namespace dbaccess
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Type;
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::embed::XStorage;
using ::com::sun::star::io::XStream;
/** === end UNO using === **/
@ -50,7 +51,7 @@ namespace dbaccess
//= StorageOutputStream
//====================================================================
//--------------------------------------------------------------------
StorageOutputStream::StorageOutputStream( const ::comphelper::ComponentContext& i_rContext,
StorageOutputStream::StorageOutputStream( const Reference<XComponentContext>& i_rContext,
const Reference< XStorage >& i_rParentStorage,
const ::rtl::OUString& i_rStreamName
)
@ -83,7 +84,7 @@ namespace dbaccess
//= StorageInputStream
//====================================================================
//--------------------------------------------------------------------
StorageInputStream::StorageInputStream( const ::comphelper::ComponentContext& i_rContext,
StorageInputStream::StorageInputStream( const Reference<XComponentContext>& i_rContext,
const Reference< XStorage >& i_rParentStorage,
const ::rtl::OUString& i_rStreamName
)

View File

@ -23,11 +23,7 @@
#include "dbaccessdllapi.h"
#include <com/sun/star/embed/XStorage.hpp>
namespace comphelper
{
class ComponentContext;
}
#include <com/sun/star/uno/XComponentContext.hpp>
//........................................................................
namespace dbaccess
@ -43,7 +39,7 @@ namespace dbaccess
{
public:
StorageOutputStream(
const ::comphelper::ComponentContext& i_rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& i_rParentStorage,
const ::rtl::OUString& i_rStreamName
);
@ -54,12 +50,14 @@ namespace dbaccess
virtual void close();
protected:
const ::comphelper::ComponentContext& getContext() const { return m_rContext; }
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
getContext() const { return m_rContext; }
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >&
getOutputStream() const { return m_xOutputStream; }
private:
const ::comphelper::ComponentContext& m_rContext;
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
m_rContext;
::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >
m_xOutputStream;
};
@ -73,7 +71,7 @@ namespace dbaccess
{
public:
StorageInputStream(
const ::comphelper::ComponentContext& i_rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& i_rParentStorage,
const ::rtl::OUString& i_rStreamName
);
@ -84,12 +82,14 @@ namespace dbaccess
virtual void close();
protected:
const ::comphelper::ComponentContext& getContext() const { return m_rContext; }
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
getContext() const { return m_rContext; }
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >&
getInputStream() const { return m_xInputStream; }
private:
const ::comphelper::ComponentContext& m_rContext;
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
m_rContext;
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >
m_xInputStream;
};

View File

@ -22,7 +22,6 @@
#include <com/sun/star/io/TextOutputStream.hpp>
#include <comphelper/componentcontext.hxx>
#include <tools/diagnose_ex.h>
//......................................................................................................................
@ -42,6 +41,7 @@ namespace dbaccess
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Type;
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::embed::XStorage;
using ::com::sun::star::io::TextOutputStream;
using ::com::sun::star::io::XTextOutputStream2;
@ -80,14 +80,14 @@ namespace dbaccess
//= StorageTextOutputStream
//==================================================================================================================
//------------------------------------------------------------------------------------------------------------------
StorageTextOutputStream::StorageTextOutputStream( const ::comphelper::ComponentContext& i_rContext,
StorageTextOutputStream::StorageTextOutputStream( const Reference<XComponentContext>& i_rContext,
const Reference< XStorage >& i_rParentStorage,
const ::rtl::OUString& i_rStreamName
)
:StorageOutputStream( i_rContext, i_rParentStorage, i_rStreamName )
,m_pData( new StorageTextOutputStream_Data )
{
m_pData->xTextOutput = TextOutputStream::create( i_rContext.getUNOContext() );
m_pData->xTextOutput = TextOutputStream::create( i_rContext );
m_pData->xTextOutput->setEncoding( lcl_getTextStreamEncodingName() );
m_pData->xTextOutput->setOutputStream( getOutputStream() );
}

View File

@ -37,7 +37,7 @@ namespace dbaccess
{
public:
StorageTextOutputStream(
const ::comphelper::ComponentContext& i_rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& i_rParentStorage,
const ::rtl::OUString& i_rStreamName
);

View File

@ -25,7 +25,6 @@
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/Writer.hpp>
#include <comphelper/componentcontext.hxx>
#include <cppuhelper/implbase1.hxx>
#include <rtl/ref.hxx>
#include <tools/diagnose_ex.h>
@ -50,6 +49,7 @@ namespace dbaccess
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Type;
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::embed::XStorage;
using ::com::sun::star::xml::sax::XDocumentHandler;
using ::com::sun::star::xml::sax::XAttributeList;
@ -77,13 +77,13 @@ namespace dbaccess
//= StorageXMLOutputStream
//==================================================================================================================
//------------------------------------------------------------------------------------------------------------------
StorageXMLOutputStream::StorageXMLOutputStream( const ::comphelper::ComponentContext& i_rContext,
StorageXMLOutputStream::StorageXMLOutputStream( const Reference<XComponentContext>& i_rContext,
const Reference< XStorage >& i_rParentStorage,
const ::rtl::OUString& i_rStreamName )
:StorageOutputStream( i_rContext, i_rParentStorage, i_rStreamName )
,m_pData( new StorageXMLOutputStream_Data )
{
const Reference< XWriter > xSaxWriter = Writer::create( i_rContext.getUNOContext() );
const Reference< XWriter > xSaxWriter = Writer::create( i_rContext );
xSaxWriter->setOutputStream( getOutputStream() );
m_pData->xHandler.set( xSaxWriter, UNO_QUERY_THROW );
@ -161,13 +161,13 @@ namespace dbaccess
//= StorageXMLInputStream
//==================================================================================================================
//------------------------------------------------------------------------------------------------------------------
StorageXMLInputStream::StorageXMLInputStream( const ::comphelper::ComponentContext& i_rContext,
StorageXMLInputStream::StorageXMLInputStream( const Reference<XComponentContext>& i_rContext,
const Reference< XStorage >& i_rParentStorage,
const ::rtl::OUString& i_rStreamName )
:StorageInputStream( i_rContext, i_rParentStorage, i_rStreamName )
,m_pData( new StorageXMLInputStream_Data )
{
m_pData->xParser.set( Parser::create(i_rContext.getUNOContext()) );
m_pData->xParser.set( Parser::create(i_rContext) );
}
//------------------------------------------------------------------------------------------------------------------

View File

@ -27,11 +27,6 @@
#include <memory>
namespace comphelper
{
class ComponentContext;
}
//........................................................................
namespace dbaccess
{
@ -45,7 +40,7 @@ namespace dbaccess
{
public:
StorageXMLOutputStream(
const ::comphelper::ComponentContext& i_rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& i_rParentStorage,
const ::rtl::OUString& i_rStreamName
);
@ -79,7 +74,7 @@ namespace dbaccess
{
public:
StorageXMLInputStream(
const ::comphelper::ComponentContext& i_rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& i_rParentStorage,
const ::rtl::OUString& i_rStreamName
);

View File

@ -57,6 +57,7 @@ namespace dbaccess
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Type;
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::lang::XMultiServiceFactory;
using ::com::sun::star::embed::XStorage;
using ::com::sun::star::sdb::application::XDatabaseDocumentUI;
@ -195,7 +196,7 @@ namespace dbaccess
class DBACCESS_DLLPRIVATE SettingsExportContext : public ::xmloff::XMLSettingsExportContext
{
public:
SettingsExportContext( const ::comphelper::ComponentContext& i_rContext, const StorageXMLOutputStream& i_rDelegator )
SettingsExportContext( const Reference<XComponentContext>& i_rContext, const StorageXMLOutputStream& i_rDelegator )
:m_rContext( i_rContext )
,m_rDelegator( i_rDelegator )
,m_aNamespace( ::xmloff::token::GetXMLToken( ::xmloff::token::XML_NP_CONFIG ) )
@ -226,7 +227,7 @@ namespace dbaccess
}
private:
const ::comphelper::ComponentContext& m_rContext;
const Reference<XComponentContext>& m_rContext;
const StorageXMLOutputStream& m_rDelegator;
const ::rtl::OUStringBuffer m_aNamespace;
};
@ -269,7 +270,7 @@ namespace dbaccess
//--------------------------------------------------------------------
Reference< com::sun::star::uno::XComponentContext > SettingsExportContext::GetComponentContext() const
{
return m_rContext.getUNOContext();
return m_rContext;
}
//==================================================================================================================
@ -479,7 +480,7 @@ namespace dbaccess
m_aCompDesc.sName = aComponentIdentity.Second;
// what the controller didn't give us is the information whether this is in edit mode or not ...
Reference< XModuleManager2 > xModuleManager( ModuleManager::create(m_rContext.getUNOContext()) );
Reference< XModuleManager2 > xModuleManager( ModuleManager::create(m_rContext) );
const ::rtl::OUString sModuleIdentifier = xModuleManager->identify( m_xComponent );
switch ( m_eType )

View File

@ -24,8 +24,7 @@
#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <comphelper/componentcontext.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
//........................................................................
namespace dbaccess
@ -38,7 +37,9 @@ namespace dbaccess
class DBACCESS_DLLPRIVATE SubComponentRecovery
{
public:
SubComponentRecovery( const ::comphelper::ComponentContext& i_rContext, const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& i_rController,
SubComponentRecovery(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& i_rController,
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& i_rComponent )
:m_rContext( i_rContext )
,m_xDocumentUI( i_rController, ::com::sun::star::uno::UNO_SET_THROW )
@ -49,7 +50,9 @@ namespace dbaccess
impl_identifyComponent_throw();
}
SubComponentRecovery( const ::comphelper::ComponentContext& i_rContext, const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& i_rController,
SubComponentRecovery(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& i_rController,
const SubComponentType i_eType )
:m_rContext( i_rContext )
,m_xDocumentUI( i_rController, ::com::sun::star::uno::UNO_SET_THROW )
@ -101,7 +104,8 @@ namespace dbaccess
void impl_identifyComponent_throw();
private:
const ::comphelper::ComponentContext& m_rContext;
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
m_rContext;
::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >
m_xDocumentUI;
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >

View File

@ -24,7 +24,6 @@
#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/task/DocumentPasswordRequest.hpp>
#include <comphelper/componentcontext.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/interaction.hxx>
#include <rtl/ref.hxx>
@ -45,6 +44,7 @@ namespace dbmm
using ::com::sun::star::uno::RuntimeException;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::task::XInteractionHandler;
using ::com::sun::star::frame::XModel;
using ::com::sun::star::task::DocumentPasswordRequest;
@ -65,8 +65,8 @@ namespace dbmm
{
}
InteractionHandler_Data( const ::comphelper::ComponentContext& _rContext )
:xHandler( ::com::sun::star::task::InteractionHandler::createWithParent(_rContext.getUNOContext(), 0), UNO_QUERY )
InteractionHandler_Data( const Reference<XComponentContext>& _rContext )
:xHandler( ::com::sun::star::task::InteractionHandler::createWithParent(_rContext, 0), UNO_QUERY )
{
}
};
@ -75,7 +75,7 @@ namespace dbmm
//= InteractionHandler
//====================================================================
//--------------------------------------------------------------------
InteractionHandler::InteractionHandler( const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument )
InteractionHandler::InteractionHandler( const Reference<XComponentContext>& _rContext, const Reference< XModel >& _rxDocument )
:m_pData( new InteractionHandler_Data( _rContext ) )
{
// check whether the doumentc has an own interaction handler set

View File

@ -22,10 +22,7 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
namespace comphelper {
class ComponentContext;
}
#include <com/sun/star/uno/XComponentContext.hpp>
#include <memory>
@ -47,7 +44,9 @@ namespace dbmm
component at the given component context, or using the given document's interaction handler,
if one is specified in the document's media descriptor.
*/
InteractionHandler( const ::comphelper::ComponentContext& _rContext, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxDocument );
InteractionHandler(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxDocument );
/** destructor
*/

View File

@ -112,7 +112,7 @@ namespace dbmm
//====================================================================
struct MacroMigrationDialog_Data
{
::comphelper::ComponentContext aContext;
Reference<XComponentContext> aContext;
MigrationLog aLogger;
Reference< XOfficeDatabaseDocument > xDocument;
Reference< XModel2 > xDocumentModel;
@ -122,7 +122,7 @@ namespace dbmm
bool bMigrationSuccess;
MacroMigrationDialog_Data(
const ::comphelper::ComponentContext& _rContext,
const Reference<XComponentContext>& _rContext,
const Reference< XOfficeDatabaseDocument >& _rxDocument )
:aContext( _rContext )
,aLogger()
@ -139,7 +139,7 @@ namespace dbmm
//= MacroMigrationDialog
//====================================================================
//--------------------------------------------------------------------
MacroMigrationDialog::MacroMigrationDialog( Window* _pParent, const ::comphelper::ComponentContext& _rContext,
MacroMigrationDialog::MacroMigrationDialog( Window* _pParent, const Reference<XComponentContext>& _rContext,
const Reference< XOfficeDatabaseDocument >& _rxDocument )
:MacroMigrationDialog_Base( _pParent, MacroMigrationResId( DLG_MACRO_MIGRATION ) )
,m_pData( new MacroMigrationDialog_Data( _rContext, _rxDocument ) )
@ -174,7 +174,7 @@ namespace dbmm
}
//--------------------------------------------------------------------
const ::comphelper::ComponentContext& MacroMigrationDialog::getComponentContext() const
const Reference<XComponentContext>& MacroMigrationDialog::getComponentContext() const
{
return m_pData->aContext;
}
@ -438,7 +438,7 @@ namespace dbmm
try
{
// check that the backup location isn't the same as the document itself
if ( lcl_equalURLs_nothrow( m_pData->aContext.getUNOContext(), sBackupLocation, m_pData->xDocumentModel->getURL() ) )
if ( lcl_equalURLs_nothrow( m_pData->aContext, sBackupLocation, m_pData->xDocumentModel->getURL() ) )
{
ErrorBox aErrorBox( const_cast< MacroMigrationDialog* >( this ), MacroMigrationResId( ERR_INVALID_BACKUP_LOCATION ) );
aErrorBox.Execute();

View File

@ -22,7 +22,6 @@
#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
#include <comphelper/componentcontext.hxx>
#include <svtools/roadmapwizard.hxx>
#include <memory>
@ -42,12 +41,12 @@ namespace dbmm
public:
MacroMigrationDialog(
Window* _pParent,
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::sdb::XOfficeDatabaseDocument >& _rxDocument
);
virtual ~MacroMigrationDialog();
const ::comphelper::ComponentContext&
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
getComponentContext() const;
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XOfficeDatabaseDocument >&
getDocument() const;

View File

@ -27,6 +27,7 @@
#include <com/sun/star/frame/XModel.hpp>
#include <comphelper/componentcontext.hxx>
#include <tools/urlobj.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/metric.hxx>

View File

@ -26,7 +26,6 @@
#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <comphelper/componentcontext.hxx>
#include <svtools/genericunodialog.hxx>
//........................................................................
@ -99,7 +98,7 @@ namespace dbmm
virtual void destroyDialog();
private:
::comphelper::ComponentContext m_aContext;
Reference<XComponentContext> m_aContext;
Reference< XOfficeDatabaseDocument > m_xDocument;
};

View File

@ -90,6 +90,7 @@ namespace dbmm
using ::com::sun::star::uno::RuntimeException;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::sdb::XOfficeDatabaseDocument;
using ::com::sun::star::sdb::XFormDocumentsSupplier;
using ::com::sun::star::sdb::XReportDocumentsSupplier;
@ -857,7 +858,7 @@ namespace dbmm
{
public:
MigrationEngine_Impl(
const ::comphelper::ComponentContext& _rContext,
const Reference<XComponentContext>& _rContext,
const Reference< XOfficeDatabaseDocument >& _rxDocument,
IMigrationProgress& _rProgress,
MigrationLog& _rLogger
@ -869,7 +870,7 @@ namespace dbmm
bool migrateAll();
private:
::comphelper::ComponentContext m_aContext;
Reference<XComponentContext> m_aContext;
const Reference< XOfficeDatabaseDocument > m_xDocument;
const Reference< XModel > m_xDocumentModel;
IMigrationProgress& m_rProgress;
@ -983,7 +984,7 @@ namespace dbmm
//= MigrationEngine_Impl - implementation
//====================================================================
//--------------------------------------------------------------------
MigrationEngine_Impl::MigrationEngine_Impl( const ::comphelper::ComponentContext& _rContext,
MigrationEngine_Impl::MigrationEngine_Impl( const Reference<XComponentContext>& _rContext,
const Reference< XOfficeDatabaseDocument >& _rxDocument, IMigrationProgress& _rProgress, MigrationLog& _rLogger )
:m_aContext( _rContext )
,m_xDocument( _rxDocument )
@ -1497,12 +1498,12 @@ namespace dbmm
if ( _eScriptType == eBasic )
{
xTargetLibraries.set( DocumentScriptLibraryContainer::create(
m_aContext.getUNOContext(), xStorageDoc ), UNO_QUERY_THROW );
m_aContext, xStorageDoc ), UNO_QUERY_THROW );
}
else
{
xTargetLibraries.set( DocumentDialogLibraryContainer::create(
m_aContext.getUNOContext(), xStorageDoc ), UNO_QUERY_THROW );
m_aContext, xStorageDoc ), UNO_QUERY_THROW );
}
// copy all libs to the target, with potentially renaming them
@ -1637,7 +1638,7 @@ namespace dbmm
}
// analyze the script URI
Reference< XUriReferenceFactory > xUriRefFac = UriReferenceFactory::create( m_aContext.getUNOContext() );
Reference< XUriReferenceFactory > xUriRefFac = UriReferenceFactory::create( m_aContext );
Reference< XVndSunStarScriptUrlReference > xUri( xUriRefFac->parse( _inout_rScriptCode ), UNO_QUERY_THROW );
OUString sScriptLanguage = xUri->getParameter( OUString( "language" ) );
@ -1821,8 +1822,8 @@ namespace dbmm
Reference< XInputStreamProvider > xISP( _inout_rDialogLibraryElement, UNO_QUERY_THROW );
Reference< XInputStream > xInput( xISP->createInputStream(), UNO_QUERY_THROW );
Reference< XNameContainer > xDialogModel( m_aContext.createComponent( "com.sun.star.awt.UnoControlDialogModel" ), UNO_QUERY_THROW );
::xmlscript::importDialogModel( xInput, xDialogModel, m_aContext.getUNOContext(), m_xDocumentModel );
Reference< XNameContainer > xDialogModel( m_aContext->getServiceManager()->createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", m_aContext), UNO_QUERY_THROW );
::xmlscript::importDialogModel( xInput, xDialogModel, m_aContext, m_xDocumentModel );
// adjust the events of the dialog
impl_adjustDialogElementEvents_throw( xDialogModel );
@ -1837,7 +1838,7 @@ namespace dbmm
}
// export dialog model
xISP = ::xmlscript::exportDialogModel( xDialogModel, m_aContext.getUNOContext(), m_xDocumentModel );
xISP = ::xmlscript::exportDialogModel( xDialogModel, m_aContext, m_xDocumentModel );
_inout_rDialogLibraryElement <<= xISP;
}
catch( const Exception& )
@ -1944,7 +1945,7 @@ namespace dbmm
//= MigrationEngine
//====================================================================
//--------------------------------------------------------------------
MigrationEngine::MigrationEngine( const ::comphelper::ComponentContext& _rContext,
MigrationEngine::MigrationEngine( const Reference<XComponentContext>& _rContext,
const Reference< XOfficeDatabaseDocument >& _rxDocument, IMigrationProgress& _rProgress,
MigrationLog& _rLogger )
:m_pImpl( new MigrationEngine_Impl( _rContext, _rxDocument, _rProgress, _rLogger ) )

View File

@ -22,14 +22,8 @@
#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
#include <comphelper/componentcontext.hxx>
#include <memory>
namespace comphelper {
class ComponentContext;
}
//........................................................................
namespace dbmm
{
@ -53,7 +47,7 @@ namespace dbmm
passed herein as reference, must live as long as the engine instance lives.
*/
MigrationEngine(
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::sdb::XOfficeDatabaseDocument >& _rxDocument,
IMigrationProgress& _rProgress,
MigrationLog& _rLogger

View File

@ -52,7 +52,6 @@
#include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
#include <com/sun/star/frame/XLoadable.hpp>
#include <comphelper/componentcontext.hxx>
#include <comphelper/documentconstants.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/processfactory.hxx>
@ -96,10 +95,10 @@ namespace dbaxml
class DBTypeDetection : public ::cppu::WeakImplHelper2< XExtendedFilterDetection, XServiceInfo>
{
::comphelper::ComponentContext m_aContext;
const Reference< XComponentContext > m_aContext;
public:
DBTypeDetection(const Reference< XMultiServiceFactory >&);
DBTypeDetection(const Reference< XComponentContext >&);
// XServiceInfo
OUString SAL_CALL getImplementationName() throw( );
@ -118,8 +117,8 @@ public:
virtual OUString SAL_CALL detect( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Descriptor ) throw (::com::sun::star::uno::RuntimeException);
};
// -------------------------------------------------------------------------
DBTypeDetection::DBTypeDetection(const Reference< XMultiServiceFactory >& _rxFactory)
:m_aContext( _rxFactory )
DBTypeDetection::DBTypeDetection(const Reference< XComponentContext >& _rxContext)
:m_aContext( _rxContext )
{
}
// -------------------------------------------------------------------------
@ -137,7 +136,7 @@ OUString SAL_CALL DBTypeDetection::detect( ::com::sun::star::uno::Sequence< ::co
{
bStreamFromDescr = sal_True;
xStorageProperties.set( ::comphelper::OStorageHelper::GetStorageFromInputStream(
xInStream, m_aContext.getUNOContext() ), UNO_QUERY );
xInStream, m_aContext ), UNO_QUERY );
}
else
{
@ -147,7 +146,7 @@ OUString SAL_CALL DBTypeDetection::detect( ::com::sun::star::uno::Sequence< ::co
if ( !sFileLocation.isEmpty() )
{
xStorageProperties.set( ::comphelper::OStorageHelper::GetStorageFromURL(
sFileLocation, ElementModes::READ, m_aContext.getUNOContext() ), UNO_QUERY );
sFileLocation, ElementModes::READ, m_aContext ), UNO_QUERY );
}
}
@ -186,7 +185,7 @@ OUString SAL_CALL DBTypeDetection::detect( ::com::sun::star::uno::Sequence< ::co
// -------------------------------------------------------------------------
Reference< XInterface > SAL_CALL DBTypeDetection::Create( const Reference< XMultiServiceFactory > & rSMgr )
{
return *(new DBTypeDetection(rSMgr));
return *(new DBTypeDetection( comphelper::getComponentContext(rSMgr) ));
}
// -------------------------------------------------------------------------
// XServiceInfo
@ -231,14 +230,14 @@ extern "C" void SAL_CALL createRegistryInfo_DBTypeDetection()
class DBContentLoader : public ::cppu::WeakImplHelper2< XFrameLoader, XServiceInfo>
{
private:
::comphelper::ComponentContext m_aContext;
const Reference< XComponentContext > m_aContext;
Reference< XFrameLoader > m_xMySelf;
OUString m_sCurrentURL;
sal_uLong m_nStartWizard;
DECL_LINK( OnStartTableWizard, void* );
public:
DBContentLoader(const Reference< XMultiServiceFactory >&);
DBContentLoader(const Reference< XComponentContext >&);
~DBContentLoader();
// XServiceInfo
@ -266,7 +265,7 @@ private:
};
DBG_NAME(DBContentLoader)
DBContentLoader::DBContentLoader(const Reference< XMultiServiceFactory >& _rxFactory)
DBContentLoader::DBContentLoader(const Reference< XComponentContext >& _rxFactory)
:m_aContext( _rxFactory )
,m_nStartWizard(0)
{
@ -285,7 +284,7 @@ DBContentLoader::~DBContentLoader()
// -------------------------------------------------------------------------
Reference< XInterface > SAL_CALL DBContentLoader::Create( const Reference< XMultiServiceFactory > & rSMgr )
{
return *(new DBContentLoader(rSMgr));
return *(new DBContentLoader( comphelper::getComponentContext(rSMgr) ));
}
// -------------------------------------------------------------------------
// XServiceInfo
@ -325,12 +324,12 @@ Sequence< OUString > DBContentLoader::getSupportedServiceNames_Static(void) thro
namespace
{
// ...................................................................
sal_Bool lcl_urlAllowsInteraction( const ::comphelper::ComponentContext& _rContext, const OUString& _rURL )
sal_Bool lcl_urlAllowsInteraction( const Reference<XComponentContext> & _rContext, const OUString& _rURL )
{
bool bDoesAllow = sal_False;
try
{
Reference< XURLTransformer > xTransformer( URLTransformer::create(_rContext.getUNOContext()) );
Reference< XURLTransformer > xTransformer( URLTransformer::create(_rContext) );
URL aURL;
aURL.Complete = _rURL;
xTransformer->parseStrict( aURL );
@ -371,7 +370,7 @@ sal_Bool DBContentLoader::impl_executeNewDatabaseWizard( Reference< XModel >& _r
aWizardArgs[0] <<= PropertyValue(
OUString("ParentWindow"),
0,
makeAny( lcl_getTopMostWindow( m_aContext.getUNOContext() ) ),
makeAny( lcl_getTopMostWindow( m_aContext ) ),
PropertyState_DIRECT_VALUE);
aWizardArgs[1] <<= PropertyValue(
@ -381,11 +380,10 @@ sal_Bool DBContentLoader::impl_executeNewDatabaseWizard( Reference< XModel >& _r
PropertyState_DIRECT_VALUE);
// create the dialog
Reference< XExecutableDialog > xAdminDialog;
OSL_VERIFY( m_aContext.createComponentWithArguments( "com.sun.star.sdb.DatabaseWizardDialog", aWizardArgs, xAdminDialog ) );
Reference< XExecutableDialog > xAdminDialog( m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.sdb.DatabaseWizardDialog", aWizardArgs, m_aContext), UNO_QUERY_THROW);
// execute it
if ( !xAdminDialog.is() || ( RET_OK != xAdminDialog->execute() ) )
if ( RET_OK != xAdminDialog->execute() )
return sal_False;
Reference<XPropertySet> xProp(xAdminDialog,UNO_QUERY);
@ -426,7 +424,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
// not touch it.
if ( !aMediaDesc.has( "InteractionHandler" ) )
{
Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext, 0) );
aMediaDesc.put( "InteractionHandler", xHandler );
}
@ -442,7 +440,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
sal_Int32 nInitialSelection = -1;
if ( !xModel.is() )
{
Reference< XDatabaseContext > xDatabaseContext( DatabaseContext::create(m_aContext.getUNOContext()) );
Reference< XDatabaseContext > xDatabaseContext( DatabaseContext::create(m_aContext) );
OUString sFactoryName = SvtModuleOptions().GetFactoryEmptyDocumentURL(SvtModuleOptions::E_DATABASE);
bCreateNew = sFactoryName.match(_rURL);
@ -598,8 +596,8 @@ IMPL_LINK( DBContentLoader, OnStartTableWizard, void*, /*NOTINTERESTEDIN*/ )
aWizArgs[0] <<= aValue;
SolarMutexGuard aGuard;
Reference< XJobExecutor > xTableWizard;
if ( m_aContext.createComponentWithArguments( "com.sun.star.wizards.table.CallTableWizard", aWizArgs, xTableWizard ) )
Reference< XJobExecutor > xTableWizard( m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.wizards.table.CallTableWizard", aWizArgs, m_aContext), UNO_QUERY);
if ( xTableWizard.is() )
xTableWizard->trigger(OUString("start"));
}
catch(const Exception&)

View File

@ -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 )
{
}

View File

@ -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 ) ) );
}
//--------------------------------------------------------------------

View File

@ -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);

View File

@ -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 )
{

View File

@ -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
);

View File

@ -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 )
{

View File

@ -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
);

View File

@ -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 )
{

View File

@ -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
);

View File

@ -77,7 +77,6 @@
#include <comphelper/uno3.hxx>
#include <comphelper/types.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <vcl/msgbox.hxx>
@ -3010,11 +3009,11 @@ void OApplicationController::impl_migrateScripts_nothrow()
try
{
OUString sDialogService("com.sun.star.sdb.application.MacroMigrationWizard");
::comphelper::ComponentContext aContext( getORB() );
Reference<XComponentContext> aContext( getORB() );
Sequence< Any > aDialogArgs(1);
aDialogArgs[0] <<= Reference< XOfficeDatabaseDocument >( m_xModel, UNO_QUERY_THROW );
Reference< XExecutableDialog > xDialog(
aContext.createComponentWithArguments( sDialogService, aDialogArgs ),
aContext->getServiceManager()->createInstanceWithArgumentsAndContext(sDialogService, aDialogArgs, aContext),
UNO_QUERY );
if ( !xDialog.is() )

View File

@ -41,7 +41,6 @@
#include <com/sun/star/sdbc/XDataSource.hpp>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase2.hxx>
#include <toolkit/awt/vclxwindow.hxx>

View File

@ -72,7 +72,6 @@
#endif //_ADO_DATALINK_BROWSE_
#include <com/sun/star/mozilla/XMozillaBootstrap.hpp>
#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>

View File

@ -53,7 +53,7 @@ protected:
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xActiveConnection;
protected:
ODatabaseAdministrationDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
ODatabaseAdministrationDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
virtual ~ODatabaseAdministrationDialog();
protected:
// OGenericUnoDialog overridables

View File

@ -40,7 +40,7 @@ protected:
// </properties>
protected:
OSQLMessageDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
OSQLMessageDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
public:
// XTypeProvider

View File

@ -39,7 +39,6 @@
#include <unotools/ucbhelper.hxx>
#include <tools/urlobj.hxx>
#include <tools/diagnose_ex.h>
#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
@ -105,9 +104,9 @@ void OTableCopyHelper::insertTable( const ::rtl::OUString& i_rSourceDataSource,
return;
}
::comphelper::ComponentContext aContext( m_pController->getORB() );
Reference<XComponentContext> aContext( m_pController->getORB() );
Reference< XDataAccessDescriptorFactory > xFactory( DataAccessDescriptorFactory::get( aContext.getUNOContext() ) );
Reference< XDataAccessDescriptorFactory > xFactory( DataAccessDescriptorFactory::get( aContext ) );
Reference< XPropertySet > xSource( xFactory->createDataAccessDescriptor(), UNO_SET_THROW );
xSource->setPropertyValue( PROPERTY_COMMAND_TYPE, makeAny( i_nCommandType ) );
@ -120,7 +119,7 @@ void OTableCopyHelper::insertTable( const ::rtl::OUString& i_rSourceDataSource,
Reference< XPropertySet > xDest( xFactory->createDataAccessDescriptor(), UNO_SET_THROW );
xDest->setPropertyValue( PROPERTY_ACTIVE_CONNECTION, makeAny( i_rDestConnection ) );
Reference< XCopyTableWizard > xWizard( CopyTableWizard::create( aContext.getUNOContext(), xSource, xDest ), UNO_SET_THROW );
Reference< XCopyTableWizard > xWizard( CopyTableWizard::create( aContext, xSource, xDest ), UNO_SET_THROW );
::rtl::OUString sTableNameForAppend( GetTableNameForAppend() );
xWizard->setDestinationTableName( GetTableNameForAppend() );

View File

@ -71,7 +71,6 @@
#include "FieldDescriptions.hxx"
#include <comphelper/processfactory.hxx>
#include <comphelper/stl_types.hxx>
#include <comphelper/componentcontext.hxx>
#include <svx/svxids.hrc>

View File

@ -21,6 +21,7 @@
#include "unoadmin.hxx"
#include "dbu_reghelper.hxx"
#include "advancedsettingsdlg.hxx"
#include <comphelper/processfactory.hxx>
//.........................................................................
namespace dbaui
@ -40,7 +41,7 @@ namespace dbaui
{
protected:
OAdvancedSettingsDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
OAdvancedSettingsDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
public:
// XTypeProvider
@ -69,7 +70,7 @@ namespace dbaui
//=========================================================================
//-------------------------------------------------------------------------
OAdvancedSettingsDialog::OAdvancedSettingsDialog(const Reference< XMultiServiceFactory >& _rxORB)
OAdvancedSettingsDialog::OAdvancedSettingsDialog(const Reference< XComponentContext >& _rxORB)
:ODatabaseAdministrationDialog(_rxORB)
{
}
@ -83,7 +84,7 @@ namespace dbaui
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OAdvancedSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
return *(new OAdvancedSettingsDialog(_rxFactory));
return *(new OAdvancedSettingsDialog( comphelper::getComponentContext(_rxFactory) ));
}
//-------------------------------------------------------------------------
@ -135,7 +136,7 @@ namespace dbaui
//------------------------------------------------------------------------------
Dialog* OAdvancedSettingsDialog::createDialog(Window* _pParent)
{
AdvancedSettingsDialog* pDlg = new AdvancedSettingsDialog(_pParent, m_pDatasourceItems, m_aContext.getUNOContext(),m_aInitialSelection);
AdvancedSettingsDialog* pDlg = new AdvancedSettingsDialog(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
return pDlg;
}

View File

@ -21,6 +21,7 @@
#include "dbu_reghelper.hxx"
#include "DBTypeWizDlg.hxx"
#include "dbwiz.hxx"
#include <comphelper/processfactory.hxx>
using namespace dbaui;
@ -40,7 +41,7 @@ namespace dbaui
//=========================================================================
//-------------------------------------------------------------------------
ODBTypeWizDialog::ODBTypeWizDialog(const Reference< XMultiServiceFactory >& _rxORB)
ODBTypeWizDialog::ODBTypeWizDialog(const Reference< XComponentContext >& _rxORB)
:ODatabaseAdministrationDialog(_rxORB)
{
}
@ -54,7 +55,7 @@ Sequence<sal_Int8> SAL_CALL ODBTypeWizDialog::getImplementationId( ) throw(Runt
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODBTypeWizDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
return *(new ODBTypeWizDialog(_rxFactory));
return *(new ODBTypeWizDialog( comphelper::getComponentContext(_rxFactory) ));
}
//-------------------------------------------------------------------------
@ -106,7 +107,7 @@ Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialog::getPropertySetInfo() thr
//------------------------------------------------------------------------------
Dialog* ODBTypeWizDialog::createDialog(Window* _pParent)
{
ODbTypeWizDialog* pDlg = new ODbTypeWizDialog(_pParent, m_pDatasourceItems, m_aContext.getUNOContext(),m_aInitialSelection);
ODbTypeWizDialog* pDlg = new ODbTypeWizDialog(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
return pDlg;
}

View File

@ -37,7 +37,7 @@ class ODBTypeWizDialog
{
protected:
ODBTypeWizDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
ODBTypeWizDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
public:
// XTypeProvider

View File

@ -26,6 +26,7 @@
#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
#include <vcl/msgbox.hxx>
#include <comphelper/processfactory.hxx>
using namespace dbaui;
@ -47,7 +48,7 @@ namespace dbaui
//=========================================================================
//-------------------------------------------------------------------------
ODBTypeWizDialogSetup::ODBTypeWizDialogSetup(const Reference< XMultiServiceFactory >& _rxORB)
ODBTypeWizDialogSetup::ODBTypeWizDialogSetup(const Reference< XComponentContext >& _rxORB)
:ODatabaseAdministrationDialog(_rxORB)
,m_bOpenDatabase(sal_True)
,m_bStartTableWizard(sal_False)
@ -68,7 +69,7 @@ Sequence<sal_Int8> SAL_CALL ODBTypeWizDialogSetup::getImplementationId( ) throw
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODBTypeWizDialogSetup::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
Reference < XInterface > xDBWizard = *(new ODBTypeWizDialogSetup(_rxFactory));
Reference < XInterface > xDBWizard = *(new ODBTypeWizDialogSetup( comphelper::getComponentContext(_rxFactory) ));
return xDBWizard;
}
@ -120,7 +121,7 @@ Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialogSetup::getPropertySetInfo(
//------------------------------------------------------------------------------
Dialog* ODBTypeWizDialogSetup::createDialog(Window* _pParent)
{
return new ODbTypeWizDialogSetup(_pParent, m_pDatasourceItems, m_aContext.getUNOContext(), m_aInitialSelection);
return new ODbTypeWizDialogSetup(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
}
// -----------------------------------------------------------------------------
void ODBTypeWizDialogSetup::executedDialog(sal_Int16 _nExecutionResult)

View File

@ -40,7 +40,7 @@ class ODBTypeWizDialogSetup
sal_Bool m_bStartTableWizard;
protected:
ODBTypeWizDialogSetup(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
ODBTypeWizDialogSetup(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
public:
// XTypeProvider

View File

@ -21,6 +21,7 @@
#include "dbu_reghelper.hxx"
#include "TableFilterDlg.hxx"
#include "TablesSingleDlg.hxx"
#include <comphelper/processfactory.hxx>
using namespace dbaui;
@ -41,7 +42,7 @@ namespace dbaui
//=========================================================================
//-------------------------------------------------------------------------
OTableFilterDialog::OTableFilterDialog(const Reference< XMultiServiceFactory >& _rxORB)
OTableFilterDialog::OTableFilterDialog(const Reference< XComponentContext >& _rxORB)
:ODatabaseAdministrationDialog(_rxORB)
{
}
@ -55,7 +56,7 @@ Sequence<sal_Int8> SAL_CALL OTableFilterDialog::getImplementationId( ) throw(Ru
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OTableFilterDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
return *(new OTableFilterDialog(_rxFactory));
return *(new OTableFilterDialog( comphelper::getComponentContext(_rxFactory) ));
}
//-------------------------------------------------------------------------
@ -107,7 +108,7 @@ Reference<XPropertySetInfo> SAL_CALL OTableFilterDialog::getPropertySetInfo() t
//------------------------------------------------------------------------------
Dialog* OTableFilterDialog::createDialog(Window* _pParent)
{
OTableSubscriptionDialog* pDlg = new OTableSubscriptionDialog(_pParent, m_pDatasourceItems, m_aContext.getUNOContext(), m_aInitialSelection);
OTableSubscriptionDialog* pDlg = new OTableSubscriptionDialog(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
return pDlg;
}

View File

@ -37,7 +37,7 @@ class OTableFilterDialog
{
protected:
OTableFilterDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
OTableFilterDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
public:
// XTypeProvider

View File

@ -21,6 +21,7 @@
#include "dbu_reghelper.hxx"
#include "UserSettingsDlg.hxx"
#include "UserAdminDlg.hxx"
#include <comphelper/processfactory.hxx>
using namespace dbaui;
@ -41,7 +42,7 @@ namespace dbaui
//=========================================================================
//-------------------------------------------------------------------------
OUserSettingsDialog::OUserSettingsDialog(const Reference< XMultiServiceFactory >& _rxORB)
OUserSettingsDialog::OUserSettingsDialog(const Reference< XComponentContext >& _rxORB)
:ODatabaseAdministrationDialog(_rxORB)
{
}
@ -55,7 +56,7 @@ Sequence<sal_Int8> SAL_CALL OUserSettingsDialog::getImplementationId( ) throw(R
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OUserSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
return *(new OUserSettingsDialog(_rxFactory));
return *(new OUserSettingsDialog( comphelper::getComponentContext(_rxFactory) ));
}
//-------------------------------------------------------------------------
@ -107,7 +108,7 @@ Reference<XPropertySetInfo> SAL_CALL OUserSettingsDialog::getPropertySetInfo()
//------------------------------------------------------------------------------
Dialog* OUserSettingsDialog::createDialog(Window* _pParent)
{
OUserAdminDlg* pDlg = new OUserAdminDlg(_pParent, m_pDatasourceItems, m_aContext.getUNOContext(),m_aInitialSelection,m_xActiveConnection);
OUserAdminDlg* pDlg = new OUserAdminDlg(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection, m_xActiveConnection);
return pDlg;
}

View File

@ -37,7 +37,7 @@ class OUserSettingsDialog
{
protected:
OUserSettingsDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
OUserSettingsDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
public:
// XTypeProvider

View File

@ -21,6 +21,7 @@
#include "dbu_reghelper.hxx"
#include "admindlg.hxx"
#include "dbadmin.hxx"
#include <comphelper/processfactory.hxx>
using namespace dbaui;
@ -41,7 +42,7 @@ namespace dbaui
//=========================================================================
//-------------------------------------------------------------------------
ODataSourcePropertyDialog::ODataSourcePropertyDialog(const Reference< XMultiServiceFactory >& _rxORB)
ODataSourcePropertyDialog::ODataSourcePropertyDialog(const Reference< XComponentContext >& _rxORB)
:ODatabaseAdministrationDialog(_rxORB)
{
}
@ -55,7 +56,7 @@ Sequence<sal_Int8> SAL_CALL ODataSourcePropertyDialog::getImplementationId( ) t
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODataSourcePropertyDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
return *(new ODataSourcePropertyDialog(_rxFactory));
return *(new ODataSourcePropertyDialog( comphelper::getComponentContext(_rxFactory) ));
}
//-------------------------------------------------------------------------
@ -108,7 +109,7 @@ Reference<XPropertySetInfo> SAL_CALL ODataSourcePropertyDialog::getPropertySetI
Dialog* ODataSourcePropertyDialog::createDialog(Window* _pParent)
{
ODbAdminDialog* pDialog = new ODbAdminDialog(_pParent, m_pDatasourceItems, m_aContext.getUNOContext());
ODbAdminDialog* pDialog = new ODbAdminDialog(_pParent, m_pDatasourceItems, m_aContext);
// the initial selection
if ( m_aInitialSelection.hasValue() )

View File

@ -37,7 +37,7 @@ class ODataSourcePropertyDialog
{
protected:
ODataSourcePropertyDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
ODataSourcePropertyDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
public:
// XTypeProvider

View File

@ -25,6 +25,7 @@
#include "dbustrings.hrc"
#include "queryfilter.hxx"
#include "queryorder.hxx"
#include <comphelper/processfactory.hxx>
#include <connectivity/dbtools.hxx>
#include <tools/diagnose_ex.h>
#include <osl/diagnose.h>
@ -59,7 +60,7 @@ namespace dbaui
//=====================================================================
DBG_NAME(ComposerDialog)
//---------------------------------------------------------------------
ComposerDialog::ComposerDialog(const Reference< XMultiServiceFactory >& _rxORB)
ComposerDialog::ComposerDialog(const Reference< XComponentContext >& _rxORB)
:OGenericUnoDialog( _rxORB )
{
DBG_CTOR(ComposerDialog,NULL);
@ -101,7 +102,7 @@ namespace dbaui
// fallback: if there is a connection and thus a row set, but no composer, create one
if ( xConnection.is() && !m_xComposer.is() )
m_xComposer = ::dbtools::getCurrentSettingsComposer( Reference< XPropertySet >( m_xRowSet, UNO_QUERY ), m_aContext.getUNOContext() );
m_xComposer = ::dbtools::getCurrentSettingsComposer( Reference< XPropertySet >( m_xRowSet, UNO_QUERY ), m_aContext );
// the columns of the row set
Reference< XColumnsSupplier > xSuppColumns( m_xRowSet, UNO_QUERY );
@ -135,18 +136,27 @@ namespace dbaui
//= RowsetFilterDialog
//=====================================================================
//---------------------------------------------------------------------
RowsetFilterDialog::RowsetFilterDialog( const Reference< XMultiServiceFactory >& _rxORB )
RowsetFilterDialog::RowsetFilterDialog( const Reference< XComponentContext >& _rxORB )
:ComposerDialog( _rxORB )
{
}
//---------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO1_STATIC( RowsetFilterDialog, "com.sun.star.uno.comp.sdb.RowsetFilterDialog", "com.sun.star.sdb.FilterDialog" )
IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(RowsetFilterDialog, "com.sun.star.uno.comp.sdb.RowsetFilterDialog")
IMPLEMENT_SERVICE_INFO_SUPPORTS(RowsetFilterDialog)
IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(RowsetFilterDialog, "com.sun.star.sdb.FilterDialog")
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL RowsetFilterDialog::Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB)
{
return static_cast< XServiceInfo* >(new RowsetFilterDialog( comphelper::getComponentContext(_rxORB)));
}
//---------------------------------------------------------------------
Dialog* RowsetFilterDialog::createComposerDialog( Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns )
{
return new DlgFilterCrit( _pParent, m_aContext.getUNOContext(), _rxConnection, m_xComposer, _rxColumns );
return new DlgFilterCrit( _pParent, m_aContext, _rxConnection, m_xComposer, _rxColumns );
}
void SAL_CALL RowsetFilterDialog::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException)
@ -181,13 +191,21 @@ namespace dbaui
//= RowsetOrderDialog
//=====================================================================
//---------------------------------------------------------------------
RowsetOrderDialog::RowsetOrderDialog( const Reference< XMultiServiceFactory >& _rxORB )
RowsetOrderDialog::RowsetOrderDialog( const Reference< XComponentContext >& _rxORB )
:ComposerDialog( _rxORB )
{
}
//---------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO1_STATIC( RowsetOrderDialog, "com.sun.star.uno.comp.sdb.RowsetOrderDialog", "com.sun.star.sdb.OrderDialog" )
IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(RowsetOrderDialog, "com.sun.star.uno.comp.sdb.RowsetOrderDialog")
IMPLEMENT_SERVICE_INFO_SUPPORTS(RowsetOrderDialog)
IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(RowsetOrderDialog, "com.sun.star.sdb.OrderDialog")
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL RowsetOrderDialog::Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB)
{
return static_cast< XServiceInfo* >(new RowsetOrderDialog( comphelper::getComponentContext(_rxORB)));
}
//---------------------------------------------------------------------
Dialog* RowsetOrderDialog::createComposerDialog( Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns )

View File

@ -55,7 +55,7 @@ namespace dbaui
// </properties>
protected:
ComposerDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
ComposerDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
~ComposerDialog();
public:
@ -83,7 +83,7 @@ namespace dbaui
{
public:
RowsetFilterDialog(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB
);
DECLARE_SERVICE_INFO_STATIC( );
@ -110,7 +110,7 @@ namespace dbaui
{
public:
RowsetOrderDialog(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB
);
DECLARE_SERVICE_INFO_STATIC( );

View File

@ -55,7 +55,7 @@
#include <com/sun/star/sdbc/DriverManager.hpp>
#include <com/sun/star/sdbc/ConnectionPool.hpp>
#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/proparrhlp.hxx>
@ -87,6 +87,7 @@ namespace dbaui
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::beans::XPropertySetInfo;
using ::com::sun::star::lang::XMultiServiceFactory;
using ::com::sun::star::beans::Property;
@ -193,7 +194,7 @@ namespace dbaui
bool isInitialized() const { return m_xSourceConnection.is() && m_pSourceObject.get() && m_xDestConnection.is(); }
protected:
CopyTableWizard( const Reference< XMultiServiceFactory >& _rxORB );
CopyTableWizard( const Reference< XComponentContext >& _rxORB );
~CopyTableWizard();
// OGenericUnoDialog overridables
@ -338,7 +339,7 @@ namespace dbaui
const CopyTableRowEvent& _rEvent );
private:
::comphelper::ComponentContext m_aContext;
Reference<XComponentContext> m_xContext;
// attributes
sal_Int16 m_nOperation;
@ -392,9 +393,9 @@ private:
//=========================================================================
//-------------------------------------------------------------------------
CopyTableWizard::CopyTableWizard( const Reference< XMultiServiceFactory >& _rxORB )
CopyTableWizard::CopyTableWizard( const Reference< XComponentContext >& _rxORB )
:CopyTableWizard_Base( _rxORB )
,m_aContext( _rxORB )
,m_xContext( _rxORB )
,m_nOperation( CopyTableOperation::CopyDefinitionAndData )
,m_sDestinationTable()
,m_aPrimaryKeyName( sal_False, "ID" )
@ -432,7 +433,7 @@ CopyTableWizard::~CopyTableWizard()
//-------------------------------------------------------------------------
Reference< XInterface > CopyTableWizard::Create( const Reference< XMultiServiceFactory >& _rxFactory )
{
return *( new CopyTableWizard( _rxFactory ) );
return *( new CopyTableWizard( comphelper::getComponentContext(_rxFactory) ) );
}
//-------------------------------------------------------------------------
@ -911,7 +912,7 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference<
OSL_VERIFY( _rxDataSourceDescriptor->getPropertyValue( PROPERTY_DATABASE_LOCATION ) >>= sDatabaseLocation );
// need a DatabaseContext for loading the data source
Reference< XDatabaseContext > xDatabaseContext = DatabaseContext::create( m_aContext.getUNOContext() );
Reference< XDatabaseContext > xDatabaseContext = DatabaseContext::create( m_xContext );
Reference< XDataSource > xDataSource;
if ( !sDataSource.isEmpty() )
xDataSource.set( xDatabaseContext->getByName( sDataSource ), UNO_QUERY_THROW );
@ -950,11 +951,11 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference<
Reference< XDriverManager > xDriverManager;
try {
xDriverManager.set( ConnectionPool::create( m_aContext.getUNOContext() ), UNO_QUERY_THROW );
xDriverManager.set( ConnectionPool::create( m_xContext ), UNO_QUERY_THROW );
} catch( const Exception& ) { }
if ( !xDriverManager.is() )
// no connection pool installed
xDriverManager.set( DriverManager::create(m_aContext.getUNOContext() ), UNO_QUERY_THROW );
xDriverManager.set( DriverManager::create( m_xContext ), UNO_QUERY_THROW );
if ( aConnectionInfo.getLength() )
xConnection.set( xDriverManager->getConnectionWithInfo( sConnectionResource, aConnectionInfo ), UNO_SET_THROW );
@ -1540,7 +1541,7 @@ void SAL_CALL CopyTableWizard::initialize( const Sequence< Any >& _rArguments )
);
}
if ( !m_xInteractionHandler.is() )
m_xInteractionHandler.set( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0), UNO_QUERY );
m_xInteractionHandler.set( InteractionHandler::createWithParent(m_xContext, 0), UNO_QUERY );
Reference< XInteractionHandler > xSourceDocHandler;
Reference< XPropertySet > xSourceDescriptor( impl_ensureDataAccessDescriptor_throw( _rArguments, 0, m_xSourceConnection, xSourceDocHandler ) );
@ -1593,7 +1594,7 @@ Dialog* CopyTableWizard::createDialog( Window* _pParent )
*m_pSourceObject,
m_xSourceConnection.getTyped(),
m_xDestConnection.getTyped(),
m_aContext.getUNOContext(),
m_xContext,
m_xInteractionHandler
);

View File

@ -30,7 +30,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/sdb/XTextConnectionSettings.hpp>
#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <svtools/genericunodialog.hxx>
#include <cppuhelper/implbase1.hxx>
@ -48,6 +48,7 @@ namespace dbaui
using ::com::sun::star::uno::RuntimeException;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::beans::XPropertySetInfo;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::beans::Property;
@ -74,7 +75,7 @@ namespace dbaui
PropertyValues m_aPropertyValues;
protected:
OTextConnectionSettingsDialog( const ::comphelper::ComponentContext& _rContext );
OTextConnectionSettingsDialog( const Reference<XComponentContext>& _rContext );
virtual ~OTextConnectionSettingsDialog();
public:
@ -116,8 +117,8 @@ namespace dbaui
//= OTextConnectionSettingsDialog
//====================================================================
//--------------------------------------------------------------------
OTextConnectionSettingsDialog::OTextConnectionSettingsDialog( const ::comphelper::ComponentContext& _rContext )
:OTextConnectionSettingsDialog_BASE( _rContext.getLegacyServiceFactory() )
OTextConnectionSettingsDialog::OTextConnectionSettingsDialog( const Reference<XComponentContext>& _rContext )
:OTextConnectionSettingsDialog_BASE( _rContext )
{
TextConnectionSettingsDialog::bindItemStorages( *m_pDatasourceItems, m_aPropertyValues );
}
@ -131,7 +132,15 @@ namespace dbaui
IMPLEMENT_IMPLEMENTATION_ID( OTextConnectionSettingsDialog )
//---------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO1_STATIC( OTextConnectionSettingsDialog, "com.sun.star.comp.dbaccess.OTextConnectionSettingsDialog", "com.sun.star.sdb.TextConnectionSettings" )
IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(OTextConnectionSettingsDialog, "com.sun.star.comp.dbaccess.OTextConnectionSettingsDialog")
IMPLEMENT_SERVICE_INFO_SUPPORTS(OTextConnectionSettingsDialog)
IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(OTextConnectionSettingsDialog, "com.sun.star.sdb.TextConnectionSettings")
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL OTextConnectionSettingsDialog::Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB)
{
return static_cast< XServiceInfo* >(new OTextConnectionSettingsDialog( comphelper::getComponentContext(_rxORB)));
}
//---------------------------------------------------------------------
Reference< XPropertySetInfo > SAL_CALL OTextConnectionSettingsDialog::getPropertySetInfo() throw(RuntimeException)

Some files were not shown because too many files have changed in this diff Show More