summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/brdwin.cxx24
-rw-r--r--vcl/source/window/menu.cxx4
-rw-r--r--vcl/source/window/resource.cxx2
-rw-r--r--vcl/source/window/window.cxx8
4 files changed, 19 insertions, 19 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 579c2ee44045..182302dd6679 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1023,8 +1023,8 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
long nOrigRightBorder = mnRightBorder;
long nOrigBottomBorder = mnBottomBorder;
- sal_uInt16 nBorderStyle = mpBorderWindow->GetBorderStyle();
- if ( nBorderStyle & WINDOW_BORDER_NOBORDER )
+ WindowBorderStyle nBorderStyle = mpBorderWindow->GetBorderStyle();
+ if ( nBorderStyle & WindowBorderStyle::NOBORDER )
{
mnLeftBorder = 0;
mnTopBorder = 0;
@@ -1035,7 +1035,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
{
// FIXME: this is currently only on OS X, check with other
// platforms
- if( ImplGetSVData()->maNWFData.mbNoFocusRects && !( nBorderStyle & WINDOW_BORDER_NWF ) )
+ if( ImplGetSVData()->maNWFData.mbNoFocusRects && !( nBorderStyle & WindowBorderStyle::NWF ) )
{
// for native widget drawing we must find out what
// control this border belongs to
@@ -1132,11 +1132,11 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
// move border outside if border was converted or if the BorderWindow is a frame window,
if ( mpBorderWindow->mbSmallOutBorder )
nStyle |= FRAME_DRAW_DOUBLEOUT;
- else if ( nBorderStyle & WINDOW_BORDER_NWF )
+ else if ( nBorderStyle & WindowBorderStyle::NWF )
nStyle |= FRAME_DRAW_NWF;
else
nStyle |= FRAME_DRAW_DOUBLEIN;
- if ( nBorderStyle & WINDOW_BORDER_MONO )
+ if ( nBorderStyle & WindowBorderStyle::MONO )
nStyle |= FRAME_DRAW_MONO;
DecorationView aDecoView( mpOutDev );
@@ -1179,8 +1179,8 @@ long ImplSmallBorderWindowView::CalcTitleWidth() const
void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice*, const Point* )
{
- sal_uInt16 nBorderStyle = mpBorderWindow->GetBorderStyle();
- if ( nBorderStyle & WINDOW_BORDER_NOBORDER )
+ WindowBorderStyle nBorderStyle = mpBorderWindow->GetBorderStyle();
+ if ( nBorderStyle & WindowBorderStyle::NOBORDER )
return;
bool bNativeOK = false;
@@ -1318,13 +1318,13 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice*
// move border outside if border was converted or if the border window is a frame window,
if ( mpBorderWindow->mbSmallOutBorder )
nStyle |= FRAME_DRAW_DOUBLEOUT;
- else if ( nBorderStyle & WINDOW_BORDER_NWF )
+ else if ( nBorderStyle & WindowBorderStyle::NWF )
nStyle |= FRAME_DRAW_NWF;
else
nStyle |= FRAME_DRAW_DOUBLEIN;
- if ( nBorderStyle & WINDOW_BORDER_MONO )
+ if ( nBorderStyle & WindowBorderStyle::MONO )
nStyle |= FRAME_DRAW_MONO;
- if ( nBorderStyle & WINDOW_BORDER_MENU )
+ if ( nBorderStyle & WindowBorderStyle::MENU )
nStyle |= FRAME_DRAW_MENU;
// tell DrawFrame that we're drawing a window border of a frame window to avoid round corners
if( pWin && pWin == pWin->ImplGetFrameWindow() )
@@ -1825,7 +1825,7 @@ void ImplBorderWindow::ImplInit( vcl::Window* pParent,
mnTitleType = BORDERWINDOW_TITLE_SMALL;
else
mnTitleType = BORDERWINDOW_TITLE_NORMAL;
- mnBorderStyle = WINDOW_BORDER_NORMAL;
+ mnBorderStyle = WindowBorderStyle::NORMAL;
InitView();
}
@@ -2104,7 +2104,7 @@ void ImplBorderWindow::SetTitleType( sal_uInt16 nTitleType, const Size& rSize )
UpdateView( false, rSize );
}
-void ImplBorderWindow::SetBorderStyle( sal_uInt16 nStyle )
+void ImplBorderWindow::SetBorderStyle( WindowBorderStyle nStyle )
{
if ( !mbFrameBorder && (mnBorderStyle != nStyle) )
{
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index f9517694daa4..0f15f99e5e85 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2880,9 +2880,9 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, sal_
MenuFloatingWindow* pWin = new MenuFloatingWindow( this, pW, nStyle | WB_SYSTEMWINDOW );
if( pSVData->maNWFData.mbFlatMenu )
- pWin->SetBorderStyle( WINDOW_BORDER_NOBORDER );
+ pWin->SetBorderStyle( WindowBorderStyle::NOBORDER );
else
- pWin->SetBorderStyle( pWin->GetBorderStyle() | WINDOW_BORDER_MENU );
+ pWin->SetBorderStyle( pWin->GetBorderStyle() | WindowBorderStyle::MENU );
pWindow = pWin;
Size aSz = ImplCalcSize( pWin );
diff --git a/vcl/source/window/resource.cxx b/vcl/source/window/resource.cxx
index 1bd7da5fc4cf..abcc150b7cb4 100644
--- a/vcl/source/window/resource.cxx
+++ b/vcl/source/window/resource.cxx
@@ -153,7 +153,7 @@ void Window::ImplLoadRes( const ResId& rResId )
if ( nObjMask & WINDOW_BORDER_STYLE )
{
sal_uInt16 nBorderStyle = (sal_uInt16)ReadLongRes();
- SetBorderStyle( nBorderStyle );
+ SetBorderStyle( static_cast<WindowBorderStyle>(nBorderStyle) );
}
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 57b7a4b51c07..f773bc2a5f05 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2053,12 +2053,12 @@ void Window::SetExtendedStyle( WinBits nExtendedStyle )
}
}
-void Window::SetBorderStyle( sal_uInt16 nBorderStyle )
+void Window::SetBorderStyle( WindowBorderStyle nBorderStyle )
{
if ( mpWindowImpl->mpBorderWindow )
{
- if( nBorderStyle == WINDOW_BORDER_REMOVEBORDER &&
+ if( nBorderStyle == WindowBorderStyle::REMOVEBORDER &&
! mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame &&
mpWindowImpl->mpBorderWindow->mpWindowImpl->mpParent
)
@@ -2093,7 +2093,7 @@ void Window::SetBorderStyle( sal_uInt16 nBorderStyle )
}
}
-sal_uInt16 Window::GetBorderStyle() const
+WindowBorderStyle Window::GetBorderStyle() const
{
if ( mpWindowImpl->mpBorderWindow )
@@ -2104,7 +2104,7 @@ sal_uInt16 Window::GetBorderStyle() const
return mpWindowImpl->mpBorderWindow->GetBorderStyle();
}
- return 0;
+ return WindowBorderStyle::NONE;
}
long Window::CalcTitleWidth() const