summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-20 14:46:54 +0200
committerJan Holesovsky <kendy@collabora.com>2015-05-29 20:16:52 +0200
commit50726ceac9916caf8df0c51eecb17a01b036d970 (patch)
tree68b8268810001b3843cb24c0fbff0d9c44434d4e /toolkit
parent118da1a52a74c602ecacec9ffb163b93589cf6e1 (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> Signed-off-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxwindow.cxx21
-rw-r--r--toolkit/source/awt/vclxwindows.cxx14
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: