summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-16 14:05:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-24 11:29:53 +0200
commite8aa70b5d44a6cbedacfe0e5d1b1da2c76a3c588 (patch)
tree2cb20208eb30391718b57c6302d3dcd6b2e99673 /sfx2/source
parent3688466ab127d7801b4cb752ee6205cc04acb2f7 (diff)
fdo#46808, convert comphelper::ConfigurationHelper to XComponentContext
Convert the helper methods to take an XComponentContext parameter, instead of XMultiServiceFactory. Change-Id: I9f0098af37b91f107d8799f14caa04756eac82b1
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/appopen.cxx2
-rw-r--r--sfx2/source/appl/appserv.cxx2
-rw-r--r--sfx2/source/appl/newhelp.cxx4
-rw-r--r--sfx2/source/doc/docfac.cxx2
-rw-r--r--sfx2/source/doc/docfile.cxx4
-rw-r--r--sfx2/source/doc/guisaveas.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx2
7 files changed, 9 insertions, 9 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 1d1798ffb659..348f1c11f172 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 450da3e9eebc..c008ca2286db 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 1441c36db915..3e39f645395c 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 4caac052801c..a183008549c9 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 995be9cad8fe..4d5227b73658 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 3add4b1aacfe..f90432f12006 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 09e1d55a63bd..c963fe6ed345 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"),