diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-06 14:34:03 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-05-07 13:28:09 +0000 |
commit | 0776b33f79327936e0bbf26acc73f2f0db45b9c8 (patch) | |
tree | 84685e5a2407e92963e9a1caa17a5336e5622688 /vcl | |
parent | 2c8dc0373377a6e801c9a9246ffdc3641f3be4ec (diff) |
convert PUSHBUTTON_DROPDOWN constants to scoped enum
Change-Id: Iae363b8478ef2d560ae661af06ba989f27adc093
Reviewed-on: https://gerrit.libreoffice.org/15650
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/button.cxx | 10 | ||||
-rw-r--r-- | vcl/source/control/menubtn.cxx | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 7bbe33a695a6..b036aeeece2b 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -617,7 +617,7 @@ void PushButton::ImplInitPushButtonData() meSymbol = SymbolType::DONTKNOW; meState = TRISTATE_FALSE; meSaveValue = TRISTATE_FALSE; - mnDDStyle = 0; + mnDDStyle = PushButtonDropdownStyle::NONE; mbPressed = false; mbInUserDraw = false; } @@ -837,7 +837,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, sal_uLong nDrawFl sal_uLong nImageSep = 1 + (pDev->GetTextHeight()-10)/2; if( nImageSep < 1 ) nImageSep = 1; - if ( mnDDStyle == PUSHBUTTON_DROPDOWN_MENUBUTTON ) + if ( mnDDStyle == PushButtonDropdownStyle::MenuButton ) { long nSeparatorX = 0; Rectangle aSymbolRect = aInRect; @@ -887,7 +887,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, sal_uLong nDrawFl aDecoView.DrawSymbol( aSymbolRect, meSymbol, aColor, nStyle ); } - if ( mnDDStyle == PUSHBUTTON_DROPDOWN_TOOLBOX && !bLayout ) + if ( mnDDStyle == PushButtonDropdownStyle::Toolbox && !bLayout ) { bool bBlack = false; Color aArrowColor( COL_BLACK ); @@ -1547,7 +1547,7 @@ void PushButton::SetSymbolAlign( SymbolAlign eAlign ) ImplSetSymbolAlign( eAlign ); } -void PushButton::SetDropDown( sal_uInt16 nStyle ) +void PushButton::SetDropDown( PushButtonDropdownStyle nStyle ) { if ( mnDDStyle != nStyle ) { @@ -1613,7 +1613,7 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const } else if ( IsImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) ) aSize = GetModeImage().GetSizePixel(); - if( mnDDStyle == PUSHBUTTON_DROPDOWN_MENUBUTTON ) + if( mnDDStyle == PushButtonDropdownStyle::MenuButton ) { long nSymbolSize = GetTextHeight() / 2 + 1; aSize.Width() += 2*nSymbolSize; diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx index 74c94c23f550..9e4525690825 100644 --- a/vcl/source/control/menubtn.cxx +++ b/vcl/source/control/menubtn.cxx @@ -28,7 +28,7 @@ void MenuButton::ImplInitMenuButtonData() { - mnDDStyle = PUSHBUTTON_DROPDOWN_MENUBUTTON; + mnDDStyle = PushButtonDropdownStyle::MenuButton; mpMenuTimer = NULL; mpMenu = NULL; @@ -109,7 +109,7 @@ void MenuButton::MouseButtonDown( const MouseEvent& rMEvt ) if ( mnMenuMode & MENUBUTTON_MENUMODE_TIMED ) { // If the separated dropdown symbol is not hit, delay the popup execution - if( mnDDStyle != PUSHBUTTON_DROPDOWN_MENUBUTTON || // no separator at all + if( mnDDStyle != PushButtonDropdownStyle::MenuButton || // no separator at all rMEvt.GetPosPixel().X() <= ImplGetSeparatorX() ) { if ( !mpMenuTimer ) |