diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-20 14:46:54 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-05-22 06:33:12 +0000 |
commit | 83eb114394879cbfd073322a51c47d02553c1fcf (patch) | |
tree | 5cd7d277ffc175fc7e6fd66140cb280caf1b0451 /toolkit | |
parent | e929194317a7debb1c5467282230cbbabe61a710 (diff) |
convert constants in include/vcl/settings.hxx to scoped enums
Change-Id: I2a110c017f13eca6ddbd70ef3ed195d24adef0a3
Reviewed-on: https://gerrit.libreoffice.org/15828
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/awt/vclxwindow.cxx | 21 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindows.cxx | 14 |
2 files changed, 17 insertions, 18 deletions
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 232ee05041d8..e2439fcad15a 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -82,7 +82,6 @@ using ::com::sun::star::style::VerticalAlignment_BOTTOM; using ::com::sun::star::style::VerticalAlignment_MAKE_FIXED_SIZE; namespace WritingMode2 = ::com::sun::star::text::WritingMode2; -namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior; //= VCLXWindowImpl @@ -1426,18 +1425,18 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR: { - sal_uInt16 nWheelBehavior( MouseWheelBehavior::SCROLL_FOCUS_ONLY ); + sal_uInt16 nWheelBehavior( css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY ); OSL_VERIFY( Value >>= nWheelBehavior ); AllSettings aSettings = pWindow->GetSettings(); MouseSettings aMouseSettings = aSettings.GetMouseSettings(); - sal_uInt16 nVclBehavior( MOUSE_WHEEL_FOCUS_ONLY ); + MouseWheelBehaviour nVclBehavior( MouseWheelBehaviour::FocusOnly ); switch ( nWheelBehavior ) { - case MouseWheelBehavior::SCROLL_DISABLED: nVclBehavior = MOUSE_WHEEL_DISABLE; break; - case MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclBehavior = MOUSE_WHEEL_FOCUS_ONLY; break; - case MouseWheelBehavior::SCROLL_ALWAYS: nVclBehavior = MOUSE_WHEEL_ALWAYS; break; + case css::awt::MouseWheelBehavior::SCROLL_DISABLED: nVclBehavior = MouseWheelBehaviour::Disable; break; + case css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclBehavior = MouseWheelBehaviour::FocusOnly; break; + case css::awt::MouseWheelBehavior::SCROLL_ALWAYS: nVclBehavior = MouseWheelBehaviour::ALWAYS; break; default: OSL_FAIL( "VCLXWindow::setProperty( 'MouseWheelBehavior' ): illegal property value!" ); } @@ -1943,13 +1942,13 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR: { - sal_uInt16 nVclBehavior = GetWindow()->GetSettings().GetMouseSettings().GetWheelBehavior(); - sal_Int16 nBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY; + MouseWheelBehaviour nVclBehavior = GetWindow()->GetSettings().GetMouseSettings().GetWheelBehavior(); + sal_uInt16 nBehavior = css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY; switch ( nVclBehavior ) { - case MOUSE_WHEEL_DISABLE: nBehavior = MouseWheelBehavior::SCROLL_DISABLED; break; - case MOUSE_WHEEL_FOCUS_ONLY: nBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY; break; - case MOUSE_WHEEL_ALWAYS: nBehavior = MouseWheelBehavior::SCROLL_ALWAYS; break; + case MouseWheelBehaviour::Disable: nBehavior = css::awt::MouseWheelBehavior::SCROLL_DISABLED; break; + case MouseWheelBehaviour::FocusOnly: nBehavior = css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY; break; + case MouseWheelBehaviour::ALWAYS: nBehavior = css::awt::MouseWheelBehavior::SCROLL_ALWAYS; break; default: OSL_FAIL( "VCLXWindow::getProperty( 'MouseWheelBehavior' ): illegal VCL value!" ); } diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index d654f92a827b..937e48a84e6d 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -180,11 +180,11 @@ namespace toolkit switch ( nStyle ) { case FLAT: - aStyleSettings.SetOptions( aStyleSettings.GetOptions() | STYLE_OPTION_MONO ); + aStyleSettings.SetOptions( aStyleSettings.GetOptions() | StyleSettingsOptions::Mono ); break; case LOOK3D: default: - aStyleSettings.SetOptions( aStyleSettings.GetOptions() & ~STYLE_OPTION_MONO ); + aStyleSettings.SetOptions( aStyleSettings.GetOptions() & ~StyleSettingsOptions::Mono ); } aSettings.SetStyleSettings( aStyleSettings ); _pWindow->SetSettings( aSettings ); @@ -195,7 +195,7 @@ namespace toolkit Any aEffect; StyleSettings aStyleSettings = _pWindow->GetSettings().GetStyleSettings(); - if ( (aStyleSettings.GetOptions() & STYLE_OPTION_MONO) ) + if ( (aStyleSettings.GetOptions() & StyleSettingsOptions::Mono) ) aEffect <<= (sal_Int16)FLAT; else aEffect <<= (sal_Int16)LOOK3D; @@ -3529,11 +3529,11 @@ void VCLXScrollBar::setProperty( const OUString& PropertyName, const ::com::sun: } AllSettings aSettings( pScrollBar->GetSettings() ); StyleSettings aStyle( aSettings.GetStyleSettings() ); - sal_uLong nDragOptions = aStyle.GetDragFullOptions(); + DragFullOptions nDragOptions = aStyle.GetDragFullOptions(); if ( bDo ) - nDragOptions |= DRAGFULL_OPTION_SCROLL; + nDragOptions |= DragFullOptions::Scroll; else - nDragOptions &= ~DRAGFULL_OPTION_SCROLL; + nDragOptions &= ~DragFullOptions::Scroll; aStyle.SetDragFullOptions( nDragOptions ); aSettings.SetStyleSettings( aStyle ); pScrollBar->SetSettings( aSettings ); @@ -3637,7 +3637,7 @@ void VCLXScrollBar::setProperty( const OUString& PropertyName, const ::com::sun: { case BASEPROPERTY_LIVE_SCROLL: { - aProp <<= ( 0 != ( pScrollBar->GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_SCROLL ) ); + aProp <<= bool( pScrollBar->GetSettings().GetStyleSettings().GetDragFullOptions() & DragFullOptions::Scroll ); } break; case BASEPROPERTY_SCROLLVALUE: |