diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-07 11:19:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-08 06:30:49 +0000 |
commit | 9cb57a50d7eeaa1dda19d18bcb3cde7e4a7984e5 (patch) | |
tree | 790282bdd3d41f9ceda28267cb72dd119ac15230 /editeng/source/uno/unonrule.cxx | |
parent | tdf#91222 VclBuilder constructor cleanup (diff) | |
download | core-9cb57a50d7eeaa1dda19d18bcb3cde7e4a7984e5.tar.gz core-9cb57a50d7eeaa1dda19d18bcb3cde7e4a7984e5.zip |
convert SvxAdjust to scoped enum
Change-Id: I0df7a5313d6d62d0c657e62ef6014a3ddbab4639
Reviewed-on: https://gerrit.libreoffice.org/34941
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source/uno/unonrule.cxx')
-rw-r--r-- | editeng/source/uno/unonrule.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx index 07a7703b2f50..e9b987799586 100644 --- a/editeng/source/uno/unonrule.cxx +++ b/editeng/source/uno/unonrule.cxx @@ -38,6 +38,7 @@ #include <editeng/unonrule.hxx> #include <editeng/editids.hrc> #include <editeng/numdef.hxx> +#include <o3tl/enumarray.hxx> #include <memory> using ::com::sun::star::util::XCloneable; @@ -52,16 +53,16 @@ using namespace ::com::sun::star::container; const SvxAdjust aUnoToSvxAdjust[] = { - SVX_ADJUST_LEFT, - SVX_ADJUST_RIGHT, - SVX_ADJUST_CENTER, - SVX_ADJUST_LEFT, - SVX_ADJUST_LEFT, - SVX_ADJUST_LEFT, - SVX_ADJUST_BLOCK + SvxAdjust::Left, + SvxAdjust::Right, + SvxAdjust::Center, + SvxAdjust::Left, + SvxAdjust::Left, + SvxAdjust::Left, + SvxAdjust::Block }; -const unsigned short aSvxToUnoAdjust[] = +const o3tl::enumarray<SvxAdjust, unsigned short> aSvxToUnoAdjust { text::HoriOrientation::LEFT, text::HoriOrientation::RIGHT, @@ -79,7 +80,7 @@ SvxAdjust ConvertUnoAdjust( unsigned short nAdjust ) unsigned short ConvertUnoAdjust( SvxAdjust eAdjust ) { - DBG_ASSERT( eAdjust <= 6, "Enum hat sich geaendert! [CL]" ); + DBG_ASSERT( (int)eAdjust <= 6, "Enum hat sich geaendert! [CL]" ); return aSvxToUnoAdjust[eAdjust]; } |