diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-13 08:44:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-13 09:25:51 +0200 |
commit | 666f42854e04141541227d88130ff3338aff07b6 (patch) | |
tree | e14a945622bcb0c87d3015ea2e514f1b593624bf /include/vcl | |
parent | facc91ab4a3f25b3290408c7083ed4c09dd8d759 (diff) |
convert FLOATWIN_POPUPMODEEND constants to scoped enum
Change-Id: I36fea4608c744c941bdff401b649fa46302b4dbd
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/floatwin.hxx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx index d02b191aa279..2a35d6e6dc4f 100644 --- a/include/vcl/floatwin.hxx +++ b/include/vcl/floatwin.hxx @@ -58,10 +58,18 @@ namespace o3tl template<> struct typed_flags<FloatWinPopupFlags> : is_typed_flags<FloatWinPopupFlags, 0x03ffff> {}; } -#define FLOATWIN_POPUPMODEEND_CANCEL ((sal_uInt16)0x0001) -#define FLOATWIN_POPUPMODEEND_TEAROFF ((sal_uInt16)0x0002) -#define FLOATWIN_POPUPMODEEND_DONTCALLHDL ((sal_uInt16)0x0004) -#define FLOATWIN_POPUPMODEEND_CLOSEALL ((sal_uInt16)0x0008) +enum class FloatWinPopupEndFlags +{ + NONE = 0x00, + Cancel = 0x01, + TearOff = 0x02, + DontCallHdl = 0x04, + CloseAll = 0x08, +}; +namespace o3tl +{ + template<> struct typed_flags<FloatWinPopupEndFlags> : is_typed_flags<FloatWinPopupEndFlags, 0x0f> {}; +} #define FLOATWIN_TITLE_NORMAL ((sal_uInt16)0x0001) #define FLOATWIN_TITLE_TEAROFF ((sal_uInt16)0x0002) @@ -121,7 +129,7 @@ public: SAL_DLLPRIVATE static Point ImplCalcPos( vcl::Window* pWindow, const Rectangle& rRect, FloatWinPopupFlags nFlags, sal_uInt16& rArrangeIndex ); - SAL_DLLPRIVATE void ImplEndPopupMode( sal_uInt16 nFlags = 0, sal_uLong nFocusId = 0 ); + SAL_DLLPRIVATE void ImplEndPopupMode( FloatWinPopupEndFlags nFlags = FloatWinPopupEndFlags::NONE, sal_uLong nFocusId = 0 ); SAL_DLLPRIVATE Rectangle& ImplGetItemEdgeClipRect(); SAL_DLLPRIVATE bool ImplIsInPrivatePopupMode() const { return mbInPopupMode; } virtual void doDeferredInit(WinBits nBits) SAL_OVERRIDE; @@ -144,7 +152,7 @@ public: void StartPopupMode( const Rectangle& rRect, FloatWinPopupFlags nFlags = FloatWinPopupFlags::NONE ); void StartPopupMode( ToolBox* pBox, FloatWinPopupFlags nFlags = FloatWinPopupFlags::NONE ); - void EndPopupMode( sal_uInt16 nFlags = 0 ); + void EndPopupMode( FloatWinPopupEndFlags nFlags = FloatWinPopupEndFlags::NONE ); void AddPopupModeWindow( vcl::Window* pWindow ); FloatWinPopupFlags GetPopupModeFlags() const { return mnPopupModeFlags; } void SetPopupModeFlags( FloatWinPopupFlags nFlags ) { mnPopupModeFlags = nFlags; } |