diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-20 12:57:20 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-22 10:28:40 +0200 |
commit | 9905f055e2fac36c60f5d11872c636f995521c20 (patch) | |
tree | d83dfc9e97d4ec20eb6a4494dabc0f8465b90149 /include | |
parent | 321d924f157ffbe05b9a9286ac7cb9d5f6bfe45c (diff) |
convert SFX_TOOLBOX_ constants to scoped enum
and move them to a more logical header
Change-Id: I56956969d3067d66ccdadd53cd5630409de16cd8
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/imgmgr.hxx | 20 | ||||
-rw-r--r-- | include/svtools/imgdef.hxx | 3 |
2 files changed, 17 insertions, 6 deletions
diff --git a/include/sfx2/imgmgr.hxx b/include/sfx2/imgmgr.hxx index 779885212d43..c65f19d3d24c 100644 --- a/include/sfx2/imgmgr.hxx +++ b/include/sfx2/imgmgr.hxx @@ -21,14 +21,28 @@ #define INCLUDED_SFX2_IMGMGR_HXX #include <sal/config.h> -#include <sfx2/dllapi.h> - #include <sal/types.h> +#include <o3tl/typed_flags_set.hxx> +#include <sfx2/dllapi.h> #include <vcl/image.hxx> + class ToolBox; class SfxModule; class SfxImageManager_Impl; + +enum class SfxToolboxFlags +{ + CHANGESYMBOLSET = 0x01, + CHANGEOUTSTYLE = 0x02, + ALL = CHANGESYMBOLSET | CHANGEOUTSTYLE, +}; +namespace o3tl +{ + template<> struct typed_flags<SfxToolboxFlags> : is_typed_flags<SfxToolboxFlags, 0x03> {}; +} + + class SFX2_DLLPUBLIC SfxImageManager { SfxImageManager_Impl* pImp; @@ -39,7 +53,7 @@ public: SfxImageManager(SfxModule& rModule); ~SfxImageManager(); - void RegisterToolBox( ToolBox *pBox, sal_uInt16 nFlags=0xFFFF); + void RegisterToolBox( ToolBox *pBox, SfxToolboxFlags nFlags=SfxToolboxFlags::ALL); void ReleaseToolBox( ToolBox *pBox ); Image GetImage( sal_uInt16 nId, bool bLarge ) const; diff --git a/include/svtools/imgdef.hxx b/include/svtools/imgdef.hxx index 0b27801c89c0..cd9c6d9e15d5 100644 --- a/include/svtools/imgdef.hxx +++ b/include/svtools/imgdef.hxx @@ -27,9 +27,6 @@ enum SfxSymbolsSize SFX_SYMBOLS_SIZE_AUTO }; -#define SFX_TOOLBOX_CHANGESYMBOLSET 0x0001 -#define SFX_TOOLBOX_CHANGEOUTSTYLE 0x0002 - #endif // INCLUDED_SVTOOLS_IMGDEF_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |