diff options
-rw-r--r-- | include/vcl/floatwin.hxx | 20 | ||||
-rw-r--r-- | svtools/source/control/calendar.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/layctrl.cxx | 22 | ||||
-rw-r--r-- | svx/source/tbxctrls/lboxctrl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/workctrl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/navipi.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/brdwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dockmgr.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 18 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/menufloatingwindow.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 20 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtksalframe.cxx | 2 |
15 files changed, 57 insertions, 49 deletions
diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx index d02b191aa279..2a35d6e6dc4f 100644 --- a/include/vcl/floatwin.hxx +++ b/include/vcl/floatwin.hxx @@ -58,10 +58,18 @@ namespace o3tl template<> struct typed_flags<FloatWinPopupFlags> : is_typed_flags<FloatWinPopupFlags, 0x03ffff> {}; } -#define FLOATWIN_POPUPMODEEND_CANCEL ((sal_uInt16)0x0001) -#define FLOATWIN_POPUPMODEEND_TEAROFF ((sal_uInt16)0x0002) -#define FLOATWIN_POPUPMODEEND_DONTCALLHDL ((sal_uInt16)0x0004) -#define FLOATWIN_POPUPMODEEND_CLOSEALL ((sal_uInt16)0x0008) +enum class FloatWinPopupEndFlags +{ + NONE = 0x00, + Cancel = 0x01, + TearOff = 0x02, + DontCallHdl = 0x04, + CloseAll = 0x08, +}; +namespace o3tl +{ + template<> struct typed_flags<FloatWinPopupEndFlags> : is_typed_flags<FloatWinPopupEndFlags, 0x0f> {}; +} #define FLOATWIN_TITLE_NORMAL ((sal_uInt16)0x0001) #define FLOATWIN_TITLE_TEAROFF ((sal_uInt16)0x0002) @@ -121,7 +129,7 @@ public: SAL_DLLPRIVATE static Point ImplCalcPos( vcl::Window* pWindow, const Rectangle& rRect, FloatWinPopupFlags nFlags, sal_uInt16& rArrangeIndex ); - SAL_DLLPRIVATE void ImplEndPopupMode( sal_uInt16 nFlags = 0, sal_uLong nFocusId = 0 ); + SAL_DLLPRIVATE void ImplEndPopupMode( FloatWinPopupEndFlags nFlags = FloatWinPopupEndFlags::NONE, sal_uLong nFocusId = 0 ); SAL_DLLPRIVATE Rectangle& ImplGetItemEdgeClipRect(); SAL_DLLPRIVATE bool ImplIsInPrivatePopupMode() const { return mbInPopupMode; } virtual void doDeferredInit(WinBits nBits) SAL_OVERRIDE; @@ -144,7 +152,7 @@ public: void StartPopupMode( const Rectangle& rRect, FloatWinPopupFlags nFlags = FloatWinPopupFlags::NONE ); void StartPopupMode( ToolBox* pBox, FloatWinPopupFlags nFlags = FloatWinPopupFlags::NONE ); - void EndPopupMode( sal_uInt16 nFlags = 0 ); + void EndPopupMode( FloatWinPopupEndFlags nFlags = FloatWinPopupEndFlags::NONE ); void AddPopupModeWindow( vcl::Window* pWindow ); FloatWinPopupFlags GetPopupModeFlags() const { return mnPopupModeFlags; } void SetPopupModeFlags( FloatWinPopupFlags nFlags ) { mnPopupModeFlags = nFlags; } diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 74fb59f6b809..24f5e6af169f 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -2365,7 +2365,7 @@ bool CalendarField::ShowDropDown( bool bShow ) } else { - mpFloatWin->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); + mpFloatWin->EndPopupMode( FloatWinPopupEndFlags::Cancel ); mpCalendar->EndSelection(); EndDropDown(); } diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index cf474801f3a5..40e195179b64 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -203,7 +203,7 @@ void TableWindow::KeyInput( const KeyEvent& rKEvt ) if ( nNewLine > 1 ) nNewLine--; else - EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); + EndPopupMode( FloatWinPopupEndFlags::Cancel ); break; case KEY_DOWN: if ( nNewLine < TABLE_CELLS_VERT ) @@ -215,7 +215,7 @@ void TableWindow::KeyInput( const KeyEvent& rKEvt ) if ( nNewCol > 1 ) nNewCol--; else - EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); + EndPopupMode( FloatWinPopupEndFlags::Cancel ); break; case KEY_RIGHT: if ( nNewCol < TABLE_CELLS_HORIZ ) @@ -224,10 +224,10 @@ void TableWindow::KeyInput( const KeyEvent& rKEvt ) CloseAndShowTableDialog(); break; case KEY_ESCAPE: - EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); + EndPopupMode( FloatWinPopupEndFlags::Cancel ); break; case KEY_RETURN: - EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL ); + EndPopupMode( FloatWinPopupEndFlags::CloseAll ); break; case KEY_TAB: CloseAndShowTableDialog(); @@ -252,7 +252,7 @@ void TableWindow::KeyInput( const KeyEvent& rKEvt ) else if(KEY_MOD1 == nModifier && KEY_RETURN == nKey) { m_bMod1 = true; - EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL ); + EndPopupMode( FloatWinPopupEndFlags::CloseAll ); } if(!bHandled) @@ -264,7 +264,7 @@ void TableWindow::KeyInput( const KeyEvent& rKEvt ) void TableWindow::MouseButtonUp( const MouseEvent& rMEvt ) { SfxPopupWindow::MouseButtonUp( rMEvt ); - EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL ); + EndPopupMode( FloatWinPopupEndFlags::CloseAll ); } @@ -401,7 +401,7 @@ void TableWindow::TableDialog( const Sequence< PropertyValue >& rArgs ) void TableWindow::CloseAndShowTableDialog() { // close the toolbar tool - EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); + EndPopupMode( FloatWinPopupEndFlags::Cancel ); // and open the table dialog instead TableDialog( Sequence< PropertyValue >() ); @@ -595,11 +595,11 @@ void ColumnsWindow::KeyInput( const KeyEvent& rKEvt ) case KEY_RETURN : if(IsMouseCaptured()) ReleaseMouse(); - EndPopupMode(FLOATWIN_POPUPMODEEND_CLOSEALL ); + EndPopupMode(FloatWinPopupEndFlags::CloseAll ); break; case KEY_ESCAPE : case KEY_UP : - EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL); + EndPopupMode( FloatWinPopupEndFlags::Cancel); break; } //make sure that a table can initially be created @@ -617,7 +617,7 @@ void ColumnsWindow::KeyInput( const KeyEvent& rKEvt ) m_bMod1 = true; if(IsMouseCaptured()) ReleaseMouse(); - EndPopupMode(FLOATWIN_POPUPMODEEND_CLOSEALL ); + EndPopupMode(FloatWinPopupEndFlags::CloseAll ); } if(!bHandled) SfxPopupWindow::KeyInput(rKEvt); @@ -631,7 +631,7 @@ void ColumnsWindow::MouseButtonUp( const MouseEvent& rMEvt ) ReleaseMouse(); if ( IsInPopupMode() ) - EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL ); + EndPopupMode( FloatWinPopupEndFlags::CloseAll ); } diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index d83a587d90cd..b4f09219c24f 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -225,7 +225,7 @@ IMPL_LINK_NOARG(SvxListBoxControl, SelectHdl) else { pPopupWin->SetUserSelected( true ); - pPopupWin->EndPopupMode( 0 ); + pPopupWin->EndPopupMode(); } } return 0; diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 142a1746ad59..6bd6b5bd3da8 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -524,7 +524,7 @@ void SwScrollNaviToolBox::MouseButtonUp( const MouseEvent& rMEvt ) { ToolBox::MouseButtonUp(rMEvt); if (m_pNaviPopup->IsInPopupMode()) - m_pNaviPopup->EndPopupMode(FLOATWIN_POPUPMODEEND_CLOSEALL); + m_pNaviPopup->EndPopupMode(FloatWinPopupEndFlags::CloseAll); } void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt ) diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 2bbacde75afb..eae2d9d0f7b9 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -437,7 +437,7 @@ void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, bool bSetFocus SetPopupWindow( pPopup ); if(bSetFocus) { - pPopup->EndPopupMode(FLOATWIN_POPUPMODEEND_TEAROFF); + pPopup->EndPopupMode(FloatWinPopupEndFlags::TearOff); pPopup->GrabFocus(); } } diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 38fd84ca8994..154875792365 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -595,7 +595,7 @@ bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track if ( pBorderWindow->ImplGetClientWindow()->ImplIsFloatingWindow() ) { if ( static_cast<FloatingWindow*>(pBorderWindow->ImplGetClientWindow())->IsInPopupMode() ) - static_cast<FloatingWindow*>(pBorderWindow->ImplGetClientWindow())->EndPopupMode( FLOATWIN_POPUPMODEEND_TEAROFF ); + static_cast<FloatingWindow*>(pBorderWindow->ImplGetClientWindow())->EndPopupMode( FloatWinPopupEndFlags::TearOff ); } } } diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 2d8d937a9669..1931592d100b 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -778,7 +778,7 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt ) if ( rTEvt.IsTrackingEnded() ) { mbMoving = false; - EndPopupMode( FLOATWIN_POPUPMODEEND_TEAROFF ); + EndPopupMode( FloatWinPopupEndFlags::TearOff ); } else if ( !rTEvt.GetMouseEvent().IsSynthetic() ) { diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index f66f92e8cc58..34d1023cc7c6 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -203,7 +203,7 @@ void FloatingWindow::dispose() SetDialogControlFlags( GetDialogControlFlags() | WINDOW_DLGCTRL_FLOATWIN_POPUPMODEEND_CANCEL ); if ( IsInPopupMode() ) - EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL | FLOATWIN_POPUPMODEEND_DONTCALLHDL ); + EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll | FloatWinPopupEndFlags::DontCallHdl ); if ( mnPostId ) Application::RemoveUserEvent( mnPostId ); @@ -745,7 +745,7 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, FloatWinPopupFlags nFlags ) StartPopupMode( aRect, nFlags ); } -void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) +void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, sal_uLong nFocusId ) { if ( !mbInPopupMode ) return; @@ -756,7 +756,7 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) // stop the PopupMode also for all following PopupMode windows while ( pSVData->maWinData.mpFirstFloat && pSVData->maWinData.mpFirstFloat.get() != this ) - pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); + pSVData->maWinData.mpFirstFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel ); // delete window from the list pSVData->maWinData.mpFirstFloat = mpNextFloat; @@ -765,7 +765,7 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) FloatWinPopupFlags nPopupModeFlags = mnPopupModeFlags; // hide window again if it was not deleted - if ( !(nFlags & FLOATWIN_POPUPMODEEND_TEAROFF) || + if ( !(nFlags & FloatWinPopupEndFlags::TearOff) || !(nPopupModeFlags & FloatWinPopupFlags::AllowTearOff) ) { Show( false, SHOW_NOFOCUSCHANGE ); @@ -786,7 +786,7 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) } EnableSaveBackground( mbOldSaveBackMode ); - mbPopupModeCanceled = (nFlags & FLOATWIN_POPUPMODEEND_CANCEL) != 0; + mbPopupModeCanceled = bool(nFlags & FloatWinPopupEndFlags::Cancel); // redo title SetTitleType( mnOldTitle ); @@ -799,18 +799,18 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) } // call PopupModeEnd-Handler depending on parameter - if ( !(nFlags & FLOATWIN_POPUPMODEEND_DONTCALLHDL) ) + if ( !(nFlags & FloatWinPopupEndFlags::DontCallHdl) ) ImplCallPopupModeEnd(); // close all other windows depending on parameter - if ( nFlags & FLOATWIN_POPUPMODEEND_CLOSEALL ) + if ( nFlags & FloatWinPopupEndFlags::CloseAll ) { if ( !(nPopupModeFlags & FloatWinPopupFlags::NewLevel) ) { if ( pSVData->maWinData.mpFirstFloat ) { FloatingWindow* pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat(); - pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + pLastLevelFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); } } } @@ -818,7 +818,7 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) mbInCleanUp = false; } -void FloatingWindow::EndPopupMode( sal_uInt16 nFlags ) +void FloatingWindow::EndPopupMode( FloatWinPopupEndFlags nFlags ) { ImplEndPopupMode( nFlags ); } diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 762eaa264064..0731254ff6c9 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2857,7 +2857,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa { // assure that only one menu is open at a time if (pStartedFrom->IsMenuBar() && pSVData->maWinData.mpFirstFloat) - pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + pSVData->maWinData.mpFirstFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); } DBG_ASSERT( !ImplGetWindow(), "Win?!" ); @@ -3060,7 +3060,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa pWin->SetFocusId( 0 ); pSVData->maWinData.mbNoDeactivate = false; } - pWin->ImplEndPopupMode( 0, nFocusId ); + pWin->ImplEndPopupMode( FloatWinPopupEndFlags::NONE, nFocusId ); if ( nSelectedId ) // then clean up .. ( otherwise done by TH ) { diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 4345e16c2caf..3221294687a9 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -392,7 +392,7 @@ void MenuFloatingWindow::StopExecute( sal_uLong nFocusId ) ImplGetSVData()->maWinData.mbNoDeactivate = false; } } - ImplEndPopupMode( 0, nFocusId ); + ImplEndPopupMode( FloatWinPopupEndFlags::NONE, nFocusId ); aHighlightChangedTimer.Stop(); bInExecute = false; diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index ca0eca0e6eb6..34f3d0e50038 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1588,7 +1588,7 @@ void ToolBox::dispose() // terminate popupmode if the floating window is // still connected if ( mpFloatWin ) - mpFloatWin->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); + mpFloatWin->EndPopupMode( FloatWinPopupEndFlags::Cancel ); mpFloatWin = NULL; // delete private data @@ -4988,7 +4988,7 @@ bool ImplCloseLastPopup( vcl::Window *pParent ) // only close the floater if it is not our direct parent, which would kill ourself if( pLastLevelFloat && pLastLevelFloat != pParent ) { - pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + pLastLevelFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); return true; } } diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 2f5d8b54d332..ccbbb620fc61 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -100,7 +100,7 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo { pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat(); nPopupFlags = pLastLevelFloat->GetPopupModeFlags(); - pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + pLastLevelFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); return true; } else if ( nHitTest == HITTEST_RECT ) @@ -117,7 +117,7 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo if ( nHitTest == HITTEST_RECT ) { if ( pFloat->ImplIsMouseDown() ) - pFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); + pFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel ); return true; } } @@ -127,7 +127,7 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo nPopupFlags = pLastLevelFloat->GetPopupModeFlags(); if ( !(nPopupFlags & FloatWinPopupFlags::NoMouseUpClose) ) { - pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + pLastLevelFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); return true; } } @@ -144,7 +144,7 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo if ( (nPopupFlags & FloatWinPopupFlags::NoMouseUpClose) && (nSVEvent == MouseNotifyEvent::MOUSEBUTTONUP) ) return true; - pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + pLastLevelFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); return true; } else @@ -958,7 +958,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, sal_uInt16 nEscCode = aKeyCode.GetCode(); if ( nEscCode == KEY_ESCAPE ) - pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + pLastLevelFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); } } return true; @@ -982,7 +982,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, if ( (nCode == KEY_ESCAPE) || bCtrlF6) { - pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + pLastLevelFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); if( !bCtrlF6 ) return true; } @@ -1652,7 +1652,7 @@ static void KillOwnPopups( vcl::Window* pWindow ) if ( pChild && pParent->ImplIsWindowOrChild( pChild, true ) ) { if ( !(pSVData->maWinData.mpFirstFloat->GetPopupModeFlags() & FloatWinPopupFlags::NoAppFocusClose) ) - pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + pSVData->maWinData.mpFirstFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); } } @@ -1727,7 +1727,7 @@ static void ImplHandleMove( vcl::Window* pWindow ) { if( pWindow->ImplGetWindowImpl()->mbFrame && pWindow->ImplIsFloatingWindow() && pWindow->IsReallyVisible() ) { - static_cast<FloatingWindow*>(pWindow)->EndPopupMode( FLOATWIN_POPUPMODEEND_TEAROFF ); + static_cast<FloatingWindow*>(pWindow)->EndPopupMode( FloatWinPopupEndFlags::TearOff ); pWindow->ImplCallMove(); } @@ -1917,7 +1917,7 @@ static void ImplHandleLoseFocus( vcl::Window* pWindow ) if ( pSVData->maWinData.mpFirstFloat ) { if ( !(pSVData->maWinData.mpFirstFloat->GetPopupModeFlags() & FloatWinPopupFlags::NoAppFocusClose) ) - pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + pSVData->maWinData.mpFirstFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); } pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = false; @@ -1975,7 +1975,7 @@ void ImplHandleClose( vcl::Window* pWindow ) { FloatingWindow* pLastLevelFloat; pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat(); - pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + pLastLevelFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); } if ( pSVData->maHelpData.mbExtHelpMode ) Help::EndExtHelp(); diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 06d47483a9f2..610314a9c384 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -2989,7 +2989,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent ) { static const char* pEnv = getenv( "SAL_FLOATWIN_NOAPPFOCUSCLOSE" ); if ( !(pSVData->maWinData.mpFirstFloat->GetPopupModeFlags() & FloatWinPopupFlags::NoAppFocusClose) && !(pEnv && *pEnv) ) - pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + pSVData->maWinData.mpFirstFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); } } diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index e349aa1a2e4b..7fea4a9c60dc 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -3293,7 +3293,7 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer { static const char* pEnv = getenv( "SAL_FLOATWIN_NOAPPFOCUSCLOSE" ); if ( !(pSVData->maWinData.mpFirstFloat->GetPopupModeFlags() & FloatWinPopupFlags::NoAppFocusClose) && !(pEnv && *pEnv) ) - pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + pSVData->maWinData.mpFirstFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); } } |