diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-18 20:16:11 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-10-20 07:16:46 +0000 |
commit | 67c9d054517fc3b5cbc203c330eedef4b50f0e57 (patch) | |
tree | 1fad773f770e4ee4265bb05ba77d7f3084aedd3b /include/rsc | |
parent | Increase assert coverage of OStringBuffer arguments (diff) | |
download | core-67c9d054517fc3b5cbc203c330eedef4b50f0e57.tar.gz core-67c9d054517fc3b5cbc203c330eedef4b50f0e57.zip |
fdo#84938: replace TIB_ constants with enum
Change-Id: I435ce2331fb49e7ce9fe97bdfddfaef706759a84
Reviewed-on: https://gerrit.libreoffice.org/12023
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 | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/include/rsc/rsc-vcl-shared-types.hxx b/include/rsc/rsc-vcl-shared-types.hxx index 051cd71303f1..1c1441204026 100644 --- a/include/rsc/rsc-vcl-shared-types.hxx +++ b/include/rsc/rsc-vcl-shared-types.hxx @@ -21,6 +21,7 @@ #define INCLUDED_RSC_RSC_VCL_SHARED_TYPES_HXX #include <sal/types.h> +#include <o3tl/typed_flags_set.hxx> enum TimeFieldFormat {TIMEF_NONE, TIMEF_SEC, TIMEF_100TH_SEC, TIMEF_SEC_CS, TimeFieldFormat_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; @@ -48,19 +49,25 @@ typedef sal_uInt16 MenuItemBits; #define MIB_ICON ((MenuItemBits)0x0080) #define MIB_TEXT ((MenuItemBits)0x0100) -typedef sal_uInt16 ToolBoxItemBits; - -#define TIB_CHECKABLE ((ToolBoxItemBits)0x0001) -#define TIB_RADIOCHECK ((ToolBoxItemBits)0x0002) -#define TIB_AUTOCHECK ((ToolBoxItemBits)0x0004) -#define TIB_LEFT ((ToolBoxItemBits)0x0008) -#define TIB_AUTOSIZE ((ToolBoxItemBits)0x0010) -#define TIB_DROPDOWN ((ToolBoxItemBits)0x0020) -#define TIB_REPEAT ((ToolBoxItemBits)0x0040) -#define TIB_DROPDOWNONLY ((ToolBoxItemBits)0x0080 | TIB_DROPDOWN) -#define TIB_TEXT_ONLY ((ToolBoxItemBits)0x0100) -#define TIB_ICON_ONLY ((ToolBoxItemBits)0x0200) -#define TIB_TEXTICON ((ToolBoxItemBits) TIB_TEXT_ONLY | TIB_ICON_ONLY ) +enum class ToolBoxItemBits : sal_uInt16 +{ + NONE = 0x0000, + CHECKABLE = 0x0001, + RADIOCHECK = 0x0002, + AUTOCHECK = 0x0004, + LEFT = 0x0008, + AUTOSIZE = 0x0010, + DROPDOWN = 0x0020, + REPEAT = 0x0040, + DROPDOWNONLY = 0x00a0, // 0x0080 | TIB_DROPDOWN + TEXT_ONLY = 0x0100, + ICON_ONLY = 0x0200, + TEXTICON = 0x0300 // TIB_TEXT_ONLY | TIB_ICON_ONLY +}; +namespace o3tl +{ + template<> struct typed_flags<ToolBoxItemBits> : is_typed_flags<ToolBoxItemBits, 0x3ff> {}; +} enum ToolBoxItemType { TOOLBOXITEM_DONTKNOW, TOOLBOXITEM_BUTTON, TOOLBOXITEM_SPACE, TOOLBOXITEM_SEPARATOR, |