diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-10 15:52:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-13 09:34:54 +0200 |
commit | b5f5a386504e320b022f8609c9c36652ae2d3d18 (patch) | |
tree | 73ab95edb05a7f3cd0bf305c5846fdf7c0ad66c0 /include/sfx2/passwd.hxx | |
parent | f2109254942074d07ad52bf9fe6571405fd79618 (diff) |
convert SHOWEXTRAS constants to scoped enum
Change-Id: I84bff53e55fc93ad423835ebc3bf129546dfb7c3
Diffstat (limited to 'include/sfx2/passwd.hxx')
-rw-r--r-- | include/sfx2/passwd.hxx | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx index 363e9b9e1c71..4b241d0a243c 100644 --- a/include/sfx2/passwd.hxx +++ b/include/sfx2/passwd.hxx @@ -27,15 +27,23 @@ #include <vcl/fixed.hxx> #include <vcl/layout.hxx> #include <sfx2/app.hxx> +#include <o3tl/typed_flags_set.hxx> // defines --------------------------------------------------------------- -#define SHOWEXTRAS_NONE ((sal_uInt16)0x0000) -#define SHOWEXTRAS_USER ((sal_uInt16)0x0001) -#define SHOWEXTRAS_CONFIRM ((sal_uInt16)0x0002) -#define SHOWEXTRAS_PASSWORD2 ((sal_uInt16)0x0004) -#define SHOWEXTRAS_CONFIRM2 ((sal_uInt16)0x0008) -#define SHOWEXTRAS_ALL ((sal_uInt16)(SHOWEXTRAS_USER | SHOWEXTRAS_CONFIRM)) +enum class SfxShowExtras +{ + NONE = 0x0000, + USER = 0x0001, + CONFIRM = 0x0002, + PASSWORD2 = 0x0004, + CONFIRM2 = 0x0008, + ALL = USER | CONFIRM +}; +namespace o3tl +{ + template<> struct typed_flags<SfxShowExtras> : is_typed_flags<SfxShowExtras, 0x0f> {}; +} // class SfxPasswordDialog ----------------------------------------------- @@ -65,7 +73,7 @@ private: OUString maEmptyPwdStr; OUString maMainPwdStr; sal_uInt16 mnMinLen; - sal_uInt16 mnExtras; + SfxShowExtras mnExtras; bool mbAsciiOnly; DECL_DLLPRIVATE_LINK(EditModifyHdl, Edit*); @@ -105,7 +113,7 @@ public: { mpPassword1ED->SetHelpId( rId ); } - void ShowExtras(sal_uInt16 nExtras) + void ShowExtras(SfxShowExtras nExtras) { mnExtras = nExtras; } |