diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-09 16:35:22 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-10 09:48:07 +0200 |
commit | afc728fe76fbf1afea725afd6ff5e9af92e10b08 (patch) | |
tree | 6c691ba617ed7d025abd17d71745d0623cdc5d53 /include/sfx2/sfxmodelfactory.hxx | |
parent | 89dd3f80685c66883b6ed4efbf369f5aa2dc292e (diff) |
convert SFXMODEL_ to scoped enum
and fix up some confusion in SC and STARMATH about which constants to
use
Change-Id: Ib75bc78a24bd2fad6ec6d7c94c4c1ad7dc222c1a
Diffstat (limited to 'include/sfx2/sfxmodelfactory.hxx')
-rw-r--r-- | include/sfx2/sfxmodelfactory.hxx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/sfx2/sfxmodelfactory.hxx b/include/sfx2/sfxmodelfactory.hxx index 2067fbf8fac2..43e0c6d67ef6 100644 --- a/include/sfx2/sfxmodelfactory.hxx +++ b/include/sfx2/sfxmodelfactory.hxx @@ -24,18 +24,26 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> +#include <o3tl/typed_flags_set.hxx> -#define SFXMODEL_STANDARD (sal_uInt64)(0x0000) -#define SFXMODEL_EMBEDDED_OBJECT (sal_uInt64)(0x0001) -#define SFXMODEL_EXTERNAL_LINK (sal_uInt64)(0x0002) -#define SFXMODEL_DISABLE_EMBEDDED_SCRIPTS (sal_uInt64)(0x0004) -#define SFXMODEL_DISABLE_DOCUMENT_RECOVERY (sal_uInt64)(0x0008) +enum class SfxModelFlags +{ + NONE = 0x00, + EMBEDDED_OBJECT = 0x01, + EXTERNAL_LINK = 0x02, + DISABLE_EMBEDDED_SCRIPTS = 0x04, + DISABLE_DOCUMENT_RECOVERY = 0x08, +}; +namespace o3tl +{ + template<> struct typed_flags<SfxModelFlags> : is_typed_flags<SfxModelFlags, 0x0f> {}; +} namespace sfx2 { typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ( SAL_CALL * SfxModelFactoryFunc ) ( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory, - const sal_uInt64 _nCreationFlags + SfxModelFlags _nCreationFlags ); |