[Libreoffice-commits] core.git: sd/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 3 15:29:42 UTC 2019
sd/source/ui/sidebar/MasterPageContainer.cxx | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 5c5a56797d25917686f394a8c47ee77de674ffec
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Dec 3 11:59:00 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Dec 3 16:28:19 2019 +0100
use scoped enum
Change-Id: If2dce427fd8d52224996aaef93081d5a2e239893
Reviewed-on: https://gerrit.libreoffice.org/84322
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
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)
More information about the Libreoffice-commits
mailing list