diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-09 08:40:43 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-09 08:41:12 +0200 |
commit | cfab2fd725276e99fb6fa8b619ca5b2ac3bd025a (patch) | |
tree | 5a4734260635c750c32b788f1fa74117224b7348 /include/sfx2 | |
parent | 502a7662555bfa66ab6be84b7d2d11b049ed7a4e (diff) |
convert SFX_SHELL constants to scoped enum
Change-Id: If1649e8f3b9d200b0b176bef7deea41445bd3f2f
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/dispatch.hxx | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx index 274c0c2444cd..dc9c5a79ef0b 100644 --- a/include/sfx2/dispatch.hxx +++ b/include/sfx2/dispatch.hxx @@ -27,6 +27,7 @@ #include <sfx2/bindings.hxx> #include <sfx2/viewfrm.hxx> +#include <o3tl/typed_flags_set.hxx> class SfxSlotServer; class SfxShell; @@ -54,11 +55,17 @@ namespace com } - -#define SFX_SHELL_POP_UNTIL 4 -#define SFX_SHELL_POP_DELETE 2 -#define SFX_SHELL_PUSH 1 - +enum class SfxDispatcherPopFlags +{ + NONE = 0, + POP_UNTIL = 4, + POP_DELETE = 2, + PUSH = 1, +}; +namespace o3tl +{ + template<> struct typed_flags<SfxDispatcherPopFlags> : is_typed_flags<SfxDispatcherPopFlags, 0x07> {}; +} enum SfxSlotFilterState { @@ -143,11 +150,11 @@ public: SfxBindings* GetBindings() const; void Push( SfxShell& rShell ); - void Pop( SfxShell& rShell, sal_uInt16 nMode = 0 ); + void Pop( SfxShell& rShell, SfxDispatcherPopFlags nMode = SfxDispatcherPopFlags::NONE ); SfxShell* GetShell(sal_uInt16 nIdx) const; SfxViewFrame* GetFrame() const; - SfxModule* GetModule() const; + SfxModule* GetModule() const; // caller has to clean up the Manager on his own static SfxPopupMenuManager* Popup( sal_uInt16 nConfigId, vcl::Window *pWin, const Point *pPos ); @@ -173,7 +180,7 @@ public: ::com::sun::star::frame::XDispatch* GetDispatchInterface( const OUString& ); void SetDisableFlags( sal_uInt32 nFlags ); - sal_uInt32 GetDisableFlags() const; + sal_uInt32 GetDisableFlags() const; SAL_DLLPRIVATE void SetMenu_Impl(); SAL_DLLPRIVATE void Update_Impl( bool bForce = false ); // ObjectBars etc. |