diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-12-03 11:59:00 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-12-03 16:28:19 +0100 |
commit | 5c5a56797d25917686f394a8c47ee77de674ffec (patch) | |
tree | b9a7e974b634277f59366eb7599efbe154eca9e5 /sd | |
parent | 48f845dace0aa7a607914db9febdaf73073ea607 (diff) |
use scoped enum
Change-Id: If2dce427fd8d52224996aaef93081d5a2e239893
Reviewed-on: https://gerrit.libreoffice.org/84322
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/sidebar/MasterPageContainer.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx index d8552ec5e91d..18ad57d14a3c 100644 --- a/sd/source/ui/sidebar/MasterPageContainer.cxx +++ b/sd/source/ui/sidebar/MasterPageContainer.cxx @@ -118,7 +118,8 @@ private: }; friend class Deleter; - enum InitializationState { NOT_INITIALIZED, INITIALIZING, INITIALIZED } meInitializationState; + enum class InitializationState { NotInitialized, Initializing, Initialized }; + InitializationState meInitializationState; std::unique_ptr<MasterPageContainerQueue> mpRequestQueue; css::uno::Reference<css::frame::XModel> mxModel; @@ -469,7 +470,7 @@ bool MasterPageContainer::RequestPreview (Token aToken) MasterPageContainer::Implementation::Implementation() : maMutex(), maContainer(), - meInitializationState(NOT_INITIALIZED), + meInitializationState(InitializationState::NotInitialized), mpDocument(nullptr), maPreviewRenderer(), mbFirstPageObjectSeen(false), @@ -510,10 +511,10 @@ void MasterPageContainer::Implementation::LateInit() { const ::osl::MutexGuard aGuard (maMutex); - if (meInitializationState != NOT_INITIALIZED) + if (meInitializationState != InitializationState::NotInitialized) return; - meInitializationState = INITIALIZING; + meInitializationState = InitializationState::Initializing; OSL_ASSERT(Instance().get()==this); mpRequestQueue.reset(MasterPageContainerQueue::Create( @@ -524,7 +525,7 @@ void MasterPageContainer::Implementation::LateInit() 5, 50); - meInitializationState = INITIALIZED; + meInitializationState = InitializationState::Initialized; } void MasterPageContainer::Implementation::AddChangeListener (const Link<MasterPageContainerChangeEvent&,void>& rLink) |