summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-07 16:08:25 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-10-11 15:14:32 +0000
commitcb7ede2d9970a4d162dc71922f578922c0d6235a (patch)
tree141884aa4a9d7c2c3cfb6fdf850ddf71cad0e7a4 /vcl/source/control
parent0bc6ea3637e279fa2807d8ee649fb33f1ae6da47 (diff)
convert vcl StateChangedType to enum class
Change-Id: Ifa46523619ae7fb8d112525b8df594836e51bb8f Reviewed-on: https://gerrit.libreoffice.org/11843 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/button.cxx88
-rw-r--r--vcl/source/control/combobox.cxx20
-rw-r--r--vcl/source/control/ctrl.cxx16
-rw-r--r--vcl/source/control/edit.cxx22
-rw-r--r--vcl/source/control/fixed.cxx56
-rw-r--r--vcl/source/control/group.cxx16
-rw-r--r--vcl/source/control/ilstbox.cxx40
-rw-r--r--vcl/source/control/lstbox.cxx20
-rw-r--r--vcl/source/control/prgsbar.cxx8
-rw-r--r--vcl/source/control/scrbar.cxx18
-rw-r--r--vcl/source/control/slider.cxx16
-rw-r--r--vcl/source/control/spinbtn.cxx15
-rw-r--r--vcl/source/control/spinfld.cxx16
-rw-r--r--vcl/source/control/tabctrl.cxx12
14 files changed, 182 insertions, 181 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 5db9d6d1fa5e..52ef7b3afd84 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -163,7 +163,7 @@ bool Button::SetModeImage( const Image& rImage )
if ( rImage != mpButtonData->maImage )
{
mpButtonData->maImage = rImage;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
queue_resize();
}
return true;
@@ -184,7 +184,7 @@ void Button::SetImageAlign( ImageAlign eAlign )
if ( mpButtonData->meImageAlign != eAlign )
{
mpButtonData->meImageAlign = eAlign;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
}
@@ -549,7 +549,7 @@ void Button::ImplSetSymbolAlign( SymbolAlign eAlign )
if ( mpButtonData->meSymbolAlign != eAlign )
{
mpButtonData->meSymbolAlign = eAlign;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
}
@@ -1434,17 +1434,17 @@ void PushButton::StateChanged( StateChangedType nType )
{
Button::StateChanged( nType );
- if ( (nType == STATE_CHANGE_ENABLE) ||
- (nType == STATE_CHANGE_TEXT) ||
- (nType == STATE_CHANGE_IMAGE) ||
- (nType == STATE_CHANGE_DATA) ||
- (nType == STATE_CHANGE_STATE) ||
- (nType == STATE_CHANGE_UPDATEMODE) )
+ if ( (nType == StateChangedType::ENABLE) ||
+ (nType == StateChangedType::TEXT) ||
+ (nType == StateChangedType::IMAGE) ||
+ (nType == StateChangedType::DATA) ||
+ (nType == StateChangedType::STATE) ||
+ (nType == StateChangedType::UPDATEMODE) )
{
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
- else if ( nType == STATE_CHANGE_STYLE )
+ else if ( nType == StateChangedType::STYLE )
{
SetStyle( ImplInitStyle( GetWindow( WINDOW_PREV ), GetStyle() ) );
@@ -1460,18 +1460,18 @@ void PushButton::StateChanged( StateChangedType nType )
Invalidate();
}
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
- (nType == STATE_CHANGE_CONTROLFONT) )
+ else if ( (nType == StateChangedType::ZOOM) ||
+ (nType == StateChangedType::CONTROLFONT) )
{
ImplInitSettings( true, false, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
ImplInitSettings( false, true, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings( false, false, true );
Invalidate();
@@ -1567,7 +1567,7 @@ void PushButton::SetSymbol( SymbolType eSymbol )
if ( meSymbol != eSymbol )
{
meSymbol = eSymbol;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
}
@@ -1581,7 +1581,7 @@ void PushButton::SetDropDown( sal_uInt16 nStyle )
if ( mnDDStyle != nStyle )
{
mnDDStyle = nStyle;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
}
@@ -1603,7 +1603,7 @@ void PushButton::SetState( TriState eState )
ImplGetButtonState() |= BUTTON_DRAW_DONTKNOW;
}
- StateChanged( STATE_CHANGE_STATE );
+ StateChanged( StateChangedType::STATE );
Toggle();
}
}
@@ -1613,7 +1613,7 @@ void PushButton::SetPressed( bool bPressed )
if ( mbPressed != bPressed )
{
mbPressed = bPressed;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
}
@@ -2562,21 +2562,21 @@ void RadioButton::StateChanged( StateChangedType nType )
{
Button::StateChanged( nType );
- if ( nType == STATE_CHANGE_STATE )
+ if ( nType == StateChangedType::STATE )
{
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate( maStateRect );
}
- else if ( (nType == STATE_CHANGE_ENABLE) ||
- (nType == STATE_CHANGE_TEXT) ||
- (nType == STATE_CHANGE_IMAGE) ||
- (nType == STATE_CHANGE_DATA) ||
- (nType == STATE_CHANGE_UPDATEMODE) )
+ else if ( (nType == StateChangedType::ENABLE) ||
+ (nType == StateChangedType::TEXT) ||
+ (nType == StateChangedType::IMAGE) ||
+ (nType == StateChangedType::DATA) ||
+ (nType == StateChangedType::UPDATEMODE) )
{
if ( IsUpdateMode() )
Invalidate();
}
- else if ( nType == STATE_CHANGE_STYLE )
+ else if ( nType == StateChangedType::STYLE )
{
SetStyle( ImplInitStyle( GetWindow( WINDOW_PREV ), GetStyle() ) );
@@ -2587,18 +2587,18 @@ void RadioButton::StateChanged( StateChangedType nType )
Invalidate();
}
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
- (nType == STATE_CHANGE_CONTROLFONT) )
+ else if ( (nType == StateChangedType::ZOOM) ||
+ (nType == StateChangedType::CONTROLFONT) )
{
ImplInitSettings( true, false, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
ImplInitSettings( false, true, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings( false, false, true );
Invalidate();
@@ -2655,7 +2655,7 @@ bool RadioButton::SetModeRadioImage( const Image& rImage )
if ( rImage != maImage )
{
maImage = rImage;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
queue_resize();
}
return true;
@@ -2673,7 +2673,7 @@ void RadioButton::SetState( bool bCheck )
if ( mbChecked != bCheck )
{
mbChecked = bCheck;
- StateChanged( STATE_CHANGE_STATE );
+ StateChanged( StateChangedType::STATE );
Toggle();
}
}
@@ -2730,7 +2730,7 @@ void RadioButton::Check( bool bCheck )
mbChecked = bCheck;
ImplDelData aDelData;
ImplAddDel( &aDelData );
- StateChanged( STATE_CHANGE_STATE );
+ StateChanged( StateChangedType::STATE );
if ( aDelData.IsDead() )
return;
if ( bCheck && mbRadioCheck )
@@ -3496,21 +3496,21 @@ void CheckBox::StateChanged( StateChangedType nType )
{
Button::StateChanged( nType );
- if ( nType == STATE_CHANGE_STATE )
+ if ( nType == StateChangedType::STATE )
{
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate( maStateRect );
}
- else if ( (nType == STATE_CHANGE_ENABLE) ||
- (nType == STATE_CHANGE_TEXT) ||
- (nType == STATE_CHANGE_IMAGE) ||
- (nType == STATE_CHANGE_DATA) ||
- (nType == STATE_CHANGE_UPDATEMODE) )
+ else if ( (nType == StateChangedType::ENABLE) ||
+ (nType == StateChangedType::TEXT) ||
+ (nType == StateChangedType::IMAGE) ||
+ (nType == StateChangedType::DATA) ||
+ (nType == StateChangedType::UPDATEMODE) )
{
if ( IsUpdateMode() )
Invalidate();
}
- else if ( nType == STATE_CHANGE_STYLE )
+ else if ( nType == StateChangedType::STYLE )
{
SetStyle( ImplInitStyle( GetWindow( WINDOW_PREV ), GetStyle() ) );
@@ -3521,18 +3521,18 @@ void CheckBox::StateChanged( StateChangedType nType )
Invalidate();
}
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
- (nType == STATE_CHANGE_CONTROLFONT) )
+ else if ( (nType == StateChangedType::ZOOM) ||
+ (nType == StateChangedType::CONTROLFONT) )
{
ImplInitSettings( true, false, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
ImplInitSettings( false, true, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings( false, false, true );
Invalidate();
@@ -3592,7 +3592,7 @@ void CheckBox::SetState( TriState eState )
if ( meState != eState )
{
meState = eState;
- StateChanged( STATE_CHANGE_STATE );
+ StateChanged( StateChangedType::STATE );
Toggle();
}
}
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 2880c9011c95..857e38926651 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -599,13 +599,13 @@ void ComboBox::StateChanged( StateChangedType nType )
{
Edit::StateChanged( nType );
- if ( nType == STATE_CHANGE_READONLY )
+ if ( nType == StateChangedType::READONLY )
{
mpImplLB->SetReadOnly( IsReadOnly() );
if ( mpBtn )
mpBtn->Enable( IsEnabled() && !IsReadOnly() );
}
- else if ( nType == STATE_CHANGE_ENABLE )
+ else if ( nType == StateChangedType::ENABLE )
{
mpSubEdit->Enable( IsEnabled() );
mpImplLB->Enable( IsEnabled() && !IsReadOnly() );
@@ -613,47 +613,47 @@ void ComboBox::StateChanged( StateChangedType nType )
mpBtn->Enable( IsEnabled() && !IsReadOnly() );
Invalidate();
}
- else if( nType == STATE_CHANGE_UPDATEMODE )
+ else if( nType == StateChangedType::UPDATEMODE )
{
mpImplLB->SetUpdateMode( IsUpdateMode() );
}
- else if ( nType == STATE_CHANGE_ZOOM )
+ else if ( nType == StateChangedType::ZOOM )
{
mpImplLB->SetZoom( GetZoom() );
mpSubEdit->SetZoom( GetZoom() );
ImplCalcEditHeight();
Resize();
}
- else if ( nType == STATE_CHANGE_CONTROLFONT )
+ else if ( nType == StateChangedType::CONTROLFONT )
{
mpImplLB->SetControlFont( GetControlFont() );
mpSubEdit->SetControlFont( GetControlFont() );
ImplCalcEditHeight();
Resize();
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
mpImplLB->SetControlForeground( GetControlForeground() );
mpSubEdit->SetControlForeground( GetControlForeground() );
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
mpImplLB->SetControlBackground( GetControlBackground() );
mpSubEdit->SetControlBackground( GetControlBackground() );
}
- else if ( nType == STATE_CHANGE_STYLE )
+ else if ( nType == StateChangedType::STYLE )
{
SetStyle( ImplInitStyle( GetStyle() ) );
mpImplLB->GetMainWindow().EnableSort( ( GetStyle() & WB_SORT ) ? true : false );
}
- else if( nType == STATE_CHANGE_MIRRORING )
+ else if( nType == StateChangedType::MIRRORING )
{
if( mpBtn )
{
mpBtn->EnableRTL( IsRTLEnabled() );
ImplInitDropDownButton( mpBtn );
}
- mpSubEdit->StateChanged( STATE_CHANGE_MIRRORING );
+ mpSubEdit->StateChanged( StateChangedType::MIRRORING );
mpImplLB->EnableRTL( IsRTLEnabled() );
Resize();
}
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 4282453df27d..3654cbd51b48 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -75,7 +75,7 @@ void Control::EnableRTL( bool bEnable )
// convenience: for controls also switch layout mode
SetLayoutMode( bEnable ? TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT :
TEXT_LAYOUT_TEXTORIGIN_LEFT );
- StateChanged( STATE_CHANGE_MIRRORING );
+ StateChanged( StateChangedType::MIRRORING );
OutputDevice::EnableRTL(bEnable);
}
@@ -248,7 +248,7 @@ bool Control::Notify( NotifyEvent& rNEvt )
if ( !mbHasControlFocus )
{
mbHasControlFocus = true;
- StateChanged( STATE_CHANGE_CONTROL_FOCUS );
+ StateChanged( StateChangedType::CONTROL_FOCUS );
if ( ImplCallEventListenersAndHandler( VCLEVENT_CONTROL_GETFOCUS, maGetFocusHdl, this ) )
// been destroyed within the handler
return true;
@@ -262,7 +262,7 @@ bool Control::Notify( NotifyEvent& rNEvt )
if ( !pFocusWin || !ImplIsWindowOrChild( pFocusWin ) )
{
mbHasControlFocus = false;
- StateChanged( STATE_CHANGE_CONTROL_FOCUS );
+ StateChanged( StateChangedType::CONTROL_FOCUS );
if ( ImplCallEventListenersAndHandler( VCLEVENT_CONTROL_LOSEFOCUS, maLoseFocusHdl, this ) )
// been destroyed within the handler
return true;
@@ -275,11 +275,11 @@ bool Control::Notify( NotifyEvent& rNEvt )
void Control::StateChanged( StateChangedType nStateChange )
{
- if( nStateChange == STATE_CHANGE_INITSHOW ||
- nStateChange == STATE_CHANGE_VISIBLE ||
- nStateChange == STATE_CHANGE_ZOOM ||
- nStateChange == STATE_CHANGE_BORDER ||
- nStateChange == STATE_CHANGE_CONTROLFONT
+ if( nStateChange == StateChangedType::INITSHOW ||
+ nStateChange == StateChangedType::VISIBLE ||
+ nStateChange == StateChangedType::ZOOM ||
+ nStateChange == StateChangedType::BORDER ||
+ nStateChange == StateChangedType::CONTROLFONT
)
{
ImplClearLayoutData();
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 5d0bb1db13b4..2c57deecd063 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2193,7 +2193,7 @@ void Edit::Command( const CommandEvent& rCEvt )
void Edit::StateChanged( StateChangedType nType )
{
- if ( nType == STATE_CHANGE_INITSHOW )
+ if ( nType == StateChangedType::INITSHOW )
{
if ( !mpSubEdit )
{
@@ -2205,7 +2205,7 @@ void Edit::StateChanged( StateChangedType nType )
// update background (eventual SetPaintTransparent)
ImplInitSettings( false, false, true );
}
- else if ( nType == STATE_CHANGE_ENABLE )
+ else if ( nType == StateChangedType::ENABLE )
{
if ( !mpSubEdit )
{
@@ -2213,10 +2213,10 @@ void Edit::StateChanged( StateChangedType nType )
ImplInvalidateOrRepaint();
}
}
- else if ( nType == STATE_CHANGE_STYLE || nType == STATE_CHANGE_MIRRORING )
+ else if ( nType == StateChangedType::STYLE || nType == StateChangedType::MIRRORING )
{
WinBits nStyle = GetStyle();
- if( nType == STATE_CHANGE_STYLE )
+ if( nType == StateChangedType::STYLE )
{
nStyle = ImplInitStyle( GetStyle() );
SetStyle( nStyle );
@@ -2232,12 +2232,12 @@ void Edit::StateChanged( StateChangedType nType )
{
if( GetParent()->GetStyle() & WB_LEFT )
mnAlign = EDIT_ALIGN_RIGHT;
- if ( nType == STATE_CHANGE_MIRRORING )
+ if ( nType == StateChangedType::MIRRORING )
SetLayoutMode( TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT );
}
else if( mbIsSubEdit && !GetParent()->IsRTLEnabled() )
{
- if ( nType == STATE_CHANGE_MIRRORING )
+ if ( nType == StateChangedType::MIRRORING )
SetLayoutMode( TEXT_LAYOUT_TEXTORIGIN_LEFT );
}
@@ -2252,7 +2252,7 @@ void Edit::StateChanged( StateChangedType nType )
}
}
- else if ( nType == STATE_CHANGE_ZOOM )
+ else if ( nType == StateChangedType::ZOOM )
{
if ( !mpSubEdit )
{
@@ -2261,7 +2261,7 @@ void Edit::StateChanged( StateChangedType nType )
Invalidate();
}
}
- else if ( nType == STATE_CHANGE_CONTROLFONT )
+ else if ( nType == StateChangedType::CONTROLFONT )
{
if ( !mpSubEdit )
{
@@ -2270,7 +2270,7 @@ void Edit::StateChanged( StateChangedType nType )
Invalidate();
}
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
if ( !mpSubEdit )
{
@@ -2278,7 +2278,7 @@ void Edit::StateChanged( StateChangedType nType )
Invalidate();
}
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
if ( !mpSubEdit )
{
@@ -2442,7 +2442,7 @@ void Edit::SetReadOnly( bool bReadOnly )
if ( mpSubEdit )
mpSubEdit->SetReadOnly( bReadOnly );
- StateChanged( STATE_CHANGE_READONLY );
+ StateChanged( StateChangedType::READONLY );
}
}
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index beaa5b835aa7..06a3cde5cee0 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -287,14 +287,14 @@ void FixedText::StateChanged( StateChangedType nType )
{
Control::StateChanged( nType );
- if ( (nType == STATE_CHANGE_ENABLE) ||
- (nType == STATE_CHANGE_TEXT) ||
- (nType == STATE_CHANGE_UPDATEMODE) )
+ if ( (nType == StateChangedType::ENABLE) ||
+ (nType == StateChangedType::TEXT) ||
+ (nType == StateChangedType::UPDATEMODE) )
{
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
- else if ( nType == STATE_CHANGE_STYLE )
+ else if ( nType == StateChangedType::STYLE )
{
SetStyle( ImplInitStyle( GetStyle() ) );
if ( (GetPrevStyle() & FIXEDTEXT_VIEW_STYLE) !=
@@ -304,18 +304,18 @@ void FixedText::StateChanged( StateChangedType nType )
Invalidate();
}
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
- (nType == STATE_CHANGE_CONTROLFONT) )
+ else if ( (nType == StateChangedType::ZOOM) ||
+ (nType == StateChangedType::CONTROLFONT) )
{
ImplInitSettings( true, false, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
ImplInitSettings( false, true, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings( false, false, true );
Invalidate();
@@ -653,33 +653,33 @@ void FixedLine::StateChanged( StateChangedType nType )
{
Control::StateChanged( nType );
- if ( (nType == STATE_CHANGE_ENABLE) ||
- (nType == STATE_CHANGE_TEXT) ||
- (nType == STATE_CHANGE_UPDATEMODE) )
+ if ( (nType == StateChangedType::ENABLE) ||
+ (nType == StateChangedType::TEXT) ||
+ (nType == StateChangedType::UPDATEMODE) )
{
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
- else if ( nType == STATE_CHANGE_STYLE )
+ else if ( nType == StateChangedType::STYLE )
{
SetStyle( ImplInitStyle( GetStyle() ) );
if ( (GetPrevStyle() & FIXEDLINE_VIEW_STYLE) !=
(GetStyle() & FIXEDLINE_VIEW_STYLE) )
Invalidate();
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
- (nType == STATE_CHANGE_STYLE) ||
- (nType == STATE_CHANGE_CONTROLFONT) )
+ else if ( (nType == StateChangedType::ZOOM) ||
+ (nType == StateChangedType::STYLE) ||
+ (nType == StateChangedType::CONTROLFONT) )
{
ImplInitSettings( true, false, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
ImplInitSettings( false, true, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings( false, false, true );
Invalidate();
@@ -807,20 +807,20 @@ void FixedBitmap::StateChanged( StateChangedType nType )
{
Control::StateChanged( nType );
- if ( (nType == STATE_CHANGE_DATA) ||
- (nType == STATE_CHANGE_UPDATEMODE) )
+ if ( (nType == StateChangedType::DATA) ||
+ (nType == StateChangedType::UPDATEMODE) )
{
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
- else if ( nType == STATE_CHANGE_STYLE )
+ else if ( nType == StateChangedType::STYLE )
{
SetStyle( ImplInitStyle( GetStyle() ) );
if ( (GetPrevStyle() & FIXEDBITMAP_VIEW_STYLE) !=
(GetStyle() & FIXEDBITMAP_VIEW_STYLE) )
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings();
Invalidate();
@@ -842,7 +842,7 @@ void FixedBitmap::DataChanged( const DataChangedEvent& rDCEvt )
void FixedBitmap::SetBitmap( const Bitmap& rBitmap )
{
maBitmap = rBitmap;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
queue_resize();
}
@@ -994,21 +994,21 @@ void FixedImage::StateChanged( StateChangedType nType )
{
Control::StateChanged( nType );
- if ( (nType == STATE_CHANGE_ENABLE) ||
- (nType == STATE_CHANGE_DATA) ||
- (nType == STATE_CHANGE_UPDATEMODE) )
+ if ( (nType == StateChangedType::ENABLE) ||
+ (nType == StateChangedType::DATA) ||
+ (nType == StateChangedType::UPDATEMODE) )
{
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
- else if ( nType == STATE_CHANGE_STYLE )
+ else if ( nType == StateChangedType::STYLE )
{
SetStyle( ImplInitStyle( GetStyle() ) );
if ( (GetPrevStyle() & FIXEDIMAGE_VIEW_STYLE) !=
(GetStyle() & FIXEDIMAGE_VIEW_STYLE) )
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings();
Invalidate();
@@ -1032,7 +1032,7 @@ void FixedImage::SetImage( const Image& rImage )
if ( rImage != maImage )
{
maImage = rImage;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
queue_resize();
}
}
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index 795bb3b43797..5fa38b242244 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -223,32 +223,32 @@ void GroupBox::StateChanged( StateChangedType nType )
{
Control::StateChanged( nType );
- if ( (nType == STATE_CHANGE_ENABLE) ||
- (nType == STATE_CHANGE_TEXT) ||
- (nType == STATE_CHANGE_UPDATEMODE) )
+ if ( (nType == StateChangedType::ENABLE) ||
+ (nType == StateChangedType::TEXT) ||
+ (nType == StateChangedType::UPDATEMODE) )
{
if ( IsUpdateMode() )
Invalidate();
}
- else if ( nType == STATE_CHANGE_STYLE )
+ else if ( nType == StateChangedType::STYLE )
{
SetStyle( ImplInitStyle( GetStyle() ) );
if ( (GetPrevStyle() & GROUP_VIEW_STYLE) !=
(GetStyle() & GROUP_VIEW_STYLE) )
Invalidate();
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
- (nType == STATE_CHANGE_CONTROLFONT) )
+ else if ( (nType == StateChangedType::ZOOM) ||
+ (nType == StateChangedType::CONTROLFONT) )
{
ImplInitSettings( true, false, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
ImplInitSettings( false, true, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings( false, false, true );
Invalidate();
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index d936d3b2f6dc..693070fe6261 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2061,34 +2061,34 @@ void ImplListBoxWindow::StateChanged( StateChangedType nType )
{
Control::StateChanged( nType );
- if ( nType == STATE_CHANGE_ZOOM )
+ if ( nType == StateChangedType::ZOOM )
{
ImplInitSettings( true, false, false );
ImplCalcMetrics();
Invalidate();
}
- else if ( nType == STATE_CHANGE_UPDATEMODE )
+ else if ( nType == StateChangedType::UPDATEMODE )
{
if ( IsUpdateMode() && IsReallyVisible() )
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLFONT )
+ else if ( nType == StateChangedType::CONTROLFONT )
{
ImplInitSettings( true, false, false );
ImplCalcMetrics();
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
ImplInitSettings( false, true, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings( false, false, true );
Invalidate();
}
- else if( nType == STATE_CHANGE_ENABLE )
+ else if( nType == StateChangedType::ENABLE )
{
Invalidate();
}
@@ -2173,7 +2173,7 @@ void ImplListBox::Clear()
}
mpVScrollBar->SetThumbPos( 0 );
mpHScrollBar->SetThumbPos( 0 );
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
sal_Int32 ImplListBox::InsertEntry( sal_Int32 nPos, const OUString& rStr )
@@ -2185,7 +2185,7 @@ sal_Int32 ImplListBox::InsertEntry( sal_Int32 nPos, const OUString& rStr )
delete pNewEntry;
return nNewPos;
}
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
return nNewPos;
}
@@ -2198,14 +2198,14 @@ sal_Int32 ImplListBox::InsertEntry( sal_Int32 nPos, const OUString& rStr, const
delete pNewEntry;
return nNewPos;
}
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
return nNewPos;
}
void ImplListBox::RemoveEntry( sal_Int32 nPos )
{
maLBWindow.RemoveEntry( nPos );
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
void ImplListBox::SetEntryFlags( sal_Int32 nPos, long nFlags )
@@ -2242,7 +2242,7 @@ void ImplListBox::Resize()
IMPL_LINK_NOARG(ImplListBox, MRUChanged)
{
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
return 1;
}
@@ -2438,18 +2438,18 @@ void ImplListBox::ImplResizeControls()
void ImplListBox::StateChanged( StateChangedType nType )
{
- if ( nType == STATE_CHANGE_INITSHOW )
+ if ( nType == StateChangedType::INITSHOW )
{
ImplCheckScrollBars();
}
- else if ( ( nType == STATE_CHANGE_UPDATEMODE ) || ( nType == STATE_CHANGE_DATA ) )
+ else if ( ( nType == StateChangedType::UPDATEMODE ) || ( nType == StateChangedType::DATA ) )
{
bool bUpdate = IsUpdateMode();
maLBWindow.SetUpdateMode( bUpdate );
if ( bUpdate && IsReallyVisible() )
ImplCheckScrollBars();
}
- else if( nType == STATE_CHANGE_ENABLE )
+ else if( nType == StateChangedType::ENABLE )
{
mpHScrollBar->Enable( IsEnabled() );
mpVScrollBar->Enable( IsEnabled() );
@@ -2458,24 +2458,24 @@ void ImplListBox::StateChanged( StateChangedType nType )
Invalidate();
}
- else if ( nType == STATE_CHANGE_ZOOM )
+ else if ( nType == StateChangedType::ZOOM )
{
maLBWindow.SetZoom( GetZoom() );
Resize();
}
- else if ( nType == STATE_CHANGE_CONTROLFONT )
+ else if ( nType == StateChangedType::CONTROLFONT )
{
maLBWindow.SetControlFont( GetControlFont() );
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
maLBWindow.SetControlForeground( GetControlForeground() );
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
maLBWindow.SetControlBackground( GetControlBackground() );
}
- else if( nType == STATE_CHANGE_MIRRORING )
+ else if( nType == StateChangedType::MIRRORING )
{
maLBWindow.EnableRTL( IsRTLEnabled() );
mpHScrollBar->EnableRTL( IsRTLEnabled() );
@@ -2558,7 +2558,7 @@ void ImplListBox::SetMRUEntries( const OUString& rEntries, sal_Unicode cSep )
{
maLBWindow.GetEntryList()->SetMRUCount( nMRUCount );
SetSeparatorPos( nMRUCount ? nMRUCount-1 : 0 );
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
}
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index c0451281ce5f..9942aeb56cf4 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -769,14 +769,14 @@ long ListBox::GetIndexForPoint( const Point& rPoint, sal_Int32& rPos ) const
void ListBox::StateChanged( StateChangedType nType )
{
- if( nType == STATE_CHANGE_READONLY )
+ if( nType == StateChangedType::READONLY )
{
if( mpImplWin )
mpImplWin->Enable( !IsReadOnly() );
if( mpBtn )
mpBtn->Enable( !IsReadOnly() );
}
- else if( nType == STATE_CHANGE_ENABLE )
+ else if( nType == StateChangedType::ENABLE )
{
mpImplLB->Enable( IsEnabled() );
if( mpImplWin )
@@ -793,11 +793,11 @@ void ListBox::StateChanged( StateChangedType nType )
if( mpBtn )
mpBtn->Enable( IsEnabled() );
}
- else if( nType == STATE_CHANGE_UPDATEMODE )
+ else if( nType == StateChangedType::UPDATEMODE )
{
mpImplLB->SetUpdateMode( IsUpdateMode() );
}
- else if ( nType == STATE_CHANGE_ZOOM )
+ else if ( nType == StateChangedType::ZOOM )
{
mpImplLB->SetZoom( GetZoom() );
if ( mpImplWin )
@@ -808,7 +808,7 @@ void ListBox::StateChanged( StateChangedType nType )
}
Resize();
}
- else if ( nType == STATE_CHANGE_CONTROLFONT )
+ else if ( nType == StateChangedType::CONTROLFONT )
{
mpImplLB->SetControlFont( GetControlFont() );
if ( mpImplWin )
@@ -819,7 +819,7 @@ void ListBox::StateChanged( StateChangedType nType )
}
Resize();
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
mpImplLB->SetControlForeground( GetControlForeground() );
if ( mpImplWin )
@@ -830,7 +830,7 @@ void ListBox::StateChanged( StateChangedType nType )
mpImplWin->Invalidate();
}
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
mpImplLB->SetControlBackground( GetControlBackground() );
if ( mpImplWin )
@@ -850,14 +850,14 @@ void ListBox::StateChanged( StateChangedType nType )
mpImplWin->Invalidate();
}
}
- else if ( nType == STATE_CHANGE_STYLE )
+ else if ( nType == StateChangedType::STYLE )
{
SetStyle( ImplInitStyle( GetStyle() ) );
mpImplLB->GetMainWindow().EnableSort( ( GetStyle() & WB_SORT ) ? true : false );
bool bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? true : false;
mpImplLB->SetMultiSelectionSimpleMode( bSimpleMode );
}
- else if( nType == STATE_CHANGE_MIRRORING )
+ else if( nType == StateChangedType::MIRRORING )
{
if( mpBtn )
{
@@ -1396,7 +1396,7 @@ void ListBox::SetReadOnly( bool bReadOnly )
if ( mpImplLB->IsReadOnly() != bReadOnly )
{
mpImplLB->SetReadOnly( bReadOnly );
- StateChanged( STATE_CHANGE_READONLY );
+ StateChanged( StateChangedType::READONLY );
}
}
diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx
index d1b7bf9d6d69..1536f9336b09 100644
--- a/vcl/source/control/prgsbar.cxx
+++ b/vcl/source/control/prgsbar.cxx
@@ -185,20 +185,20 @@ void ProgressBar::SetValue( sal_uInt16 nNewPercent )
void ProgressBar::StateChanged( StateChangedType nType )
{
/* FIXME: !!! We do not support text output at the moment
- if ( (nType == STATE_CHANGE_ZOOM) ||
- (nType == STATE_CHANGE_CONTROLFONT) )
+ if ( (nType == StateChangedType::ZOOM) ||
+ (nType == StateChangedType::CONTROLFONT) )
{
ImplInitSettings( true, false, false );
Invalidate();
}
else
*/
- if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ if ( nType == StateChangedType::CONTROLFOREGROUND )
{
ImplInitSettings( false, true, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings( false, false, true );
Invalidate();
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index d9ee7576306b..df763dd5ad4f 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -1166,14 +1166,14 @@ void ScrollBar::StateChanged( StateChangedType nType )
{
Control::StateChanged( nType );
- if ( nType == STATE_CHANGE_INITSHOW )
+ if ( nType == StateChangedType::INITSHOW )
ImplCalc( false );
- else if ( nType == STATE_CHANGE_DATA )
+ else if ( nType == StateChangedType::DATA )
{
if ( IsReallyVisible() && IsUpdateMode() )
ImplCalc( true );
}
- else if ( nType == STATE_CHANGE_UPDATEMODE )
+ else if ( nType == StateChangedType::UPDATEMODE )
{
if ( IsReallyVisible() && IsUpdateMode() )
{
@@ -1181,12 +1181,12 @@ void ScrollBar::StateChanged( StateChangedType nType )
Invalidate();
}
}
- else if ( nType == STATE_CHANGE_ENABLE )
+ else if ( nType == StateChangedType::ENABLE )
{
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
- else if ( nType == STATE_CHANGE_STYLE )
+ else if ( nType == StateChangedType::STYLE )
{
ImplInitStyle( GetStyle() );
if ( IsReallyVisible() && IsUpdateMode() )
@@ -1363,7 +1363,7 @@ void ScrollBar::SetRange( const Range& rRange )
if ( mnThumbPos < mnMinRange )
mnThumbPos = mnMinRange;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
}
@@ -1377,7 +1377,7 @@ void ScrollBar::SetThumbPos( long nNewThumbPos )
if ( mnThumbPos != nNewThumbPos )
{
mnThumbPos = nNewThumbPos;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
}
@@ -1392,7 +1392,7 @@ void ScrollBar::SetVisibleSize( long nNewSize )
mnThumbPos = mnMaxRange-mnVisibleSize;
if ( mnThumbPos < mnMinRange )
mnThumbPos = mnMinRange;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
}
@@ -1463,7 +1463,7 @@ void ScrollBarBox::StateChanged( StateChangedType nType )
{
Window::StateChanged( nType );
- if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings();
Invalidate();
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index 0ebdc37dc66e..106ca0d7f31f 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -831,14 +831,14 @@ void Slider::StateChanged( StateChangedType nType )
{
Control::StateChanged( nType );
- if ( nType == STATE_CHANGE_INITSHOW )
+ if ( nType == StateChangedType::INITSHOW )
ImplCalc( false );
- else if ( nType == STATE_CHANGE_DATA )
+ else if ( nType == StateChangedType::DATA )
{
if ( IsReallyVisible() && IsUpdateMode() )
ImplCalc( true );
}
- else if ( nType == STATE_CHANGE_UPDATEMODE )
+ else if ( nType == StateChangedType::UPDATEMODE )
{
if ( IsReallyVisible() && IsUpdateMode() )
{
@@ -846,12 +846,12 @@ void Slider::StateChanged( StateChangedType nType )
Invalidate();
}
}
- else if ( nType == STATE_CHANGE_ENABLE )
+ else if ( nType == StateChangedType::ENABLE )
{
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
- else if ( nType == STATE_CHANGE_STYLE )
+ else if ( nType == StateChangedType::STYLE )
{
if ( IsReallyVisible() && IsUpdateMode() )
{
@@ -864,7 +864,7 @@ void Slider::StateChanged( StateChangedType nType )
}
}
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings();
Invalidate();
@@ -914,7 +914,7 @@ void Slider::SetRange( const Range& rRange )
if ( mnThumbPos < mnMinRange )
mnThumbPos = mnMinRange;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
}
@@ -928,7 +928,7 @@ void Slider::SetThumbPos( long nNewThumbPos )
if ( mnThumbPos != nNewThumbPos )
{
mnThumbPos = nNewThumbPos;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
}
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index b7d9de824902..122aed10c89d 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -82,7 +82,7 @@ void SpinButton::Up()
if ( ImplIsUpperEnabled() )
{
mnValue += mnValueStep;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
ImplMoveFocus( true );
}
@@ -95,7 +95,7 @@ void SpinButton::Down()
if ( ImplIsLowerEnabled() )
{
mnValue -= mnValueStep;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
ImplMoveFocus( false );
}
@@ -315,12 +315,12 @@ void SpinButton::StateChanged( StateChangedType nType )
{
switch ( nType )
{
- case STATE_CHANGE_DATA:
- case STATE_CHANGE_ENABLE:
+ case StateChangedType::DATA:
+ case StateChangedType::ENABLE:
Invalidate();
break;
- case STATE_CHANGE_STYLE:
+ case StateChangedType::STYLE:
{
bool bNewRepeat = 0 != ( GetStyle() & WB_REPEAT );
if ( bNewRepeat != mbRepeat )
@@ -341,6 +341,7 @@ void SpinButton::StateChanged( StateChangedType nType )
}
}
break;
+ default:;
}
Control::StateChanged( nType );
@@ -377,7 +378,7 @@ void SpinButton::SetRange( const Range& rRange )
if ( mnValue < mnMinRange )
mnValue = mnMinRange;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
}
@@ -392,7 +393,7 @@ void SpinButton::SetValue( long nValue )
if ( mnValue != nValue )
{
mnValue = nValue;
- StateChanged( STATE_CHANGE_DATA );
+ StateChanged( StateChangedType::DATA );
}
}
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index a6c558317eea..c1a81b2e73d6 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -772,7 +772,7 @@ void SpinField::StateChanged( StateChangedType nType )
{
Edit::StateChanged( nType );
- if ( nType == STATE_CHANGE_ENABLE )
+ if ( nType == StateChangedType::ENABLE )
{
if ( mbSpin || ( GetStyle() & WB_DROPDOWN ) )
{
@@ -787,45 +787,45 @@ void SpinField::StateChanged( StateChangedType nType )
Invalidate( maDropDownRect );
}
}
- else if ( nType == STATE_CHANGE_STYLE )
+ else if ( nType == StateChangedType::STYLE )
{
if ( GetStyle() & WB_REPEAT )
mbRepeat = true;
else
mbRepeat = false;
}
- else if ( nType == STATE_CHANGE_ZOOM )
+ else if ( nType == StateChangedType::ZOOM )
{
Resize();
if ( mpEdit )
mpEdit->SetZoom( GetZoom() );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLFONT )
+ else if ( nType == StateChangedType::CONTROLFONT )
{
if ( mpEdit )
mpEdit->SetControlFont( GetControlFont() );
ImplInitSettings( true, false, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
if ( mpEdit )
mpEdit->SetControlForeground( GetControlForeground() );
ImplInitSettings( false, true, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
if ( mpEdit )
mpEdit->SetControlBackground( GetControlBackground() );
ImplInitSettings( false, false, true );
Invalidate();
}
- else if( nType == STATE_CHANGE_MIRRORING )
+ else if( nType == StateChangedType::MIRRORING )
{
if( mpEdit )
- mpEdit->StateChanged( STATE_CHANGE_MIRRORING );
+ mpEdit->StateChanged( StateChangedType::MIRRORING );
Resize();
}
}
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 446f0727ceb0..b28b4ca030b3 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -1468,29 +1468,29 @@ void TabControl::StateChanged( StateChangedType nType )
{
Control::StateChanged( nType );
- if ( nType == STATE_CHANGE_INITSHOW )
+ if ( nType == StateChangedType::INITSHOW )
{
ImplPosCurTabPage();
if( mpTabCtrlData->mpListBox )
Resize();
}
- else if ( nType == STATE_CHANGE_UPDATEMODE )
+ else if ( nType == StateChangedType::UPDATEMODE )
{
if ( IsUpdateMode() )
Invalidate();
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
- (nType == STATE_CHANGE_CONTROLFONT) )
+ else if ( (nType == StateChangedType::ZOOM) ||
+ (nType == StateChangedType::CONTROLFONT) )
{
ImplInitSettings( true, false, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
ImplInitSettings( false, true, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings( false, false, true );
Invalidate();