diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-01 14:18:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-02 06:36:48 +0000 |
commit | 1517caa433b001968643ebcdca01c53bf76034d2 (patch) | |
tree | 75adad41c99afe90eee48f866f99784e24acd2e3 /desktop | |
parent | 06eb947c1651cb623cd60d81b08281de4cc6a86b (diff) |
convert some anonymous enums to scoped
Change-Id: Ia989376c983ff475359e4964abeb1f5a2300ff5b
Reviewed-on: https://gerrit.libreoffice.org/31486
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
4 files changed, 15 insertions, 17 deletions
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 81ef9588b334..b27478669263 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -710,20 +710,20 @@ void BackendImpl::PackageImpl::processPackage_( } //No need for live-deployment for bundled extension, because OOo //restarts after installation - if (that->m_eContext != CONTEXT_BUNDLED + if (that->m_eContext != Context::Bundled && !startup) { if (m_isSchema) { css::configuration::Update::get( that->m_xComponentContext)->insertExtensionXcsFile( - that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url)); + that->m_eContext == Context::Shared, expandUnoRcUrl(url)); } else { css::configuration::Update::get( that->m_xComponentContext)->insertExtensionXcuFile( - that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url)); + that->m_eContext == Context::Shared, expandUnoRcUrl(url)); } } that->addToConfigmgrIni( m_isSchema, true, url, xCmdEnv ); diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx index 4b81c5e51197..7393d9ba6b8b 100644 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -76,7 +76,7 @@ PackageRegistryBackend::PackageRegistryBackend( Reference<XComponentContext> const & xContext ) : t_BackendBase( getMutex() ), m_xComponentContext( xContext ), - m_eContext( CONTEXT_UNKNOWN ), + m_eContext( Context::Unknown ), m_readOnly( false ) { assert(xContext.is()); @@ -89,17 +89,17 @@ PackageRegistryBackend::PackageRegistryBackend( m_readOnly = *readOnly; if ( m_context == "user" ) - m_eContext = CONTEXT_USER; + m_eContext = Context::User; else if ( m_context == "shared" ) - m_eContext = CONTEXT_SHARED; + m_eContext = Context::Shared; else if ( m_context == "bundled" ) - m_eContext = CONTEXT_BUNDLED; + m_eContext = Context::Bundled; else if ( m_context == "tmp" ) - m_eContext = CONTEXT_TMP; + m_eContext = Context::Tmp; else if (m_context.matchIgnoreAsciiCase("vnd.sun.star.tdoc:/")) - m_eContext = CONTEXT_DOCUMENT; + m_eContext = Context::Document; else - m_eContext = CONTEXT_UNKNOWN; + m_eContext = Context::Unknown; } diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h index d94d30f1b25c..b126f4b132dd 100644 --- a/desktop/source/deployment/registry/inc/dp_backend.h +++ b/desktop/source/deployment/registry/inc/dp_backend.h @@ -286,10 +286,8 @@ protected: OUString m_context; // currently only for library containers: - enum { - CONTEXT_UNKNOWN, - CONTEXT_USER, CONTEXT_SHARED,CONTEXT_BUNDLED, CONTEXT_TMP, - CONTEXT_DOCUMENT + enum class Context { + Unknown, User, Shared, Bundled, Tmp, Document } m_eContext; bool m_readOnly; diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx index 1e578a370098..e19df09bc353 100644 --- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx +++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx @@ -289,15 +289,15 @@ void BackendImpl::PackageImpl:: initPackageHandler() BackendImpl * that = getMyBackend(); Any aContext; - if ( that->m_eContext == CONTEXT_USER ) + if ( that->m_eContext == Context::User ) { aContext <<= OUString("user"); } - else if ( that->m_eContext == CONTEXT_SHARED ) + else if ( that->m_eContext == Context::Shared ) { aContext <<= OUString("share"); } - else if ( that->m_eContext == CONTEXT_BUNDLED ) + else if ( that->m_eContext == Context::Bundled ) { aContext <<= OUString("bundled"); } |