diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-23 15:42:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-24 08:05:55 +0200 |
commit | 5af0071d42e5962ed849261134ef0630c7ec3b45 (patch) | |
tree | 8ad2451b56585454c1cefea96dcf44721fe6a979 /include | |
parent | 0e04b531448d7915b40c59dccef7a9313bd28c11 (diff) |
convert SFX_VISIBILITY constants to scoped enum
* split the position and the flags information
* remove unused DESKTOP constant
Change-Id: Ibfccb44c7567e89d4527bfd36b3915a73682e6e2
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/objface.hxx | 5 | ||||
-rw-r--r-- | include/sfx2/shell.hxx | 23 |
2 files changed, 15 insertions, 13 deletions
diff --git a/include/sfx2/objface.hxx b/include/sfx2/objface.hxx index ac93da6b270d..3805d2fe0fb3 100644 --- a/include/sfx2/objface.hxx +++ b/include/sfx2/objface.hxx @@ -64,13 +64,14 @@ public: const SfxInterface* GetGenoType() const { return pGenoType; } - void RegisterObjectBar(sal_uInt16, sal_uInt32 nResId); - void RegisterObjectBar(sal_uInt16, sal_uInt32 nResId, SfxShellFeature nFeature); + void RegisterObjectBar(sal_uInt16, SfxVisibilityFlags nFlags, sal_uInt32 nResId); + void RegisterObjectBar(sal_uInt16, SfxVisibilityFlags nFlags, sal_uInt32 nResId, SfxShellFeature nFeature); void RegisterChildWindow(sal_uInt16, bool bContext = false); void RegisterChildWindow(sal_uInt16, bool bContext, SfxShellFeature nFeature); void RegisterStatusBar(sal_uInt32 nResId); sal_uInt32 GetObjectBarId(sal_uInt16 nNo) const; sal_uInt16 GetObjectBarPos( sal_uInt16 nNo ) const; + SfxVisibilityFlags GetObjectBarFlags( sal_uInt16 nNo ) const; SfxShellFeature GetObjectBarFeature(sal_uInt16 nNo) const; sal_uInt16 GetObjectBarCount() const; bool IsObjectBarVisible( sal_uInt16 nNo) const; diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx index a337aed0289d..4c7d12fd7049 100644 --- a/include/sfx2/shell.hxx +++ b/include/sfx2/shell.hxx @@ -581,17 +581,18 @@ SFX_TMPL_INTERFACE(Class,SuperClass,false) \ #define SFX_IMPL_SUPERCLASS_INTERFACE(Class,SuperClass) \ SFX_TMPL_INTERFACE(Class,SuperClass,true) \ -#define SFX_POSITION_MASK 0x000F -#define SFX_VISIBILITY_MASK 0xFFF0 -#define SFX_VISIBILITY_UNVISIBLE 0x0000 // Never visible -#define SFX_VISIBILITY_VIEWER 0x0040 -#define SFX_VISIBILITY_READONLYDOC 0x0400 -#define SFX_VISIBILITY_DESKTOP 0x0800 -#define SFX_VISIBILITY_STANDARD 0x1000 -#define SFX_VISIBILITY_FULLSCREEN 0x2000 -#define SFX_VISIBILITY_CLIENT 0x4000 -#define SFX_VISIBILITY_SERVER 0x8000 - +enum class SfxVisibilityFlags { + Invisible = 0x0000, // Never visible + Viewer = 0x0040, + ReadonlyDoc = 0x0400, + Standard = 0x1000, + FullScreen = 0x2000, + Client = 0x4000, + Server = 0x8000, +}; +namespace o3tl { + template<> struct typed_flags<SfxVisibilityFlags> : is_typed_flags<SfxVisibilityFlags, 0xf440> {}; +} #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |