[Libreoffice-commits] .: 4 commits - basctl/source connectivity/source cui/source dbaccess/source desktop/source editeng/source framework/source offapi/UnoApi_offapi.mk sc/source sfx2/source svl/source svtools/source svx/inc svx/source sw/source ucbhelper/inc ucbhelper/source ucb/Library_cached1.mk ucb/Library_srtrs1.mk ucb/Library_ucpgio1.mk ucb/source unotools/inc unotools/source xmlhelp/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Nov 30 05:00:59 PST 2012


 basctl/source/basicide/scriptdocument.cxx                             |    2 
 connectivity/source/drivers/evoab2/NResultSet.cxx                     |    6 -
 cui/source/dialogs/cuifmsearch.cxx                                    |    2 
 cui/source/options/optdict.cxx                                        |    2 
 cui/source/tabpages/autocdlg.cxx                                      |   17 ---
 dbaccess/source/core/dataaccess/ContentHelper.cxx                     |    2 
 dbaccess/source/core/dataaccess/documentcontainer.cxx                 |    2 
 dbaccess/source/core/dataaccess/myucp_datasupplier.cxx                |   10 --
 dbaccess/source/core/dataaccess/myucp_datasupplier.hxx                |    4 
 dbaccess/source/core/dataaccess/myucp_resultset.cxx                   |   15 +--
 dbaccess/source/core/dataaccess/myucp_resultset.hxx                   |    2 
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx                   |    2 
 editeng/source/misc/svxacorr.cxx                                      |   11 --
 framework/source/uielement/toolbarsmenucontroller.cxx                 |    2 
 offapi/UnoApi_offapi.mk                                               |    1 
 sc/source/core/data/global.cxx                                        |    6 -
 sc/source/core/data/table3.cxx                                        |    2 
 sc/source/ui/dbgui/tpsort.cxx                                         |    2 
 sfx2/source/dialog/templdlg.cxx                                       |    2 
 sfx2/source/view/orgmgr.cxx                                           |    2 
 svl/source/items/dateitem.cxx                                         |    3 
 svl/source/items/style.cxx                                            |    3 
 svtools/source/contnr/fileview.cxx                                    |    2 
 svx/inc/svx/fmsrcimp.hxx                                              |    4 
 svx/source/dialog/simptabl.cxx                                        |    2 
 svx/source/form/fmsrcimp.cxx                                          |   12 +-
 svx/source/items/numfmtsh.cxx                                         |    2 
 svx/source/svdraw/svdattr.cxx                                         |    1 
 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx |    2 
 sw/source/core/bastyp/init.cxx                                        |    6 -
 sw/source/core/doc/docsort.cxx                                        |    3 
 sw/source/ui/app/docstyle.cxx                                         |    4 
 sw/source/ui/utlui/attrdesc.cxx                                       |    2 
 ucb/Library_cached1.mk                                                |    1 
 ucb/Library_srtrs1.mk                                                 |    1 
 ucb/Library_ucpgio1.mk                                                |    1 
 ucb/source/cacher/cachedcontentresultset.cxx                          |   14 +--
 ucb/source/cacher/cachedcontentresultset.hxx                          |   12 +-
 ucb/source/cacher/cacheddynamicresultset.cxx                          |    7 -
 ucb/source/cacher/cacheddynamicresultsetstub.cxx                      |   18 ++--
 ucb/source/cacher/cacheddynamicresultsetstub.hxx                      |    6 -
 ucb/source/cacher/dynamicresultsetwrapper.cxx                         |   14 +--
 ucb/source/cacher/dynamicresultsetwrapper.hxx                         |    6 -
 ucb/source/sorter/sortdynres.cxx                                      |   21 ++--
 ucb/source/sorter/sortdynres.hxx                                      |   12 +-
 ucb/source/ucp/cmis/cmis_content.cxx                                  |   16 +--
 ucb/source/ucp/cmis/cmis_content.hxx                                  |    4 
 ucb/source/ucp/cmis/cmis_datasupplier.cxx                             |    5 -
 ucb/source/ucp/cmis/cmis_datasupplier.hxx                             |    4 
 ucb/source/ucp/cmis/cmis_provider.cxx                                 |    4 
 ucb/source/ucp/cmis/cmis_repo_content.cxx                             |   12 +-
 ucb/source/ucp/cmis/cmis_repo_content.hxx                             |    2 
 ucb/source/ucp/cmis/cmis_resultset.cxx                                |    8 -
 ucb/source/ucp/cmis/cmis_resultset.hxx                                |    2 
 ucb/source/ucp/ext/ucpext_content.cxx                                 |   29 +++---
 ucb/source/ucp/ext/ucpext_content.hxx                                 |    4 
 ucb/source/ucp/ext/ucpext_datasupplier.cxx                            |   22 ++--
 ucb/source/ucp/ext/ucpext_datasupplier.hxx                            |    2 
 ucb/source/ucp/ext/ucpext_provider.cxx                                |    2 
 ucb/source/ucp/ext/ucpext_resultset.cxx                               |   10 +-
 ucb/source/ucp/ext/ucpext_resultset.hxx                               |    2 
 ucb/source/ucp/file/filrset.cxx                                       |   13 --
 ucb/source/ucp/ftp/ftpcontent.cxx                                     |   25 ++---
 ucb/source/ucp/ftp/ftpcontent.hxx                                     |    4 
 ucb/source/ucp/ftp/ftpcontentprovider.cxx                             |    2 
 ucb/source/ucp/ftp/ftpdynresultset.cxx                                |    4 
 ucb/source/ucp/ftp/ftpdynresultset.hxx                                |    2 
 ucb/source/ucp/ftp/ftpresultsetI.cxx                                  |    6 -
 ucb/source/ucp/ftp/ftpresultsetI.hxx                                  |    2 
 ucb/source/ucp/gio/gio_content.cxx                                    |   19 ++--
 ucb/source/ucp/gio/gio_content.hxx                                    |    6 -
 ucb/source/ucp/gio/gio_provider.cxx                                   |    3 
 ucb/source/ucp/gio/gio_resultset.cxx                                  |    9 +-
 ucb/source/ucp/gio/gio_resultset.hxx                                  |    2 
 ucb/source/ucp/gvfs/gvfs_content.cxx                                  |   16 +--
 ucb/source/ucp/gvfs/gvfs_content.hxx                                  |    4 
 ucb/source/ucp/gvfs/gvfs_directory.cxx                                |   17 +--
 ucb/source/ucp/gvfs/gvfs_directory.hxx                                |    6 -
 ucb/source/ucp/gvfs/gvfs_provider.cxx                                 |    2 
 ucb/source/ucp/hierarchy/dynamicresultset.cxx                         |   13 +-
 ucb/source/ucp/hierarchy/dynamicresultset.hxx                         |    2 
 ucb/source/ucp/hierarchy/hierarchycontent.cxx                         |   45 +++++-----
 ucb/source/ucp/hierarchy/hierarchycontent.hxx                         |   16 +--
 ucb/source/ucp/hierarchy/hierarchydata.cxx                            |   14 +--
 ucb/source/ucp/hierarchy/hierarchydata.hxx                            |    5 -
 ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx                    |   14 +--
 ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx                    |    2 
 ucb/source/ucp/hierarchy/hierarchyprovider.cxx                        |    2 
 ucb/source/ucp/odma/odma_content.cxx                                  |    8 -
 ucb/source/ucp/odma/odma_resultset.cxx                                |   11 +-
 ucb/source/ucp/odma/odma_resultset.hxx                                |    2 
 ucb/source/ucp/package/pkgcontent.cxx                                 |   35 ++++---
 ucb/source/ucp/package/pkgcontent.hxx                                 |   12 +-
 ucb/source/ucp/package/pkgdatasupplier.cxx                            |   12 +-
 ucb/source/ucp/package/pkgdatasupplier.hxx                            |    2 
 ucb/source/ucp/package/pkgprovider.cxx                                |    2 
 ucb/source/ucp/package/pkgresultset.cxx                               |   13 +-
 ucb/source/ucp/package/pkgresultset.hxx                               |    2 
 ucb/source/ucp/tdoc/tdoc_content.cxx                                  |   33 +++----
 ucb/source/ucp/tdoc/tdoc_content.hxx                                  |   12 +-
 ucb/source/ucp/tdoc/tdoc_datasupplier.cxx                             |   12 +-
 ucb/source/ucp/tdoc/tdoc_datasupplier.hxx                             |    2 
 ucb/source/ucp/tdoc/tdoc_provider.cxx                                 |    4 
 ucb/source/ucp/tdoc/tdoc_resultset.cxx                                |   13 +-
 ucb/source/ucp/tdoc/tdoc_resultset.hxx                                |    2 
 ucb/source/ucp/webdav-neon/webdavcontent.cxx                          |   37 +++-----
 ucb/source/ucp/webdav-neon/webdavcontent.hxx                          |    6 -
 ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx                     |   12 +-
 ucb/source/ucp/webdav-neon/webdavdatasupplier.hxx                     |    2 
 ucb/source/ucp/webdav-neon/webdavprovider.cxx                         |    2 
 ucb/source/ucp/webdav-neon/webdavresultset.cxx                        |   13 +-
 ucb/source/ucp/webdav-neon/webdavresultset.hxx                        |    2 
 ucb/source/ucp/webdav/webdavcontent.cxx                               |    9 +-
 ucb/source/ucp/webdav/webdavresultset.cxx                             |   10 +-
 ucb/source/ucp/webdav/webdavresultset.hxx                             |    2 
 ucbhelper/inc/ucbhelper/contenthelper.hxx                             |    8 -
 ucbhelper/inc/ucbhelper/propertyvalueset.hxx                          |    7 -
 ucbhelper/inc/ucbhelper/resultset.hxx                                 |    4 
 ucbhelper/inc/ucbhelper/resultsethelper.hxx                           |    7 -
 ucbhelper/source/provider/contenthelper.cxx                           |    4 
 ucbhelper/source/provider/propertyvalueset.cxx                        |   18 +---
 ucbhelper/source/provider/resultset.cxx                               |   25 ++---
 ucbhelper/source/provider/resultsethelper.cxx                         |   15 +--
 unotools/inc/unotools/collatorwrapper.hxx                             |    8 -
 unotools/inc/unotools/intlwrapper.hxx                                 |    7 +
 unotools/source/i18n/collatorwrapper.cxx                              |   12 --
 unotools/source/i18n/intlwrapper.cxx                                  |   19 +++-
 xmlhelp/source/cxxhelp/provider/content.cxx                           |   20 ++--
 xmlhelp/source/cxxhelp/provider/content.hxx                           |    2 
 xmlhelp/source/cxxhelp/provider/provider.cxx                          |    2 
 xmlhelp/source/cxxhelp/provider/resultset.cxx                         |    4 
 xmlhelp/source/cxxhelp/provider/resultset.hxx                         |    2 
 xmlhelp/source/cxxhelp/provider/urlparameter.cxx                      |    8 -
 xmlhelp/source/cxxhelp/provider/urlparameter.hxx                      |    7 -
 134 files changed, 514 insertions(+), 573 deletions(-)

New commits:
commit 3d4288c1c0b593421c7f6619c88584bdb7c53337
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Nov 8 13:10:01 2012 +0200

    fdo#46808, remove some more XMultiServiceFactory fields
    
    Change-Id: I8d039a933c9fde1a24b35954bb5a1f151e9aa160

diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index 9ef5a1d..204cee0 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -442,7 +442,7 @@ Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >&
 {
     // Note: Empty sequence means "get values of all supported properties".
 
-    rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( m_aContext.getLegacyServiceFactory() );
+    rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( m_aContext.getUNOContext() );
 
     sal_Int32 nCount = rProperties.getLength();
     if ( nCount )
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index f291257..6757694 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -213,11 +213,11 @@ namespace
 
 namespace cmis
 {
-    Content::Content( const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+    Content::Content( const uno::Reference< uno::XComponentContext >& rxContext,
         ContentProvider *pProvider, const uno::Reference< ucb::XContentIdentifier >& Identifier,
         libcmis::ObjectPtr pObject )
             throw ( ucb::ContentCreationException )
-        : ContentImplHelper( rxSMgr, pProvider, Identifier ),
+        : ContentImplHelper( rxContext, pProvider, Identifier ),
         m_pProvider( pProvider ),
         m_pSession( NULL ),
         m_pObject( pObject ),
@@ -232,11 +232,11 @@ namespace cmis
         m_sObjectId = m_aURL.getObjectId( );
     }
 
-    Content::Content( const uno::Reference< lang::XMultiServiceFactory >& rxSMgr, ContentProvider *pProvider,
+    Content::Content( const uno::Reference< uno::XComponentContext >& rxContext, ContentProvider *pProvider,
         const uno::Reference< ucb::XContentIdentifier >& Identifier,
         sal_Bool bIsFolder )
             throw ( ucb::ContentCreationException )
-        : ContentImplHelper( rxSMgr, pProvider, Identifier ),
+        : ContentImplHelper( rxContext, pProvider, Identifier ),
         m_pProvider( pProvider ),
         m_pSession( NULL ),
         m_sURL( Identifier->getContentIdentifier( ) ),
@@ -351,7 +351,7 @@ namespace cmis
             const uno::Sequence< beans::Property >& rProperties,
             const uno::Reference< ucb::XCommandEnvironment >& xEnv )
     {
-        rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( m_xSMgr );
+        rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( m_xContext );
 
         sal_Int32 nProps;
         const beans::Property* pProps;
@@ -682,7 +682,7 @@ namespace cmis
         if ( bOpenFolder && bIsFolder )
         {
             uno::Reference< ucb::XDynamicResultSet > xSet
-                = new DynamicResultSet(comphelper::getComponentContext(m_xSMgr), this, rOpenCommand, xEnv );
+                = new DynamicResultSet(m_xContext, this, rOpenCommand, xEnv );
             aRet <<= xSet;
         }
         else if ( rOpenCommand.Sink.is() )
@@ -1524,7 +1524,7 @@ namespace cmis
 
         try
         {
-            return new ::cmis::Content( m_xSMgr, m_pProvider, xId, !create_document );
+            return new ::cmis::Content( m_xContext, m_pProvider, xId, !create_document );
         }
         catch ( ucb::ContentCreationException & )
         {
@@ -1630,7 +1630,7 @@ namespace cmis
                     sPath += STD_TO_OUSTR( ( *it )->getName( ) );
                     aUrl.setObjectPath( sPath );
                     uno::Reference< ucb::XContentIdentifier > xId = new ucbhelper::ContentIdentifier( aUrl.asString( ) );
-                    uno::Reference< ucb::XContent > xContent = new Content( m_xSMgr, m_pProvider, xId, *it );
+                    uno::Reference< ucb::XContent > xContent = new Content( m_xContext, m_pProvider, xId, *it );
 
                     results.push_back( xContent );
                 }
diff --git a/ucb/source/ucp/cmis/cmis_content.hxx b/ucb/source/ucp/cmis/cmis_content.hxx
index 42c8482..b28c301 100644
--- a/ucb/source/ucp/cmis/cmis_content.hxx
+++ b/ucb/source/ucp/cmis/cmis_content.hxx
@@ -144,13 +144,13 @@ private:
 
 public:
     Content( const com::sun::star::uno::Reference<
-        com::sun::star::lang::XMultiServiceFactory >& rxSMgr, ContentProvider *pProvider,
+        com::sun::star::uno::XComponentContext >& rxContext, ContentProvider *pProvider,
         const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& Identifier,
         libcmis::ObjectPtr pObject = libcmis::ObjectPtr( ) )
             throw ( com::sun::star::ucb::ContentCreationException );
 
     Content( const com::sun::star::uno::Reference<
-        com::sun::star::lang::XMultiServiceFactory >& rxSMgr, ContentProvider *pProvider,
+        com::sun::star::uno::XComponentContext >& rxContext, ContentProvider *pProvider,
         const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& Identifier,
         sal_Bool bIsFolder)
             throw ( com::sun::star::ucb::ContentCreationException );
diff --git a/ucb/source/ucp/cmis/cmis_provider.cxx b/ucb/source/ucp/cmis/cmis_provider.cxx
index b7febb5..17c57a4 100644
--- a/ucb/source/ucp/cmis/cmis_provider.cxx
+++ b/ucb/source/ucp/cmis/cmis_provider.cxx
@@ -60,12 +60,12 @@ ContentProvider::queryContent(
         URL aUrl( Identifier->getContentIdentifier( ) );
         if ( aUrl.getRepositoryId( ).isEmpty( ) )
         {
-            xContent = new RepoContent( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW), this, Identifier );
+            xContent = new RepoContent( m_xContext, this, Identifier );
             registerNewContent( xContent );
         }
         else
         {
-            xContent = new Content( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW), this, Identifier );
+            xContent = new Content( m_xContext, this, Identifier );
             registerNewContent( xContent );
         }
     }
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index 40d7a96..c37d590 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -56,11 +56,11 @@ using namespace std;
 
 namespace cmis
 {
-    RepoContent::RepoContent( const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+    RepoContent::RepoContent( const uno::Reference< uno::XComponentContext >& rxContext,
         ContentProvider *pProvider, const uno::Reference< ucb::XContentIdentifier >& Identifier,
         list< libcmis::RepositoryPtr > aRepos )
             throw ( ucb::ContentCreationException )
-        : ContentImplHelper( rxSMgr, pProvider, Identifier ),
+        : ContentImplHelper( rxContext, pProvider, Identifier ),
         m_pProvider( pProvider ),
         m_aURL( Identifier->getContentIdentifier( ) ),
         m_sRepositoryId( ),
@@ -91,7 +91,7 @@ namespace cmis
             const uno::Sequence< beans::Property >& rProperties,
             const uno::Reference< ucb::XCommandEnvironment >& xEnv )
     {
-        rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( m_xSMgr );
+        rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( m_xContext );
 
         sal_Int32 nProps;
         const beans::Property* pProps;
@@ -315,7 +315,7 @@ namespace cmis
 
             getRepositories( xEnv );
             uno::Reference< ucb::XDynamicResultSet > xSet
-                = new DynamicResultSet(comphelper::getComponentContext(m_xSMgr), this, rOpenCommand, xEnv );
+                = new DynamicResultSet(m_xContext, this, rOpenCommand, xEnv );
             aRet <<= xSet;
         }
         else
@@ -364,7 +364,7 @@ namespace cmis
                 aUrl.setObjectPath( STD_TO_OUSTR( ( *it )->getId( ) ) );
 
                 uno::Reference< ucb::XContentIdentifier > xId = new ucbhelper::ContentIdentifier( aUrl.asString( ) );
-                uno::Reference< ucb::XContent > xContent = new RepoContent( m_xSMgr, m_pProvider, xId, m_aRepositories );
+                uno::Reference< ucb::XContent > xContent = new RepoContent( m_xContext, m_pProvider, xId, m_aRepositories );
 
                 result.push_back( xContent );
             }
@@ -381,7 +381,7 @@ namespace cmis
             sUrl = "vnd.libreoffice.cmis://" + sEncodedBinding;
 
             uno::Reference< ucb::XContentIdentifier > xId = new ucbhelper::ContentIdentifier( sUrl );
-            uno::Reference< ucb::XContent > xContent = new Content( m_xSMgr, m_pProvider, xId );
+            uno::Reference< ucb::XContent > xContent = new Content( m_xContext, m_pProvider, xId );
 
             result.push_back( xContent );
         }
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.hxx b/ucb/source/ucp/cmis/cmis_repo_content.hxx
index 2c4a32f..176df1b 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.hxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.hxx
@@ -93,7 +93,7 @@ private:
 
 public:
     RepoContent( const com::sun::star::uno::Reference<
-        com::sun::star::lang::XMultiServiceFactory >& rxSMgr, ContentProvider *pProvider,
+        com::sun::star::uno::XComponentContext >& rxContext, ContentProvider *pProvider,
         const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& Identifier,
         std::list< libcmis::RepositoryPtr > aRepos = std::list< libcmis::RepositoryPtr > ( ) )
             throw ( com::sun::star::ucb::ContentCreationException );
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index f58895b..9496dcc 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -40,7 +40,7 @@
 #include <com/sun/star/ucb/OpenMode.hpp>
 #include <com/sun/star/ucb/XDynamicResultSet.hpp>
 #include <com/sun/star/lang/IllegalAccessException.hpp>
-#include <com/sun/star/deployment/XPackageInformationProvider.hpp>
+#include <com/sun/star/deployment/PackageInformationProvider.hpp>
 
 #include <ucbhelper/contentidentifier.hxx>
 #include <ucbhelper/propertyvalueset.hxx>
@@ -73,6 +73,7 @@ namespace ucb { namespace ucp { namespace ext
     using ::com::sun::star::uno::makeAny;
     using ::com::sun::star::uno::Sequence;
     using ::com::sun::star::uno::Type;
+    using ::com::sun::star::uno::XComponentContext;
     using ::com::sun::star::lang::XMultiServiceFactory;
     using ::com::sun::star::ucb::XContentIdentifier;
     using ::com::sun::star::ucb::IllegalIdentifierException;
@@ -96,6 +97,7 @@ namespace ucb { namespace ucp { namespace ext
     using ::com::sun::star::beans::PropertyChangeEvent;
     using ::com::sun::star::lang::IllegalAccessException;
     using ::com::sun::star::ucb::CommandInfo;
+    using ::com::sun::star::deployment::PackageInformationProvider;
     using ::com::sun::star::deployment::XPackageInformationProvider;
     /** === end UNO using === **/
     namespace OpenMode = ::com::sun::star::ucb::OpenMode;
@@ -132,9 +134,9 @@ namespace ucb { namespace ucp { namespace ext
     //= Content
     //==================================================================================================================
     //------------------------------------------------------------------------------------------------------------------
-    Content::Content( const Reference< XMultiServiceFactory >& i_rORB, ::ucbhelper::ContentProviderImplHelper* i_pProvider,
+    Content::Content( const Reference< XComponentContext >& rxContext, ::ucbhelper::ContentProviderImplHelper* i_pProvider,
                       const Reference< XContentIdentifier >& i_rIdentifier )
-        :Content_Base( i_rORB, i_pProvider, i_rIdentifier )
+        :Content_Base( rxContext, i_pProvider, i_rIdentifier )
         ,m_eExtContentType( E_UNKNOWN )
         ,m_aIsFolder()
         ,m_aContentType()
@@ -271,15 +273,14 @@ namespace ucb { namespace ucp { namespace ext
 
             if ( bOpenFolder && impl_isFolder() )
             {
-                Reference< XDynamicResultSet > xSet = new ResultSet(
-                    comphelper::getComponentContext(m_xSMgr), this, aOpenCommand, i_rEvironment );
+                Reference< XDynamicResultSet > xSet = new ResultSet( m_xContext, this, aOpenCommand, i_rEvironment );
                 aRet <<= xSet;
               }
 
             if ( aOpenCommand.Sink.is() )
             {
                 const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() );
-                ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEvironment, comphelper::getComponentContext(m_xSMgr) );
+                ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEvironment, m_xContext );
                 aRet = aRequestedContent.executeCommand( ::rtl::OUString(  "open"  ), makeAny( aOpenCommand ) );
             }
         }
@@ -397,11 +398,11 @@ namespace ucb { namespace ucp { namespace ext
     }
 
     //------------------------------------------------------------------------------------------------------------------
-    Reference< XRow > Content::getArtificialNodePropertyValues( const Reference< XMultiServiceFactory >& i_rORB,
+    Reference< XRow > Content::getArtificialNodePropertyValues( const Reference< XComponentContext >& rxContext,
         const Sequence< Property >& i_rProperties, const ::rtl::OUString& i_rTitle )
     {
         // note: empty sequence means "get values of all supported properties".
-        ::rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( i_rORB );
+        ::rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( rxContext );
 
         const sal_Int32 nCount = i_rProperties.getLength();
         if ( nCount )
@@ -471,9 +472,7 @@ namespace ucb { namespace ucp { namespace ext
         ENSURE_OR_RETURN( m_eExtContentType != E_ROOT, "illegal call", ::rtl::OUString() );
 
         // create an ucb::XContent for the physical file within the deployed extension
-        const ::comphelper::ComponentContext aContext( m_xSMgr );
-        const Reference< XPackageInformationProvider > xPackageInfo(
-            aContext.getSingleton( "com.sun.star.deployment.PackageInformationProvider" ), UNO_QUERY_THROW );
+        const Reference< XPackageInformationProvider > xPackageInfo = PackageInformationProvider::get(m_xContext);
         const ::rtl::OUString sPackageLocation( xPackageInfo->getPackageLocation( m_sExtensionId ) );
 
         if ( m_sPathIntoExtension.isEmpty() )
@@ -489,13 +488,13 @@ namespace ucb { namespace ucp { namespace ext
         switch ( m_eExtContentType )
         {
         case E_ROOT:
-            return getArtificialNodePropertyValues( m_xSMgr, i_rProperties, ContentProvider::getRootURL() );
+            return getArtificialNodePropertyValues( m_xContext, i_rProperties, ContentProvider::getRootURL() );
         case E_EXTENSION_ROOT:
-            return getArtificialNodePropertyValues( m_xSMgr, i_rProperties, m_sExtensionId );
+            return getArtificialNodePropertyValues( m_xContext, i_rProperties, m_sExtensionId );
         case E_EXTENSION_CONTENT:
         {
             const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() );
-            ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEnv, comphelper::getComponentContext(m_xSMgr) );
+            ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEnv, m_xContext );
 
             // translate the property request
             Sequence< ::rtl::OUString > aPropertyNames( i_rProperties.getLength() );
@@ -506,7 +505,7 @@ namespace ucb { namespace ucp { namespace ext
                 SelectPropertyName()
             );
             const Sequence< Any > aPropertyValues = aRequestedContent.getPropertyValues( aPropertyNames );
-            const ::rtl::Reference< ::ucbhelper::PropertyValueSet > xValueRow = new ::ucbhelper::PropertyValueSet( m_xSMgr );
+            const ::rtl::Reference< ::ucbhelper::PropertyValueSet > xValueRow = new ::ucbhelper::PropertyValueSet( m_xContext );
             sal_Int32 i=0;
             for (   const Any* value = aPropertyValues.getConstArray();
                     value != aPropertyValues.getConstArray() + aPropertyValues.getLength();
diff --git a/ucb/source/ucp/ext/ucpext_content.hxx b/ucb/source/ucp/ext/ucpext_content.hxx
index a975cdc..ee29fd9 100644
--- a/ucb/source/ucp/ext/ucpext_content.hxx
+++ b/ucb/source/ucp/ext/ucpext_content.hxx
@@ -54,14 +54,14 @@ namespace ucb { namespace ucp { namespace ext
     {
     public:
         Content(
-            const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
             ::ucbhelper::ContentProviderImplHelper* pProvider,
             const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentIdentifier >& Identifier
         );
 
         static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
             getArtificialNodePropertyValues(
-                const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr,
+                const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
                 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& rProperties,
                 const ::rtl::OUString& rTitle
             );
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
index 7456a13..c276c94 100644
--- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
@@ -22,7 +22,7 @@
 #include "ucpext_content.hxx"
 #include "ucpext_provider.hxx"
 
-#include <com/sun/star/deployment/XPackageInformationProvider.hpp>
+#include <com/sun/star/deployment/PackageInformationProvider.hpp>
 
 #include <ucbhelper/contentidentifier.hxx>
 #include <comphelper/componentcontext.hxx>
@@ -53,12 +53,14 @@ namespace ucb { namespace ucp { namespace ext
     using ::com::sun::star::uno::makeAny;
     using ::com::sun::star::uno::Sequence;
     using ::com::sun::star::uno::Type;
+    using ::com::sun::star::uno::XComponentContext;
     using ::com::sun::star::ucb::XContent;
     using ::com::sun::star::ucb::XContentIdentifier;
     using ::com::sun::star::sdbc::XRow;
     using ::com::sun::star::lang::XMultiServiceFactory;
     using ::com::sun::star::ucb::IllegalIdentifierException;
     using ::com::sun::star::ucb::ResultSetException;
+    using ::com::sun::star::deployment::PackageInformationProvider;
     using ::com::sun::star::deployment::XPackageInformationProvider;
     using ::com::sun::star::beans::Property;
     using ::com::sun::star::sdbc::XResultSet;
@@ -86,13 +88,13 @@ namespace ucb { namespace ucp { namespace ext
         ::osl::Mutex                                m_aMutex;
         ResultList                                  m_aResults;
         ::rtl::Reference< Content >                 m_xContent;
-        Reference< XMultiServiceFactory >           m_xSMgr;
+        Reference< XComponentContext >              m_xContext;
         sal_Int32                                   m_nOpenMode;
 
-        DataSupplier_Impl( const Reference< XMultiServiceFactory >& i_rORB, const ::rtl::Reference< Content >& i_rContent,
+        DataSupplier_Impl( const Reference< XComponentContext >& rxContext, const ::rtl::Reference< Content >& i_rContent,
                            const sal_Int32 i_nOpenMode )
             :m_xContent( i_rContent )
-            ,m_xSMgr( i_rORB )
+            ,m_xContext( rxContext )
             ,m_nOpenMode( i_nOpenMode )
         {
         }
@@ -126,10 +128,10 @@ namespace ucb { namespace ucp { namespace ext
     //= DataSupplier
     //==================================================================================================================
     //------------------------------------------------------------------------------------------------------------------
-    DataSupplier::DataSupplier( const Reference< XMultiServiceFactory >& i_rORB,
+    DataSupplier::DataSupplier( const Reference< XComponentContext >& rxContext,
                                 const ::rtl::Reference< Content >& i_rContent,
                                 const sal_Int32 i_nOpenMode )
-        :m_pImpl( new DataSupplier_Impl( i_rORB, i_rContent, i_nOpenMode ) )
+        :m_pImpl( new DataSupplier_Impl( rxContext, i_rContent, i_nOpenMode ) )
     {
     }
 
@@ -138,9 +140,7 @@ namespace ucb { namespace ucp { namespace ext
     {
         try
         {
-            const ::comphelper::ComponentContext aContext( m_pImpl->m_xSMgr );
-            const Reference< XPackageInformationProvider > xPackageInfo(
-                aContext.getSingleton( "com.sun.star.deployment.PackageInformationProvider" ), UNO_QUERY_THROW );
+            const Reference< XPackageInformationProvider > xPackageInfo = PackageInformationProvider::get( m_pImpl->m_xContext );
 
             const ::rtl::OUString sContentIdentifier( m_pImpl->m_xContent->getIdentifier()->getContentIdentifier() );
 
@@ -171,7 +171,7 @@ namespace ucb { namespace ucp { namespace ext
             case E_EXTENSION_CONTENT:
             {
                 const ::rtl::OUString sPackageLocation( m_pImpl->m_xContent->getPhysicalURL() );
-                ::ucbhelper::Content aWrappedContent( sPackageLocation, getResultSet()->getEnvironment(), comphelper::getComponentContext(m_pImpl->m_xSMgr) );
+                ::ucbhelper::Content aWrappedContent( sPackageLocation, getResultSet()->getEnvironment(), m_pImpl->m_xContext );
 
                 // obtain the properties which our result set is set up for from the wrapped content
                 Sequence< ::rtl::OUString > aPropertyNames(1);
@@ -326,7 +326,7 @@ namespace ucb { namespace ucp { namespace ext
             ::rtl::OUString sTitle = Content::decodeIdentifier( rId.copy( sRootURL.getLength() ) );
             if ( !sTitle.isEmpty() && ( sTitle[ sTitle.getLength() - 1 ] == '/' ) )
                 sTitle = sTitle.copy( 0, sTitle.getLength() - 1 );
-            xRow = Content::getArtificialNodePropertyValues( m_pImpl->m_xSMgr, getResultSet()->getProperties(), sTitle );
+            xRow = Content::getArtificialNodePropertyValues( m_pImpl->m_xContext, getResultSet()->getProperties(), sTitle );
         }
         break;
 
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.hxx b/ucb/source/ucp/ext/ucpext_datasupplier.hxx
index 7070179..291b3a1 100644
--- a/ucb/source/ucp/ext/ucpext_datasupplier.hxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.hxx
@@ -41,7 +41,7 @@ namespace ucb { namespace ucp { namespace ext
     {
     public:
         DataSupplier(
-            const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& i_rORB,
+            const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
             const rtl::Reference< Content >& rContent,
             const sal_Int32 nOpenMode
         );
diff --git a/ucb/source/ucp/ext/ucpext_provider.cxx b/ucb/source/ucp/ext/ucpext_provider.cxx
index 0e9de11..9ea4b75 100644
--- a/ucb/source/ucp/ext/ucpext_provider.cxx
+++ b/ucb/source/ucp/ext/ucpext_provider.cxx
@@ -182,7 +182,7 @@ namespace ucb { namespace ucp { namespace ext
             return xContent;
 
         // create a new content
-        xContent = new Content( Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), UNO_QUERY_THROW), this, xNormalizedIdentifier );
+        xContent = new Content( m_xContext, this, xNormalizedIdentifier );
         if ( !xContent->getIdentifier().is() )
             throw IllegalIdentifierException();
 
diff --git a/ucb/source/ucp/ext/ucpext_resultset.cxx b/ucb/source/ucp/ext/ucpext_resultset.cxx
index 09759d7..9b6a3b6 100644
--- a/ucb/source/ucp/ext/ucpext_resultset.cxx
+++ b/ucb/source/ucp/ext/ucpext_resultset.cxx
@@ -64,7 +64,7 @@ namespace ucb { namespace ucp { namespace ext
     void ResultSet::initStatic()
     {
         ::rtl::Reference< DataSupplier > pDataSupplier( new DataSupplier(
-            Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), UNO_QUERY_THROW),
+            m_xContext,
             m_xContent,
             m_aCommand.Mode
         ) );
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index a881b6e..7a791ed 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -91,11 +91,11 @@ using namespace com::sun::star::sdbc;
 //=========================================================================
 //=========================================================================
 
-FTPContent::FTPContent( const Reference< XMultiServiceFactory >& rxSMgr,
+FTPContent::FTPContent( const Reference< XComponentContext >& rxContext,
                         FTPContentProvider* pProvider,
                         const Reference< XContentIdentifier >& Identifier,
                         const FTPURL& aFTPURL)
-    : ContentImplHelper(rxSMgr,pProvider,Identifier),
+    : ContentImplHelper(rxContext,pProvider,Identifier),
       m_pFCP(pProvider),
       m_aFTPURL(aFTPURL),
       m_bInserted(false),
@@ -105,11 +105,11 @@ FTPContent::FTPContent( const Reference< XMultiServiceFactory >& rxSMgr,
 
 
 
-FTPContent::FTPContent( const Reference< XMultiServiceFactory >& rxSMgr,
+FTPContent::FTPContent( const Reference< XComponentContext >& rxContext,
                         FTPContentProvider* pProvider,
                         const Reference< XContentIdentifier >& Identifier,
                         const ContentInfo& Info)
-    : ContentImplHelper(rxSMgr,pProvider,Identifier),
+    : ContentImplHelper(rxContext,pProvider,Identifier),
       m_pFCP(pProvider),
       m_aFTPURL(Identifier->getContentIdentifier(),
                 pProvider),
@@ -213,13 +213,13 @@ class ResultSetFactoryI
 {
 public:
 
-    ResultSetFactoryI(const Reference<XMultiServiceFactory >&  xSMgr,
+    ResultSetFactoryI(const Reference<XComponentContext >&  rxContext,
                       const Reference<XContentProvider >&  xProvider,
                       sal_Int32 nOpenMode,
                       const Sequence<Property>& seq,
                       const Sequence<NumberedSortingInfo>& seqSort,
                       const std::vector<FTPDirentry>& dirvec)
-        : m_xSMgr(xSMgr),
+        : m_xContext(rxContext),
           m_xProvider(xProvider),
           m_nOpenMode(nOpenMode),
           m_seq(seq),
@@ -230,7 +230,7 @@ public:
 
     virtual ResultSetBase* createResultSet()
     {
-        return new ResultSetI(m_xSMgr,
+        return new ResultSetI(m_xContext,
                               m_xProvider,
                               m_nOpenMode,
                               m_seq,
@@ -240,7 +240,7 @@ public:
 
 public:
 
-    Reference< XMultiServiceFactory >               m_xSMgr;
+    Reference< XComponentContext >                  m_xContext;
     Reference< XContentProvider >                   m_xProvider;
     sal_Int32                                       m_nOpenMode;
     Sequence< Property >                            m_seq;
@@ -542,11 +542,11 @@ Any SAL_CALL FTPContent::execute(
                         m_aFTPURL.list(sal_Int16(aOpenCommand.Mode));
                     Reference< XDynamicResultSet > xSet
                         = new DynamicResultSet(
-                            comphelper::getComponentContext(m_xSMgr),
+                            m_xContext,
                             this,
                             aOpenCommand,
                             Environment,
-                            new ResultSetFactoryI(m_xSMgr,
+                            new ResultSetFactoryI(m_xContext,
                                                   m_xProvider.get(),
                                                   aOpenCommand.Mode,
                                                   aOpenCommand.Properties,
@@ -659,7 +659,7 @@ FTPContent::createNewContent( const ContentInfo& Info )
     throw (RuntimeException)
 {
     if( Info.Type =="application/vnd.sun.staroffice.ftp-file" || Info.Type == "application/vnd.sun.staroffice.ftp-folder" )
-        return new FTPContent(m_xSMgr,
+        return new FTPContent(m_xContext,
                               m_pFCP,
                               m_xIdentifier,Info);
     else
@@ -813,7 +813,7 @@ Reference< XRow > FTPContent::getPropertyValues(
 )
 {
     rtl::Reference<ucbhelper::PropertyValueSet> xRow =
-        new ucbhelper::PropertyValueSet(m_xSMgr);
+        new ucbhelper::PropertyValueSet(m_xContext);
 
     FTPDirentry aDirEntry = m_aFTPURL.direntry();
 
diff --git a/ucb/source/ucp/ftp/ftpcontent.hxx b/ucb/source/ucp/ftp/ftpcontent.hxx
index 2597393..c4618ba 100644
--- a/ucb/source/ucp/ftp/ftpcontent.hxx
+++ b/ucb/source/ucp/ftp/ftpcontent.hxx
@@ -52,14 +52,14 @@ namespace ftp
     public:
 
         FTPContent( const ::com::sun::star::uno::Reference<
-                    ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                    ::com::sun::star::uno::XComponentContext >& rxContext,
                     FTPContentProvider* pProvider,
                     const ::com::sun::star::uno::Reference<
                     ::com::sun::star::ucb::XContentIdentifier >& Identifier,
                     const FTPURL& FtpUrl);
 
         FTPContent( const ::com::sun::star::uno::Reference<
-                    ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                    ::com::sun::star::uno::XComponentContext >& rxContext,
                     FTPContentProvider* pProvider,
                     const ::com::sun::star::uno::Reference<
                     ::com::sun::star::ucb::XContentIdentifier >& Identifier,
diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx
index 0f961ec..0f28bcb 100644
--- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx
+++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx
@@ -154,7 +154,7 @@ FTPContentProvider::queryContent(
             aURL.host(),
             aURL.port().toInt32()))
         {
-            xContent = new FTPContent( Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), UNO_QUERY_THROW), this,xCanonicId,aURL);
+            xContent = new FTPContent( m_xContext, this,xCanonicId,aURL);
             registerNewContent(xContent);
         }
         else {
diff --git a/ucb/source/ucp/ftp/ftpresultsetI.cxx b/ucb/source/ucp/ftp/ftpresultsetI.cxx
index 524a614..e812fc1 100644
--- a/ucb/source/ucp/ftp/ftpresultsetI.cxx
+++ b/ucb/source/ucp/ftp/ftpresultsetI.cxx
@@ -38,13 +38,13 @@ using namespace com::sun::star::beans;
 using namespace com::sun::star::sdbc;
 
 
-ResultSetI::ResultSetI(const Reference<XMultiServiceFactory>&  xMSF,
+ResultSetI::ResultSetI(const Reference<XComponentContext>&  rxContext,
                        const Reference<XContentProvider>&  xProvider,
                        sal_Int32 nOpenMode,
                        const Sequence<Property>& seqProp,
                        const Sequence< NumberedSortingInfo >& seqSort,
                        const std::vector<FTPDirentry>&  dirvec)
-    : ResultSetBase(comphelper::getComponentContext(xMSF),xProvider,nOpenMode,seqProp,seqSort)
+    : ResultSetBase(rxContext,xProvider,nOpenMode,seqProp,seqSort)
 {
     for( unsigned int i = 0; i < dirvec.size(); ++i)
         m_aPath.push_back(dirvec[i].m_aURL);
@@ -56,7 +56,7 @@ ResultSetI::ResultSetI(const Reference<XMultiServiceFactory>&  xMSF,
 
     for(unsigned n = 0; n < m_aItems.size(); ++n) {
         rtl::Reference<ucbhelper::PropertyValueSet> xRow =
-            new ucbhelper::PropertyValueSet(xMSF);
+            new ucbhelper::PropertyValueSet(rxContext);
 
         for( int i = 0; i < seqProp.getLength(); ++i) {
             const rtl::OUString& Name = seqProp[i].Name;
diff --git a/ucb/source/ucp/ftp/ftpresultsetI.hxx b/ucb/source/ucp/ftp/ftpresultsetI.hxx
index afba707..584738c 100644
--- a/ucb/source/ucp/ftp/ftpresultsetI.hxx
+++ b/ucb/source/ucp/ftp/ftpresultsetI.hxx
@@ -36,7 +36,7 @@ namespace ftp {
 
         ResultSetI(
             const com::sun::star::uno::Reference<
-            com::sun::star::lang::XMultiServiceFactory>& xMSF,
+            com::sun::star::uno::XComponentContext>& rxContext,
             const com::sun::star::uno::Reference<
             com::sun::star::ucb::XContentProvider>& xProvider,
             sal_Int32 nOpenMode,
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index d2c1a4a..b675f25 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -83,11 +83,11 @@ namespace gio
 {
 
 Content::Content(
-    const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+    const uno::Reference< uno::XComponentContext >& rxContext,
     ContentProvider* pProvider,
     const uno::Reference< ucb::XContentIdentifier >& Identifier)
         throw ( ucb::ContentCreationException )
-    : ContentImplHelper( rxSMgr, pProvider, Identifier ),
+    : ContentImplHelper( rxContext, pProvider, Identifier ),
       m_pProvider( pProvider ), mpFile (NULL), mpInfo( NULL ), mbTransient(false)
 {
 #if OSL_DEBUG_LEVEL > 1
@@ -96,12 +96,12 @@ Content::Content(
 }
 
 Content::Content(
-    const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+    const uno::Reference< uno::XComponentContext >& rxContext,
     ContentProvider* pProvider,
     const uno::Reference< ucb::XContentIdentifier >& Identifier,
     sal_Bool bIsFolder)
         throw ( ucb::ContentCreationException )
-    : ContentImplHelper( rxSMgr, pProvider, Identifier ),
+    : ContentImplHelper( rxContext, pProvider, Identifier ),
       m_pProvider( pProvider ), mpFile (NULL), mpInfo( NULL ), mbTransient(true)
 {
 #if OSL_DEBUG_LEVEL > 1
@@ -390,11 +390,11 @@ static util::DateTime getDateFromUnix (time_t t)
 }
 
 uno::Reference< sdbc::XRow > Content::getPropertyValuesFromGFileInfo(GFileInfo *pInfo,
-    const uno::Reference< lang::XMultiServiceFactory >& rSMgr,
+    const uno::Reference< uno::XComponentContext >& rxContext,
     const uno::Reference< ucb::XCommandEnvironment > & xEnv,
     const uno::Sequence< beans::Property >& rProperties)
 {
-    rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( rSMgr );
+    rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( rxContext );
 
     sal_Int32 nProps;
     const beans::Property* pProps;
@@ -514,7 +514,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
     if (!pInfo)
         ucbhelper::cancelCommandExecution(mapGIOError(pError), xEnv);
 
-    return getPropertyValuesFromGFileInfo(pInfo, m_xSMgr, xEnv, rProperties);
+    return getPropertyValuesFromGFileInfo(pInfo, m_xContext, xEnv, rProperties);
 }
 
 static lang::IllegalAccessException
@@ -855,7 +855,7 @@ uno::Any Content::open(const ucb::OpenCommandArgument2 & rOpenCommand,
     if ( bOpenFolder && bIsFolder )
     {
         uno::Reference< ucb::XDynamicResultSet > xSet
-            = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr), this, rOpenCommand, xEnv );
+            = new DynamicResultSet( m_xContext, this, rOpenCommand, xEnv );
         aRet <<= xSet;
     }
     else if ( rOpenCommand.Sink.is() )
@@ -1163,7 +1163,7 @@ uno::Reference< ucb::XContent >
 
     try
     {
-        return new ::gio::Content( m_xSMgr, m_pProvider, xId, !create_document );
+        return new ::gio::Content( m_xContext, m_pProvider, xId, !create_document );
     } catch ( ucb::ContentCreationException & )
     {
             return uno::Reference< ucb::XContent >();
diff --git a/ucb/source/ucp/gio/gio_content.hxx b/ucb/source/ucp/gio/gio_content.hxx
index f7f0f22..b1cfe0a 100644
--- a/ucb/source/ucp/gio/gio_content.hxx
+++ b/ucb/source/ucp/gio/gio_content.hxx
@@ -119,12 +119,12 @@ private:
 
 public:
     Content( const com::sun::star::uno::Reference<
-        com::sun::star::lang::XMultiServiceFactory >& rxSMgr, ContentProvider *pProvider,
+        com::sun::star::uno::XComponentContext >& rxContext, ContentProvider *pProvider,
         const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& Identifier)
             throw ( com::sun::star::ucb::ContentCreationException );
 
     Content( const com::sun::star::uno::Reference<
-        com::sun::star::lang::XMultiServiceFactory >& rxSMgr, ContentProvider *pProvider,
+        com::sun::star::uno::XComponentContext >& rxContext, ContentProvider *pProvider,
         const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& Identifier,
         sal_Bool bIsFolder)
             throw ( com::sun::star::ucb::ContentCreationException );
@@ -132,7 +132,7 @@ public:
     virtual ~Content();
 
     com::sun::star::uno::Reference< com::sun::star::sdbc::XRow > getPropertyValuesFromGFileInfo(
-        GFileInfo *pInfo, const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rSMgr,
+        GFileInfo *pInfo, const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
         const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > & xEnv,
         const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& rProperties);
 
diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx
index bbd7531..93ec2d4 100644
--- a/ucb/source/ucp/gio/gio_provider.cxx
+++ b/ucb/source/ucp/gio/gio_provider.cxx
@@ -51,8 +51,7 @@ ContentProvider::queryContent(
 
     try
     {
-        uno::Reference<lang::XMultiServiceFactory> xMSF(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW);
-        xContent = new ::gio::Content(xMSF, this, Identifier);
+        xContent = new ::gio::Content(m_xContext, this, Identifier);
     }
     catch ( com::sun::star::ucb::ContentCreationException const & )
     {
diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx
index c3ed8fd..7d29e0f 100644
--- a/ucb/source/ucp/gvfs/gvfs_content.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_content.cxx
@@ -109,11 +109,11 @@ GnomeToOUString( const char *utf8_str)
 
 
 Content::Content(
-          const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+          const uno::Reference< uno::XComponentContext >& rxContext,
           ContentProvider* pProvider,
           const uno::Reference< ucb::XContentIdentifier >& Identifier)
   throw ( ucb::ContentCreationException )
-    : ContentImplHelper( rxSMgr, pProvider, Identifier ),
+    : ContentImplHelper( rxContext, pProvider, Identifier ),
       m_pProvider( pProvider ),
       m_bTransient( sal_False )
 {
@@ -124,12 +124,12 @@ Content::Content(
 }
 
 Content::Content(
-    const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+    const uno::Reference< uno::XComponentContext >& rxContext,
     ContentProvider                                   * pProvider,
     const uno::Reference< ucb::XContentIdentifier >&    Identifier,
     sal_Bool                                            IsFolder)
         throw ( ucb::ContentCreationException )
-    : ContentImplHelper( rxSMgr, pProvider, Identifier ),
+    : ContentImplHelper( rxContext, pProvider, Identifier ),
       m_pProvider( pProvider ),
       m_bTransient( sal_True )
 {
@@ -343,7 +343,7 @@ uno::Any SAL_CALL Content::execute(
 
         if ( bOpenFolder && isFolder( xEnv ) ) {
             uno::Reference< ucb::XDynamicResultSet > xSet
-                = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr), this, aOpenCommand, xEnv );
+                = new DynamicResultSet( m_xContext, this, aOpenCommand, xEnv );
             aRet <<= xSet;
 
         } else if ( aOpenCommand.Sink.is() ) {
@@ -517,7 +517,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
         ( new ::ucbhelper::ContentIdentifier( aURL ) );
 
     try {
-        return new ::gvfs::Content( m_xSMgr, m_pProvider, xId, !create_document );
+        return new ::gvfs::Content( m_xContext, m_pProvider, xId, !create_document );
     } catch ( ucb::ContentCreationException & ) {
         return uno::Reference< ucb::XContent >();
     }
@@ -595,7 +595,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
     }
 
     rtl::Reference< ::ucbhelper::PropertyValueSet > xRow
-        = new ::ucbhelper::PropertyValueSet( m_xSMgr );
+        = new ::ucbhelper::PropertyValueSet( m_xContext );
 
         osl::Guard< osl::Mutex > aGuard( m_aMutex );
     for( sal_Int32 n = 0; n < nProps; ++n ) {
@@ -1438,7 +1438,7 @@ Content::createTempStream(
     // Something badly wrong happened - can't seek => stream to a temporary file
     uno::Reference < io::XOutputStream > xTempOut =
         uno::Reference < io::XOutputStream >
-            ( io::TempFile::create(comphelper::getComponentContext(m_xSMgr)), uno::UNO_QUERY );
+            ( io::TempFile::create( m_xContext ), uno::UNO_QUERY );
 
     if ( !xTempOut.is() )
         cancelCommandExecution( GNOME_VFS_ERROR_IO, xEnv );
diff --git a/ucb/source/ucp/gvfs/gvfs_content.hxx b/ucb/source/ucp/gvfs/gvfs_content.hxx
index 49fbf58..0357987 100644
--- a/ucb/source/ucp/gvfs/gvfs_content.hxx
+++ b/ucb/source/ucp/gvfs/gvfs_content.hxx
@@ -185,13 +185,13 @@ public:
 public:
 
     Content( const ::com::sun::star::uno::Reference<
-         ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+         ::com::sun::star::uno::XComponentContext >& rxContext,
          ContentProvider                                *pProvider,
          const ::com::sun::star::uno::Reference<
          ::com::sun::star::ucb::XContentIdentifier >&    Identifier)
             throw ( ::com::sun::star::ucb::ContentCreationException );
     Content( const ::com::sun::star::uno::Reference<
-         ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+         ::com::sun::star::uno::XComponentContext >& rxContext,
          ContentProvider                                *pProvider,
          const ::com::sun::star::uno::Reference<
          ::com::sun::star::ucb::XContentIdentifier >&    Identifier,
diff --git a/ucb/source/ucp/gvfs/gvfs_provider.cxx b/ucb/source/ucp/gvfs/gvfs_provider.cxx
index 8a372eb..442468f 100644
--- a/ucb/source/ucp/gvfs/gvfs_provider.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_provider.cxx
@@ -115,7 +115,7 @@ ContentProvider::queryContent(
 
     try
     {
-        xContent = new ::gvfs::Content(uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW), this, Identifier );
+        xContent = new ::gvfs::Content( m_xContext, this, Identifier );
         registerNewContent( xContent );
     }
     catch ( com::sun::star::ucb::ContentCreationException const & )
diff --git a/ucb/source/ucp/hierarchy/dynamicresultset.cxx b/ucb/source/ucp/hierarchy/dynamicresultset.cxx
index a36d5df..4448866 100644
--- a/ucb/source/ucp/hierarchy/dynamicresultset.cxx
+++ b/ucb/source/ucp/hierarchy/dynamicresultset.cxx
@@ -62,7 +62,7 @@ void DynamicResultSet::initStatic()
         = new ::ucbhelper::ResultSet(
             m_xContext,
             m_aCommand.Properties,
-            new  HierarchyResultSetDataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
+            new  HierarchyResultSetDataSupplier( m_xContext,
                                                  m_xContent,
                                                  m_aCommand.Mode ) );
 }
@@ -74,7 +74,7 @@ void DynamicResultSet::initDynamic()
         = new ::ucbhelper::ResultSet(
             m_xContext,
             m_aCommand.Properties,
-            new  HierarchyResultSetDataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
+            new  HierarchyResultSetDataSupplier( m_xContext,
                                                  m_xContent,
                                                  m_aCommand.Mode ) );
     m_xResultSet2 = m_xResultSet1;
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index 81dd0dc..3676019 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -83,22 +83,22 @@ using namespace hierarchy_ucp;
 
 // static ( "virtual" ctor )
 HierarchyContent* HierarchyContent::create(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier )
 {
     // Fail, if content does not exist.
     HierarchyContentProperties aProps;
-    if ( !loadData( rxSMgr, pProvider, Identifier, aProps ) )
+    if ( !loadData( rxContext, pProvider, Identifier, aProps ) )
         return 0;
 
-    return new HierarchyContent( rxSMgr, pProvider, Identifier, aProps );
+    return new HierarchyContent( rxContext, pProvider, Identifier, aProps );
 }
 
 //=========================================================================
 // static ( "virtual" ctor )
 HierarchyContent* HierarchyContent::create(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier,
             const ucb::ContentInfo& Info )
@@ -109,16 +109,16 @@ HierarchyContent* HierarchyContent::create(
     if ( Info.Type != HIERARCHY_FOLDER_CONTENT_TYPE && Info.Type != HIERARCHY_LINK_CONTENT_TYPE )
         return 0;
 
-    return new HierarchyContent( rxSMgr, pProvider, Identifier, Info );
+    return new HierarchyContent( rxContext, pProvider, Identifier, Info );
 }
 
 //=========================================================================
 HierarchyContent::HierarchyContent(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier,
             const HierarchyContentProperties& rProps )
-: ContentImplHelper( rxSMgr, pProvider, Identifier ),
+: ContentImplHelper( rxContext, pProvider, Identifier ),
   m_aProps( rProps ),
   m_eState( PERSISTENT ),
   m_pProvider( pProvider ),
@@ -130,11 +130,11 @@ HierarchyContent::HierarchyContent(
 
 //=========================================================================
 HierarchyContent::HierarchyContent(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier,
             const ucb::ContentInfo& Info )
-  : ContentImplHelper( rxSMgr, pProvider, Identifier ),
+  : ContentImplHelper( rxContext, pProvider, Identifier ),
   m_aProps( Info.Type == HIERARCHY_FOLDER_CONTENT_TYPE ? HierarchyEntryData::FOLDER : HierarchyEntryData::LINK ),
   m_eState( TRANSIENT ),
   m_pProvider( pProvider ),
@@ -441,7 +441,7 @@ uno::Any SAL_CALL HierarchyContent::execute(
         }
 
         uno::Reference< ucb::XDynamicResultSet > xSet
-                = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr), this, aOpenCommand );
+                = new DynamicResultSet( m_xContext, this, aOpenCommand );
         aRet <<= xSet;
     }
     else if ( aCommand.Name == "insert" && ( m_eKind != ROOT ) && !isReadOnly() )
@@ -619,7 +619,7 @@ HierarchyContent::createNewContent( const ucb::ContentInfo& Info )
         uno::Reference< ucb::XContentIdentifier > xId
             = new ::ucbhelper::ContentIdentifier( aURL );
 
-        return create( m_xSMgr, m_pProvider, xId, Info );
+        return create( m_xContext, m_pProvider, xId, Info );
     }
     else
     {
@@ -639,7 +639,7 @@ rtl::OUString HierarchyContent::getParentURL()
 //=========================================================================
 //static
 sal_Bool HierarchyContent::hasData(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier )
 {
@@ -654,13 +654,13 @@ sal_Bool HierarchyContent::hasData(
         return sal_True;
     }
 
-    return HierarchyEntry( rxSMgr, pProvider, aURL ).hasData();
+    return HierarchyEntry( rxContext, pProvider, aURL ).hasData();
 }
 
 //=========================================================================
 //static
 sal_Bool HierarchyContent::loadData(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier,
             HierarchyContentProperties& rProps )
@@ -675,7 +675,7 @@ sal_Bool HierarchyContent::loadData(
     }
     else
     {
-        HierarchyEntry aEntry( rxSMgr, pProvider, aURL );
+        HierarchyEntry aEntry( rxContext, pProvider, aURL );
         HierarchyEntryData aData;
         if ( !aEntry.getData( aData ) )
             return sal_False;
@@ -689,7 +689,7 @@ sal_Bool HierarchyContent::loadData(
 sal_Bool HierarchyContent::storeData()
 {
     HierarchyEntry aEntry(
-            m_xSMgr, m_pProvider, m_xIdentifier->getContentIdentifier() );
+            m_xContext, m_pProvider, m_xIdentifier->getContentIdentifier() );
     return aEntry.setData( m_aProps.getHierarchyEntryData(), sal_True );
 }
 
@@ -699,7 +699,7 @@ sal_Bool HierarchyContent::renameData(
             const uno::Reference< ucb::XContentIdentifier >& xNewId )
 {
     HierarchyEntry aEntry(
-            m_xSMgr, m_pProvider, xOldId->getContentIdentifier() );
+            m_xContext, m_pProvider, xOldId->getContentIdentifier() );
     return aEntry.move( xNewId->getContentIdentifier(),
                         m_aProps.getHierarchyEntryData() );
 }
@@ -708,7 +708,7 @@ sal_Bool HierarchyContent::renameData(
 sal_Bool HierarchyContent::removeData()
 {
     HierarchyEntry aEntry(
-        m_xSMgr, m_pProvider, m_xIdentifier->getContentIdentifier() );
+        m_xContext, m_pProvider, m_xIdentifier->getContentIdentifier() );
     return aEntry.remove();
 }
 
@@ -913,7 +913,7 @@ sal_Bool HierarchyContent::exchangeIdentity(
 //=========================================================================
 // static
 uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues(
-                const uno::Reference< lang::XMultiServiceFactory >& rSMgr,
+                const uno::Reference< uno::XComponentContext >& rxContext,
                 const uno::Sequence< beans::Property >& rProperties,
                 const HierarchyContentProperties& rData,
                 HierarchyContentProvider* pProvider,
@@ -922,7 +922,7 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues(
     // Note: Empty sequence means "get values of all supported properties".
 
     rtl::Reference< ::ucbhelper::PropertyValueSet > xRow
-        = new ::ucbhelper::PropertyValueSet( rSMgr );
+        = new ::ucbhelper::PropertyValueSet( rxContext );
 
     sal_Int32 nCount = rProperties.getLength();
     if ( nCount )
@@ -1066,7 +1066,7 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues(
                         const uno::Sequence< beans::Property >& rProperties )
 {
     osl::Guard< osl::Mutex > aGuard( m_aMutex );
-    return getPropertyValues( m_xSMgr,
+    return getPropertyValues( m_xContext,
                               rProperties,
                               m_aProps,
                               m_pProvider,
@@ -1795,7 +1795,7 @@ void HierarchyContent::transfer(
     if ( xSource->isFolder() )
     {
         HierarchyEntry aFolder(
-            m_xSMgr, m_pProvider, xId->getContentIdentifier() );
+            m_xContext, m_pProvider, xId->getContentIdentifier() );
         HierarchyEntry::iterator it;
 
         while ( aFolder.next( it ) )
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.hxx b/ucb/source/ucp/hierarchy/hierarchycontent.hxx
index 052c62b..eb333ee 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.hxx
@@ -124,14 +124,14 @@ class HierarchyContent : public ::ucbhelper::ContentImplHelper,
 private:
     HierarchyContent(
             const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier,
             const HierarchyContentProperties& rProps );
     HierarchyContent(
             const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier,
@@ -147,17 +147,17 @@ private:
 
     static sal_Bool hasData(
             const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier );
     sal_Bool hasData(
             const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier )
-    { return hasData( m_xSMgr, m_pProvider, Identifier ); }
+    { return hasData( m_xContext, m_pProvider, Identifier ); }
     static sal_Bool loadData(
             const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier,
@@ -218,7 +218,7 @@ public:
     // Create existing content. Fail, if not already exists.
     static HierarchyContent* create(
             const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier );
@@ -226,7 +226,7 @@ public:
     // Create new content. Fail, if already exists.
     static HierarchyContent* create(
             const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier,
@@ -290,7 +290,7 @@ public:
 
     static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
     getPropertyValues( const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::lang::XMultiServiceFactory >& rSMgr,
+                        ::com::sun::star::uno::XComponentContext >& rxContext,
                        const ::com::sun::star::uno::Sequence<
                             ::com::sun::star::beans::Property >& rProperties,
                        const HierarchyContentProperties& rData,
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx
index 7fbae5c..bac0292 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx
@@ -109,10 +109,10 @@ void makeXMLName( const rtl::OUString & rIn, rtl::OUStringBuffer & rBuffer  )
 
 //=========================================================================
 HierarchyEntry::HierarchyEntry(
-                const uno::Reference< lang::XMultiServiceFactory >& rSMgr,
+                const uno::Reference< uno::XComponentContext >& rxContext,
                 HierarchyContentProvider* pProvider,
                 const rtl::OUString& rURL )
-: m_xSMgr( rSMgr ),
+: m_xContext( rxContext ),
   m_xOfficeInstDirs( pProvider->getOfficeInstallationDirectories() ),
   m_bTriedToGetRootReadAccess( sal_False )
 {
@@ -128,7 +128,7 @@ HierarchyEntry::HierarchyEntry(
     }
 
     // Note: do not init m_aPath in init list. createPathFromHierarchyURL
-    //       needs m_xSMgr and m_aMutex.
+    //       needs m_xContext and m_aMutex.
     m_aPath = createPathFromHierarchyURL( aUri );
 
     // Extract language independent name from URL.
@@ -269,7 +269,7 @@ sal_Bool HierarchyEntry::setData(
 
         if ( !m_xConfigProvider.is() )
             m_xConfigProvider = uno::Reference< lang::XMultiServiceFactory >(
-                m_xSMgr->createInstance( m_aServiceSpecifier ),
+                m_xContext->getServiceManager()->createInstanceWithContext(m_aServiceSpecifier, m_xContext),
                 uno::UNO_QUERY );
 
         if ( m_xConfigProvider.is() )
@@ -524,7 +524,7 @@ sal_Bool HierarchyEntry::move(
     {
         if ( !m_xConfigProvider.is() )
             m_xConfigProvider = uno::Reference< lang::XMultiServiceFactory >(
-                m_xSMgr->createInstance( m_aServiceSpecifier ),
+                m_xContext->getServiceManager()->createInstanceWithContext(m_aServiceSpecifier, m_xContext),
                 uno::UNO_QUERY );
 
         if ( !m_xConfigProvider.is() )
@@ -794,7 +794,7 @@ sal_Bool HierarchyEntry::remove()
 
         if ( !m_xConfigProvider.is() )
             m_xConfigProvider = uno::Reference< lang::XMultiServiceFactory >(
-                m_xSMgr->createInstance( m_aServiceSpecifier ),
+                m_xContext->getServiceManager()->createInstanceWithContext(m_aServiceSpecifier, m_xContext),
                 uno::UNO_QUERY );
 
         if ( m_xConfigProvider.is() )
@@ -1050,7 +1050,7 @@ HierarchyEntry::getRootReadAccess()
                 if ( !m_xConfigProvider.is() )
                     m_xConfigProvider
                         = uno::Reference< lang::XMultiServiceFactory >(
-                            m_xSMgr->createInstance( m_aServiceSpecifier ),
+                            m_xContext->getServiceManager()->createInstanceWithContext(m_aServiceSpecifier, m_xContext),
                             uno::UNO_QUERY );
 
                 if ( m_xConfigProvider.is() )
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.hxx b/ucb/source/ucp/hierarchy/hierarchydata.hxx
index fd87bc9..9c93957 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.hxx
@@ -23,6 +23,7 @@
 #include <rtl/ustring.hxx>
 #include <osl/mutex.hxx>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
 
 namespace com { namespace sun { namespace star {
     namespace container {
@@ -81,7 +82,7 @@ class HierarchyEntry
     ::rtl::OUString m_aPath;
     ::osl::Mutex    m_aMutex;
     ::com::sun::star::uno::Reference<
-            ::com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+            ::com::sun::star::uno::XComponentContext >     m_xContext;
     ::com::sun::star::uno::Reference<
             ::com::sun::star::lang::XMultiServiceFactory > m_xConfigProvider;
     ::com::sun::star::uno::Reference<
@@ -100,7 +101,7 @@ private:
 
 public:
     HierarchyEntry( const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::lang::XMultiServiceFactory >& rSMgr,
+                        ::com::sun::star::uno::XComponentContext >& rxContext,
                     HierarchyContentProvider* pProvider,
                     const ::rtl::OUString& rURL );
 
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx
index bf85e37..f0dd169 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx
@@ -72,18 +72,18 @@ struct DataSupplier_Impl
     osl::Mutex                                      m_aMutex;
     ResultList                                      m_aResults;
     rtl::Reference< HierarchyContent >              m_xContent;
-    uno::Reference< lang::XMultiServiceFactory >    m_xSMgr;
+    uno::Reference< uno::XComponentContext >        m_xContext;
     HierarchyEntry                                  m_aFolder;
     HierarchyEntry::iterator                        m_aIterator;
     sal_Int32                                       m_nOpenMode;
     sal_Bool                                        m_bCountFinal;
 
     DataSupplier_Impl(
-        const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+        const uno::Reference< uno::XComponentContext >& rxContext,
         const rtl::Reference< HierarchyContent >& rContent,
         sal_Int32 nOpenMode )
-    : m_xContent( rContent ), m_xSMgr( rxSMgr ),
-      m_aFolder( rxSMgr,
+    : m_xContent( rContent ), m_xContext( rxContext ),
+      m_aFolder( rxContext,
                  static_cast< HierarchyContentProvider * >(
                      rContent->getProvider().get() ),
                  rContent->getIdentifier()->getContentIdentifier() ),
@@ -115,10 +115,10 @@ DataSupplier_Impl::~DataSupplier_Impl()
 //=========================================================================
 
 HierarchyResultSetDataSupplier::HierarchyResultSetDataSupplier(
-                const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+                const uno::Reference< uno::XComponentContext >& rxContext,
                 const rtl::Reference< HierarchyContent >& rContent,
                 sal_Int32 nOpenMode )
-: m_pImpl( new DataSupplier_Impl( rxSMgr, rContent, nOpenMode ) )
+: m_pImpl( new DataSupplier_Impl( rxContext, rContent, nOpenMode ) )
 {
 }
 
@@ -363,7 +363,7 @@ HierarchyResultSetDataSupplier::queryPropertyValues( sal_uInt32 nIndex  )
 
         uno::Reference< sdbc::XRow > xRow
             = HierarchyContent::getPropertyValues(
-                m_pImpl->m_xSMgr,
+                m_pImpl->m_xContext,
                 getResultSet()->getProperties(),
                 aData,
                 static_cast< HierarchyContentProvider * >(
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx b/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx
index d9900cd..28c1a50 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx
@@ -41,7 +41,7 @@ private:
 public:
     HierarchyResultSetDataSupplier(
                     const com::sun::star::uno::Reference<
-                        com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                        com::sun::star::uno::XComponentContext >& rxContext,
                     const rtl::Reference< HierarchyContent >& rContent,
                     sal_Int32 nOpenMode = com::sun::star::ucb::OpenMode::ALL );
     virtual ~HierarchyResultSetDataSupplier();
diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
index e528dad..0fc6ec6 100644
--- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
@@ -130,7 +130,7 @@ HierarchyContentProvider::queryContent(
         return xContent;
 
     // Create a new content.
-    xContent = HierarchyContent::create( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW), this, xCanonicId );
+    xContent = HierarchyContent::create( m_xContext, this, xCanonicId );
     registerNewContent( xContent );
 
     if ( xContent.is() && !xContent->getIdentifier().is() )
diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx
index 64494e3..be1e48f 100644
--- a/ucb/source/ucp/odma/odma_content.cxx
+++ b/ucb/source/ucp/odma/odma_content.cxx
@@ -569,7 +569,7 @@ void SAL_CALL Content::abort( sal_Int32 /*CommandId*/ )
 //=========================================================================
 // static
 uno::Reference< sdbc::XRow > Content::getPropertyValues(
-            const uno::Reference< lang::XMultiServiceFactory >& rSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             const uno::Sequence< beans::Property >& rProperties,
             const rtl::Reference<ContentProperties>& rData,
             const rtl::Reference< ::ucbhelper::ContentProviderImplHelper >& rProvider,
@@ -578,7 +578,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
     // Note: Empty sequence means "get values of all supported properties".
 
     rtl::Reference< ::ucbhelper::PropertyValueSet > xRow
-                                = new ::ucbhelper::PropertyValueSet( rSMgr );
+                                = new ::ucbhelper::PropertyValueSet( rxContext );
 
     sal_Int32 nCount = rProperties.getLength();
     if ( nCount )
@@ -768,7 +768,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
             const uno::Reference< ucb::XCommandEnvironment >& /*xEnv*/ )
 {
     osl::Guard< osl::Mutex > aGuard( m_aMutex );
-    return getPropertyValues( m_xSMgr,
+    return getPropertyValues( comphelper::getComponentContext(m_xSMgr),
                               rProperties,
                               m_aProps,
                               rtl::Reference<
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index 5d920e0..389f67c 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -147,7 +147,7 @@ ContentProperties::getCreatableContentsInfo( PackageUri const & rUri ) const
 
 // static ( "virtual" ctor )
 Content* Content::create(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier )
 {
@@ -170,7 +170,7 @@ Content* Content::create(
 
         uno::Reference< ucb::XContentIdentifier > xId
             = new ::ucbhelper::ContentIdentifier( aURI.getUri() );
-        return new Content( rxSMgr, pProvider, xId, xPackage, aURI, aProps );
+        return new Content( rxContext, pProvider, xId, xPackage, aURI, aProps );
     }
     else
     {
@@ -192,14 +192,14 @@ Content* Content::create(
         else
             aInfo.Type = getContentType( aURI.getScheme(), sal_False );
 
-        return new Content( rxSMgr, pProvider, xId, xPackage, aURI, aInfo );
+        return new Content( rxContext, pProvider, xId, xPackage, aURI, aInfo );
     }
 }
 
 //=========================================================================
 // static ( "virtual" ctor )
 Content* Content::create(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier,
             const ucb::ContentInfo& Info )
@@ -221,7 +221,7 @@ Content* Content::create(
 
     uno::Reference< ucb::XContentIdentifier > xId
         = new ::ucbhelper::ContentIdentifier( aURI.getUri() );
-    return new Content( rxSMgr, pProvider, xId, xPackage, aURI, Info );
+    return new Content( rxContext, pProvider, xId, xPackage, aURI, Info );
 }
 
 //=========================================================================
@@ -238,13 +238,13 @@ Content* Content::create(
 
 //=========================================================================
 Content::Content(
-        const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+        const uno::Reference< uno::XComponentContext >& rxContext,
         ContentProvider* pProvider,
         const uno::Reference< ucb::XContentIdentifier >& Identifier,
         const uno::Reference< container::XHierarchicalNameAccess > & Package,
         const PackageUri& rUri,
         const ContentProperties& rProps )
-: ContentImplHelper( rxSMgr, pProvider, Identifier ),
+: ContentImplHelper( rxContext, pProvider, Identifier ),
   m_aUri( rUri ),
   m_aProps( rProps ),
   m_eState( PERSISTENT ),
@@ -256,13 +256,13 @@ Content::Content(
 
 //=========================================================================
 Content::Content(
-        const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+        const uno::Reference< uno::XComponentContext >& rxContext,
         ContentProvider* pProvider,
         const uno::Reference< ucb::XContentIdentifier >& Identifier,
         const uno::Reference< container::XHierarchicalNameAccess > & Package,
         const PackageUri& rUri,
         const ucb::ContentInfo& Info )
-  : ContentImplHelper( rxSMgr, pProvider, Identifier ),
+  : ContentImplHelper( rxContext, pProvider, Identifier ),
   m_aUri( rUri ),
   m_aProps( Info.Type ),
   m_eState( TRANSIENT ),
@@ -739,7 +739,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
         uno::Reference< ucb::XContentIdentifier > xId(
             new ::ucbhelper::ContentIdentifier( aURL ) );
 
-        return create( m_xSMgr, m_pProvider, xId, Info );
+        return create( m_xContext, m_pProvider, xId, Info );
     }
     else
     {
@@ -763,7 +763,7 @@ rtl::OUString Content::getParentURL()
 //=========================================================================
 // static
 uno::Reference< sdbc::XRow > Content::getPropertyValues(
-                const uno::Reference< lang::XMultiServiceFactory >& rSMgr,
+                const uno::Reference< uno::XComponentContext >& rxContext,
                 const uno::Sequence< beans::Property >& rProperties,
                 ContentProvider* pProvider,
                 const rtl::OUString& rContentId )
@@ -772,7 +772,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
     uno::Reference< container::XHierarchicalNameAccess > xPackage;
     if ( loadData( pProvider, PackageUri( rContentId ), aData, xPackage ) )
     {
-        return getPropertyValues( rSMgr,
+        return getPropertyValues( rxContext,
                                   rProperties,
                                   aData,
                                   rtl::Reference<
@@ -783,7 +783,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
     else
     {
         rtl::Reference< ::ucbhelper::PropertyValueSet > xRow
-            = new ::ucbhelper::PropertyValueSet( rSMgr );
+            = new ::ucbhelper::PropertyValueSet( rxContext );
 
         sal_Int32 nCount = rProperties.getLength();
         if ( nCount )
@@ -800,7 +800,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
 //=========================================================================
 // static
 uno::Reference< sdbc::XRow > Content::getPropertyValues(
-        const uno::Reference< lang::XMultiServiceFactory >& rSMgr,
+        const uno::Reference< uno::XComponentContext >& rxContext,
         const uno::Sequence< beans::Property >& rProperties,
         const ContentProperties& rData,
         const rtl::Reference< ::ucbhelper::ContentProviderImplHelper >&
@@ -810,7 +810,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
     // Note: Empty sequence means "get values of all supported properties".
 
     rtl::Reference< ::ucbhelper::PropertyValueSet > xRow
-        = new ::ucbhelper::PropertyValueSet( rSMgr );
+        = new ::ucbhelper::PropertyValueSet( rxContext );
 
     sal_Int32 nCount = rProperties.getLength();
     if ( nCount )
@@ -1028,7 +1028,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
                         const uno::Sequence< beans::Property >& rProperties )
 {
     osl::Guard< osl::Mutex > aGuard( m_aMutex );
-    return getPropertyValues( m_xSMgr,
+    return getPropertyValues( m_xContext,
                               rProperties,
                               m_aProps,
                               rtl::Reference<
@@ -1462,7 +1462,7 @@ uno::Any Content::open(
         //////////////////////////////////////////////////////////////////
 
         uno::Reference< ucb::XDynamicResultSet > xSet
-            = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr), this, rArg, xEnv );
+            = new DynamicResultSet( m_xContext, this, rArg, xEnv );
         return uno::makeAny( xSet );
     }
     else
diff --git a/ucb/source/ucp/package/pkgcontent.hxx b/ucb/source/ucp/package/pkgcontent.hxx
index 9a3d3f4..1d5db31 100644
--- a/ucb/source/ucp/package/pkgcontent.hxx
+++ b/ucb/source/ucp/package/pkgcontent.hxx
@@ -115,7 +115,7 @@ class Content : public ::ucbhelper::ContentImplHelper,
 
 private:
     Content( const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
              ContentProvider* pProvider,
              const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier,
@@ -124,7 +124,7 @@ private:
              const PackageUri& rUri,
              const ContentProperties& rProps );
     Content( const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
              ContentProvider* pProvider,
              const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier,
@@ -143,7 +143,7 @@ private:
 
     static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
     getPropertyValues( const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::lang::XMultiServiceFactory >& rSMgr,
+                        ::com::sun::star::uno::XComponentContext >& rxContext,
                        const ::com::sun::star::uno::Sequence<
                             ::com::sun::star::beans::Property >& rProperties,
                        const ContentProperties& rData,
@@ -238,7 +238,7 @@ public:
     // Create existing content. Fail, if not already exists.
     static Content* create(
             const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier );
@@ -246,7 +246,7 @@ public:
     // Create new content. Fail, if already exists.
     static Content* create(
             const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier,
@@ -307,7 +307,7 @@ public:
     // Called from resultset data supplier.
     static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
     getPropertyValues( const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::lang::XMultiServiceFactory >& rSMgr,
+                        ::com::sun::star::uno::XComponentContext >& rxContext,
                        const ::com::sun::star::uno::Sequence<
                             ::com::sun::star::beans::Property >& rProperties,
                        ContentProvider* pProvider,
diff --git a/ucb/source/ucp/package/pkgdatasupplier.cxx b/ucb/source/ucp/package/pkgdatasupplier.cxx
index e49b343..74fbaa9 100644
--- a/ucb/source/ucp/package/pkgdatasupplier.cxx
+++ b/ucb/source/ucp/package/pkgdatasupplier.cxx
@@ -77,17 +77,17 @@ struct DataSupplier_Impl
     osl::Mutex                                   m_aMutex;
     ResultList                                   m_aResults;
     rtl::Reference< Content >                    m_xContent;
-    uno::Reference< lang::XMultiServiceFactory > m_xSMgr;
+    uno::Reference< uno::XComponentContext >     m_xContext;
     uno::Reference< container::XEnumeration >    m_xFolderEnum;
     sal_Int32                                    m_nOpenMode;
     sal_Bool                                     m_bCountFinal;
     sal_Bool                                     m_bThrowException;
 
     DataSupplier_Impl(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             const rtl::Reference< Content >& rContent,
             sal_Int32 nOpenMode )
-    : m_xContent( rContent ), m_xSMgr( rxSMgr ),
+    : m_xContent( rContent ), m_xContext( rxContext ),
       m_xFolderEnum( rContent->getIterator() ), m_nOpenMode( nOpenMode ),
       m_bCountFinal( !m_xFolderEnum.is() ), m_bThrowException( m_bCountFinal )
     {}
@@ -118,10 +118,10 @@ DataSupplier_Impl::~DataSupplier_Impl()
 //=========================================================================
 
 DataSupplier::DataSupplier(
-                const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+                const uno::Reference< uno::XComponentContext >& rxContext,
                 const rtl::Reference< Content >& rContent,
                 sal_Int32 nOpenMode )
-: m_pImpl( new DataSupplier_Impl( rxSMgr, rContent, nOpenMode ) )
+: m_pImpl( new DataSupplier_Impl( rxContext, rContent, nOpenMode ) )
 {
 }
 
@@ -413,7 +413,7 @@ uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues(
     if ( getResult( nIndex ) )
     {
         uno::Reference< sdbc::XRow > xRow = Content::getPropertyValues(
-                        m_pImpl->m_xSMgr,
+                        m_pImpl->m_xContext,
                         getResultSet()->getProperties(),
                         static_cast< ContentProvider * >(
                             m_pImpl->m_xContent->getProvider().get() ),
diff --git a/ucb/source/ucp/package/pkgdatasupplier.hxx b/ucb/source/ucp/package/pkgdatasupplier.hxx
index 189fb55..871ca6e 100644
--- a/ucb/source/ucp/package/pkgdatasupplier.hxx
+++ b/ucb/source/ucp/package/pkgdatasupplier.hxx
@@ -34,7 +34,7 @@ class DataSupplier : public ::ucbhelper::ResultSetDataSupplier
 
 public:
     DataSupplier( const com::sun::star::uno::Reference<
-                      com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                      com::sun::star::uno::XComponentContext >& rxContext,
                   const rtl::Reference< Content >& rContent,
                   sal_Int32 nOpenMode );
     virtual ~DataSupplier();
diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx
index c373d54..605851a 100644
--- a/ucb/source/ucp/package/pkgprovider.cxx
+++ b/ucb/source/ucp/package/pkgprovider.cxx
@@ -216,7 +216,7 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent(
 
     // Create a new content.
 
-    xContent = Content::create( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW), this, Identifier ); // not xId!!!
+    xContent = Content::create( m_xContext, this, Identifier ); // not xId!!!
     registerNewContent( xContent );
 
     if ( xContent.is() && !xContent->getIdentifier().is() )
diff --git a/ucb/source/ucp/package/pkgresultset.cxx b/ucb/source/ucp/package/pkgresultset.cxx
index fb73573..e6f5b0e 100644
--- a/ucb/source/ucp/package/pkgresultset.cxx
+++ b/ucb/source/ucp/package/pkgresultset.cxx
@@ -64,7 +64,7 @@ void DynamicResultSet::initStatic()
     m_xResultSet1
         = new ::ucbhelper::ResultSet( m_xContext,
                                       m_aCommand.Properties,
-                                      new DataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
+                                      new DataSupplier( m_xContext,
                                                         m_xContent,
                                                         m_aCommand.Mode ),
                                       m_xEnv );
@@ -76,7 +76,7 @@ void DynamicResultSet::initDynamic()
     m_xResultSet1
         = new ::ucbhelper::ResultSet( m_xContext,
                                       m_aCommand.Properties,
-                                      new DataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
+                                      new DataSupplier( m_xContext,
                                                         m_xContent,
                                                         m_aCommand.Mode ),
                                       m_xEnv );
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index 9946fea..c067b62 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -98,7 +98,7 @@ static ContentType lcl_getContentType( const rtl::OUString & rType )
 
 // static ( "virtual" ctor )
 Content* Content::create(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier )
 {
@@ -109,13 +109,13 @@ Content* Content::create(
                              aProps ) )
         return 0;
 
-    return new Content( rxSMgr, pProvider, Identifier, aProps );
+    return new Content( rxContext, pProvider, Identifier, aProps );
 }
 
 //=========================================================================
 // static ( "virtual" ctor )
 Content* Content::create(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier,
             const ucb::ContentInfo& Info )
@@ -129,16 +129,16 @@ Content* Content::create(
         return 0;
     }
 
-    return new Content( rxSMgr, pProvider, Identifier, Info );
+    return new Content( rxContext, pProvider, Identifier, Info );
 }
 
 //=========================================================================
 Content::Content(
-            const uno::Reference< lang::XMultiServiceFactory > & rxSMgr,
+            const uno::Reference< uno::XComponentContext > & rxContext,
             ContentProvider * pProvider,
             const uno::Reference< ucb::XContentIdentifier > & Identifier,
             const ContentProperties & rProps )
-: ContentImplHelper( rxSMgr, pProvider, Identifier ),
+: ContentImplHelper( rxContext, pProvider, Identifier ),
   m_aProps( rProps ),
   m_eState( PERSISTENT ),
   m_pProvider( pProvider )
@@ -148,11 +148,11 @@ Content::Content(
 //=========================================================================
 // ctor for a content just created via XContentCreator::createNewContent()
 Content::Content(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier,
             const ucb::ContentInfo& Info )
-  : ContentImplHelper( rxSMgr, pProvider, Identifier ),
+  : ContentImplHelper( rxContext, pProvider, Identifier ),
   m_aProps( lcl_getContentType( Info.Type ), rtl::OUString() ), // no Title (yet)
   m_eState( TRANSIENT ),
   m_pProvider( pProvider )
@@ -727,7 +727,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
         uno::Reference< ucb::XContentIdentifier > xId
             = new ::ucbhelper::ContentIdentifier( aURL );
 
-        return create( m_xSMgr, m_pProvider, xId, Info );
+        return create( m_xContext, m_pProvider, xId, Info );
     }
     else
     {
@@ -899,7 +899,7 @@ sal_Bool Content::exchangeIdentity(
 //=========================================================================
 // static
 uno::Reference< sdbc::XRow > Content::getPropertyValues(
-                const uno::Reference< lang::XMultiServiceFactory >& rSMgr,
+                const uno::Reference< uno::XComponentContext >& rxContext,
                 const uno::Sequence< beans::Property >& rProperties,
                 ContentProvider* pProvider,
                 const rtl::OUString& rContentId )
@@ -908,12 +908,12 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
     if ( loadData( pProvider, rContentId, aData ) )
     {
         return getPropertyValues(
-            rSMgr, rProperties, aData, pProvider, rContentId );
+            rxContext, rProperties, aData, pProvider, rContentId );
     }
     else
     {
         rtl::Reference< ::ucbhelper::PropertyValueSet > xRow
-            = new ::ucbhelper::PropertyValueSet( rSMgr );
+            = new ::ucbhelper::PropertyValueSet( rxContext );
 
         sal_Int32 nCount = rProperties.getLength();
         if ( nCount )
@@ -930,7 +930,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
 //=========================================================================
 // static
 uno::Reference< sdbc::XRow > Content::getPropertyValues(
-                const uno::Reference< lang::XMultiServiceFactory >& rSMgr,
+                const uno::Reference< uno::XComponentContext >& rxContext,
                 const uno::Sequence< beans::Property >& rProperties,
                 const ContentProperties& rData,
                 ContentProvider* pProvider,
@@ -939,7 +939,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
     // Note: Empty sequence means "get values of all supported properties".
 
     rtl::Reference< ::ucbhelper::PropertyValueSet > xRow
-        = new ::ucbhelper::PropertyValueSet( rSMgr );
+        = new ::ucbhelper::PropertyValueSet( rxContext );
 
     sal_Int32 nCount = rProperties.getLength();
     if ( nCount )
@@ -1119,7 +1119,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
                         const uno::Sequence< beans::Property >& rProperties )
 {
     osl::Guard< osl::Mutex > aGuard( m_aMutex );
-    return getPropertyValues( m_xSMgr,
+    return getPropertyValues( m_xContext,
                               rProperties,
                               m_aProps,
                               m_pProvider,
@@ -1418,7 +1418,7 @@ uno::Any Content::open(
         //////////////////////////////////////////////////////////////////
 
         uno::Reference< ucb::XDynamicResultSet > xSet
-            = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr), this, rArg );
+            = new DynamicResultSet( m_xContext, this, rArg );
         return uno::makeAny( xSet );
     }
     else
diff --git a/ucb/source/ucp/tdoc/tdoc_content.hxx b/ucb/source/ucp/tdoc/tdoc_content.hxx
index 9ce328e..a1b25ab 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.hxx
@@ -113,13 +113,13 @@ class Content : public ::ucbhelper::ContentImplHelper,
 
 private:
     Content( const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
              ContentProvider* pProvider,
              const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier,
             const ContentProperties & rProps );
     Content( const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
              ContentProvider* pProvider,
              const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier,
@@ -201,7 +201,7 @@ private:
 
     static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
     getPropertyValues( const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::lang::XMultiServiceFactory >& rSMgr,
+                        ::com::sun::star::uno::XComponentContext >& rxContext,
                        const ::com::sun::star::uno::Sequence<
                         ::com::sun::star::beans::Property >& rProperties,
                        const ContentProperties& rData,
@@ -244,7 +244,7 @@ public:
     // Create existing content. Fail, if not already exists.
     static Content* create(
             const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier );
@@ -252,7 +252,7 @@ public:
     // Create new content. Fail, if already exists.
     static Content* create(
             const com::sun::star::uno::Reference<
-                com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                com::sun::star::uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const com::sun::star::uno::Reference<
                 com::sun::star::ucb::XContentIdentifier >& Identifier,
@@ -316,7 +316,7 @@ public:
 
     static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
     getPropertyValues( const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::lang::XMultiServiceFactory >& rSMgr,
+                        ::com::sun::star::uno::XComponentContext >& rxContext,
                        const ::com::sun::star::uno::Sequence<
                         ::com::sun::star::beans::Property >& rProperties,
                        ContentProvider* pProvider,
diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
index 7bbccda..65daafd 100644
--- a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
@@ -73,17 +73,17 @@ struct DataSupplier_Impl
     osl::Mutex                                   m_aMutex;
     ResultList                                   m_aResults;
     rtl::Reference< Content >                    m_xContent;
-    uno::Reference< lang::XMultiServiceFactory > m_xSMgr;
+    uno::Reference< uno::XComponentContext >     m_xContext;
     uno::Sequence< rtl::OUString > *             m_pNamesOfChildren;
     sal_Int32                                    m_nOpenMode;
     bool                                         m_bCountFinal;
     bool                                         m_bThrowException;
 
     DataSupplier_Impl(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             const rtl::Reference< Content >& rContent,
             sal_Int32 nOpenMode )
-    : m_xContent( rContent ), m_xSMgr( rxSMgr ),
+    : m_xContent( rContent ), m_xContext( rxContext ),
       m_pNamesOfChildren( 0 ), m_nOpenMode( nOpenMode ),
       m_bCountFinal( false ), m_bThrowException( false )
     {}
@@ -116,10 +116,10 @@ DataSupplier_Impl::~DataSupplier_Impl()
 //=========================================================================
 
 ResultSetDataSupplier::ResultSetDataSupplier(
-                const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+                const uno::Reference< uno::XComponentContext >& rxContext,
                 const rtl::Reference< Content >& rContent,
                 sal_Int32 nOpenMode )
-: m_pImpl( new DataSupplier_Impl( rxSMgr, rContent, nOpenMode ) )
+: m_pImpl( new DataSupplier_Impl( rxContext, rContent, nOpenMode ) )
 {
 }
 
@@ -377,7 +377,7 @@ ResultSetDataSupplier::queryPropertyValues( sal_uInt32 nIndex  )
     if ( getResult( nIndex ) )
     {
         uno::Reference< sdbc::XRow > xRow = Content::getPropertyValues(
-                        m_pImpl->m_xSMgr,
+                        m_pImpl->m_xContext,
                         getResultSet()->getProperties(),
                         m_pImpl->m_xContent->getContentProvider().get(),
                         queryContentIdentifierString( nIndex ) );
diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx
index 0d1d8ad..93a3f8c 100644
--- a/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx
@@ -40,7 +40,7 @@ private:
 public:
     ResultSetDataSupplier(
         const com::sun::star::uno::Reference<
-            com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+            com::sun::star::uno::XComponentContext >& rxContext,
         const rtl::Reference< Content >& rContent,
             sal_Int32 nOpenMode = com::sun::star::ucb::OpenMode::ALL );
     virtual ~ResultSetDataSupplier();
diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx
index f9b5ba9..d5fbb0b 100644
--- a/ucb/source/ucp/tdoc/tdoc_provider.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx
@@ -141,7 +141,7 @@ ContentProvider::queryContent(
     if ( !xContent.is() )
     {
         // Create a new content.
-        xContent = Content::create( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW), this, xCanonicId );
+        xContent = Content::create( m_xContext, this, xCanonicId );
         registerNewContent( xContent );
     }
 
@@ -182,7 +182,7 @@ ContentProvider::createDocumentContent(
             if ( !xContent.is() )
             {
                 // Create a new content.
-                xContent = Content::create( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW), this, xId );
+                xContent = Content::create( m_xContext, this, xId );
             }
 
             if ( xContent.is() )
diff --git a/ucb/source/ucp/tdoc/tdoc_resultset.cxx b/ucb/source/ucp/tdoc/tdoc_resultset.cxx
index 7ec9c23..d942e7c 100644
--- a/ucb/source/ucp/tdoc/tdoc_resultset.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_resultset.cxx
@@ -66,7 +66,7 @@ void DynamicResultSet::initStatic()
         = new ::ucbhelper::ResultSet(
             m_xContext,
             m_aCommand.Properties,
-            new ResultSetDataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
+            new ResultSetDataSupplier( m_xContext,
                                        m_xContent,
                                        m_aCommand.Mode ) );
 }
@@ -78,7 +78,7 @@ void DynamicResultSet::initDynamic()
         = new ::ucbhelper::ResultSet(
             m_xContext,
             m_aCommand.Properties,
-            new ResultSetDataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
+            new ResultSetDataSupplier( m_xContext,
                                        m_xContent,
                                        m_aCommand.Mode ) );
     m_xResultSet2 = m_xResultSet1;
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index c0d7ace..a00763e 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -102,12 +102,12 @@ using namespace webdav_ucp;
 //=========================================================================
 // ctr for content on an existing webdav resource
 Content::Content(
-          const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+          const uno::Reference< uno::XComponentContext >& rxContext,
           ContentProvider* pProvider,
           const uno::Reference< ucb::XContentIdentifier >& Identifier,
           rtl::Reference< DAVSessionFactory > const & rSessionFactory )
   throw ( ucb::ContentCreationException )
-: ContentImplHelper( rxSMgr, pProvider, Identifier ),
+: ContentImplHelper( rxContext, pProvider, Identifier ),
   m_eResourceType( UNKNOWN ),
   m_pProvider( pProvider ),
   m_bTransient( false ),
@@ -117,7 +117,7 @@ Content::Content(
     try
     {
         m_xResAccess.reset( new DAVResourceAccess(
-                comphelper::getComponentContext(rxSMgr),
+                rxContext,
                 rSessionFactory,
                 Identifier->getContentIdentifier() ) );
 
@@ -133,13 +133,13 @@ Content::Content(
 //=========================================================================
 // ctr for content on an non-existing webdav resource
 Content::Content(
-            const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+            const uno::Reference< uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier,
             rtl::Reference< DAVSessionFactory > const & rSessionFactory,
             sal_Bool isCollection )
   throw ( ucb::ContentCreationException )
-: ContentImplHelper( rxSMgr, pProvider, Identifier ),
+: ContentImplHelper( rxContext, pProvider, Identifier ),
   m_eResourceType( UNKNOWN ),
   m_pProvider( pProvider ),
   m_bTransient( true ),
@@ -149,7 +149,7 @@ Content::Content(
     try
     {
         m_xResAccess.reset( new DAVResourceAccess(
-            comphelper::getComponentContext(rxSMgr), rSessionFactory, Identifier->getContentIdentifier() ) );
+            rxContext, rSessionFactory, Identifier->getContentIdentifier() ) );
     }
     catch ( DAVException const & )
     {
@@ -200,11 +200,8 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType )
     {
         try
         {
-            uno::Reference< uno::XComponentContext > xCtx(
-                comphelper::getComponentContext( m_xSMgr ) );
-
             uno::Reference< task::XInteractionHandler > xIH(
-                task::PasswordContainerInteractionHandler::create( xCtx ) );
+                task::PasswordContainerInteractionHandler::create( m_xContext ) );
 
             // Supply a command env to isFolder() that contains an interaction
             // handler that uses the password container service to obtain
@@ -212,7 +209,7 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType )
 
             uno::Reference< ucb::XCommandEnvironment > xCmdEnv(
                 ucb::CommandEnvironment::create(
-                   xCtx,
+                   m_xContext,
                    xIH,
                    uno::Reference< ucb::XProgressHandler >() ) );
 
@@ -997,7 +994,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
     // create the local content
     try
     {

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list