diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-21 16:18:23 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-22 10:28:42 +0200 |
commit | dd7778a76915685d9b334e1f0718f556f6309687 (patch) | |
tree | 8e4d1fa582195c4cbf52e3e6386070c9493fc422 /include | |
parent | 2884e9be256207d0876e6d67300a85462801778b (diff) |
convert SV_ENTRYFLAG constants to scoped enum
Change-Id: I457b32ed5ee5d74e6f8361e7de79cbd406122651
Diffstat (limited to 'include')
-rw-r--r-- | include/svtools/treelistentry.hxx | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/include/svtools/treelistentry.hxx b/include/svtools/treelistentry.hxx index f7e633f9bfc9..11478173bbce 100644 --- a/include/svtools/treelistentry.hxx +++ b/include/svtools/treelistentry.hxx @@ -24,19 +24,27 @@ #include <tools/solar.h> #include <svtools/treelistbox.hxx> #include <svtools/treelistentries.hxx> +#include <o3tl/typed_flags_set.hxx> #include <boost/ptr_container/ptr_vector.hpp> // flags related to the model -#define SV_ENTRYFLAG_CHILDREN_ON_DEMAND 0x0001 -#define SV_ENTRYFLAG_DISABLE_DROP 0x0002 -#define SV_ENTRYFLAG_IN_USE 0x0004 -// is set if RequestingChildren has not set any children -#define SV_ENTRYFLAG_NO_NODEBMP 0x0008 -// entry had or has children -#define SV_ENTRYFLAG_HAD_CHILDREN 0x0010 - -#define SV_ENTRYFLAG_SEMITRANSPARENT 0x8000 // draw semi-transparent entry bitmaps +enum class SvTLEntryFlags +{ + NONE = 0x0000, + CHILDREN_ON_DEMAND = 0x0001, + DISABLE_DROP = 0x0002, + IN_USE = 0x0004, + // is set if RequestingChildren has not set any children + NO_NODEBMP = 0x0008, + // entry had or has children + HAD_CHILDREN = 0x0010, + SEMITRANSPARENT = 0x8000, // draw semi-transparent entry bitmaps +}; +namespace o3tl +{ + template<> struct typed_flags<SvTLEntryFlags> : is_typed_flags<SvTLEntryFlags, 0x801f> {}; +} class SVT_DLLPUBLIC SvTreeListEntry @@ -54,7 +62,7 @@ class SVT_DLLPUBLIC SvTreeListEntry ItemsType maItems; bool bIsMarked; void* pUserData; - sal_uInt16 nEntryFlags; + SvTLEntryFlags nEntryFlags; Color maBackColor; private: @@ -96,8 +104,8 @@ public: bool HasChildrenOnDemand() const; bool HasInUseEmphasis() const; - sal_uInt16 GetFlags() const { return nEntryFlags;} - void SetFlags( sal_uInt16 nFlags ); + SvTLEntryFlags GetFlags() const { return nEntryFlags;} + void SetFlags( SvTLEntryFlags nFlags ); bool GetIsMarked() const { return bIsMarked; } void SetMarked( bool IsMarked ) { bIsMarked = IsMarked; } |