diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-01 09:27:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-01 11:33:51 +0200 |
commit | e73688139b1d861a19bddbf5c2fd82de97d0c741 (patch) | |
tree | d2c51216d57fc0be8a26bc7a458e24938c4f0a81 /sd | |
parent | 3ee0628e269f16f0fee5dde51e90bbf5180413a2 (diff) |
convert SnapKind to scoped enum
Change-Id: I56a17f582b66212933077a7de62b3dbe7d3c3af5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91465
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/sdenumdef.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgsnap.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/func/fusnapln.cxx | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/sd/inc/sdenumdef.hxx b/sd/inc/sdenumdef.hxx index cb9f9a8def34..d042c7671f12 100644 --- a/sd/inc/sdenumdef.hxx +++ b/sd/inc/sdenumdef.hxx @@ -21,7 +21,8 @@ #define INCLUDED_SD_INC_SDENUMDEF_HXX #define RET_SNAP_DELETE 111 -enum SnapKind { SK_HORIZONTAL, SK_VERTICAL, SK_POINT }; + +enum class SnapKind { Horizontal, Vertical, Point }; #endif diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx index c07fa83552e4..9657608c23bb 100644 --- a/sd/source/ui/dlg/dlgsnap.cxx +++ b/sd/source/ui/dlg/dlgsnap.cxx @@ -119,9 +119,9 @@ void SdSnapLineDlg::GetAttr(SfxItemSet& rOutAttrs) { SnapKind eKind; - if (m_xRbHorz->get_active()) eKind = SK_HORIZONTAL; - else if (m_xRbVert->get_active()) eKind = SK_VERTICAL; - else eKind = SK_POINT; + if (m_xRbHorz->get_active()) eKind = SnapKind::Horizontal; + else if (m_xRbVert->get_active()) eKind = SnapKind::Vertical; + else eKind = SnapKind::Point; nXValue = sal_Int32(GetCoreValue(*m_xMtrFldX, MapUnit::Map100thMM) * aUIScale); nYValue = sal_Int32(GetCoreValue(*m_xMtrFldY, MapUnit::Map100thMM) * aUIScale); diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index bbad6ce82ef7..dbf08f4fbe01 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -172,9 +172,9 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) switch ( static_cast<SnapKind>(static_cast<const SfxUInt16Item&>( pArgs->Get(ATTR_SNAPLINE_KIND)).GetValue()) ) { - case SK_HORIZONTAL : eKind = SdrHelpLineKind::Horizontal; break; - case SK_VERTICAL : eKind = SdrHelpLineKind::Vertical; break; - default : eKind = SdrHelpLineKind::Point; break; + case SnapKind::Horizontal : eKind = SdrHelpLineKind::Horizontal; break; + case SnapKind::Vertical : eKind = SdrHelpLineKind::Vertical; break; + default : eKind = SdrHelpLineKind::Point; break; } pPV->InsertHelpLine(SdrHelpLine(eKind, aHlpPos)); } |