diff options
author | Noel Grandin <noel@peralex.com> | 2014-07-23 10:48:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-07-23 13:26:19 +0200 |
commit | 88a874fcb3a3735634c638f34dcb0cc7bd2260ac (patch) | |
tree | 9d4d00f5c29ed08db69b0ff7aa334045cb879b82 /include/svl | |
parent | 11e66edd0e60d55fe5b6d285b919c012ae7500ce (diff) |
convert SfxItemState constants to a proper enum
and while we're at it
- use the enum type all over the place instead of passing around
sal_uInt16
- don't use bitwise logic on enum values
- use enum values instead of numeric constants
Change-Id: I7f24cb4d242e1c00703e7bbcf1a00c18ef1e9fd4
Diffstat (limited to 'include/svl')
-rw-r--r-- | include/svl/poolitem.hxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx index 892f2adaccd1..718a78bf05d0 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -130,16 +130,15 @@ enum SfxItemPresentation -typedef sal_uInt16 SfxItemState; - -#define SFX_ITEM_UNKNOWN 0x0000 - -#define SFX_ITEM_DISABLED 0x0001 -#define SFX_ITEM_READONLY 0x0002 - -#define SFX_ITEM_DONTCARE 0x0010 -#define SFX_ITEM_DEFAULT 0x0020 -#define SFX_ITEM_SET 0x0030 +enum SfxItemState { + // These values have to match the values in the com::sun::star::frame::status::ItemState IDL + SFX_ITEM_UNKNOWN = 0, + SFX_ITEM_DISABLED = 0x0001, + SFX_ITEM_READONLY = 0x0002, + SFX_ITEM_DONTCARE = 0x0010, + SFX_ITEM_DEFAULT = 0x0020, + SFX_ITEM_SET = 0x0030 +}; // old stuff - dont use!!! #define SFX_ITEM_AVAILABLE SFX_ITEM_DEFAULT |