[Libreoffice-commits] .: binfilter comphelper/inc comphelper/source filter/source framework/inc framework/source oox/source sfx2/source svtools/source svx/source unotools/source uui/source vcl/source writerfilter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 24 02:30:39 PDT 2012


 binfilter                                                  |    2 -
 comphelper/inc/comphelper/configurationhelper.hxx          |   13 +++----
 comphelper/source/misc/configurationhelper.cxx             |   17 ++++-----
 filter/source/config/cache/filtercache.cxx                 |    2 -
 filter/source/config/cache/filterfactory.cxx               |    5 +-
 framework/inc/helper/persistentwindowstate.hxx             |   14 +++----
 framework/source/accelerators/acceleratorconfiguration.cxx |    6 +--
 framework/source/classes/taskcreator.cxx                   |    3 +
 framework/source/helper/persistentwindowstate.cxx          |   22 +++++------
 framework/source/helper/statusindicatorfactory.cxx         |    2 -
 framework/source/jobs/helponstartup.cxx                    |    9 ++--
 framework/source/loadenv/loadenv.cxx                       |    6 +--
 framework/source/services/autorecovery.cxx                 |   24 ++++++-------
 framework/source/services/modulemanager.cxx                |    4 +-
 framework/source/services/pathsettings.cxx                 |    4 +-
 framework/source/services/substitutepathvars.cxx           |    4 +-
 oox/source/ole/vbaproject.cxx                              |    3 -
 sfx2/source/appl/appopen.cxx                               |    2 -
 sfx2/source/appl/appserv.cxx                               |    2 -
 sfx2/source/appl/newhelp.cxx                               |    4 +-
 sfx2/source/doc/docfac.cxx                                 |    2 -
 sfx2/source/doc/docfile.cxx                                |    4 +-
 sfx2/source/doc/guisaveas.cxx                              |    2 -
 sfx2/source/view/viewfrm.cxx                               |    2 -
 svtools/source/config/accessibilityoptions.cxx             |    2 -
 svtools/source/config/printoptions.cxx                     |    2 -
 svx/source/dialog/docrecovery.cxx                          |    2 -
 svx/source/unodraw/recoveryui.cxx                          |    3 +
 unotools/source/config/historyoptions.cxx                  |    4 +-
 unotools/source/config/saveopt.cxx                         |    4 +-
 unotools/source/config/useroptions.cxx                     |    2 -
 unotools/source/config/viewoptions.cxx                     |    2 -
 uui/source/newerverwarn.cxx                                |    2 -
 vcl/source/control/edit.cxx                                |    4 +-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx          |    6 +--
 35 files changed, 97 insertions(+), 94 deletions(-)

New commits:
commit e8aa70b5d44a6cbedacfe0e5d1b1da2c76a3c588
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Oct 16 14:05:41 2012 +0200

    fdo#46808, convert comphelper::ConfigurationHelper to XComponentContext
    
    Convert the helper methods to take an XComponentContext parameter,
    instead of XMultiServiceFactory.
    
    Change-Id: I9f0098af37b91f107d8799f14caa04756eac82b1

diff --git a/binfilter b/binfilter
index 5945161..3c9d49e 160000
--- a/binfilter
+++ b/binfilter
@@ -1 +1 @@
-Subproject commit 5945161bdfa46e76ca911fea2dc937f9fe95b074
+Subproject commit 3c9d49ef2b9fd4c46a6760e599f923e559d56a54
diff --git a/comphelper/inc/comphelper/configurationhelper.hxx b/comphelper/inc/comphelper/configurationhelper.hxx
index 706e1b7..2f6c941 100644
--- a/comphelper/inc/comphelper/configurationhelper.hxx
+++ b/comphelper/inc/comphelper/configurationhelper.hxx
@@ -21,6 +21,7 @@
 #define _COMPHELPER_CONFIGURATIONHELPER_HXX_
 
 #include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
@@ -76,7 +77,7 @@ class COMPHELPER_DLLPUBLIC ConfigurationHelper
      *  configuration package is needed. The configuration access can be cached
      *  outside and used inbetween.
      *
-     *  @param  xSMGR
+     *  @param  rxContext
      *          the uno service manager, which should be used to create the
      *          configuration access.
      *
@@ -95,9 +96,9 @@ class COMPHELPER_DLLPUBLIC ConfigurationHelper
      *  @throw  Any exceptions the underlying configuration can throw.
      *          E.g. css::uno::Exception if the configuration could not be opened.
      */
-    static css::uno::Reference< css::uno::XInterface > openConfig(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR   ,
-                                                                  const ::rtl::OUString&                                       sPackage,
-                                                                        sal_Int32                                              eMode   );
+    static css::uno::Reference< css::uno::XInterface > openConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+                                                                  const ::rtl::OUString&                                    sPackage,
+                                                                        sal_Int32                                           eMode   );
 
     //-----------------------------------------------
     /** reads the value of an existing(!) configuration key,
@@ -217,7 +218,7 @@ class COMPHELPER_DLLPUBLIC ConfigurationHelper
      * So its not very usefull to use this method for reading multiple keys at the same time.
      * (Excepting these keys exists inside different configuration packages ...))
      */
-    static css::uno::Any readDirectKey(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR   ,
+    static css::uno::Any readDirectKey(const css::uno::Reference< css::uno::XComponentContext >&    rxContext,
                                        const ::rtl::OUString&                                       sPackage,
                                        const ::rtl::OUString&                                       sRelPath,
                                        const ::rtl::OUString&                                       sKey    ,
@@ -233,7 +234,7 @@ class COMPHELPER_DLLPUBLIC ConfigurationHelper
      * So its not very usefull to use this method for writing multiple keys at the same time.
      * (Excepting these keys exists inside different configuration packages ...))
      */
-    static void writeDirectKey(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR   ,
+    static void writeDirectKey(const css::uno::Reference< css::uno::XComponentContext >&    rxContext,
                                const ::rtl::OUString&                                       sPackage,
                                const ::rtl::OUString&                                       sRelPath,
                                const ::rtl::OUString&                                       sKey    ,
diff --git a/comphelper/source/misc/configurationhelper.cxx b/comphelper/source/misc/configurationhelper.cxx
index 1ace6f2..7c16385 100644
--- a/comphelper/source/misc/configurationhelper.cxx
+++ b/comphelper/source/misc/configurationhelper.cxx
@@ -32,13 +32,12 @@ namespace css = ::com::sun::star;
 
 
 //-----------------------------------------------
-css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR   ,
-                                                                            const ::rtl::OUString&                                       sPackage,
-                                                                                  sal_Int32                                              eMode   )
+css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+                                                                            const ::rtl::OUString&                                    sPackage,
+                                                                                  sal_Int32                                           eMode   )
 {
     css::uno::Reference< css::lang::XMultiServiceFactory > xConfigProvider(
-        css::configuration::theDefaultProvider::get(
-            getComponentContext( xSMGR ) ) );
+        css::configuration::theDefaultProvider::get( rxContext ) );
 
     ::comphelper::SequenceAsVector< css::uno::Any > lParams;
     css::beans::PropertyValue                       aParam ;
@@ -160,25 +159,25 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::makeSureSetNode
 }
 
 //-----------------------------------------------
-css::uno::Any ConfigurationHelper::readDirectKey(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR   ,
+css::uno::Any ConfigurationHelper::readDirectKey(const css::uno::Reference< css::uno::XComponentContext >&    rxContext,
                                                  const ::rtl::OUString&                                       sPackage,
                                                  const ::rtl::OUString&                                       sRelPath,
                                                  const ::rtl::OUString&                                       sKey    ,
                                                        sal_Int32                                              eMode   )
 {
-    css::uno::Reference< css::uno::XInterface > xCFG = ConfigurationHelper::openConfig(xSMGR, sPackage, eMode);
+    css::uno::Reference< css::uno::XInterface > xCFG = ConfigurationHelper::openConfig(rxContext, sPackage, eMode);
     return ConfigurationHelper::readRelativeKey(xCFG, sRelPath, sKey);
 }
 
 //-----------------------------------------------
-void ConfigurationHelper::writeDirectKey(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR   ,
+void ConfigurationHelper::writeDirectKey(const css::uno::Reference< css::uno::XComponentContext >&    rxContext,
                                          const ::rtl::OUString&                                       sPackage,
                                          const ::rtl::OUString&                                       sRelPath,
                                          const ::rtl::OUString&                                       sKey    ,
                                          const css::uno::Any&                                         aValue  ,
                                                sal_Int32                                              eMode   )
 {
-    css::uno::Reference< css::uno::XInterface > xCFG = ConfigurationHelper::openConfig(xSMGR, sPackage, eMode);
+    css::uno::Reference< css::uno::XInterface > xCFG = ConfigurationHelper::openConfig(rxContext, sPackage, eMode);
     ConfigurationHelper::writeRelativeKey(xCFG, sRelPath, sKey, aValue);
     ConfigurationHelper::flush(xCFG);
 }
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index 9159f20..ee0ac39 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -2466,7 +2466,7 @@ sal_Bool FilterCache::impl_isModuleInstalled(const ::rtl::OUString& sModule)
     {
         m_xModuleCfg = css::uno::Reference< css::container::XNameAccess >(
                             ::comphelper::ConfigurationHelper::openConfig(
-                                m_xSMGR,
+                                comphelper::getComponentContext(m_xSMGR),
                                 ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office/Factories" )),
                                 ::comphelper::ConfigurationHelper::E_READONLY),
                             css::uno::UNO_QUERY_THROW);
diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx
index fa918f6..cfba722 100644
--- a/filter/source/config/cache/filterfactory.cxx
+++ b/filter/source/config/cache/filterfactory.cxx
@@ -24,6 +24,7 @@
 #include "versions.hxx"
 
 #include <com/sun/star/lang/XInitialization.hpp>
+#include <comphelper/processfactory.hxx>
 #include <comphelper/enumhelper.hxx>
 #include <comphelper/configurationhelper.hxx>
 #include <rtl/ustrbuf.hxx>
@@ -487,7 +488,7 @@ OUStringList FilterFactory::impl_getListOfInstalledModules() const
     try
     {
         css::uno::Reference< css::container::XNameAccess > xModuleConfig(
-            ::comphelper::ConfigurationHelper::openConfig(xSMGR,
+            ::comphelper::ConfigurationHelper::openConfig( comphelper::getComponentContext(xSMGR),
                                                           CFGPACKAGE_OOO_MODULES,
                                                           ::comphelper::ConfigurationHelper::E_READONLY),
             css::uno::UNO_QUERY_THROW);
@@ -570,7 +571,7 @@ OUStringList FilterFactory::impl_readSortedFilterListFromConfig(const ::rtl::OUS
     try
     {
         css::uno::Reference< css::container::XNameAccess > xUISortConfig(
-            ::comphelper::ConfigurationHelper::openConfig(xSMGR,
+            ::comphelper::ConfigurationHelper::openConfig( comphelper::getComponentContext(xSMGR),
                                                           CFGPACKAGE_TD_UISORT,
                                                           ::comphelper::ConfigurationHelper::E_READONLY),
             css::uno::UNO_QUERY_THROW);
diff --git a/framework/inc/helper/persistentwindowstate.hxx b/framework/inc/helper/persistentwindowstate.hxx
index 76adf8f..d9e1ae2 100644
--- a/framework/inc/helper/persistentwindowstate.hxx
+++ b/framework/inc/helper/persistentwindowstate.hxx
@@ -132,7 +132,7 @@ class PersistentWindowState :   // interfaces
         //____________________________
         /** @short  retrieve the window state from the configuration.
 
-            @param  xSMGR
+            @param  rxContext
                     needed to create the configuration access.
 
             @param  sModuleName
@@ -142,8 +142,8 @@ class PersistentWindowState :   // interfaces
             @return [string]
                     contains the information about position and size.
          */
-        static ::rtl::OUString implst_getWindowStateFromConfig(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR      ,
-                                                               const ::rtl::OUString&                                        sModuleName);
+        static ::rtl::OUString implst_getWindowStateFromConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext      ,
+                                                               const ::rtl::OUString&                                    sModuleName);
 
         //____________________________
         /** @short  retrieve the window state from the container window.
@@ -161,7 +161,7 @@ class PersistentWindowState :   // interfaces
         //____________________________
         /** @short  restore the position and size on the container window.
 
-            @param  xSMGR
+            @param  rxContext
                     needed to create the configuration access.
 
             @param  sModuleName
@@ -171,9 +171,9 @@ class PersistentWindowState :   // interfaces
             @param  sWindowState
                     contains the information about position and size.
          */
-        static void implst_setWindowStateOnConfig(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR         ,
-                                                  const ::rtl::OUString&                                        sModuleName   ,
-                                                  const ::rtl::OUString&                                        sWindowState  );
+        static void implst_setWindowStateOnConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+                                                  const ::rtl::OUString&                                    sModuleName   ,
+                                                  const ::rtl::OUString&                                    sWindowState  );
 
         //____________________________
         /** @short  restore the position and size on the container window.
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index 8becd7d..eef8c1d 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -671,7 +671,7 @@ XCUBasedAcceleratorConfiguration::XCUBasedAcceleratorConfiguration(const css::un
 {
     const ::rtl::OUString CFG_ENTRY_ACCELERATORS("org.openoffice.Office.Accelerators");
     m_xCfg = css::uno::Reference< css::container::XNameAccess > (
-             ::comphelper::ConfigurationHelper::openConfig( m_xSMGR, CFG_ENTRY_ACCELERATORS, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
+             ::comphelper::ConfigurationHelper::openConfig( comphelper::getComponentContext(m_xSMGR), CFG_ENTRY_ACCELERATORS, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
              css::uno::UNO_QUERY );
 }
 
@@ -1173,14 +1173,14 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::reset()
     if ( sConfig == "Global" )
     {
         m_xCfg = css::uno::Reference< css::container::XNameAccess > (
-            ::comphelper::ConfigurationHelper::openConfig( m_xSMGR, CFG_ENTRY_GLOBAL, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
+            ::comphelper::ConfigurationHelper::openConfig( comphelper::getComponentContext(m_xSMGR), CFG_ENTRY_GLOBAL, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
             css::uno::UNO_QUERY );
         XCUBasedAcceleratorConfiguration::reload();
     }
     else if ( sConfig == "Modules" )
     {
         m_xCfg = css::uno::Reference< css::container::XNameAccess > (
-            ::comphelper::ConfigurationHelper::openConfig( m_xSMGR, CFG_ENTRY_MODULES, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
+            ::comphelper::ConfigurationHelper::openConfig( comphelper::getComponentContext(m_xSMGR), CFG_ENTRY_MODULES, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
             css::uno::UNO_QUERY );
         XCUBasedAcceleratorConfiguration::reload();
     }
diff --git a/framework/source/classes/taskcreator.cxx b/framework/source/classes/taskcreator.cxx
index 147f5f4..c7d8689 100644
--- a/framework/source/classes/taskcreator.cxx
+++ b/framework/source/classes/taskcreator.cxx
@@ -85,7 +85,8 @@ css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const ::rtl::
             ( TargetHelper::matchSpecialTarget(sName, TargetHelper::E_DEFAULT) )
            )
         {
-            ::comphelper::ConfigurationHelper::readDirectKey(xSMGR,
+            ::comphelper::ConfigurationHelper::readDirectKey(
+                comphelper::getComponentContext(xSMGR),
                 "org.openoffice.Office.TabBrowse",
                 "TaskCreatorService",
                 "ImplementationName",
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 1733b92..26d6c2d 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -119,7 +119,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv
 {
     // SAFE -> ----------------------------------
     ReadGuard aReadLock(m_aLock);
-    css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR ;
+    css::uno::Reference< css::uno::XComponentContext >     xContext = comphelper::getComponentContext(m_xSMGR);
     css::uno::Reference< css::frame::XFrame >              xFrame(m_xFrame.get(), css::uno::UNO_QUERY);
     sal_Bool                                               bRestoreWindowState = !m_bWindowStateAlreadySet;
     aReadLock.unlock();
@@ -135,7 +135,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv
         return;
 
     // unknown module -> no configuration available!
-    ::rtl::OUString sModuleName = PersistentWindowState::implst_identifyModule(comphelper::getComponentContext(xSMGR), xFrame);
+    ::rtl::OUString sModuleName = PersistentWindowState::implst_identifyModule(xContext, xFrame);
     if (sModuleName.isEmpty())
         return;
 
@@ -145,7 +145,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv
             {
                 if (bRestoreWindowState)
                 {
-                    ::rtl::OUString sWindowState = PersistentWindowState::implst_getWindowStateFromConfig(xSMGR, sModuleName);
+                    ::rtl::OUString sWindowState = PersistentWindowState::implst_getWindowStateFromConfig(xContext, sModuleName);
                     PersistentWindowState::implst_setWindowStateOnWindow(xWindow,sWindowState);
                     // SAFE -> ----------------------------------
                     WriteGuard aWriteLock(m_aLock);
@@ -166,7 +166,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv
         case css::frame::FrameAction_COMPONENT_DETACHING :
             {
                 ::rtl::OUString sWindowState = PersistentWindowState::implst_getWindowStateFromWindow(xWindow);
-                PersistentWindowState::implst_setWindowStateOnConfig(xSMGR, sModuleName, sWindowState);
+                PersistentWindowState::implst_setWindowStateOnConfig(xContext, sModuleName, sWindowState);
             }
             break;
         default:
@@ -203,8 +203,8 @@ void SAL_CALL PersistentWindowState::disposing(const css::lang::EventObject&)
 }
 
 //*****************************************************************************************************************
-::rtl::OUString PersistentWindowState::implst_getWindowStateFromConfig(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR      ,
-                                                                       const ::rtl::OUString&                                        sModuleName)
+::rtl::OUString PersistentWindowState::implst_getWindowStateFromConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+                                                                       const ::rtl::OUString&                                    sModuleName)
 {
     ::rtl::OUString sWindowState;
 
@@ -219,7 +219,7 @@ void SAL_CALL PersistentWindowState::disposing(const css::lang::EventObject&)
 
     try
     {
-        ::comphelper::ConfigurationHelper::readDirectKey(xSMGR,
+        ::comphelper::ConfigurationHelper::readDirectKey(rxContext,
                                                                                       sPackage,
                                                                                       sRelPath,
                                                                                       sKey,
@@ -234,9 +234,9 @@ void SAL_CALL PersistentWindowState::disposing(const css::lang::EventObject&)
 }
 
 //*****************************************************************************************************************
-void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR       ,
-                                                          const ::rtl::OUString&                                        sModuleName ,
-                                                          const ::rtl::OUString&                                        sWindowState)
+void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+                                                          const ::rtl::OUString&                                    sModuleName ,
+                                                          const ::rtl::OUString&                                    sWindowState)
 {
     ::rtl::OUStringBuffer sRelPathBuf(256);
     sRelPathBuf.appendAscii("Office/Factories/*[\"");
@@ -249,7 +249,7 @@ void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Refere
 
     try
     {
-        ::comphelper::ConfigurationHelper::writeDirectKey(xSMGR,
+        ::comphelper::ConfigurationHelper::writeDirectKey(rxContext,
                                                           sPackage,
                                                           sRelPath,
                                                           sKey,
diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx
index d5ce604..5a1ba9d 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -420,7 +420,7 @@ void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed()
     {
         bool bForceFrontAndFocus(false);
         ::comphelper::ConfigurationHelper::readDirectKey(
-            xSMGR,
+            comphelper::getComponentContext(xSMGR),
             ::rtl::OUString("org.openoffice.Office.Common/View"),
             ::rtl::OUString("NewDocumentHandling"),
             ::rtl::OUString("ForceFocusAndToFront"),
diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx
index 8c7201d..a803db4 100644
--- a/framework/source/jobs/helponstartup.cxx
+++ b/framework/source/jobs/helponstartup.cxx
@@ -91,7 +91,8 @@ DEFINE_INIT_SERVICE(HelpOnStartup,
                             see macro DEFINE_XSERVICEINFO_MULTISERVICE and "impl_initService()" for further informations!
                         */
                         // create some needed uno services and cache it
-                        m_xModuleManager = css::frame::ModuleManager::create( comphelper::getComponentContext(m_xSMGR) );
+                        css::uno::Reference<css::uno::XComponentContext> xContext = comphelper::getComponentContext(m_xSMGR);
+                        m_xModuleManager = css::frame::ModuleManager::create( xContext );
 
                         m_xDesktop = css::uno::Reference< css::frame::XFrame >(
                             m_xSMGR->createInstance(SERVICENAME_DESKTOP),
@@ -99,14 +100,14 @@ DEFINE_INIT_SERVICE(HelpOnStartup,
 
                         m_xConfig = css::uno::Reference< css::container::XNameAccess >(
                             ::comphelper::ConfigurationHelper::openConfig(
-                                m_xSMGR,
+                                xContext,
                                 CFG_PACKAGE_MODULES,
                                 ::comphelper::ConfigurationHelper::E_READONLY),
                             css::uno::UNO_QUERY_THROW);
 
                         // ask for office locale
                         ::comphelper::ConfigurationHelper::readDirectKey(
-                            m_xSMGR,
+                            xContext,
                             CFG_PACKAGE_SETUP,
                             CFG_PATH_L10N,
                             CFG_KEY_LOCALE,
@@ -114,7 +115,7 @@ DEFINE_INIT_SERVICE(HelpOnStartup,
 
                         // detect system
                         ::comphelper::ConfigurationHelper::readDirectKey(
-                            m_xSMGR,
+                            xContext,
                             CFG_PACKAGE_COMMON,
                             CFG_PATH_HELP,
                             CFG_KEY_HELPSYSTEM,
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 799a48d..fc55813 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -952,7 +952,7 @@ sal_Bool LoadEnv::impl_furtherDocsAllowed()
     try
     {
         css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey(
-                                xSMGR,
+                                comphelper::getComponentContext(xSMGR),
                                 ::rtl::OUString("org.openoffice.Office.Common/"),
                                 ::rtl::OUString("Misc"),
                                 ::rtl::OUString("MaxOpenDocuments"),
@@ -1690,7 +1690,7 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::X
         {
             css::uno::Any const a =
                 ::comphelper::ConfigurationHelper::readDirectKey(
-                  xSMGR,
+                  comphelper::getComponentContext(xSMGR),
                   ::rtl::OUString("org.openoffice.Office.Common/View"),
                   ::rtl::OUString("NewDocumentHandling"),
                   ::rtl::OUString("ForceFocusAndToFront"),
@@ -1770,7 +1770,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
 
         // get access to the configuration of this office module
         css::uno::Reference< css::container::XNameAccess > xModuleCfg(::comphelper::ConfigurationHelper::openConfig(
-                                                                        xSMGR,
+                                                                        comphelper::getComponentContext(xSMGR),
                                                                         PACKAGE_SETUP_MODULES,
                                                                         ::comphelper::ConfigurationHelper::E_READONLY),
                                                                       css::uno::UNO_QUERY_THROW);
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 519c5cd..6390970 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -931,7 +931,7 @@ css::uno::Reference< css::container::XNameAccess > AutoRecovery::implts_openConf
 
     if (m_xRecoveryCFG.is())
         return m_xRecoveryCFG;
-    css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
+    css::uno::Reference< css::uno::XComponentContext > xContext = comphelper::getComponentContext(m_xSMGR);
 
     aWriteLock.unlock();
     // <- SAFE ----------------------------------
@@ -939,7 +939,7 @@ css::uno::Reference< css::container::XNameAccess > AutoRecovery::implts_openConf
     rtl::OUString sCFG_PACKAGE_RECOVERY(RTL_CONSTASCII_USTRINGPARAM(CFG_PACKAGE_RECOVERY));
     // throws a RuntimeException if an error occure!
     css::uno::Reference< css::container::XNameAccess > xCFG(
-        ::comphelper::ConfigurationHelper::openConfig(xSMGR, sCFG_PACKAGE_RECOVERY, ::comphelper::ConfigurationHelper::E_STANDARD),
+        ::comphelper::ConfigurationHelper::openConfig(xContext, sCFG_PACKAGE_RECOVERY, ::comphelper::ConfigurationHelper::E_STANDARD),
         css::uno::UNO_QUERY);
 
     sal_Int32 nMinSpaceDocSave    = MIN_DISCSPACE_DOCSAVE;
@@ -948,13 +948,13 @@ css::uno::Reference< css::container::XNameAccess > AutoRecovery::implts_openConf
     try
     {
         rtl::OUString sCFG_PATH_AUTOSAVE(CFG_PATH_AUTOSAVE);
-        ::comphelper::ConfigurationHelper::readDirectKey(xSMGR,
+        ::comphelper::ConfigurationHelper::readDirectKey(xContext,
                                                          sCFG_PACKAGE_RECOVERY,
                                                          sCFG_PATH_AUTOSAVE,
                                                          rtl::OUString(CFG_ENTRY_MINSPACE_DOCSAVE),
                                                          ::comphelper::ConfigurationHelper::E_STANDARD) >>= nMinSpaceDocSave;
 
-        ::comphelper::ConfigurationHelper::readDirectKey(xSMGR,
+        ::comphelper::ConfigurationHelper::readDirectKey(xContext,
                                                          sCFG_PACKAGE_RECOVERY,
                                                          sCFG_PATH_AUTOSAVE,
                                                          rtl::OUString(CFG_ENTRY_MINSPACE_CONFIGSAVE),
@@ -1129,7 +1129,7 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume
         {
             // open module config on demand and cache the update access
             xCFG = css::uno::Reference< css::container::XNameAccess >(
-                ::comphelper::ConfigurationHelper::openConfig(xSMGR, rtl::OUString(CFG_PACKAGE_MODULES),
+                ::comphelper::ConfigurationHelper::openConfig(comphelper::getComponentContext(xSMGR), rtl::OUString(CFG_PACKAGE_MODULES),
                 ::comphelper::ConfigurationHelper::E_STANDARD),
                 css::uno::UNO_QUERY_THROW);
 
@@ -2973,7 +2973,7 @@ void AutoRecovery::implts_doEmergencySave(const DispatchParams& aParams)
     // the error report tool is started too in case no recovery
     // documents exists and was saved.
     ::comphelper::ConfigurationHelper::writeDirectKey(
-        m_xSMGR,
+        comphelper::getComponentContext(m_xSMGR),
         rtl::OUString(CFG_PACKAGE_RECOVERY),
         rtl::OUString(CFG_PATH_RECOVERYINFO),
         rtl::OUString(CFG_ENTRY_CRASHED),
@@ -3034,7 +3034,7 @@ void AutoRecovery::implts_doRecovery(const DispatchParams& aParams)
 
     // Reset the configuration hint "we was crashed"!
     ::comphelper::ConfigurationHelper::writeDirectKey(
-        m_xSMGR,
+        comphelper::getComponentContext(m_xSMGR),
         rtl::OUString(CFG_PACKAGE_RECOVERY),
         rtl::OUString(CFG_PATH_RECOVERYINFO),
         rtl::OUString(CFG_ENTRY_CRASHED),
@@ -3101,7 +3101,7 @@ void AutoRecovery::implts_doSessionQuietQuit(const DispatchParams& /*aParams*/)
     // Write a hint for "stored session data" into the configuration, so
     // the on next startup we know what's happen last time
     ::comphelper::ConfigurationHelper::writeDirectKey(
-        m_xSMGR,
+        comphelper::getComponentContext(m_xSMGR),
         rtl::OUString(CFG_PACKAGE_RECOVERY),
         rtl::OUString(CFG_PATH_RECOVERYINFO),
         rtl::OUString(CFG_ENTRY_SESSIONDATA),
@@ -3138,7 +3138,7 @@ void AutoRecovery::implts_doSessionRestore(const DispatchParams& aParams)
     // Reset the configuration hint for "session save"!
     LOG_RECOVERY("... reset config key 'SessionData'")
     ::comphelper::ConfigurationHelper::writeDirectKey(
-        m_xSMGR,
+        comphelper::getComponentContext(m_xSMGR),
         rtl::OUString(CFG_PACKAGE_RECOVERY),
         rtl::OUString(CFG_PATH_RECOVERYINFO),
         rtl::OUString(CFG_ENTRY_SESSIONDATA),
@@ -3275,7 +3275,7 @@ void SAL_CALL AutoRecovery::getFastPropertyValue(css::uno::Any& aValue ,
                 {
                     sal_Bool bSessionData  = sal_False;
                     ::comphelper::ConfigurationHelper::readDirectKey(
-                                                    m_xSMGR,
+                                                    comphelper::getComponentContext(m_xSMGR),
                                                     rtl::OUString(CFG_PACKAGE_RECOVERY),
                                                     rtl::OUString(CFG_PATH_RECOVERYINFO),
                                                     rtl::OUString(CFG_ENTRY_SESSIONDATA),
@@ -3294,7 +3294,7 @@ void SAL_CALL AutoRecovery::getFastPropertyValue(css::uno::Any& aValue ,
 
         case AUTORECOVERY_PROPHANDLE_CRASHED :
                 aValue = ::comphelper::ConfigurationHelper::readDirectKey(
-                            m_xSMGR,
+                            comphelper::getComponentContext(m_xSMGR),
                             rtl::OUString(CFG_PACKAGE_RECOVERY),
                             rtl::OUString(CFG_PATH_RECOVERYINFO),
                             rtl::OUString(CFG_ENTRY_CRASHED),
@@ -3303,7 +3303,7 @@ void SAL_CALL AutoRecovery::getFastPropertyValue(css::uno::Any& aValue ,
 
         case AUTORECOVERY_PROPHANDLE_EXISTS_SESSIONDATA :
                 aValue = ::comphelper::ConfigurationHelper::readDirectKey(
-                            m_xSMGR,
+                            comphelper::getComponentContext(m_xSMGR),
                             rtl::OUString(CFG_PACKAGE_RECOVERY),
                             rtl::OUString(CFG_PATH_RECOVERYINFO),
                             rtl::OUString(CFG_ENTRY_SESSIONDATA),
diff --git a/framework/source/services/modulemanager.cxx b/framework/source/services/modulemanager.cxx
index df2a40f..307e3fc 100644
--- a/framework/source/services/modulemanager.cxx
+++ b/framework/source/services/modulemanager.cxx
@@ -194,7 +194,7 @@ void SAL_CALL ModuleManager::replaceByName(const ::rtl::OUString& sName ,
     // flush changes (because an error occurred) we will read them later. If we use a different config access
     // we can close it without a flush ... and our read data wont be affected .-)
     css::uno::Reference< css::uno::XInterface >         xCfg      = ::comphelper::ConfigurationHelper::openConfig(
-                                                                        xSMGR,
+                                                                        comphelper::getComponentContext(xSMGR),
                                                                         rtl::OUString(CFGPATH_FACTORIES),
                                                                         ::comphelper::ConfigurationHelper::E_STANDARD);
     css::uno::Reference< css::container::XNameAccess >  xModules (xCfg, css::uno::UNO_QUERY_THROW);
@@ -333,7 +333,7 @@ css::uno::Reference< css::container::XNameAccess > ModuleManager::implts_getConf
     try
     {
         xCfg = ::comphelper::ConfigurationHelper::openConfig(
-                    xSMGR,
+                    comphelper::getComponentContext(xSMGR),
                     rtl::OUString(CFGPATH_FACTORIES),
                     ::comphelper::ConfigurationHelper::E_READONLY);
     }
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index f869886..00b807b 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -1112,7 +1112,7 @@ css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgOld()
     {
         xCfg = css::uno::Reference< css::container::XNameAccess >(
                    ::comphelper::ConfigurationHelper::openConfig(
-                        xSMGR,
+                        comphelper::getComponentContext(xSMGR),
                         CFG_NODE_OLD,
                         ::comphelper::ConfigurationHelper::E_STANDARD), // not readonly! Somtimes we need write access there !!!
                    css::uno::UNO_QUERY_THROW);
@@ -1142,7 +1142,7 @@ css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgNew()
     {
         xCfg = css::uno::Reference< css::container::XNameAccess >(
                    ::comphelper::ConfigurationHelper::openConfig(
-                        xSMGR,
+                        comphelper::getComponentContext(xSMGR),
                         CFG_NODE_NEW,
                         ::comphelper::ConfigurationHelper::E_STANDARD),
                    css::uno::UNO_QUERY_THROW);
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index f554854..23d7b77 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -698,7 +698,7 @@ rtl::OUString SubstitutePathVariables::GetWorkPath() const
     try
     {
         ::comphelper::ConfigurationHelper::readDirectKey(
-                            m_xServiceManager,
+                            comphelper::getComponentContext(m_xServiceManager),
                             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Paths")),
                             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Paths/Work")),
                             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WritePath")),
@@ -723,7 +723,7 @@ rtl::OUString SubstitutePathVariables::GetWorkVariableValue() const
     try
     {
         ::comphelper::ConfigurationHelper::readDirectKey(
-                            m_xServiceManager,
+                            comphelper::getComponentContext(m_xServiceManager),
                             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Paths")),
                             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Variables")),
                             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Work")),
diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx
index 59eb891..9498c9f 100644
--- a/oox/source/ole/vbaproject.cxx
+++ b/oox/source/ole/vbaproject.cxx
@@ -92,8 +92,7 @@ VbaFilterConfig::VbaFilterConfig( const Reference< XComponentContext >& rxContex
     {
         OSL_ENSURE( !rConfigCompName.isEmpty(), "VbaFilterConfig::VbaFilterConfig - invalid configuration component name" );
         OUString aConfigPackage = CREATE_OUSTRING( "org.openoffice.Office." ) + rConfigCompName;
-        Reference< XMultiServiceFactory > xFactory( rxContext->getServiceManager(), UNO_QUERY_THROW );
-        mxConfigAccess = ConfigurationHelper::openConfig( xFactory, aConfigPackage, ConfigurationHelper::E_READONLY );
+        mxConfigAccess = ConfigurationHelper::openConfig( rxContext, aConfigPackage, ConfigurationHelper::E_READONLY );
     }
     catch(const Exception& )
     {
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 1d1798f..348f1c1 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -999,7 +999,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
                     try
                     {
                         // get registered protocol handlers from configuration
-                        Reference < XNameAccess > xAccess( ::comphelper::ConfigurationHelper::openConfig( ::comphelper::getProcessServiceFactory(),
+                        Reference < XNameAccess > xAccess( ::comphelper::ConfigurationHelper::openConfig( ::comphelper::getProcessComponentContext(),
                             ::rtl::OUString("org.openoffice.Office.ProtocolHandler/HandlerSet"), ::comphelper::ConfigurationHelper::E_READONLY ), UNO_QUERY );
                         if ( xAccess.is() )
                         {
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 450da3e..c008ca2 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1002,7 +1002,7 @@ static ::rtl::OUString getConfigurationStringValue(
     try
     {
         ::comphelper::ConfigurationHelper::readDirectKey(
-            comphelper::getProcessServiceFactory(),
+            comphelper::getProcessComponentContext(),
             rPackage,
             rRelPath,
             rKey,
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 1441c36..3e39f64 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2170,7 +2170,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText )
 {
     sCurrentFactory = SfxHelp::GetCurrentModuleIdentifier();
 
-    Reference< XMultiServiceFactory > xMultiServiceFac = ::comphelper::getProcessServiceFactory();
+    Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
     Reference< XInterface > xConfig;
     ::rtl::OUString sPath( PATH_OFFICE_FACTORIES );
     sPath += sCurrentFactory;
@@ -2185,7 +2185,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText )
     try
     {
         xConfiguration = ConfigurationHelper::openConfig(
-            xMultiServiceFac, PACKAGE_SETUP, ConfigurationHelper::E_STANDARD );
+            xContext, PACKAGE_SETUP, ConfigurationHelper::E_STANDARD );
         if ( xConfiguration.is() )
         {
             Any aAny = ConfigurationHelper::readRelativeKey( xConfiguration, sPath, sKey );
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 4caac05..a183008 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -224,7 +224,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri
         {
             uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
             uno::Reference< uno::XInterface > xConfig = ::comphelper::ConfigurationHelper::openConfig(
-                xFactory, CONF_ROOT, ::comphelper::ConfigurationHelper::E_STANDARD );
+                ::comphelper::getProcessComponentContext(), CONF_ROOT, ::comphelper::ConfigurationHelper::E_STANDARD );
 
             ::rtl::OUString aActualFilter;
             ::comphelper::ConfigurationHelper::readRelativeKey( xConfig, CONF_PATH, PROP_ACTUAL_FILTER ) >>= aActualFilter;
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 995be9c..4d5227b 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -143,7 +143,7 @@ bool IsSystemFileLockingUsed()
     {
 
         uno::Reference< uno::XInterface > xCommonConfig = ::comphelper::ConfigurationHelper::openConfig(
-                            ::comphelper::getProcessServiceFactory(),
+                            ::comphelper::getProcessComponentContext(),
                             ::rtl::OUString( "/org.openoffice.Office.Common"  ),
                             ::comphelper::ConfigurationHelper::E_STANDARD );
         if ( !xCommonConfig.is() )
@@ -170,7 +170,7 @@ bool IsOOoLockFileUsed()
     {
 
         uno::Reference< uno::XInterface > xCommonConfig = ::comphelper::ConfigurationHelper::openConfig(
-                            ::comphelper::getProcessServiceFactory(),
+                            ::comphelper::getProcessComponentContext(),
                             ::rtl::OUString( "/org.openoffice.Office.Common"  ),
                             ::comphelper::ConfigurationHelper::E_STANDARD );
         if ( !xCommonConfig.is() )
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 3add4b1..f90432f 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -612,7 +612,7 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus )
         // check whether save is acceptable by the configuration
         // it is done only for documents that have persistence already
         uno::Reference< uno::XInterface > xCommonConfig = ::comphelper::ConfigurationHelper::openConfig(
-                            m_pOwner->GetServiceFactory(),
+                            comphelper::getComponentContext(m_pOwner->GetServiceFactory()),
                             ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common" ) ),
                             ::comphelper::ConfigurationHelper::E_STANDARD );
         if ( !xCommonConfig.is() )
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 09e1d55..c963fe6 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2327,7 +2327,7 @@ sal_Bool impl_maxOpenDocCountReached()
     {
         css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
         css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey(
-                                xSMGR,
+                                ::comphelper::getProcessComponentContext(),
                                 ::rtl::OUString("org.openoffice.Office.Common/"),
                                 ::rtl::OUString("Misc"),
                                 ::rtl::OUString("MaxOpenDocuments"),
diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx
index 148cb0e..d6f9838 100644
--- a/svtools/source/config/accessibilityoptions.cxx
+++ b/svtools/source/config/accessibilityoptions.cxx
@@ -123,7 +123,7 @@ SvtAccessibilityOptions_Impl::SvtAccessibilityOptions_Impl()
     {
         m_xCfg = css::uno::Reference< css::container::XNameAccess >(
             ::comphelper::ConfigurationHelper::openConfig(
-            comphelper::getProcessServiceFactory(),
+            comphelper::getProcessComponentContext(),
             s_sAccessibility,
             ::comphelper::ConfigurationHelper::E_STANDARD),
             css::uno::UNO_QUERY);
diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx
index 724ecb8..f3fcc4d 100644
--- a/svtools/source/config/printoptions.cxx
+++ b/svtools/source/config/printoptions.cxx
@@ -163,7 +163,7 @@ SvtPrintOptions_Impl::SvtPrintOptions_Impl(const OUString& rConfigRoot)
     {
         m_xCfg = css::uno::Reference< css::container::XNameAccess >(
             ::comphelper::ConfigurationHelper::openConfig(
-            comphelper::getProcessServiceFactory(),
+            comphelper::getProcessComponentContext(),
             ROOTNODE_PRINTOPTION,
             ::comphelper::ConfigurationHelper::E_STANDARD),
             css::uno::UNO_QUERY);
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index 7abb0fb..cde54e5 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -1036,7 +1036,7 @@ RecoveryDialog::RecoveryDialog(Window*       pParent,
 
     sal_Bool bCrashRepEnabled( sal_False );
     css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey(
-                                pCore->getSMGR(),
+                                comphelper::getComponentContext(pCore->getSMGR()),
                                 CFG_PACKAGE_RECOVERY,
                                 CFG_PATH_CRASHREPORTER,
                                 CFG_ENTRY_ENABLED,
diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx
index 27e81e9..6d72a8d 100644
--- a/svx/source/unodraw/recoveryui.cxx
+++ b/svx/source/unodraw/recoveryui.cxx
@@ -33,6 +33,7 @@
 #include <com/sun/star/beans/NamedValue.hpp>
 #include <osl/file.hxx>
 #include <rtl/bootstrap.hxx>
+#include <comphelper/processfactory.hxx>
 #include <comphelper/configurationhelper.hxx>
 
 #include <vcl/svapp.hxx>
@@ -290,7 +291,7 @@ void RecoveryUI::impl_doRecovery()
 
     sal_Bool bCrashRepEnabled(sal_False);
     css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey(
-                                m_xSMGR,
+                                comphelper::getComponentContext(m_xSMGR),
                                 CFG_PACKAGE_RECOVERY,
                                 CFG_PATH_CRASHREPORTER,
                                 CFG_ENTRY_ENABLED,
diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx
index 00ff168..1415550 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -138,14 +138,14 @@ SvtHistoryOptions_Impl::SvtHistoryOptions_Impl()
     {
         m_xCfg = Reference< css::container::XNameAccess > (
             ::comphelper::ConfigurationHelper::openConfig(
-            ::comphelper::getProcessServiceFactory(),
+            ::comphelper::getProcessComponentContext(),
             rtl::OUString(s_sHistories),
             ::comphelper::ConfigurationHelper::E_STANDARD),
             css::uno::UNO_QUERY );
 
         m_xCommonXCU = Reference< css::container::XNameAccess > (
             ::comphelper::ConfigurationHelper::openConfig(
-            ::comphelper::getProcessServiceFactory(),
+            ::comphelper::getProcessComponentContext(),
             rtl::OUString(s_sCommonHistory),
             ::comphelper::ConfigurationHelper::E_STANDARD),
             css::uno::UNO_QUERY );
diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx
index 18fc09a..7f43c5a 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -552,7 +552,7 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl()
     try
     {
     css::uno::Reference< css::uno::XInterface > xCFG = ::comphelper::ConfigurationHelper::openConfig(
-        ::comphelper::getProcessServiceFactory(),
+        ::comphelper::getProcessComponentContext(),
         ::rtl::OUString("org.openoffice.Office.Recovery"),
         ::comphelper::ConfigurationHelper::E_READONLY);
 
@@ -739,7 +739,7 @@ void SvtSaveOptions_Impl::Commit()
     PutProperties( aNames, aValues );
 
     css::uno::Reference< css::uno::XInterface > xCFG = ::comphelper::ConfigurationHelper::openConfig(
-        ::comphelper::getProcessServiceFactory(),
+        ::comphelper::getProcessComponentContext(),
         ::rtl::OUString("org.openoffice.Office.Recovery"),
         ::comphelper::ConfigurationHelper::E_STANDARD);
 
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx
index 1da014a..8af1121 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -146,7 +146,7 @@ SvtUserOptions::Impl::Impl() :
     {
         m_xCfg = uno::Reference<container::XNameAccess>(
             comphelper::ConfigurationHelper::openConfig(
-                comphelper::getProcessServiceFactory(),
+                comphelper::getProcessComponentContext(),
                 sData,
                 comphelper::ConfigurationHelper::E_STANDARD
             ),
diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx
index 2b4ffbc..688e1ec 100644
--- a/unotools/source/config/viewoptions.cxx
+++ b/unotools/source/config/viewoptions.cxx
@@ -335,7 +335,7 @@ SvtViewOptionsBase_Impl::SvtViewOptionsBase_Impl( const ::rtl::OUString& sList )
     {
         m_xRoot = css::uno::Reference< css::container::XNameAccess >(
                         ::comphelper::ConfigurationHelper::openConfig(
-                            ::comphelper::getProcessServiceFactory(),
+                            ::comphelper::getProcessComponentContext(),
                             PACKAGE_VIEWS,
                             ::comphelper::ConfigurationHelper::E_STANDARD),
                         css::uno::UNO_QUERY);
diff --git a/uui/source/newerverwarn.cxx b/uui/source/newerverwarn.cxx
index a164782..d7c8b96 100644
--- a/uui/source/newerverwarn.cxx
+++ b/uui/source/newerverwarn.cxx
@@ -118,7 +118,7 @@ IMPL_LINK_NOARG(NewerVersionWarningDialog, UpdateHdl)
             // updates enabled", but this here is not an automatic update, but one triggered explicitly by the user.
 
             uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey(
-                                    aContext.getLegacyServiceFactory(),
+                                    aContext.getUNOContext(),
                                     DEFINE_CONST_UNICODE("org.openoffice.Office.Addons/"),
                                     DEFINE_CONST_UNICODE("AddonUI/OfficeHelp/UpdateCheckJob"),
                                     DEFINE_CONST_UNICODE("URL"),
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 40d75bf..d3be1ba 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -949,9 +949,9 @@ void Edit::ImplInsertText( const rtl::OUString& rStr, const Selection* pNewSel,
         // get access to the configuration of this office module
         try
         {
-            uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
+            uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
             uno::Reference< container::XNameAccess > xModuleCfg( ::comphelper::ConfigurationHelper::openConfig(
-                                    xMSF,
+                                    xContext,
                                     sModule,
                                     ::comphelper::ConfigurationHelper::E_READONLY ),
                                 uno::UNO_QUERY );
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 069e94c..c371723 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -76,14 +76,14 @@ using namespace ::rtl;
 namespace writerfilter {
 namespace dmapper{
 
-sal_Bool lcl_IsUsingEnhancedFields( const uno::Reference< lang::XMultiServiceFactory >& rFac )
+sal_Bool lcl_IsUsingEnhancedFields( const uno::Reference< uno::XComponentContext >& rxContext )
 {
     bool bResult(sal_False);
     try
     {
         OUString writerConfig = "org.openoffice.Office.Common";
 
-        uno::Reference< uno::XInterface > xCfgAccess = ::comphelper::ConfigurationHelper::openConfig( rFac, writerConfig, ::comphelper::ConfigurationHelper::E_READONLY );
+        uno::Reference< uno::XInterface > xCfgAccess = ::comphelper::ConfigurationHelper::openConfig( rxContext, writerConfig, ::comphelper::ConfigurationHelper::E_READONLY );
         ::comphelper::ConfigurationHelper::readRelativeKey( xCfgAccess, OUString( "Filter/Microsoft/Import"  ), OUString( "ImportWWFieldsAsEnhancedFields"  ) ) >>= bResult;
 
     }
@@ -198,7 +198,7 @@ DomainMapper_Impl::DomainMapper_Impl(
     getTableManager( ).setHandler(m_pTableHandler);
 
     getTableManager( ).startLevel();
-    m_bUsingEnhancedFields = lcl_IsUsingEnhancedFields( uno::Reference< lang::XMultiServiceFactory >( m_xComponentContext->getServiceManager(), uno::UNO_QUERY ) );
+    m_bUsingEnhancedFields = lcl_IsUsingEnhancedFields( m_xComponentContext );
 
 }
 


More information about the Libreoffice-commits mailing list