diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-10 13:02:36 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-11 06:52:14 +0000 |
commit | 36028d9010b697ac97da2acc0fa21610ea8731b0 (patch) | |
tree | a331a9394eb84a7bcfbbfc593f30e6b5edee1307 /vcl/source | |
parent | 6104a9807500c59196ff007d24cfe111f0b2754a (diff) |
Convert BORDERWINDOW_TITLE to scoped enum
Change-Id: I9e3088c4ba51010a013f5bbaa2bb545ffa11409b
Reviewed-on: https://gerrit.libreoffice.org/24836
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/brdwin.cxx | 30 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 10 |
2 files changed, 20 insertions, 20 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 6dee935bc2f5..6a4fa7ce7477 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -180,24 +180,24 @@ void ImplBorderWindowView::ImplInitTitle(ImplBorderFrameData* pData) ImplBorderWindow* pBorderWindow = pData->mpBorderWindow; if ( !(pBorderWindow->GetStyle() & (WB_MOVEABLE | WB_POPUP)) || - (pData->mnTitleType == BORDERWINDOW_TITLE_NONE) ) + (pData->mnTitleType == BorderWindowTitleType::NONE) ) { - pData->mnTitleType = BORDERWINDOW_TITLE_NONE; + pData->mnTitleType = BorderWindowTitleType::NONE; pData->mnTitleHeight = 0; } else { const StyleSettings& rStyleSettings = pData->mpOutDev->GetSettings().GetStyleSettings(); - if (pData->mnTitleType == BORDERWINDOW_TITLE_TEAROFF) + if (pData->mnTitleType == BorderWindowTitleType::Tearoff) pData->mnTitleHeight = rStyleSettings.GetTearOffTitleHeight(); else { - if (pData->mnTitleType == BORDERWINDOW_TITLE_SMALL) + if (pData->mnTitleType == BorderWindowTitleType::Small) { pBorderWindow->SetPointFont(*pBorderWindow, rStyleSettings.GetFloatTitleFont() ); pData->mnTitleHeight = rStyleSettings.GetFloatTitleHeight(); } - else // pData->mnTitleType == BORDERWINDOW_TITLE_NORMAL + else // pData->mnTitleType == BorderWindowTitleType::Normal { // FIXME RenderContext pBorderWindow->SetPointFont(*pBorderWindow, rStyleSettings.GetTitleFont()); @@ -1397,9 +1397,9 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh pData->mnTitleType = pBorderWindow->mnTitleType; pData->mbFloatWindow = pBorderWindow->mbFloatWindow; - if ( !(pBorderWindow->GetStyle() & (WB_MOVEABLE | WB_POPUP)) || (pData->mnTitleType == BORDERWINDOW_TITLE_NONE) ) + if ( !(pBorderWindow->GetStyle() & (WB_MOVEABLE | WB_POPUP)) || (pData->mnTitleType == BorderWindowTitleType::NONE) ) pData->mnBorderSize = 0; - else if ( pData->mnTitleType == BORDERWINDOW_TITLE_TEAROFF ) + else if ( pData->mnTitleType == BorderWindowTitleType::Tearoff ) pData->mnBorderSize = 0; else pData->mnBorderSize = rStyleSettings.GetBorderSize(); @@ -1429,7 +1429,7 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh pData->maTitleRect.Top() = pData->mnTopBorder; pData->maTitleRect.Bottom() = pData->maTitleRect.Top()+pData->mnTitleHeight-1; - if ( pData->mnTitleType & (BORDERWINDOW_TITLE_NORMAL | BORDERWINDOW_TITLE_SMALL) ) + if ( pData->mnTitleType & (BorderWindowTitleType::Normal | BorderWindowTitleType::Small) ) { long nLeft = pData->maTitleRect.Left() + 1; long nRight = pData->maTitleRect.Right() - 3; @@ -1546,7 +1546,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, sal vcl::Region oldClipRgn(rRenderContext.GetClipRegion()); // for popups, don't draw part of the frame - if (pData->mnTitleType == BORDERWINDOW_TITLE_POPUP) + if (pData->mnTitleType == BorderWindowTitleType::Popup) { FloatingWindow* pWin = dynamic_cast<FloatingWindow*>(pData->mpBorderWindow->GetWindow(GetWindowType::Client)); if (pWin) @@ -1572,7 +1572,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, sal --aInRect.Bottom(); // restore - if (pData->mnTitleType == BORDERWINDOW_TITLE_POPUP) + if (pData->mnTitleType == BorderWindowTitleType::Popup) rRenderContext.SetClipRegion(oldClipRgn); } else @@ -1600,7 +1600,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, sal aInRect = pData->maTitleRect; // use no gradient anymore, just a static titlecolor - if (pData->mnTitleType != BORDERWINDOW_TITLE_POPUP) + if (pData->mnTitleType != BorderWindowTitleType::Popup) rRenderContext.SetFillColor(aFrameColor); else rRenderContext.SetFillColor(aFaceColor); @@ -1611,7 +1611,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, sal aTitleRect.Move(pOffset->X(), pOffset->Y()); rRenderContext.DrawRect(aTitleRect); - if (pData->mnTitleType != BORDERWINDOW_TITLE_TEAROFF) + if (pData->mnTitleType != BorderWindowTitleType::Tearoff) { aInRect.Left() += 2; aInRect.Right() -= 2; @@ -1800,9 +1800,9 @@ void ImplBorderWindow::ImplInit( vcl::Window* pParent, mbDisplayActive = IsActive(); if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT ) - mnTitleType = BORDERWINDOW_TITLE_SMALL; + mnTitleType = BorderWindowTitleType::Small; else - mnTitleType = BORDERWINDOW_TITLE_NORMAL; + mnTitleType = BorderWindowTitleType::Normal; mnBorderStyle = WindowBorderStyle::NORMAL; InitView(); } @@ -2096,7 +2096,7 @@ void ImplBorderWindow::SetDisplayActive( bool bActive ) } } -void ImplBorderWindow::SetTitleType( sal_uInt16 nTitleType, const Size& rSize ) +void ImplBorderWindow::SetTitleType( BorderWindowTitleType nTitleType, const Size& rSize ) { mnTitleType = nTitleType; UpdateView( false, rSize ); diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index f3b8e2b1cc97..1a6107b08774 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -648,15 +648,15 @@ void FloatingWindow::SetTitleType( FloatWinTitleType nTitle ) { mnTitle = nTitle; Size aOutSize = GetOutputSizePixel(); - sal_uInt16 nTitleStyle; + BorderWindowTitleType nTitleStyle; if ( nTitle == FloatWinTitleType::Normal ) - nTitleStyle = BORDERWINDOW_TITLE_SMALL; + nTitleStyle = BorderWindowTitleType::Small; else if ( nTitle == FloatWinTitleType::TearOff ) - nTitleStyle = BORDERWINDOW_TITLE_TEAROFF; + nTitleStyle = BorderWindowTitleType::Tearoff; else if ( nTitle == FloatWinTitleType::Popup ) - nTitleStyle = BORDERWINDOW_TITLE_POPUP; + nTitleStyle = BorderWindowTitleType::Popup; else // nTitle == FloatWinTitleType::NONE - nTitleStyle = BORDERWINDOW_TITLE_NONE; + nTitleStyle = BorderWindowTitleType::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 ); } |