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 /svtools | |
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 'svtools')
-rw-r--r-- | svtools/source/config/apearcfg.cxx | 24 | ||||
-rw-r--r-- | svtools/source/config/miscopt.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/fmtfield.cxx | 8 | ||||
-rw-r--r-- | svtools/source/control/valueset.cxx | 2 |
4 files changed, 19 insertions, 19 deletions
diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx index ebd55fe4db14..466da3dabaca 100644 --- a/svtools/source/config/apearcfg.cxx +++ b/svtools/source/config/apearcfg.cxx @@ -42,7 +42,7 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg() ,nDragMode ( DEFAULT_DRAGMODE ) ,nScaleFactor ( DEFAULT_SCALEFACTOR ) ,nSnapMode ( DEFAULT_SNAPMODE ) - ,nMiddleMouse ( MOUSE_MIDDLE_AUTOSCROLL ) + ,nMiddleMouse ( MouseMiddleButtonAction::AutoScroll ) #if defined( UNX ) ,nAAMinPixelHeight ( DEFAULT_AAMINHEIGHT ) #endif @@ -68,7 +68,7 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg() case 1: *pValues >>= nDragMode; break; //"Window/Drag", case 2: bMenuMouseFollow = *static_cast<sal_Bool const *>(pValues->getValue()); break; //"Menu/FollowMouse", case 3: *pValues >>= nSnapMode; break; //"Dialog/MousePositioning", - case 4: *pValues >>= nMiddleMouse; break; //"Dialog/MiddleMouseButton", + case 4: { short nTmp = 0; *pValues >>= nTmp; nMiddleMouse = static_cast<MouseMiddleButtonAction>(nTmp); break; } //"Dialog/MiddleMouseButton", #if defined( UNX ) case 5: bFontAntialiasing = *static_cast<sal_Bool const *>(pValues->getValue()); break; // "FontAntialising/Enabled", case 6: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", @@ -126,7 +126,7 @@ void SvtTabAppearanceCfg::ImplCommit() case 1: pValues[nProp] <<= nDragMode; break; //"Window/Drag", case 2: pValues[nProp].setValue(&bMenuMouseFollow, rType); break; //"Menu/FollowMouse", case 3: pValues[nProp] <<= nSnapMode; break; //"Dialog/MousePositioning", - case 4: pValues[nProp] <<= nMiddleMouse; break; //"Dialog/MiddleMouseButton", + case 4: pValues[nProp] <<= static_cast<short>(nMiddleMouse); break; //"Dialog/MiddleMouseButton", #if defined( UNX ) case 5: pValues[nProp].setValue(&bFontAntialiasing, rType); break; // "FontAntialising/Enabled", case 6: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", @@ -152,7 +152,7 @@ void SvtTabAppearanceCfg::SetSnapMode ( sal_uInt16 nSet ) SetModified(); } -void SvtTabAppearanceCfg::SetMiddleMouseButton ( sal_uInt16 nSet ) +void SvtTabAppearanceCfg::SetMiddleMouseButton ( MouseMiddleButtonAction nSet ) { nMiddleMouse = nSet; SetModified(); @@ -180,23 +180,23 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp ) #if defined( UNX ) // font anti aliasing hAppStyle.SetAntialiasingMinPixelHeight( nAAMinPixelHeight ); - hAppStyle.SetDisplayOptions( bFontAntialiasing ? 0 : DISPLAY_OPTION_AA_DISABLE ); + hAppStyle.SetDisplayOptions( bFontAntialiasing ? DisplayOptions::NONE : DisplayOptions::AADisable ); #endif // Mouse Snap MouseSettings hMouseSettings = hAppSettings.GetMouseSettings(); - sal_uLong nMouseOptions = hMouseSettings.GetOptions(); + MouseSettingsOptions nMouseOptions = hMouseSettings.GetOptions(); - nMouseOptions &= ~ (MOUSE_OPTION_AUTOCENTERPOS | MOUSE_OPTION_AUTODEFBTNPOS); + nMouseOptions &= ~ MouseSettingsOptions(MouseSettingsOptions::AutoCenterPos | MouseSettingsOptions::AutoDefBtnPos); switch ( nSnapMode ) { case SnapToButton: - nMouseOptions |= MOUSE_OPTION_AUTODEFBTNPOS; + nMouseOptions |= MouseSettingsOptions::AutoDefBtnPos; break; case SnapToMiddle: - nMouseOptions |= MOUSE_OPTION_AUTOCENTERPOS; + nMouseOptions |= MouseSettingsOptions::AutoCenterPos; break; case NoSnap: default: @@ -207,11 +207,11 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp ) // Merge and Publish Settings - sal_uLong nFollow = hMouseSettings.GetFollow(); + MouseFollowFlags nFollow = hMouseSettings.GetFollow(); if(bMenuMouseFollow) - nFollow |= MOUSE_FOLLOW_MENU; + nFollow |= MouseFollowFlags::Menu; else - nFollow &= ~MOUSE_FOLLOW_MENU; + nFollow &= ~MouseFollowFlags::Menu; hMouseSettings.SetFollow( nFollow ); hAppSettings.SetMouseSettings( hMouseSettings ); diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index be76a7607848..e3384e5c2e96 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -767,8 +767,8 @@ sal_Int16 SvtMiscOptions::GetCurrentSymbolsSize() const { // Use system settings, we have to retrieve the toolbar icon size from the // Application class - sal_uLong nStyleIconSize = Application::GetSettings().GetStyleSettings().GetToolbarIconSize(); - if ( nStyleIconSize == STYLE_TOOLBAR_ICONSIZE_LARGE ) + ToolbarIconSize nStyleIconSize = Application::GetSettings().GetStyleSettings().GetToolbarIconSize(); + if ( nStyleIconSize == ToolbarIconSize::Large ) eOptSymbolsSize = SFX_SYMBOLS_SIZE_LARGE; else eOptSymbolsSize = SFX_SYMBOLS_SIZE_SMALL; diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index 720b2044565d..93b997a8664b 100644 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.cxx @@ -383,8 +383,8 @@ void FormattedField::SetTextFormatted(const OUString& rStr) aNewSel.Max() = nNewLen; if (!nCurrentLen) { // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options - sal_uLong nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions(); - if (nSelOptions & SELECTION_OPTION_SHOWFIRST) + SelectionOptions nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions(); + if (nSelOptions & SelectionOptions::ShowFirst) { // selection should be from right to left -> swap min and max aNewSel.Min() = aNewSel.Max(); aNewSel.Max() = 0; @@ -499,8 +499,8 @@ void FormattedField::ImplSetTextImpl(const OUString& rNew, Selection* pNewSel) aSel.Max() = nNewLen; if (!nCurrentLen) { // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options - sal_uLong nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions(); - if (nSelOptions & SELECTION_OPTION_SHOWFIRST) + SelectionOptions nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions(); + if (nSelOptions & SelectionOptions::ShowFirst) { // selection should be from right to left -> swap min and max aSel.Min() = aSel.Max(); aSel.Max() = 0; diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index c0c8446189bc..49e784aa7a0c 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -980,7 +980,7 @@ void ValueSet::ImplDraw(vcl::RenderContext& rRenderContext) Size aWinSize = rRenderContext.GetOutputSizePixel(); Point aPos1(NAME_LINE_OFF_X, mnTextOffset + NAME_LINE_OFF_Y); Point aPos2(aWinSize.Width() - (NAME_LINE_OFF_X * 2), mnTextOffset + NAME_LINE_OFF_Y); - if (!(rStyleSettings.GetOptions() & STYLE_OPTION_MONO)) + if (!(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono)) { rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); rRenderContext.DrawLine(aPos1, aPos2); |