diff options
author | Noel Grandin <noel@peralex.com> | 2014-11-01 14:50:30 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-11-01 14:53:39 +0000 |
commit | a7542d38ddeebd37ddea233fa1e4cf15b2e03c49 (patch) | |
tree | 07ec3f89a4487b42c8b8203fab9e4dbb6f394a9c /include/rsc | |
parent | b812374174144e077bc3b08fe347626cb1a33eee (diff) |
fdo#84938: replace MIB_ constants with enum
Change-Id: I58c1b4c9e4c4b3751b233d2fe10b9c953b945c4a
Reviewed-on: https://gerrit.libreoffice.org/12179
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/rsc')
-rw-r--r-- | include/rsc/rsc-vcl-shared-types.hxx | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/include/rsc/rsc-vcl-shared-types.hxx b/include/rsc/rsc-vcl-shared-types.hxx index 7c6f598b8224..005272c40efb 100644 --- a/include/rsc/rsc-vcl-shared-types.hxx +++ b/include/rsc/rsc-vcl-shared-types.hxx @@ -33,19 +33,24 @@ enum class KeyFuncType : sal_Int32 { DONTKNOW, NEW, OPEN, SAVE, enum class MenuItemType { DONTKNOW, STRING, IMAGE, STRINGIMAGE, SEPARATOR }; -typedef sal_uInt16 MenuItemBits; - -#define MIB_CHECKABLE ((MenuItemBits)0x0001) -#define MIB_RADIOCHECK ((MenuItemBits)0x0002) -#define MIB_AUTOCHECK ((MenuItemBits)0x0004) -#define MIB_ABOUT ((MenuItemBits)0x0008) -#define MIB_HELP ((MenuItemBits)0x0010) -#define MIB_POPUPSELECT ((MenuItemBits)0x0020) - -// These have been said to be a prelimitary (sic) solution since 2007 -#define MIB_NOSELECT ((MenuItemBits)0x0040) -#define MIB_ICON ((MenuItemBits)0x0080) -#define MIB_TEXT ((MenuItemBits)0x0100) +enum class MenuItemBits : sal_Int16 +{ + NONE = 0x0000, + CHECKABLE = 0x0001, + RADIOCHECK = 0x0002, + AUTOCHECK = 0x0004, + ABOUT = 0x0008, + HELP = 0x0010, + POPUPSELECT = 0x0020, + // These have been said to be a prelimitary (sic) solution since 2007 + NOSELECT = 0x0040, + ICON = 0x0080, + TEXT = 0x0100, +}; +namespace o3tl +{ + template<> struct typed_flags<MenuItemBits> : is_typed_flags<MenuItemBits, 0x1ff> {}; +} enum class ToolBoxItemBits { |