diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-13 09:26:49 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-13 09:27:16 +0200 |
commit | 5525ad365c9c19d86d32efdd4644bfcf43063bcf (patch) | |
tree | 9fe0b9ccd2b57f54de892b8d71a63c24d13d9c05 /vcl/source/window | |
parent | 666f42854e04141541227d88130ff3338aff07b6 (diff) |
convert FLOATWIN_TITLE constants to scoped enum
Change-Id: Iebd2eadfa375092a33d6de9d7f7964dba64f7d6b
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/floatwin.cxx | 22 | ||||
-rw-r--r-- | vcl/source/window/scrwnd.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 34d1023cc7c6..413aeef50ea8 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -121,7 +121,7 @@ void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle ) mpNextFloat = NULL; mpFirstPopupModeWin = NULL; mnPostId = 0; - mnTitle = (nStyle & (WB_MOVEABLE | WB_POPUP)) ? FLOATWIN_TITLE_NORMAL : FLOATWIN_TITLE_NONE; + mnTitle = (nStyle & (WB_MOVEABLE | WB_POPUP)) ? FloatWinTitleType::Normal : FloatWinTitleType::NONE; mnOldTitle = mnTitle; mnPopupModeFlags = FloatWinPopupFlags::NONE; mbInPopupMode = false; @@ -160,8 +160,8 @@ FloatingWindow::FloatingWindow(vcl::Window* pParent, const OString& rID, const O , mpImplData(0) , mnPostId(0) , mnPopupModeFlags(FloatWinPopupFlags::NONE) - , mnTitle(0) - , mnOldTitle(0) + , mnTitle(FloatWinTitleType::Unknown) + , mnOldTitle(FloatWinTitleType::Unknown) , mbInPopupMode(false) , mbPopupMode(false) , mbPopupModeCanceled(false) @@ -599,20 +599,20 @@ void FloatingWindow::PopupModeEnd() maPopupModeEndHdl.Call( this ); } -void FloatingWindow::SetTitleType( sal_uInt16 nTitle ) +void FloatingWindow::SetTitleType( FloatWinTitleType nTitle ) { if ( (mnTitle != nTitle) && mpWindowImpl->mpBorderWindow ) { mnTitle = nTitle; Size aOutSize = GetOutputSizePixel(); sal_uInt16 nTitleStyle; - if ( nTitle == FLOATWIN_TITLE_NORMAL ) + if ( nTitle == FloatWinTitleType::Normal ) nTitleStyle = BORDERWINDOW_TITLE_SMALL; - else if ( nTitle == FLOATWIN_TITLE_TEAROFF ) + else if ( nTitle == FloatWinTitleType::TearOff ) nTitleStyle = BORDERWINDOW_TITLE_TEAROFF; - else if ( nTitle == FLOATWIN_TITLE_POPUP ) + else if ( nTitle == FloatWinTitleType::Popup ) nTitleStyle = BORDERWINDOW_TITLE_POPUP; - else // nTitle == FLOATWIN_TITLE_NONE + else // nTitle == FloatWinTitleType::NONE nTitleStyle = BORDERWINDOW_TITLE_NONE; static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetTitleType( nTitleStyle, aOutSize ); static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder ); @@ -631,11 +631,11 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, FloatWinPopupFlags // remove title mnOldTitle = mnTitle; if ( ( mpWindowImpl->mnStyle & WB_POPUP ) && !GetText().isEmpty() ) - SetTitleType( FLOATWIN_TITLE_POPUP ); + SetTitleType( FloatWinTitleType::Popup ); else if ( nFlags & FloatWinPopupFlags::AllowTearOff ) - SetTitleType( FLOATWIN_TITLE_TEAROFF ); + SetTitleType( FloatWinTitleType::TearOff ); else - SetTitleType( FLOATWIN_TITLE_NONE ); + SetTitleType( FloatWinTitleType::NONE ); // avoid close on focus change for decorated floating windows only if( mpWindowImpl->mbFrame && (GetStyle() & WB_MOVEABLE) ) diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx index 6fe7049159e0..da613bd330ae 100644 --- a/vcl/source/window/scrwnd.cxx +++ b/vcl/source/window/scrwnd.cxx @@ -57,7 +57,7 @@ ImplWheelWindow::ImplWheelWindow( vcl::Window* pParent ) : mnMaxWidth = (sal_uLong) ( 0.4 * hypot( (double) aSize.Width(), aSize.Height() ) ); // create wheel window - SetTitleType( FLOATWIN_TITLE_NONE ); + SetTitleType( FloatWinTitleType::NONE ); ImplCreateImageList(); ResMgr* pResMgr = ImplGetResMgr(); Bitmap aBmp; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index b42d7246bd4d..1b95b9a98749 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3689,7 +3689,7 @@ bool Window::HasActiveChildFrame() // but FloatingWindows carry this information in their TitleType... // TODO: avoid duplicate WinBits !!! if( pChildFrame && pChildFrame->ImplIsFloatingWindow() ) - bDecorated = static_cast<FloatingWindow*>(pChildFrame)->GetTitleType() != FLOATWIN_TITLE_NONE; + bDecorated = static_cast<FloatingWindow*>(pChildFrame)->GetTitleType() != FloatWinTitleType::NONE; if( bDecorated || (pFrameWin->mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) ) ) if( pChildFrame && pChildFrame->IsVisible() && pChildFrame->IsActive() ) { |