summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/drivers/calc/CConnection.cxx2
-rw-r--r--connectivity/source/drivers/calc/CDriver.cxx3
-rw-r--r--connectivity/source/drivers/dbase/DDriver.cxx3
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/file/FDriver.cxx4
-rw-r--r--connectivity/source/drivers/file/FStatement.cxx2
-rw-r--r--connectivity/source/drivers/flat/EDriver.cxx3
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx8
-rw-r--r--connectivity/source/inc/calc/CDriver.hxx4
-rw-r--r--connectivity/source/inc/dbase/DDriver.hxx2
-rw-r--r--connectivity/source/inc/file/FDriver.hxx6
-rw-r--r--connectivity/source/inc/flat/EDriver.hxx2
12 files changed, 21 insertions, 20 deletions
diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx
index bae573fcaf28..04e6cd3555cc 100644
--- a/connectivity/source/drivers/calc/CConnection.cxx
+++ b/connectivity/source/drivers/calc/CConnection.cxx
@@ -128,7 +128,7 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc()
aArgs[nPos].Value <<= m_sPassword;
}
- Reference< XDesktop2 > xDesktop = Desktop::create( comphelper::getComponentContext(getDriver()->getFactory()) );
+ Reference< XDesktop2 > xDesktop = Desktop::create( getDriver()->getComponentContext() );
Reference< XComponent > xComponent;
Any aLoaderException;
try
diff --git a/connectivity/source/drivers/calc/CDriver.cxx b/connectivity/source/drivers/calc/CDriver.cxx
index c66fbe82e9fa..40dcf3af9061 100644
--- a/connectivity/source/drivers/calc/CDriver.cxx
+++ b/connectivity/source/drivers/calc/CDriver.cxx
@@ -23,6 +23,7 @@
#include "connectivity/dbexception.hxx"
#include "resource/sharedresources.hxx"
#include "resource/calc_res.hrc"
+#include "comphelper/processfactory.hxx"
using namespace connectivity::calc;
using namespace connectivity::file;
@@ -54,7 +55,7 @@ OUString SAL_CALL ODriver::getImplementationName( ) throw(RuntimeException)
connectivity::calc::ODriver_CreateInstance(const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception )
{
- return *(new ODriver(_rxFactory));
+ return *(new ODriver( comphelper::getComponentContext(_rxFactory) ));
}
Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url,
diff --git a/connectivity/source/drivers/dbase/DDriver.cxx b/connectivity/source/drivers/dbase/DDriver.cxx
index 02837f09ef2e..5711503bf7d6 100644
--- a/connectivity/source/drivers/dbase/DDriver.cxx
+++ b/connectivity/source/drivers/dbase/DDriver.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include "connectivity/dbexception.hxx"
#include "resource/dbase_res.hrc"
+#include "comphelper/processfactory.hxx"
using namespace connectivity::dbase;
using namespace connectivity::file;
@@ -48,7 +49,7 @@ OUString SAL_CALL ODriver::getImplementationName( ) throw(RuntimeException)
//------------------------------------------------------------------
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::dbase::ODriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception )
{
- return *(new ODriver(_rxFactory));
+ return *(new ODriver( comphelper::getComponentContext(_rxFactory) ));
}
// --------------------------------------------------------------------------------
Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException)
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 9448cac04089..a4953682c356 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -202,7 +202,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
Reference<XDynamicResultSet> xContent = m_pConnection->getDir();
Reference < XSortedDynamicResultSetFactory > xSRSFac =
- SortedDynamicResultSetFactory::create( comphelper::getComponentContext( m_pConnection->getDriver()->getFactory() ) );
+ SortedDynamicResultSetFactory::create( m_pConnection->getDriver()->getComponentContext() );
Sequence< NumberedSortingInfo > aSortInfo( 1 );
NumberedSortingInfo* pInfo = aSortInfo.getArray();
diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx
index 79912f3ed308..9fb53a4d6289 100644
--- a/connectivity/source/drivers/file/FDriver.cxx
+++ b/connectivity/source/drivers/file/FDriver.cxx
@@ -36,9 +36,9 @@ using namespace com::sun::star::sdbc;
using namespace com::sun::star::sdbcx;
using namespace com::sun::star::container;
// --------------------------------------------------------------------------------
-OFileDriver::OFileDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory)
+OFileDriver::OFileDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext)
: ODriver_BASE(m_aMutex)
- ,m_xFactory(_rxFactory)
+ ,m_xContext(_rxContext)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileDriver::OFileDriver" );
}
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index af620b2875b2..d5e1b27a1263 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -58,7 +58,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection )
:OStatement_BASE(m_aMutex)
,::comphelper::OPropertyContainer(OStatement_BASE::rBHelper)
,m_xDBMetaData(_pConnection->getMetaData())
- ,m_aParser( comphelper::getComponentContext(_pConnection->getDriver()->getFactory()) )
+ ,m_aParser( _pConnection->getDriver()->getComponentContext() )
,m_aSQLIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser, NULL )
,m_pConnection(_pConnection)
,m_pParseTree(NULL)
diff --git a/connectivity/source/drivers/flat/EDriver.cxx b/connectivity/source/drivers/flat/EDriver.cxx
index d83e435216b7..c9b5fac684a4 100644
--- a/connectivity/source/drivers/flat/EDriver.cxx
+++ b/connectivity/source/drivers/flat/EDriver.cxx
@@ -24,6 +24,7 @@
#include <comphelper/sequence.hxx>
#include "resource/common_res.hrc"
#include "resource/sharedresources.hxx"
+#include "comphelper/processfactory.hxx"
using namespace connectivity::flat;
@@ -51,7 +52,7 @@ OUString SAL_CALL ODriver::getImplementationName( ) throw(RuntimeException)
//------------------------------------------------------------------
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::flat::ODriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception )
{
- return *(new ODriver(_rxFactory));
+ return *(new ODriver( comphelper::getComponentContext(_rxFactory) ));
}
// --------------------------------------------------------------------------------
Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException)
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index f777e636dee8..a6b5a67d9ce2 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -124,7 +124,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
m_aScales.assign(nFieldCount+1,-1);
const sal_Bool bCase = m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers();
- CharClass aCharClass( comphelper::getComponentContext(pConnection->getDriver()->getFactory()), LanguageTag( _aLocale));
+ CharClass aCharClass( pConnection->getDriver()->getComponentContext(), LanguageTag( _aLocale));
// read description
const sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter();
const sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter();
@@ -435,10 +435,8 @@ void OFlatTable::construct()
SvtSysLocale aLocale;
::com::sun::star::lang::Locale aAppLocale(aLocale.GetLanguageTag().getLocale());
- Reference< XNumberFormatsSupplier > xSupplier = NumberFormatsSupplier::createWithLocale( getComponentContext(m_pConnection->getDriver()->getFactory()), aAppLocale );
- m_xNumberFormatter = Reference< XNumberFormatter >( NumberFormatter::create(
- comphelper::getComponentContext(m_pConnection->getDriver()->getFactory())),
- UNO_QUERY_THROW);
+ Reference< XNumberFormatsSupplier > xSupplier = NumberFormatsSupplier::createWithLocale( m_pConnection->getDriver()->getComponentContext(), aAppLocale );
+ m_xNumberFormatter.set( NumberFormatter::create( m_pConnection->getDriver()->getComponentContext()), UNO_QUERY_THROW);
m_xNumberFormatter->attachNumberFormatsSupplier(xSupplier);
Reference<XPropertySet> xProp(xSupplier->getNumberFormatSettings(),UNO_QUERY);
xProp->getPropertyValue(OUString("NullDate")) >>= m_aNullDate;
diff --git a/connectivity/source/inc/calc/CDriver.hxx b/connectivity/source/inc/calc/CDriver.hxx
index 782aa9e3d52e..f70e6fcb00a7 100644
--- a/connectivity/source/inc/calc/CDriver.hxx
+++ b/connectivity/source/inc/calc/CDriver.hxx
@@ -35,8 +35,8 @@ namespace connectivity
{
public:
ODriver(const ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) :
- file::OFileDriver(_rxFactory){}
+ ::com::sun::star::uno::XComponentContext >& _rxContext) :
+ file::OFileDriver(_rxContext) {}
static OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/connectivity/source/inc/dbase/DDriver.hxx b/connectivity/source/inc/dbase/DDriver.hxx
index 6e354fd0a249..887c8c10bdeb 100644
--- a/connectivity/source/inc/dbase/DDriver.hxx
+++ b/connectivity/source/inc/dbase/DDriver.hxx
@@ -34,7 +34,7 @@ namespace connectivity
class ODriver : public file::OFileDriver
{
public:
- ODriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) : file::OFileDriver(_rxFactory){}
+ ODriver(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext) : file::OFileDriver(_rxContext){}
// XInterface
static OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/connectivity/source/inc/file/FDriver.hxx b/connectivity/source/inc/file/FDriver.hxx
index ca31071b41df..556e005b02e2 100644
--- a/connectivity/source/inc/file/FDriver.hxx
+++ b/connectivity/source/inc/file/FDriver.hxx
@@ -43,9 +43,9 @@ namespace connectivity
connectivity::OWeakRefArray m_xConnections; // vector containing a list
// of all the Connection objects
// for this Driver
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
public:
- OFileDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory);
+ OFileDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext);
// OComponentHelper
virtual void SAL_CALL disposing(void);
@@ -69,7 +69,7 @@ namespace connectivity
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& connection ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByURL( const OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getFactory() const { return m_xFactory; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getComponentContext() const { return m_xContext; }
};
}
diff --git a/connectivity/source/inc/flat/EDriver.hxx b/connectivity/source/inc/flat/EDriver.hxx
index 9c9bc0e23035..db3c2f7c6f42 100644
--- a/connectivity/source/inc/flat/EDriver.hxx
+++ b/connectivity/source/inc/flat/EDriver.hxx
@@ -34,7 +34,7 @@ namespace connectivity
class ODriver : public file::OFileDriver
{
public:
- ODriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) : file::OFileDriver(_rxFactory){}
+ ODriver(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext) : file::OFileDriver(_rxContext){}
// XInterface
static OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);