diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-22 15:25:59 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-25 10:32:24 +0200 |
commit | 4de86ac0c62b446426136b620cfd65d088c51cd8 (patch) | |
tree | 2b2118247af23b7780550ce6f53ef497ab332a9c /vcl/source | |
parent | 65be8fd0f7f30eaca4fbc35e3fdc9cb7763cb44d (diff) |
convert ACTIVATE_MODE constants to scoped enum
Change-Id: Ica20e033d5cde8a0c18eff51c63c66e6a3845fd0
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/brdwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/event.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/stacking.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/wrkwin.cxx | 2 |
10 files changed, 15 insertions, 15 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 0d6ab4edab21..a614b3a7300a 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1884,7 +1884,7 @@ void ImplBorderWindow::Deactivate() { // remove active windows from the ruler, also ignore the Deactivate // if a menu becomes active - if ( GetActivateMode() && !ImplGetSVData()->maWinData.mbNoDeactivate ) + if ( GetActivateMode() != ActivateModeFlags::NONE && !ImplGetSVData()->maWinData.mbNoDeactivate ) SetDisplayActive( false ); Window::Deactivate(); } diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index c73308903b47..063e96f0c8a9 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -427,7 +427,7 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag ) mpWindowImpl->mpRealParent = pParent; } - SetActivateMode( ACTIVATE_MODE_GRABFOCUS ); + SetActivateMode( ActivateModeFlags::GrabFocus ); ImplInitSettings(); } diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 61c11ab20bdd..0c201b9b0c37 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -515,17 +515,17 @@ void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow, pOldRealWindow = pOldOverlapWindow->ImplGetWindow(); pNewRealWindow = pNewOverlapWindow->ImplGetWindow(); if ( (pOldRealWindow->GetType() != WINDOW_FLOATINGWINDOW) || - pOldRealWindow->GetActivateMode() ) + pOldRealWindow->GetActivateMode() != ActivateModeFlags::NONE ) { if ( (pNewRealWindow->GetType() == WINDOW_FLOATINGWINDOW) && - !pNewRealWindow->GetActivateMode() ) + pNewRealWindow->GetActivateMode() == ActivateModeFlags::NONE) { pSVData->maWinData.mpLastDeacWin = pOldOverlapWindow; bCallDeactivate = false; } } else if ( (pNewRealWindow->GetType() != WINDOW_FLOATINGWINDOW) || - pNewRealWindow->GetActivateMode() ) + pNewRealWindow->GetActivateMode() != ActivateModeFlags::NONE ) { if ( pSVData->maWinData.mpLastDeacWin ) { diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 28a40d09c062..f9abdf6cfc01 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -119,7 +119,7 @@ void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle ) mpWindowImpl->mpRealParent = pParent; } } - SetActivateMode( 0 ); + SetActivateMode( ActivateModeFlags::NONE ); mpNextFloat = NULL; mpFirstPopupModeWin = NULL; diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx index 596f49ae00b2..8c6c97be2c7e 100644 --- a/vcl/source/window/stacking.cxx +++ b/vcl/source/window/stacking.cxx @@ -392,12 +392,12 @@ void Window::ImplFocusToTop( sal_uInt16 nFlags, bool bReallyVisible ) // should always find the belonging BorderWindow if ( !pFocusWindow->mpWindowImpl->mpBorderWindow ) { - if ( pFocusWindow->mpWindowImpl->mnActivateMode & ACTIVATE_MODE_GRABFOCUS ) + if ( pFocusWindow->mpWindowImpl->mnActivateMode & ActivateModeFlags::GrabFocus ) break; } pFocusWindow = pFocusWindow->ImplGetParent(); } - if ( (pFocusWindow->mpWindowImpl->mnActivateMode & ACTIVATE_MODE_GRABFOCUS) && + if ( (pFocusWindow->mpWindowImpl->mnActivateMode & ActivateModeFlags::GrabFocus) && !pFocusWindow->HasChildPathFocus( true ) ) pFocusWindow->GrabFocus(); } diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index d348e2b15e84..4e46c8acb74c 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -69,7 +69,7 @@ void SystemWindow::Init() { mpImplData = new ImplData; mpWindowImpl->mbSysWin = true; - mpWindowImpl->mnActivateMode = ACTIVATE_MODE_GRABFOCUS; + mpWindowImpl->mnActivateMode = ActivateModeFlags::GrabFocus; mpMenuBar = NULL; mbPinned = false; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index a916bc66c4d1..8a5d7d8f0844 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -655,7 +655,7 @@ WindowImpl::WindowImpl( WindowType nType ) mnWaitCount = 0; // Wait-Count (>1 == Warte-MousePointer) mnPaintFlags = 0; // Flags for ImplCallPaint mnParentClipMode = 0; // Flags for Parent-ClipChildren-Mode - mnActivateMode = 0; // Will be converted in System/Overlap-Windows + mnActivateMode = ActivateModeFlags::NONE; // Will be converted in System/Overlap-Windows mnDlgCtrlFlags = 0; // DialogControl-Flags mnLockCount = 0; // LockCount meAlwaysInputMode = AlwaysInputNone; // neither AlwaysEnableInput nor AlwaysDisableInput called @@ -2798,7 +2798,7 @@ void Window::AlwaysDisableInput( bool bAlways, bool bChild ) } } -void Window::SetActivateMode( sal_uInt16 nMode ) +void Window::SetActivateMode( ActivateModeFlags nMode ) { if ( mpWindowImpl->mpBorderWindow ) @@ -2809,7 +2809,7 @@ void Window::SetActivateMode( sal_uInt16 nMode ) mpWindowImpl->mnActivateMode = nMode; // possibly trigger Decativate/Activate - if ( mpWindowImpl->mnActivateMode ) + if ( mpWindowImpl->mnActivateMode != ActivateModeFlags::NONE ) { if ( (mpWindowImpl->mbActive || (GetType() == WINDOW_BORDERWINDOW)) && !HasChildPathFocus( true ) ) diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 5e8c8f859d82..17cc082cac1d 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1284,7 +1284,7 @@ bool Window::IsAlwaysEnableInput() const return mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled; } -sal_uInt16 Window::GetActivateMode() const +ActivateModeFlags Window::GetActivateMode() const { return mpWindowImpl->mnActivateMode; diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index d3c43b03eb3d..4331a4037905 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1760,7 +1760,7 @@ static void ImplActivateFloatingWindows( vcl::Window* pWindow, bool bActive ) vcl::Window* pTempWindow = pWindow->ImplGetWindowImpl()->mpFirstOverlap; while ( pTempWindow ) { - if ( !pTempWindow->GetActivateMode() ) + if ( pTempWindow->GetActivateMode() == ActivateModeFlags::NONE ) { if ( (pTempWindow->GetType() == WINDOW_BORDERWINDOW) && (pTempWindow->ImplGetWindow()->GetType() == WINDOW_FLOATINGWINDOW) ) diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx index 136adc859d84..78d0b24951dd 100644 --- a/vcl/source/window/wrkwin.cxx +++ b/vcl/source/window/wrkwin.cxx @@ -64,7 +64,7 @@ void WorkWindow::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentDat pSVData->maWinData.mpAppWin = this; } - SetActivateMode( ACTIVATE_MODE_GRABFOCUS ); + SetActivateMode( ActivateModeFlags::GrabFocus ); } void WorkWindow::ImplInit( vcl::Window* pParent, WinBits nStyle, const ::com::sun::star::uno::Any& aSystemWorkWindowToken ) |