summaryrefslogtreecommitdiff
path: root/include/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-10 09:47:28 +0200
committerNoel Grandin <noel@peralex.com>2015-04-10 09:48:07 +0200
commit2391931e2137493e51ba7e828798d86b217dfe03 (patch)
tree2568edb845d42d65abccbdc40f6ed174b6cb7008 /include/sfx2
parentafc728fe76fbf1afea725afd6ff5e9af92e10b08 (diff)
convert SFXOBJECTSHELL_ constants to scoped enum
Change-Id: I5a159be0c342b778730cedb0fe35843c2c368c97
Diffstat (limited to 'include/sfx2')
-rw-r--r--include/sfx2/objsh.hxx27
1 files changed, 17 insertions, 10 deletions
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 <com/sun/star/frame/XModel.hpp>
#include <memory>
#include <set>
+#include <o3tl/typed_flags_set.hxx>
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<SfxObjectShellFlags> : is_typed_flags<SfxObjectShellFlags, 0xf00003d> {};
+}
#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;