diff options
author | Noel Grandin <noel@peralex.com> | 2014-04-14 11:50:33 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-04-15 09:02:32 +0200 |
commit | 8fbbd1bd988f0e886095e012c48d93b999773273 (patch) | |
tree | 5eec05a5492bd3e688dfb14065fdff4eb1f36633 /include/sfx2 | |
parent | 3edb4611b2314fa5c03e1b4f70c425d92c95ed16 (diff) |
fix hacked bool in SfxDispatcher::SetSlotFilter
The bEnable flag was being passed an extra value.
Make this explicit now using an enum.
Change-Id: I292aca44e8592c9f3c1497c24c41140c8c3b5452
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/dispatch.hxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx index 15b26f75abeb..ca6996b1cc1d 100644 --- a/include/sfx2/dispatch.hxx +++ b/include/sfx2/dispatch.hxx @@ -61,6 +61,14 @@ namespace com #define SFX_SHELL_PUSH 1 +enum SfxSlotFilterState +{ + SFX_SLOT_FILTER_DISABLED, + SFX_SLOT_FILTER_ENABLED, + // enabled even if ReadOnlyDoc + SFX_SLOT_FILTER_ENABLED_READONLY, +}; + class SFX2_DLLPUBLIC SfxDispatcher { @@ -158,8 +166,7 @@ public: void Flush(); void Lock( bool bLock ); bool IsLocked( sal_uInt16 nSID = 0 ) const; - // bEnable can be sal_True,sal_False, or 2(some kind of read-only override hack) - void SetSlotFilter( sal_Bool bEnable = sal_False, + void SetSlotFilter( SfxSlotFilterState nEnable = SFX_SLOT_FILTER_DISABLED, sal_uInt16 nCount = 0, const sal_uInt16 *pSIDs = 0 ); void HideUI( bool bHide = true ); @@ -180,8 +187,7 @@ public: bool bOwnShellsOnly, bool bModal, bool bRealSlot=true ); SAL_DLLPRIVATE void SetReadOnly_Impl( bool bOn ); SAL_DLLPRIVATE bool GetReadOnly_Impl() const; - // bEnable can be sal_True,sal_False, or 2(some kind of read-only override hack) - SAL_DLLPRIVATE sal_Bool IsSlotEnabledByFilter_Impl( sal_uInt16 nSID ) const; + SAL_DLLPRIVATE SfxSlotFilterState IsSlotEnabledByFilter_Impl( sal_uInt16 nSID ) const; SAL_DLLPRIVATE void SetQuietMode_Impl( bool bOn ); SAL_DLLPRIVATE bool IsReadOnlyShell_Impl( sal_uInt16 nShell ) const; SAL_DLLPRIVATE void RemoveShell_Impl( SfxShell& rShell ); |