[Libreoffice-commits] .: 3 commits - avmedia/source basctl/source basebmp/test basic/CppunitTest_basic_enable.mk basic/CppunitTest_basic_nested_struct.mk basic/source canvas/workben chart2/source comphelper/source connectivity/source connectivity/workben cui/source dbaccess/source desktop/source editeng/source extensions/source fileaccess/Library_fileacc.mk fileaccess/prj fileaccess/source filter/source forms/source fpicker/source framework/inc framework/source hwpfilter/source linguistic/source lotuswordpro/source odk/examples offapi/com offapi/type_reference offapi/UnoApi_offapi.mk package/inc package/source padmin/source qadevOOo/tests reportdesign/source sc/qa scripting/java scripting/source sc/source sd/CppunitTest_sd_uimpress.mk sd/source sfx2/source slideshow/test sot/source svl/qa svl/source svtools/CppunitTest_svtools_filters_test.mk svtools/langsupport svtools/source svx/Executable_gengal.bin.mk svx/source svx/workben sw/source test/Library_subsequenttest.mk test/Library_test.mk test/source ucbhelper/inc ucbhelper/Package_inc.mk ucbhelper/source ucb/Library_ucpftp1.mk ucb/qa ucb/source ucb/test udkapi/com unotest/source unotools/source unoxml/source vcl/source vcl/test vcl/workben wizards/com writerfilter/CppunitTest_writerfilter_doctok.mk writerfilter/CppunitTest_writerfilter_rtftok.mk writerfilter/Library_writerfilter.mk writerfilter/Library_writerfilter_uno.mk writerfilter/prj writerfilter/qa writerfilter/unocomponent writerperfect/source xmlsecurity/tools xmlsecurity/workben

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Sep 14 09:25:33 PDT 2012


 avmedia/source/framework/mediaitem.cxx                                    |    3 
 basctl/source/basicide/moduldl2.cxx                                       |    8 
 basebmp/test/bmpdemo.cxx                                                  |   16 
 basic/CppunitTest_basic_enable.mk                                         |    1 
 basic/CppunitTest_basic_nested_struct.mk                                  |    1 
 basic/source/runtime/iosys.cxx                                            |   10 
 canvas/workben/canvasdemo.cxx                                             |   16 
 chart2/source/model/main/ChartModel_Persistence.cxx                       |    3 
 comphelper/source/misc/mediadescriptor.cxx                                |    6 
 comphelper/source/misc/storagehelper.cxx                                  |    3 
 connectivity/source/drivers/dbase/DDatabaseMetaData.cxx                   |    3 
 connectivity/source/drivers/dbase/DTable.cxx                              |   17 
 connectivity/source/drivers/file/FConnection.cxx                          |    9 
 connectivity/source/drivers/file/FDatabaseMetaData.cxx                    |   32 
 connectivity/workben/testmoz/main.cxx                                     |   15 
 connectivity/workben/testmoz/mozthread.cxx                                |    1 
 cui/source/dialogs/cuigaldlg.cxx                                          |    2 
 cui/source/dialogs/multifil.cxx                                           |   30 
 cui/source/options/doclinkdialog.cxx                                      |    4 
 cui/source/options/optjava.cxx                                            |    1 
 cui/source/options/optlingu.cxx                                           |    2 
 dbaccess/source/core/dataaccess/databasecontext.cxx                       |    2 
 dbaccess/source/ext/macromigration/macromigrationdialog.cxx               |   24 
 dbaccess/source/filter/xml/dbloader2.cxx                                  |    1 
 dbaccess/source/ui/dlg/ConnectionHelper.cxx                               |    4 
 dbaccess/source/ui/dlg/dbfindex.cxx                                       |    5 
 dbaccess/source/ui/misc/UITools.cxx                                       |    4 
 desktop/source/app/app.cxx                                                |    5 
 desktop/source/app/appinit.cxx                                            |  102 ---
 desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx                |    2 
 desktop/source/deployment/manager/dp_extensionmanager.cxx                 |   10 
 desktop/source/deployment/manager/dp_informationprovider.cxx              |    2 
 desktop/source/deployment/manager/dp_manager.cxx                          |   25 
 desktop/source/deployment/manager/dp_properties.cxx                       |   14 
 desktop/source/deployment/manager/dp_properties.hxx                       |    7 
 desktop/source/deployment/misc/dp_descriptioninfoset.cxx                  |    2 
 desktop/source/deployment/misc/dp_ucb.cxx                                 |    5 
 desktop/source/deployment/registry/component/dp_component.cxx             |    8 
 desktop/source/deployment/registry/configuration/dp_configuration.cxx     |   18 
 desktop/source/deployment/registry/dp_backend.cxx                         |    6 
 desktop/source/deployment/registry/dp_backenddb.cxx                       |    5 
 desktop/source/deployment/registry/executable/dp_executable.cxx           |    3 
 desktop/source/deployment/registry/help/dp_help.cxx                       |    3 
 desktop/source/deployment/registry/package/dp_package.cxx                 |   23 
 desktop/source/deployment/registry/script/dp_lib_container.cxx            |    2 
 desktop/source/pkgchk/unopkg/unopkg_misc.cxx                              |   14 
 desktop/source/pkgchk/unopkg/unopkg_shared.h                              |   14 
 editeng/source/misc/svxacorr.cxx                                          |    4 
 extensions/source/bibliography/datman.cxx                                 |    7 
 extensions/source/plugin/base/xplugin.cxx                                 |    4 
 extensions/source/update/check/updateprotocoltest.cxx                     |   14 
 extensions/source/update/feed/test/updatefeedtest.cxx                     |   14 
 extensions/source/update/feed/updatefeed.cxx                              |   27 
 fileaccess/Library_fileacc.mk                                             |    1 
 fileaccess/prj/build.lst                                                  |    2 
 fileaccess/source/FileAccess.cxx                                          |   37 -
 filter/source/msfilter/msdffimp.cxx                                       |    3 
 filter/source/xmlfilterdetect/fdcomp.cxx                                  |   50 -
 filter/source/xmlfilterdetect/filterdetect.cxx                            |   42 -
 filter/source/xmlfilterdetect/filterdetect.hxx                            |   42 -
 forms/source/xforms/submission/submission_get.cxx                         |    2 
 forms/source/xforms/submission/submission_post.cxx                        |    2 
 forms/source/xforms/submission/submission_put.cxx                         |    2 
 fpicker/source/office/fpsmartcontent.cxx                                  |    2 
 fpicker/source/office/iodlg.cxx                                           |   20 
 framework/inc/services.h                                                  |    1 
 framework/inc/services/autorecovery.hxx                                   |    4 
 framework/source/loadenv/loadenv.cxx                                      |    4 
 framework/source/services/autorecovery.cxx                                |    6 
 hwpfilter/source/hwpreader.hxx                                            |   23 
 linguistic/source/convdiclist.cxx                                         |    5 
 linguistic/source/misc.cxx                                                |    2 
 linguistic/source/misc2.cxx                                               |    3 
 lotuswordpro/source/filter/LotusWordProImportFilter.cxx                   |    3 
 odk/examples/DevelopersGuide/UCB/Helper.java                              |   10 
 odk/examples/java/Inspector/TDocSupplier.java                             |   15 
 offapi/UnoApi_offapi.mk                                                   |    3 
 offapi/com/sun/star/frame/XModuleManager2.idl                             |    4 
 offapi/com/sun/star/ucb/UniversalContentBroker.idl                        |  154 ----
 offapi/com/sun/star/ucb/XUniversalContentBroker.idl                       |  131 +++
 offapi/com/sun/star/util/XNumberFormatter2.idl                            |    5 
 offapi/type_reference/types.rdb                                           |binary
 package/inc/ZipPackage.hxx                                                |    2 
 package/source/zippackage/ZipPackage.cxx                                  |   67 --
 package/source/zippackage/zipfileaccess.cxx                               |    7 
 padmin/source/pamain.cxx                                                  |   29 
 qadevOOo/tests/java/ifc/ucb/_XSortedDynamicResultSetFactory.java          |    2 
 qadevOOo/tests/java/mod/_cached/CachedContentResultSetFactory.java        |    2 
 qadevOOo/tests/java/mod/_cached/CachedContentResultSetStubFactory.java    |    2 
 qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetFactory.java        |    2 
 qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java    |    2 
 reportdesign/source/filter/xml/dbloader2.hxx                              |    1 
 sc/qa/unit/ucalc.cxx                                                      |    2 
 sc/source/core/data/globalx.cxx                                           |    4 
 sc/source/ui/docshell/docsh8.cxx                                          |    9 
 scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java |   21 
 scripting/source/inc/util/MiscUtils.hxx                                   |    4 
 sd/CppunitTest_sd_uimpress.mk                                             |    1 
 sd/source/filter/eppt/epptso.cxx                                          |    2 
 sd/source/filter/eppt/pptexsoundcollection.cxx                            |    8 
 sd/source/ui/dlg/TemplateScanner.cxx                                      |    6 
 sfx2/source/appl/appinit.cxx                                              |    1 
 sfx2/source/appl/newhelp.cxx                                              |    4 
 sfx2/source/appl/sfxhelp.cxx                                              |    3 
 sfx2/source/appl/xpackcreator.cxx                                         |    3 
 sfx2/source/bastyp/helper.cxx                                             |   11 
 sfx2/source/control/templateremoteview.cxx                                |    4 
 sfx2/source/dialog/filedlghelper.cxx                                      |    5 
 sfx2/source/doc/docfile.cxx                                               |   41 -
 sfx2/source/doc/doctempl.cxx                                              |   18 
 sfx2/source/doc/doctemplates.cxx                                          |   68 +-
 sfx2/source/doc/objstor.cxx                                               |    4 
 sfx2/source/doc/printhelper.cxx                                           |    8 
 sfx2/source/doc/sfxbasemodel.cxx                                          |    3 
 slideshow/test/demoshow.cxx                                               |   12 
 sot/source/sdstor/storage.cxx                                             |    2 
 sot/source/sdstor/ucbstorage.cxx                                          |   18 
 svl/qa/unit/test_URIHelper.cxx                                            |   16 
 svl/source/fsstor/fsfactory.cxx                                           |    9 
 svl/source/fsstor/fsstorage.cxx                                           |   31 
 svl/source/misc/documentlockfile.cxx                                      |    8 
 svl/source/misc/fstathelper.cxx                                           |   10 
 svl/source/misc/sharecontrolfile.cxx                                      |    2 
 svl/source/misc/urihelper.cxx                                             |   47 -
 svtools/CppunitTest_svtools_filters_test.mk                               |    1 
 svtools/langsupport/langsupport.cxx                                       |    1 
 svtools/source/contnr/contentenumeration.cxx                              |    4 
 svtools/source/contnr/fileview.cxx                                        |   14 
 svtools/source/control/inettbc.cxx                                        |    3 
 svtools/source/dialogs/ServerDetailsControls.cxx                          |    2 
 svtools/source/filter/filter.cxx                                          |    6 
 svtools/source/misc/imagemgr.cxx                                          |    4 
 svtools/source/misc/templatefoldercache.cxx                               |    2 
 svx/Executable_gengal.bin.mk                                              |    1 
 svx/source/gallery2/galbrws1.cxx                                          |    4 
 svx/source/gallery2/gallery1.cxx                                          |   10 
 svx/source/gallery2/galmisc.cxx                                           |   10 
 svx/source/gallery2/galtheme.cxx                                          |    4 
 svx/source/gengal/gengal.cxx                                              |   21 
 svx/source/svdraw/svdoashp.cxx                                            |    1 
 svx/source/svdraw/svdogrp.cxx                                             |    2 
 svx/source/svdraw/svdomedia.cxx                                           |    8 
 svx/source/svdraw/svdotxln.cxx                                            |   35 -
 svx/workben/msview/msview.cxx                                             |   15 
 sw/source/core/unocore/swunohelper.cxx                                    |   23 
 sw/source/filter/ww8/ww8par5.cxx                                          |    8 
 sw/source/ui/misc/glossary.cxx                                            |    3 
 test/Library_subsequenttest.mk                                            |    1 
 test/Library_test.mk                                                      |    1 
 test/source/bootstrapfixture.cxx                                          |   32 
 ucb/Library_ucpftp1.mk                                                    |    1 
 ucb/qa/complex/tdoc/CheckContentProvider.java                             |    8 
 ucb/qa/complex/tdoc/CheckTransientDocumentsContent.java                   |    2 
 ucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java           |    2 
 ucb/qa/complex/ucb/UCB.java                                               |   28 
 ucb/source/core/ucb.cxx                                                   |   66 +
 ucb/source/core/ucb.hxx                                                   |   19 
 ucb/source/ucp/expand/ucpexpand.cxx                                       |    5 
 ucb/source/ucp/ext/ucpext_content.cxx                                     |    4 
 ucb/source/ucp/ext/ucpext_datasupplier.cxx                                |    2 
 ucb/source/ucp/ftp/ftpcontentprovider.cxx                                 |   24 
 ucb/test/com/sun/star/comp/ucb/GlobalTransfer_Test.java                   |    1 
 ucbhelper/Package_inc.mk                                                  |    2 
 ucbhelper/inc/ucbhelper/configurationkeys.hxx                             |   32 
 ucbhelper/inc/ucbhelper/content.hxx                                       |   14 
 ucbhelper/inc/ucbhelper/contentbroker.hxx                                 |  170 -----
 ucbhelper/inc/ucbhelper/fileidentifierconverter.hxx                       |   10 
 ucbhelper/source/client/content.cxx                                       |  298 ++------
 ucbhelper/source/client/contentbroker.cxx                                 |  334 ----------
 ucbhelper/source/client/fileidentifierconverter.cxx                       |   14 
 udkapi/com/sun/star/io/XPipe.idl                                          |    7 
 udkapi/com/sun/star/reflection/theCoreReflection.idl                      |    4 
 unotest/source/cpp/bootstrapfixturebase.cxx                               |    1 
 unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx        |    1 
 unotools/source/ucbhelper/localfilehelper.cxx                             |  103 +--
 unotools/source/ucbhelper/tempfile.cxx                                    |   50 -
 unotools/source/ucbhelper/ucbhelper.cxx                                   |   27 
 unotools/source/ucbhelper/ucblockbytes.cxx                                |   10 
 unotools/source/ucbhelper/ucbstreamhelper.cxx                             |  147 ++--
 unoxml/source/dom/documentbuilder.cxx                                     |    3 
 vcl/source/gdi/impgraph.cxx                                               |   14 
 vcl/test/canvasbitmaptest.cxx                                             |    2 
 vcl/workben/outdevgrind.cxx                                               |   11 
 vcl/workben/svpclient.cxx                                                 |   21 
 wizards/com/sun/star/wizards/common/UCB.java                              |    5 
 writerfilter/CppunitTest_writerfilter_doctok.mk                           |    1 
 writerfilter/CppunitTest_writerfilter_rtftok.mk                           |    1 
 writerfilter/Library_writerfilter.mk                                      |    1 
 writerfilter/Library_writerfilter_uno.mk                                  |    1 
 writerfilter/prj/build.lst                                                |    2 
 writerfilter/qa/cppunittests/doctok/testdoctok.cxx                        |   36 -
 writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx   |  146 +---
 writerfilter/unocomponent/debugservices/doctok/DocTokTestService.cxx      |   53 -
 writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx     |  143 +---
 writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx        |   56 -
 writerperfect/source/writer/MSWorksImportFilter.cxx                       |    2 
 writerperfect/source/writer/WordPerfectImportFilter.cxx                   |    2 
 xmlsecurity/tools/standalone/csfit/helper.cxx                             |   21 
 xmlsecurity/tools/standalone/csfit/helper.hxx                             |    2 
 xmlsecurity/tools/standalone/mscsfit/helper.cxx                           |   22 
 xmlsecurity/tools/standalone/mscsfit/helper.hxx                           |    2 
 xmlsecurity/workben/signaturetest.cxx                                     |   15 
 202 files changed, 1343 insertions(+), 2463 deletions(-)

New commits:
commit 9ac86f484b0c278aafbce685ed19d3ea005ee8f8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Sep 14 18:08:57 2012 +0200

    Improvement on previous commit, UCB clean up
    
    * As UCB is only ever initialized with "Local"/"Office", remove this
      configuration vector completely.  The "create" ctor creates an instance
      internally initialized with those "Local"/"Office" keys.  Special (test) code
      can still instantiate an uninitialized one via plain createInstance.  And for
      backwards compatilibity process startup still ensures to create an initialized
      instance early, in case there is still code out there (in extensions) that
      later calls plain createInstance and expects to get the already-initialized
      (single) instance.
    
    * XInitialization is an "implementation detail" of the UniversalContentBroker
      service, do not expose in XUniversalContentBroker.
    
    * ucbhelper/configurationkeys.hxx is no longer needed and is removed.
    
    * ucbhelper/contentbroker.hxx is an empty wrapper and is removed; however, that
      requires ucbhelper::Content constructors to take explicit XComponentContext
      arguments now.
    
    * The only remaining code in ucbhelper/source/client/contentbroker.cxx is
      Android-only InitUCBHelper.  Is that relevant still?
    
    Change-Id: I3f7bddd0456bffbcd13590c66d9011915c760f28

diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx
index 014ea2d..591d5db 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -444,7 +444,8 @@ bool EmbedMedia(uno::Reference<frame::XModel> const& xModel,
     try
     {
         ::ucbhelper::Content sourceContent(rSourceURL,
-                uno::Reference<ucb::XCommandEnvironment>());
+                uno::Reference<ucb::XCommandEnvironment>(),
+                comphelper::getProcessComponentContext());
 
         uno::Reference<document::XStorageBasedDocument> const xSBD(xModel,
                 uno::UNO_QUERY_THROW);
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 18f6bfd..5500ae0 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1314,7 +1314,7 @@ void LibPage::ExportAsPackage( const String& aLibName )
         Reference< XCommandEnvironment > xCmdEnv =
             static_cast<XCommandEnvironment*>( new OLibCommandEnvironment( xHandler ) );
 
-        ::ucbhelper::Content sourceContent( aSourcePath, xCmdEnv );
+        ::ucbhelper::Content sourceContent( aSourcePath, xCmdEnv, comphelper::getProcessComponentContext() );
 
         ::rtl::OUStringBuffer buf;
         buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip://") );
@@ -1328,7 +1328,7 @@ void LibPage::ExportAsPackage( const String& aLibName )
         if( xSFA->exists( aPackageURL ) )
             xSFA->kill( aPackageURL );
 
-        ::ucbhelper::Content destFolderContent( destFolder, xCmdEnv );
+        ::ucbhelper::Content destFolderContent( destFolder, xCmdEnv, comphelper::getProcessComponentContext() );
         destFolderContent.transferContent(
             sourceContent, ::ucbhelper::InsertOperation_COPY,
             OUString(), NameClash::OVERWRITE );
@@ -1369,10 +1369,10 @@ void LibPage::ExportAsPackage( const String& aLibName )
             true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL );
 
         // write buffered pipe data to content:
-        ::ucbhelper::Content manifestContent( aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE ), xCmdEnv );
+        ::ucbhelper::Content manifestContent( aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE ), xCmdEnv, comphelper::getProcessComponentContext() );
         manifestContent.writeStream( Reference<io::XInputStream>( xPipe, UNO_QUERY_THROW ), true );
 
-        ::ucbhelper::Content MetaInfContent( aMetaInfFolder, xCmdEnv );
+        ::ucbhelper::Content MetaInfContent( aMetaInfFolder, xCmdEnv, comphelper::getProcessComponentContext() );
         destFolderContent.transferContent(
             MetaInfContent, ::ucbhelper::InsertOperation_COPY,
             OUString(), NameClash::OVERWRITE );
diff --git a/basebmp/test/bmpdemo.cxx b/basebmp/test/bmpdemo.cxx
index 8ea3270..18f4cab 100644
--- a/basebmp/test/bmpdemo.cxx
+++ b/basebmp/test/bmpdemo.cxx
@@ -28,9 +28,7 @@
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
 #include <com/sun/star/registry/XSimpleRegistry.hpp>
-
-#include <ucbhelper/contentbroker.hxx>
-#include <ucbhelper/configurationkeys.hxx>
+#include <com/sun/star/ucb/UniversalContentBroker.hpp>
 
 #include <vcl/window.hxx>
 #include <vcl/svapp.hxx>
@@ -1222,17 +1220,13 @@ void TestApp::Main()
         exit( 1 );
     }
 
-    // Create UCB.
-    uno::Sequence< uno::Any > aArgs( 2 );
-    aArgs[ 0 ] <<= rtl::OUString(UCB_CONFIGURATION_KEY1_LOCAL );
-    aArgs[ 1 ] <<= rtl::OUString(UCB_CONFIGURATION_KEY2_OFFICE );
-    ::ucbhelper::ContentBroker::initialize( xFactory, aArgs );
+    // Create UCB (for backwards compatibility, in case some code still uses
+    // plain createInstance w/o args directly to obtain an instance):
+    ::ucb::UniversalContentBroker::create(
+        comphelper::getProcessComponentContext() );
 
     TestWindow pWindow;
     pWindow.Execute();
-
-    // clean up UCB
-    ::ucbhelper::ContentBroker::deinitialize();
 }
 
 TestApp aDemoApp;
diff --git a/basic/CppunitTest_basic_enable.mk b/basic/CppunitTest_basic_enable.mk
index b0ab5fd..f6c72f5 100644
--- a/basic/CppunitTest_basic_enable.mk
+++ b/basic/CppunitTest_basic_enable.mk
@@ -53,5 +53,6 @@ $(eval $(call gb_CppunitTest_use_ure,basic_enable))
 $(eval $(call gb_CppunitTest_use_components,basic_enable,\
     configmgr/source/configmgr \
     ucb/source/core/ucb1 \
+    ucb/source/ucp/file/ucpfile1 \
 ))
 $(eval $(call gb_CppunitTest_use_configuration,basic_enable))
diff --git a/basic/CppunitTest_basic_nested_struct.mk b/basic/CppunitTest_basic_nested_struct.mk
index b6e421c..78aee47 100644
--- a/basic/CppunitTest_basic_nested_struct.mk
+++ b/basic/CppunitTest_basic_nested_struct.mk
@@ -54,6 +54,7 @@ $(eval $(call gb_CppunitTest_use_ure,basic_nested_struct))
 $(eval $(call gb_CppunitTest_use_components,basic_nested_struct,\
     configmgr/source/configmgr \
     ucb/source/core/ucb1 \
+    ucb/source/ucp/file/ucpfile1 \
 ))
 $(eval $(call gb_CppunitTest_use_configuration,basic_nested_struct))
 
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index 4ac4fa4..ea1b0f7 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -285,7 +285,7 @@ bool hasUno( void )
         }
         else
         {
-            Reference< XUniversalContentBroker > xManager = UniversalContentBroker::createDefault(xContext);
+            Reference< XUniversalContentBroker > xManager = UniversalContentBroker::create(xContext);
 
             if ( !( xManager->queryContentProvider( ::rtl::OUString("file:///" ) ).is() ) )
             {
diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx
index 1aa919f..11de6f7 100644
--- a/canvas/workben/canvasdemo.cxx
+++ b/canvas/workben/canvasdemo.cxx
@@ -35,9 +35,7 @@
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
 #include <com/sun/star/registry/XSimpleRegistry.hpp>
-
-#include <ucbhelper/contentbroker.hxx>
-#include <ucbhelper/configurationkeys.hxx>
+#include <com/sun/star/ucb/UniversalContentBroker.hpp>
 
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <basegfx/polygon/b2dpolygontools.hxx>
@@ -686,19 +684,15 @@ void DemoApp::Main()
         exit( 1 );
     }
 
-    // Create UCB.
-    uno::Sequence< uno::Any > aArgs( 2 );
-    aArgs[ 0 ] <<= rtl::OUString(UCB_CONFIGURATION_KEY1_LOCAL );
-    aArgs[ 1 ] <<= rtl::OUString(UCB_CONFIGURATION_KEY2_OFFICE );
-    ::ucbhelper::ContentBroker::initialize( xFactory, aArgs );
+    // Create UCB (for backwards compatibility, in case some code still uses
+    // plain createInstance w/o args directly to obtain an instance):
+    ::ucb::UniversalContentBroker::create(
+        comphelper::getProcessComponentContext() );
 
     InitVCL( xFactory );
     TestWindow pWindow;
     pWindow.Execute();
     DeInitVCL();
-
-    // clean up UCB
-    ::ucbhelper::ContentBroker::deinitialize();
 }
 
 DemoApp aDemoApp;
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index cd6aff7..1e4d1f4 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -46,6 +46,7 @@
 #include <ucbhelper/content.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <vcl/cvtgrf.hxx>
+#include <comphelper/processfactory.hxx>
 #include <comphelper/storagehelper.hxx>
 #include <vcl/svapp.hxx>
 
@@ -114,7 +115,7 @@ Reference< embed::XStorage > lcl_createStorage(
     try
     {
         Reference< io::XStream > xStream(
-            ::ucbhelper::Content( rURL, Reference< ::com::sun::star::ucb::XCommandEnvironment >()).openStream(),
+            ::ucbhelper::Content( rURL, Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext()).openStream(),
             uno::UNO_QUERY );
 
         Reference< lang::XSingleServiceFactory > xStorageFact(
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx
index 311ff5e..dd91d9e 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -353,7 +353,7 @@ sal_Bool MediaDescriptor::isStreamReadOnly() const
                 bReadOnly = sal_True;
             else
             {
-                ::ucbhelper::Content aContent(xContent, css::uno::Reference< css::ucb::XCommandEnvironment >());
+                ::ucbhelper::Content aContent(xContent, css::uno::Reference< css::ucb::XCommandEnvironment >(), getProcessComponentContext());
                 aContent.getPropertyValue(CONTENTPROP_ISREADONLY) >>= bReadOnly;
             }
         }
@@ -526,7 +526,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference
             xSeek->seek( 0 );
 
         // a content for the URL
-        ::ucbhelper::Content aContent( sURL, xCommandEnv );
+        ::ucbhelper::Content aContent( sURL, xCommandEnv, getProcessComponentContext() );
 
         // use post command
         css::ucb::PostCommandArgument2 aPostArgument;
@@ -579,7 +579,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const ::rtl::OUString& sURL, s
     css::uno::Reference< css::ucb::XContent > xContent;
     try
     {
-        aContent = ::ucbhelper::Content(sURL, xCommandEnv);
+        aContent = ::ucbhelper::Content(sURL, xCommandEnv, getProcessComponentContext());
         xContent = aContent.get();
     }
     catch(const css::uno::RuntimeException&)
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index 785d4b2..e4a1048 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -141,7 +141,8 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageFromURL2(
     uno::Reference< lang::XSingleServiceFactory > xFact;
     try {
         ::ucbhelper::Content aCntnt( aURL,
-            uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+            uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > (),
+            getProcessComponentContext() );
         if (aCntnt.isDocument()) {
             xFact = GetStorageFactory( xFactory );
         } else {
diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
index f453e9b..9cd9613 100644
--- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
@@ -30,6 +30,7 @@
 #include "dbase/DIndex.hxx"
 #include "connectivity/FValue.hxx"
 #include <comphelper/extract.hxx>
+#include <comphelper/processfactory.hxx>
 #include <comphelper/types.hxx>
 #include <ucbhelper/content.hxx>
 #include <rtl/logfile.hxx>
@@ -378,7 +379,7 @@ sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly(  ) throw(SQLException, Run
 
     sal_Bool bReadOnly = sal_False;
     static ::rtl::OUString sReadOnly(  "IsReadOnly" );
-    ::ucbhelper::Content aFile(m_pConnection->getContent(),Reference< XCommandEnvironment >());
+    ::ucbhelper::Content aFile(m_pConnection->getContent(),Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext());
     aFile.getPropertyValue(sReadOnly) >>= bReadOnly;
 
     return bReadOnly;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 9bd6c0e..28d4436 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -29,6 +29,7 @@
 #include <tools/config.hxx>
 #include "dbase/DIndex.hxx"
 #include "dbase/DIndexes.hxx"
+#include <comphelper/processfactory.hxx>
 #include <comphelper/sequence.hxx>
 #include <svl/zforlist.hxx>
 #include <unotools/syslocale.hxx>
@@ -694,7 +695,7 @@ void ODbaseTable::refreshIndexes()
                 aURL.setName(rtl::OStringToOUString(aIndexName, m_eEncoding));
                 try
                 {
-                    Content aCnt(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>());
+                    Content aCnt(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
                     if (aCnt.isDocument())
                     {
                         aVector.push_back(aURL.getBase());
@@ -1051,7 +1052,7 @@ sal_Bool ODbaseTable::CreateImpl()
 
     try
     {
-        Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>());
+        Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
         if (aContent.isDocument())
         {
             // Only if the file exists with length > 0 raise an error
@@ -1078,7 +1079,7 @@ sal_Bool ODbaseTable::CreateImpl()
     {
         try
         {
-            Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>());
+            Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
             aContent.executeCommand( rtl::OUString("delete"),bool2any( sal_True ) );
         }
         catch(const Exception&) // an exception is thrown when no file exists
@@ -1091,7 +1092,7 @@ sal_Bool ODbaseTable::CreateImpl()
     {
         String aExt = aURL.getExtension();
         aURL.setExtension(rtl::OUString("dbt"));                      // extension for memo file
-        Content aMemo1Content(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>());
+        Content aMemo1Content(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
 
         sal_Bool bMemoAlreadyExists = sal_False;
         try
@@ -1106,7 +1107,7 @@ sal_Bool ODbaseTable::CreateImpl()
             aURL.setExtension(aExt);      // kill dbf file
             try
             {
-                Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>());
+                Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
                 aMemoContent.executeCommand( rtl::OUString("delete"),bool2any( sal_True ) );
             }
             catch(const Exception&)
@@ -1122,7 +1123,7 @@ sal_Bool ODbaseTable::CreateImpl()
         if (!CreateMemoFile(aURL))
         {
             aURL.setExtension(aExt);      // kill dbf file
-            Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>());
+            Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
             aMemoContent.executeCommand( rtl::OUString("delete"),bool2any( sal_True ) );
             return sal_False;
         }
@@ -1460,7 +1461,7 @@ sal_Bool ODbaseTable::Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMem
             // as the inf file does not necessarily exist, we aren't allowed to use UCBContentHelper::Kill
             try
             {
-                ::ucbhelper::Content aDeleteContent( aURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment > () );
+                ::ucbhelper::Content aDeleteContent( aURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
                 aDeleteContent.executeCommand( ::rtl::OUString("delete"), makeAny( sal_Bool( sal_True ) ) );
             }
             catch(const Exception&)
@@ -2319,7 +2320,7 @@ namespace
 
         try
         {
-            Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>());
+            Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
 
             Sequence< PropertyValue > aProps( 1 );
             aProps[0].Name      = ::rtl::OUString("Title");
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 4aa2cff..2fa26d5 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include "sal/config.h"
+
+#include <comphelper/processfactory.hxx>
 #include <cppuhelper/typeprovider.hxx>
 #include "file/FConnection.hxx"
 #include "file/FDatabaseMetaData.hxx"
@@ -157,7 +160,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
         ::ucbhelper::Content aFile;
         try
         {
-            aFile = ::ucbhelper::Content(getURL(),Reference< XCommandEnvironment >());
+            aFile = ::ucbhelper::Content(getURL(), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext());
         }
         catch(ContentCreationException& e)
         {
@@ -182,7 +185,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
                 Reference<XContentIdentifier> xIdent = xParent->getIdentifier();
                 m_xContent = xParent;
 
-                ::ucbhelper::Content aParent(xIdent->getContentIdentifier(),Reference< XCommandEnvironment >());
+                ::ucbhelper::Content aParent(xIdent->getContentIdentifier(), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext());
                 m_xDir = aParent.createDynamicCursor(aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY );
             }
             else
@@ -398,7 +401,7 @@ Reference< XDynamicResultSet > OConnection::getDir() const
     try
     {
         Reference<XContentIdentifier> xIdent = getContent()->getIdentifier();
-        ::ucbhelper::Content aParent(xIdent->getContentIdentifier(),Reference< XCommandEnvironment >());
+        ::ucbhelper::Content aParent(xIdent->getContentIdentifier(), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext());
         xContent = aParent.createDynamicCursor(aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY );
     }
     catch(Exception&)
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 61998d2..86ea5f2 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -24,18 +24,17 @@
 #include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
 #include <com/sun/star/ucb/SearchRecursion.hpp>
 #include <com/sun/star/ucb/SearchCommandArgument.hpp>
+#include <com/sun/star/ucb/UniversalContentBroker.hpp>
 #include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp>
-#include <com/sun/star/ucb/XContentProvider.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <tools/urlobj.hxx>
 #include "file/FDriver.hxx"
 #include "file/FTable.hxx"
 #include <comphelper/extract.hxx>
-#include <ucbhelper/content.hxx>
-#include <ucbhelper/contentbroker.hxx>
+#include <comphelper/processfactory.hxx>
 #include <tools/debug.hxx>
 #include <rtl/logfile.hxx>
-
+#include <ucbhelper/content.hxx>
 
 using namespace com::sun::star::ucb;
 using namespace connectivity::file;
@@ -94,14 +93,14 @@ namespace
             INetURLObject aContentURL( _rFolderOrDoc );
             ::ucbhelper::Content aContent1;
             {
-                ::ucbhelper::Content aFolderOrDoc( _rFolderOrDoc, Reference< XCommandEnvironment >() );
+                ::ucbhelper::Content aFolderOrDoc( _rFolderOrDoc, Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
                 if ( aFolderOrDoc.isDocument() )
                     aContent1 = aFolderOrDoc;
                 else
                 {
                     aContentURL = INetURLObject( _rFolderOrDoc, INetURLObject::WAS_ENCODED );
                     aContentURL.Append( _rDocName );
-                    aContent1 = ::ucbhelper::Content( aContentURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >() );
+                    aContent1 = ::ucbhelper::Content( aContentURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
                 }
             }
 
@@ -125,7 +124,7 @@ namespace
             ::ucbhelper::Content aContent2;
             try
             {
-                aContent2 = ::ucbhelper::Content( aURL2.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >() );
+                aContent2 = ::ucbhelper::Content( aURL2.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
                 bCanAccess = aContent2.isDocument();
             }
             catch( const Exception& )
@@ -144,20 +143,13 @@ namespace
                     Reference< XContentIdentifier > xID1 = xContent1->getIdentifier();
                     Reference< XContentIdentifier > xID2 = xContent2->getIdentifier();
                     OSL_ENSURE( xID1.is() && xID2.is(), "isCaseSensitiveParentFolder: invalid ID interfaces!" );
-                    if ( xID1.is() && xID2.is() )
+                    if ( xID1.is() && xID2.is()
+                         && ( UniversalContentBroker::create(
+                                  comphelper::getProcessComponentContext() )->
+                              compareContentIds( xID1, xID2 ) == 0 ) )
                     {
-                        // get a generic content provider
-                        ::ucbhelper::ContentBroker* pBroker = ::ucbhelper::ContentBroker::get();
-                        Reference< XContentProvider > xProvider;
-                        if ( pBroker )
-                            xProvider = pBroker->getContentProviderInterface();
-                        OSL_ENSURE( xProvider.is(), "isCaseSensitiveParentFolder: invalid content broker!" );
-                        if ( xProvider.is() )
-                        {
-                            if ( 0 == xProvider->compareContentIds( xID1, xID2 ) )
-                                // finally, we know that the folder is not case-sensitive ....
-                                nIsCS = 0;
-                        }
+                        // finally, we know that the folder is not case-sensitive ....
+                        nIsCS = 0;
                     }
                 }
             }
diff --git a/connectivity/workben/testmoz/main.cxx b/connectivity/workben/testmoz/main.cxx
index 2faf516..10e9bc8 100644
--- a/connectivity/workben/testmoz/main.cxx
+++ b/connectivity/workben/testmoz/main.cxx
@@ -41,7 +41,6 @@
 #include <com/sun/star/uno/Any.hxx>
 
 #include "connectivity/sqlnode.hxx"
-#include <ucbhelper/contentbroker.hxx>
 #include <rtl/ustring.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <osl/process.h>
@@ -49,9 +48,8 @@
 #include <cppuhelper/bootstrap.hxx>
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/registry/XImplementationRegistration.hpp>
-#include <com/sun/star/ucb/XContentProviderManager.hpp>
+#include <com/sun/star/ucb/XUniversalContentBroker.hpp>
 
-#include <ucbhelper/content.hxx>
 #include <osl/module.h>
 
 #include <stdio.h>
@@ -76,7 +74,6 @@ using ::rtl::OUStringBuffer;
 using ::rtl::OUStringToOString;
 
 #define OUtoCStr( x ) (OUStringToOString ( (x), RTL_TEXTENCODING_ASCII_US ).getStr())
-Reference< XContentProviderManager > globalUcb;
 #define PRINTSTR(x) printf("%s",x);
 
 int autoTest(Reference<XResultSet> &xRes);
@@ -258,17 +255,13 @@ Reference< XMultiServiceFactory > InitializeFac( void )
 
 
 //  Create unconfigured Ucb:
-    Sequence< Any > aArgs;
-    ::ucb::ContentBroker::initialize( xSMgr, aArgs );
-    Reference< XContentProviderManager > xUcb =
-        ucb::ContentBroker::get()->getContentProviderManagerInterface();
+    Reference< XUniversalContentBroker > xUcb
+        ( xSMgr->createInstance( OUString("com.sun.star.ucb.UniversalContentBroker") ), UNO_QUERY_THROW );
 
     Reference< XContentProvider > xFileProvider
-        ( xSMgr->createInstance( OUString("com.sun.star.ucb.FileContentProvider") ), UNO_QUERY );
+        ( xSMgr->createInstance( OUString("com.sun.star.ucb.FileContentProvider") ), UNO_QUERY_THROW );
     xUcb->registerContentProvider( xFileProvider, OUString("file"), sal_True );
 
-
-    globalUcb = xUcb;
     return xSMgr;
 }
 
diff --git a/connectivity/workben/testmoz/mozthread.cxx b/connectivity/workben/testmoz/mozthread.cxx
index 00e369a..738582a 100644
--- a/connectivity/workben/testmoz/mozthread.cxx
+++ b/connectivity/workben/testmoz/mozthread.cxx
@@ -41,7 +41,6 @@
 #include <com/sun/star/uno/Any.hxx>
 
 #include "connectivity/sqlnode.hxx"
-#include <ucbhelper/contentbroker.hxx>
 #include <rtl/ustring.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <osl/process.h>
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 51f8319..1b7690a 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -138,7 +138,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL,
     try
     {
         ::com::sun::star::uno::Reference< XCommandEnvironment > xEnv;
-        Content aCnt( rStartURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv );
+        Content aCnt( rStartURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() );
         Sequence< OUString > aProps( 2 );
 
         aProps.getArray()[ 0 ] = OUString(RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ));
diff --git a/cui/source/dialogs/multifil.cxx b/cui/source/dialogs/multifil.cxx
index 3137db1..847fa84 100644
--- a/cui/source/dialogs/multifil.cxx
+++ b/cui/source/dialogs/multifil.cxx
@@ -26,6 +26,9 @@
  *
  ************************************************************************/
 
+#include "sal/config.h"
+
+#include <comphelper/processfactory.hxx>
 #include <tools/shl.hxx>
 #include <vcl/msgbox.hxx>
 #include <sfx2/filedlghelper.hxx>
@@ -40,8 +43,7 @@
 #include <cuires.hrc>
 
 // #97807# -------------
-#include <com/sun/star/ucb/XContentProvider.hpp>
-#include <ucbhelper/contentbroker.hxx>
+#include <com/sun/star/ucb/UniversalContentBroker.hpp>
 
 #include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
 
@@ -66,7 +68,7 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn )
         // #97807# URL content comparison of entries -----------
         INetURLObject aFile( aDlg.GetPath() );
         String sInsFile = aFile.getFSysPath( INetURLObject::FSYS_DETECT );
-        ::ucbhelper::Content aContent( aFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >() );
+        ::ucbhelper::Content aContent( aFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
         Reference< XContent > xContent = aContent.get();
         OSL_ENSURE( xContent.is(), "AddHdl_Impl: invalid content interface!" );
         Reference< XContentIdentifier > xID = xContent->getIdentifier();
@@ -90,7 +92,7 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn )
                     if( aCur == aFileContentMap.end() ) // look for File Content in aFileContentMap, but not find it.
                     {
                         INetURLObject aVFile( sVFile, INetURLObject::FSYS_DETECT );
-                        aFileContentMap[sVFile] = ::ucbhelper::Content( aVFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >() );
+                        aFileContentMap[sVFile] = ::ucbhelper::Content( aVFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
                         VContent = aFileContentMap.find( sVFile )->second;
                     }
                     else
@@ -99,21 +101,13 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn )
                     OSL_ENSURE( xVContent.is(), "AddHdl_Impl: invalid content interface!" );
                     xVID = xVContent->getIdentifier();
                     OSL_ENSURE( xVID.is(), "AddHdl_Impl: invalid ID interface!" );
-                    if ( xID.is() && xVID.is() )
+                    if ( xID.is() && xVID.is()
+                         && ( UniversalContentBroker::create(
+                                  comphelper::getProcessComponentContext() )->
+                              compareContentIds( xID, xVID ) == 0 ) )
                     {
-                        // get a generic content provider
-                        ::ucbhelper::ContentBroker* pBroker = ::ucbhelper::ContentBroker::get();
-                        Reference< XContentProvider > xProvider;
-                        if ( pBroker )
-                            xProvider = pBroker->getContentProviderInterface();
-                        if ( xProvider.is() )
-                        {
-                            if ( 0 == xProvider->compareContentIds( xID, xVID ) )
-                            {
-                                bDuplicated = sal_True;
-                                break;
-                            }
-                        }
+                        bDuplicated = sal_True;
+                        break;
                     }
                 }
             } // end of if the entries are more than zero.
diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx
index a672523..d8f68ff 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -30,7 +30,7 @@
 #include "doclinkdialog.hrc"
 
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-
+#include <comphelper/processfactory.hxx>
 #include <cuires.hrc>
 #include <svl/filenotation.hxx>
 #include <vcl/msgbox.hxx>
@@ -120,7 +120,7 @@ namespace svx
         sal_Bool bFileExists = sal_False;
         try
         {
-            ::ucbhelper::Content aFile(sURL, Reference< XCommandEnvironment >());
+            ::ucbhelper::Content aFile(sURL, Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext());
             if (aFile.isDocument())
                 bFileExists = sal_True;
         }
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index c1d6bfb..da379c2 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -44,7 +44,6 @@
 #include <sfx2/filedlghelper.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/string.hxx>
-#include <ucbhelper/contentbroker.hxx>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
 #include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp>
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index d26f97a..bf6e37d 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -174,7 +174,7 @@ sal_Bool KillFile_Impl( const String& rURL )
     sal_Bool bRet = sal_True;
     try
     {
-        Content aCnt( rURL, uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+        Content aCnt( rURL, uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
         aCnt.executeCommand( OUString("delete"), makeAny( sal_Bool( sal_True ) ) );
     }
     catch( ::com::sun::star::ucb::CommandAbortedException& )
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 63df72b..bb37110 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -319,7 +319,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const ::rtl::OUStrin
 
     try
     {
-        ::ucbhelper::Content aContent( _sURL, NULL );
+        ::ucbhelper::Content aContent( _sURL, NULL, comphelper::getProcessComponentContext() );
         if ( !aContent.isDocument() )
             throw InteractiveIOException(
                 _sURL, *this, InteractionClassification_ERROR, IOErrorCode_NO_FILE
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
index bd75907..c4826fe 100644
--- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
@@ -34,8 +34,8 @@
 #include <com/sun/star/util/XCloseable.hpp>
 #include <com/sun/star/frame/XComponentLoader.hpp>
 #include <com/sun/star/util/XModifiable.hpp>
+#include <com/sun/star/ucb/UniversalContentBroker.hpp>
 #include <com/sun/star/ucb/XContent.hpp>
-#include <com/sun/star/ucb/XContentProvider.hpp>
 
 #include <comphelper/namedvaluecollection.hxx>
 #include <cppuhelper/exc_hlp.hxx>
@@ -44,7 +44,6 @@
 #include <svl/filenotation.hxx>
 #include <tools/diagnose_ex.h>
 #include <ucbhelper/content.hxx>
-#include <ucbhelper/contentbroker.hxx>
 #include <vcl/msgbox.hxx>
 
 #include <list>
@@ -63,6 +62,7 @@ namespace dbmm
 
     /** === begin UNO using === **/
     using ::com::sun::star::uno::Reference;
+    using ::com::sun::star::uno::XComponentContext;
     using ::com::sun::star::uno::XInterface;
     using ::com::sun::star::uno::UNO_QUERY;
     using ::com::sun::star::uno::UNO_QUERY_THROW;
@@ -88,17 +88,17 @@ namespace dbmm
     using ::com::sun::star::lang::EventObject;
     using ::com::sun::star::frame::XComponentLoader;
     using ::com::sun::star::util::XModifiable;
+    using ::com::sun::star::ucb::UniversalContentBroker;
     using ::com::sun::star::ucb::XCommandEnvironment;
     using ::com::sun::star::ucb::XContent;
     using ::com::sun::star::ucb::XContentIdentifier;
-    using ::com::sun::star::ucb::XContentProvider;
     /** === end UNO using === **/
 
     //====================================================================
     //= helper
     //====================================================================
     //--------------------------------------------------------------------
-    static void lcl_getControllers_throw( const Reference< XModel2 >& _rxDocument,
+    static void lcl_getControllers_throw(const Reference< XModel2 >& _rxDocument,
         ::std::list< Reference< XController2 > >& _out_rControllers )
     {
         _out_rControllers.clear();
@@ -396,7 +396,9 @@ namespace dbmm
     //--------------------------------------------------------------------
     namespace
     {
-        bool    lcl_equalURLs_nothrow( const ::rtl::OUString& _lhs, const ::rtl::OUString _rhs )
+        bool    lcl_equalURLs_nothrow(
+            const Reference< XComponentContext >& context,
+            const ::rtl::OUString& _lhs, const ::rtl::OUString _rhs )
         {
             // the cheap situation: the URLs are equal
             if ( _lhs == _rhs )
@@ -405,18 +407,14 @@ namespace dbmm
             bool bEqual = true;
             try
             {
-                ::ucbhelper::Content aContentLHS = ::ucbhelper::Content( _lhs, Reference< XCommandEnvironment >() );
-                ::ucbhelper::Content aContentRHS = ::ucbhelper::Content( _rhs, Reference< XCommandEnvironment >() );
+                ::ucbhelper::Content aContentLHS = ::ucbhelper::Content( _lhs, Reference< XCommandEnvironment >(), context );
+                ::ucbhelper::Content aContentRHS = ::ucbhelper::Content( _rhs, Reference< XCommandEnvironment >(), context );
                 Reference< XContent > xContentLHS( aContentLHS.get(), UNO_SET_THROW );
                 Reference< XContent > xContentRHS( aContentRHS.get(), UNO_SET_THROW );
                 Reference< XContentIdentifier > xID1( xContentLHS->getIdentifier(), UNO_SET_THROW );
                 Reference< XContentIdentifier > xID2( xContentRHS->getIdentifier(), UNO_SET_THROW );
 
-                ::ucbhelper::ContentBroker* pBroker = ::ucbhelper::ContentBroker::get();
-                Reference< XContentProvider > xProvider(
-                    pBroker ? pBroker->getContentProviderInterface() : Reference< XContentProvider >(), UNO_SET_THROW );
-
-                bEqual = ( 0 == xProvider->compareContentIds( xID1, xID2 ) );
+                bEqual = UniversalContentBroker::create(context)->compareContentIds( xID1, xID2 ) == 0;
             }
             catch( const Exception& )
             {
@@ -440,7 +438,7 @@ namespace dbmm
         try
         {
             // check that the backup location isn't the same as the document itself
-            if ( lcl_equalURLs_nothrow( sBackupLocation, m_pData->xDocumentModel->getURL() ) )
+            if ( lcl_equalURLs_nothrow( m_pData->aContext.getUNOContext(), sBackupLocation, m_pData->xDocumentModel->getURL() ) )
             {
                 ErrorBox aErrorBox( const_cast< MacroMigrationDialog* >( this ), MacroMigrationResId( ERR_INVALID_BACKUP_LOCATION ) );
                 aErrorBox.Execute();
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx
index f3ebf33..bad3711 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -67,7 +67,6 @@
 #include <tools/diagnose_ex.h>
 #include <ucbhelper/commandenvironment.hxx>
 #include <ucbhelper/content.hxx>
-#include <ucbhelper/contentbroker.hxx>
 #include <vcl/msgbox.hxx>
 #include <vcl/svapp.hxx>
 
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 4bf7ce2..26b32f2 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -530,7 +530,7 @@ DBG_NAME(OConnectionHelper)
         Reference< XCommandEnvironment > xCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() );
         try
         {
-            aCheckExistence = ::ucbhelper::Content(_rURL, xCmdEnv );
+            aCheckExistence = ::ucbhelper::Content(_rURL, xCmdEnv, comphelper::getProcessComponentContext());
             bExists = bIsFile? aCheckExistence.isDocument(): aCheckExistence.isFolder();
             eExists = bExists? PATH_EXIST: PATH_NOT_EXIST;
         }
@@ -596,7 +596,7 @@ DBG_NAME(OConnectionHelper)
         {
             // the parent content
             Reference< XCommandEnvironment > xEmptyEnv;
-            ::ucbhelper::Content aParent(aParser.GetMainURL(INetURLObject::NO_DECODE), xEmptyEnv);
+            ::ucbhelper::Content aParent(aParser.GetMainURL(INetURLObject::NO_DECODE), xEmptyEnv, comphelper::getProcessComponentContext());
 
             ::rtl::OUString sContentType;
             if ( INET_PROT_FILE == eProtocol )
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 9dd9916..8e5dce8 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "dbfindex.hxx"
+#include <comphelper/processfactory.hxx>
 #include <tools/config.hxx>
 #include <sfx2/app.hxx>
 #include "moduledbu.hxx"
@@ -298,7 +299,7 @@ void ODbaseIndexDialog::Init()
     sal_Bool bFolder=sal_True;
     try
     {
-        aFile = ::ucbhelper::Content(m_aDSN,Reference< ::com::sun::star::ucb::XCommandEnvironment >());
+        aFile = ::ucbhelper::Content(m_aDSN,Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext());
         bFolder = aFile.isFolder();
     }
     catch(Exception&)
@@ -489,7 +490,7 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const
     {
         try
         {
-            ::ucbhelper::Content aContent(aURL.GetURLNoPass(),Reference<XCommandEnvironment>());
+            ::ucbhelper::Content aContent(aURL.GetURLNoPass(),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
             aContent.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")),makeAny( sal_Bool( sal_True ) ) );
         }
         catch (const Exception& e )
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 6f61a4b..578e6e0 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -68,6 +68,7 @@
 #include "dlgattr.hrc"
 #include "TypeInfo.hxx"
 #include "FieldDescriptions.hxx"
+#include <comphelper/processfactory.hxx>
 #include <comphelper/stl_types.hxx>
 #include <comphelper/componentcontext.hxx>
 
@@ -1228,7 +1229,8 @@ namespace
         try
         {
             ::ucbhelper::Content aCnt( INetURLObject( _rURL ).GetMainURL( INetURLObject::NO_DECODE ),
-                                 Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+                                 Reference< ::com::sun::star::ucb::XCommandEnvironment >(),
+                                 comphelper::getProcessComponentContext() );
             if ( ( aCnt.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorName")) ) >>= sAnchor ) )
             {
 
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 7208345..1781d66 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -94,7 +94,6 @@
 #include <sfx2/app.hxx>
 #include <svl/itemset.hxx>
 #include <svl/eitem.hxx>
-#include <ucbhelper/contentbroker.hxx>
 
 #include <svtools/fontsubstconfig.hxx>
 #include <svtools/accessibilityoptions.hxx>
@@ -1769,10 +1768,6 @@ int Desktop::doShutdown()
     pExecGlobals->pPathOptions.reset( 0 );
     RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- dispose path/language options" );
 
-    RTL_LOGFILE_CONTEXT_TRACE( aLog, "-> deinit ucb" );
-    ::ucbhelper::ContentBroker::deinitialize();
-    RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- deinit ucb" );
-
     sal_Bool bRR = pExecGlobals->bRestartRequested;
     delete pExecGlobals, pExecGlobals = NULL;
 
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 4b33cb2..64a8829 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -42,18 +42,16 @@
 
 
 #include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/ucb/XContentProviderManager.hpp>
-#include <com/sun/star/ucb/XContentProviderFactory.hpp>
+#include <com/sun/star/ucb/UniversalContentBroker.hpp>
+#include <com/sun/star/ucb/XUniversalContentBroker.hpp>
 #include <uno/current_context.hxx>
 #include <cppuhelper/servicefactory.hxx>
 #include <cppuhelper/bootstrap.hxx>
 #include <osl/file.hxx>
 #include <osl/module.h>
-#include <osl/security.hxx>
 #include <rtl/uri.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <rtl/bootstrap.hxx>
-#include <ucbhelper/configurationkeys.hxx>
 
 #include <tools/rcid.h>
 
@@ -63,7 +61,6 @@
 #include <unotools/localfilehelper.hxx>
 #include <unotools/ucbhelper.hxx>
 #include <unotools/tempfile.hxx>
-#include <ucbhelper/contentbroker.hxx>
 #include <vcl/svapp.hxx>
 #include <unotools/startoptions.hxx>
 #include <unotools/pathoptions.hxx>
@@ -84,83 +81,34 @@ namespace desktop
 
 // -----------------------------------------------------------------------------
 
-static bool configureUcb()
+static void configureUcb()
 {
     RTL_LOGFILE_CONTEXT( aLog, "desktop (sb93797) ::configureUcb" );
-    Reference< XMultiServiceFactory >
-        xServiceFactory( comphelper::getProcessServiceFactory() );
-    if (!xServiceFactory.is())
-    {
-        OSL_FAIL("configureUcb(): No XMultiServiceFactory");
-        return false;
-    }
-
-    rtl::OUString aPipe;
-    osl::Security().getUserIdent(aPipe);
-
-    rtl::OUStringBuffer aPortal;
 
-    Sequence< Any > aArgs(2);
-    aArgs[0]
-        <<= rtl::OUString(UCB_CONFIGURATION_KEY1_LOCAL);
-    aArgs[1]
-        <<= rtl::OUString(UCB_CONFIGURATION_KEY2_OFFICE);
-
-    bool ret =
-        ::ucbhelper::ContentBroker::initialize( xServiceFactory, aArgs ) != false;
+    // For backwards compatibility, in case some code still uses plain
+    // createInstance w/o args directly to obtain an instance:
+    UniversalContentBroker::create(comphelper::getProcessComponentContext());
 
 #ifdef GNOME_VFS_ENABLED
-    // register GnomeUCP if necessary
-    ::ucbhelper::ContentBroker* cb = ::ucbhelper::ContentBroker::get();
-    if(cb)
+    // Instantiate GNOME-VFS UCP in the thread that initialized GNOME in order
+    // to avoid a deadlock that may occure in case the UCP gets initialized from
+    // a different thread (which may happen when calling remotely via UNO); this
+    // is not a fix, just a workaround:
+    Reference< XCurrentContext > xCurrentContext(getCurrentContext());
+    Any aValue(xCurrentContext->getValueByName("system.desktop-environment"));
+    OUString aDesktopEnvironment;
+    if ((aValue >>= aDesktopEnvironment) && aDesktopEnvironment == "GNOME")
     {
-        try
-        {
-            Reference< XCurrentContext > xCurrentContext(
-                getCurrentContext());
-            if (xCurrentContext.is())
-            {
-                Any aValue = xCurrentContext->getValueByName(
-                    rtl::OUString( "system.desktop-environment"  )
-                );
-                rtl::OUString aDesktopEnvironment;
-                if ( (aValue >>= aDesktopEnvironment) && aDesktopEnvironment == "GNOME" )
-                {
-                    Reference<XContentProviderManager> xCPM =
-                        cb->getContentProviderManagerInterface();
-
-
-            //Instanciate GNOME-VFS-UCP in the thread that initialized
-             // GNOME in order to avoid a deadlock that may occure in case UCP gets initialized from
-            // a different thread. The latter may happen when calling the Office remotely via UNO.
-            // THIS IS NOT A FIX, JUST A WORKAROUND!
-
-                    try
-                    {
-                        Reference<XContentProvider> xCP(
-                            xServiceFactory->createInstance(
-                                rtl::OUString(
-                                    "com.sun.star.ucb.GnomeVFSContentProvider")),
-                            UNO_QUERY);
-                        if(xCP.is())
-                            xCPM->registerContentProvider(
-                                xCP,
-                                rtl::OUString(".*"),
-                                false);
-                    }
-                    catch (...)
-                    {
-                    }
-                }
-            }
-        }
-        catch (const RuntimeException &)
-        {
-        }
+        UniversalContentBroker::create(
+            comphelper::getProcessComponentContext())->
+            registerContentProvider(
+                Reference<XContentProvider>(
+                    comphelper::getProcessServiceFactory()->createInstance(
+                        "com.sun.star.ucb.GnomeVFSContentProvider"),
+                    UNO_QUERY_THROW),
+                ".*", false);
     }
 #endif // GNOME_VFS_ENABLED
-
-    return ret;
 }
 
 Reference< XMultiServiceFactory > Desktop::CreateApplicationServiceManager()
@@ -228,11 +176,7 @@ void Desktop::RegisterServices()
             createAcceptor(*i);
         }
 
-        if ( !configureUcb() )
-        {
-            OSL_FAIL( "Can't configure UCB" );
-            throw com::sun::star::uno::Exception(rtl::OUString("RegisterServices, configureUcb"), NULL);
-        }
+        configureUcb();
 
         CreateTemporaryDirectory();
         m_bServicesRegistered = true;
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 7795e30..323778d 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -875,7 +875,7 @@ void ExtensionCmdQueue::Thread::_addExtension( ::rtl::Reference< ProgressCmdEnv
     uno::Any anyTitle;
     try
     {
-        anyTitle = ::ucbhelper::Content( rPackageURL, rCmdEnv.get() ).getPropertyValue( OUSTR("Title") );
+        anyTitle = ::ucbhelper::Content( rPackageURL, rCmdEnv.get(), m_xContext ).getPropertyValue( OUSTR("Title") );
     }
     catch ( const uno::Exception & )
     {
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index b3c21b4..de78275 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -112,12 +112,12 @@ OUString CompIdentifiers::getName(::std::vector<Reference<deploy::XPackage> > co
     return extension->getDisplayName();
 }
 
-void writeLastModified(OUString & url, Reference<ucb::XCommandEnvironment> const & xCmdEnv)
+void writeLastModified(OUString & url, Reference<ucb::XCommandEnvironment> const & xCmdEnv, Reference< uno::XComponentContext > const & xContext)
 {
     //Write the lastmodified file
     try {
         ::rtl::Bootstrap::expandMacros(url);
-        ::ucbhelper::Content ucbStamp(url, xCmdEnv );
+        ::ucbhelper::Content ucbStamp(url, xCmdEnv, xContext);
         dp_misc::erase_path( url, xCmdEnv );
         ::rtl::OString stamp("1" );
         Reference<css::io::XInputStream> xData(
@@ -589,7 +589,7 @@ bool ExtensionManager::doChecksForAddExtension(
         }
         //Prevent showing the license if requested.
         Reference<ucb::XCommandEnvironment> _xCmdEnv(xCmdEnv);
-        ExtensionProperties props(OUString(), properties, Reference<ucb::XCommandEnvironment>());
+        ExtensionProperties props(OUString(), properties, Reference<ucb::XCommandEnvironment>(), m_xContext);
 
         dp_misc::DescriptionInfoset info(dp_misc::getDescriptionInfoset(xTmpExtension->getURL()));
         const ::boost::optional<dp_misc::SimpleLicenseAttributes> licenseAttributes =
@@ -1315,10 +1315,10 @@ sal_Bool ExtensionManager::synchronize(
         }
         OUString lastSyncBundled(RTL_CONSTASCII_USTRINGPARAM(
                                      "$BUNDLED_EXTENSIONS_USER/lastsynchronized"));
-        writeLastModified(lastSyncBundled, xCmdEnv);
+        writeLastModified(lastSyncBundled, xCmdEnv, m_xContext);
         OUString lastSyncShared(RTL_CONSTASCII_USTRINGPARAM(
                                     "$SHARED_EXTENSIONS_USER/lastsynchronized"));
-        writeLastModified(lastSyncShared, xCmdEnv);
+        writeLastModified(lastSyncShared, xCmdEnv, m_xContext);
         return bModified;
     } catch ( const deploy::DeploymentException& ) {
         throw;
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index 14f5bfa..c0c7498 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -163,7 +163,7 @@ PackageInformationProvider::getPackageLocation( const rtl::OUString& _sExtension
     }
     if ( !aLocationURL.isEmpty() )
     {
-        ::ucbhelper::Content aContent( aLocationURL, NULL );
+        ::ucbhelper::Content aContent( aLocationURL, NULL, mxContext );
         aLocationURL = aContent.getURL();
     }
     return aLocationURL;
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index c07109b..ae34f2e 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -101,9 +101,10 @@ struct MatchTempDir
 
 namespace {
 OUString getExtensionFolder(OUString const &  parentFolder,
-                            Reference<ucb::XCommandEnvironment> const & xCmdEnv)
+                            Reference<ucb::XCommandEnvironment> const & xCmdEnv,
+                            Reference<uno::XComponentContext> const & xContext)
 {
-    ::ucbhelper::Content tempFolder( parentFolder, xCmdEnv );
+    ::ucbhelper::Content tempFolder( parentFolder, xCmdEnv, xContext );
     Reference<sdbc::XResultSet> xResultSet(
                 StrTitle::createCursor (tempFolder, ::ucbhelper::INCLUDE_FOLDERS_ONLY ) );
 
@@ -147,7 +148,7 @@ void PackageManagerImpl::initActivationLayer(
                 ::ucbhelper::Content sourceContent(
                     Reference<XContentAccess>(
                         xResultSet, UNO_QUERY_THROW )->queryContent(),
-                    xCmdEnv );
+                    xCmdEnv, m_xComponentContext );
 
                 OUString mediaType( detectMediaType( sourceContent,
                                                      false /* no throw */) );
@@ -193,7 +194,7 @@ void PackageManagerImpl::initActivationLayer(
             // clean up activation layer, scan for zombie temp dirs:
             ActivePackages::Entries id2temp( m_activePackagesDB->getEntries() );
 
-            ::ucbhelper::Content tempFolder( m_activePackages_expanded, xCmdEnv );
+            ::ucbhelper::Content tempFolder( m_activePackages_expanded, xCmdEnv, m_xComponentContext );
             Reference<sdbc::XResultSet> xResultSet(
                 StrTitle::createCursor (tempFolder,
                                          ::ucbhelper::INCLUDE_DOCUMENTS_ONLY ) );
@@ -265,7 +266,7 @@ void PackageManagerImpl::initActivationLayer(
                             ::osl::Security aSecurity;
                             aSecurity.getUserName( aUserName );
                             ucbhelper::Content remFileContent(
-                                url + OUSTR("removed"), Reference<XCommandEnvironment>());
+                                url + OUSTR("removed"), Reference<XCommandEnvironment>(), m_xComponentContext);
                             ::rtl::ByteSequence data = dp_misc::readFile(remFileContent);
                             ::rtl::OString osData(reinterpret_cast<const sal_Char*>(data.getConstArray()),
                                                   data.getLength());
@@ -646,7 +647,7 @@ OUString PackageManagerImpl::insertToActivationLayer(
         }
         buf.append( static_cast<sal_Unicode>('/') );
         sourceContent = ::ucbhelper::Content(
-            buf.makeStringAndClear(), xCmdEnv );
+            buf.makeStringAndClear(), xCmdEnv, m_xComponentContext );
     }
     if (! destFolderContent.transferContent(
             sourceContent, ::ucbhelper::InsertOperation_COPY,
@@ -667,7 +668,7 @@ OUString PackageManagerImpl::insertToActivationLayer(
     dbData->version = info.getVersion();
 
     //No write the properties file next to the extension
-    ExtensionProperties props(sFolderUrl, properties, xCmdEnv);
+    ExtensionProperties props(sFolderUrl, properties, xCmdEnv, m_xComponentContext);
     props.write();
     return destFolder;
 }
@@ -773,7 +774,7 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
                     OUSTR("UCB transferContent() failed!"), 0 );
             // set media-type:
             ::ucbhelper::Content docContent(
-                makeURL( m_context, title_enc ), xCmdEnv );
+                makeURL( m_context, title_enc ), xCmdEnv, m_xComponentContext );
                 //TODO #i73136#: using title instead of id can lead to
                 // clashes, but the whole m_activePackages.getLength()==0
                 // case (i.e., document-relative deployment) currently does
@@ -915,7 +916,7 @@ void PackageManagerImpl::removePackage(
                 OSL_ASSERT(!val.temporaryName.isEmpty());
                 OUString url(makeURL(m_activePackages_expanded,
                                      val.temporaryName + OUSTR("removed")));
-                ::ucbhelper::Content contentRemoved(url, xCmdEnv );
+                ::ucbhelper::Content contentRemoved(url, xCmdEnv, m_xComponentContext);
                 OUString aUserName;
                 ::osl::Security aSecurity;
                 aSecurity.getUserName( aUserName );
@@ -1332,7 +1333,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
             NULL, m_activePackages_expanded, Reference<css::ucb::XCommandEnvironment>(), false))
         return bModified;
 
-    ::ucbhelper::Content tempFolder( m_activePackages_expanded, xCmdEnv );
+    ::ucbhelper::Content tempFolder( m_activePackages_expanded, xCmdEnv, m_xComponentContext );
     Reference<sdbc::XResultSet> xResultSet(
         StrTitle::createCursor( tempFolder,
                                 ::ucbhelper::INCLUDE_FOLDERS_ONLY ) );
@@ -1381,7 +1382,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
                         continue;
                     sExtFolder = getExtensionFolder(
                         m_activePackages_expanded +
-                        OUString(OUSTR("/")) + titleEncoded + OUSTR("_"), xCmdEnv);
+                        OUString(OUSTR("/")) + titleEncoded + OUSTR("_"), xCmdEnv, m_xComponentContext);
                     url = makeURLAppendSysPathSegment(m_activePackages_expanded, title);
                     url = makeURLAppendSysPathSegment(url, sExtFolder);
                 }
@@ -1416,7 +1417,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
                         dp_misc::getDescriptionInfoset(url);
                     ::boost::optional<dp_misc::SimpleLicenseAttributes>
                           attr = info.getSimpleLicenseAttributes();
-                    ExtensionProperties props(url,xCmdEnv);
+                    ExtensionProperties props(url, xCmdEnv, m_xComponentContext);
                     bool bNoLicense = false;
                     if (attr && attr->suppressIfRequired && props.isSuppressedLicense())
                         bNoLicense = true;
diff --git a/desktop/source/deployment/manager/dp_properties.cxx b/desktop/source/deployment/manager/dp_properties.cxx
index 4f11eea..aa1b4c5 100644
--- a/desktop/source/deployment/manager/dp_properties.cxx
+++ b/desktop/source/deployment/manager/dp_properties.cxx
@@ -55,8 +55,9 @@ namespace dp_manager {
 //Reading the file
 ExtensionProperties::ExtensionProperties(
     OUString const & urlExtension,
-    Reference<ucb::XCommandEnvironment> const & xCmdEnv) :
-    m_xCmdEnv(xCmdEnv)
+    Reference<ucb::XCommandEnvironment> const & xCmdEnv,
+    Reference<uno::XComponentContext> const & xContext) :
+    m_xCmdEnv(xCmdEnv), m_xContext(xContext)
 {
     m_propFileUrl = urlExtension + OUSTR("properties");
 
@@ -64,7 +65,7 @@ ExtensionProperties::ExtensionProperties(
     if (! dp_misc::create_ucb_content(NULL, m_propFileUrl, 0, false))
         return;
 
-    ::ucbhelper::Content contentProps(m_propFileUrl, m_xCmdEnv);
+    ::ucbhelper::Content contentProps(m_propFileUrl, m_xCmdEnv, m_xContext);
     dp_misc::readProperties(props, contentProps);
 
     typedef ::std::list< ::std::pair< OUString, OUString> >::const_iterator CI;
@@ -79,8 +80,9 @@ ExtensionProperties::ExtensionProperties(
 ExtensionProperties::ExtensionProperties(
     OUString const & urlExtension,
     uno::Sequence<css::beans::NamedValue> const & properties,
-    Reference<ucb::XCommandEnvironment> const & xCmdEnv) :
-    m_xCmdEnv(xCmdEnv)
+    Reference<ucb::XCommandEnvironment> const & xCmdEnv,
+    Reference<uno::XComponentContext> const & xContext) :
+    m_xCmdEnv(xCmdEnv), m_xContext(xContext)
 {
     m_propFileUrl = urlExtension + OUSTR("properties");
 
@@ -120,7 +122,7 @@ OUString ExtensionProperties::getPropertyValue(css::beans::NamedValue const & v)
 }
 void ExtensionProperties::write()
 {
-    ::ucbhelper::Content contentProps(m_propFileUrl, m_xCmdEnv);
+    ::ucbhelper::Content contentProps(m_propFileUrl, m_xCmdEnv, m_xContext);
     ::rtl::OUStringBuffer buf;
 
     if (m_prop_suppress_license)
diff --git a/desktop/source/deployment/manager/dp_properties.hxx b/desktop/source/deployment/manager/dp_properties.hxx
index 3e85adf..25a0594 100644
--- a/desktop/source/deployment/manager/dp_properties.hxx
+++ b/desktop/source/deployment/manager/dp_properties.hxx
@@ -41,6 +41,7 @@ class ExtensionProperties
 protected:
     ::rtl::OUString m_propFileUrl;
     const css::uno::Reference<css::ucb::XCommandEnvironment> m_xCmdEnv;
+    const css::uno::Reference<css::uno::XComponentContext> m_xContext;
     ::boost::optional< ::rtl::OUString> m_prop_suppress_license;
     ::boost::optional< ::rtl::OUString> m_prop_extension_update;
 
@@ -49,11 +50,13 @@ public:
 
     virtual ~ExtensionProperties() {};
     ExtensionProperties(::rtl::OUString const & urlExtension,
-                        css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv);
+                        css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv,
+                        css::uno::Reference<css::uno::XComponentContext> const & xContext);
 
     ExtensionProperties(::rtl::OUString const & urlExtension,
                         css::uno::Sequence<css::beans::NamedValue> const & properties,
-                        css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv);
+                        css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv,
+                        css::uno::Reference<css::uno::XComponentContext> const & xContext);
 
     void write();
 
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index c63744b..48054bd 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -201,7 +201,7 @@ ExtensionDescription::ExtensionDescription(
         Reference<css::ucb::XCommandEnvironment> xFilter =
             static_cast<css::ucb::XCommandEnvironment*>(
                 new FileDoesNotExistFilter(xCmdEnv));
-        ::ucbhelper::Content descContent(sDescriptionUri, xFilter);
+        ::ucbhelper::Content descContent(sDescriptionUri, xFilter, xContext);
 
         //throws an com::sun::star::uno::Exception if the file is not available
         Reference<css::io::XInputStream> xIn;
diff --git a/desktop/source/deployment/misc/dp_ucb.cxx b/desktop/source/deployment/misc/dp_ucb.cxx
index 9ec87c0..f8ca159 100644
--- a/desktop/source/deployment/misc/dp_ucb.cxx
+++ b/desktop/source/deployment/misc/dp_ucb.cxx
@@ -38,7 +38,7 @@
 #include "com/sun/star/ucb/CommandFailedException.hpp"
 #include "com/sun/star/ucb/ContentInfo.hpp"
 #include "com/sun/star/ucb/ContentInfoAttribute.hpp"
-
+#include "comphelper/processfactory.hxx"
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -63,7 +63,8 @@ bool create_ucb_content(
         //          raise no such file dialogs, else no interaction for
         //          passwords, ...? xxx todo
         ::ucbhelper::Content ucbContent(
-            url, Reference<XCommandEnvironment>() );
+            url, Reference<XCommandEnvironment>(),
+            comphelper::getProcessComponentContext() );
 
         ucbContent.isFolder();
 
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index 1243087..52bc86b 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -448,7 +448,7 @@ void BackendImpl::initServiceRdbFiles()
 {
     const Reference<XCommandEnvironment> xCmdEnv;
 
-    ::ucbhelper::Content cacheDir( getCachePath(), xCmdEnv );
+    ::ucbhelper::Content cacheDir( getCachePath(), xCmdEnv, m_xComponentContext );
     ::ucbhelper::Content oldRDB;
     // switch common rdb:
     if (!m_commonRDB_orig.isEmpty())
@@ -697,7 +697,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
             OUString name;
             if (!bRemoved)
             {
-                ::ucbhelper::Content ucbContent( url, xCmdEnv );
+                ::ucbhelper::Content ucbContent( url, xCmdEnv, m_xComponentContext );
                 name = StrTitle::getTitle( ucbContent );
             }
 
@@ -1004,7 +1004,7 @@ void BackendImpl::unorc_flush( Reference<XCommandEnvironment> const & xCmdEnv )
                         buf2.getLength() ) ) );
             ::ucbhelper::Content ucb_content(
                 makeURL( getCachePath(), getPlatformString() + OUSTR("rc") ),
-                xCmdEnv );
+                xCmdEnv, m_xComponentContext );
             ucb_content.writeStream( xData, true /* replace existing */ );
         }
         for (t_stringlist::iterator i(m_components.begin());
@@ -1035,7 +1035,7 @@ void BackendImpl::unorc_flush( Reference<XCommandEnvironment> const & xCmdEnv )
                 reinterpret_cast<sal_Int8 const *>(buf.getStr()),
                 buf.getLength() ) ) );
     ::ucbhelper::Content ucb_content(
-        makeURL( getCachePath(), OUSTR("unorc") ), xCmdEnv );
+        makeURL( getCachePath(), OUSTR("unorc") ), xCmdEnv, m_xComponentContext );
     ucb_content.writeStream( xData, true /* replace existing */ );
 
     m_unorc_modified = false;
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index b0fb425..c1019ba 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -349,11 +349,11 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
             OUString name;
             if (!bRemoved)
             {
-                ::ucbhelper::Content ucbContent( url, xCmdEnv );
+                ::ucbhelper::Content ucbContent( url, xCmdEnv, m_xComponentContext );
                 name = StrTitle::getTitle( ucbContent );
             }
 
-            ::ucbhelper::Content ucbContent( url, xCmdEnv );
+            ::ucbhelper::Content ucbContent( url, xCmdEnv, m_xComponentContext );
             if (subType.EqualsIgnoreCaseAscii(
                     "vnd.sun.star.configuration-data"))
             {
@@ -483,7 +483,7 @@ void BackendImpl::configmgrini_flush(
                 reinterpret_cast<sal_Int8 const *>(buf.getStr()),
                 buf.getLength() ) ) );
     ::ucbhelper::Content ucb_content(
-        makeURL( getCachePath(), OUSTR("configmgr.ini") ), xCmdEnv );
+        makeURL( getCachePath(), OUSTR("configmgr.ini") ), xCmdEnv, m_xComponentContext );
     ucb_content.writeStream( xData, true /* replace existing */ );
 
     m_configmgrini_modified = false;
@@ -616,10 +616,10 @@ OUString encodeForXml( OUString const & text )
 
 //______________________________________________________________________________
 OUString replaceOrigin(
-    OUString const & url, OUString const & destFolder, Reference< XCommandEnvironment > const & xCmdEnv, bool & out_replaced)
+    OUString const & url, OUString const & destFolder, Reference< XCommandEnvironment > const & xCmdEnv, Reference< XComponentContext > const & xContext, bool & out_replaced)
 {
     // looking for %origin%:
-    ::ucbhelper::Content ucb_content( url, xCmdEnv );
+    ::ucbhelper::Content ucb_content( url, xCmdEnv, xContext );
     ::rtl::ByteSequence bytes( readFile( ucb_content ) );
     ::rtl::ByteSequence filtered( bytes.getLength() * 2,
                                   ::rtl::BYTESEQ_NODEFAULT );
@@ -694,7 +694,7 @@ OUString replaceOrigin(
         newUrl = destFolder + url.copy(i);
     }
 
-    ucbhelper::Content(newUrl, xCmdEnv).writeStream(
+    ucbhelper::Content(newUrl, xCmdEnv, xContext).writeStream(
         xmlscript::createInputStream(filtered), true);
     out_replaced = true;
     return newUrl;
@@ -726,7 +726,7 @@ void BackendImpl::PackageImpl::processPackage_(
             {
                 const OUString sModFolder = that->createFolder(OUString(), xCmdEnv);
                 bool out_replaced = false;
-                url = replaceOrigin(url, sModFolder, xCmdEnv, out_replaced);
+                url = replaceOrigin(url, sModFolder, xCmdEnv, that->getComponentContext(), out_replaced);
                 if (out_replaced)
                     data.dataUrl = sModFolder;
                 else
@@ -783,7 +783,7 @@ void BackendImpl::PackageImpl::processPackage_(
                        const OUString sModFolder = that->createFolder(OUString(), xCmdEnv);
                        bool out_replaced = false;
                        url_replaced = replaceOrigin(
-                           url2, sModFolder, xCmdEnv, out_replaced);
+                           url2, sModFolder, xCmdEnv, that->getComponentContext(), out_replaced);
                        if (out_replaced)
                            data.dataUrl = sModFolder;
                        else
@@ -799,7 +799,7 @@ void BackendImpl::PackageImpl::processPackage_(
             {
                 ::ucbhelper::Content(
                     makeURL( that->getCachePath(), OUSTR("registry") ),
-                    xCmdEnv ).executeCommand(
+                    xCmdEnv, that->getComponentContext() ).executeCommand(
                         OUSTR("delete"), Any( true /* delete physically */ ) );
             }
             catch(const Exception&)
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index a3979bc..023430c 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -270,7 +270,7 @@ void PackageRegistryBackend::deleteUnusedFolders(
     {
         const OUString sDataFolder = makeURL(getCachePath(), relUrl);
         ::ucbhelper::Content tempFolder(
-            sDataFolder, Reference<ucb::XCommandEnvironment>());
+            sDataFolder, Reference<ucb::XCommandEnvironment>(), m_xComponentContext);
 
         Reference<sdbc::XResultSet> xResultSet(
                  StrTitle::createCursor( tempFolder, ::ucbhelper::INCLUDE_FOLDERS_ONLY ) );
@@ -578,8 +578,8 @@ void Package::exportTo(
     if (m_bRemoved)
         throw deployment::ExtensionRemovedException();
 
-    ::ucbhelper::Content destFolder( destFolderURL, xCmdEnv );
-    ::ucbhelper::Content sourceContent( getURL(), xCmdEnv );
+    ::ucbhelper::Content destFolder( destFolderURL, xCmdEnv, getMyBackend()->getComponentContext() );
+    ::ucbhelper::Content sourceContent( getURL(), xCmdEnv, getMyBackend()->getComponentContext() );
     if (! destFolder.transferContent(
             sourceContent, ::ucbhelper::InsertOperation_COPY,
             newTitle, nameClashAction ))
diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx
index 4616c2a..4c11050 100644
--- a/desktop/source/deployment/registry/dp_backenddb.cxx
+++ b/desktop/source/deployment/registry/dp_backenddb.cxx
@@ -70,7 +70,7 @@ void BackendDb::save()
 
     const Reference<css::io::XInputStream> xData(
         ::xmlscript::createInputStream(bytes));
-    ::ucbhelper::Content ucbDb(m_urlDb, 0);
+    ::ucbhelper::Content ucbDb(m_urlDb, 0, m_xContext);
     ucbDb.writeStream(xData, true /*replace existing*/);
 }
 
@@ -86,7 +86,8 @@ css::uno::Reference<css::xml::dom::XDocument> BackendDb::getDocument()
         if (err == ::osl::File::E_None)
         {
             ::ucbhelper::Content descContent(
-                m_urlDb, css::uno::Reference<css::ucb::XCommandEnvironment>());
+                m_urlDb, css::uno::Reference<css::ucb::XCommandEnvironment>(),
+                m_xContext);
             Reference<css::io::XInputStream> xIn = descContent.openStream();
             m_doc = xDocBuilder->parse(xIn);
         }
diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx
index 17c056d..f800653 100644
--- a/desktop/source/deployment/registry/executable/dp_executable.cxx
+++ b/desktop/source/deployment/registry/executable/dp_executable.cxx
@@ -187,7 +187,8 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
             OUString name;
             if (!bRemoved)
             {
-                ::ucbhelper::Content ucbContent( url, xCmdEnv );
+                ::ucbhelper::Content ucbContent(
+                    url, xCmdEnv, getComponentContext() );
                 name = StrTitle::getTitle( ucbContent );
             }
             if (subType.EqualsIgnoreCaseAscii("vnd.sun.star.executable"))
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index ba3b785..b094d20 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -203,7 +203,8 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
             OUString name;
             if (!bRemoved)
             {
-                ::ucbhelper::Content ucbContent( url, xCmdEnv );
+                ::ucbhelper::Content ucbContent(
+                    url, xCmdEnv, getComponentContext() );
                 name = StrTitle::getTitle( ucbContent );
             }
 
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index ea4e345..cd1fd30 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -437,7 +437,8 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
             OUString name;
             if (!bRemoved)
             {
-                ::ucbhelper::Content ucbContent( url, xCmdEnv );
+                ::ucbhelper::Content ucbContent(
+                    url, xCmdEnv, getComponentContext() );
                 name = StrTitle::getTitle( ucbContent );
             }
             if (subType.EqualsIgnoreCaseAscii("vnd.sun.star.package-bundle")) {
@@ -589,7 +590,8 @@ OUString BackendImpl::PackageImpl::getTextFromURL(
 {
     try
     {
-        ::ucbhelper::Content descContent(licenseUrl, xCmdEnv);
+        ::ucbhelper::Content descContent(
+            licenseUrl, xCmdEnv, getMyBackend()->getComponentContext());
         ::rtl::ByteSequence seq = dp_misc::readFile(descContent);
         return OUString( reinterpret_cast<sal_Char const *>(
             seq.getConstArray()), seq.getLength(), RTL_TEXTENCODING_UTF8);
@@ -1047,7 +1049,8 @@ void BackendImpl::PackageImpl::exportTo(
     if (m_bRemoved)
         throw deployment::ExtensionRemovedException();
 
-    ::ucbhelper::Content sourceContent( m_url_expanded, xCmdEnv );
+    ::ucbhelper::Content sourceContent(
+        m_url_expanded, xCmdEnv, getMyBackend()->getComponentContext() );
     OUString title(newTitle);
     if (title.isEmpty())
         sourceContent.getPropertyValue( OUSTR( "Title" ) ) >>= title;
@@ -1089,7 +1092,8 @@ void BackendImpl::PackageImpl::exportTo(
     buf.append( static_cast<sal_Unicode>('/') );
     OUString destFolder( buf.makeStringAndClear() );
 
-    ::ucbhelper::Content destFolderContent( destFolder, xCmdEnv );
+    ::ucbhelper::Content destFolderContent(
+        destFolder, xCmdEnv, getMyBackend()->getComponentContext() );
     {
         // transfer every item of folder into zip:
         Reference<sdbc::XResultSet> xResultSet(
@@ -1101,7 +1105,8 @@ void BackendImpl::PackageImpl::exportTo(
         {
             ::ucbhelper::Content subContent(
                 Reference<ucb::XContentAccess>(
-                    xResultSet, UNO_QUERY_THROW )->queryContent(), xCmdEnv );
+                    xResultSet, UNO_QUERY_THROW )->queryContent(),
+                xCmdEnv, getMyBackend()->getComponentContext() );
             if (! destFolderContent.transferContent(
                     subContent, ::ucbhelper::InsertOperation_COPY,
                     OUString(), ucb::NameClash::OVERWRITE ))
@@ -1156,7 +1161,8 @@ void BackendImpl::PackageImpl::exportTo(
             OUString fullPath;
             if (url_.getLength() > baseURLlen)
                 fullPath = url_.copy( baseURLlen + 1 );
-            ::ucbhelper::Content ucbContent( url_, xCmdEnv );
+            ::ucbhelper::Content ucbContent(
+                url_, xCmdEnv, getMyBackend()->getComponentContext() );
             if (ucbContent.getPropertyValue(strIsFolder).get<bool>())
                 fullPath += OUSTR("/");
             Sequence<beans::PropertyValue> attribs( 2 );
@@ -1190,7 +1196,7 @@ void BackendImpl::PackageImpl::exportTo(
         // write buffered pipe data to content:
         ::ucbhelper::Content manifestContent(
             makeURL( metainfFolderContent.getURL(), OUSTR("manifest.xml") ),
-            xCmdEnv );
+            xCmdEnv, getMyBackend()->getComponentContext() );
         manifestContent.writeStream(
             Reference<io::XInputStream>( xPipe, UNO_QUERY_THROW ),
             true /* replace existing */ );
@@ -1553,7 +1559,8 @@ void BackendImpl::PackageImpl::scanLegacyBundle(
     Reference<ucb::XCommandEnvironment> const & xCmdEnv,
     bool skip_registration )
 {
-    ::ucbhelper::Content ucbContent( url, xCmdEnv );
+    ::ucbhelper::Content ucbContent(
+        url, xCmdEnv, getMyBackend()->getComponentContext() );
 
     // check for platform paths:
     const OUString title( StrTitle::getTitle( ucbContent ) );
diff --git a/desktop/source/deployment/registry/script/dp_lib_container.cxx b/desktop/source/deployment/registry/script/dp_lib_container.cxx
index 8240fea..bb9b968 100644
--- a/desktop/source/deployment/registry/script/dp_lib_container.cxx
+++ b/desktop/source/deployment/registry/script/dp_lib_container.cxx
@@ -62,7 +62,7 @@ OUString LibraryContainer::get_libname(
     Reference<XComponentContext> const & xContext )
 {
     ::xmlscript::LibDescriptor import;
-    ::ucbhelper::Content ucb_content( url, xCmdEnv );
+    ::ucbhelper::Content ucb_content( url, xCmdEnv, xContext );
     xml_parse( ::xmlscript::importLibrary( import ), ucb_content, xContext );
 
     if (import.aName.isEmpty()) {
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index 52b4ab8..a034828 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -41,11 +41,10 @@
 #include "osl/file.hxx"
 #include "osl/thread.hxx"
 #include "tools/getprocessworkingdir.hxx"
-#include "ucbhelper/contentbroker.hxx"
-#include "ucbhelper/configurationkeys.hxx"
 #include "comphelper/processfactory.hxx"
 #include "unotools/configmgr.hxx"
 #include "com/sun/star/lang/XMultiServiceFactory.hpp"
+#include "com/sun/star/ucb/UniversalContentBroker.hpp"
 #include "cppuhelper/bootstrap.hxx"
 #include "comphelper/sequence.hxx"
 #include <stdio.h>
@@ -384,15 +383,10 @@ Reference<XComponentContext> bootstrapStandAlone(
     // set global process service factory used by unotools config helpers
     ::comphelper::setProcessServiceFactory( xServiceManager );
 
-    // initialize the ucbhelper ucb,
-    // because the package implementation uses it
-    Sequence<Any> ucb_args( 2 );
-    ucb_args[ 0 ] <<= OUSTR(UCB_CONFIGURATION_KEY1_LOCAL);
-    ucb_args[ 1 ] <<= OUSTR(UCB_CONFIGURATION_KEY2_OFFICE);
-    if (! ::ucbhelper::ContentBroker::initialize( xServiceManager, ucb_args ))
-        throw RuntimeException( OUSTR("cannot initialize UCB!"), 0 );
+    // Initialize the UCB (for backwards compatibility, in case some code still
+    // uses plain createInstance w/o args directly to obtain an instance):
+    UniversalContentBroker::create( xContext );
 
-    disposeGuard.setDeinitUCB();
     return xContext;
 }
 
diff --git a/desktop/source/pkgchk/unopkg/unopkg_shared.h b/desktop/source/pkgchk/unopkg/unopkg_shared.h
index 400e283..c8cdc3c 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_shared.h
+++ b/desktop/source/pkgchk/unopkg/unopkg_shared.h
@@ -35,8 +35,6 @@
 #include "tools/resmgr.hxx"
 #include "rtl/ustring.hxx"
 #include "unotools/configmgr.hxx"
-#include "ucbhelper/contentbroker.hxx"
-
 
 #define APP_NAME "unopkg"
 
@@ -126,14 +124,10 @@ bool isBootstrapVariable(sal_uInt32 * pIndex);
 class DisposeGuard
 {
     css::uno::Reference<css::lang::XComponent> m_xComp;
-    bool m_bDeinitUCB;
+
 public:
-    DisposeGuard(): m_bDeinitUCB(false) {}
     inline ~DisposeGuard()
     {
-        if (m_bDeinitUCB)
-            ::ucbhelper::ContentBroker::deinitialize();
-
         if (m_xComp.is())
             m_xComp->dispose();
     }
@@ -143,12 +137,6 @@ public:
     {
         m_xComp = xComp;
     }
-
-    inline void setDeinitUCB()
-    {
-        m_bDeinitUCB = true;
-    }
-
 };
 
 //==============================================================================
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 7729bd1..ed83e4d 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2351,7 +2351,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
             sal_Unicode cSlash = '/';
             xub_StrLen nSlashPos = sMain.SearchBackward(cSlash);
             sMain.Erase(nSlashPos);
-            ::ucbhelper::Content aNewContent(   sMain, uno::Reference< XCommandEnvironment > ());
+            ::ucbhelper::Content aNewContent( sMain, uno::Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
             Any aAny;
             TransferInfo aInfo;
             aInfo.NameClash = NameClash::OVERWRITE;
@@ -2405,7 +2405,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
             xDstStg = 0;
             try
             {
-                ::ucbhelper::Content aContent ( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), uno::Reference < XCommandEnvironment > ());
+                ::ucbhelper::Content aContent ( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), uno::Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
                 aContent.executeCommand ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "delete" ) ), makeAny ( sal_Bool (sal_True ) ) );
             }
             catch (...)
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 58dd7e4..2b04564 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -50,11 +50,6 @@
 #include <com/sun/star/form/XGridColumnFactory.hpp>
 #include <com/sun/star/io/XDataInputStream.hpp>
 #include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/ucb/XContentProvider.hpp>
-#include <com/sun/star/ucb/XContentAccess.hpp>
-#include <ucbhelper/contentbroker.hxx>
-#include <ucbhelper/content.hxx>
-#include <ucbhelper/contentidentifier.hxx>
 #include <comphelper/container.hxx>
 #include <svl/urihelper.hxx>
 #include <svtools/svtabbx.hxx>
@@ -91,9 +86,7 @@ using namespace ::com::sun::star::sdbc;
 using namespace ::com::sun::star::sdbcx;
 using namespace ::com::sun::star::form;
 using namespace ::com::sun::star::frame;
-using namespace ::com::sun::star::ucb;
 using namespace ::com::sun::star::lang;
-using namespace ::ucb;
 
 #define C2U(cChar) ::rtl::OUString::createFromAscii(cChar)
 
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index f799aca..9192f2f 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -44,6 +44,7 @@
 #include <com/sun/star/plugin/PluginManager.hpp>
 
 #include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
 #include <plugin/impl.hxx>
 #include <tools/fsys.hxx>
 #include <ucbhelper/content.hxx>
@@ -1039,7 +1040,8 @@ void PluginInputStream::load()
         m_pContent =
             new ::ucbhelper::Content(
                                aUrl.GetMainURL(INetURLObject::DECODE_TO_IURI),
-                               uno::Reference< com::sun::star::ucb::XCommandEnvironment >()
+                               uno::Reference< com::sun::star::ucb::XCommandEnvironment >(),
+                               comphelper::getProcessComponentContext()
                                );
         m_pContent->openStream( static_cast< XOutputStream* >( this ) );
     }
diff --git a/extensions/source/update/check/updateprotocoltest.cxx b/extensions/source/update/check/updateprotocoltest.cxx
index a155676..69113b9 100644
--- a/extensions/source/update/check/updateprotocoltest.cxx
+++ b/extensions/source/update/check/updateprotocoltest.cxx
@@ -48,9 +48,9 @@ SAL_IMPLEMENT_MAIN()
     // create the initial component context
     uno::Reference< uno::XComponentContext > rComponentContext = cppu::defaultBootstrap_InitialComponentContext();
 
-    // initialize UCB
-    uno::Reference< uno::XUniversalContentBroker > xUCB =
-        UniversalContentBroker::createWithKeys(rComponentContext, theArguments, "Local", "Office");
+    // initialize UCB (for backwards compatibility, in case some code still uses
+    // plain createInstance w/o args directly to obtain an instance):
+    com::sun::star::ucb::UniversalContentBroker::create(rComponentContext);
 
 
     rtl::OUString aURL;
diff --git a/extensions/source/update/feed/test/updatefeedtest.cxx b/extensions/source/update/feed/test/updatefeedtest.cxx
index 71c0508..c2bedb0 100644
--- a/extensions/source/update/feed/test/updatefeedtest.cxx
+++ b/extensions/source/update/feed/test/updatefeedtest.cxx
@@ -55,9 +55,9 @@ SAL_IMPLEMENT_MAIN()
     // create the initial component context
     uno::Reference< uno::XComponentContext > rComponentContext = cppu::defaultBootstrap_InitialComponentContext();
 
-    // initialize UCB
-    uno::Reference< uno::XUniversalContentBroker > xUCB =
-        ucb::UniversalContentBroker::createWithKeys(rComponentContext, "Local", "Office");
+    // initialize UCB (for backwards compatibility, in case some code still uses
+    // plain createInstance w/o args directly to obtain an instance):
+    ucb::UniversalContentBroker::create(rComponentContext);
 
     // retrieve the update information provider
     uno::Reference< deployment::XUpdateInformationProvider > rUpdateInformationProvider =
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index 646e2f0..65016a6 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -408,7 +408,7 @@ UpdateInformationProvider::createInstance(const uno::Reference<uno::XComponentCo
             uno::Reference< uno::XInterface > ());
 
     uno::Reference< ucb::XUniversalContentBroker > xUniversalContentBroker =
-        ucb::UniversalContentBroker::createDefault(xContext);
+        ucb::UniversalContentBroker::create(xContext);
 
     uno::Reference< xml::dom::XDocumentBuilder > xDocumentBuilder(
         xml::dom::DocumentBuilder::create(xContext));
diff --git a/fileaccess/Library_fileacc.mk b/fileaccess/Library_fileacc.mk
index 88ca91d..2b44b16 100644
--- a/fileaccess/Library_fileacc.mk
+++ b/fileaccess/Library_fileacc.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_Library_set_include,fileacc,\
 $(eval $(call gb_Library_use_sdk_api,fileacc))
 
 $(eval $(call gb_Library_use_libraries,fileacc,\
+    comphelper \
     cppu \
     cppuhelper \
     sal \
diff --git a/fileaccess/prj/build.lst b/fileaccess/prj/build.lst
index 8ec9888..41db406 100644
--- a/fileaccess/prj/build.lst
+++ b/fileaccess/prj/build.lst
@@ -1,2 +1,2 @@
-fa     fileaccess      :       unotools DESKTOP:rdbmaker tools ucbhelper LIBXSLT:libxslt NULL
+fa     fileaccess      : comphelper unotools DESKTOP:rdbmaker tools ucbhelper LIBXSLT:libxslt NULL
 fa     fileaccess\prj                                                  nmake   -       all     fa_prj NULL
diff --git a/fileaccess/source/FileAccess.cxx b/fileaccess/source/FileAccess.cxx
index 254fea2..72e964f 100644
--- a/fileaccess/source/FileAccess.cxx
+++ b/fileaccess/source/FileAccess.cxx
@@ -21,7 +21,7 @@
 #include <osl/diagnose.h>
 
 #include <uno/mapping.hxx>
-
+#include <comphelper/processfactory.hxx>
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/implbase1.hxx>
 
@@ -294,8 +294,8 @@ void OFileAccess::transferImpl( const rtl::OUString& rSource,
 
     }
 
-    ucbhelper::Content aDestPath( aDestURL,   mxEnvironment );
-    ucbhelper::Content aSrc     ( aSourceURL, mxEnvironment );
+    ucbhelper::Content aDestPath( aDestURL,   mxEnvironment, comphelper::getProcessComponentContext() );
+    ucbhelper::Content aSrc     ( aSourceURL, mxEnvironment, comphelper::getProcessComponentContext() );
 
     try
     {
@@ -329,7 +329,7 @@ void OFileAccess::kill( const rtl::OUString& FileURL )
 {
     // SfxContentHelper::Kill
     INetURLObject aDeleteObj( FileURL, INET_PROT_FILE );
-    ucbhelper::Content aCnt( aDeleteObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment );
+    ucbhelper::Content aCnt( aDeleteObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
     try
     {
         aCnt.executeCommand( rtl::OUString("delete" ), makeAny( sal_Bool( sal_True ) ) );
@@ -347,7 +347,7 @@ sal_Bool OFileAccess::isFolder( const rtl::OUString& FileURL )
     try
     {
         INetURLObject aURLObj( FileURL, INET_PROT_FILE );
-        ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment );
+        ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
         bRet = aCnt.isFolder();
     }
     catch (const Exception &) {}
@@ -358,7 +358,7 @@ sal_Bool OFileAccess::isReadOnly( const rtl::OUString& FileURL )
     throw(CommandAbortedException, Exception, RuntimeException)
 {
     INetURLObject aURLObj( FileURL, INET_PROT_FILE );
-    ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment );
+    ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
     Any aRetAny = aCnt.getPropertyValue( rtl::OUString( "IsReadOnly"  ) );
     sal_Bool bRet = sal_False;
     aRetAny >>= bRet;
@@ -369,7 +369,7 @@ void OFileAccess::setReadOnly( const rtl::OUString& FileURL, sal_Bool bReadOnly
     throw(CommandAbortedException, Exception, RuntimeException)
 {
     INetURLObject aURLObj( FileURL, INET_PROT_FILE );
-    ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment );
+    ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
     Any aAny;
     aAny <<= bReadOnly;
     aCnt.setPropertyValue( rtl::OUString( "IsReadOnly"  ), aAny );
@@ -398,7 +398,7 @@ void OFileAccess::createFolder( const rtl::OUString& NewFolderURL )
         }
     }
 
-    ucbhelper::Content aCnt( aURL.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment );
+    ucbhelper::Content aCnt( aURL.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
 
     Sequence< ContentInfo > aInfo = aCnt.queryCreatableContentsInfo();
     sal_Int32 nCount = aInfo.getLength();
@@ -451,7 +451,7 @@ sal_Int32 OFileAccess::getSize( const rtl::OUString& FileURL )
     sal_Int32 nSize = 0;
     sal_Int64 nTemp = 0;
     INetURLObject aObj( FileURL, INET_PROT_FILE );
-    ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment );
+    ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
     aCnt.getPropertyValue( rtl::OUString("Size" ) ) >>= nTemp;
     nSize = (sal_Int32)nTemp;
     return nSize;
@@ -461,7 +461,7 @@ rtl::OUString OFileAccess::getContentType( const rtl::OUString& FileURL )
     throw(CommandAbortedException, Exception, RuntimeException)
 {
     INetURLObject aObj( FileURL, INET_PROT_FILE );
-    ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment );
+    ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
 
     Reference< XContent > xContent = aCnt.get();
     rtl::OUString aTypeStr = xContent->getContentType();
@@ -475,7 +475,7 @@ DateTime OFileAccess::getDateTimeModified( const rtl::OUString& FileURL )
     DateTime aDateTime;
 
     Reference< XCommandEnvironment > aCmdEnv;
-    ucbhelper::Content aYoung( aFileObj.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv );
+    ucbhelper::Content aYoung( aFileObj.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv, comphelper::getProcessComponentContext() );
     aYoung.getPropertyValue( rtl::OUString("DateModified" ) ) >>= aDateTime;
     return aDateTime;
 }
@@ -490,7 +490,7 @@ Sequence< rtl::OUString > OFileAccess::getFolderContents( const rtl::OUString& F
     StringList_Impl* pFiles = NULL;
     INetURLObject aFolderObj( FolderURL, INET_PROT_FILE );
 
-    ucbhelper::Content aCnt( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment );
+    ucbhelper::Content aCnt( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
     Reference< XResultSet > xResultSet;
     Sequence< rtl::OUString > aProps(0);
 
@@ -562,7 +562,7 @@ Reference< XInputStream > OFileAccess::openFileRead( const rtl::OUString& FileUR
 {
     Reference< XInputStream > xRet;
     INetURLObject aObj( FileURL, INET_PROT_FILE );
-    ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment );
+    ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
 
     Reference< XActiveDataSink > xSink = (XActiveDataSink*)(new OActiveDataSink());
 
@@ -606,7 +606,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const rtl::OUString& FileUR
     aCmdArg <<= aArg;
 
     INetURLObject aFileObj( FileURL, INET_PROT_FILE );
-    ucbhelper::Content aCnt( aFileObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment );
+    ucbhelper::Content aCnt( aFileObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
 
     // Be silent...
     Reference< XInteractionHandler > xIH;
@@ -668,7 +668,7 @@ bool OFileAccess::createNewFile( const rtl::OUString & rParentURL,
                                  const Reference< XInputStream >& data )
     throw ( Exception )
 {
-    ucbhelper::Content aParentCnt( rParentURL, mxEnvironment );
+    ucbhelper::Content aParentCnt( rParentURL, mxEnvironment, comphelper::getProcessComponentContext() );
 
     Sequence< ContentInfo > aInfo = aParentCnt.queryCreatableContentsInfo();
     sal_Int32 nCount = aInfo.getLength();
@@ -729,7 +729,8 @@ void SAL_CALL OFileAccess::writeFile( const rtl::OUString& FileURL,
     try
     {
         ucbhelper::Content aCnt(
-            aURL.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment );
+            aURL.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment,
+            comphelper::getProcessComponentContext() );
 
         try
         {
@@ -775,7 +776,7 @@ sal_Bool OFileAccess::isHidden( const ::rtl::OUString& FileURL )
     throw(CommandAbortedException, Exception, RuntimeException)
 {
     INetURLObject aURLObj( FileURL, INET_PROT_FILE );
-    ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment );
+    ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
     Any aRetAny = aCnt.getPropertyValue( rtl::OUString( "IsHidden"  ) );
     sal_Bool bRet = sal_False;
     aRetAny >>= bRet;
@@ -786,7 +787,7 @@ void OFileAccess::setHidden( const ::rtl::OUString& FileURL, sal_Bool bHidden )
     throw(CommandAbortedException, Exception, RuntimeException)
 {
     INetURLObject aURLObj( FileURL, INET_PROT_FILE );
-    ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment );
+    ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
     Any aAny;
     aAny <<= bHidden;
     aCnt.setPropertyValue( rtl::OUString( "IsHidden"  ), aAny );
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 501d04b..4a50aa9 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -125,9 +125,6 @@
 #include <svx/svx3ditems.hxx>
 #include <svx/svdoashp.hxx>
 #include <svx/sdasaitm.hxx>
-#include <ucbhelper/content.hxx>
-#include <ucbhelper/contentbroker.hxx>
-
 #include "svx/EnhancedCustomShapeTypeNames.hxx"
 #include "svx/EnhancedCustomShapeGeometry.hxx"
 #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
diff --git a/filter/source/xmlfilterdetect/fdcomp.cxx b/filter/source/xmlfilterdetect/fdcomp.cxx
index a031a33..f20ff3a 100644
--- a/filter/source/xmlfilterdetect/fdcomp.cxx
+++ b/filter/source/xmlfilterdetect/fdcomp.cxx
@@ -26,42 +26,30 @@
  *
  ************************************************************************/
 
-#include <stdio.h>
-#include <osl/mutex.hxx>
-#include <osl/thread.h>
-#include <cppuhelper/factory.hxx>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include "filterdetect.hxx"
+#include "sal/config.h"
 
-using namespace ::rtl;
-using namespace ::cppu;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implementationentry.hxx"
+#include "sal/types.h"
 
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
-    const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
-{
-    void * pRet = 0;
-    OUString implName = OUString::createFromAscii( pImplName );
-    if ( pServiceManager && implName.equals(FilterDetect_getImplementationName()) )
-    {
-        Reference< XSingleServiceFactory > xFactory( createSingleFactory(
-            reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
-            OUString::createFromAscii( pImplName ),
-            FilterDetect_createInstance, FilterDetect_getSupportedServiceNames() ) );
+#include "filterdetect.hxx"
 
-        if (xFactory.is())
-        {
-            xFactory->acquire();
-            pRet = xFactory.get();
-        }
-    }
+namespace {
 
-    return pRet;
+static cppu::ImplementationEntry const services[] = {
+    { &FilterDetect_createInstance, &FilterDetect_getImplementationName,
+      &FilterDetect_getSupportedServiceNames,
+      &cppu::createSingleComponentFactory, 0, 0 },
+    { 0, 0, 0, 0, 0, 0 }
+};
 
 }
+
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
+    char const * pImplName, void * pServiceManager, void * pRegistryKey)
+{
+    return cppu::component_getFactoryHelper(
+        pImplName, pServiceManager, pRegistryKey, services);
 }
+

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list