diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-27 09:37:41 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-27 11:14:26 +0200 |
commit | 66854d697f973f36e1b878080999901e0936dae6 (patch) | |
tree | 118776c3cda5bbeb59ece7d9b33686a5a4163fc6 /vcl/source | |
parent | 9e3b1236b68069016d646b5682ce541335b5340c (diff) |
convert WINDOW_DRAW flags to scoped enum
Change-Id: I9400a286fab18d683b4c109007961685f01b6da3
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/control/button.cxx | 61 | ||||
-rw-r--r-- | vcl/source/control/combobox.cxx | 10 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 10 | ||||
-rw-r--r-- | vcl/source/control/fixed.cxx | 40 | ||||
-rw-r--r-- | vcl/source/control/group.cxx | 22 | ||||
-rw-r--r-- | vcl/source/control/imgctrl.cxx | 12 | ||||
-rw-r--r-- | vcl/source/control/lstbox.cxx | 10 | ||||
-rw-r--r-- | vcl/source/control/scrbar.cxx | 4 | ||||
-rw-r--r-- | vcl/source/control/spinbtn.cxx | 4 | ||||
-rw-r--r-- | vcl/source/control/spinfld.cxx | 8 | ||||
-rw-r--r-- | vcl/source/edit/vclmedit.cxx | 10 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/tabpage.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 2 |
14 files changed, 98 insertions, 99 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 2259b3971599..2ee5d5e13f65 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -210,12 +210,12 @@ void Button::ImplSetSeparatorX( long nX ) mpButtonData->mnSeparatorX = nX; } -DrawTextFlags Button::ImplGetTextStyle(OUString& rText, WinBits nWinStyle, sal_uLong nDrawFlags ) +DrawTextFlags Button::ImplGetTextStyle(OUString& rText, WinBits nWinStyle, DrawFlags nDrawFlags ) { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); DrawTextFlags nTextStyle = FixedText::ImplGetTextStyle(nWinStyle & ~WB_DEFBUTTON); - if (nDrawFlags & WINDOW_DRAW_NOMNEMONIC) + if (nDrawFlags & DrawFlags::NoMnemonic) { if (nTextStyle & DrawTextFlags::Mnemonic) { @@ -224,13 +224,13 @@ DrawTextFlags Button::ImplGetTextStyle(OUString& rText, WinBits nWinStyle, sal_u } } - if (!(nDrawFlags & WINDOW_DRAW_NODISABLE)) + if (!(nDrawFlags & DrawFlags::NoDisable)) { if (!IsEnabled()) nTextStyle |= DrawTextFlags::Disable; } - if ((nDrawFlags & WINDOW_DRAW_MONO) || + if ((nDrawFlags & DrawFlags::Mono) || (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono)) { nTextStyle |= DrawTextFlags::Mono; @@ -241,7 +241,7 @@ DrawTextFlags Button::ImplGetTextStyle(OUString& rText, WinBits nWinStyle, sal_u void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size& rSize, bool bLayout, - sal_uLong nImageSep, sal_uLong nDrawFlags, + sal_uLong nImageSep, DrawFlags nDrawFlags, DrawTextFlags nTextStyle, Rectangle *pSymbolRect, bool bAddImageSep) { @@ -261,7 +261,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, ImageAlign eImageAlign = mpButtonData->meImageAlign; Size aImageSize = mpButtonData->maImage.GetSizePixel(); - if ((nDrawFlags & WINDOW_DRAW_NOMNEMONIC) && + if ((nDrawFlags & DrawFlags::NoMnemonic) && (nTextStyle & DrawTextFlags::Mnemonic)) { aText = GetNonMnemonicString(aText); @@ -491,7 +491,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, DrawImageFlags nStyle = DrawImageFlags::NONE; - if (!(nDrawFlags & WINDOW_DRAW_NODISABLE) && + if (!(nDrawFlags & DrawFlags::NoDisable) && !IsEnabled()) { nStyle |= DrawImageFlags::Disable; @@ -746,14 +746,14 @@ bool PushButton::ImplHitTestPushButton( vcl::Window* pDev, return aTestRect.IsInside( rPos ); } -DrawTextFlags PushButton::ImplGetTextStyle( sal_uLong nDrawFlags ) const +DrawTextFlags PushButton::ImplGetTextStyle( DrawFlags nDrawFlags ) const { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); DrawTextFlags nTextStyle = DrawTextFlags::Mnemonic | DrawTextFlags::MultiLine | DrawTextFlags::EndEllipsis; if ( ( rStyleSettings.GetOptions() & StyleSettingsOptions::Mono ) || - ( nDrawFlags & WINDOW_DRAW_MONO ) ) + ( nDrawFlags & DrawFlags::Mono ) ) nTextStyle |= DrawTextFlags::Mono; if ( GetStyle() & WB_WORDBREAK ) @@ -775,7 +775,7 @@ DrawTextFlags PushButton::ImplGetTextStyle( sal_uLong nDrawFlags ) const else nTextStyle |= DrawTextFlags::VCenter; - if ( ! ( (nDrawFlags & WINDOW_DRAW_NODISABLE) || IsEnabled() ) ) + if ( ! ( (nDrawFlags & DrawFlags::NoDisable) || IsEnabled() ) ) nTextStyle |= DrawTextFlags::Disable; return nTextStyle; @@ -807,7 +807,7 @@ static void ImplDrawBtnDropDownArrow( OutputDevice* pDev, pDev->SetFillColor( aOldFillColor ); } -void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, sal_uLong nDrawFlags, +void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFlags, const Rectangle& rRect, bool bLayout, bool bMenuBtnSep) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -823,20 +823,20 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, sal_uLong nDrawFl pDev->Push( PushFlags::CLIPREGION ); pDev->IntersectClipRegion( aInRect ); - if ( nDrawFlags & WINDOW_DRAW_MONO ) + if ( nDrawFlags & DrawFlags::Mono ) aColor = Color( COL_BLACK ); - else if( (nDrawFlags & WINDOW_DRAW_ROLLOVER) && IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL) ) + else if( (nDrawFlags & DrawFlags::NoRollover) && IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL) ) aColor = rStyleSettings.GetButtonRolloverTextColor(); else if ( IsControlForeground() ) aColor = GetControlForeground(); - else if( nDrawFlags & WINDOW_DRAW_ROLLOVER ) + else if( nDrawFlags & DrawFlags::NoRollover ) aColor = rStyleSettings.GetButtonRolloverTextColor(); else aColor = rStyleSettings.GetButtonTextColor(); pDev->SetTextColor( aColor ); - if ( IsEnabled() || (nDrawFlags & WINDOW_DRAW_NODISABLE) ) + if ( IsEnabled() || (nDrawFlags & DrawFlags::NoDisable) ) nStyle = DrawSymbolFlags::NONE; else nStyle = DrawSymbolFlags::Disable; @@ -902,7 +902,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, sal_uLong nDrawFl bool bBlack = false; Color aArrowColor( COL_BLACK ); - if ( !(nDrawFlags & WINDOW_DRAW_MONO) ) + if ( !(nDrawFlags & DrawFlags::Mono) ) { if ( !IsEnabled() ) aArrowColor = rStyleSettings.GetShadowColor(); @@ -1070,7 +1070,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLa } // draw content using the same aInRect as non-native VCL would do - ImplDrawPushButtonContent(&rRenderContext, (nState&ControlState::ROLLOVER) ? WINDOW_DRAW_ROLLOVER : 0, + ImplDrawPushButtonContent(&rRenderContext, (nState&ControlState::ROLLOVER) ? DrawFlags::NoRollover : DrawFlags::NONE, aInRect, bLayout, bDrawMenuSep); if (HasFocus()) @@ -1097,7 +1097,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLa } // draw content - ImplDrawPushButtonContent(&rRenderContext, 0, aInRect, bLayout, bDrawMenuSep); + ImplDrawPushButtonContent(&rRenderContext, DrawFlags::NONE, aInRect, bLayout, bDrawMenuSep); if (!bLayout && HasFocus()) { @@ -1349,7 +1349,7 @@ void PushButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) } void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -1359,7 +1359,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->Push(); pDev->SetMapMode(); pDev->SetFont( aFont ); - if ( nFlags & WINDOW_DRAW_MONO ) + if ( nFlags & DrawFlags::Mono ) { pDev->SetTextColor( Color( COL_BLACK ) ); } @@ -1381,7 +1381,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DecorationView aDecoView( pDev ); DrawButtonFlags nButtonStyle = DrawButtonFlags::NONE; - if ( nFlags & WINDOW_DRAW_MONO ) + if ( nFlags & DrawFlags::Mono ) nButtonStyle |= DrawButtonFlags::Mono; if ( IsChecked() ) nButtonStyle |= DrawButtonFlags::Checked; @@ -1630,9 +1630,8 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const } if ( !PushButton::GetText().isEmpty() && ! (ImplGetButtonState() & DrawButtonFlags::NoText) ) { - sal_uLong nDrawFlags = 0; Size textSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ), - PushButton::GetText(), ImplGetTextStyle( nDrawFlags ) ).GetSize(); + PushButton::GetText(), ImplGetTextStyle( DrawFlags::NONE ) ).GetSize(); aSize.Width() += textSize.Width(); aSize.Height() = std::max( aSize.Height(), long( textSize.Height() * 1.15 ) ); } @@ -1993,7 +1992,7 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext) } } -void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, +void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, const Size& rImageSize, Rectangle& rStateRect, Rectangle& rMouseRect, bool bLayout ) @@ -2144,7 +2143,7 @@ void RadioButton::ImplDrawRadioButton(vcl::RenderContext& rRenderContext, bool b aImageSize.Height() = CalcZoom(aImageSize.Height()); // Draw control text - ImplDraw(&rRenderContext, 0, Point(), GetOutputSizePixel(), + ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel(), aImageSize, maStateRect, maMouseRect, bLayout); if (!bLayout || rRenderContext.IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)) @@ -2445,7 +2444,7 @@ void RadioButton::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) } void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { if ( !maImage ) { @@ -2478,7 +2477,7 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize pDev->Push(); pDev->SetMapMode(); pDev->SetFont( aFont ); - if ( nFlags & WINDOW_DRAW_MONO ) + if ( nFlags & DrawFlags::Mono ) pDev->SetTextColor( Color( COL_BLACK ) ); else pDev->SetTextColor( GetTextColor() ); @@ -3072,7 +3071,7 @@ void CheckBox::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext) } } -void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, +void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, const Size& rImageSize, Rectangle& rStateRect, Rectangle& rMouseRect, bool bLayout ) @@ -3184,7 +3183,7 @@ void CheckBox::ImplDrawCheckBox(vcl::RenderContext& rRenderContext, bool bLayout if (!bLayout) HideFocus(); - ImplDraw(&rRenderContext, 0, Point(), GetOutputSizePixel(), + ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel(), aImageSize, maStateRect, maMouseRect, bLayout); if (!bLayout) @@ -3348,7 +3347,7 @@ void CheckBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) } void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { MapMode aResMapMode( MAP_100TH_MM ); Point aPos = pDev->LogicToPixel( rPos ); @@ -3382,7 +3381,7 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->Push(); pDev->SetMapMode(); pDev->SetFont( aFont ); - if ( nFlags & WINDOW_DRAW_MONO ) + if ( nFlags & DrawFlags::Mono ) pDev->SetTextColor( Color( COL_BLACK ) ); else pDev->SetTextColor( GetTextColor() ); diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index f16fd05ed0f2..4ba8095ace4b 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1129,7 +1129,7 @@ void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines } } -void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) +void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { mpImplLB->GetMainWindow()->ApplySettings(*pDev); @@ -1146,8 +1146,8 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, s // Border/Background pDev->SetLineColor(); pDev->SetFillColor(); - bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER); - bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground(); + bool bBorder = !(nFlags & DrawFlags::NoBorder ) && (GetStyle() & WB_BORDER); + bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { Rectangle aRect( aPos, aSize ); @@ -1182,13 +1182,13 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, s else nTextStyle |= DrawTextFlags::Left; - if ( ( nFlags & WINDOW_DRAW_MONO ) || ( eOutDevType == OUTDEV_PRINTER ) ) + if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) ) { pDev->SetTextColor( Color( COL_BLACK ) ); } else { - if ( !(nFlags & WINDOW_DRAW_NODISABLE ) && !IsEnabled() ) + if ( !(nFlags & DrawFlags::NoDisable ) && !IsEnabled() ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); pDev->SetTextColor( rStyleSettings.GetDisableColor() ); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index e3079819630b..15cf93d1c179 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1793,7 +1793,7 @@ void Edit::Resize() } } -void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) +void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -1808,8 +1808,8 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_u // Border/Background pDev->SetLineColor(); pDev->SetFillColor(); - bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER); - bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground(); + bool bBorder = !(nFlags & DrawFlags::NoBorder ) && (GetStyle() & WB_BORDER); + bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { Rectangle aRect( aPos, aSize ); @@ -1825,11 +1825,11 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_u } // Inhalt - if ( ( nFlags & WINDOW_DRAW_MONO ) || ( eOutDevType == OUTDEV_PRINTER ) ) + if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) ) pDev->SetTextColor( Color( COL_BLACK ) ); else { - if ( !(nFlags & WINDOW_DRAW_NODISABLE ) && !IsEnabled() ) + if ( !(nFlags & DrawFlags::NoDisable ) && !IsEnabled() ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); pDev->SetTextColor( rStyleSettings.GetDisableColor() ); diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 92ff28c15aa6..c891061be18c 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -159,7 +159,7 @@ DrawTextFlags FixedText::ImplGetTextStyle( WinBits nWinStyle ) return nTextStyle; } -void FixedText::ImplDraw(OutputDevice* pDev, sal_uLong nDrawFlags, +void FixedText::ImplDraw(OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, bool bFillLayout) const { @@ -177,7 +177,7 @@ void FixedText::ImplDraw(OutputDevice* pDev, sal_uLong nDrawFlags, nTextStyle &= ~DrawTextFlags(DrawTextFlags::EndEllipsis | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak); nTextStyle |= DrawTextFlags::PathEllipsis; } - if ( nDrawFlags & WINDOW_DRAW_NOMNEMONIC ) + if ( nDrawFlags & DrawFlags::NoMnemonic ) { if ( nTextStyle & DrawTextFlags::Mnemonic ) { @@ -185,12 +185,12 @@ void FixedText::ImplDraw(OutputDevice* pDev, sal_uLong nDrawFlags, nTextStyle &= ~DrawTextFlags::Mnemonic; } } - if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) ) + if ( !(nDrawFlags & DrawFlags::NoDisable) ) { if ( !IsEnabled() ) nTextStyle |= DrawTextFlags::Disable; } - if ( (nDrawFlags & WINDOW_DRAW_MONO) || + if ( (nDrawFlags & DrawFlags::Mono) || (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) ) nTextStyle |= DrawTextFlags::Mono; @@ -230,11 +230,11 @@ void FixedText::ApplySettings(vcl::RenderContext& rRenderContext) void FixedText::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) { - ImplDraw(&rRenderContext, 0, Point(), GetOutputSizePixel()); + ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); } void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { ApplySettings(*pDev); @@ -245,14 +245,14 @@ void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->Push(); pDev->SetMapMode(); pDev->SetFont( aFont ); - if ( nFlags & WINDOW_DRAW_MONO ) + if ( nFlags & DrawFlags::Mono ) pDev->SetTextColor( Color( COL_BLACK ) ); else pDev->SetTextColor( GetTextColor() ); pDev->SetTextFillColor(); - bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER); - bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground(); + bool bBorder = !(nFlags & DrawFlags::NoBorder ) && (GetStyle() & WB_BORDER); + bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { Rectangle aRect( aPos, aSize ); @@ -386,7 +386,7 @@ Size FixedText::GetOptimalSize() const void FixedText::FillLayoutData() const { mpControlData->mpLayoutData = new vcl::ControlLayoutData(); - ImplDraw(const_cast<FixedText*>(this), 0, Point(), GetOutputSizePixel(), true); + ImplDraw(const_cast<FixedText*>(this), DrawFlags::NONE, Point(), GetOutputSizePixel(), true); //const_cast<FixedText*>(this)->Invalidate(); } @@ -641,7 +641,7 @@ void FixedLine::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) ImplDraw(rRenderContext); } -void FixedLine::Draw( OutputDevice*, const Point&, const Size&, sal_uLong ) +void FixedLine::Draw( OutputDevice*, const Point&, const Size&, DrawFlags ) { } @@ -727,7 +727,7 @@ FixedBitmap::FixedBitmap( vcl::Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle ); } -void FixedBitmap::ImplDraw( OutputDevice* pDev, sal_uLong /* nDrawFlags */, +void FixedBitmap::ImplDraw( OutputDevice* pDev, DrawFlags /* nDrawFlags */, const Point& rPos, const Size& rSize ) { Bitmap* pBitmap = &maBitmap; @@ -770,11 +770,11 @@ void FixedBitmap::ApplySettings(vcl::RenderContext& rRenderContext) void FixedBitmap::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) { - ImplDraw(&rRenderContext, 0, Point(), GetOutputSizePixel()); + ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); } void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -784,7 +784,7 @@ void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize pDev->SetMapMode(); // Border - if ( !(nFlags & WINDOW_DRAW_NOBORDER) && (GetStyle() & WB_BORDER) ) + if ( !(nFlags & DrawFlags::NoBorder) && (GetStyle() & WB_BORDER) ) { DecorationView aDecoView( pDev ); aRect = aDecoView.DrawFrame( aRect, DrawFrameStyle::DoubleIn ); @@ -890,11 +890,11 @@ FixedImage::FixedImage( vcl::Window* pParent, const ResId& rResId ) : Show(); } -void FixedImage::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, +void FixedImage::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize ) { DrawImageFlags nStyle = DrawImageFlags::NONE; - if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) ) + if ( !(nDrawFlags & DrawFlags::NoDisable) ) { if ( !IsEnabled() ) nStyle |= DrawImageFlags::Disable; @@ -941,7 +941,7 @@ void FixedImage::ApplySettings(vcl::RenderContext& rRenderContext) void FixedImage::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) { - ImplDraw(&rRenderContext, 0, Point(), GetOutputSizePixel()); + ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); } Size FixedImage::GetOptimalSize() const @@ -950,7 +950,7 @@ Size FixedImage::GetOptimalSize() const } void FixedImage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -960,7 +960,7 @@ void FixedImage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->SetMapMode(); // Border - if ( !(nFlags & WINDOW_DRAW_NOBORDER) && (GetStyle() & WB_BORDER) ) + if ( !(nFlags & DrawFlags::NoBorder) && (GetStyle() & WB_BORDER) ) { ImplDrawFrame( pDev, aRect ); } diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx index c3f2231cd293..69dcca532f4e 100644 --- a/vcl/source/control/group.cxx +++ b/vcl/source/control/group.cxx @@ -92,7 +92,7 @@ GroupBox::GroupBox( vcl::Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle ); } -void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, +void GroupBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, bool bLayout ) { long nTop; @@ -104,7 +104,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, if ( GetStyle() & WB_NOLABEL ) nTextStyle &= ~DrawTextFlags::Mnemonic; - if ( nDrawFlags & WINDOW_DRAW_NOMNEMONIC ) + if ( nDrawFlags & DrawFlags::NoMnemonic ) { if ( nTextStyle & DrawTextFlags::Mnemonic ) { @@ -112,16 +112,16 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, nTextStyle &= ~DrawTextFlags::Mnemonic; } } - if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) ) + if ( !(nDrawFlags & DrawFlags::NoDisable) ) { if ( !IsEnabled() ) nTextStyle |= DrawTextFlags::Disable; } - if ( (nDrawFlags & WINDOW_DRAW_MONO) || + if ( (nDrawFlags & DrawFlags::Mono) || (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) ) { nTextStyle |= DrawTextFlags::Mono; - nDrawFlags |= WINDOW_DRAW_MONO; + nDrawFlags |= DrawFlags::Mono; } if (aText.isEmpty()) @@ -141,7 +141,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, if( ! bLayout ) { - if ( nDrawFlags & WINDOW_DRAW_MONO ) + if ( nDrawFlags & DrawFlags::Mono ) pDev->SetLineColor( Color( COL_BLACK ) ); else pDev->SetLineColor( rStyleSettings.GetShadowColor() ); @@ -161,7 +161,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, // if we're drawing onto a printer, spare the 3D effect // #i46986# / 2005-04-13 / frank.schoenheit@sun.com - if ( !bIsPrinter && !(nDrawFlags & WINDOW_DRAW_MONO) ) + if ( !bIsPrinter && !(nDrawFlags & DrawFlags::Mono) ) { pDev->SetLineColor( rStyleSettings.GetLightColor() ); if (aText.isEmpty()) @@ -185,16 +185,16 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, void GroupBox::FillLayoutData() const { mpControlData->mpLayoutData = new vcl::ControlLayoutData(); - const_cast<GroupBox*>(this)-> ImplDraw( const_cast<GroupBox*>(this), 0, Point(), GetOutputSizePixel(), true ); + const_cast<GroupBox*>(this)->ImplDraw( const_cast<GroupBox*>(this), DrawFlags::NONE, Point(), GetOutputSizePixel(), true ); } void GroupBox::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) { - ImplDraw(&rRenderContext, 0, Point(), GetOutputSizePixel()); + ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); } void GroupBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -203,7 +203,7 @@ void GroupBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->Push(); pDev->SetMapMode(); pDev->SetFont( aFont ); - if ( nFlags & WINDOW_DRAW_MONO ) + if ( nFlags & DrawFlags::Mono ) pDev->SetTextColor( Color( COL_BLACK ) ); else pDev->SetTextColor( GetTextColor() ); diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx index 8d9a5cbddff1..a41f3f4062c8 100644 --- a/vcl/source/control/imgctrl.cxx +++ b/vcl/source/control/imgctrl.cxx @@ -67,10 +67,10 @@ namespace } } -void ImageControl::ImplDraw(OutputDevice& rDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize) const +void ImageControl::ImplDraw(OutputDevice& rDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize) const { DrawImageFlags nStyle = DrawImageFlags::NONE; - if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) ) + if ( !(nDrawFlags & DrawFlags::NoDisable) ) { if ( !IsEnabled() ) nStyle |= DrawImageFlags::Disable; @@ -87,7 +87,7 @@ void ImageControl::ImplDraw(OutputDevice& rDev, sal_uLong nDrawFlags, const Poin WinBits nWinStyle = GetStyle(); DrawTextFlags nTextStyle = FixedText::ImplGetTextStyle( nWinStyle ); - if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) ) + if ( !(nDrawFlags & DrawFlags::NoDisable) ) if ( !IsEnabled() ) nTextStyle |= DrawTextFlags::Disable; @@ -133,7 +133,7 @@ void ImageControl::ImplDraw(OutputDevice& rDev, sal_uLong nDrawFlags, const Poin void ImageControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) { - ImplDraw(rRenderContext, 0, Point(), GetOutputSizePixel()); + ImplDraw(rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); if (HasFocus()) { @@ -157,7 +157,7 @@ void ImageControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /* } } -void ImageControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) +void ImageControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { const Point aPos = pDev->LogicToPixel( rPos ); const Size aSize = pDev->LogicToPixel( rSize ); @@ -167,7 +167,7 @@ void ImageControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSiz pDev->SetMapMode(); // Border - if ( !(nFlags & WINDOW_DRAW_NOBORDER) && (GetStyle() & WB_BORDER) ) + if ( !(nFlags & DrawFlags::NoBorder) && (GetStyle() & WB_BORDER) ) { ImplDrawFrame( pDev, aRect ); } diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index bb95cee469b3..a1ad0ebb8bca 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -373,7 +373,7 @@ void ListBox::ApplySettings(vcl::RenderContext& rRenderContext) rRenderContext.SetBackground(); } -void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) +void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { mpImplLB->GetMainWindow()->ApplySettings(*pDev); @@ -390,8 +390,8 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sa // Border/Background pDev->SetLineColor(); pDev->SetFillColor(); - bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER); - bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground(); + bool bBorder = !(nFlags & DrawFlags::NoBorder ) && (GetStyle() & WB_BORDER); + bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { Rectangle aRect( aPos, aSize ); @@ -407,13 +407,13 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sa } // Content - if ( ( nFlags & WINDOW_DRAW_MONO ) || ( eOutDevType == OUTDEV_PRINTER ) ) + if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) ) { pDev->SetTextColor( Color( COL_BLACK ) ); } else { - if ( !(nFlags & WINDOW_DRAW_NODISABLE ) && !IsEnabled() ) + if ( !(nFlags & DrawFlags::NoDisable ) && !IsEnabled() ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); pDev->SetTextColor( rStyleSettings.GetDisableColor() ); diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 2db7fc1bdcc7..2d7fdc3adb3e 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -411,13 +411,13 @@ void ScrollBar::ImplCalc( bool bUpdate ) ImplUpdateRects( bUpdate ); } -void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& /* rSize */, sal_uLong nFlags ) +void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& /* rSize */, DrawFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); pDev->Push(); pDev->SetMapMode(); - if ( !(nFlags & WINDOW_DRAW_MONO) ) + if ( !(nFlags & DrawFlags::Mono) ) { // DecoView uses the FaceColor... AllSettings aSettings = pDev->GetSettings(); diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx index 6d1d5f324172..ad47e9fc4bcb 100644 --- a/vcl/source/control/spinbtn.cxx +++ b/vcl/source/control/spinbtn.cxx @@ -120,14 +120,14 @@ void SpinButton::Resize() Invalidate(); } -void SpinButton::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags) +void SpinButton::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags) { Point aPos = pDev->LogicToPixel(rPos); Size aSize = pDev->LogicToPixel(rSize); pDev->Push(); pDev->SetMapMode(); - if ( !(nFlags & WINDOW_DRAW_MONO) ) + if ( !(nFlags & DrawFlags::Mono) ) { // DecoView uses the FaceColor... AllSettings aSettings = pDev->GetSettings(); diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index f64c5a7fe626..1db4d358e654 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -977,12 +977,12 @@ IMPL_LINK_TYPED( SpinField, ImplTimeout, Timer*, pTimer, void ) } } -void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags) +void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags) { Edit::Draw(pDev, rPos, rSize, nFlags); WinBits nFieldStyle = GetStyle(); - if ( !(nFlags & WINDOW_DRAW_NOCONTROLS ) && ( nFieldStyle & (WB_SPIN|WB_DROPDOWN) ) ) + if ( !(nFlags & DrawFlags::NoControls ) && ( nFieldStyle & (WB_SPIN|WB_DROPDOWN) ) ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -1010,7 +1010,7 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, s aDown.Move(aPos.X(), aPos.Y()); Color aButtonTextColor; - if ((nFlags & WINDOW_DRAW_MONO) || (eOutDevType == OUTDEV_PRINTER)) + if ((nFlags & DrawFlags::Mono) || (eOutDevType == OUTDEV_PRINTER)) aButtonTextColor = Color( COL_BLACK ); else aButtonTextColor = GetSettings().GetStyleSettings().GetButtonTextColor(); @@ -1024,7 +1024,7 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, s if (GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::SpinUpDown) eSymbol = SymbolType::SPIN_UPDOWN; - DrawSymbolFlags nSymbolStyle = (IsEnabled() || (nFlags & WINDOW_DRAW_NODISABLE)) ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable; + DrawSymbolFlags nSymbolStyle = (IsEnabled() || (nFlags & DrawFlags::NoDisable)) ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable; aView.DrawSymbol(aInnerRect, eSymbol, aButtonTextColor, nSymbolStyle); } diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index a21c360799cd..11471c8c7f3d 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -1360,7 +1360,7 @@ void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt ) Control::DataChanged( rDCEvt ); } -void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) +void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { ImplInitSettings( true, true, true ); @@ -1378,8 +1378,8 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& // Border/Background pDev->SetLineColor(); pDev->SetFillColor(); - bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER); - bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground(); + bool bBorder = !(nFlags & DrawFlags::NoBorder ) && (GetStyle() & WB_BORDER); + bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { Rectangle aRect( aPos, aSize ); @@ -1396,11 +1396,11 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& } // contents - if ( ( nFlags & WINDOW_DRAW_MONO ) || ( eOutDevType == OUTDEV_PRINTER ) ) + if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) ) pDev->SetTextColor( Color( COL_BLACK ) ); else { - if ( !(nFlags & WINDOW_DRAW_NODISABLE ) && !IsEnabled() ) + if ( !(nFlags & DrawFlags::NoDisable ) && !IsEnabled() ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); pDev->SetTextColor( rStyleSettings.GetDisableColor() ); diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 2a0bf5d38228..a58c625cd442 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1093,7 +1093,7 @@ void Dialog::GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, aImplWin->GetBorder( rLeftBorder, rTopBorder, rRightBorder, rBottomBorder ); } -void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong ) +void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index 0f326758683a..170dbcaf169b 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -148,7 +148,7 @@ void TabPage::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) } } -void TabPage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong ) +void TabPage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 6bb652f51129..c93e6c0f6ea6 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1913,7 +1913,7 @@ void Window::KeyUp( const KeyEvent& rKEvt ) mpWindowImpl->mbKeyUp = true; } -void Window::Draw( OutputDevice*, const Point&, const Size&, sal_uLong ) +void Window::Draw( OutputDevice*, const Point&, const Size&, DrawFlags ) { } |