diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-20 14:46:54 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-05-29 20:16:52 +0200 |
commit | 50726ceac9916caf8df0c51eecb17a01b036d970 (patch) | |
tree | 68b8268810001b3843cb24c0fbff0d9c44434d4e /svx | |
parent | 118da1a52a74c602ecacec9ffb163b93589cf6e1 (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 'svx')
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 0b8e49e74856..52b828926c16 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -85,7 +85,6 @@ using namespace ::dbtools::DBTypeConversion; using namespace ::dbtools; using ::com::sun::star::util::XNumberFormatter; -namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior; const char INVALIDTEXT[] = "###"; const char OBJECTTEXT[] = "<OBJECT>"; @@ -890,14 +889,14 @@ void DbCellControl::Init( vcl::Window& rParent, const Reference< XRowSet >& _rxC if ( xModelPSI->hasPropertyByName( FM_PROP_MOUSE_WHEEL_BEHAVIOR ) ) { - sal_Int16 nWheelBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY; + sal_Int16 nWheelBehavior = css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY; OSL_VERIFY( xModel->getPropertyValue( FM_PROP_MOUSE_WHEEL_BEHAVIOR ) >>= nWheelBehavior ); - sal_uInt16 nVclSetting = MOUSE_WHEEL_FOCUS_ONLY; + MouseWheelBehaviour nVclSetting = MouseWheelBehaviour::FocusOnly; switch ( nWheelBehavior ) { - case MouseWheelBehavior::SCROLL_DISABLED: nVclSetting = MOUSE_WHEEL_DISABLE; break; - case MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclSetting = MOUSE_WHEEL_FOCUS_ONLY; break; - case MouseWheelBehavior::SCROLL_ALWAYS: nVclSetting = MOUSE_WHEEL_ALWAYS; break; + case css::awt::MouseWheelBehavior::SCROLL_DISABLED: nVclSetting = MouseWheelBehaviour::Disable; break; + case css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclSetting = MouseWheelBehaviour::FocusOnly; break; + case css::awt::MouseWheelBehavior::SCROLL_ALWAYS: nVclSetting = MouseWheelBehaviour::ALWAYS; break; default: OSL_FAIL( "DbCellControl::Init: invalid MouseWheelBehavior!" ); break; @@ -1143,7 +1142,7 @@ void DbTextField::Init( vcl::Window& rParent, const Reference< XRowSet >& xCurso AllSettings aSettings = m_pWindow->GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); aStyleSettings.SetSelectionOptions( - aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST); + aStyleSettings.GetSelectionOptions() | SelectionOptions::ShowFirst); aSettings.SetStyleSettings(aStyleSettings); m_pWindow->SetSettings(aSettings); } @@ -1271,7 +1270,7 @@ void DbFormattedField::Init( vcl::Window& rParent, const Reference< XRowSet >& x AllSettings aSettings = m_pWindow->GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); aStyleSettings.SetSelectionOptions( - aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST); + aStyleSettings.GetSelectionOptions() | SelectionOptions::ShowFirst); aSettings.SetStyleSettings(aStyleSettings); m_pWindow->SetSettings(aSettings); } @@ -1622,9 +1621,9 @@ namespace AllSettings aSettings = _pWindow->GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); if( bMono ) - aStyleSettings.SetOptions( aStyleSettings.GetOptions() | STYLE_OPTION_MONO ); + aStyleSettings.SetOptions( aStyleSettings.GetOptions() | StyleSettingsOptions::Mono ); else - aStyleSettings.SetOptions( aStyleSettings.GetOptions() & (~STYLE_OPTION_MONO) ); + aStyleSettings.SetOptions( aStyleSettings.GetOptions() & (~StyleSettingsOptions::Mono) ); aSettings.SetStyleSettings( aStyleSettings ); _pWindow->SetSettings( aSettings ); } @@ -2467,7 +2466,7 @@ void DbComboBox::Init( vcl::Window& rParent, const Reference< XRowSet >& xCursor AllSettings aSettings = m_pWindow->GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); aStyleSettings.SetSelectionOptions( - aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST); + aStyleSettings.GetSelectionOptions() | SelectionOptions::ShowFirst); aSettings.SetStyleSettings(aStyleSettings); m_pWindow->SetSettings(aSettings, true); @@ -2768,7 +2767,7 @@ void DbFilterField::CreateControl(vcl::Window* pParent, const Reference< ::com:: AllSettings aSettings = m_pWindow->GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); aStyleSettings.SetSelectionOptions( - aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST); + aStyleSettings.GetSelectionOptions() | SelectionOptions::ShowFirst); aSettings.SetStyleSettings(aStyleSettings); m_pWindow->SetSettings(aSettings, true); @@ -2789,7 +2788,7 @@ void DbFilterField::CreateControl(vcl::Window* pParent, const Reference< ::com:: AllSettings aSettings = m_pWindow->GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); aStyleSettings.SetSelectionOptions( - aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST); + aStyleSettings.GetSelectionOptions() | SelectionOptions::ShowFirst); aSettings.SetStyleSettings(aStyleSettings); m_pWindow->SetSettings(aSettings, true); } |