summaryrefslogtreecommitdiff
path: root/connectivity/source/manager/mdrivermanager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/manager/mdrivermanager.cxx')
-rw-r--r--connectivity/source/manager/mdrivermanager.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index 42ac5d37c566..49cff889a686 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -125,7 +125,8 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W
// we did not load this driver, yet
if ( _rDescriptor.xComponentFactory.is() )
// we have a factory for it
- const_cast< DriverAccess& >( _rDescriptor ).xDriver = _rDescriptor.xDriver.query( _rDescriptor.xComponentFactory->createInstance() );
+ const_cast< DriverAccess& >( _rDescriptor ).xDriver = _rDescriptor.xDriver.query(
+ _rDescriptor.xComponentFactory->createInstanceWithContext( _rDescriptor.xUNOContext ) );
return _rDescriptor;
}
};
@@ -318,7 +319,7 @@ void OSDBCDriverManager::bootstrapDrivers()
OSL_ENSURE( xEnumDrivers.is(), "OSDBCDriverManager::bootstrapDrivers: no enumeration for the drivers available!" );
if (xEnumDrivers.is())
{
- Reference< XSingleServiceFactory > xFactory;
+ Reference< XSingleComponentFactory > xFactory;
Reference< XServiceInfo > xSI;
while (xEnumDrivers->hasMoreElements())
{
@@ -337,6 +338,7 @@ void OSDBCDriverManager::bootstrapDrivers()
{ // yes -> no need to load the driver immediately (load it later when needed)
aDriverDescriptor.sImplementationName = xSI->getImplementationName();
aDriverDescriptor.xComponentFactory = xFactory;
+ aDriverDescriptor.xUNOContext = m_aContext.getUNOContext();
bValidDescriptor = sal_True;
m_aEventLogger.log( LogLevel::CONFIG,
@@ -347,7 +349,7 @@ void OSDBCDriverManager::bootstrapDrivers()
else
{
// no -> create the driver
- Reference< XDriver > xDriver( xFactory->createInstance(), UNO_QUERY );
+ Reference< XDriver > xDriver( xFactory->createInstanceWithContext( m_aContext.getUNOContext() ), UNO_QUERY );
OSL_ENSURE( xDriver.is(), "OSDBCDriverManager::bootstrapDrivers: a driver which is no driver?!" );
if ( xDriver.is() )