From 2391931e2137493e51ba7e828798d86b217dfe03 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 10 Apr 2015 09:47:28 +0200 Subject: convert SFXOBJECTSHELL_ constants to scoped enum Change-Id: I5a159be0c342b778730cedb0fe35843c2c368c97 --- include/sfx2/objsh.hxx | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'include/sfx2') diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 0bf721e88e30..b92656e7101c 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -47,6 +47,7 @@ #include #include #include +#include class SbxValue; class SvxMacro; @@ -108,15 +109,21 @@ namespace com { namespace sun { namespace star { } } } } -typedef sal_uInt32 SfxObjectShellFlags; -#define SFXOBJECTSHELL_HASOPENDOC 0x01L -#define SFXOBJECTSHELL_HASMENU 0x04L -#define SFXOBJECTSHELL_DONTLOADFILTERS 0x08L -#define SFXOBJECTSHELL_DONTCLOSE 0x10L -#define SFXOBJECTSHELL_NODOCINFO 0x20L -#define SFXOBJECTSHELL_STD_NORMAL ( SFXOBJECTSHELL_HASOPENDOC ) -#define SFXOBJECTSHELL_STD_SPECIAL ( SFXOBJECTSHELL_DONTLOADFILTERS ) -#define SFXOBJECTSHELL_UNDEFINED 0xf000000 +enum class SfxObjectShellFlags +{ + HASOPENDOC = 0x01L, + HASMENU = 0x04L, + DONTLOADFILTERS = 0x08L, + DONTCLOSE = 0x10L, + NODOCINFO = 0x20L, + STD_NORMAL = HASOPENDOC, + STD_SPECIAL = DONTLOADFILTERS, + UNDEFINED = 0xf000000 +}; +namespace o3tl +{ + template<> struct typed_flags : is_typed_flags {}; +} #define SFX_TITLE_TITLE 0 #define SFX_TITLE_FILENAME 1 @@ -236,7 +243,7 @@ public: virtual void Invalidate(sal_uInt16 nId = 0) SAL_OVERRIDE; - SfxObjectShellFlags GetFlags( ) const ; + SfxObjectShellFlags GetFlags( ) const; SfxModule* GetModule() const; -- cgit