summaryrefslogtreecommitdiff
path: root/comphelper/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 /comphelper/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 'comphelper/source')
-rw-r--r--comphelper/source/misc/configurationhelper.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/comphelper/source/misc/configurationhelper.cxx b/comphelper/source/misc/configurationhelper.cxx
index 1ace6f28ebcf..7c16385fd3cc 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);
}