[Libreoffice-commits] .: 4 commits - accessibility/source basic/source comphelper/inc comphelper/source connectivity/inc connectivity/source dbaccess/source desktop/source extensions/source forms/source i18npool/inc i18npool/source offapi/type_reference reportdesign/source scripting/source sd/source svx/inc svx/source toolkit/source ucbhelper/inc ucbhelper/source ucb/source udkapi/com udkapi/UnoApi_udkapi.mk xmlhelp/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Nov 28 04:06:55 PST 2012


 accessibility/source/extended/accessibleeditbrowseboxcell.cxx |    2 
 accessibility/source/standard/vclxaccessibletoolbox.cxx       |   12 +-
 basic/source/classes/sbxmod.cxx                               |    8 -
 comphelper/inc/comphelper/accessiblewrapper.hxx               |   18 +--
 comphelper/inc/comphelper/proxyaggregation.hxx                |   14 +-
 comphelper/source/compare/AnyCompareFactory.cxx               |   24 +---
 comphelper/source/misc/accessiblewrapper.cxx                  |   22 ++--
 comphelper/source/misc/proxyaggregation.cxx                   |   53 ++++------
 comphelper/source/misc/string.cxx                             |    8 -
 connectivity/inc/connectivity/ConnectionWrapper.hxx           |    3 
 connectivity/inc/connectivity/dbtools.hxx                     |    6 -
 connectivity/inc/connectivity/parameters.hxx                  |    8 -
 connectivity/inc/connectivity/virtualdbtools.hxx              |    2 
 connectivity/source/commontools/ConnectionWrapper.cxx         |    6 -
 connectivity/source/commontools/dbtools.cxx                   |   27 ++---
 connectivity/source/commontools/parameters.cxx                |   10 -
 connectivity/source/cpool/ZPoolCollection.cxx                 |   20 +--
 connectivity/source/drivers/hsqldb/HConnection.cxx            |   11 +-
 connectivity/source/drivers/hsqldb/HDriver.cxx                |    2 
 connectivity/source/inc/hsqldb/HConnection.hxx                |    4 
 connectivity/source/simpledbt/staticdbtools_s.cxx             |    4 
 connectivity/source/simpledbt/staticdbtools_s.hxx             |    2 
 dbaccess/source/core/api/RowSet.cxx                           |    2 
 dbaccess/source/core/dataaccess/connection.cxx                |    6 -
 dbaccess/source/core/dataaccess/datasource.cxx                |   18 ++-
 dbaccess/source/core/misc/DatabaseDataProvider.cxx            |    2 
 dbaccess/source/ui/browser/unodatbr.cxx                       |    3 
 dbaccess/source/ui/uno/composerdialogs.cxx                    |    2 
 dbaccess/source/ui/uno/copytablewizard.cxx                    |    6 -
 desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx                |    9 -
 extensions/source/dbpilots/controlwizard.cxx                  |   14 +-
 extensions/source/dbpilots/controlwizard.hxx                  |   12 --
 extensions/source/dbpilots/gridwizard.cxx                     |    4 
 extensions/source/dbpilots/gridwizard.hxx                     |    2 
 extensions/source/dbpilots/groupboxwiz.cxx                    |    6 -
 extensions/source/dbpilots/groupboxwiz.hxx                    |    2 
 extensions/source/dbpilots/listcombowizard.cxx                |    4 
 extensions/source/dbpilots/listcombowizard.hxx                |    2 
 extensions/source/dbpilots/unoautopilot.inl                   |    2 
 extensions/source/propctrlr/formcomponenthandler.cxx          |    4 
 extensions/source/propctrlr/formlinkdialog.cxx                |    5 
 forms/source/component/DatabaseForm.cxx                       |    6 -
 i18npool/inc/chaptercollator.hxx                              |    2 
 i18npool/inc/collatorImpl.hxx                                 |    5 
 i18npool/inc/indexentrysupplier_asian.hxx                     |    2 
 i18npool/inc/indexentrysupplier_common.hxx                    |    2 
 i18npool/inc/indexentrysupplier_default.hxx                   |    4 
 i18npool/inc/indexentrysupplier_ja_phonetic.hxx               |    4 
 i18npool/source/collator/chaptercollator.cxx                  |    6 -
 i18npool/source/collator/collatorImpl.cxx                     |    6 -
 i18npool/source/indexentry/indexentrysupplier_asian.cxx       |    2 
 i18npool/source/indexentry/indexentrysupplier_common.cxx      |    4 
 i18npool/source/indexentry/indexentrysupplier_default.cxx     |   10 -
 i18npool/source/registerservices/registerservices.cxx         |   16 +--
 offapi/type_reference/types.rdb                               |binary
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx   |    6 -
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx   |    6 -
 reportdesign/source/ui/inspection/GeometryHandler.cxx         |    2 
 scripting/source/provider/BrowseNodeFactoryImpl.cxx           |    9 -
 sd/source/ui/animations/CustomAnimationCreateDialog.cxx       |   17 ---
 svx/inc/svx/dbtoolsclient.hxx                                 |    2 
 svx/source/accessibility/AccessibleControlShape.cxx           |   10 -
 svx/source/form/dbtoolsclient.cxx                             |    4 
 svx/source/form/tabwin.cxx                                    |    2 
 toolkit/source/controls/grid/sortablegriddatamodel.cxx        |   19 ++-
 toolkit/source/controls/grid/sortablegriddatamodel.hxx        |    4 
 ucb/source/ucp/tdoc/tdoc_stgelems.cxx                         |   44 ++------
 ucb/source/ucp/tdoc/tdoc_stgelems.hxx                         |    6 -
 ucb/source/ucp/tdoc/tdoc_storage.cxx                          |    9 -
 ucbhelper/inc/ucbhelper/contentinfo.hxx                       |    9 -
 ucbhelper/source/provider/contenthelper.cxx                   |    4 
 ucbhelper/source/provider/contentinfo.cxx                     |    8 -
 udkapi/UnoApi_udkapi.mk                                       |    2 
 udkapi/com/sun/star/reflection/ProxyFactory.idl               |    7 -
 xmlhelp/source/cxxhelp/provider/databases.cxx                 |    6 -
 75 files changed, 269 insertions(+), 347 deletions(-)

New commits:
commit 38cc919efb965e7982d23d5b1c91a639cc2c6fdd
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Nov 27 11:45:21 2012 +0200

    fdo#46808, use service constructor for sdbc::ConnectionPool
    
    Change-Id: Id12226af5e537b1eeacbb062ad937a3551e245c0

diff --git a/connectivity/inc/connectivity/dbtools.hxx b/connectivity/inc/connectivity/dbtools.hxx
index 854e4e9..18fd291 100644
--- a/connectivity/inc/connectivity/dbtools.hxx
+++ b/connectivity/inc/connectivity/dbtools.hxx
@@ -151,7 +151,7 @@ namespace dbtools
     OOO_DLLPUBLIC_DBTOOLS
     ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> connectRowset(
         const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory,
+        const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext,
         sal_Bool _bSetAsActiveConnection
     )   SAL_THROW ( ( ::com::sun::star::sdbc::SQLException
                     , ::com::sun::star::lang::WrappedTargetException
@@ -182,7 +182,7 @@ namespace dbtools
     */
     OOO_DLLPUBLIC_DBTOOLS SharedConnection    ensureRowSetConnection(
         const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory,
+        const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext,
         bool _bUseAutoConnectionDisposer
     )   SAL_THROW ( ( ::com::sun::star::sdbc::SQLException
                     , ::com::sun::star::lang::WrappedTargetException
@@ -423,7 +423,7 @@ namespace dbtools
     */
     OOO_DLLPUBLIC_DBTOOLS ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > getCurrentSettingsComposer(
         const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxRowSetProps,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory
+        const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext
     );
 
     /** transfer and translate properties between two FormComponents
diff --git a/connectivity/inc/connectivity/parameters.hxx b/connectivity/inc/connectivity/parameters.hxx
index 0e25f99..e81e39f 100644
--- a/connectivity/inc/connectivity/parameters.hxx
+++ b/connectivity/inc/connectivity/parameters.hxx
@@ -23,11 +23,11 @@
 #include <vector>
 
 #include <com/sun/star/uno/XAggregation.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/form/XDatabaseParameterListener.hpp>
 #include <com/sun/star/sdbc/XConnection.hpp>
 #include <com/sun/star/task/XInteractionHandler.hpp>
 #include <com/sun/star/sdbc/XParameters.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/container/XIndexAccess.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
@@ -101,8 +101,8 @@ namespace dbtools
         ::osl::Mutex&                       m_rMutex;
         ::cppu::OInterfaceContainerHelper   m_aParameterListeners;
 
-        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
-                                            m_xORB;
+        ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+                                            m_xContext;
 
         ::com::sun::star::uno::WeakReference< ::com::sun::star::beans::XPropertySet >
                                             m_xComponent;                // the database component whose parameters we're handling
@@ -137,7 +137,7 @@ namespace dbtools
         */
         explicit ParameterManager(
             ::osl::Mutex& _rMutex,
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
         );
 
         /// late ctor
diff --git a/connectivity/inc/connectivity/virtualdbtools.hxx b/connectivity/inc/connectivity/virtualdbtools.hxx
index 7551bed..1e12e9a 100644
--- a/connectivity/inc/connectivity/virtualdbtools.hxx
+++ b/connectivity/inc/connectivity/virtualdbtools.hxx
@@ -125,7 +125,7 @@ namespace connectivity
 
             virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> connectRowset(
                 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet,
-                const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory,
+                const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext,
                 sal_Bool _bSetAsActiveConnection
             ) const SAL_THROW ( ( ::com::sun::star::sdbc::SQLException
                                 , ::com::sun::star::lang::WrappedTargetException
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 183ad8d..065fa84 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -42,6 +42,7 @@
 #include <com/sun/star/sdb/XParametersSupplier.hpp>
 #include <com/sun/star/sdb/XQueriesSupplier.hpp>
 #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
+#include <com/sun/star/sdbc/ConnectionPool.hpp>
 #include <com/sun/star/sdbc/DataType.hpp>
 #include <com/sun/star/sdbc/XConnection.hpp>
 #include <com/sun/star/sdbc/XDataSource.hpp>
@@ -357,7 +358,7 @@ Reference< XConnection> getConnection(const Reference< XRowSet>& _rxRowSet) thro
 // helper function which allows to implement both the connectRowset and the ensureRowSetConnection semantics
 // if connectRowset (which is deprecated) is removed, this function and one of its parameters are
 // not needed anymore, the whole implementation can be moved into ensureRowSetConnection then)
-SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const Reference< XMultiServiceFactory>& _rxFactory,
+SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const Reference< XComponentContext >& _rxContext,
         bool _bSetAsActiveConnection, bool _bAttachAutoDisposer )
     SAL_THROW ( ( SQLException, WrappedTargetException, RuntimeException ) )
 {
@@ -410,13 +411,15 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R
             if (hasProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), xRowSetProps))
                 xRowSetProps->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPwd;
 
-            xPureConnection = getConnection_allowException( sDataSourceName, sUser, sPwd, comphelper::getComponentContext(_rxFactory) );
+            xPureConnection = getConnection_allowException( sDataSourceName, sUser, sPwd, _rxContext );
         }
         else if (!sURL.isEmpty())
         {   // the row set has no data source, but a connection url set
             // -> try to connection with that url
-            Reference< XDriverManager > xDriverManager(
-                _rxFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ConnectionPool"))), UNO_QUERY);
+            Reference< XDriverManager > xDriverManager;
+            try {
+                xDriverManager = ConnectionPool::create( _rxContext );
+            } catch( const Exception& ) {  }
             if (xDriverManager.is())
             {
                 ::rtl::OUString sUser, sPwd;
@@ -472,18 +475,18 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R
 }
 
 //------------------------------------------------------------------------------
-Reference< XConnection> connectRowset(const Reference< XRowSet>& _rxRowSet, const Reference< XMultiServiceFactory>& _rxFactory,
+Reference< XConnection> connectRowset(const Reference< XRowSet>& _rxRowSet, const Reference< XComponentContext >& _rxContext,
     sal_Bool _bSetAsActiveConnection )  SAL_THROW ( ( SQLException, WrappedTargetException, RuntimeException ) )
 {
-    SharedConnection xConnection = lcl_connectRowSet( _rxRowSet, _rxFactory, _bSetAsActiveConnection, true );
+    SharedConnection xConnection = lcl_connectRowSet( _rxRowSet, _rxContext, _bSetAsActiveConnection, true );
     return xConnection.getTyped();
 }
 
 //------------------------------------------------------------------------------
-SharedConnection ensureRowSetConnection(const Reference< XRowSet>& _rxRowSet, const Reference< XMultiServiceFactory>& _rxFactory,
+SharedConnection ensureRowSetConnection(const Reference< XRowSet>& _rxRowSet, const Reference< XComponentContext>& _rxContext,
     bool _bUseAutoConnectionDisposer )  SAL_THROW ( ( SQLException, WrappedTargetException, RuntimeException ) )
 {
-    return lcl_connectRowSet( _rxRowSet, _rxFactory, true, _bUseAutoConnectionDisposer );
+    return lcl_connectRowSet( _rxRowSet, _rxContext, true, _bUseAutoConnectionDisposer );
 }
 
 //------------------------------------------------------------------------------
@@ -1266,13 +1269,13 @@ Reference< XDataSource> findDataSource(const Reference< XInterface >& _xParent)
 }
 
 //------------------------------------------------------------------------------
-Reference< XSingleSelectQueryComposer > getComposedRowSetStatement( const Reference< XPropertySet >& _rxRowSet, const Reference< XMultiServiceFactory>& _rxFactory )
+Reference< XSingleSelectQueryComposer > getComposedRowSetStatement( const Reference< XPropertySet >& _rxRowSet, const Reference< XComponentContext >& _rxContext )
     SAL_THROW( ( SQLException ) )
 {
     Reference< XSingleSelectQueryComposer > xComposer;
     try
     {
-        Reference< XConnection> xConn = connectRowset( Reference< XRowSet >( _rxRowSet, UNO_QUERY ), _rxFactory, sal_True );
+        Reference< XConnection> xConn = connectRowset( Reference< XRowSet >( _rxRowSet, UNO_QUERY ), _rxContext, sal_True );
         if ( xConn.is() )       // implies _rxRowSet.is()
         {
             // build the statement the row set is based on (can't use the ActiveCommand property of the set
@@ -1317,12 +1320,12 @@ Reference< XSingleSelectQueryComposer > getComposedRowSetStatement( const Refere
 //------------------------------------------------------------------------------
 Reference< XSingleSelectQueryComposer > getCurrentSettingsComposer(
                 const Reference< XPropertySet>& _rxRowSetProps,
-                const Reference< XMultiServiceFactory>& _rxFactory)
+                const Reference< XComponentContext>& _rxContext)
 {
     Reference< XSingleSelectQueryComposer > xReturn;
     try
     {
-        xReturn = getComposedRowSetStatement( _rxRowSetProps, _rxFactory );
+        xReturn = getComposedRowSetStatement( _rxRowSetProps, _rxContext );
     }
     catch( const SQLException& )
     {
diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx
index b082e88..ef83e56 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -63,15 +63,15 @@ namespace dbtools
     //= ParameterManager
     //====================================================================
     //--------------------------------------------------------------------
-    ParameterManager::ParameterManager( ::osl::Mutex& _rMutex, const Reference< XMultiServiceFactory >& _rxORB )
+    ParameterManager::ParameterManager( ::osl::Mutex& _rMutex, const Reference< XComponentContext >& _rxContext )
         :m_rMutex             ( _rMutex )
         ,m_aParameterListeners( _rMutex )
-        ,m_xORB               ( _rxORB  )
+        ,m_xContext           ( _rxContext  )
         ,m_pOuterParameters   ( NULL    )
         ,m_nInnerCount        ( 0       )
         ,m_bUpToDate          ( false   )
     {
-        OSL_ENSURE( m_xORB.is(), "ParameterManager::ParameterManager: no service factory!" );
+        OSL_ENSURE( m_xContext.is(), "ParameterManager::ParameterManager: no service factory!" );
     }
 
     //--------------------------------------------------------------------
@@ -147,7 +147,7 @@ namespace dbtools
         try
         {
             // get a query composer for the 's settings
-            m_xComposer.reset( getCurrentSettingsComposer( _rxComponent, m_xORB ), SharedQueryComposer::TakeOwnership );
+            m_xComposer.reset( getCurrentSettingsComposer( _rxComponent, m_xContext ), SharedQueryComposer::TakeOwnership );
 
             // see if the composer found parameters
             Reference< XParametersSupplier > xParamSupp( m_xComposer, UNO_QUERY );
@@ -817,7 +817,7 @@ namespace dbtools
                 // re-create the parent composer all the time. Else, we'd have to bother with
                 // being a listener at its properties, its loaded state, and event the parent-relationship.
                 m_xParentComposer.reset(
-                    getCurrentSettingsComposer( xParent, m_xORB ),
+                    getCurrentSettingsComposer( xParent, m_xContext ),
                     SharedQueryComposer::TakeOwnership
                 );
                 xParentColSupp = xParentColSupp.query( m_xParentComposer );
diff --git a/connectivity/source/simpledbt/staticdbtools_s.cxx b/connectivity/source/simpledbt/staticdbtools_s.cxx
index 1d89390..f40f5e3 100644
--- a/connectivity/source/simpledbt/staticdbtools_s.cxx
+++ b/connectivity/source/simpledbt/staticdbtools_s.cxx
@@ -90,10 +90,10 @@ namespace connectivity
     }
 
     //----------------------------------------------------------------
-    Reference< XConnection> ODataAccessStaticTools::connectRowset(const Reference< XRowSet>& _rxRowSet, const Reference< XMultiServiceFactory>& _rxFactory, sal_Bool _bSetAsActiveConnection) const
+    Reference< XConnection> ODataAccessStaticTools::connectRowset(const Reference< XRowSet>& _rxRowSet, const Reference< XComponentContext >& _rxContext, sal_Bool _bSetAsActiveConnection) const
         SAL_THROW ( (SQLException, WrappedTargetException, RuntimeException) )
     {
-        return ::dbtools::connectRowset( _rxRowSet, _rxFactory, _bSetAsActiveConnection);
+        return ::dbtools::connectRowset( _rxRowSet, _rxContext, _bSetAsActiveConnection);
     }
 
     // ------------------------------------------------
diff --git a/connectivity/source/simpledbt/staticdbtools_s.hxx b/connectivity/source/simpledbt/staticdbtools_s.hxx
index a859720..83512c4 100644
--- a/connectivity/source/simpledbt/staticdbtools_s.hxx
+++ b/connectivity/source/simpledbt/staticdbtools_s.hxx
@@ -76,7 +76,7 @@ namespace connectivity
         // ------------------------------------------------
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> connectRowset(
             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet,
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext,
             sal_Bool _bSetAsActiveConnection
         ) const SAL_THROW ( ( ::com::sun::star::sdbc::SQLException
                             , ::com::sun::star::lang::WrappedTargetException
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 04c531e..50b9aa3 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1459,7 +1459,7 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl
         calcConnection( _rxHandler );
         m_bRebuildConnOnExecute = sal_False;
 
-        Reference< XSingleSelectQueryComposer > xComposer = getCurrentSettingsComposer( this, m_aContext.getLegacyServiceFactory() );
+        Reference< XSingleSelectQueryComposer > xComposer = getCurrentSettingsComposer( this, m_aContext.getUNOContext() );
         Reference<XParametersSupplier>  xParameters(xComposer, UNO_QUERY);
 
         Reference<XIndexAccess>  xParamsAsIndicies = xParameters.is() ? xParameters->getParameters() : Reference<XIndexAccess>();
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 89c14fb..b692bb5 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -41,6 +41,7 @@
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/reflection/ProxyFactory.hpp>
 #include <com/sun/star/sdb/DatabaseContext.hpp>
+#include <com/sun/star/sdbc/ConnectionPool.hpp>
 #include <com/sun/star/sdbc/XDriverAccess.hpp>
 #include <com/sun/star/sdbc/XDriverManager.hpp>
 #include <com/sun/star/sdbcx/XTablesSupplier.hpp>
@@ -642,9 +643,12 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::O
     Reference< XConnection > xReturn;
 
     Reference< XDriverManager > xManager;
-    if ( !m_pImpl->m_aContext.createComponent( "com.sun.star.sdbc.ConnectionPool", xManager ) )
+    try {
+        xManager.set( ConnectionPool::create( m_pImpl->m_aContext.getUNOContext() ) );
+    } catch( const Exception& ) {  }
+    if ( !xManager.is() )
         // no connection pool installed, fall back to driver manager
-        m_pImpl->m_aContext.createComponent( "com.sun.star.sdbc.DriverManager", xManager );
+        xManager.set( m_pImpl->m_aContext.createComponent( "com.sun.star.sdbc.DriverManager" ), UNO_QUERY_THROW );
 
     ::rtl::OUString sUser(_rUid);
     ::rtl::OUString sPwd(_rPwd);
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index 80bb599..78373c5 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -58,7 +58,7 @@ DatabaseDataProvider::DatabaseDataProvider(uno::Reference< uno::XComponentContex
     ::cppu::PropertySetMixin< chart2::data::XDatabaseDataProvider >(
         context, static_cast< Implements >(
             IMPLEMENTS_PROPERTY_SET), uno::Sequence< ::rtl::OUString >()),
-    m_aParameterManager( m_aMutex, uno::Reference< lang::XMultiServiceFactory >(context->getServiceManager(),uno::UNO_QUERY) ),
+    m_aParameterManager( m_aMutex, context ),
     m_aFilterManager( uno::Reference< lang::XMultiServiceFactory >(context->getServiceManager(),uno::UNO_QUERY) ),
     m_xContext(context),
     m_CommandType(sdb::CommandType::COMMAND), // #i94114
diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx
index 0a2cb1e..213bccb 100644
--- a/dbaccess/source/ui/uno/composerdialogs.cxx
+++ b/dbaccess/source/ui/uno/composerdialogs.cxx
@@ -101,7 +101,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.getLegacyServiceFactory() );
+                m_xComposer = ::dbtools::getCurrentSettingsComposer( Reference< XPropertySet >( m_xRowSet, UNO_QUERY ), m_aContext.getUNOContext() );
 
             // the columns of the row set
             Reference< XColumnsSupplier > xSuppColumns( m_xRowSet, UNO_QUERY );
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index f9861d8..bc5804f 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -53,6 +53,7 @@
 #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
 #include <com/sun/star/sdb/SQLContext.hpp>
 #include <com/sun/star/sdbc/XDriverManager.hpp>
+#include <com/sun/star/sdbc/ConnectionPool.hpp>
 
 #include <comphelper/componentcontext.hxx>
 #include <comphelper/interaction.hxx>
@@ -127,6 +128,7 @@ namespace dbaui
     using ::com::sun::star::sdbc::XResultSetMetaData;
     using ::com::sun::star::sdbc::SQLException;
     using ::com::sun::star::sdb::SQLContext;
+    using ::com::sun::star::sdbc::ConnectionPool;
     using ::com::sun::star::sdbc::XDriverManager;
     using ::com::sun::star::beans::PropertyValue;
     /** === end UNO using === **/
@@ -952,7 +954,9 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference<
         OSL_VERIFY( _rxDataSourceDescriptor->getPropertyValue( PROPERTY_CONNECTION_INFO ) >>= aConnectionInfo );
 
     Reference< XDriverManager > xDriverManager;
-    xDriverManager.set( m_aContext.createComponent( "com.sun.star.sdbc.ConnectionPool" ), UNO_QUERY );
+    try {
+        xDriverManager.set( ConnectionPool::create( m_aContext.getUNOContext() ) );
+    } catch( const Exception& ) {  }
     if ( !xDriverManager.is() )
         // no connection pool installed
         xDriverManager.set( m_aContext.createComponent( "com.sun.star.sdbc.DriverManager" ), UNO_QUERY_THROW );
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index fa0eb71..3c48632 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -273,9 +273,9 @@ namespace dbp
     //=====================================================================
     //---------------------------------------------------------------------
     OControlWizard::OControlWizard( Window* _pParent, const ResId& _rId,
-            const Reference< XPropertySet >& _rxObjectModel, const Reference< XMultiServiceFactory >& _rxORB )
+            const Reference< XPropertySet >& _rxObjectModel, const Reference< XComponentContext >& _rxContext )
         :OWizardMachine(_pParent, _rId, WZB_CANCEL | WZB_PREVIOUS | WZB_NEXT | WZB_FINISH)
-        ,m_xORB(_rxORB)
+        ,m_xContext(_rxContext)
     {
         m_aContext.xObjectModel = _rxObjectModel;
         initContext();
@@ -433,13 +433,11 @@ namespace dbp
     //---------------------------------------------------------------------
     void OControlWizard::implGetDSContext()
     {
-        Reference< XMultiServiceFactory > xORB = getServiceFactory();
         try
         {
-            DBG_ASSERT(xORB.is(), "OControlWizard::implGetDSContext: invalid service factory!");
+            DBG_ASSERT(m_xContext.is(), "OControlWizard::implGetDSContext: invalid service factory!");
 
-            m_aContext.xDatasourceContext =
-                DatabaseContext::create(comphelper::getComponentContext(xORB));
+            m_aContext.xDatasourceContext = DatabaseContext::create(m_xContext);
         }
         catch(const Exception&)
         {
@@ -509,7 +507,7 @@ namespace dbp
         Reference< XInteractionHandler > xHandler;
         try
         {
-            xHandler = Reference< XInteractionHandler >( InteractionHandler::createWithParent(comphelper::getComponentContext(getServiceFactory()), 0), UNO_QUERY_THROW );
+            xHandler = Reference< XInteractionHandler >( InteractionHandler::createWithParent(m_xContext, 0), UNO_QUERY_THROW );
         }
         catch(const Exception&) { }
         if (!xHandler.is())
@@ -567,7 +565,7 @@ namespace dbp
                 Reference< XConnection > xConnection;
                 m_aContext.bEmbedded = ::dbtools::isEmbeddedInDatabase( m_aContext.xForm, xConnection );
                 if ( !m_aContext.bEmbedded )
-                    xConnection = ::dbtools::connectRowset( m_aContext.xRowSet, getServiceFactory(), sal_True );
+                    xConnection = ::dbtools::connectRowset( m_aContext.xRowSet, m_xContext, sal_True );
 
                 // get the fields
                 if (xConnection.is())
diff --git a/extensions/source/dbpilots/controlwizard.hxx b/extensions/source/dbpilots/controlwizard.hxx
index dbb4748..c6b97bd 100644
--- a/extensions/source/dbpilots/controlwizard.hxx
+++ b/extensions/source/dbpilots/controlwizard.hxx
@@ -106,17 +106,15 @@ namespace dbp
     {
     private:
         OControlWizardContext   m_aContext;
-
-    protected:
-        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
-                    m_xORB;
+        ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+                    m_xContext;
 
     public:
         OControlWizard(
             Window* _pParent,
             const ResId& _rId,
             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObjectModel,
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
         );
         ~OControlWizard();
 
@@ -124,8 +122,8 @@ namespace dbp
         sal_Bool    travelNext() { return OControlWizard_Base::travelNext(); }
 
     public:
-        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
-            getServiceFactory() const { return m_xORB; }
+        ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+            getComponentContext() const { return m_xContext; }
 
         const OControlWizardContext&    getContext() const { return m_aContext; }
         sal_Bool                        updateContext(const OAccessRegulator&);
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index ece4e1d..dcb73bb 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -51,8 +51,8 @@ namespace dbp
     //=====================================================================
     //---------------------------------------------------------------------
     OGridWizard::OGridWizard( Window* _pParent,
-            const Reference< XPropertySet >& _rxObjectModel, const Reference< XMultiServiceFactory >& _rxORB )
-        :OControlWizard(_pParent, ModuleRes(RID_DLG_GRIDWIZARD), _rxObjectModel, _rxORB)
+            const Reference< XPropertySet >& _rxObjectModel, const Reference< XComponentContext >& _rxContext )
+        :OControlWizard(_pParent, ModuleRes(RID_DLG_GRIDWIZARD), _rxObjectModel, _rxContext)
         ,m_bHadDataSelection(sal_True)
     {
         initControlSettings(&m_aSettings);
diff --git a/extensions/source/dbpilots/gridwizard.hxx b/extensions/source/dbpilots/gridwizard.hxx
index 43b2aa3..b837e3d 100644
--- a/extensions/source/dbpilots/gridwizard.hxx
+++ b/extensions/source/dbpilots/gridwizard.hxx
@@ -49,7 +49,7 @@ namespace dbp
         OGridWizard(
             Window* _pParent,
             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObjectModel,
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
         );
 
         OGridSettings& getSettings() { return m_aSettings; }
diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx
index a814272..904c1c1 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -48,8 +48,8 @@ namespace dbp
     //=====================================================================
     //---------------------------------------------------------------------
     OGroupBoxWizard::OGroupBoxWizard( Window* _pParent,
-            const Reference< XPropertySet >& _rxObjectModel, const Reference< XMultiServiceFactory >& _rxORB )
-        :OControlWizard(_pParent, ModuleRes(RID_DLG_GROUPBOXWIZARD), _rxObjectModel, _rxORB)
+            const Reference< XPropertySet >& _rxObjectModel, const Reference< XComponentContext >& _rxContext )
+        :OControlWizard(_pParent, ModuleRes(RID_DLG_GROUPBOXWIZARD), _rxObjectModel, _rxContext)
         ,m_bVisitedDefault(sal_False)
         ,m_bVisitedDB(sal_False)
     {
@@ -160,7 +160,7 @@ namespace dbp
     {
         try
         {
-            OOptionGroupLayouter aLayouter(comphelper::getComponentContext(getServiceFactory()));
+            OOptionGroupLayouter aLayouter( getComponentContext() );
             aLayouter.doLayout(getContext(), getSettings());
         }
         catch(const Exception&)
diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx
index e7e0824..026e39e 100644
--- a/extensions/source/dbpilots/groupboxwiz.hxx
+++ b/extensions/source/dbpilots/groupboxwiz.hxx
@@ -55,7 +55,7 @@ namespace dbp
         OGroupBoxWizard(
             Window* _pParent,
             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObjectModel,
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
         );
 
         OOptionGroupSettings& getSettings() { return m_aSettings; }
diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx
index f25c365..08e3658 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -50,8 +50,8 @@ namespace dbp
     //=====================================================================
     //---------------------------------------------------------------------
     OListComboWizard::OListComboWizard( Window* _pParent,
-            const Reference< XPropertySet >& _rxObjectModel, const Reference< XMultiServiceFactory >& _rxORB )
-        :OControlWizard(_pParent, ModuleRes(RID_DLG_LISTCOMBOWIZARD), _rxObjectModel, _rxORB)
+            const Reference< XPropertySet >& _rxObjectModel, const Reference< XComponentContext >& _rxContext )
+        :OControlWizard(_pParent, ModuleRes(RID_DLG_LISTCOMBOWIZARD), _rxObjectModel, _rxContext)
         ,m_bListBox(sal_False)
         ,m_bHadDataSelection(sal_True)
     {
diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx
index d312d28..8c9fc3a 100644
--- a/extensions/source/dbpilots/listcombowizard.hxx
+++ b/extensions/source/dbpilots/listcombowizard.hxx
@@ -59,7 +59,7 @@ namespace dbp
         OListComboWizard(
             Window* _pParent,
             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObjectModel,
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
         );
 
         OListComboSettings& getSettings() { return m_aSettings; }
diff --git a/extensions/source/dbpilots/unoautopilot.inl b/extensions/source/dbpilots/unoautopilot.inl
index 035982e..9375243 100644
--- a/extensions/source/dbpilots/unoautopilot.inl
+++ b/extensions/source/dbpilots/unoautopilot.inl
@@ -99,7 +99,7 @@ template <class TYPE, class SERVICEINFO>
 template <class TYPE, class SERVICEINFO>
 Dialog* OUnoAutoPilot<TYPE, SERVICEINFO>::createDialog(Window* _pParent)
 {
-    return new TYPE(_pParent, m_xObjectModel, m_aContext.getLegacyServiceFactory());
+    return new TYPE(_pParent, m_xObjectModel, m_aContext.getUNOContext());
 }
 
 //--------------------------------------------------------------------------
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 42fd503..992b2d5 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2414,7 +2414,7 @@ namespace pcr
             if ( xRowSetProps.is() )
             {
                 WaitCursor aWaitCursor( impl_getDefaultDialogParent_nothrow() );
-                m_xRowSetConnection = ::dbtools::ensureRowSetConnection( xRowSet, m_aContext.getLegacyServiceFactory(), false );
+                m_xRowSetConnection = ::dbtools::ensureRowSetConnection( xRowSet, m_aContext.getUNOContext(), false );
             }
         }
         catch ( const SQLException& ) { aError = SQLExceptionInfo( ::cppu::getCaughtException() ); }
@@ -2632,7 +2632,7 @@ namespace pcr
                 return false;
 
             // get a composer for the statement which the form is currently based on
-            Reference< XSingleSelectQueryComposer > xComposer( ::dbtools::getCurrentSettingsComposer( m_xComponent, m_aContext.getLegacyServiceFactory() ) );
+            Reference< XSingleSelectQueryComposer > xComposer( ::dbtools::getCurrentSettingsComposer( m_xComponent, m_aContext.getUNOContext() ) );
             OSL_ENSURE( xComposer.is(), "FormComponentPropertyHandler::impl_dialogFilterOrSort_nothrow: could not obtain a composer!" );
             if ( !xComposer.is() )
                 return false;
diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx
index ecc2c70..fadcc0a 100644
--- a/extensions/source/propctrlr/formlinkdialog.cxx
+++ b/extensions/source/propctrlr/formlinkdialog.cxx
@@ -31,6 +31,7 @@
 #include <connectivity/dbtools.hxx>
 #include <connectivity/dbexception.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
+#include <comphelper/processfactory.hxx>
 
 #include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
 #include <com/sun/star/sdbcx/XKeysSupplier.hpp>
@@ -449,7 +450,7 @@ namespace pcr
             _rxConnection.set(_rxFormProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),UNO_QUERY);
 
         if ( !_rxConnection.is() )
-            _rxConnection = ::dbtools::connectRowset( Reference< XRowSet >( _rxFormProps, UNO_QUERY ), m_xORB, sal_True );
+            _rxConnection = ::dbtools::connectRowset( Reference< XRowSet >( _rxFormProps, UNO_QUERY ), comphelper::getComponentContext(m_xORB), sal_True );
     }
 
     //------------------------------------------------------------------------
@@ -471,7 +472,7 @@ namespace pcr
         Reference< XPropertySet > xTable;
         try
         {
-            Reference< XTablesSupplier > xTablesInForm( ::dbtools::getCurrentSettingsComposer( _rxFormProps, m_xORB ), UNO_QUERY );
+            Reference< XTablesSupplier > xTablesInForm( ::dbtools::getCurrentSettingsComposer( _rxFormProps, comphelper::getComponentContext(m_xORB) ), UNO_QUERY );
             Reference< XNameAccess > xTables;
             if ( xTablesInForm.is() )
                 xTables = xTablesInForm->getTables();
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 434b4ef..99f17d4 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -292,7 +292,7 @@ ODatabaseForm::ODatabaseForm(const Reference<XMultiServiceFactory>& _rxFactory)
     ,m_aPropertyBagHelper( *this )
     ,m_pAggregatePropertyMultiplexer(NULL)
     ,m_pGroupManager( NULL )
-    ,m_aParameterManager( m_aMutex, _rxFactory )
+    ,m_aParameterManager( m_aMutex, comphelper::getComponentContext(_rxFactory) )
     ,m_aFilterManager( _rxFactory )
     ,m_pLoadTimer(NULL)
     ,m_pThread(NULL)
@@ -332,7 +332,7 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource )
     ,m_aPropertyBagHelper( *this )
     ,m_pAggregatePropertyMultiplexer( NULL )
     ,m_pGroupManager( NULL )
-    ,m_aParameterManager( m_aMutex, _cloneSource.m_xServiceFactory )
+    ,m_aParameterManager( m_aMutex, comphelper::getComponentContext(_cloneSource.m_xServiceFactory) )
     ,m_aFilterManager( _cloneSource.m_xServiceFactory )
     ,m_pLoadTimer( NULL )
     ,m_pThread( NULL )
@@ -2844,7 +2844,7 @@ sal_Bool ODatabaseForm::implEnsureConnection()
         {
             Reference< XConnection >  xConnection = connectRowset(
                 Reference<XRowSet> (m_xAggregate, UNO_QUERY),
-                m_xServiceFactory,
+                comphelper::getComponentContext(m_xServiceFactory),
                 sal_True    // set a calculated connection as ActiveConnection
             );
             return xConnection.is();
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 6922728..d7ea714 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1590,7 +1590,7 @@ bool GeometryHandler::impl_dialogFilter_nothrow( ::rtl::OUString& _out_rSelected
         }
 
         // get a composer for the statement which the form is currently based on
-        uno::Reference< sdb::XSingleSelectQueryComposer > xComposer( ::dbtools::getCurrentSettingsComposer( xRowSetProp, xServiceFactory ) );
+        uno::Reference< sdb::XSingleSelectQueryComposer > xComposer( ::dbtools::getCurrentSettingsComposer( xRowSetProp, m_xContext ) );
         OSL_ENSURE( xComposer.is(), "GeometryHandler::impl_dialogFilter_nothrow: could not obtain a composer!" );
         if ( !xComposer.is() )
             return false;
diff --git a/svx/inc/svx/dbtoolsclient.hxx b/svx/inc/svx/dbtoolsclient.hxx
index 24b9976..501bc15 100644
--- a/svx/inc/svx/dbtoolsclient.hxx
+++ b/svx/inc/svx/dbtoolsclient.hxx
@@ -107,7 +107,7 @@ namespace svxform
         // ------------------------------------------------
         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> connectRowset(
             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet,
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext,
             sal_Bool _bSetAsActiveConnection
         ) const SAL_THROW ( ( ::com::sun::star::sdbc::SQLException
                             , ::com::sun::star::lang::WrappedTargetException
diff --git a/svx/source/form/dbtoolsclient.cxx b/svx/source/form/dbtoolsclient.cxx
index 872afb5..aab8971 100644
--- a/svx/source/form/dbtoolsclient.cxx
+++ b/svx/source/form/dbtoolsclient.cxx
@@ -210,12 +210,12 @@ namespace svxform
 
     //--------------------------------------------------------------------
     Reference< XConnection > OStaticDataAccessTools::connectRowset( const Reference< XRowSet >& _rxRowSet,
-        const Reference< XMultiServiceFactory >& _rxFactory, sal_Bool _bSetAsActiveConnection ) const
+        const Reference< XComponentContext >& _rxContext, sal_Bool _bSetAsActiveConnection ) const
         SAL_THROW ( ( SQLException, WrappedTargetException, RuntimeException ) )
     {
         Reference< XConnection > xReturn;
         if ( ensureLoaded() )
-            xReturn = m_xDataAccessTools->connectRowset( _rxRowSet, _rxFactory, _bSetAsActiveConnection );
+            xReturn = m_xDataAccessTools->connectRowset( _rxRowSet, _rxContext, _bSetAsActiveConnection );
         return xReturn;
     }
 
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 1b8efb0..7be58df 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -352,7 +352,7 @@ void FmFieldWin::UpdateContent(const ::com::sun::star::uno::Reference< ::com::su
         // get the connection of the form
         OStaticDataAccessTools aTools;
         m_aConnection.reset(
-            aTools.connectRowset( Reference< XRowSet >( xForm, UNO_QUERY ), ::comphelper::getProcessServiceFactory(), sal_True ),
+            aTools.connectRowset( Reference< XRowSet >( xForm, UNO_QUERY ), ::comphelper::getProcessComponentContext(), sal_True ),
             SharedConnection::NoTakeOwnership
         );
         // TODO: When incompatible changes (such as extending the "virtualdbtools" interface by ensureRowSetConnection)
commit 7470cc532fe408dc9d8735cde0e2eb5bb62fd69c
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Nov 27 11:00:51 2012 +0200

    fdo#46808, Adapt reflection::ProxyFactory UNO service to new style
    
    The service is deprecated, but we still have a handful of in-tree
    users, and converting it lets me thread XComponentContext through
    a bunch of classes.
    
    Change-Id: Iffdfe537ada6b9e4a89f9b3c8dd82ca85f4bfaba

diff --git a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
index e9c3122..8232bd9 100644
--- a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
+++ b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
@@ -46,7 +46,7 @@ namespace accessibility
                 sal_Int32 _nRowPos,
                 sal_uInt16 _nColPos)
         :AccessibleBrowseBoxCell( _rxParent, _rBrowseBox, _xFocusWindow, _nRowPos, _nColPos )
-        ,OAccessibleContextWrapperHelper( ::comphelper::getProcessServiceFactory(), rBHelper, _xControlChild, _rxOwningAccessible, _rxParent )
+        ,OAccessibleContextWrapperHelper( ::comphelper::getProcessComponentContext(), rBHelper, _xControlChild, _rxOwningAccessible, _rxParent )
     {
         aggregateProxy( m_refCount, *this );
     }
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index 42e1a54..205c08b 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -48,12 +48,12 @@ namespace
         sal_Int32 m_nIndexInParent;
     public:
         OToolBoxWindowItemContext(sal_Int32 _nIndexInParent,
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& _rxInnerAccessibleContext,
             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxOwningAccessible,
             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParentAccessible
             ) : OAccessibleContextWrapper(
-            _rxORB,
+            _rxContext,
             _rxInnerAccessibleContext,
             _rxOwningAccessible,
             _rxParentAccessible     )
@@ -93,11 +93,11 @@ namespace
 
     public:
         OToolBoxWindowItem(sal_Int32 _nIndexInParent,
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxInnerAccessible,
             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParentAccessible
             ) : OAccessibleWrapper(
-            _rxORB,
+            _rxContext,
             _rxInnerAccessible,
             _rxParentAccessible)
             ,m_nIndexInParent(_nIndexInParent)
@@ -127,7 +127,7 @@ namespace
     OAccessibleContextWrapper* OToolBoxWindowItem::createAccessibleContext(
             const Reference< XAccessibleContext >& _rxInnerContext )
     {
-        return new OToolBoxWindowItemContext( m_nIndexInParent,getORB(), _rxInnerContext, this, getParent() );
+        return new OToolBoxWindowItemContext( m_nIndexInParent, getComponentContext(), _rxInnerContext, this, getParent() );
     }
 
     //--------------------------------------------------------------------
@@ -717,7 +717,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleChild( sal
             Reference< XAccessible> xParent = pChild;
             if ( pItemWindow )
             {
-                xChild = new OToolBoxWindowItem(0,::comphelper::getProcessServiceFactory(),pItemWindow->GetAccessible(),xParent);
+                xChild = new OToolBoxWindowItem(0,::comphelper::getProcessComponentContext(),pItemWindow->GetAccessible(),xParent);
                 pItemWindow->SetAccessible(xChild);
                 pChild->SetChild( xChild );
             }
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index e577882..b192a4f 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -70,7 +70,7 @@ using namespace com::sun::star;
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <comphelper/processfactory.hxx>
 #include <map>
-#include <com/sun/star/reflection/XProxyFactory.hpp>
+#include <com/sun/star/reflection/ProxyFactory.hpp>
 #include <cppuhelper/implbase1.hxx>
 #include <com/sun/star/uno/XAggregation.hpp>
 #include <com/sun/star/script/XInvocation.hpp>
@@ -156,11 +156,7 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar ), mName( pV
             {
                 try
                 {
-                    Reference< XComponentContext > xCtx(
-                        comphelper::getProcessComponentContext() );
-                    Reference< XMultiComponentFactory > xMFac(
-                        xCtx->getServiceManager() );
-                    Reference< XProxyFactory > xProxyFac( xMFac->createInstanceWithContext( OUString( "com.sun.star.reflection.ProxyFactory"  ), xCtx  ), UNO_QUERY_THROW );
+                    Reference< XProxyFactory > xProxyFac = ProxyFactory::create( comphelper::getProcessComponentContext() );
                     m_xAggProxy = xProxyFac->createProxy( xIf );
                 }
                 catch(const Exception& )
diff --git a/comphelper/inc/comphelper/accessiblewrapper.hxx b/comphelper/inc/comphelper/accessiblewrapper.hxx
index dfd144b..1b4ab52 100644
--- a/comphelper/inc/comphelper/accessiblewrapper.hxx
+++ b/comphelper/inc/comphelper/accessiblewrapper.hxx
@@ -76,7 +76,7 @@ namespace comphelper
 
     public:
         /** ctor
-            @param _rxORB
+            @param _rxContext
                 a service factory
 
             @param _rxInnerAccessible
@@ -86,7 +86,7 @@ namespace comphelper
                 The XAccessible which is our parent
         */
         OAccessibleWrapper(
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxInnerAccessible,
             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParentAccessible
         );
@@ -160,7 +160,7 @@ namespace comphelper
     protected:
         /** ctor
 
-            @param _rxORB
+            @param _rxContext
                 a service factory
 
             @param _rxInnerAccessibleContext
@@ -176,7 +176,7 @@ namespace comphelper
                 The XAccessible to return in the getAccessibleParent call
         */
         OAccessibleContextWrapperHelper(
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
             ::cppu::OBroadcastHelper& _rBHelper,
             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& _rxInnerAccessibleContext,
             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxOwningAccessible,
@@ -247,7 +247,7 @@ namespace comphelper
     public:
         /** ctor
 
-            @param _rxORB
+            @param _rxContext
                 a service factory
 
             @param _rxInnerAccessibleContext
@@ -263,7 +263,7 @@ namespace comphelper
                 The XAccessible to return in the getAccessibleParent call
         */
         OAccessibleContextWrapper(
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& _rxInnerAccessibleContext,
             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxOwningAccessible,
             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParentAccessible
@@ -330,8 +330,8 @@ namespace comphelper
     class COMPHELPER_DLLPUBLIC OWrappedAccessibleChildrenManager : public OWrappedAccessibleChildrenManager_Base
     {
     protected:
-        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
-                                m_xORB;
+        ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+                                m_xContext;
         ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible >
                                 m_aOwningAccessible;    // the XAccessible which belongs to the XAccessibleContext which we work for
         AccessibleMap           m_aChildrenMap;         // for caching children
@@ -340,7 +340,7 @@ namespace comphelper
     public:
         /// ctor
         OWrappedAccessibleChildrenManager(
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
         );
 
         /** specifies if the children are to be consideren transient (i.e.: not cached)
diff --git a/comphelper/inc/comphelper/proxyaggregation.hxx b/comphelper/inc/comphelper/proxyaggregation.hxx
index de32f58..2d78b86 100644
--- a/comphelper/inc/comphelper/proxyaggregation.hxx
+++ b/comphelper/inc/comphelper/proxyaggregation.hxx
@@ -82,16 +82,16 @@ namespace comphelper
     private:
         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >             m_xProxyAggregate;
         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider >           m_xProxyTypeAccess;
-        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >    m_xORB;
+        ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >        m_xContext;
 
     protected:
-        inline const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& getORB()
+        inline const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& getComponentContext()
         {
-            return m_xORB;
+            return m_xContext;
         }
 
     protected:
-        OProxyAggregation( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB );
+        OProxyAggregation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext );
         ~OProxyAggregation();
 
         /// to be called from within your ctor
@@ -138,7 +138,7 @@ namespace comphelper
 
     protected:
         // OProxyAggregation
-        using OProxyAggregation::getORB;
+        using OProxyAggregation::getComponentContext;
 
         // XInterface
         ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& _rType ) throw (::com::sun::star::uno::RuntimeException);
@@ -148,7 +148,7 @@ namespace comphelper
 
     protected:
         OComponentProxyAggregationHelper(
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
             ::cppu::OBroadcastHelper& _rBHelper
         );
         virtual ~OComponentProxyAggregationHelper( );
@@ -183,7 +183,7 @@ namespace comphelper
     {
     protected:
         OComponentProxyAggregation(
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _rxComponent
         );
 
diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx
index 2027606..929eb5f 100644
--- a/comphelper/source/misc/accessiblewrapper.cxx
+++ b/comphelper/source/misc/accessiblewrapper.cxx
@@ -73,8 +73,8 @@ namespace comphelper
     };
 
     //-------------------------------------------------------------------------
-    OWrappedAccessibleChildrenManager::OWrappedAccessibleChildrenManager( const Reference< XMultiServiceFactory >& _rxORB )
-        :m_xORB( _rxORB )
+    OWrappedAccessibleChildrenManager::OWrappedAccessibleChildrenManager( const Reference< XComponentContext >& _rxContext )
+        :m_xContext( _rxContext )
         ,m_bTransientChildren( sal_True )
     {
     }
@@ -142,7 +142,7 @@ namespace comphelper
         else if ( _bCreate )
         {   // not found in the cache, and allowed to create
             // -> new wrapper
-            xValue = new OAccessibleWrapper( m_xORB, _rxKey, (Reference< XAccessible >)m_aOwningAccessible );
+            xValue = new OAccessibleWrapper( m_xContext, _rxKey, (Reference< XAccessible >)m_aOwningAccessible );
 
             // see if we do cache children
             if ( !m_bTransientChildren )
@@ -298,10 +298,10 @@ namespace comphelper
     //= OAccessibleWrapper (implementation)
     //=========================================================================
     //-------------------------------------------------------------------------
-    OAccessibleWrapper::OAccessibleWrapper( const Reference< XMultiServiceFactory >& _rxORB,
+    OAccessibleWrapper::OAccessibleWrapper( const Reference< XComponentContext >& _rxContext,
             const Reference< XAccessible >& _rxInnerAccessible, const Reference< XAccessible >& _rxParentAccessible )
         :OAccessibleWrapper_Base( )
-        ,OComponentProxyAggregation( _rxORB, Reference< XComponent >( _rxInnerAccessible, UNO_QUERY ) )
+        ,OComponentProxyAggregation( _rxContext, Reference< XComponent >( _rxInnerAccessible, UNO_QUERY ) )
         ,m_xParentAccessible( _rxParentAccessible )
         ,m_xInnerAccessible( _rxInnerAccessible )
     {
@@ -341,7 +341,7 @@ namespace comphelper
     //--------------------------------------------------------------------
     OAccessibleContextWrapper* OAccessibleWrapper::createAccessibleContext( const Reference< XAccessibleContext >& _rxInnerContext )
     {
-        return new OAccessibleContextWrapper( getORB(), _rxInnerContext, this, m_xParentAccessible );
+        return new OAccessibleContextWrapper( getComponentContext(), _rxInnerContext, this, m_xParentAccessible );
     }
 
     //--------------------------------------------------------------------
@@ -369,19 +369,19 @@ namespace comphelper
     //=========================================================================
     //-------------------------------------------------------------------------
     OAccessibleContextWrapperHelper::OAccessibleContextWrapperHelper(
-                const Reference< XMultiServiceFactory >& _rxORB,
+                const Reference< XComponentContext >& _rxContext,
                 ::cppu::OBroadcastHelper& _rBHelper,
                 const Reference< XAccessibleContext >& _rxInnerAccessibleContext,
                 const Reference< XAccessible >& _rxOwningAccessible,
                 const Reference< XAccessible >& _rxParentAccessible )
-        :OComponentProxyAggregationHelper( _rxORB, _rBHelper )
+        :OComponentProxyAggregationHelper( _rxContext, _rBHelper )
         ,m_xInnerContext( _rxInnerAccessibleContext )
         ,m_xOwningAccessible( _rxOwningAccessible )
         ,m_xParentAccessible( _rxParentAccessible )
         ,m_pChildMapper( NULL )
     {
         // initialize the mapper for our children
-        m_pChildMapper = new OWrappedAccessibleChildrenManager( getORB() );
+        m_pChildMapper = new OWrappedAccessibleChildrenManager( getComponentContext() );
         m_pChildMapper->acquire();
 
         // determine if we're allowed to cache children
@@ -526,11 +526,11 @@ namespace comphelper
     IMPLEMENT_FORWARD_XTYPEPROVIDER2( OAccessibleContextWrapper, OAccessibleContextWrapper_CBase, OAccessibleContextWrapperHelper )
 
     //--------------------------------------------------------------------
-    OAccessibleContextWrapper::OAccessibleContextWrapper( const Reference< XMultiServiceFactory >& _rxORB,
+    OAccessibleContextWrapper::OAccessibleContextWrapper( const Reference< XComponentContext >& _rxContext,
             const Reference< XAccessibleContext >& _rxInnerAccessibleContext, const Reference< XAccessible >& _rxOwningAccessible,
             const Reference< XAccessible >& _rxParentAccessible )
         :OAccessibleContextWrapper_CBase( m_aMutex )
-        ,OAccessibleContextWrapperHelper( _rxORB, rBHelper, _rxInnerAccessibleContext, _rxOwningAccessible, _rxParentAccessible )
+        ,OAccessibleContextWrapperHelper( _rxContext, rBHelper, _rxInnerAccessibleContext, _rxOwningAccessible, _rxParentAccessible )
         ,m_nNotifierClient( 0 )
     {
         aggregateProxy( m_refCount, *this );
diff --git a/comphelper/source/misc/proxyaggregation.cxx b/comphelper/source/misc/proxyaggregation.cxx
index 6d190ff..a8771d6 100644
--- a/comphelper/source/misc/proxyaggregation.cxx
+++ b/comphelper/source/misc/proxyaggregation.cxx
@@ -18,7 +18,7 @@
  */
 
 #include <comphelper/proxyaggregation.hxx>
-#include <com/sun/star/reflection/XProxyFactory.hpp>
+#include <com/sun/star/reflection/ProxyFactory.hpp>
 
 //.............................................................................
 namespace comphelper
@@ -33,8 +33,8 @@ namespace comphelper
     //= OProxyAggregation
     //=========================================================================
     //-------------------------------------------------------------------------
-    OProxyAggregation::OProxyAggregation( const Reference< XMultiServiceFactory >& _rxORB )
-        :m_xORB( _rxORB )
+    OProxyAggregation::OProxyAggregation( const Reference< XComponentContext >& _rxContext )
+        :m_xContext( _rxContext )
     {
     }
 
@@ -43,32 +43,25 @@ namespace comphelper
             ::cppu::OWeakObject& _rDelegator )
     {
         // first a factory for the proxy
-        Reference< XProxyFactory > xFactory(
-            m_xORB->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.reflection.ProxyFactory" ) ) ),
-            UNO_QUERY
-        );
-        OSL_ENSURE( xFactory.is(), "OProxyAggregation::baseAggregateProxyFor: could not create a proxy factory!" );
+        Reference< XProxyFactory > xFactory = ProxyFactory::create( m_xContext );
 
         // then the proxy itself
-        if ( xFactory.is() )
+        { // i36686 OJ: achieve the desctruction of the tempoary -> otherwise it leads to _rRefCount -= 2
+            m_xProxyAggregate = xFactory->createProxy( _rxComponent );
+        }
+        if ( m_xProxyAggregate.is() )
+            m_xProxyAggregate->queryAggregation( ::getCppuType( &m_xProxyTypeAccess ) ) >>= m_xProxyTypeAccess;
+
+        // aggregate the proxy
+        osl_atomic_increment( &_rRefCount );
+        if ( m_xProxyAggregate.is() )
         {
-            { // i36686 OJ: achieve the desctruction of the tempoary -> otherwise it leads to _rRefCount -= 2
-                m_xProxyAggregate = xFactory->createProxy( _rxComponent );
-            }
-            if ( m_xProxyAggregate.is() )
-                m_xProxyAggregate->queryAggregation( ::getCppuType( &m_xProxyTypeAccess ) ) >>= m_xProxyTypeAccess;
-
-            // aggregate the proxy
-            osl_atomic_increment( &_rRefCount );
-            if ( m_xProxyAggregate.is() )
-            {
-                // At this point in time, the proxy has a ref count of exactly two - in m_xControlContextProxy,
-                // and in m_xProxyTypeAccess.
-                // Remember to _not_ reset these members unless the delegator of the proxy has been reset, too!
-                m_xProxyAggregate->setDelegator( _rDelegator );
-            }
-            osl_atomic_decrement( &_rRefCount );
+            // At this point in time, the proxy has a ref count of exactly two - in m_xControlContextProxy,
+            // and in m_xProxyTypeAccess.
+            // Remember to _not_ reset these members unless the delegator of the proxy has been reset, too!
+            m_xProxyAggregate->setDelegator( _rDelegator );
         }
+        osl_atomic_decrement( &_rRefCount );
     }
 
     //-------------------------------------------------------------------------
@@ -104,12 +97,12 @@ namespace comphelper
     //= OComponentProxyAggregationHelper
     //=========================================================================
     //-------------------------------------------------------------------------
-    OComponentProxyAggregationHelper::OComponentProxyAggregationHelper( const Reference< XMultiServiceFactory >& _rxORB,
+    OComponentProxyAggregationHelper::OComponentProxyAggregationHelper( const Reference< XComponentContext >& _rxContext,
         ::cppu::OBroadcastHelper& _rBHelper )
-        :OProxyAggregation( _rxORB )
+        :OProxyAggregation( _rxContext )
         ,m_rBHelper( _rBHelper )
     {
-        OSL_ENSURE( _rxORB.is(), "OComponentProxyAggregationHelper::OComponentProxyAggregationHelper: invalid arguments!" );
+        OSL_ENSURE( _rxContext.is(), "OComponentProxyAggregationHelper::OComponentProxyAggregationHelper: invalid arguments!" );
     }
 
     //-------------------------------------------------------------------------
@@ -192,10 +185,10 @@ namespace comphelper
     //= OComponentProxyAggregation
     //=========================================================================
     //-------------------------------------------------------------------------
-    OComponentProxyAggregation::OComponentProxyAggregation( const Reference< XMultiServiceFactory >& _rxORB,
+    OComponentProxyAggregation::OComponentProxyAggregation( const Reference< XComponentContext >& _rxContext,
             const Reference< XComponent >& _rxComponent )
         :OComponentProxyAggregation_CBase( m_aMutex )
-        ,OComponentProxyAggregationHelper( _rxORB, rBHelper )
+        ,OComponentProxyAggregationHelper( _rxContext, rBHelper )
     {
         OSL_ENSURE( _rxComponent.is(), "OComponentProxyAggregation::OComponentProxyAggregation: accessible is no XComponent!" );
         if ( _rxComponent.is() )
diff --git a/connectivity/inc/connectivity/ConnectionWrapper.hxx b/connectivity/inc/connectivity/ConnectionWrapper.hxx
index 4c3966b..df89160 100644
--- a/connectivity/inc/connectivity/ConnectionWrapper.hxx
+++ b/connectivity/inc/connectivity/ConnectionWrapper.hxx
@@ -25,6 +25,7 @@
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
 #include <comphelper/broadcasthelper.hxx>
 #include "connectivity/CommonTools.hxx"
 #include "connectivity/dbtoolsdllapi.hxx"
@@ -52,7 +53,7 @@ namespace connectivity
         virtual ~OConnectionWrapper();
         void setDelegation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >& _rxProxyConnection,oslInterlockedCount& _rRefCount);
         void setDelegation(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection
-            ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _xORB
+            ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext
             ,oslInterlockedCount& _rRefCount);
         // must be called from derived classes
         void disposing();
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx
index 7b3f14f..fbf4082 100644
--- a/connectivity/source/commontools/ConnectionWrapper.cxx
+++ b/connectivity/source/commontools/ConnectionWrapper.cxx
@@ -24,7 +24,7 @@
 #include <comphelper/uno3.hxx>
 #include <comphelper/sequence.hxx>
 #include <cppuhelper/typeprovider.hxx>
-#include <com/sun/star/reflection/XProxyFactory.hpp>
+#include <com/sun/star/reflection/ProxyFactory.hpp>
 #include <rtl/digest.h>
 #include <algorithm>
 #include <string.h>
@@ -65,7 +65,7 @@ void OConnectionWrapper::setDelegation(Reference< XAggregation >& _rxProxyConnec
 }
 // -----------------------------------------------------------------------------
 void OConnectionWrapper::setDelegation(const Reference< XConnection >& _xConnection
-                                       ,const Reference< XMultiServiceFactory>& _xORB
+                                       ,const Reference< XComponentContext>& _rxContext
                                        ,oslInterlockedCount& _rRefCount)
 {
     OSL_ENSURE(_xConnection.is(),"OConnectionWrapper: Connection must be valid!");
@@ -76,7 +76,7 @@ void OConnectionWrapper::setDelegation(const Reference< XConnection >& _xConnect
     m_xUnoTunnel.set(m_xConnection,UNO_QUERY);
     m_xServiceInfo.set(m_xConnection,UNO_QUERY);
 
-    Reference< XProxyFactory >  xProxyFactory(_xORB->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.ProxyFactory"))),UNO_QUERY);
+    Reference< XProxyFactory >  xProxyFactory = ProxyFactory::create( _rxContext );
     Reference< XAggregation > xConProxy = xProxyFactory->createProxy(_xConnection);
     if (xConProxy.is())
     {
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 7740379..68b5448 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
 #include <com/sun/star/beans/NamedValue.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/reflection/ProxyFactory.hpp>
 #include <comphelper/extract.hxx>
 #include <comphelper/processfactory.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
@@ -78,11 +79,7 @@ OPoolCollection::OPoolCollection(const Reference< XMultiServiceFactory >&   _rxF
     m_xDriverAccess = Reference< XDriverAccess >(m_xManager, UNO_QUERY);
     OSL_ENSURE(m_xDriverAccess.is(), "have no (or an invalid) driver manager!");
 
-    m_xProxyFactory = Reference< XProxyFactory >(
-        m_xServiceFactory->createInstance(
-            ::rtl::OUString("com.sun.star.reflection.ProxyFactory")),
-        UNO_QUERY);
-    OSL_ENSURE(m_xProxyFactory.is(), "OConnectionPool::OConnectionPool: could not create a proxy factory!");
+    m_xProxyFactory = ProxyFactory::create( comphelper::getComponentContext(m_xServiceFactory) );
 
     Reference<XPropertySet> xProp(getConfigPoolRoot(),UNO_QUERY);
     if ( xProp.is() )
@@ -216,16 +213,11 @@ Reference< XDriver > SAL_CALL OPoolCollection::getDriverByURL( const ::rtl::OUSt
         else
         {   // create a new proxy for the driver
             // this allows us to control the connections created by it
-            if (m_xProxyFactory.is())
-            {
-                Reference< XAggregation > xDriverProxy = m_xProxyFactory->createProxy(xDriver.get());
-                OSL_ENSURE(xDriverProxy.is(), "OConnectionPool::getDriverByURL: invalid proxy returned by the proxy factory!");
+            Reference< XAggregation > xDriverProxy = m_xProxyFactory->createProxy(xDriver.get());
+            OSL_ENSURE(xDriverProxy.is(), "OConnectionPool::getDriverByURL: invalid proxy returned by the proxy factory!");
 
-                OConnectionPool* pConnectionPool = getConnectionPool(sImplName,xDriver,xDriverNode);
-                xDriver = new ODriverWrapper(xDriverProxy, pConnectionPool);
-            }
-            else
-                OSL_FAIL("OConnectionPool::getDriverByURL: could not instantiate a proxy factory!");
+            OConnectionPool* pConnectionPool = getConnectionPool(sImplName,xDriver,xDriverNode);
+            xDriver = new ODriverWrapper(xDriverProxy, pConnectionPool);
         }
     }
 
diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx
index 2d447af..2b1f9c0 100644
--- a/connectivity/source/drivers/hsqldb/HConnection.cxx
+++ b/connectivity/source/drivers/hsqldb/HConnection.cxx
@@ -53,6 +53,7 @@ using ::com::sun::star::uno::Exception;
 using ::com::sun::star::uno::RuntimeException;
 using ::com::sun::star::uno::UNO_QUERY;
 using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::uno::XComponentContext;
 using ::com::sun::star::sdbc::XStatement;
 using ::com::sun::star::sdbc::XConnection;
 using ::com::sun::star::sdbcx::XDataDefinitionSupplier;
@@ -118,15 +119,15 @@ namespace connectivity { namespace hsqldb
     }
     // -----------------------------------------------------------------------------
     OHsqlConnection::OHsqlConnection( const Reference< XDriver > _rxDriver,
-        const Reference< XConnection >& _xConnection ,const Reference< XMultiServiceFactory>& _xORB )
+        const Reference< XConnection >& _xConnection ,const Reference< XComponentContext >& _rxContext )
         :OHsqlConnection_BASE( m_aMutex )
         ,m_aFlushListeners( m_aMutex )
         ,m_xDriver( _rxDriver )
-        ,m_xORB( _xORB )
+        ,m_xContext( _rxContext )
         ,m_bIni(true)
         ,m_bReadOnly(false)
     {
-        setDelegation(_xConnection,_xORB,m_refCount);
+        setDelegation(_xConnection,_rxContext,m_refCount);
     }
     // -----------------------------------------------------------------------------
     OHsqlConnection::~OHsqlConnection()
@@ -343,8 +344,8 @@ namespace connectivity { namespace hsqldb
         {
             // create a graphic provider
             Reference< XGraphicProvider > xProvider;
-            if ( m_xORB.is() )
-                xProvider.set( GraphicProvider::create(::comphelper::getComponentContext(m_xORB)) );
+            if ( m_xContext.is() )
+                xProvider.set( GraphicProvider::create(m_xContext) );
 
             // assemble the image URL
             ::rtl::OUStringBuffer aImageURL;
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 114c440..471d67b 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -381,7 +381,7 @@ namespace connectivity
                             xDesktop->addTerminateListener(s_xTerminateListener);
                         }
                     }
-                    Reference< XComponent> xIfc = new OHsqlConnection( this, xOrig, m_xFactory );
+                    Reference< XComponent> xIfc = new OHsqlConnection( this, xOrig, comphelper::getComponentContext(m_xFactory) );
                     xConnection.set(xIfc,UNO_QUERY);
                     m_aConnections.push_back(TWeakPair(WeakReferenceHelper(xOrig),TWeakConnectionPair(sKey,TWeakRefPair(WeakReferenceHelper(xConnection),WeakReferenceHelper()))));
 
diff --git a/connectivity/source/inc/hsqldb/HConnection.hxx b/connectivity/source/inc/hsqldb/HConnection.hxx
index aad422e..42748d9 100644
--- a/connectivity/source/inc/hsqldb/HConnection.hxx
+++ b/connectivity/source/inc/hsqldb/HConnection.hxx
@@ -62,7 +62,7 @@ namespace connectivity
         private:
             ::cppu::OInterfaceContainerHelper                                                           m_aFlushListeners;
             ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver >                         m_xDriver;
-            ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >            m_xORB;
+            ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >                m_xContext;
             bool                                                                                        m_bIni;
             bool                                                                                        m_bReadOnly;
 
@@ -74,7 +74,7 @@ namespace connectivity
             OHsqlConnection(
                 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > _rxDriver,
                 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,
-                const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _xORB
+                const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext
             );
 
             // XServiceInfo
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index 8e5d5c4..cab3e3a 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -34,7 +34,7 @@
 #include <com/sun/star/sdb/CommandType.hpp>
 #include <com/sun/star/sdbc/XDriverAccess.hpp>
 #include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp>
-#include <com/sun/star/reflection/XProxyFactory.hpp>
+#include <com/sun/star/reflection/ProxyFactory.hpp>
 #include <com/sun/star/beans/NamedValue.hpp>
 #include <connectivity/dbtools.hxx>
 #include <connectivity/dbmetadata.hxx>
@@ -305,8 +305,8 @@ OConnection::OConnection(ODatabaseSource& _rDB
 
     try
     {
-        Reference< XProxyFactory > xProxyFactory(
-                _rxORB->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.ProxyFactory"))),UNO_QUERY);
+        Reference< XProxyFactory > xProxyFactory =
+                ProxyFactory::create( m_aContext.getUNOContext() );
         Reference<XAggregation> xAgg = xProxyFactory->createProxy(_rxMaster.get());
         setDelegation(xAgg,m_refCount);
         OSL_ENSURE(m_xConnection.is(), "OConnection::OConnection : invalid master connection !");
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 54d7156..89c14fb 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -39,7 +39,7 @@
 #include <com/sun/star/document/XEventBroadcaster.hpp>
 #include <com/sun/star/embed/XTransactedObject.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/reflection/XProxyFactory.hpp>
+#include <com/sun/star/reflection/ProxyFactory.hpp>
 #include <com/sun/star/sdb/DatabaseContext.hpp>
 #include <com/sun/star/sdbc/XDriverAccess.hpp>
 #include <com/sun/star/sdbc/XDriverManager.hpp>
@@ -313,7 +313,7 @@ protected:
     ~OSharedConnectionManager();
 
 public:
-    OSharedConnectionManager(const Reference< XMultiServiceFactory >& _rxServiceFactory);
+    OSharedConnectionManager(const Reference< XComponentContext >& _rxContext);
 
     void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException);
     Reference<XConnection> getConnection(   const rtl::OUString& url,
@@ -325,10 +325,10 @@ public:
 };
 
 DBG_NAME(OSharedConnectionManager)
-OSharedConnectionManager::OSharedConnectionManager(const Reference< XMultiServiceFactory >& _rxServiceFactory)
+OSharedConnectionManager::OSharedConnectionManager(const Reference< XComponentContext >& _rxContext)
 {
     DBG_CTOR(OSharedConnectionManager,NULL);
-    m_xProxyFactory.set(_rxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.ProxyFactory"))),UNO_QUERY);
+    m_xProxyFactory.set( ProxyFactory::create( _rxContext ) );
 }
 
 OSharedConnectionManager::~OSharedConnectionManager()
@@ -1212,7 +1212,7 @@ Reference< XConnection > ODatabaseSource::getConnection(const rtl::OUString& use
     { // create a new proxy for the connection
         if ( !m_pImpl->m_xSharedConnectionManager.is() )
         {
-            m_pImpl->m_pSharedConnectionManager = new OSharedConnectionManager( m_pImpl->m_aContext.getLegacyServiceFactory() );
+            m_pImpl->m_pSharedConnectionManager = new OSharedConnectionManager( m_pImpl->m_aContext.getUNOContext() );
             m_pImpl->m_xSharedConnectionManager = m_pImpl->m_pSharedConnectionManager;
         }
         xConn = m_pImpl->m_pSharedConnectionManager->getConnection(
diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb
index 7a35d47..dc8fc10 100644
Binary files a/offapi/type_reference/types.rdb and b/offapi/type_reference/types.rdb differ
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index d73a9d9..73349a4 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -21,7 +21,7 @@
 #include <com/sun/star/sdb/CommandType.hpp>
 #include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp>
 #include <com/sun/star/chart/XComplexDescriptionAccess.hpp>
-#include <com/sun/star/reflection/XProxyFactory.hpp>
+#include <com/sun/star/reflection/ProxyFactory.hpp>
 #include <com/sun/star/sdb/CommandType.hpp>
 #include <comphelper/sequence.hxx>
 #include <comphelper/sequenceashashmap.hxx>
@@ -319,9 +319,7 @@ void SAL_CALL ExportDocumentHandler::initialize( const uno::Sequence< uno::Any >
     if ( !m_xDatabaseDataProvider.is() || !m_xDatabaseDataProvider->getActiveConnection().is() )
         throw uno::Exception();
 
-    uno::Reference< reflection::XProxyFactory > xProxyFactory( m_xContext->getServiceManager()->createInstanceWithContext(
-        ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.ProxyFactory")),m_xContext),
-        uno::UNO_QUERY);
+    uno::Reference< reflection::XProxyFactory > xProxyFactory = reflection::ProxyFactory::create( m_xContext );
     m_xProxy = xProxyFactory->createProxy(m_xDelegatee.get());
     ::comphelper::query_aggregation(m_xProxy,m_xDelegatee);
     m_xTypeProvider.set(m_xDelegatee,uno::UNO_QUERY);
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 0e61365..2bdc681 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -23,7 +23,7 @@
 #include <com/sun/star/chart2/data/XDataReceiver.hpp>
 #include <com/sun/star/chart/XComplexDescriptionAccess.hpp>
 #include <com/sun/star/chart/ChartDataRowSource.hpp>
-#include <com/sun/star/reflection/XProxyFactory.hpp>
+#include <com/sun/star/reflection/ProxyFactory.hpp>
 #include <com/sun/star/sdb/CommandType.hpp>
 #include <comphelper/sequence.hxx>
 #include <comphelper/sequenceashashmap.hxx>
@@ -354,9 +354,7 @@ void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any >
 
     m_aArguments = m_xDatabaseDataProvider->detectArguments(NULL);
 
-    uno::Reference< reflection::XProxyFactory > xProxyFactory( m_xContext->getServiceManager()->createInstanceWithContext(
-        ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.ProxyFactory")),m_xContext),
-        uno::UNO_QUERY);
+    uno::Reference< reflection::XProxyFactory > xProxyFactory = reflection::ProxyFactory::create( m_xContext );
     m_xProxy = xProxyFactory->createProxy(m_xDelegatee.get());
     ::comphelper::query_aggregation(m_xProxy,m_xDelegatee);
     m_xTypeProvider.set(m_xDelegatee,uno::UNO_QUERY);
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
index 68c2f70..978a44c 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
@@ -27,7 +27,7 @@
 
 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
 #include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/reflection/XProxyFactory.hpp>
+#include <com/sun/star/reflection/ProxyFactory.hpp>
 
 #include <com/sun/star/script/provider/XScriptProviderFactory.hpp>
 #include <com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp>
@@ -397,11 +397,8 @@ public:
     // Use proxy factory service to create aggregatable proxy.
         try
         {
-            Reference< lang::XMultiComponentFactory > xMFac( m_xCtx->getServiceManager(), UNO_QUERY_THROW );
-            Reference< reflection::XProxyFactory > xProxyFac(
-                xMFac->createInstanceWithContext(
-                        rtl::OUString( "com.sun.star.reflection.ProxyFactory"  ),
-                        m_xCtx  ), UNO_QUERY_THROW );
+            Reference< reflection::XProxyFactory > xProxyFac =
+                reflection::ProxyFactory::create( m_xCtx );
             m_xAggProxy = xProxyFac->createProxy( m_xWrappedBrowseNode );
         }
         catch(  uno::Exception& )
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index 279e9f2..31b7471 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -24,7 +24,7 @@
 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
 #include <com/sun/star/form/FormComponentType.hpp>
-#include <com/sun/star/reflection/XProxyFactory.hpp>
+#include <com/sun/star/reflection/ProxyFactory.hpp>
 #include <com/sun/star/container/XContainer.hpp>
 #include <comphelper/processfactory.hxx>
 #include <unotools/accessiblestatesethelper.hxx>
@@ -123,7 +123,7 @@ AccessibleControlShape::AccessibleControlShape (
     ,   m_bDisposeNativeContext( sal_False )
     ,   m_bWaitingForControl( sal_False )
 {
-    m_pChildManager = new OWrappedAccessibleChildrenManager( getProcessServiceFactory() );
+    m_pChildManager = new OWrappedAccessibleChildrenManager( getProcessComponentContext() );
     m_pChildManager->acquire();
 
     osl_atomic_increment( &m_refCount );
@@ -260,11 +260,9 @@ void AccessibleControlShape::Init()
                 // .................................................................
                 // finally, aggregate a proxy for the control context
                 // first a factory for the proxy
-                Reference< XProxyFactory > xFactory;
-                xFactory = xFactory.query( getProcessServiceFactory()->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.reflection.ProxyFactory" ) ) ) );
-                OSL_ENSURE( xFactory.is(), "AccessibleControlShape::Init: could not create a proxy factory!" );
+                Reference< XProxyFactory > xFactory = ProxyFactory::create( comphelper::getComponentContext(getProcessServiceFactory()) );
                 // then the proxy itself
-                if ( xFactory.is() && xNativeControlContext.is() )
+                if ( xNativeControlContext.is() )
                 {
                     m_xControlContextProxy = xFactory->createProxy( xNativeControlContext );
                     OSL_VERIFY( xNativeControlContext->queryInterface( ::getCppuType( &m_xControlContextTypeAccess ) ) >>= m_xControlContextTypeAccess );
diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
index 8d24314..ea6d12d 100644
--- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
@@ -27,7 +27,7 @@
  *************************************************************************/
 
 #include "com/sun/star/lang/DisposedException.hpp"
-#include "com/sun/star/reflection/XProxyFactory.hpp"
+#include "com/sun/star/reflection/ProxyFactory.hpp"
 
 #include "tdoc_uri.hxx"
 
@@ -63,7 +63,7 @@ ParentStorageHolder::ParentStorageHolder(
 //=========================================================================
 //=========================================================================
 
-Storage::Storage( const uno::Reference< lang::XMultiServiceFactory > & xSMgr,
+Storage::Storage( const uno::Reference< uno::XComponentContext > & rxContext,
                   const rtl::Reference< StorageElementFactory > & xFactory,
                   const rtl::OUString & rUri,
                   const uno::Reference< embed::XStorage > & xParentStorage,
@@ -88,15 +88,9 @@ Storage::Storage( const uno::Reference< lang::XMultiServiceFactory > & xSMgr,
     // Use proxy factory service to create aggregatable proxy.
     try
     {
-        uno::Reference< reflection::XProxyFactory > xProxyFac(
-            xSMgr->createInstance(
-                rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
-                    "com.sun.star.reflection.ProxyFactory" ) ) ),
-            uno::UNO_QUERY );
-        if ( xProxyFac.is() )
-        {
-            m_xAggProxy = xProxyFac->createProxy( m_xWrappedStorage );
-        }
+        uno::Reference< reflection::XProxyFactory > xProxyFac =
+            reflection::ProxyFactory::create( rxContext );
+        m_xAggProxy = xProxyFac->createProxy( m_xWrappedStorage );
     }
     catch ( uno::Exception const & )
     {
@@ -576,7 +570,7 @@ void SAL_CALL Storage::revert()
 //=========================================================================
 
 OutputStream::OutputStream(
-            const uno::Reference< lang::XMultiServiceFactory > & xSMgr,
+            const uno::Reference< uno::XComponentContext > & rxContext,
             const rtl::OUString & rUri,
             const uno::Reference< embed::XStorage >  & xParentStorage,
             const uno::Reference< io::XOutputStream > & xStreamToWrap )
@@ -597,15 +591,9 @@ OutputStream::OutputStream(
     // Use proxy factory service to create aggregatable proxy.
     try
     {
-        uno::Reference< reflection::XProxyFactory > xProxyFac(
-            xSMgr->createInstance(
-                rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
-                    "com.sun.star.reflection.ProxyFactory" ) ) ),
-            uno::UNO_QUERY );
-        if ( xProxyFac.is() )
-        {
-            m_xAggProxy = xProxyFac->createProxy( m_xWrappedStream );
-        }
+        uno::Reference< reflection::XProxyFactory > xProxyFac =
+            reflection::ProxyFactory::create( rxContext );
+        m_xAggProxy = xProxyFac->createProxy( m_xWrappedStream );
     }
     catch ( uno::Exception const & )
     {
@@ -774,7 +762,7 @@ OutputStream::removeEventListener(
 //=========================================================================
 
 Stream::Stream(
-            const uno::Reference< lang::XMultiServiceFactory > & xSMgr,
+            const uno::Reference< uno::XComponentContext > & rxContext,
             const rtl::OUString & rUri,
             const uno::Reference< embed::XStorage >  & xParentStorage,
             const uno::Reference< io::XStream > & xStreamToWrap )
@@ -798,15 +786,9 @@ Stream::Stream(
     // Use proxy factory service to create aggregatable proxy.
     try
     {
-        uno::Reference< reflection::XProxyFactory > xProxyFac(
-            xSMgr->createInstance(
-                rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
-                    "com.sun.star.reflection.ProxyFactory" ) ) ),
-            uno::UNO_QUERY );
-        if ( xProxyFac.is() )
-        {
-            m_xAggProxy = xProxyFac->createProxy( m_xWrappedStream );
-        }
+        uno::Reference< reflection::XProxyFactory > xProxyFac =
+            reflection::ProxyFactory::create( rxContext );
+        m_xAggProxy = xProxyFac->createProxy( m_xWrappedStream );
     }
     catch ( uno::Exception const & )
     {
diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx b/ucb/source/ucp/tdoc/tdoc_stgelems.hxx
index d69407e..2d4d23d 100644
--- a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_stgelems.hxx
@@ -81,7 +81,7 @@ class Storage : public StorageUNOBase, public ParentStorageHolder
 public:
     Storage(
         const com::sun::star::uno::Reference<
-            com::sun::star::lang::XMultiServiceFactory > & xSMgr,
+            com::sun::star::uno::XComponentContext > & rxContext,
         const rtl::Reference< StorageElementFactory >  & xFactory,
         const rtl::OUString & rUri,
         const com::sun::star::uno::Reference<
@@ -316,7 +316,7 @@ class OutputStream : public OutputStreamUNOBase, public ParentStorageHolder
 public:
     OutputStream(
         const com::sun::star::uno::Reference<
-            com::sun::star::lang::XMultiServiceFactory > & xSMgr,
+            com::sun::star::uno::XComponentContext > & rxContext,
         const rtl::OUString & rUri,
         const com::sun::star::uno::Reference<
             com::sun::star::embed::XStorage >  & xParentStorage,
@@ -398,7 +398,7 @@ class Stream : public StreamUNOBase, public ParentStorageHolder
 public:
     Stream(
         const com::sun::star::uno::Reference<
-            com::sun::star::lang::XMultiServiceFactory > & xSMgr,
+            com::sun::star::uno::XComponentContext > & rxContext,
         const rtl::OUString & rUri,
         const com::sun::star::uno::Reference<
             com::sun::star::embed::XStorage >  & xParentStorage,
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index b71d614..dd86cff 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -22,6 +22,7 @@
 #include "com/sun/star/beans/XPropertySet.hpp"
 #include "com/sun/star/embed/ElementModes.hpp"
 #include "com/sun/star/lang/XSingleServiceFactory.hpp"
+#include "comphelper/processfactory.hxx"
 
 #include "tdoc_uri.hxx"
 #include "tdoc_docmgr.hxx"
@@ -184,7 +185,7 @@ StorageElementFactory::createStorage( const rtl::OUString & rUri,
                             || ( eMode == READ_WRITE_CREATE ) );
 
         std::auto_ptr< Storage > xElement(
-            new Storage( m_xSMgr, this, aUriKey, xParentStorage, xStorage ) );
+            new Storage( comphelper::getComponentContext(m_xSMgr), this, aUriKey, xParentStorage, xStorage ) );
 
         aIt = m_aMap.insert(
             StorageMap::value_type(
@@ -234,7 +235,7 @@ StorageElementFactory::createStorage( const rtl::OUString & rUri,
         }
 
         aIt->second
-            = new Storage( m_xSMgr, this, aUriKey, xParentStorage, xStorage );
+            = new Storage( comphelper::getComponentContext(m_xSMgr), this, aUriKey, xParentStorage, xStorage );
         aIt->second->m_aContainerIt = aIt;
         return aIt->second;
     }
@@ -312,7 +313,7 @@ StorageElementFactory::createOutputStream( const rtl::OUString & rUri,
     //       read-only instance!)
     return uno::Reference< io::XOutputStream >(
         new OutputStream(
-            m_xSMgr, rUri, xParentStorage, xStream->getOutputStream() ) );
+            comphelper::getComponentContext(m_xSMgr), rUri, xParentStorage, xStream->getOutputStream() ) );
 }
 
 //=========================================================================
@@ -352,7 +353,7 @@ StorageElementFactory::createStream( const rtl::OUString & rUri,
     }
 
     return uno::Reference< io::XStream >(
-        new Stream( m_xSMgr, rUri, xParentStorage, xStream ) );
+        new Stream( comphelper::getComponentContext(m_xSMgr), rUri, xParentStorage, xStream ) );
 }
 
 //=========================================================================
diff --git a/udkapi/UnoApi_udkapi.mk b/udkapi/UnoApi_udkapi.mk
index a7a5778..3826f3c 100644
--- a/udkapi/UnoApi_udkapi.mk
+++ b/udkapi/UnoApi_udkapi.mk
@@ -96,7 +96,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,udkapi,udkapi/com/sun/star/loader,
 ))
 $(eval $(call gb_UnoApi_add_idlfiles_noheader,udkapi,udkapi/com/sun/star/reflection,\
 	CoreReflection \
-	ProxyFactory \
 	TypeDescriptionManager \
 	TypeDescriptionProvider \
 ))
@@ -145,6 +144,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,udkapi,udkapi/com/sun/star/io,\
 ))
 $(eval $(call gb_UnoApi_add_idlfiles_nohdl,udkapi,udkapi/com/sun/star/reflection,\
 	theCoreReflection \
+	ProxyFactory \
 ))
 $(eval $(call gb_UnoApi_add_idlfiles_nohdl,udkapi,udkapi/com/sun/star/registry,\
 	ImplementationRegistration \
diff --git a/udkapi/com/sun/star/reflection/ProxyFactory.idl b/udkapi/com/sun/star/reflection/ProxyFactory.idl
index bf19be8..f690282 100644
--- a/udkapi/com/sun/star/reflection/ProxyFactory.idl
+++ b/udkapi/com/sun/star/reflection/ProxyFactory.idl
@@ -44,12 +44,7 @@
     depends on your programming language.
     Thus this service is deprecated, too.
 */
-published service ProxyFactory
-{
-    /** Factory interface to produce proxies
-    */
-    interface com::sun::star::reflection::XProxyFactory;
-};
+published service ProxyFactory : XProxyFactory;
 
 
 }; }; }; };
commit 56ea15091c69d280310aa8b28bb1e9488eaad756
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Nov 8 14:53:57 2012 +0200

    fdo#46808, use service constructor for i18n::Collator
    
    Change-Id: If6ad17fa9e274beff7ba872a095ced65438962af

diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx
index 609c390..69ce7d1 100644
--- a/comphelper/source/compare/AnyCompareFactory.cxx
+++ b/comphelper/source/compare/AnyCompareFactory.cxx
@@ -21,7 +21,7 @@
 #include "comphelper_module.hxx"
 
 #include <com/sun/star/ucb/XAnyCompareFactory.hpp>
-#include <com/sun/star/i18n/XCollator.hpp>
+#include <com/sun/star/i18n/Collator.hpp>
 #include <com/sun/star/lang/Locale.hpp>
 #include <com/sun/star/uno/Sequence.h>
 #include <com/sun/star/beans/PropertyValue.hpp>
@@ -51,16 +51,9 @@ class AnyCompare : public ::cppu::WeakImplHelper1< XAnyCompare >
 public:
     AnyCompare( Reference< XComponentContext > xContext, const Locale& rLocale ) throw()
     {
-        Reference< XMultiComponentFactory > xFactory = xContext->getServiceManager();
-        if ( xFactory.is() )
-    {
-        m_rCollator = Reference< XCollator >(
-                xFactory->createInstanceWithContext( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.Collator" )), xContext ),
-                        UNO_QUERY );
+        m_rCollator = Collator::create( xContext );
         m_rCollator->loadDefaultCollator( rLocale,
                                           0 ); //???
-        }
-
     }
 
     virtual sal_Int16 SAL_CALL compare( const Any& any1, const Any& any2 ) throw(RuntimeException);
@@ -102,16 +95,13 @@ sal_Int16 SAL_CALL AnyCompare::compare( const Any& any1, const Any& any2 ) throw
 {
     sal_Int16 aResult = 0;
 
-    if( m_rCollator.is() )
-    {
-        OUString aStr1;
-        OUString aStr2;
+    OUString aStr1;
+    OUString aStr2;
 
-        any1 >>= aStr1;
-        any2 >>= aStr2;
+    any1 >>= aStr1;
+    any2 >>= aStr2;
 
-        aResult = ( sal_Int16 )m_rCollator->compareString( aStr1, aStr2 );
-    }
+    aResult = ( sal_Int16 )m_rCollator->compareString( aStr1, aStr2 );
 
     return aResult;
 }
diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx
index 2fe8a3f..1dae9e8 100644
--- a/comphelper/source/misc/string.cxx
+++ b/comphelper/source/misc/string.cxx
@@ -36,6 +36,7 @@
 
 #include <com/sun/star/i18n/BreakIterator.hpp>
 #include <com/sun/star/i18n/CharType.hpp>
+#include <com/sun/star/i18n/Collator.hpp>
 
 
 namespace comphelper { namespace string {
@@ -343,12 +344,7 @@ NaturalStringSorter::NaturalStringSorter(
     const uno::Reference< uno::XComponentContext > &rContext,
     const lang::Locale &rLocale) : m_aLocale(rLocale)
 {
-    uno::Reference< lang::XMultiComponentFactory > xFactory(rContext->getServiceManager(),
-        uno::UNO_SET_THROW);
-
-    m_xCollator = uno::Reference< i18n::XCollator >(xFactory->createInstanceWithContext(
-        rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.Collator")), rContext),
-            uno::UNO_QUERY_THROW);
+    m_xCollator = i18n::Collator::create( rContext );
     m_xCollator->loadDefaultCollator(m_aLocale, 0);
     m_xBI = i18n::BreakIterator::create( rContext );
 }
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 31b2586..4963888 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -59,6 +59,7 @@
 #include <com/sun/star/frame/FrameSearchFlag.hpp>
 #include <com/sun/star/frame/XLayoutManager.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/i18n/Collator.hpp>
 #include <com/sun/star/sdb/CommandType.hpp>
 #include <com/sun/star/sdb/SQLContext.hpp>
 #include <com/sun/star/sdb/XBookmarksSupplier.hpp>
@@ -360,7 +361,7 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent)
         xDatabaseRegistrations->addDatabaseRegistrationsListener( this );
 
         // the collator for the string compares
-        m_xCollator = Reference< XCollator >( getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.Collator")) ), UNO_QUERY_THROW );
+        m_xCollator = Collator::create( comphelper::getComponentContext( getORB() ) );
         m_xCollator->loadDefaultCollator( Application::GetSettings().GetLanguageTag().getLocale(), 0 );
     }
     catch(const Exception&)
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index e52a892..39844e3 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -36,7 +36,7 @@
 #include "com/sun/star/deployment/LicenseException.hpp"
 #include "com/sun/star/deployment/VersionException.hpp"
 #include "com/sun/star/deployment/PlatformException.hpp"
-#include "com/sun/star/i18n/XCollator.hpp"
+#include "com/sun/star/i18n/Collator.hpp"
 #include "com/sun/star/i18n/CollatorOptions.hpp"
 
 #include <stdio.h>
@@ -160,11 +160,8 @@ void CommandEnvironmentImpl::printLicense(
     dp_misc::writeConsole(s3);
 
     //the user may enter "yes" or "no", we compare in a case insensitive way
-    Reference< css::i18n::XCollator > xCollator(
-        m_xComponentContext->getServiceManager()
-            ->createInstanceWithContext(
-                OUSTR("com.sun.star.i18n.Collator"),m_xComponentContext),
-            UNO_QUERY_THROW );
+    Reference< css::i18n::XCollator > xCollator =
+        css::i18n::Collator::create( m_xComponentContext );
     xCollator->loadDefaultCollator(
         toLocale(utl::ConfigManager::getLocale()),
         css::i18n::CollatorOptions::CollatorOptions_IGNORE_CASE);
diff --git a/i18npool/inc/chaptercollator.hxx b/i18npool/inc/chaptercollator.hxx
index cb50b25..83518d6 100644
--- a/i18npool/inc/chaptercollator.hxx
+++ b/i18npool/inc/chaptercollator.hxx
@@ -31,7 +31,7 @@ class ChapterCollator : public CollatorImpl
 {
 public:
     // Constructors
-    ChapterCollator( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF );
+    ChapterCollator( const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext );
     // Destructor
     ~ChapterCollator();
 
diff --git a/i18npool/inc/collatorImpl.hxx b/i18npool/inc/collatorImpl.hxx
index 7af9619..52409c5 100644
--- a/i18npool/inc/collatorImpl.hxx
+++ b/i18npool/inc/collatorImpl.hxx
@@ -20,7 +20,6 @@
 #define _I18N_COLLATORIMPL_HXX_
 
 #include <comphelper/processfactory.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/i18n/XLocaleData4.hpp>
 #include <com/sun/star/i18n/XCollator.hpp>
@@ -44,7 +43,7 @@ class CollatorImpl : public cppu::WeakImplHelper2
 public:
 
     // Constructors
-    CollatorImpl( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list