diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-23 13:32:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-24 11:48:38 +0200 |
commit | 0839f90394d96cf0fe414913527b3e3e5ba3c86a (patch) | |
tree | b30ad360ae30797d9944453e6cface25db4c59c7 /comphelper | |
parent | a9a04f11a6b3938aa2d8d0f8f21a866c65b761da (diff) |
convert EConfigurationModes to scoped enum
Change-Id: I1e81c8d637e738f536f7efad8b67d0c9183e6483
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/configurationhelper.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/comphelper/source/misc/configurationhelper.cxx b/comphelper/source/misc/configurationhelper.cxx index d802ea137f3a..f5eb95ec4dfe 100644 --- a/comphelper/source/misc/configurationhelper.cxx +++ b/comphelper/source/misc/configurationhelper.cxx @@ -31,8 +31,8 @@ namespace comphelper{ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext, - const OUString& sPackage, - sal_Int32 eMode ) + const OUString& sPackage, + EConfigurationModes eMode ) { css::uno::Reference< css::lang::XMultiServiceFactory > xConfigProvider( css::configuration::theDefaultProvider::get( rxContext ) ); @@ -46,7 +46,7 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(cons lParams.push_back(css::uno::makeAny(aParam)); // enable all locales mode - if ((eMode & ConfigurationHelper::E_ALL_LOCALES)==ConfigurationHelper::E_ALL_LOCALES) + if (eMode & EConfigurationModes::AllLocales) { aParam.Name = "locale"; aParam.Value <<= OUString("*"); @@ -54,7 +54,7 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(cons } // enable lazy writing - bool bLazy = ((eMode & ConfigurationHelper::E_LAZY_WRITE)==ConfigurationHelper::E_LAZY_WRITE); + bool bLazy(eMode & EConfigurationModes::LazyWrite); aParam.Name = "lazywrite"; aParam.Value = css::uno::makeAny(bLazy); lParams.push_back(css::uno::makeAny(aParam)); @@ -62,7 +62,7 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(cons // open it css::uno::Reference< css::uno::XInterface > xCFG; - bool bReadOnly = ((eMode & ConfigurationHelper::E_READONLY)==ConfigurationHelper::E_READONLY); + bool bReadOnly(eMode & EConfigurationModes::ReadOnly); if (bReadOnly) xCFG = xConfigProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", @@ -158,7 +158,7 @@ css::uno::Any ConfigurationHelper::readDirectKey(const css::uno::Reference< css: const OUString& sPackage, const OUString& sRelPath, const OUString& sKey , - sal_Int32 eMode ) + EConfigurationModes eMode ) { css::uno::Reference< css::uno::XInterface > xCFG = ConfigurationHelper::openConfig(rxContext, sPackage, eMode); return ConfigurationHelper::readRelativeKey(xCFG, sRelPath, sKey); @@ -169,8 +169,8 @@ void ConfigurationHelper::writeDirectKey(const css::uno::Reference< css::uno::XC const OUString& sPackage, const OUString& sRelPath, const OUString& sKey , - const css::uno::Any& aValue , - sal_Int32 eMode ) + const css::uno::Any& aValue , + EConfigurationModes eMode ) { css::uno::Reference< css::uno::XInterface > xCFG = ConfigurationHelper::openConfig(rxContext, sPackage, eMode); ConfigurationHelper::writeRelativeKey(xCFG, sRelPath, sKey, aValue); |