diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-12 09:19:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-12 10:11:19 +0200 |
commit | 4b1b17f40aaeac23bd03e676f8c0739ad5765646 (patch) | |
tree | f3b8381a99dcddffbe5537761543d3af08c631b7 /sd/source/ui/tools/IdleDetection.cxx | |
parent | convert STLPropertyState constants to scoped enum (diff) | |
download | core-4b1b17f40aaeac23bd03e676f8c0739ad5765646.tar.gz core-4b1b17f40aaeac23bd03e676f8c0739ad5765646.zip |
convert IDET flags to typed_flags
Change-Id: Iaaea3b3693ab4c67a60e48e7de8865413e8e246b
Diffstat (limited to 'sd/source/ui/tools/IdleDetection.cxx')
-rw-r--r-- | sd/source/ui/tools/IdleDetection.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sd/source/ui/tools/IdleDetection.cxx b/sd/source/ui/tools/IdleDetection.cxx index e5e9dab48ba4..b2e31e93270c 100644 --- a/sd/source/ui/tools/IdleDetection.cxx +++ b/sd/source/ui/tools/IdleDetection.cxx @@ -33,25 +33,25 @@ using namespace ::com::sun::star; namespace sd { namespace tools { -sal_Int32 IdleDetection::GetIdleState (const vcl::Window* pWindow) +IdleState IdleDetection::GetIdleState (const vcl::Window* pWindow) { - sal_Int32 nResult (CheckInputPending() | CheckSlideShowRunning()); + IdleState nResult (CheckInputPending() | CheckSlideShowRunning()); if (pWindow != nullptr) nResult |= CheckWindowPainting(*pWindow); return nResult; } -sal_Int32 IdleDetection::CheckInputPending() +IdleState IdleDetection::CheckInputPending() { if (Application::AnyInput(VclInputFlags::MOUSE | VclInputFlags::KEYBOARD | VclInputFlags::PAINT)) - return IDET_SYSTEM_EVENT_PENDING; + return IdleState::SystemEventPending; else - return IDET_IDLE; + return IdleState::Idle; } -sal_Int32 IdleDetection::CheckSlideShowRunning() +IdleState IdleDetection::CheckSlideShowRunning() { - sal_Int32 eResult (IDET_IDLE); + IdleState eResult (IdleState::Idle); bool bIsSlideShowShowing = false; @@ -83,9 +83,9 @@ sal_Int32 IdleDetection::CheckSlideShowRunning() if( xSlideShow.is() && xSlideShow->isRunning() ) { if (xSlideShow->isFullScreen()) - eResult |= IDET_FULL_SCREEN_SHOW_ACTIVE; + eResult |= IdleState::FullScreenShowActive; else - eResult |= IDET_WINDOW_SHOW_ACTIVE; + eResult |= IdleState::WindowShowActive; } } } @@ -93,12 +93,12 @@ sal_Int32 IdleDetection::CheckSlideShowRunning() return eResult; } -sal_Int32 IdleDetection::CheckWindowPainting (const vcl::Window& rWindow) +IdleState IdleDetection::CheckWindowPainting (const vcl::Window& rWindow) { if (rWindow.IsInPaint()) - return IDET_WINDOW_PAINTING; + return IdleState::WindowPainting; else - return IDET_IDLE; + return IdleState::Idle; } } } // end of namespace ::sd::tools |